@polymeshassociation/polymesh-sdk 23.0.0-alpha.3 → 23.0.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/api/client/Assets.d.ts +23 -8
  3. package/api/client/Assets.d.ts.map +1 -1
  4. package/api/client/Assets.js +35 -7
  5. package/api/client/Assets.js.map +1 -1
  6. package/api/entities/Account/helpers.d.ts +3 -2
  7. package/api/entities/Account/helpers.d.ts.map +1 -1
  8. package/api/entities/Account/helpers.js.map +1 -1
  9. package/api/entities/Asset/Base/BaseAsset.d.ts +83 -0
  10. package/api/entities/Asset/Base/BaseAsset.d.ts.map +1 -0
  11. package/api/entities/Asset/Base/BaseAsset.js +175 -0
  12. package/api/entities/Asset/Base/BaseAsset.js.map +1 -0
  13. package/api/entities/Asset/{Compliance → Base/Compliance}/Requirements.d.ts +10 -10
  14. package/api/entities/Asset/Base/Compliance/Requirements.d.ts.map +1 -0
  15. package/api/entities/Asset/{Compliance → Base/Compliance}/Requirements.js +3 -3
  16. package/api/entities/Asset/Base/Compliance/Requirements.js.map +1 -0
  17. package/api/entities/Asset/{Compliance → Base/Compliance}/TrustedClaimIssuers.d.ts +7 -7
  18. package/api/entities/Asset/Base/Compliance/TrustedClaimIssuers.d.ts.map +1 -0
  19. package/api/entities/Asset/{Compliance → Base/Compliance}/TrustedClaimIssuers.js +4 -4
  20. package/api/entities/Asset/Base/Compliance/TrustedClaimIssuers.js.map +1 -0
  21. package/api/entities/Asset/{Compliance → Base/Compliance}/index.d.ts +3 -3
  22. package/api/entities/Asset/Base/Compliance/index.d.ts.map +1 -0
  23. package/api/entities/Asset/{Compliance → Base/Compliance}/index.js +1 -1
  24. package/api/entities/Asset/Base/Compliance/index.js.map +1 -0
  25. package/api/entities/Asset/{Documents.d.ts → Base/Documents/index.d.ts} +7 -8
  26. package/api/entities/Asset/Base/Documents/index.d.ts.map +1 -0
  27. package/api/entities/Asset/{Documents.js → Base/Documents/index.js} +4 -4
  28. package/api/entities/Asset/Base/Documents/index.js.map +1 -0
  29. package/api/entities/Asset/{Metadata.d.ts → Base/Metadata/index.d.ts} +11 -5
  30. package/api/entities/Asset/Base/Metadata/index.d.ts.map +1 -0
  31. package/api/entities/Asset/{Metadata.js → Base/Metadata/index.js} +17 -5
  32. package/api/entities/Asset/Base/Metadata/index.js.map +1 -0
  33. package/api/entities/Asset/{Permissions.d.ts → Base/Permissions/index.d.ts} +5 -5
  34. package/api/entities/Asset/Base/Permissions/index.d.ts.map +1 -0
  35. package/api/entities/Asset/{Permissions.js → Base/Permissions/index.js} +5 -5
  36. package/api/entities/Asset/Base/Permissions/index.js.map +1 -0
  37. package/api/entities/Asset/Base/index.d.ts +2 -0
  38. package/api/entities/Asset/Base/index.d.ts.map +1 -0
  39. package/api/entities/Asset/Base/index.js +18 -0
  40. package/api/entities/Asset/Base/index.js.map +1 -0
  41. package/api/entities/Asset/{AssetHolders.d.ts → Fungible/AssetHolders/index.d.ts} +4 -4
  42. package/api/entities/Asset/Fungible/AssetHolders/index.d.ts.map +1 -0
  43. package/api/entities/Asset/{AssetHolders.js → Fungible/AssetHolders/index.js} +4 -4
  44. package/api/entities/Asset/Fungible/AssetHolders/index.js.map +1 -0
  45. package/api/entities/Asset/{Checkpoints → Fungible/Checkpoints}/Schedules.d.ts +4 -4
  46. package/api/entities/Asset/Fungible/Checkpoints/Schedules.d.ts.map +1 -0
  47. package/api/entities/Asset/{Checkpoints → Fungible/Checkpoints}/Schedules.js +4 -4
  48. package/api/entities/Asset/Fungible/Checkpoints/Schedules.js.map +1 -0
  49. package/api/entities/Asset/{Checkpoints → Fungible/Checkpoints}/index.d.ts +4 -4
  50. package/api/entities/Asset/Fungible/Checkpoints/index.d.ts.map +1 -0
  51. package/api/entities/Asset/{Checkpoints → Fungible/Checkpoints}/index.js +5 -5
  52. package/api/entities/Asset/Fungible/Checkpoints/index.js.map +1 -0
  53. package/api/entities/Asset/{Checkpoints → Fungible/Checkpoints}/types.d.ts +1 -1
  54. package/api/entities/Asset/Fungible/Checkpoints/types.d.ts.map +1 -0
  55. package/api/entities/Asset/Fungible/Checkpoints/types.js.map +1 -0
  56. package/api/entities/Asset/{CorporateActions → Fungible/CorporateActions}/Distributions.d.ts +4 -4
  57. package/api/entities/Asset/Fungible/CorporateActions/Distributions.d.ts.map +1 -0
  58. package/api/entities/Asset/{CorporateActions → Fungible/CorporateActions}/Distributions.js +4 -4
  59. package/api/entities/Asset/Fungible/CorporateActions/Distributions.js.map +1 -0
  60. package/api/entities/Asset/{CorporateActions → Fungible/CorporateActions}/index.d.ts +4 -4
  61. package/api/entities/Asset/Fungible/CorporateActions/index.d.ts.map +1 -0
  62. package/api/entities/Asset/{CorporateActions → Fungible/CorporateActions}/index.js +3 -3
  63. package/api/entities/Asset/Fungible/CorporateActions/index.js.map +1 -0
  64. package/api/entities/Asset/{CorporateActions → Fungible/CorporateActions}/types.d.ts +1 -1
  65. package/api/entities/Asset/Fungible/CorporateActions/types.d.ts.map +1 -0
  66. package/api/entities/Asset/Fungible/CorporateActions/types.js.map +1 -0
  67. package/api/entities/Asset/{Issuance.d.ts → Fungible/Issuance/index.d.ts} +6 -6
  68. package/api/entities/Asset/Fungible/Issuance/index.d.ts.map +1 -0
  69. package/api/entities/Asset/{Issuance.js → Fungible/Issuance/index.js} +3 -3
  70. package/api/entities/Asset/Fungible/Issuance/index.js.map +1 -0
  71. package/api/entities/Asset/{Offerings.d.ts → Fungible/Offerings/index.d.ts} +5 -5
  72. package/api/entities/Asset/Fungible/Offerings/index.d.ts.map +1 -0
  73. package/api/entities/Asset/{Offerings.js → Fungible/Offerings/index.js} +5 -5
  74. package/api/entities/Asset/Fungible/Offerings/index.js.map +1 -0
  75. package/api/entities/Asset/{Settlements.d.ts → Fungible/Settlements/index.d.ts} +4 -4
  76. package/api/entities/Asset/Fungible/Settlements/index.d.ts.map +1 -0
  77. package/api/entities/Asset/{Settlements.js → Fungible/Settlements/index.js} +5 -5
  78. package/api/entities/Asset/Fungible/Settlements/index.js.map +1 -0
  79. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/ClaimCount.d.ts +2 -2
  80. package/api/entities/Asset/Fungible/TransferRestrictions/ClaimCount.d.ts.map +1 -0
  81. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/ClaimCount.js +2 -2
  82. package/api/entities/Asset/Fungible/TransferRestrictions/ClaimCount.js.map +1 -0
  83. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/ClaimPercentage.d.ts +2 -2
  84. package/api/entities/Asset/Fungible/TransferRestrictions/ClaimPercentage.d.ts.map +1 -0
  85. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/ClaimPercentage.js +2 -2
  86. package/api/entities/Asset/Fungible/TransferRestrictions/ClaimPercentage.js.map +1 -0
  87. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/Count.d.ts +3 -3
  88. package/api/entities/Asset/Fungible/TransferRestrictions/Count.d.ts.map +1 -0
  89. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/Count.js +2 -2
  90. package/api/entities/Asset/Fungible/TransferRestrictions/Count.js.map +1 -0
  91. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/Percentage.d.ts +2 -2
  92. package/api/entities/Asset/Fungible/TransferRestrictions/Percentage.d.ts.map +1 -0
  93. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/Percentage.js +2 -2
  94. package/api/entities/Asset/Fungible/TransferRestrictions/Percentage.js.map +1 -0
  95. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/TransferRestrictionBase.d.ts +4 -4
  96. package/api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.d.ts.map +1 -0
  97. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/TransferRestrictionBase.js +4 -4
  98. package/api/entities/Asset/Fungible/TransferRestrictions/TransferRestrictionBase.js.map +1 -0
  99. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/index.d.ts +3 -3
  100. package/api/entities/Asset/Fungible/TransferRestrictions/index.d.ts.map +1 -0
  101. package/api/entities/Asset/{TransferRestrictions → Fungible/TransferRestrictions}/index.js +1 -1
  102. package/api/entities/Asset/Fungible/TransferRestrictions/index.js.map +1 -0
  103. package/api/entities/Asset/Fungible/index.d.ts +88 -0
  104. package/api/entities/Asset/Fungible/index.d.ts.map +1 -0
  105. package/api/entities/Asset/Fungible/index.js +159 -0
  106. package/api/entities/Asset/Fungible/index.js.map +1 -0
  107. package/api/entities/Asset/NonFungible/NftCollection.d.ts +31 -0
  108. package/api/entities/Asset/NonFungible/NftCollection.d.ts.map +1 -0
  109. package/api/entities/Asset/NonFungible/NftCollection.js +100 -0
  110. package/api/entities/Asset/NonFungible/NftCollection.js.map +1 -0
  111. package/api/entities/Asset/NonFungible/index.d.ts +2 -0
  112. package/api/entities/Asset/NonFungible/index.d.ts.map +1 -0
  113. package/api/entities/Asset/NonFungible/index.js +18 -0
  114. package/api/entities/Asset/NonFungible/index.js.map +1 -0
  115. package/api/entities/Asset/index.d.ts +4 -158
  116. package/api/entities/Asset/index.d.ts.map +1 -1
  117. package/api/entities/Asset/index.js +17 -270
  118. package/api/entities/Asset/index.js.map +1 -1
  119. package/api/entities/Asset/types.d.ts +14 -4
  120. package/api/entities/Asset/types.d.ts.map +1 -1
  121. package/api/entities/Asset/types.js +2 -2
  122. package/api/entities/Asset/types.js.map +1 -1
  123. package/api/entities/Checkpoint.d.ts +2 -2
  124. package/api/entities/Checkpoint.d.ts.map +1 -1
  125. package/api/entities/Checkpoint.js +1 -1
  126. package/api/entities/Checkpoint.js.map +1 -1
  127. package/api/entities/CheckpointSchedule/index.d.ts +2 -2
  128. package/api/entities/CheckpointSchedule/index.d.ts.map +1 -1
  129. package/api/entities/CheckpointSchedule/index.js +1 -1
  130. package/api/entities/CheckpointSchedule/index.js.map +1 -1
  131. package/api/entities/CorporateActionBase/index.d.ts +2 -2
  132. package/api/entities/CorporateActionBase/index.d.ts.map +1 -1
  133. package/api/entities/CorporateActionBase/index.js +1 -1
  134. package/api/entities/CorporateActionBase/index.js.map +1 -1
  135. package/api/entities/DefaultTrustedClaimIssuer.d.ts +2 -2
  136. package/api/entities/DefaultTrustedClaimIssuer.d.ts.map +1 -1
  137. package/api/entities/DefaultTrustedClaimIssuer.js +1 -1
  138. package/api/entities/DefaultTrustedClaimIssuer.js.map +1 -1
  139. package/api/entities/Identity/AssetPermissions.d.ts +6 -6
  140. package/api/entities/Identity/AssetPermissions.d.ts.map +1 -1
  141. package/api/entities/Identity/AssetPermissions.js +2 -2
  142. package/api/entities/Identity/AssetPermissions.js.map +1 -1
  143. package/api/entities/Identity/index.d.ts +3 -3
  144. package/api/entities/Identity/index.d.ts.map +1 -1
  145. package/api/entities/Identity/index.js +2 -2
  146. package/api/entities/Identity/index.js.map +1 -1
  147. package/api/entities/Instruction/index.d.ts.map +1 -1
  148. package/api/entities/Instruction/index.js +1 -1
  149. package/api/entities/Instruction/index.js.map +1 -1
  150. package/api/entities/Instruction/types.d.ts +2 -2
  151. package/api/entities/Instruction/types.d.ts.map +1 -1
  152. package/api/entities/MetadataEntry/index.d.ts +2 -2
  153. package/api/entities/MetadataEntry/index.d.ts.map +1 -1
  154. package/api/entities/MetadataEntry/index.js +1 -1
  155. package/api/entities/MetadataEntry/index.js.map +1 -1
  156. package/api/entities/Offering/index.d.ts +2 -2
  157. package/api/entities/Offering/index.d.ts.map +1 -1
  158. package/api/entities/Offering/index.js +1 -1
  159. package/api/entities/Offering/index.js.map +1 -1
  160. package/api/entities/PermissionGroup.d.ts +2 -2
  161. package/api/entities/PermissionGroup.d.ts.map +1 -1
  162. package/api/entities/PermissionGroup.js +1 -1
  163. package/api/entities/PermissionGroup.js.map +1 -1
  164. package/api/entities/Portfolio/index.d.ts +2 -2
  165. package/api/entities/Portfolio/index.d.ts.map +1 -1
  166. package/api/entities/Portfolio/index.js +4 -4
  167. package/api/entities/Portfolio/index.js.map +1 -1
  168. package/api/entities/Portfolio/types.d.ts +2 -2
  169. package/api/entities/Portfolio/types.d.ts.map +1 -1
  170. package/api/entities/TickerReservation/index.d.ts +2 -2
  171. package/api/entities/TickerReservation/index.d.ts.map +1 -1
  172. package/api/entities/types.d.ts +3 -2
  173. package/api/entities/types.d.ts.map +1 -1
  174. package/api/entities/types.js.map +1 -1
  175. package/api/procedures/addAssetRequirement.d.ts +4 -4
  176. package/api/procedures/addAssetRequirement.d.ts.map +1 -1
  177. package/api/procedures/addAssetRequirement.js +3 -3
  178. package/api/procedures/addAssetRequirement.js.map +1 -1
  179. package/api/procedures/addAssetStat.d.ts.map +1 -1
  180. package/api/procedures/addAssetStat.js +1 -1
  181. package/api/procedures/addAssetStat.js.map +1 -1
  182. package/api/procedures/addTransferRestriction.d.ts.map +1 -1
  183. package/api/procedures/addTransferRestriction.js +1 -1
  184. package/api/procedures/addTransferRestriction.js.map +1 -1
  185. package/api/procedures/closeOffering.d.ts.map +1 -1
  186. package/api/procedures/closeOffering.js +1 -1
  187. package/api/procedures/closeOffering.js.map +1 -1
  188. package/api/procedures/configureDividendDistribution.d.ts.map +1 -1
  189. package/api/procedures/configureDividendDistribution.js +1 -1
  190. package/api/procedures/configureDividendDistribution.js.map +1 -1
  191. package/api/procedures/controllerTransfer.d.ts.map +1 -1
  192. package/api/procedures/controllerTransfer.js +2 -2
  193. package/api/procedures/controllerTransfer.js.map +1 -1
  194. package/api/procedures/createAsset.d.ts +5 -5
  195. package/api/procedures/createAsset.d.ts.map +1 -1
  196. package/api/procedures/createAsset.js +4 -20
  197. package/api/procedures/createAsset.js.map +1 -1
  198. package/api/procedures/createCheckpoint.d.ts.map +1 -1
  199. package/api/procedures/createCheckpoint.js +1 -1
  200. package/api/procedures/createCheckpoint.js.map +1 -1
  201. package/api/procedures/createCheckpointSchedule.d.ts.map +1 -1
  202. package/api/procedures/createCheckpointSchedule.js +1 -1
  203. package/api/procedures/createCheckpointSchedule.js.map +1 -1
  204. package/api/procedures/createGroup.d.ts +2 -2
  205. package/api/procedures/createGroup.d.ts.map +1 -1
  206. package/api/procedures/createGroup.js +1 -1
  207. package/api/procedures/createGroup.js.map +1 -1
  208. package/api/procedures/createNftCollection.d.ts +41 -0
  209. package/api/procedures/createNftCollection.d.ts.map +1 -0
  210. package/api/procedures/createNftCollection.js +248 -0
  211. package/api/procedures/createNftCollection.js.map +1 -0
  212. package/api/procedures/inviteExternalAgent.d.ts +2 -2
  213. package/api/procedures/inviteExternalAgent.d.ts.map +1 -1
  214. package/api/procedures/inviteExternalAgent.js +1 -1
  215. package/api/procedures/inviteExternalAgent.js.map +1 -1
  216. package/api/procedures/issueTokens.d.ts +6 -6
  217. package/api/procedures/issueTokens.d.ts.map +1 -1
  218. package/api/procedures/issueTokens.js +1 -1
  219. package/api/procedures/issueTokens.js.map +1 -1
  220. package/api/procedures/launchOffering.d.ts.map +1 -1
  221. package/api/procedures/launchOffering.js +1 -1
  222. package/api/procedures/launchOffering.js.map +1 -1
  223. package/api/procedures/linkCaDocs.d.ts.map +1 -1
  224. package/api/procedures/linkCaDocs.js +1 -1
  225. package/api/procedures/linkCaDocs.js.map +1 -1
  226. package/api/procedures/modifyAsset.d.ts +4 -4
  227. package/api/procedures/modifyAsset.d.ts.map +1 -1
  228. package/api/procedures/modifyAsset.js +2 -2
  229. package/api/procedures/modifyAsset.js.map +1 -1
  230. package/api/procedures/modifyAssetTrustedClaimIssuers.d.ts +4 -4
  231. package/api/procedures/modifyAssetTrustedClaimIssuers.d.ts.map +1 -1
  232. package/api/procedures/modifyAssetTrustedClaimIssuers.js +2 -2
  233. package/api/procedures/modifyAssetTrustedClaimIssuers.js.map +1 -1
  234. package/api/procedures/modifyCaCheckpoint.d.ts.map +1 -1
  235. package/api/procedures/modifyCaCheckpoint.js +1 -1
  236. package/api/procedures/modifyCaCheckpoint.js.map +1 -1
  237. package/api/procedures/modifyCaDefaultConfig.d.ts.map +1 -1
  238. package/api/procedures/modifyCaDefaultConfig.js +2 -2
  239. package/api/procedures/modifyCaDefaultConfig.js.map +1 -1
  240. package/api/procedures/modifyComplianceRequirement.d.ts.map +1 -1
  241. package/api/procedures/modifyComplianceRequirement.js +2 -2
  242. package/api/procedures/modifyComplianceRequirement.js.map +1 -1
  243. package/api/procedures/modifyCorporateActionsAgent.d.ts.map +1 -1
  244. package/api/procedures/modifyCorporateActionsAgent.js +2 -2
  245. package/api/procedures/modifyCorporateActionsAgent.js.map +1 -1
  246. package/api/procedures/modifyOfferingTimes.d.ts.map +1 -1
  247. package/api/procedures/modifyOfferingTimes.js +1 -1
  248. package/api/procedures/modifyOfferingTimes.js.map +1 -1
  249. package/api/procedures/reclaimDividendDistributionFunds.d.ts.map +1 -1
  250. package/api/procedures/reclaimDividendDistributionFunds.js +1 -1
  251. package/api/procedures/reclaimDividendDistributionFunds.js.map +1 -1
  252. package/api/procedures/redeemTokens.d.ts.map +1 -1
  253. package/api/procedures/redeemTokens.js +2 -2
  254. package/api/procedures/redeemTokens.js.map +1 -1
  255. package/api/procedures/registerMetadata.d.ts.map +1 -1
  256. package/api/procedures/registerMetadata.js +1 -1
  257. package/api/procedures/registerMetadata.js.map +1 -1
  258. package/api/procedures/removeAssetRequirement.d.ts +4 -4
  259. package/api/procedures/removeAssetRequirement.d.ts.map +1 -1
  260. package/api/procedures/removeAssetRequirement.js +2 -2
  261. package/api/procedures/removeAssetRequirement.js.map +1 -1
  262. package/api/procedures/removeAssetStat.d.ts.map +1 -1
  263. package/api/procedures/removeAssetStat.js +1 -1
  264. package/api/procedures/removeAssetStat.js.map +1 -1
  265. package/api/procedures/removeCheckpointSchedule.d.ts.map +1 -1
  266. package/api/procedures/removeCheckpointSchedule.js +1 -1
  267. package/api/procedures/removeCheckpointSchedule.js.map +1 -1
  268. package/api/procedures/removeCorporateAction.js +1 -1
  269. package/api/procedures/removeCorporateAction.js.map +1 -1
  270. package/api/procedures/removeExternalAgent.d.ts +2 -2
  271. package/api/procedures/removeExternalAgent.d.ts.map +1 -1
  272. package/api/procedures/removeExternalAgent.js +1 -1
  273. package/api/procedures/removeExternalAgent.js.map +1 -1
  274. package/api/procedures/setAssetDocuments.d.ts +5 -5
  275. package/api/procedures/setAssetDocuments.d.ts.map +1 -1
  276. package/api/procedures/setAssetDocuments.js +2 -2
  277. package/api/procedures/setAssetDocuments.js.map +1 -1
  278. package/api/procedures/setAssetRequirements.d.ts +4 -4
  279. package/api/procedures/setAssetRequirements.d.ts.map +1 -1
  280. package/api/procedures/setAssetRequirements.js +4 -4
  281. package/api/procedures/setAssetRequirements.js.map +1 -1
  282. package/api/procedures/setMetadata.d.ts.map +1 -1
  283. package/api/procedures/setMetadata.js +1 -1
  284. package/api/procedures/setMetadata.js.map +1 -1
  285. package/api/procedures/setPermissionGroup.d.ts +2 -2
  286. package/api/procedures/setPermissionGroup.d.ts.map +1 -1
  287. package/api/procedures/setTransferRestrictions.d.ts +1 -1
  288. package/api/procedures/setTransferRestrictions.d.ts.map +1 -1
  289. package/api/procedures/setTransferRestrictions.js +2 -2
  290. package/api/procedures/setTransferRestrictions.js.map +1 -1
  291. package/api/procedures/setVenueFiltering.d.ts.map +1 -1
  292. package/api/procedures/setVenueFiltering.js +1 -1
  293. package/api/procedures/setVenueFiltering.js.map +1 -1
  294. package/api/procedures/toggleFreezeOffering.d.ts.map +1 -1
  295. package/api/procedures/toggleFreezeOffering.js +1 -1
  296. package/api/procedures/toggleFreezeOffering.js.map +1 -1
  297. package/api/procedures/toggleFreezeTransfers.d.ts +4 -4
  298. package/api/procedures/toggleFreezeTransfers.d.ts.map +1 -1
  299. package/api/procedures/toggleFreezeTransfers.js +4 -4
  300. package/api/procedures/toggleFreezeTransfers.js.map +1 -1
  301. package/api/procedures/togglePauseRequirements.d.ts +4 -4
  302. package/api/procedures/togglePauseRequirements.d.ts.map +1 -1
  303. package/api/procedures/togglePauseRequirements.js +2 -2
  304. package/api/procedures/togglePauseRequirements.js.map +1 -1
  305. package/api/procedures/transferAssetOwnership.d.ts.map +1 -1
  306. package/api/procedures/transferAssetOwnership.js +1 -1
  307. package/api/procedures/transferAssetOwnership.js.map +1 -1
  308. package/api/procedures/types.d.ts +45 -5
  309. package/api/procedures/types.d.ts.map +1 -1
  310. package/api/procedures/types.js.map +1 -1
  311. package/api/procedures/utils.d.ts +10 -4
  312. package/api/procedures/utils.d.ts.map +1 -1
  313. package/api/procedures/utils.js +19 -2
  314. package/api/procedures/utils.js.map +1 -1
  315. package/api/procedures/waivePermissions.d.ts +2 -2
  316. package/api/procedures/waivePermissions.d.ts.map +1 -1
  317. package/api/procedures/waivePermissions.js.map +1 -1
  318. package/base/Context.d.ts +2 -2
  319. package/base/Context.d.ts.map +1 -1
  320. package/base/Procedure.js.map +1 -1
  321. package/internal.d.ts +3 -2
  322. package/internal.d.ts.map +1 -1
  323. package/internal.js +9 -5
  324. package/internal.js.map +1 -1
  325. package/npm-package/polymeshassociation-polymesh-sdk-23.0.0-alpha.5.tgz +0 -0
  326. package/package.json +1 -1
  327. package/types/index.d.ts +11 -6
  328. package/types/index.d.ts.map +1 -1
  329. package/types/index.js +7 -1
  330. package/types/index.js.map +1 -1
  331. package/types/internal.d.ts +6 -1
  332. package/types/internal.d.ts.map +1 -1
  333. package/types/internal.js.map +1 -1
  334. package/utils/conversion.d.ts +22 -5
  335. package/utils/conversion.d.ts.map +1 -1
  336. package/utils/conversion.js +50 -18
  337. package/utils/conversion.js.map +1 -1
  338. package/utils/internal.d.ts +19 -6
  339. package/utils/internal.d.ts.map +1 -1
  340. package/utils/internal.js +36 -4
  341. package/utils/internal.js.map +1 -1
  342. package/utils/typeguards.d.ts +10 -6
  343. package/utils/typeguards.d.ts.map +1 -1
  344. package/utils/typeguards.js +15 -8
  345. package/utils/typeguards.js.map +1 -1
  346. package/api/entities/Asset/AssetHolders.d.ts.map +0 -1
  347. package/api/entities/Asset/AssetHolders.js.map +0 -1
  348. package/api/entities/Asset/Checkpoints/Schedules.d.ts.map +0 -1
  349. package/api/entities/Asset/Checkpoints/Schedules.js.map +0 -1
  350. package/api/entities/Asset/Checkpoints/index.d.ts.map +0 -1
  351. package/api/entities/Asset/Checkpoints/index.js.map +0 -1
  352. package/api/entities/Asset/Checkpoints/types.d.ts.map +0 -1
  353. package/api/entities/Asset/Checkpoints/types.js.map +0 -1
  354. package/api/entities/Asset/Compliance/Requirements.d.ts.map +0 -1
  355. package/api/entities/Asset/Compliance/Requirements.js.map +0 -1
  356. package/api/entities/Asset/Compliance/TrustedClaimIssuers.d.ts.map +0 -1
  357. package/api/entities/Asset/Compliance/TrustedClaimIssuers.js.map +0 -1
  358. package/api/entities/Asset/Compliance/index.d.ts.map +0 -1
  359. package/api/entities/Asset/Compliance/index.js.map +0 -1
  360. package/api/entities/Asset/CorporateActions/Distributions.d.ts.map +0 -1
  361. package/api/entities/Asset/CorporateActions/Distributions.js.map +0 -1
  362. package/api/entities/Asset/CorporateActions/index.d.ts.map +0 -1
  363. package/api/entities/Asset/CorporateActions/index.js.map +0 -1
  364. package/api/entities/Asset/CorporateActions/types.d.ts.map +0 -1
  365. package/api/entities/Asset/CorporateActions/types.js.map +0 -1
  366. package/api/entities/Asset/Documents.d.ts.map +0 -1
  367. package/api/entities/Asset/Documents.js.map +0 -1
  368. package/api/entities/Asset/Issuance.d.ts.map +0 -1
  369. package/api/entities/Asset/Issuance.js.map +0 -1
  370. package/api/entities/Asset/Metadata.d.ts.map +0 -1
  371. package/api/entities/Asset/Metadata.js.map +0 -1
  372. package/api/entities/Asset/Offerings.d.ts.map +0 -1
  373. package/api/entities/Asset/Offerings.js.map +0 -1
  374. package/api/entities/Asset/Permissions.d.ts.map +0 -1
  375. package/api/entities/Asset/Permissions.js.map +0 -1
  376. package/api/entities/Asset/Settlements.d.ts.map +0 -1
  377. package/api/entities/Asset/Settlements.js.map +0 -1
  378. package/api/entities/Asset/TransferRestrictions/ClaimCount.d.ts.map +0 -1
  379. package/api/entities/Asset/TransferRestrictions/ClaimCount.js.map +0 -1
  380. package/api/entities/Asset/TransferRestrictions/ClaimPercentage.d.ts.map +0 -1
  381. package/api/entities/Asset/TransferRestrictions/ClaimPercentage.js.map +0 -1
  382. package/api/entities/Asset/TransferRestrictions/Count.d.ts.map +0 -1
  383. package/api/entities/Asset/TransferRestrictions/Count.js.map +0 -1
  384. package/api/entities/Asset/TransferRestrictions/Percentage.d.ts.map +0 -1
  385. package/api/entities/Asset/TransferRestrictions/Percentage.js.map +0 -1
  386. package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.d.ts.map +0 -1
  387. package/api/entities/Asset/TransferRestrictions/TransferRestrictionBase.js.map +0 -1
  388. package/api/entities/Asset/TransferRestrictions/index.d.ts.map +0 -1
  389. package/api/entities/Asset/TransferRestrictions/index.js.map +0 -1
  390. package/npm-package/polymeshassociation-polymesh-sdk-23.0.0-alpha.3.tgz +0 -0
  391. /package/api/entities/Asset/{Checkpoints → Fungible/Checkpoints}/types.js +0 -0
  392. /package/api/entities/Asset/{CorporateActions → Fungible/CorporateActions}/types.js +0 -0
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.FungibleAsset = void 0;
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const lodash_1 = require("lodash");
18
+ const Base_1 = require("../Base");
19
+ const internal_1 = require("../../../../internal");
20
+ const queries_1 = require("../../../../middleware/queries");
21
+ const conversion_1 = require("../../../../utils/conversion");
22
+ const internal_2 = require("../../../../utils/internal");
23
+ const AssetHolders_1 = require("./AssetHolders");
24
+ const Checkpoints_1 = require("./Checkpoints");
25
+ const CorporateActions_1 = require("./CorporateActions");
26
+ const Issuance_1 = require("./Issuance");
27
+ const Offerings_1 = require("./Offerings");
28
+ const Settlements_1 = require("./Settlements");
29
+ const TransferRestrictions_1 = require("./TransferRestrictions");
30
+ /**
31
+ * Class used to manage all Fungible Asset functionality
32
+ */
33
+ class FungibleAsset extends Base_1.BaseAsset {
34
+ /**
35
+ * @hidden
36
+ */
37
+ constructor(identifiers, context) {
38
+ super(identifiers, context);
39
+ const { ticker } = identifiers;
40
+ this.ticker = ticker;
41
+ this.did = (0, conversion_1.tickerToDid)(ticker);
42
+ this.settlements = new Settlements_1.Settlements(this, context);
43
+ this.assetHolders = new AssetHolders_1.AssetHolders(this, context);
44
+ this.issuance = new Issuance_1.Issuance(this, context);
45
+ this.transferRestrictions = new TransferRestrictions_1.TransferRestrictions(this, context);
46
+ this.offerings = new Offerings_1.Offerings(this, context);
47
+ this.checkpoints = new Checkpoints_1.Checkpoints(this, context);
48
+ this.corporateActions = new CorporateActions_1.CorporateActions(this, context);
49
+ this.modify = (0, internal_2.createProcedureMethod)({ getProcedureAndArgs: args => [internal_1.modifyAsset, Object.assign({ ticker }, args)] }, context);
50
+ this.redeem = (0, internal_2.createProcedureMethod)({ getProcedureAndArgs: args => [internal_1.redeemTokens, Object.assign({ ticker }, args)] }, context);
51
+ this.controllerTransfer = (0, internal_2.createProcedureMethod)({ getProcedureAndArgs: args => [internal_1.controllerTransfer, Object.assign({ ticker }, args)] }, context);
52
+ this.setVenueFiltering = (0, internal_2.createProcedureMethod)({ getProcedureAndArgs: args => [internal_1.setVenueFiltering, Object.assign({ ticker }, args)] }, context);
53
+ }
54
+ // eslint-disable-next-line require-jsdoc
55
+ currentFundingRound(callback) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const { context: { polymeshApi: { query: { asset }, }, }, ticker, context, } = this;
58
+ const rawTicker = (0, conversion_1.stringToTicker)(ticker, context);
59
+ const assembleResult = (roundName) => (0, conversion_1.bytesToString)(roundName) || null;
60
+ if (callback) {
61
+ return asset.fundingRound(rawTicker, round => {
62
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises -- callback errors should be handled by the caller
63
+ callback(assembleResult(round));
64
+ });
65
+ }
66
+ const fundingRound = yield asset.fundingRound(rawTicker);
67
+ return assembleResult(fundingRound);
68
+ });
69
+ }
70
+ /**
71
+ * Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
72
+ *
73
+ * @note uses the middlewareV2
74
+ * @note there is a possibility that the data is not ready by the time it is requested. In that case, `null` is returned
75
+ */
76
+ createdAt() {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ const { ticker, context } = this;
79
+ const { data: { assets: { nodes: [asset], }, }, } = yield context.queryMiddleware((0, queries_1.assetQuery)({
80
+ ticker,
81
+ }));
82
+ return (0, internal_2.optionize)(conversion_1.middlewareEventDetailsToEventIdentifier)(asset === null || asset === void 0 ? void 0 : asset.createdBlock, asset === null || asset === void 0 ? void 0 : asset.eventIdx);
83
+ });
84
+ }
85
+ /**
86
+ * Retrieve the amount of unique investors that hold this Asset
87
+ */
88
+ investorCount() {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ const { context: { polymeshApi: { query: { asset: { balanceOf }, }, }, }, context, ticker, } = this;
91
+ const rawTicker = (0, conversion_1.stringToTicker)(ticker, context);
92
+ const balanceEntries = yield balanceOf.entries(rawTicker);
93
+ const assetBalances = balanceEntries.filter(([, balance]) => !(0, conversion_1.balanceToBigNumber)(balance).isZero());
94
+ return new bignumber_js_1.default(assetBalances.length);
95
+ });
96
+ }
97
+ /**
98
+ * Retrieve this Asset's Operation History
99
+ *
100
+ * @note Operations are grouped by the agent Identity who performed them
101
+ *
102
+ * @note uses the middlewareV2
103
+ */
104
+ getOperationHistory() {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ const { context, ticker: assetId } = this;
107
+ const { data: { tickerExternalAgentHistories: { nodes }, }, } = yield context.queryMiddleware((0, queries_1.tickerExternalAgentHistoryQuery)({
108
+ assetId,
109
+ }));
110
+ const groupedData = (0, lodash_1.groupBy)(nodes, 'identityId');
111
+ return (0, lodash_1.map)(groupedData, (history, did) => ({
112
+ identity: new internal_1.Identity({ did }, context),
113
+ history: history.map(({ createdBlock, eventIdx }) =>
114
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
115
+ (0, conversion_1.middlewareEventDetailsToEventIdentifier)(createdBlock, eventIdx)),
116
+ }));
117
+ });
118
+ }
119
+ /**
120
+ * Retrieve this Asset's transaction History
121
+ *
122
+ * @note uses the middlewareV2
123
+ */
124
+ getTransactionHistory(opts) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ const { context, ticker } = this;
127
+ const { size, start } = opts;
128
+ const { data: { assetTransactions: { nodes, totalCount }, }, } = yield context.queryMiddleware((0, queries_1.assetTransactionQuery)({
129
+ assetId: ticker,
130
+ }, size, start));
131
+ const data = nodes.map(({ assetId, amount, fromPortfolio, toPortfolio, createdBlock, eventId, eventIdx, extrinsicIdx, }) => (Object.assign({ asset: new FungibleAsset({ ticker: assetId }, context), amount: new bignumber_js_1.default(amount).shiftedBy(-6), event: eventId, from: (0, internal_2.optionize)(conversion_1.middlewarePortfolioToPortfolio)(fromPortfolio, context), to: (0, internal_2.optionize)(conversion_1.middlewarePortfolioToPortfolio)(toPortfolio, context),
132
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
133
+ extrinsicIndex: new bignumber_js_1.default(extrinsicIdx) }, (0, conversion_1.middlewareEventDetailsToEventIdentifier)(createdBlock, eventIdx))));
134
+ const count = new bignumber_js_1.default(totalCount);
135
+ const next = (0, internal_2.calculateNextKey)(count, data.length, start);
136
+ return {
137
+ data,
138
+ next,
139
+ count,
140
+ };
141
+ });
142
+ }
143
+ /**
144
+ * Determine whether this FungibleAsset exists on chain
145
+ */
146
+ exists() {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ const { ticker, context, context: { polymeshApi: { query }, }, } = this;
149
+ const rawTicker = (0, conversion_1.stringToTicker)(ticker, context);
150
+ const [tokenSize, nftId] = yield Promise.all([
151
+ query.asset.tokens.size(rawTicker),
152
+ query.nft.collectionTicker(rawTicker),
153
+ ]);
154
+ return !tokenSize.isZero() && nftId.isZero();
155
+ });
156
+ }
157
+ }
158
+ exports.FungibleAsset = FungibleAsset;
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/entities/Asset/Fungible/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,gEAAqC;AACrC,mCAAsC;AAEtC,kCAAsD;AACtD,mDAOoB;AACpB,4DAI8B;AAgB9B,6DAO4B;AAC5B,yDAAsF;AAGtF,iDAA8C;AAC9C,+CAA4C;AAC5C,yDAAsD;AACtD,yCAAsC;AACtC,2CAAwC;AACxC,+CAA4C;AAC5C,iEAA8D;AAE9D;;GAEG;AACH,MAAa,aAAc,SAAQ,gBAAS;IAS1C;;OAEG;IACH,YAAY,WAA8B,EAAE,OAAgB;QAC1D,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAE5B,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;QAE/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,IAAA,wBAAW,EAAC,MAAM,CAAC,CAAC;QAE/B,IAAI,CAAC,WAAW,GAAG,IAAI,yBAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,2BAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,QAAQ,GAAG,IAA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IAAI,CAAC;YACT,MAAM,SAAS,GAAG,IAAA,2BAAc,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAElD,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBAC3C,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;gBAClC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,SAAS,CAAC;aACtC,CAAC,CAAC;YAEH,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QAC/C,CAAC;KAAA;CAMF;AA7QD,sCA6QC"}
@@ -0,0 +1,31 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { BaseAsset } from "../Base";
3
+ import { AssetDetails, EventIdentifier, SubCallback, UnsubCallback } from "../../../../types";
4
+ /**
5
+ * Class used to manage Nft functionality
6
+ */
7
+ export declare class NftCollection extends BaseAsset {
8
+ /**
9
+ * Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
10
+ *
11
+ * @note uses the middlewareV2
12
+ * @note there is a possibility that the data is not ready by the time it is requested. In that case, `null` is returned
13
+ */
14
+ createdAt(): Promise<EventIdentifier | null>;
15
+ /**
16
+ * Retrieve the NftCollection's data
17
+ *
18
+ * @note can be subscribed to
19
+ */
20
+ details(): Promise<AssetDetails>;
21
+ details(callback: SubCallback<AssetDetails>): Promise<UnsubCallback>;
22
+ /**
23
+ * Retrieve the amount of unique investors that hold this Nft
24
+ */
25
+ investorCount(): Promise<BigNumber>;
26
+ /**
27
+ * Determine whether this NftCollection exists on chain
28
+ */
29
+ exists(): Promise<boolean>;
30
+ }
31
+ //# sourceMappingURL=NftCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NftCollection.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/Asset/NonFungible/NftCollection.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,gBAAkC;AAGtD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,0BAAgB;AAqBpF;;GAEG;AACH,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;OAKG;IACU,SAAS,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAkBzD;;;;OAIG;IACa,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC;IAChC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IA0CpF;;OAEG;IACU,aAAa,IAAI,OAAO,CAAC,SAAS,CAAC;IAkBhD;;OAEG;IACmB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;CASjD"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.NftCollection = void 0;
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const Base_1 = require("../Base");
18
+ const queries_1 = require("../../../../middleware/queries");
19
+ const conversion_1 = require("../../../../utils/conversion");
20
+ const internal_1 = require("../../../../utils/internal");
21
+ const sumNftIssuance = (numberOfNfts) => {
22
+ let numberIssued = new bignumber_js_1.default(0);
23
+ numberOfNfts.forEach(([, holderEntry]) => {
24
+ const holderAmount = (0, conversion_1.u64ToBigNumber)(holderEntry);
25
+ numberIssued = numberIssued.plus(holderAmount);
26
+ });
27
+ return numberIssued;
28
+ };
29
+ /**
30
+ * Class used to manage Nft functionality
31
+ */
32
+ class NftCollection extends Base_1.BaseAsset {
33
+ /**
34
+ * Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
35
+ *
36
+ * @note uses the middlewareV2
37
+ * @note there is a possibility that the data is not ready by the time it is requested. In that case, `null` is returned
38
+ */
39
+ createdAt() {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const { ticker, context } = this;
42
+ const { data: { assets: { nodes: [asset], }, }, } = yield context.queryMiddleware((0, queries_1.assetQuery)({
43
+ ticker,
44
+ }));
45
+ return (0, internal_1.optionize)(conversion_1.middlewareEventDetailsToEventIdentifier)(asset === null || asset === void 0 ? void 0 : asset.createdBlock, asset === null || asset === void 0 ? void 0 : asset.eventIdx);
46
+ });
47
+ }
48
+ // eslint-disable-next-line require-jsdoc
49
+ details(callback) {
50
+ const _super = Object.create(null, {
51
+ details: { get: () => super.details }
52
+ });
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const { context: { polymeshApi: { query }, }, ticker, context, } = this;
55
+ const rawTicker = (0, conversion_1.stringToTicker)(ticker, context);
56
+ const rawNumberNftsPromise = query.nft.numberOfNFTs.entries(rawTicker);
57
+ if (callback) {
58
+ const rawNumberNfts = yield rawNumberNftsPromise;
59
+ const numberIssued = sumNftIssuance(rawNumberNfts);
60
+ // currently `asset.tokens` does not track Nft `totalSupply', we wrap the callback to provide it
61
+ const wrappedCallback = (commonDetails) => __awaiter(this, void 0, void 0, function* () {
62
+ const nftDetails = Object.assign(Object.assign({}, commonDetails), { totalSupply: numberIssued });
63
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
64
+ callback(nftDetails);
65
+ });
66
+ return _super.details.call(this, wrappedCallback);
67
+ }
68
+ const [rawNumberNfts, commonDetails] = yield Promise.all([
69
+ rawNumberNftsPromise,
70
+ _super.details.call(this),
71
+ ]);
72
+ const numberIssued = sumNftIssuance(rawNumberNfts);
73
+ return Object.assign(Object.assign({}, commonDetails), { totalSupply: numberIssued });
74
+ });
75
+ }
76
+ /**
77
+ * Retrieve the amount of unique investors that hold this Nft
78
+ */
79
+ investorCount() {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const { context: { polymeshApi: { query }, }, context, ticker, } = this;
82
+ const rawTicker = (0, conversion_1.stringToTicker)(ticker, context);
83
+ const holderEntries = yield query.nft.numberOfNFTs.entries(rawTicker);
84
+ const assetBalances = holderEntries.filter(([, balance]) => !balance.isZero());
85
+ return new bignumber_js_1.default(assetBalances.length);
86
+ });
87
+ }
88
+ /**
89
+ * Determine whether this NftCollection exists on chain
90
+ */
91
+ exists() {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ const { ticker, context } = this;
94
+ const rawTokenId = yield context.polymeshApi.query.nft.collectionTicker((0, conversion_1.stringToTicker)(ticker, context));
95
+ return !rawTokenId.isZero();
96
+ });
97
+ }
98
+ }
99
+ exports.NftCollection = NftCollection;
100
+ //# sourceMappingURL=NftCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NftCollection.js","sourceRoot":"","sources":["../../../../../src/api/entities/Asset/NonFungible/NftCollection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,gEAAqC;AAErC,kCAAsD;AACtD,4DAAkD;AAIlD,6DAI4B;AAC5B,yDAA6C;AAE7C,MAAM,cAAc,GAAG,CACrB,YAA2F,EAChF,EAAE;IACb,IAAI,YAAY,GAAG,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC;IACpC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,EAAE;QACvC,MAAM,YAAY,GAAG,IAAA,2BAAc,EAAC,WAAW,CAAC,CAAC;QACjD,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,YAAY,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.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/Asset/NonFungible/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./NftCollection"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/entities/Asset/NonFungible/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -1,159 +1,5 @@
1
- import BigNumber from 'bignumber.js';
2
- import { Metadata } from "./Metadata";
3
- import { AuthorizationRequest, Context, Entity } from "../../../internal";
4
- import { ControllerTransferParams, EventIdentifier, HistoricAgentOperation, HistoricAssetTransaction, ModifyAssetParams, NoArgsProcedureMethod, ProcedureMethod, RedeemTokensParams, ResultSet, SecurityIdentifier, SetVenueFilteringParams, SubCallback, TransferAssetOwnershipParams, UnsubCallback } from "../../../types";
5
- import { AssetHolders } from './AssetHolders';
6
- import { Checkpoints } from './Checkpoints';
7
- import { Compliance } from './Compliance';
8
- import { CorporateActions } from './CorporateActions';
9
- import { Documents } from './Documents';
10
- import { Issuance } from './Issuance';
11
- import { Offerings } from './Offerings';
12
- import { Permissions } from './Permissions';
13
- import { Settlements } from './Settlements';
14
- import { TransferRestrictions } from './TransferRestrictions';
15
- import { AssetDetails } from './types';
16
- /**
17
- * Properties that uniquely identify an Asset
18
- */
19
- export interface UniqueIdentifiers {
20
- /**
21
- * ticker of the Asset
22
- */
23
- ticker: string;
24
- }
25
- /**
26
- * Class used to manage all Asset functionality
27
- */
28
- export declare class Asset extends Entity<UniqueIdentifiers, string> {
29
- /**
30
- * @hidden
31
- * Check if a value is of type {@link UniqueIdentifiers}
32
- */
33
- static isUniqueIdentifiers(identifier: unknown): identifier is UniqueIdentifiers;
34
- /**
35
- * Identity ID of the Asset (used for Claims)
36
- */
37
- did: string;
38
- /**
39
- * ticker of the Asset
40
- */
41
- ticker: string;
42
- documents: Documents;
43
- settlements: Settlements;
44
- assetHolders: AssetHolders;
45
- issuance: Issuance;
46
- compliance: Compliance;
47
- transferRestrictions: TransferRestrictions;
48
- offerings: Offerings;
49
- checkpoints: Checkpoints;
50
- corporateActions: CorporateActions;
51
- permissions: Permissions;
52
- metadata: Metadata;
53
- /**
54
- * @hidden
55
- */
56
- constructor(identifiers: UniqueIdentifiers, context: Context);
57
- /**
58
- * Transfer ownership of the Asset to another Identity. This generates an authorization request that must be accepted
59
- * by the recipient
60
- *
61
- * @note this will create {@link api/entities/AuthorizationRequest!AuthorizationRequest | Authorization Request} which has to be accepted by the `target` Identity.
62
- * An {@link api/entities/Account!Account} or {@link api/entities/Identity!Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}.
63
- * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne}
64
- */
65
- transferOwnership: ProcedureMethod<TransferAssetOwnershipParams, AuthorizationRequest>;
66
- /**
67
- * Modify some properties of the Asset
68
- *
69
- * @throws if the passed values result in no changes being made to the Asset
70
- */
71
- modify: ProcedureMethod<ModifyAssetParams, Asset>;
72
- /**
73
- * Retrieve the Asset's data
74
- *
75
- * @note can be subscribed to
76
- */
77
- details(): Promise<AssetDetails>;
78
- details(callback: SubCallback<AssetDetails>): Promise<UnsubCallback>;
79
- /**
80
- * Retrieve the Asset's funding round
81
- *
82
- * @note can be subscribed to
83
- */
84
- currentFundingRound(): Promise<string | null>;
85
- currentFundingRound(callback: SubCallback<string | null>): Promise<UnsubCallback>;
86
- /**
87
- * Retrieve the Asset's identifiers list
88
- *
89
- * @note can be subscribed to
90
- */
91
- getIdentifiers(): Promise<SecurityIdentifier[]>;
92
- getIdentifiers(callback?: SubCallback<SecurityIdentifier[]>): Promise<UnsubCallback>;
93
- /**
94
- * Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
95
- *
96
- * @note uses the middlewareV2
97
- * @note there is a possibility that the data is not ready by the time it is requested. In that case, `null` is returned
98
- */
99
- createdAt(): Promise<EventIdentifier | null>;
100
- /**
101
- * Freeze transfers of the Asset
102
- */
103
- freeze: NoArgsProcedureMethod<Asset>;
104
- /**
105
- * Unfreeze transfers of the Asset
106
- */
107
- unfreeze: NoArgsProcedureMethod<Asset>;
108
- /**
109
- * Check whether transfers are frozen for the Asset
110
- *
111
- * @note can be subscribed to
112
- */
113
- isFrozen(): Promise<boolean>;
114
- isFrozen(callback: SubCallback<boolean>): Promise<UnsubCallback>;
115
- /**
116
- * Redeem (burn) an amount of this Asset's tokens
117
- *
118
- * @note tokens are removed from the caller's Default Portfolio
119
- */
120
- redeem: ProcedureMethod<RedeemTokensParams, void>;
121
- /**
122
- * Retrieve the amount of unique investors that hold this Asset
123
- */
124
- investorCount(): Promise<BigNumber>;
125
- /**
126
- * Force a transfer from a given Portfolio to the caller’s default Portfolio
127
- */
128
- controllerTransfer: ProcedureMethod<ControllerTransferParams, void>;
129
- /**
130
- * Retrieve this Asset's Operation History
131
- *
132
- * @note Operations are grouped by the agent Identity who performed them
133
- *
134
- * @note uses the middlewareV2
135
- */
136
- getOperationHistory(): Promise<HistoricAgentOperation[]>;
137
- /**
138
- * Retrieve this Asset's transaction History
139
- *
140
- * @note uses the middlewareV2
141
- */
142
- getTransactionHistory(opts: {
143
- size?: BigNumber;
144
- start?: BigNumber;
145
- }): Promise<ResultSet<HistoricAssetTransaction>>;
146
- /**
147
- * Determine whether this Asset exists on chain
148
- */
149
- exists(): Promise<boolean>;
150
- /**
151
- * Return the Asset's ticker
152
- */
153
- toHuman(): string;
154
- /**
155
- * Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues
156
- */
157
- setVenueFiltering: ProcedureMethod<SetVenueFilteringParams, void>;
158
- }
1
+ export * from './Fungible';
2
+ export * from './NonFungible';
3
+ export * from './Base';
4
+ export * from './types';
159
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/entities/Asset/index.ts"],"names":[],"mappings":"AAOA,OAAO,SAAS,MAAM,cAAc,CAAC;AAGrC,OAAO,EAAE,QAAQ,EAAE,mBAAsC;AACzD,OAAO,EACL,oBAAoB,EACpB,OAAO,EAEP,MAAM,EAQP,0BAAmB;AAOpB,OAAO,EACL,wBAAwB,EAExB,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,4BAA4B,EAC5B,aAAa,EACd,uBAAgB;AAiBjB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EA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