spec/Asset.js

  1. /**
  2. * # 📝 Asset Specification
  3. *
  4. * @example
  5. * const validate = ajv.getSchema('Asset')
  6. *
  7. * @typedef {Object} Asset
  8. * @property {number} id Asset Index
  9. * @property {number} decimals Asset Decimals
  10. * @namespace Asset
  11. */
  12. /**
  13. * ## 📝 Asset Specification
  14. * @type {Schema}
  15. * @name AssetSchema
  16. * @see {AlgodexApi#setAsset}
  17. * @memberOf Schema
  18. */
  19. module.exports = {
  20. '$schema': 'http://json-schema.org/draft-07/schema',
  21. '$id': 'https://schemas.algodex.com/v1/Asset.json',
  22. 'title': 'Asset',
  23. 'description': 'Algorand standard asset',
  24. 'type': 'object',
  25. 'properties': {
  26. 'id': {
  27. 'type': 'number',
  28. 'minimum': 0,
  29. },
  30. 'balance': {
  31. 'type': 'number',
  32. 'minimum': 0,
  33. },
  34. },
  35. 'required': ['id'],
  36. };
  37. JAVASCRIPT
    Copied!