@ar.io/sdk 4.0.0-solana.9 → 4.0.0

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 (533) hide show
  1. package/README.md +721 -673
  2. package/lib/esm/cli/cli.js +28 -152
  3. package/lib/esm/cli/commands/antCommands.js +5 -66
  4. package/lib/esm/cli/commands/arnsPurchaseCommands.js +7 -28
  5. package/lib/esm/cli/commands/escrowCommands.js +23 -4
  6. package/lib/esm/cli/commands/gatewayWriteCommands.js +15 -8
  7. package/lib/esm/cli/commands/pruneCommands.js +14 -26
  8. package/lib/esm/cli/commands/readCommands.js +12 -1
  9. package/lib/esm/cli/options.js +2 -75
  10. package/lib/esm/cli/utils.js +96 -209
  11. package/lib/esm/common/ant-registry.js +12 -160
  12. package/lib/esm/common/ant.js +40 -1208
  13. package/lib/esm/common/faucet.js +17 -6
  14. package/lib/esm/common/index.js +0 -4
  15. package/lib/esm/common/io.js +13 -1441
  16. package/lib/esm/constants.js +0 -18
  17. package/lib/esm/solana/ant-readable.js +391 -54
  18. package/lib/esm/solana/ant-registry-readable.js +15 -0
  19. package/lib/esm/solana/ant-registry-writeable.js +19 -4
  20. package/lib/esm/solana/ant-writeable.js +43 -11
  21. package/lib/esm/solana/ata.js +15 -0
  22. package/lib/esm/solana/canonical-message.js +45 -9
  23. package/lib/esm/solana/clusters.js +71 -22
  24. package/lib/esm/solana/constants.js +21 -5
  25. package/lib/esm/solana/delegation-math.js +49 -0
  26. package/lib/esm/solana/deserialize.js +263 -727
  27. package/lib/esm/solana/escrow.js +145 -103
  28. package/lib/esm/solana/events.js +20 -199
  29. package/lib/esm/solana/funding-plan.js +19 -2
  30. package/lib/esm/solana/index.js +53 -12
  31. package/lib/esm/solana/instruction.js +15 -0
  32. package/lib/esm/solana/io-readable.js +510 -58
  33. package/lib/esm/solana/io-writeable.js +1179 -183
  34. package/lib/esm/solana/json-rpc.js +20 -4
  35. package/lib/esm/solana/metadata.js +15 -0
  36. package/lib/esm/solana/mpl-core.js +55 -5
  37. package/lib/esm/solana/pda.js +15 -0
  38. package/lib/esm/solana/predict-prescribed-observers.js +110 -0
  39. package/lib/esm/solana/retry.js +117 -0
  40. package/lib/esm/solana/rpc-circuit-breaker.js +258 -0
  41. package/lib/esm/solana/send.js +258 -3
  42. package/lib/esm/solana/spawn-ant.js +16 -2
  43. package/lib/esm/types/ant.js +8 -8
  44. package/lib/esm/types/io.js +0 -10
  45. package/lib/esm/utils/ant.js +0 -64
  46. package/lib/esm/utils/index.js +0 -3
  47. package/lib/esm/version.js +1 -1
  48. package/lib/types/cli/commands/antCommands.d.ts +6 -9
  49. package/lib/types/cli/commands/arnsPurchaseCommands.d.ts +27 -13
  50. package/lib/types/cli/commands/escrowCommands.d.ts +6 -0
  51. package/lib/types/cli/commands/gatewayWriteCommands.d.ts +12 -11
  52. package/lib/types/cli/commands/pruneCommands.d.ts +11 -11
  53. package/lib/types/cli/commands/readCommands.d.ts +25 -22
  54. package/lib/types/cli/commands/transfer.d.ts +9 -9
  55. package/lib/types/cli/options.d.ts +0 -57
  56. package/lib/types/cli/types.d.ts +6 -14
  57. package/lib/types/cli/utils.d.ts +34 -32
  58. package/lib/types/common/ant-registry.d.ts +35 -74
  59. package/lib/types/common/ant.d.ts +52 -570
  60. package/lib/types/common/faucet.d.ts +20 -8
  61. package/lib/types/common/index.d.ts +0 -3
  62. package/lib/types/common/io.d.ts +56 -288
  63. package/lib/types/constants.d.ts +0 -17
  64. package/lib/types/solana/ant-readable.d.ts +65 -6
  65. package/lib/types/solana/ant-registry-readable.d.ts +17 -2
  66. package/lib/types/solana/ant-registry-writeable.d.ts +20 -5
  67. package/lib/types/solana/ant-writeable.d.ts +39 -24
  68. package/lib/types/solana/ata.d.ts +15 -0
  69. package/lib/types/solana/canonical-message.d.ts +44 -5
  70. package/lib/types/solana/clusters.d.ts +68 -21
  71. package/lib/types/solana/constants.d.ts +16 -0
  72. package/lib/types/solana/delegation-math.d.ts +25 -0
  73. package/lib/types/solana/deserialize.d.ts +28 -198
  74. package/lib/types/solana/escrow.d.ts +128 -51
  75. package/lib/types/solana/events.d.ts +26 -144
  76. package/lib/types/solana/funding-plan.d.ts +15 -0
  77. package/lib/types/solana/index.d.ts +27 -3
  78. package/lib/types/solana/instruction.d.ts +15 -0
  79. package/lib/types/solana/io-readable.d.ts +185 -46
  80. package/lib/types/solana/io-writeable.d.ts +450 -77
  81. package/lib/types/solana/json-rpc.d.ts +15 -0
  82. package/lib/types/solana/metadata.d.ts +15 -0
  83. package/lib/types/solana/mpl-core.d.ts +44 -0
  84. package/lib/types/solana/predict-prescribed-observers.d.ts +28 -0
  85. package/lib/types/solana/retry.d.ts +62 -0
  86. package/lib/types/solana/rpc-circuit-breaker.d.ts +78 -0
  87. package/lib/types/solana/send.d.ts +80 -2
  88. package/lib/types/solana/spawn-ant.d.ts +15 -0
  89. package/lib/types/solana/types.d.ts +15 -0
  90. package/lib/types/types/ant-registry.d.ts +4 -4
  91. package/lib/types/types/ant.d.ts +92 -92
  92. package/lib/types/types/common.d.ts +18 -74
  93. package/lib/types/types/faucet.d.ts +2 -2
  94. package/lib/types/types/io.d.ts +189 -158
  95. package/lib/types/types/token.d.ts +0 -12
  96. package/lib/types/utils/ant.d.ts +1 -12
  97. package/lib/types/utils/index.d.ts +0 -3
  98. package/lib/types/version.d.ts +1 -1
  99. package/package.json +23 -37
  100. package/lib/esm/common/ant-versions.js +0 -87
  101. package/lib/esm/common/arweave.js +0 -21
  102. package/lib/esm/common/contracts/ao-process.js +0 -218
  103. package/lib/esm/common/hyperbeam/hb.js +0 -169
  104. package/lib/esm/common/marketplace.js +0 -669
  105. package/lib/esm/common/turbo.js +0 -215
  106. package/lib/esm/node/index.js +0 -20
  107. package/lib/esm/solana/generated/ant/events/aclEntryAddedEvent.js +0 -21
  108. package/lib/esm/solana/generated/ant/events/aclEntryRemovedEvent.js +0 -21
  109. package/lib/esm/solana/generated/ant/events/antMetadataUpdatedEvent.js +0 -21
  110. package/lib/esm/solana/generated/ant/events/antReconciledEvent.js +0 -21
  111. package/lib/esm/solana/generated/ant/events/antTransferredEvent.js +0 -21
  112. package/lib/esm/solana/generated/ant/events/attributesClearedEvent.js +0 -21
  113. package/lib/esm/solana/generated/ant/events/attributesSyncedEvent.js +0 -21
  114. package/lib/esm/solana/generated/ant/events/controllerAddedEvent.js +0 -21
  115. package/lib/esm/solana/generated/ant/events/controllerRemovedEvent.js +0 -21
  116. package/lib/esm/solana/generated/ant/events/index.js +0 -16
  117. package/lib/esm/solana/generated/ant/events/recordMetadataPrunedEvent.js +0 -21
  118. package/lib/esm/solana/generated/ant/events/recordMetadataRemovedEvent.js +0 -21
  119. package/lib/esm/solana/generated/ant/events/recordMetadataUpdatedEvent.js +0 -21
  120. package/lib/esm/solana/generated/ant/events/recordRemovedEvent.js +0 -21
  121. package/lib/esm/solana/generated/ant/events/recordSetEvent.js +0 -21
  122. package/lib/esm/solana/generated/ant/events/recordTransferredEvent.js +0 -21
  123. package/lib/esm/solana/generated/ant-escrow/events/escrowCancelledEvent.js +0 -21
  124. package/lib/esm/solana/generated/ant-escrow/events/escrowClaimedEvent.js +0 -21
  125. package/lib/esm/solana/generated/ant-escrow/events/escrowDepositedEvent.js +0 -21
  126. package/lib/esm/solana/generated/ant-escrow/events/escrowRecipientUpdatedEvent.js +0 -21
  127. package/lib/esm/solana/generated/ant-escrow/events/index.js +0 -5
  128. package/lib/esm/solana/generated/arns/events/demandFactorUpdatedEvent.js +0 -21
  129. package/lib/esm/solana/generated/arns/events/index.js +0 -13
  130. package/lib/esm/solana/generated/arns/events/leaseExtendedEvent.js +0 -21
  131. package/lib/esm/solana/generated/arns/events/namePurchasedEvent.js +0 -21
  132. package/lib/esm/solana/generated/arns/events/nameReassignedEvent.js +0 -21
  133. package/lib/esm/solana/generated/arns/events/nameReleasedEvent.js +0 -21
  134. package/lib/esm/solana/generated/arns/events/nameReservedEvent.js +0 -21
  135. package/lib/esm/solana/generated/arns/events/nameUnreservedEvent.js +0 -21
  136. package/lib/esm/solana/generated/arns/events/nameUpgradedEvent.js +0 -21
  137. package/lib/esm/solana/generated/arns/events/namesPrunedEvent.js +0 -21
  138. package/lib/esm/solana/generated/arns/events/reservedNameClaimedEvent.js +0 -21
  139. package/lib/esm/solana/generated/arns/events/returnedNamePurchasedEvent.js +0 -21
  140. package/lib/esm/solana/generated/arns/events/undernameIncreasedEvent.js +0 -21
  141. package/lib/esm/solana/generated/core/events/configUpdatedEvent.js +0 -21
  142. package/lib/esm/solana/generated/core/events/coreMigrationFinalizedEvent.js +0 -21
  143. package/lib/esm/solana/generated/core/events/index.js +0 -14
  144. package/lib/esm/solana/generated/core/events/primaryNameRemovedEvent.js +0 -21
  145. package/lib/esm/solana/generated/core/events/primaryNameRequestExpiredEvent.js +0 -21
  146. package/lib/esm/solana/generated/core/events/primaryNameRequestedEvent.js +0 -21
  147. package/lib/esm/solana/generated/core/events/primaryNameSetEvent.js +0 -21
  148. package/lib/esm/solana/generated/core/events/supplyFinalizedEvent.js +0 -21
  149. package/lib/esm/solana/generated/core/events/transferEvent.js +0 -21
  150. package/lib/esm/solana/generated/core/events/vaultCreatedEvent.js +0 -21
  151. package/lib/esm/solana/generated/core/events/vaultExtendedEvent.js +0 -21
  152. package/lib/esm/solana/generated/core/events/vaultIncreasedEvent.js +0 -21
  153. package/lib/esm/solana/generated/core/events/vaultReleasedEvent.js +0 -21
  154. package/lib/esm/solana/generated/core/events/vaultRevokedEvent.js +0 -21
  155. package/lib/esm/solana/generated/gar/events/allowlistToggledEvent.js +0 -21
  156. package/lib/esm/solana/generated/gar/events/delegateAllowlistedEvent.js +0 -21
  157. package/lib/esm/solana/generated/gar/events/delegationClosedEvent.js +0 -21
  158. package/lib/esm/solana/generated/gar/events/delegationDecreasedEvent.js +0 -21
  159. package/lib/esm/solana/generated/gar/events/delegationEvent.js +0 -21
  160. package/lib/esm/solana/generated/gar/events/epochClosedEvent.js +0 -21
  161. package/lib/esm/solana/generated/gar/events/epochCreatedEvent.js +0 -21
  162. package/lib/esm/solana/generated/gar/events/epochDistributedEvent.js +0 -21
  163. package/lib/esm/solana/generated/gar/events/epochPrescribedEvent.js +0 -21
  164. package/lib/esm/solana/generated/gar/events/epochWeightsTalliedEvent.js +0 -21
  165. package/lib/esm/solana/generated/gar/events/epochsToggledEvent.js +0 -21
  166. package/lib/esm/solana/generated/gar/events/fundingPlanAppliedEvent.js +0 -21
  167. package/lib/esm/solana/generated/gar/events/garMigrationFinalizedEvent.js +0 -21
  168. package/lib/esm/solana/generated/gar/events/gatewayFinalizedEvent.js +0 -21
  169. package/lib/esm/solana/generated/gar/events/gatewayJoinedEvent.js +0 -21
  170. package/lib/esm/solana/generated/gar/events/gatewayLeavingEvent.js +0 -21
  171. package/lib/esm/solana/generated/gar/events/gatewayPrunedEvent.js +0 -21
  172. package/lib/esm/solana/generated/gar/events/gatewaySettingsUpdatedEvent.js +0 -21
  173. package/lib/esm/solana/generated/gar/events/index.js +0 -31
  174. package/lib/esm/solana/generated/gar/events/instantWithdrawalEvent.js +0 -21
  175. package/lib/esm/solana/generated/gar/events/observationSubmittedEvent.js +0 -21
  176. package/lib/esm/solana/generated/gar/events/observerAddressUpdatedEvent.js +0 -21
  177. package/lib/esm/solana/generated/gar/events/operatorStakeIncreasedEvent.js +0 -21
  178. package/lib/esm/solana/generated/gar/events/redelegationEvent.js +0 -21
  179. package/lib/esm/solana/generated/gar/events/residueVaultCreatedEvent.js +0 -21
  180. package/lib/esm/solana/generated/gar/events/rewardsCompoundedEvent.js +0 -21
  181. package/lib/esm/solana/generated/gar/events/stakePaymentEvent.js +0 -21
  182. package/lib/esm/solana/generated/gar/events/withdrawalCancelledEvent.js +0 -21
  183. package/lib/esm/solana/generated/gar/events/withdrawalClaimedEvent.js +0 -21
  184. package/lib/esm/solana/generated/gar/events/withdrawalCreatedEvent.js +0 -21
  185. package/lib/esm/solana/generated/gar/events/withdrawalPaymentEvent.js +0 -21
  186. package/lib/esm/solana/generated/mpl-core/accounts/assetV1.js +0 -42
  187. package/lib/esm/solana/generated/mpl-core/accounts/collectionV1.js +0 -42
  188. package/lib/esm/solana/generated/mpl-core/accounts/hashedAssetV1.js +0 -45
  189. package/lib/esm/solana/generated/mpl-core/accounts/index.js +0 -12
  190. package/lib/esm/solana/generated/mpl-core/accounts/pluginHeaderV1.js +0 -45
  191. package/lib/esm/solana/generated/mpl-core/accounts/pluginRegistryV1.js +0 -42
  192. package/lib/esm/solana/generated/mpl-core/errors/index.js +0 -8
  193. package/lib/esm/solana/generated/mpl-core/errors/mplCore.js +0 -136
  194. package/lib/esm/solana/generated/mpl-core/index.js +0 -8
  195. package/lib/esm/solana/generated/mpl-core/instructions/addCollectionExternalPluginAdapterV1.js +0 -53
  196. package/lib/esm/solana/generated/mpl-core/instructions/addCollectionPluginV1.js +0 -53
  197. package/lib/esm/solana/generated/mpl-core/instructions/addExternalPluginAdapterV1.js +0 -53
  198. package/lib/esm/solana/generated/mpl-core/instructions/addPluginV1.js +0 -53
  199. package/lib/esm/solana/generated/mpl-core/instructions/approveCollectionPluginAuthorityV1.js +0 -53
  200. package/lib/esm/solana/generated/mpl-core/instructions/approvePluginAuthorityV1.js +0 -53
  201. package/lib/esm/solana/generated/mpl-core/instructions/burnCollectionV1.js +0 -49
  202. package/lib/esm/solana/generated/mpl-core/instructions/burnV1.js +0 -49
  203. package/lib/esm/solana/generated/mpl-core/instructions/collect.js +0 -42
  204. package/lib/esm/solana/generated/mpl-core/instructions/compressV1.js +0 -50
  205. package/lib/esm/solana/generated/mpl-core/instructions/createCollectionV1.js +0 -53
  206. package/lib/esm/solana/generated/mpl-core/instructions/createCollectionV2.js +0 -53
  207. package/lib/esm/solana/generated/mpl-core/instructions/createV1.js +0 -53
  208. package/lib/esm/solana/generated/mpl-core/instructions/createV2.js +0 -53
  209. package/lib/esm/solana/generated/mpl-core/instructions/decompressV1.js +0 -53
  210. package/lib/esm/solana/generated/mpl-core/instructions/executeV1.js +0 -56
  211. package/lib/esm/solana/generated/mpl-core/instructions/index.js +0 -40
  212. package/lib/esm/solana/generated/mpl-core/instructions/removeCollectionExternalPluginAdapterV1.js +0 -53
  213. package/lib/esm/solana/generated/mpl-core/instructions/removeCollectionPluginV1.js +0 -53
  214. package/lib/esm/solana/generated/mpl-core/instructions/removeExternalPluginAdapterV1.js +0 -53
  215. package/lib/esm/solana/generated/mpl-core/instructions/removePluginV1.js +0 -53
  216. package/lib/esm/solana/generated/mpl-core/instructions/revokeCollectionPluginAuthorityV1.js +0 -53
  217. package/lib/esm/solana/generated/mpl-core/instructions/revokePluginAuthorityV1.js +0 -53
  218. package/lib/esm/solana/generated/mpl-core/instructions/transferV1.js +0 -49
  219. package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionExternalPluginAdapterV1.js +0 -53
  220. package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionInfoV1.js +0 -45
  221. package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionPluginV1.js +0 -53
  222. package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionV1.js +0 -52
  223. package/lib/esm/solana/generated/mpl-core/instructions/updateExternalPluginAdapterV1.js +0 -53
  224. package/lib/esm/solana/generated/mpl-core/instructions/updatePluginV1.js +0 -53
  225. package/lib/esm/solana/generated/mpl-core/instructions/updateV1.js +0 -53
  226. package/lib/esm/solana/generated/mpl-core/instructions/updateV2.js +0 -53
  227. package/lib/esm/solana/generated/mpl-core/instructions/writeCollectionExternalPluginAdapterDataV1.js +0 -53
  228. package/lib/esm/solana/generated/mpl-core/instructions/writeExternalPluginAdapterDataV1.js +0 -53
  229. package/lib/esm/solana/generated/mpl-core/program-address.js +0 -1
  230. package/lib/esm/solana/generated/mpl-core/types/addAssetsToGroupV1Args.js +0 -17
  231. package/lib/esm/solana/generated/mpl-core/types/addBlocker.js +0 -17
  232. package/lib/esm/solana/generated/mpl-core/types/addCollectionsToGroupV1Args.js +0 -17
  233. package/lib/esm/solana/generated/mpl-core/types/addGroupsToGroupV1Args.js +0 -17
  234. package/lib/esm/solana/generated/mpl-core/types/agentIdentity.js +0 -17
  235. package/lib/esm/solana/generated/mpl-core/types/agentIdentityInitInfo.js +0 -18
  236. package/lib/esm/solana/generated/mpl-core/types/agentIdentityUpdateInfo.js +0 -18
  237. package/lib/esm/solana/generated/mpl-core/types/appData.js +0 -18
  238. package/lib/esm/solana/generated/mpl-core/types/appDataInitInfo.js +0 -18
  239. package/lib/esm/solana/generated/mpl-core/types/appDataUpdateInfo.js +0 -18
  240. package/lib/esm/solana/generated/mpl-core/types/attribute.js +0 -17
  241. package/lib/esm/solana/generated/mpl-core/types/attributes.js +0 -18
  242. package/lib/esm/solana/generated/mpl-core/types/authority.js +0 -24
  243. package/lib/esm/solana/generated/mpl-core/types/autograph.js +0 -18
  244. package/lib/esm/solana/generated/mpl-core/types/autographSignature.js +0 -17
  245. package/lib/esm/solana/generated/mpl-core/types/bubblegumV2.js +0 -17
  246. package/lib/esm/solana/generated/mpl-core/types/burnDelegate.js +0 -17
  247. package/lib/esm/solana/generated/mpl-core/types/closeGroupV1Args.js +0 -17
  248. package/lib/esm/solana/generated/mpl-core/types/compressionProof.js +0 -18
  249. package/lib/esm/solana/generated/mpl-core/types/creator.js +0 -17
  250. package/lib/esm/solana/generated/mpl-core/types/dataSection.js +0 -18
  251. package/lib/esm/solana/generated/mpl-core/types/dataSectionInitInfo.js +0 -18
  252. package/lib/esm/solana/generated/mpl-core/types/dataSectionUpdateInfo.js +0 -17
  253. package/lib/esm/solana/generated/mpl-core/types/dataState.js +0 -23
  254. package/lib/esm/solana/generated/mpl-core/types/edition.js +0 -17
  255. package/lib/esm/solana/generated/mpl-core/types/externalCheckResult.js +0 -17
  256. package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapter.js +0 -25
  257. package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterInitInfo.js +0 -25
  258. package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterKey.js +0 -25
  259. package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterSchema.js +0 -24
  260. package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterType.js +0 -28
  261. package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterUpdateInfo.js +0 -25
  262. package/lib/esm/solana/generated/mpl-core/types/externalRegistryRecord.js +0 -18
  263. package/lib/esm/solana/generated/mpl-core/types/externalValidationResult.js +0 -24
  264. package/lib/esm/solana/generated/mpl-core/types/extraAccount.js +0 -25
  265. package/lib/esm/solana/generated/mpl-core/types/freezeDelegate.js +0 -17
  266. package/lib/esm/solana/generated/mpl-core/types/freezeExecute.js +0 -17
  267. package/lib/esm/solana/generated/mpl-core/types/groups.js +0 -17
  268. package/lib/esm/solana/generated/mpl-core/types/hashablePluginSchema.js +0 -18
  269. package/lib/esm/solana/generated/mpl-core/types/hashedAssetSchema.js +0 -17
  270. package/lib/esm/solana/generated/mpl-core/types/hookableLifecycleEvent.js +0 -26
  271. package/lib/esm/solana/generated/mpl-core/types/immutableMetadata.js +0 -17
  272. package/lib/esm/solana/generated/mpl-core/types/index.js +0 -89
  273. package/lib/esm/solana/generated/mpl-core/types/key.js +0 -28
  274. package/lib/esm/solana/generated/mpl-core/types/lifecycleHook.js +0 -18
  275. package/lib/esm/solana/generated/mpl-core/types/lifecycleHookInitInfo.js +0 -18
  276. package/lib/esm/solana/generated/mpl-core/types/lifecycleHookUpdateInfo.js +0 -18
  277. package/lib/esm/solana/generated/mpl-core/types/linkedAppData.js +0 -18
  278. package/lib/esm/solana/generated/mpl-core/types/linkedAppDataInitInfo.js +0 -18
  279. package/lib/esm/solana/generated/mpl-core/types/linkedAppDataUpdateInfo.js +0 -18
  280. package/lib/esm/solana/generated/mpl-core/types/linkedDataKey.js +0 -25
  281. package/lib/esm/solana/generated/mpl-core/types/linkedLifecycleHook.js +0 -18
  282. package/lib/esm/solana/generated/mpl-core/types/linkedLifecycleHookInitInfo.js +0 -18
  283. package/lib/esm/solana/generated/mpl-core/types/linkedLifecycleHookUpdateInfo.js +0 -18
  284. package/lib/esm/solana/generated/mpl-core/types/masterEdition.js +0 -17
  285. package/lib/esm/solana/generated/mpl-core/types/oracle.js +0 -18
  286. package/lib/esm/solana/generated/mpl-core/types/oracleInitInfo.js +0 -18
  287. package/lib/esm/solana/generated/mpl-core/types/oracleUpdateInfo.js +0 -18
  288. package/lib/esm/solana/generated/mpl-core/types/oracleValidation.js +0 -25
  289. package/lib/esm/solana/generated/mpl-core/types/permanentBurnDelegate.js +0 -17
  290. package/lib/esm/solana/generated/mpl-core/types/permanentFreezeDelegate.js +0 -17
  291. package/lib/esm/solana/generated/mpl-core/types/permanentFreezeExecute.js +0 -17
  292. package/lib/esm/solana/generated/mpl-core/types/permanentTransferDelegate.js +0 -17
  293. package/lib/esm/solana/generated/mpl-core/types/plugin.js +0 -25
  294. package/lib/esm/solana/generated/mpl-core/types/pluginAuthorityPair.js +0 -18
  295. package/lib/esm/solana/generated/mpl-core/types/pluginType.js +0 -40
  296. package/lib/esm/solana/generated/mpl-core/types/registryRecord.js +0 -18
  297. package/lib/esm/solana/generated/mpl-core/types/relationshipKind.js +0 -25
  298. package/lib/esm/solana/generated/mpl-core/types/removeAssetsFromGroupV1Args.js +0 -17
  299. package/lib/esm/solana/generated/mpl-core/types/removeCollectionsFromGroupV1Args.js +0 -17
  300. package/lib/esm/solana/generated/mpl-core/types/removeGroupsFromGroupV1Args.js +0 -17
  301. package/lib/esm/solana/generated/mpl-core/types/royalties.js +0 -18
  302. package/lib/esm/solana/generated/mpl-core/types/ruleSet.js +0 -24
  303. package/lib/esm/solana/generated/mpl-core/types/seed.js +0 -24
  304. package/lib/esm/solana/generated/mpl-core/types/transferDelegate.js +0 -17
  305. package/lib/esm/solana/generated/mpl-core/types/updateAuthority.js +0 -24
  306. package/lib/esm/solana/generated/mpl-core/types/updateDelegate.js +0 -17
  307. package/lib/esm/solana/generated/mpl-core/types/updateGroupV1Args.js +0 -17
  308. package/lib/esm/solana/generated/mpl-core/types/updateType.js +0 -24
  309. package/lib/esm/solana/generated/mpl-core/types/validationResult.js +0 -25
  310. package/lib/esm/solana/generated/mpl-core/types/validationResultsOffset.js +0 -24
  311. package/lib/esm/solana/generated/mpl-core/types/verifiedCreators.js +0 -18
  312. package/lib/esm/solana/generated/mpl-core/types/verifiedCreatorsSignature.js +0 -17
  313. package/lib/esm/utils/ao.js +0 -421
  314. package/lib/esm/utils/arweave.js +0 -271
  315. package/lib/esm/utils/processes.js +0 -167
  316. package/lib/esm/web/index.js +0 -20
  317. package/lib/types/common/ant-versions.d.ts +0 -39
  318. package/lib/types/common/arweave.d.ts +0 -17
  319. package/lib/types/common/contracts/ao-process.d.ts +0 -33
  320. package/lib/types/common/hyperbeam/hb.d.ts +0 -88
  321. package/lib/types/common/marketplace.d.ts +0 -556
  322. package/lib/types/common/turbo.d.ts +0 -61
  323. package/lib/types/node/index.d.ts +0 -20
  324. package/lib/types/solana/generated/ant/events/aclEntryAddedEvent.d.ts +0 -26
  325. package/lib/types/solana/generated/ant/events/aclEntryRemovedEvent.d.ts +0 -26
  326. package/lib/types/solana/generated/ant/events/antMetadataUpdatedEvent.d.ts +0 -28
  327. package/lib/types/solana/generated/ant/events/antReconciledEvent.d.ts +0 -28
  328. package/lib/types/solana/generated/ant/events/antTransferredEvent.d.ts +0 -26
  329. package/lib/types/solana/generated/ant/events/attributesClearedEvent.d.ts +0 -26
  330. package/lib/types/solana/generated/ant/events/attributesSyncedEvent.d.ts +0 -24
  331. package/lib/types/solana/generated/ant/events/controllerAddedEvent.d.ts +0 -26
  332. package/lib/types/solana/generated/ant/events/controllerRemovedEvent.d.ts +0 -26
  333. package/lib/types/solana/generated/ant/events/index.d.ts +0 -15
  334. package/lib/types/solana/generated/ant/events/recordMetadataPrunedEvent.d.ts +0 -26
  335. package/lib/types/solana/generated/ant/events/recordMetadataRemovedEvent.d.ts +0 -26
  336. package/lib/types/solana/generated/ant/events/recordMetadataUpdatedEvent.d.ts +0 -28
  337. package/lib/types/solana/generated/ant/events/recordRemovedEvent.d.ts +0 -26
  338. package/lib/types/solana/generated/ant/events/recordSetEvent.d.ts +0 -34
  339. package/lib/types/solana/generated/ant/events/recordTransferredEvent.d.ts +0 -30
  340. package/lib/types/solana/generated/ant-escrow/events/escrowCancelledEvent.d.ts +0 -28
  341. package/lib/types/solana/generated/ant-escrow/events/escrowClaimedEvent.d.ts +0 -32
  342. package/lib/types/solana/generated/ant-escrow/events/escrowDepositedEvent.d.ts +0 -36
  343. package/lib/types/solana/generated/ant-escrow/events/escrowRecipientUpdatedEvent.d.ts +0 -26
  344. package/lib/types/solana/generated/ant-escrow/events/index.d.ts +0 -4
  345. package/lib/types/solana/generated/arns/events/demandFactorUpdatedEvent.d.ts +0 -28
  346. package/lib/types/solana/generated/arns/events/index.d.ts +0 -12
  347. package/lib/types/solana/generated/arns/events/leaseExtendedEvent.d.ts +0 -32
  348. package/lib/types/solana/generated/arns/events/namePurchasedEvent.d.ts +0 -34
  349. package/lib/types/solana/generated/arns/events/nameReassignedEvent.d.ts +0 -28
  350. package/lib/types/solana/generated/arns/events/nameReleasedEvent.d.ts +0 -24
  351. package/lib/types/solana/generated/arns/events/nameReservedEvent.d.ts +0 -28
  352. package/lib/types/solana/generated/arns/events/nameUnreservedEvent.d.ts +0 -24
  353. package/lib/types/solana/generated/arns/events/nameUpgradedEvent.d.ts +0 -28
  354. package/lib/types/solana/generated/arns/events/namesPrunedEvent.d.ts +0 -26
  355. package/lib/types/solana/generated/arns/events/reservedNameClaimedEvent.d.ts +0 -24
  356. package/lib/types/solana/generated/arns/events/returnedNamePurchasedEvent.d.ts +0 -32
  357. package/lib/types/solana/generated/arns/events/undernameIncreasedEvent.d.ts +0 -32
  358. package/lib/types/solana/generated/core/events/configUpdatedEvent.d.ts +0 -26
  359. package/lib/types/solana/generated/core/events/coreMigrationFinalizedEvent.d.ts +0 -26
  360. package/lib/types/solana/generated/core/events/index.d.ts +0 -13
  361. package/lib/types/solana/generated/core/events/primaryNameRemovedEvent.d.ts +0 -26
  362. package/lib/types/solana/generated/core/events/primaryNameRequestExpiredEvent.d.ts +0 -26
  363. package/lib/types/solana/generated/core/events/primaryNameRequestedEvent.d.ts +0 -30
  364. package/lib/types/solana/generated/core/events/primaryNameSetEvent.d.ts +0 -24
  365. package/lib/types/solana/generated/core/events/supplyFinalizedEvent.d.ts +0 -26
  366. package/lib/types/solana/generated/core/events/transferEvent.d.ts +0 -26
  367. package/lib/types/solana/generated/core/events/vaultCreatedEvent.d.ts +0 -28
  368. package/lib/types/solana/generated/core/events/vaultExtendedEvent.d.ts +0 -26
  369. package/lib/types/solana/generated/core/events/vaultIncreasedEvent.d.ts +0 -28
  370. package/lib/types/solana/generated/core/events/vaultReleasedEvent.d.ts +0 -26
  371. package/lib/types/solana/generated/core/events/vaultRevokedEvent.d.ts +0 -28
  372. package/lib/types/solana/generated/gar/events/allowlistToggledEvent.d.ts +0 -24
  373. package/lib/types/solana/generated/gar/events/delegateAllowlistedEvent.d.ts +0 -26
  374. package/lib/types/solana/generated/gar/events/delegationClosedEvent.d.ts +0 -24
  375. package/lib/types/solana/generated/gar/events/delegationDecreasedEvent.d.ts +0 -28
  376. package/lib/types/solana/generated/gar/events/delegationEvent.d.ts +0 -28
  377. package/lib/types/solana/generated/gar/events/epochClosedEvent.d.ts +0 -24
  378. package/lib/types/solana/generated/gar/events/epochCreatedEvent.d.ts +0 -26
  379. package/lib/types/solana/generated/gar/events/epochDistributedEvent.d.ts +0 -26
  380. package/lib/types/solana/generated/gar/events/epochPrescribedEvent.d.ts +0 -28
  381. package/lib/types/solana/generated/gar/events/epochWeightsTalliedEvent.d.ts +0 -26
  382. package/lib/types/solana/generated/gar/events/epochsToggledEvent.d.ts +0 -24
  383. package/lib/types/solana/generated/gar/events/fundingPlanAppliedEvent.d.ts +0 -28
  384. package/lib/types/solana/generated/gar/events/garMigrationFinalizedEvent.d.ts +0 -26
  385. package/lib/types/solana/generated/gar/events/gatewayFinalizedEvent.d.ts +0 -24
  386. package/lib/types/solana/generated/gar/events/gatewayJoinedEvent.d.ts +0 -26
  387. package/lib/types/solana/generated/gar/events/gatewayLeavingEvent.d.ts +0 -22
  388. package/lib/types/solana/generated/gar/events/gatewayPrunedEvent.d.ts +0 -26
  389. package/lib/types/solana/generated/gar/events/gatewaySettingsUpdatedEvent.d.ts +0 -24
  390. package/lib/types/solana/generated/gar/events/index.d.ts +0 -30
  391. package/lib/types/solana/generated/gar/events/instantWithdrawalEvent.d.ts +0 -30
  392. package/lib/types/solana/generated/gar/events/observationSubmittedEvent.d.ts +0 -28
  393. package/lib/types/solana/generated/gar/events/observerAddressUpdatedEvent.d.ts +0 -24
  394. package/lib/types/solana/generated/gar/events/operatorStakeIncreasedEvent.d.ts +0 -26
  395. package/lib/types/solana/generated/gar/events/redelegationEvent.d.ts +0 -30
  396. package/lib/types/solana/generated/gar/events/residueVaultCreatedEvent.d.ts +0 -30
  397. package/lib/types/solana/generated/gar/events/rewardsCompoundedEvent.d.ts +0 -26
  398. package/lib/types/solana/generated/gar/events/stakePaymentEvent.d.ts +0 -28
  399. package/lib/types/solana/generated/gar/events/withdrawalCancelledEvent.d.ts +0 -30
  400. package/lib/types/solana/generated/gar/events/withdrawalClaimedEvent.d.ts +0 -26
  401. package/lib/types/solana/generated/gar/events/withdrawalCreatedEvent.d.ts +0 -28
  402. package/lib/types/solana/generated/gar/events/withdrawalPaymentEvent.d.ts +0 -28
  403. package/lib/types/solana/generated/mpl-core/accounts/assetV1.d.ts +0 -37
  404. package/lib/types/solana/generated/mpl-core/accounts/collectionV1.d.ts +0 -37
  405. package/lib/types/solana/generated/mpl-core/accounts/hashedAssetV1.d.ts +0 -30
  406. package/lib/types/solana/generated/mpl-core/accounts/index.d.ts +0 -12
  407. package/lib/types/solana/generated/mpl-core/accounts/pluginHeaderV1.d.ts +0 -30
  408. package/lib/types/solana/generated/mpl-core/accounts/pluginRegistryV1.d.ts +0 -31
  409. package/lib/types/solana/generated/mpl-core/errors/index.d.ts +0 -8
  410. package/lib/types/solana/generated/mpl-core/errors/mplCore.d.ts +0 -133
  411. package/lib/types/solana/generated/mpl-core/index.d.ts +0 -8
  412. package/lib/types/solana/generated/mpl-core/instructions/addCollectionExternalPluginAdapterV1.d.ts +0 -56
  413. package/lib/types/solana/generated/mpl-core/instructions/addCollectionPluginV1.d.ts +0 -59
  414. package/lib/types/solana/generated/mpl-core/instructions/addExternalPluginAdapterV1.d.ts +0 -60
  415. package/lib/types/solana/generated/mpl-core/instructions/addPluginV1.d.ts +0 -63
  416. package/lib/types/solana/generated/mpl-core/instructions/approveCollectionPluginAuthorityV1.d.ts +0 -59
  417. package/lib/types/solana/generated/mpl-core/instructions/approvePluginAuthorityV1.d.ts +0 -63
  418. package/lib/types/solana/generated/mpl-core/instructions/burnCollectionV1.d.ts +0 -52
  419. package/lib/types/solana/generated/mpl-core/instructions/burnV1.d.ts +0 -60
  420. package/lib/types/solana/generated/mpl-core/instructions/collect.d.ts +0 -39
  421. package/lib/types/solana/generated/mpl-core/instructions/compressV1.d.ts +0 -55
  422. package/lib/types/solana/generated/mpl-core/instructions/createCollectionV1.d.ts +0 -58
  423. package/lib/types/solana/generated/mpl-core/instructions/createCollectionV2.d.ts +0 -61
  424. package/lib/types/solana/generated/mpl-core/instructions/createV1.d.ts +0 -77
  425. package/lib/types/solana/generated/mpl-core/instructions/createV2.d.ts +0 -80
  426. package/lib/types/solana/generated/mpl-core/instructions/decompressV1.d.ts +0 -60
  427. package/lib/types/solana/generated/mpl-core/instructions/executeV1.d.ts +0 -63
  428. package/lib/types/solana/generated/mpl-core/instructions/index.d.ts +0 -40
  429. package/lib/types/solana/generated/mpl-core/instructions/removeCollectionExternalPluginAdapterV1.d.ts +0 -56
  430. package/lib/types/solana/generated/mpl-core/instructions/removeCollectionPluginV1.d.ts +0 -56
  431. package/lib/types/solana/generated/mpl-core/instructions/removeExternalPluginAdapterV1.d.ts +0 -60
  432. package/lib/types/solana/generated/mpl-core/instructions/removePluginV1.d.ts +0 -60
  433. package/lib/types/solana/generated/mpl-core/instructions/revokeCollectionPluginAuthorityV1.d.ts +0 -56
  434. package/lib/types/solana/generated/mpl-core/instructions/revokePluginAuthorityV1.d.ts +0 -60
  435. package/lib/types/solana/generated/mpl-core/instructions/transferV1.d.ts +0 -64
  436. package/lib/types/solana/generated/mpl-core/instructions/updateCollectionExternalPluginAdapterV1.d.ts +0 -59
  437. package/lib/types/solana/generated/mpl-core/instructions/updateCollectionInfoV1.d.ts +0 -47
  438. package/lib/types/solana/generated/mpl-core/instructions/updateCollectionPluginV1.d.ts +0 -56
  439. package/lib/types/solana/generated/mpl-core/instructions/updateCollectionV1.d.ts +0 -62
  440. package/lib/types/solana/generated/mpl-core/instructions/updateExternalPluginAdapterV1.d.ts +0 -63
  441. package/lib/types/solana/generated/mpl-core/instructions/updatePluginV1.d.ts +0 -60
  442. package/lib/types/solana/generated/mpl-core/instructions/updateV1.d.ts +0 -66
  443. package/lib/types/solana/generated/mpl-core/instructions/updateV2.d.ts +0 -70
  444. package/lib/types/solana/generated/mpl-core/instructions/writeCollectionExternalPluginAdapterDataV1.d.ts +0 -63
  445. package/lib/types/solana/generated/mpl-core/instructions/writeExternalPluginAdapterDataV1.d.ts +0 -67
  446. package/lib/types/solana/generated/mpl-core/program-address.d.ts +0 -7
  447. package/lib/types/solana/generated/mpl-core/types/addAssetsToGroupV1Args.d.ts +0 -13
  448. package/lib/types/solana/generated/mpl-core/types/addBlocker.d.ts +0 -13
  449. package/lib/types/solana/generated/mpl-core/types/addCollectionsToGroupV1Args.d.ts +0 -13
  450. package/lib/types/solana/generated/mpl-core/types/addGroupsToGroupV1Args.d.ts +0 -15
  451. package/lib/types/solana/generated/mpl-core/types/agentIdentity.d.ts +0 -15
  452. package/lib/types/solana/generated/mpl-core/types/agentIdentityInitInfo.d.ts +0 -22
  453. package/lib/types/solana/generated/mpl-core/types/agentIdentityUpdateInfo.d.ts +0 -20
  454. package/lib/types/solana/generated/mpl-core/types/appData.d.ts +0 -20
  455. package/lib/types/solana/generated/mpl-core/types/appDataInitInfo.d.ts +0 -22
  456. package/lib/types/solana/generated/mpl-core/types/appDataUpdateInfo.d.ts +0 -18
  457. package/lib/types/solana/generated/mpl-core/types/attribute.d.ts +0 -16
  458. package/lib/types/solana/generated/mpl-core/types/attributes.d.ts +0 -18
  459. package/lib/types/solana/generated/mpl-core/types/authority.d.ts +0 -29
  460. package/lib/types/solana/generated/mpl-core/types/autograph.d.ts +0 -18
  461. package/lib/types/solana/generated/mpl-core/types/autographSignature.d.ts +0 -16
  462. package/lib/types/solana/generated/mpl-core/types/bubblegumV2.d.ts +0 -13
  463. package/lib/types/solana/generated/mpl-core/types/burnDelegate.d.ts +0 -13
  464. package/lib/types/solana/generated/mpl-core/types/closeGroupV1Args.d.ts +0 -13
  465. package/lib/types/solana/generated/mpl-core/types/compressionProof.d.ts +0 -28
  466. package/lib/types/solana/generated/mpl-core/types/creator.d.ts +0 -16
  467. package/lib/types/solana/generated/mpl-core/types/dataSection.d.ts +0 -20
  468. package/lib/types/solana/generated/mpl-core/types/dataSectionInitInfo.d.ts +0 -20
  469. package/lib/types/solana/generated/mpl-core/types/dataSectionUpdateInfo.d.ts +0 -13
  470. package/lib/types/solana/generated/mpl-core/types/dataState.d.ts +0 -16
  471. package/lib/types/solana/generated/mpl-core/types/edition.d.ts +0 -15
  472. package/lib/types/solana/generated/mpl-core/types/externalCheckResult.d.ts +0 -15
  473. package/lib/types/solana/generated/mpl-core/types/externalPluginAdapter.d.ts +0 -66
  474. package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterInitInfo.d.ts +0 -66
  475. package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterKey.d.ts +0 -64
  476. package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterSchema.d.ts +0 -17
  477. package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterType.d.ts +0 -21
  478. package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterUpdateInfo.d.ts +0 -59
  479. package/lib/types/solana/generated/mpl-core/types/externalRegistryRecord.d.ts +0 -28
  480. package/lib/types/solana/generated/mpl-core/types/externalValidationResult.d.ts +0 -17
  481. package/lib/types/solana/generated/mpl-core/types/extraAccount.d.ts +0 -86
  482. package/lib/types/solana/generated/mpl-core/types/freezeDelegate.d.ts +0 -15
  483. package/lib/types/solana/generated/mpl-core/types/freezeExecute.d.ts +0 -15
  484. package/lib/types/solana/generated/mpl-core/types/groups.d.ts +0 -15
  485. package/lib/types/solana/generated/mpl-core/types/hashablePluginSchema.d.ts +0 -22
  486. package/lib/types/solana/generated/mpl-core/types/hashedAssetSchema.d.ts +0 -16
  487. package/lib/types/solana/generated/mpl-core/types/hookableLifecycleEvent.d.ts +0 -19
  488. package/lib/types/solana/generated/mpl-core/types/immutableMetadata.d.ts +0 -13
  489. package/lib/types/solana/generated/mpl-core/types/index.d.ts +0 -89
  490. package/lib/types/solana/generated/mpl-core/types/key.d.ts +0 -21
  491. package/lib/types/solana/generated/mpl-core/types/lifecycleHook.d.ts +0 -24
  492. package/lib/types/solana/generated/mpl-core/types/lifecycleHookInitInfo.d.ts +0 -28
  493. package/lib/types/solana/generated/mpl-core/types/lifecycleHookUpdateInfo.d.ts +0 -22
  494. package/lib/types/solana/generated/mpl-core/types/linkedAppData.d.ts +0 -20
  495. package/lib/types/solana/generated/mpl-core/types/linkedAppDataInitInfo.d.ts +0 -22
  496. package/lib/types/solana/generated/mpl-core/types/linkedAppDataUpdateInfo.d.ts +0 -18
  497. package/lib/types/solana/generated/mpl-core/types/linkedDataKey.d.ts +0 -31
  498. package/lib/types/solana/generated/mpl-core/types/linkedLifecycleHook.d.ts +0 -24
  499. package/lib/types/solana/generated/mpl-core/types/linkedLifecycleHookInitInfo.d.ts +0 -28
  500. package/lib/types/solana/generated/mpl-core/types/linkedLifecycleHookUpdateInfo.d.ts +0 -22
  501. package/lib/types/solana/generated/mpl-core/types/masterEdition.d.ts +0 -21
  502. package/lib/types/solana/generated/mpl-core/types/oracle.d.ts +0 -22
  503. package/lib/types/solana/generated/mpl-core/types/oracleInitInfo.d.ts +0 -26
  504. package/lib/types/solana/generated/mpl-core/types/oracleUpdateInfo.d.ts +0 -22
  505. package/lib/types/solana/generated/mpl-core/types/oracleValidation.d.ts +0 -35
  506. package/lib/types/solana/generated/mpl-core/types/permanentBurnDelegate.d.ts +0 -13
  507. package/lib/types/solana/generated/mpl-core/types/permanentFreezeDelegate.d.ts +0 -15
  508. package/lib/types/solana/generated/mpl-core/types/permanentFreezeExecute.d.ts +0 -15
  509. package/lib/types/solana/generated/mpl-core/types/permanentTransferDelegate.d.ts +0 -13
  510. package/lib/types/solana/generated/mpl-core/types/plugin.d.ts +0 -150
  511. package/lib/types/solana/generated/mpl-core/types/pluginAuthorityPair.d.ts +0 -20
  512. package/lib/types/solana/generated/mpl-core/types/pluginType.d.ts +0 -33
  513. package/lib/types/solana/generated/mpl-core/types/registryRecord.d.ts +0 -22
  514. package/lib/types/solana/generated/mpl-core/types/relationshipKind.d.ts +0 -18
  515. package/lib/types/solana/generated/mpl-core/types/removeAssetsFromGroupV1Args.d.ts +0 -15
  516. package/lib/types/solana/generated/mpl-core/types/removeCollectionsFromGroupV1Args.d.ts +0 -15
  517. package/lib/types/solana/generated/mpl-core/types/removeGroupsFromGroupV1Args.d.ts +0 -15
  518. package/lib/types/solana/generated/mpl-core/types/royalties.d.ts +0 -22
  519. package/lib/types/solana/generated/mpl-core/types/ruleSet.d.ts +0 -27
  520. package/lib/types/solana/generated/mpl-core/types/seed.d.ts +0 -36
  521. package/lib/types/solana/generated/mpl-core/types/transferDelegate.d.ts +0 -13
  522. package/lib/types/solana/generated/mpl-core/types/updateAuthority.d.ts +0 -27
  523. package/lib/types/solana/generated/mpl-core/types/updateDelegate.d.ts +0 -15
  524. package/lib/types/solana/generated/mpl-core/types/updateGroupV1Args.d.ts +0 -19
  525. package/lib/types/solana/generated/mpl-core/types/updateType.d.ts +0 -17
  526. package/lib/types/solana/generated/mpl-core/types/validationResult.d.ts +0 -18
  527. package/lib/types/solana/generated/mpl-core/types/validationResultsOffset.d.ts +0 -33
  528. package/lib/types/solana/generated/mpl-core/types/verifiedCreators.d.ts +0 -18
  529. package/lib/types/solana/generated/mpl-core/types/verifiedCreatorsSignature.d.ts +0 -16
  530. package/lib/types/utils/ao.d.ts +0 -80
  531. package/lib/types/utils/arweave.d.ts +0 -79
  532. package/lib/types/utils/processes.d.ts +0 -39
  533. package/lib/types/web/index.d.ts +0 -20
@@ -1,1221 +1,53 @@
1
- /**
2
- * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { z } from 'zod';
17
- import { ARIO_MAINNET_PROCESS_ID } from '../constants.js';
18
- import { ANT_REGISTRY_ID } from '../constants.js';
19
- import { AntBalancesSchema, AntControllersSchema, AntInfoSchema, AntRecordSchema, AntRecordsSchema, AntStateSchema, } from '../types/ant.js';
20
- import { isProcessConfiguration, isProcessIdConfiguration, } from '../types/index.js';
21
- import { convertHyperBeamStateToAoANTState, isHyperBeamANTState, sortANTRecords, } from '../utils/ant.js';
22
- import { createAoSigner, forkANT, spawnANT } from '../utils/ao.js';
23
- import { parseSchemaResult } from '../utils/schema.js';
24
- import { ANTVersions } from './ant-versions.js';
25
- import { AOProcess, ARIO, InvalidContractConfigurationError, Logger, } from './index.js';
26
1
  export class ANT {
27
- /**
28
- * Versions of ANTs according to the ANT registry.
29
- *
30
- * Needs to be wrapped in a getter to avoid circular dependency issues.
31
- */
32
- static get versions() {
33
- return ANTVersions.init();
34
- }
35
- static async spawn(params) {
36
- if (params && params.backend === 'solana') {
37
- const { spawnSolanaANT } = await import('../solana/spawn-ant.js');
38
- const { backend: _backend, ...rest } = params;
39
- return spawnSolanaANT(rest);
40
- }
41
- return spawnANT(params);
42
- }
43
- /**
44
- * Fork an ANT to a new process.
45
- *
46
- * @param config
47
- */
48
- static fork = forkANT;
49
- /**
50
- * Upgrade an ANT by forking it to the latest version and reassigning names.
51
- *
52
- *
53
- * @param config Configuration object for the upgrade process
54
- * @returns Promise resolving to the forked process ID and successfully reassigned names
55
- */
56
- static async upgrade({ signer, antProcessId, reassignAffiliatedNames = true, names, arioProcessId = ARIO_MAINNET_PROCESS_ID, antRegistryId = ANT_REGISTRY_ID, ao, logger = Logger.default, skipVersionCheck = false, onSigningProgress, hyperbeamUrl, }) {
57
- // run time check if names is not empty but reassignAffiliatedNames it true, throw
58
- if (names !== undefined &&
59
- names.length > 0 &&
60
- reassignAffiliatedNames !== undefined &&
61
- reassignAffiliatedNames !== false) {
62
- throw new Error('Cannot reassign all affiliated names and provide specific names');
63
- }
64
- let namesToReassign = names !== undefined && names.length > 0 ? new Set(names) : new Set();
65
- // use reassignAffiliatedNames if names is empty
66
- const shouldReassignAll = names === undefined || names.length === 0
67
- ? (reassignAffiliatedNames ?? true)
68
- : false;
69
- const ario = ARIO.init({
70
- process: new AOProcess({ processId: arioProcessId, ao }),
71
- hyperbeamUrl,
72
- });
73
- const getAllAffiliatedNames = async () => {
74
- let cursor = undefined;
75
- let hasMore = true;
76
- const affiliatedNames = new Set();
77
- while (hasMore) {
78
- const page = await ario.getArNSRecords({
79
- filters: { processId: antProcessId },
80
- cursor,
81
- limit: 100,
82
- });
83
- page.items.forEach((r) => {
84
- affiliatedNames.add(r.name);
85
- });
86
- cursor = page.nextCursor;
87
- hasMore = page.hasMore;
88
- }
89
- return affiliatedNames;
90
- };
91
- // get all the affiliated names if reassign all affiliated names is true
92
- if (shouldReassignAll) {
93
- onSigningProgress?.('fetching-affiliated-names', {
94
- arioProcessId,
95
- antProcessId,
96
- });
97
- namesToReassign = await getAllAffiliatedNames();
98
- }
99
- else {
100
- if (names === undefined || names.length === 0) {
101
- throw new Error('Names are required when reassignAffiliatedNames is false.');
102
- }
103
- onSigningProgress?.('validating-names', {
104
- arioProcessId,
105
- antProcessId,
106
- names,
107
- });
108
- // confirm all names are affiliated with the ANT
109
- const allAffiliatedNames = await getAllAffiliatedNames();
110
- if (!names.every((name) => allAffiliatedNames.has(name))) {
111
- // find any that are not affiliated with the ANT
112
- const notAffiliatedNames = names.filter((name) => !allAffiliatedNames.has(name));
113
- throw new Error(`All names must be affiliated with the ANT on the provided ARIO process. The following names are not affiliated to this ANT: ${notAffiliatedNames.join(', ')}`);
114
- }
115
- }
116
- // if names is empty and reassign all affiliated names is false, throw an error
117
- if (namesToReassign.size === 0) {
118
- throw new Error('There are no names to reassign for this ANT.');
119
- }
120
- const existingAntProcess = ANT.init({
121
- process: new AOProcess({
122
- processId: antProcessId,
123
- ao,
124
- logger,
125
- }),
126
- hyperbeamUrl,
127
- signer,
128
- });
129
- if (!skipVersionCheck) {
130
- onSigningProgress?.('checking-version', {
131
- antProcessId,
132
- antRegistryId,
133
- });
134
- const isLatestVersion = await existingAntProcess.isLatestVersion({
135
- antRegistryId,
136
- });
137
- if (isLatestVersion) {
138
- return {
139
- forkedProcessId: antProcessId,
140
- reassignedNames: {},
141
- failedReassignedNames: {},
142
- };
143
- }
144
- }
145
- const forkedProcessId = await ANT.fork({
146
- signer,
147
- antProcessId,
148
- ao,
149
- logger,
150
- antRegistryId,
151
- onSigningProgress,
152
- hyperbeamUrl,
153
- });
154
- // we could parallelize this, but then signing progress would be harder to track
155
- const reassignedNames = {};
156
- const failedReassignedNames = {};
157
- for (const name of namesToReassign) {
158
- let reassignmentResult;
159
- try {
160
- onSigningProgress?.('reassigning-name', {
161
- name,
162
- arioProcessId,
163
- antProcessId: forkedProcessId,
164
- });
165
- reassignmentResult = await existingAntProcess.reassignName({
166
- name,
167
- arioProcessId,
168
- antProcessId: forkedProcessId,
169
- });
170
- onSigningProgress?.('successfully-reassigned-name', {
171
- name,
172
- arioProcessId,
173
- antProcessId: forkedProcessId,
174
- });
175
- reassignedNames[name] = reassignmentResult;
176
- }
177
- catch (error) {
178
- logger.error(`Failed to reassign name ${name}:`, { error });
179
- onSigningProgress?.('failed-to-reassign-name', {
180
- name,
181
- arioProcessId,
182
- antProcessId: forkedProcessId,
183
- error,
184
- });
185
- // Continue with other names rather than failing completely
186
- failedReassignedNames[name] = {
187
- id: reassignmentResult?.id,
188
- error,
189
- };
190
- }
191
- }
192
- return { forkedProcessId, reassignedNames, failedReassignedNames };
193
- }
194
2
  static init(config) {
195
- // Solana backend — async, loads transport lazily to keep AO-only bundles small
196
- if ('backend' in config && config.backend === 'solana') {
197
- return (async () => {
198
- const { SolanaANTReadable } = await import('../solana/ant-readable.js');
199
- const { SolanaANTWriteable } = await import('../solana/ant-writeable.js');
200
- // ADR-016 / BD-100: when no explicit `antProgramId` is passed,
201
- // resolve it from the asset's `ANT Program` Attributes-plugin
202
- // entry. Without this auto-detection, third-party (BYO-ANT)
203
- // assets would silently mis-derive PDAs through the canonical
204
- // default. Users who already know the program (e.g. immediately
205
- // after `ANT.spawn`) can short-circuit by passing it explicitly.
206
- let antProgramId = config.antProgramId;
207
- if (!antProgramId) {
208
- const { fetchAntProgramFromAsset } = await import('../solana/mpl-core.js');
209
- const { ARIO_ANT_PROGRAM_ID } = await import('../solana/constants.js');
210
- const { address } = await import('@solana/kit');
211
- const detected = await fetchAntProgramFromAsset(config.rpc, address(config.processId), { commitment: config.commitment ?? 'confirmed' });
212
- antProgramId = detected ?? ARIO_ANT_PROGRAM_ID;
213
- }
214
- if (config.signer) {
215
- if (!config.rpcSubscriptions) {
216
- throw new Error('ANT.init({ backend: "solana", signer }) requires rpcSubscriptions for transaction confirmation.');
217
- }
218
- return new SolanaANTWriteable({
219
- rpc: config.rpc,
220
- rpcSubscriptions: config.rpcSubscriptions,
221
- processId: config.processId,
222
- signer: config.signer,
223
- commitment: config.commitment,
224
- antProgramId,
225
- });
226
- }
227
- return new SolanaANTReadable({
3
+ return (async () => {
4
+ const { SolanaANTReadable } = await import('../solana/ant-readable.js');
5
+ const { SolanaANTWriteable } = await import('../solana/ant-writeable.js');
6
+ // ADR-016 / BD-100: when no explicit `antProgramId` is passed, resolve
7
+ // it from the asset's `ANT Program` Attributes-plugin entry so that
8
+ // third-party (BYO-ANT) assets derive PDAs through the right program.
9
+ //
10
+ // SECURITY: that trait is untrusted asset/RPC data. The *read* path may
11
+ // use it freely (it never signs). The *write* path runs it through
12
+ // `resolveWriteAntProgram`, which refuses to sign against a non-canonical
13
+ // detected value unless the caller opted in by passing `antProgramId`
14
+ // explicitly otherwise a spoofed trait could route a signed tx to an
15
+ // attacker-controlled program.
16
+ const explicit = config.antProgramId;
17
+ const { fetchAntProgramFromAsset, resolveWriteAntProgram } = await import('../solana/mpl-core.js');
18
+ const { ARIO_ANT_PROGRAM_ID } = await import('../solana/constants.js');
19
+ const { address } = await import('@solana/kit');
20
+ const detected = explicit !== undefined
21
+ ? null
22
+ : await fetchAntProgramFromAsset(config.rpc, address(config.processId), { commitment: config.commitment ?? 'confirmed' });
23
+ if (config.signer) {
24
+ if (!config.rpcSubscriptions) {
25
+ throw new Error('ANT.init({ signer }) requires rpcSubscriptions for transaction confirmation.');
26
+ }
27
+ return new SolanaANTWriteable({
228
28
  rpc: config.rpc,
29
+ rpcSubscriptions: config.rpcSubscriptions,
229
30
  processId: config.processId,
31
+ signer: config.signer,
230
32
  commitment: config.commitment,
231
- antProgramId,
232
- });
233
- })();
234
- }
235
- // AO backend (stays sync)
236
- if ('signer' in config) {
237
- return new AoANTWriteable(config);
238
- }
239
- return new AoANTReadable(config);
240
- }
241
- }
242
- export class AoANTReadable {
243
- process;
244
- processId;
245
- hyperbeamUrl;
246
- strict;
247
- checkHyperBeamPromise;
248
- moduleId;
249
- moduleIdPromise;
250
- logger = Logger.default;
251
- constructor(config) {
252
- this.strict = config.strict || false;
253
- if (isProcessConfiguration(config)) {
254
- this.process = config.process;
255
- }
256
- else if (isProcessIdConfiguration(config)) {
257
- this.process = new AOProcess({
258
- processId: config.processId,
259
- });
260
- }
261
- else {
262
- throw new InvalidContractConfigurationError();
263
- }
264
- this.processId = this.process.processId;
265
- // only use hyperbeam if the client has provided a hyperbeamUrl
266
- // this will avoid overwhelming the HyperBeam node with requests
267
- // as we shift using HyperBEAM for all ANT operations
268
- if (config.hyperbeamUrl !== undefined) {
269
- this.hyperbeamUrl = new URL(config.hyperbeamUrl);
270
- this.logger.debug(`Using HyperBEAM node for process ${this.processId}`, {
271
- hyperbeamUrl: this.hyperbeamUrl,
272
- });
273
- }
274
- }
275
- /**
276
- * Check if the process is HyperBeam compatible. If so, we'll use the HyperBeam node to fetch the state.
277
- *
278
- * @returns {Promise<boolean>} True if the process is HyperBeam compatible, false otherwise.
279
- */
280
- checkHyperBeamCompatibility() {
281
- if (this.hyperbeamUrl === undefined) {
282
- return Promise.resolve(false);
283
- }
284
- if (this.checkHyperBeamPromise !== undefined) {
285
- return this.checkHyperBeamPromise;
286
- }
287
- this.checkHyperBeamPromise = fetch(
288
- // use /now to force a refresh of the cache state, then compute when calling it for keys
289
- `${this.hyperbeamUrl.toString()}${this.processId}~process@1.0/now/cache`, {
290
- method: 'HEAD',
291
- signal: AbortSignal.timeout(5000), // 5 second timeout
292
- })
293
- .then((res) => {
294
- if (res.ok) {
295
- return true;
296
- }
297
- return false;
298
- })
299
- .catch((error) => {
300
- this.logger.debug('Failed to check HyperBeam compatibility', {
301
- cause: error,
302
- });
303
- return false;
304
- });
305
- return this.checkHyperBeamPromise;
306
- }
307
- async getState({ strict } = { strict: this.strict }) {
308
- if (await this.checkHyperBeamCompatibility()) {
309
- let retries = 0;
310
- while (retries < 3) {
311
- try {
312
- const res = await fetch(`${this.hyperbeamUrl}${this.processId}~process@1.0/compute/cache/serialize~json@1.0`, {
313
- method: 'GET',
314
- redirect: 'follow',
315
- mode: 'cors',
316
- headers: {
317
- 'Content-Type': 'application/json',
318
- },
319
- });
320
- if (res.status !== 200) {
321
- throw new Error(`Failed to fetch ant state: ${res?.statusText ?? 'Unknown error'}`);
322
- }
323
- const unnormalizedState = (await res.json());
324
- if (!isHyperBeamANTState(unnormalizedState)) {
325
- // don't retry if the state is bad, fallback to the CU
326
- break;
327
- }
328
- // normalize and return the state
329
- return convertHyperBeamStateToAoANTState(unnormalizedState);
330
- }
331
- catch (error) {
332
- this.logger.error(`Failed to fetch process state from HyperBEAM (attempt ${retries + 1} / 3)`, {
333
- cause: error,
334
- });
335
- retries++;
336
- await new Promise((resolve) => setTimeout(resolve, 1000 * retries ** 2));
337
- }
338
- }
339
- }
340
- const tags = [{ name: 'Action', value: 'State' }];
341
- const res = await this.process.read({
342
- tags,
343
- });
344
- if (strict) {
345
- parseSchemaResult(AntStateSchema.passthrough().and(z.object({
346
- Records: z.record(z.string(), AntRecordSchema.passthrough()),
347
- })), res);
348
- }
349
- return res;
350
- }
351
- async getInfo({ strict } = { strict: this.strict }) {
352
- if (await this.checkHyperBeamCompatibility()) {
353
- const state = await this.getState();
354
- return {
355
- Name: state.Name,
356
- Ticker: state.Ticker,
357
- Description: state.Description,
358
- Keywords: state.Keywords,
359
- Denomination: state.Denomination.toString(),
360
- Owner: state.Owner,
361
- Logo: state.Logo,
362
- 'Total-Supply': state.TotalSupply.toString(),
363
- Handlers: [], // TODO: support for handler in patched state
364
- };
365
- }
366
- const tags = [{ name: 'Action', value: 'Info' }];
367
- const info = await this.process.read({
368
- tags,
369
- });
370
- if (strict) {
371
- parseSchemaResult(AntInfoSchema.passthrough(), info);
372
- }
373
- return info;
374
- }
375
- /**
376
- * Returns the TX ID of the logo set for the ANT.
377
- */
378
- async getLogo() {
379
- const info = await this.getInfo();
380
- return info.Logo;
381
- }
382
- /**
383
- * Gets the module ID of the current ANT process by querying its spawn transaction tags.
384
- * Results are cached after the first successful fetch.
385
- *
386
- * @param graphqlUrl The GraphQL endpoint URL (defaults to Arweave's GraphQL endpoint)
387
- * @param retries Number of retry attempts (defaults to 3)
388
- * @returns Promise<string> The module ID used to spawn this ANT process
389
- * @example
390
- * ```ts
391
- * const moduleId = await ant.getModuleId();
392
- * console.log(`ANT was spawned with module: ${moduleId}`);
393
- * ```
394
- */
395
- async getModuleId({
396
- // TODO: we could use wayfinder for this
397
- graphqlUrl = 'https://arweave.net/graphql', retries = 3, } = {}) {
398
- // Return cached result if available
399
- if (this.moduleId !== undefined) {
400
- this.logger.debug('Returning cached module ID', {
401
- processId: this.processId,
402
- moduleId: this.moduleId,
403
- });
404
- return this.moduleId;
405
- }
406
- // Return existing promise if already in flight
407
- if (this.moduleIdPromise) {
408
- this.logger.debug('Returning in-flight module ID promise', {
409
- processId: this.processId,
410
- });
411
- return this.moduleIdPromise;
412
- }
413
- // Create and cache the promise to prevent multiple concurrent requests
414
- this.moduleIdPromise = this.fetchModuleId({ graphqlUrl, retries });
415
- try {
416
- const moduleId = await this.moduleIdPromise;
417
- this.moduleId = moduleId;
418
- this.logger.debug('Successfully fetched and cached module ID', {
419
- processId: this.processId,
420
- moduleId,
421
- });
422
- return moduleId;
423
- }
424
- finally {
425
- // Clear the promise so future calls can retry if this one failed
426
- this.moduleIdPromise = undefined;
427
- }
428
- }
429
- /**
430
- * Internal method to fetch the module ID from GraphQL.
431
- *
432
- * TODO: this could be more like get process headers/metadata and fetch additional details.
433
- *
434
- * It seems like module is the only relevant one, but scheduler and authority are also available.
435
- */
436
- async fetchModuleId({ graphqlUrl, retries, }) {
437
- const query = JSON.stringify({
438
- query: `
439
- query {
440
- transactions(
441
- ids: ["${this.processId}"]
442
- first: 1
443
- ) {
444
- edges {
445
- node {
446
- tags {
447
- name
448
- value
449
- }
450
- }
451
- }
452
- }
453
- }
454
- `,
455
- });
456
- for (let i = 0; i < retries; i++) {
457
- try {
458
- const response = await fetch(graphqlUrl, {
459
- method: 'POST',
460
- body: query,
461
- headers: {
462
- 'Content-Type': 'application/json',
463
- },
464
- signal: AbortSignal.timeout(10_000), // 10 second timeout
465
- });
466
- if (!response.ok) {
467
- throw new Error(`GraphQL request failed: ${response.statusText}`);
468
- }
469
- const result = (await response.json());
470
- if (result.errors) {
471
- throw new Error(`GraphQL errors: ${result.errors.map((e) => e.message).join(', ')}`);
472
- }
473
- const edges = result.data?.transactions?.edges;
474
- if (!edges || edges.length === 0) {
475
- throw new Error(`No transaction found for process ID: ${this.processId}`);
476
- }
477
- const tags = edges[0].node.tags;
478
- const moduleTag = tags.find((tag) => tag.name === 'Module');
479
- if (!moduleTag) {
480
- throw new Error(`No Module tag found for process ID: ${this.processId}`);
481
- }
482
- return moduleTag.value;
483
- }
484
- catch (error) {
485
- if (i === retries - 1) {
486
- // Final attempt failed
487
- this.logger.error('Failed to get ANT module ID after all retries:', {
488
- error,
489
- });
490
- throw new Error(`Unable to determine module ID for ANT process ${this.processId}: ${error.message}`);
491
- }
492
- // Exponential backoff
493
- await new Promise((resolve) => setTimeout(resolve, Math.pow(2, i) * 1000));
494
- }
495
- }
496
- throw new Error(`Unexpected error getting module ID for process ${this.processId}`);
497
- }
498
- /**
499
- * Gets the version string of the current ANT by matching its module ID
500
- * with versions from the ANT registry.
501
- *
502
- * @param antRegistryId The ANT registry process ID (defaults to mainnet registry)
503
- * @param graphqlUrl The GraphQL endpoint URL for getModuleId (defaults to Arweave's GraphQL endpoint)
504
- * @param retries Number of retry attempts for getModuleId (defaults to 3)
505
- * @returns Promise<string> The version string (e.g., "1.0.15") or "unknown" if not found
506
- * @example
507
- * ```ts
508
- * const version = await ant.getVersion();
509
- * console.log(`ANT is running version: ${version}`);
510
- * ```
511
- */
512
- async getVersion({ antRegistryId = ANT_REGISTRY_ID, graphqlUrl = 'https://arweave.net/graphql', retries = 3, } = {}) {
513
- // Get the current ANT's module ID
514
- const currentModuleId = await this.getModuleId({ graphqlUrl, retries });
515
- // Get all versions from the ANT registry
516
- const antVersions = ANTVersions.init({
517
- process: new AOProcess({
518
- processId: antRegistryId,
519
- ao: this.process.ao,
520
- }),
521
- });
522
- const versions = await antVersions.getANTVersions();
523
- // Find the version that matches our module ID
524
- for (const [version, versionInfo] of Object.entries(versions)) {
525
- if (versionInfo.moduleId === currentModuleId) {
526
- this.logger.debug('Found matching ANT version', {
527
- processId: this.processId,
528
- moduleId: currentModuleId,
529
- version,
33
+ antProgramId: resolveWriteAntProgram({ explicit, detected }),
530
34
  });
531
- return version;
532
- }
533
- }
534
- const versionForModuleId = Object.entries(versions)
535
- .map(([version, versionInfo]) => ({
536
- version,
537
- ...versionInfo,
538
- }))
539
- .find((obj) => obj.moduleId === currentModuleId);
540
- return versionForModuleId?.version ?? 'unknown';
541
- }
542
- /**
543
- * Checks if the current ANT version is the latest according to the ANT registry.
544
- *
545
- * @param antRegistryId Optional ANT registry process ID. Defaults to mainnet ANT registry.
546
- * @param graphqlUrl Optional GraphQL endpoint. Defaults to https://arweave.net/graphql.
547
- * @param retries Optional number of retries for fetching module ID. Defaults to 3.
548
- * @returns {Promise<boolean>} True if current ANT version is the latest, false otherwise.
549
- */
550
- async isLatestVersion({ antRegistryId = ANT_REGISTRY_ID, graphqlUrl = 'https://arweave.net/graphql', retries = 3, } = {}) {
551
- // Get the current ANT's version
552
- const currentVersion = await this.getVersion({
553
- antRegistryId,
554
- graphqlUrl,
555
- retries,
556
- });
557
- // Get all versions from the ANT registry
558
- const antVersions = ANTVersions.init({
559
- process: new AOProcess({
560
- processId: antRegistryId,
561
- ao: this.process.ao,
562
- }),
563
- });
564
- const latestVersion = await antVersions.getLatestANTVersion();
565
- return currentVersion === latestVersion.version;
566
- }
567
- /**
568
- * @param undername @type {string} The domain name.
569
- * @returns {Promise<ANTRecord>} The record of the undername domain.
570
- * @example
571
- * Get the current record
572
- * ```ts
573
- * ant.getRecord({ undername: "john" });
574
- * ```
575
- */
576
- async getRecord({ undername }, { strict } = { strict: this.strict }) {
577
- if (await this.checkHyperBeamCompatibility()) {
578
- const records = await this.getRecords();
579
- const cachedRecord = records[undername];
580
- // if the record is not found, throw an error
581
- if (cachedRecord === undefined) {
582
- throw new Error('Record not found');
583
35
  }
584
- return cachedRecord;
585
- }
586
- // TODO: use sortedANTRecords to get priority on all records, even if ANT does not have a priority set
587
- const record = await this.process.read({
588
- tags: [
589
- { name: 'Action', value: 'Record' },
590
- { name: 'Sub-Domain', value: undername },
591
- ],
592
- });
593
- if (strict)
594
- parseSchemaResult(AntRecordSchema.passthrough(), record);
595
- return record;
596
- }
597
- /**
598
- * @returns {Promise<SortedANTRecords>} All the undernames managed by the ANT.
599
- * @example
600
- * Get the current records
601
- * ```ts
602
- * ant.getRecords();
603
- * ````
604
- */
605
- async getRecords({ strict } = { strict: this.strict }) {
606
- if (await this.checkHyperBeamCompatibility()) {
607
- const state = await this.getState();
608
- return sortANTRecords(state.Records);
609
- }
610
- const tags = [{ name: 'Action', value: 'Records' }];
611
- const records = await this.process.read({
612
- tags,
613
- });
614
- if (strict)
615
- parseSchemaResult(AntRecordsSchema, records);
616
- // sort the records using the deterministic sort used by ar-io nodes
617
- return sortANTRecords(records);
618
- }
619
- /**
620
- * @returns {Promise<string>} The owner of the ANT.
621
- * @example
622
- * Get the current owner
623
- * ```ts
624
- * ant.getOwner();
625
- * ```
626
- */
627
- async getOwner({ strict } = { strict: this.strict }) {
628
- if (await this.checkHyperBeamCompatibility()) {
629
- const state = await this.getState();
630
- return state.Owner;
631
- }
632
- const info = await this.getInfo({ strict });
633
- return info.Owner;
634
- }
635
- /**
636
- * @returns {Promise<string[]>} The controllers of the ANT.
637
- * @example
638
- * Get the controllers of the ANT.
639
- * ```ts
640
- * ant.getControllers();
641
- * ```
642
- */
643
- async getControllers({ strict } = { strict: this.strict }) {
644
- if (await this.checkHyperBeamCompatibility()) {
645
- const state = await this.getState();
646
- return state.Controllers;
647
- }
648
- const tags = [{ name: 'Action', value: 'Controllers' }];
649
- const controllers = await this.process.read({
650
- tags,
651
- });
652
- if (strict)
653
- parseSchemaResult(AntControllersSchema, controllers);
654
- return controllers;
655
- }
656
- /**
657
- * @returns {Promise<string>} The name of the ANT (not the same as ArNS name).
658
- * @example
659
- * Get the current name
660
- * ```ts
661
- * ant.getName();
662
- * ```
663
- */
664
- async getName({ strict } = { strict: this.strict }) {
665
- if (await this.checkHyperBeamCompatibility()) {
666
- const state = await this.getState();
667
- return state.Name;
668
- }
669
- const info = await this.getInfo({ strict });
670
- return info.Name;
671
- }
672
- /**
673
- * @returns {Promise<string>} The name of the ANT (not the same as ArNS name).
674
- * @example
675
- * The current ticker of the ANT.
676
- * ```ts
677
- * ant.getTicker();
678
- * ```
679
- */
680
- async getTicker({ strict } = { strict: this.strict }) {
681
- if (await this.checkHyperBeamCompatibility()) {
682
- const state = await this.getState();
683
- return state.Ticker;
684
- }
685
- const info = await this.getInfo({ strict });
686
- return info.Ticker;
687
- }
688
- /**
689
- * @returns {Promise<Record<WalletAddress, number>>} The balances of the ANT
690
- * @example
691
- * The current balances of the ANT.
692
- * ```ts
693
- * ant.getBalances();
694
- * ```
695
- */
696
- async getBalances({ strict } = { strict: this.strict }) {
697
- const state = await this.getState();
698
- const balances = state.Balances;
699
- if (strict)
700
- parseSchemaResult(AntBalancesSchema, balances);
701
- return balances;
702
- }
703
- /**
704
- * @param address @type {string} The address of the account you want the balance of.
705
- * @returns {Promise<number>} The balance of the provided address
706
- * @example
707
- * The current balance of the address.
708
- * ```ts
709
- * ant.getBalance({ address });
710
- * ```
711
- */
712
- async getBalance({ address }, { strict } = { strict: this.strict }) {
713
- if (await this.checkHyperBeamCompatibility()) {
714
- const balances = await this.getBalances();
715
- return balances[address] ?? 0;
716
- }
717
- const tags = [
718
- { name: 'Action', value: 'Balance' },
719
- { name: 'Recipient', value: address },
720
- ];
721
- const balance = await this.process.read({
722
- tags,
723
- });
724
- if (strict)
725
- parseSchemaResult(z.number(), balance);
726
- return balance;
727
- }
728
- /**
729
- * @returns {Promise<AoANTHandler[]>} The handlers of the ANT.
730
- * @example
731
- * Get the handlers of the ANT.
732
- * ```ts
733
- * const handlers = await ant.getHandlers();
734
- * ```
735
- */
736
- async getHandlers() {
737
- if (await this.checkHyperBeamCompatibility()) {
738
- throw new Error('Handlers are not supported on HyperBeam');
739
- }
740
- const info = await this.getInfo();
741
- return (info.Handlers ?? info.HandlerNames);
742
- }
743
- }
744
- export class AoANTWriteable extends AoANTReadable {
745
- signer;
746
- constructor({ signer, ...config }) {
747
- super(config);
748
- this.signer = createAoSigner(signer);
749
- }
750
- /**
751
- * @param target @type {string} The address of the account you want to transfer the ANT to.
752
- * @param removeControllers @type {boolean} Whether to remove the controllers of the ANT. Default is true.
753
- * @example
754
- * ```ts
755
- * ant.transfer({ target: "fGht8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5-5dV7nk", removeControllers: false }); // will not remove the controllers of the ANT and just transfer ownership
756
- * ```
757
- * @returns {Promise<AoMessageResult>} The result of the interaction.
758
- * @example
759
- * ```ts
760
- * ant.transfer({ target: "fGht8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5-5dV7nk" });
761
- * ```
762
- */
763
- async transfer({ target, removeControllers = true, }, options) {
764
- const tags = [
765
- ...(options?.tags ?? []),
766
- { name: 'Action', value: 'Transfer' },
767
- { name: 'Recipient', value: target },
768
- {
769
- name: 'Remove-Controllers',
770
- value: removeControllers ? 'true' : 'false',
771
- },
772
- ];
773
- return this.process.send({
774
- tags,
775
- signer: this.signer,
776
- });
777
- }
778
- /**
779
- * @param controller @type {string} The address of the account you want to set as a controller.
780
- * @returns {Promise<AoMessageResult>} The result of the interaction.
781
- * @example
782
- * ```ts
783
- * ant.setController({ controller: "fGht8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5-5dV7nk" });
784
- * ```
785
- */
786
- async addController({ controller, }, options) {
787
- const tags = [
788
- ...(options?.tags ?? []),
789
- { name: 'Action', value: 'Add-Controller' },
790
- { name: 'Controller', value: controller },
791
- ];
792
- return this.process.send({
793
- tags,
794
- signer: this.signer,
795
- });
796
- }
797
- /**
798
- * @param controller @type {string} The address of the account you want to remove from the controllers list
799
- * @returns {Promise<AoMessageResult>} The result of the interaction.
800
- * @example
801
- * ```ts
802
- * ant.removeController({ controller: "fGht8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5-5dV7nk" });
803
- * ```
804
- */
805
- async removeController({ controller, }, options) {
806
- const tags = [
807
- ...(options?.tags ?? []),
808
- { name: 'Action', value: 'Remove-Controller' },
809
- { name: 'Controller', value: controller },
810
- ];
811
- return this.process.send({
812
- tags,
813
- signer: this.signer,
814
- });
815
- }
816
- /**
817
- * Sets the transactionId and ttlSeconds of a record (for updating the top level name, use undername "@".)
818
- *
819
- * @deprecated Use setUndernameRecord instead for undernames, and setBaseNameRecord instead for the top level name (e.g. "@")
820
- * @param undername @type {string} The record you want to set the transactionId and ttlSeconds of.
821
- * @param transactionId @type {string} The transactionId of the record.
822
- * @param ttlSeconds @type {number} The time to live of the record.
823
- * @param owner @type {string} Optional owner address for the record.
824
- * @param displayName @type {string} Optional display name for the record.
825
- * @param logo @type {string} Optional logo transaction ID for the record.
826
- * @param description @type {string} Optional description for the record.
827
- * @param keywords @type {string[]} Optional keywords array for the record.
828
- * @returns {Promise<AoMessageResult>} The result of the interaction.
829
- */
830
- async setRecord({ undername, transactionId, ttlSeconds, owner, displayName, logo, description, keywords, }, options) {
831
- const tags = [
832
- ...(options?.tags ?? []),
833
- { name: 'Action', value: 'Set-Record' },
834
- { name: 'Sub-Domain', value: undername },
835
- { name: 'Transaction-Id', value: transactionId },
836
- { name: 'TTL-Seconds', value: ttlSeconds.toString() },
837
- { name: 'Record-Owner', value: owner },
838
- { name: 'Display-Name', value: displayName },
839
- { name: 'Logo', value: logo },
840
- { name: 'Description', value: description },
841
- {
842
- name: 'Keywords',
843
- value: keywords ? JSON.stringify(keywords) : undefined,
844
- },
845
- ].filter((tag) => tag.value !== undefined);
846
- return this.process.send({
847
- tags,
848
- signer: this.signer,
849
- });
850
- }
851
- /**
852
- * Sets the top level name of the ANT. This is the name that will be used to resolve the ANT (e.g. ardrive.ar.io)
853
- *
854
- * @param transactionId @type {string} The transactionId of the record.
855
- * @param ttlSeconds @type {number} The time to live of the record.
856
- * @param owner @type {string} Optional owner address for the record.
857
- * @param displayName @type {string} Optional display name for the record.
858
- * @param logo @type {string} Optional logo transaction ID for the record.
859
- * @param description @type {string} Optional description for the record.
860
- * @param keywords @type {string[]} Optional keywords array for the record.
861
- * @returns {Promise<AoMessageResult>} The result of the interaction.
862
- * @example
863
- * ```ts
864
- * ant.setBaseNameRecord({ transactionId: "432l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM", ttlSeconds: 100 }); // ardrive.ar.io will resolve to the provided transaction id and be cached for 100 seconds by clients
865
- * ```
866
- */
867
- async setBaseNameRecord({ transactionId, ttlSeconds, owner, displayName, logo, description, keywords, }, options) {
868
- return this.setRecord({
869
- transactionId,
870
- ttlSeconds,
871
- undername: '@',
872
- owner,
873
- displayName,
874
- logo,
875
- description,
876
- keywords,
877
- }, options);
878
- }
879
- /**
880
- * Adds or updates an undername of the ANT. An undername is appended to the base name of the ANT (e.g. ardrive.ar.io) to form a fully qualified name (e.g. dapp_ardrive.ar.io)
881
- *
882
- * @param undername @type {string} The undername of the ANT.
883
- * @param transactionId @type {string} The transactionId of the record.
884
- * @param ttlSeconds @type {number} The time to live of the record.
885
- * @param owner @type {string} Optional owner address for the record.
886
- * @param displayName @type {string} Optional display name for the record.
887
- * @param logo @type {string} Optional logo transaction ID for the record.
888
- * @param description @type {string} Optional description for the record.
889
- * @param keywords @type {string[]} Optional keywords array for the record.
890
- * @returns {Promise<AoMessageResult>} The result of the interaction.
891
- * @example
892
- * ```ts
893
- * ant.setUndernameRecord({ undername: "dapp", transactionId: "432l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM", ttlSeconds: 100 }); // dapp_ardrive.ar.io will resolve to the provided transaction id and be cached for 100 seconds by clients
894
- * ```
895
- */
896
- async setUndernameRecord({ undername, transactionId, ttlSeconds, owner, displayName, logo, description, keywords, }, options) {
897
- return this.setRecord({
898
- undername,
899
- transactionId,
900
- ttlSeconds,
901
- owner,
902
- displayName,
903
- logo,
904
- description,
905
- keywords,
906
- }, options);
907
- }
908
- /**
909
- * Removes an undername from the ANT. This will remove the undername from the ANT.
910
- *
911
- * @param undername @type {string} The undername you want to remove.
912
- * @returns {Promise<AoMessageResult>} The result of the interaction.
913
- * @example
914
- * ```ts
915
- * ant.removeUndernameRecord({ undername: "dapp" }); // removes dapp_ardrive.ar.io
916
- * ```
917
- */
918
- async removeUndernameRecord({ undername, }) {
919
- return this.removeRecord({ undername });
920
- }
921
- /**
922
- * Removes a record from the ANT. This will remove the record from the ANT. If '@' is provided, the top level name will be removed.
923
- *
924
- * @deprecated Use removeUndernameRecord instead.
925
- * @param undername @type {string} The record you want to remove.
926
- * @returns {Promise<AoMessageResult>} The result of the interaction.
927
- * @example
928
- * ```ts
929
- * ant.removeRecord({ undername: "dapp" }); // removes dapp_ardrive.ar.io
930
- * ```
931
- */
932
- async removeRecord({ undername, }, options) {
933
- return this.process.send({
934
- tags: [
935
- ...(options?.tags ?? []),
936
- { name: 'Action', value: 'Remove-Record' },
937
- { name: 'Sub-Domain', value: undername },
938
- ],
939
- signer: this.signer,
940
- });
941
- }
942
- /**
943
- * Sets the ticker of the ANT. This is the abbreviation displayed in ecosystem apps.
944
- *
945
- * @param ticker @type {string} Sets the ANT Ticker.
946
- * @returns {Promise<AoMessageResult>} The result of the interaction.
947
- * @example
948
- * ```ts
949
- * ant.setTicker({ ticker: "KAPOW" });
950
- * ```
951
- */
952
- async setTicker({ ticker }, options) {
953
- return this.process.send({
954
- tags: [
955
- ...(options?.tags ?? []),
956
- { name: 'Action', value: 'Set-Ticker' },
957
- { name: 'Ticker', value: ticker },
958
- ],
959
- signer: this.signer,
960
- });
961
- }
962
- /**
963
- * Sets the name of the ANT. This is the display name of the ANT. This is NOT the base name record.
964
- *
965
- * @param name @type {string} Sets the Name of the ANT.
966
- * @returns {Promise<AoMessageResult>} The result of the interaction.
967
- * @example
968
- * ```ts
969
- * ant.setName({ name: "test" }); // results in the resolution of `test_<apexName>.ar.io`
970
- * ```
971
- */
972
- async setName({ name }, options) {
973
- return this.process.send({
974
- tags: [
975
- ...(options?.tags ?? []),
976
- { name: 'Action', value: 'Set-Name' },
977
- { name: 'Name', value: name },
978
- ],
979
- signer: this.signer,
980
- });
981
- }
982
- /**
983
- * Sets the description of the ANT. This is the description of the ANT displayed in ecosystem apps.
984
- *
985
- * @param description @type {string} Sets the ANT Description.
986
- * @returns {Promise<AoMessageResult>} The result of the interaction.
987
- * @example
988
- * ```ts
989
- * ant.setDescription({ description: "This name is used for the ArDrive" });
990
- * ```
991
- */
992
- async setDescription({ description }, options) {
993
- return this.process.send({
994
- tags: [
995
- ...(options?.tags ?? []),
996
- { name: 'Action', value: 'Set-Description' },
997
- { name: 'Description', value: description },
998
- ],
999
- signer: this.signer,
1000
- });
1001
- }
1002
- /**
1003
- * Sets the keywords of the ANT. This is the keywords of the ANT displayed in ecosystem apps.
1004
- *
1005
- * @param keywords @type {string[]} Sets the ANT Keywords.
1006
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1007
- * @example
1008
- * ```ts
1009
- * ant.setKeywords({ keywords: ['keyword1', 'keyword2', 'keyword3']});
1010
- * ```
1011
- */
1012
- async setKeywords({ keywords }, options) {
1013
- return this.process.send({
1014
- tags: [
1015
- ...(options?.tags ?? []),
1016
- { name: 'Action', value: 'Set-Keywords' },
1017
- { name: 'Keywords', value: JSON.stringify(keywords) },
1018
- ],
1019
- signer: this.signer,
1020
- });
1021
- }
1022
- /**
1023
- * Sets the logo of the ANT. This is the logo of the ANT displayed in ecosystem apps. Additionally, this logo is displayed for any primary names affiliated with the ANT.
1024
- *
1025
- * @param txId @type {string} - Arweave transaction id of the logo we want to set
1026
- * @param options @type {WriteOptions} - additional options to add to the write interaction (optional)
1027
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1028
- * @example
1029
- * ```ts
1030
- * ant.setLogo({ logo: "U7RXcpaVShG4u9nIcPVmm2FJSM5Gru9gQCIiRaIPV7f" });
1031
- * ```
1032
- */
1033
- async setLogo({ txId }, options) {
1034
- return this.process.send({
1035
- tags: [
1036
- ...(options?.tags ?? []),
1037
- { name: 'Action', value: 'Set-Logo' },
1038
- { name: 'Logo', value: txId },
1039
- ],
1040
- signer: this.signer,
1041
- });
1042
- }
1043
- /**
1044
- * Releases an ArNS name associated with the ANT. This will release the name to the public and allow anyone to register it. All primary names must be removed before the name can be released.
1045
- *
1046
- * @param name @type {string} The name you want to release. The name will be put up for as a recently returned name on the ARIO contract. 50% of the winning bid will be distributed to the ANT owner at the time of purchase. If no purchase in the recently returned name period (14 epochs), the name will be released and can be reregistered by anyone.
1047
- * @param arioProcessId @type {string} The processId of the ARIO contract. This is where the ANT will send the message to release the name.
1048
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1049
- * @example
1050
- * ```ts
1051
- * ant.releaseName({ name: "ardrive", arioProcessId: ARIO_MAINNET_PROCESS_ID });
1052
- * ```
1053
- */
1054
- async releaseName({ name, arioProcessId }, options) {
1055
- return this.process.send({
1056
- tags: [
1057
- ...(options?.tags ?? []),
1058
- { name: 'Action', value: 'Release-Name' },
1059
- { name: 'Name', value: name },
1060
- { name: 'IO-Process-Id', value: arioProcessId },
1061
- { name: 'ARIO-Process-Id', value: arioProcessId },
1062
- ],
1063
- signer: this.signer,
1064
- });
1065
- }
1066
- /**
1067
- * Sends a message to the ARIO contract to reassign the the base ArNS name to a new ANT. This can only be done by the current owner of the ANT.
1068
- *
1069
- * @param name @type {string} The name you want to reassign.
1070
- * @param arioProcessId @type {string} The processId of the ARIO contract.
1071
- * @param antProcessId @type {string} The processId of the ANT contract.
1072
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1073
- * @example
1074
- * ```ts
1075
- * ant.reassignName({ name: "ardrive", arioProcessId: ARIO_MAINNET_PROCESS_ID, antProcessId: NEW_ANT_PROCESS_ID });
1076
- * ```
1077
- */
1078
- async reassignName({ name, arioProcessId, antProcessId, }, options) {
1079
- return this.process.send({
1080
- tags: [
1081
- ...(options?.tags ?? []),
1082
- { name: 'Action', value: 'Reassign-Name' },
1083
- { name: 'Name', value: name },
1084
- { name: 'IO-Process-Id', value: arioProcessId },
1085
- { name: 'ARIO-Process-Id', value: arioProcessId },
1086
- { name: 'Process-Id', value: antProcessId },
1087
- ],
1088
- signer: this.signer,
1089
- });
1090
- }
1091
- /**
1092
- * Approves a primary name request for a given name or address.
1093
- *
1094
- * @param name @type {string} The name you want to approve.
1095
- * @param address @type {WalletAddress} The address you want to approve.
1096
- * @param arioProcessId @type {string} The processId of the ARIO contract.
1097
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1098
- * @example
1099
- * ```ts
1100
- * ant.approvePrimaryNameRequest({ name: "ardrive", address: "U7RXcpaVShG4u9nIcPVmm2FJSM5Gru9gQCIiRaIPV7f", arioProcessId: ARIO_MAINNET_PROCESS_ID }); // approves the request for ardrive.ar.io to be registered by the address
1101
- * ```
1102
- */
1103
- async approvePrimaryNameRequest({ name, address, arioProcessId, }, options) {
1104
- return this.process.send({
1105
- tags: [
1106
- ...(options?.tags ?? []),
1107
- { name: 'Action', value: 'Approve-Primary-Name' },
1108
- { name: 'Name', value: name },
1109
- { name: 'Recipient', value: address },
1110
- { name: 'IO-Process-Id', value: arioProcessId },
1111
- { name: 'ARIO-Process-Id', value: arioProcessId },
1112
- ],
1113
- signer: this.signer,
1114
- });
1115
- }
1116
- /**
1117
- * Removes primary names from the ANT. This will remove the primary names associated with the base ArNS name controlled by this ANT. All primary names must be removed before the name can be released.
1118
- *
1119
- * @param names @type {string[]} The names you want to remove.
1120
- * @param arioProcessId @type {string} The processId of the ARIO contract.
1121
- * @param notifyOwners @type {boolean} Whether to notify the owners of the primary names.
1122
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1123
- * @example
1124
- * ```ts
1125
- * ant.removePrimaryNames({ names: ["ardrive", "dapp_ardrive"], arioProcessId: ARIO_MAINNET_PROCESS_ID, notifyOwners: true }); // removes the primary names and associated wallet addresses assigned to "ardrive" and "dapp_ardrive"
1126
- * ```
1127
- */
1128
- async removePrimaryNames({ names, arioProcessId,
1129
- // TODO: remove this param, its not used on the ANT contract
1130
- notifyOwners = false, }, options) {
1131
- return this.process.send({
1132
- tags: [
1133
- ...(options?.tags ?? []),
1134
- { name: 'Action', value: 'Remove-Primary-Names' },
1135
- { name: 'Names', value: names.join(',') },
1136
- { name: 'IO-Process-Id', value: arioProcessId },
1137
- { name: 'ARIO-Process-Id', value: arioProcessId },
1138
- { name: 'Notify-Owners', value: notifyOwners.toString() },
1139
- ],
1140
- signer: this.signer,
1141
- });
1142
- }
1143
- /**
1144
- * Upgrade this ANT by forking it to the latest version and reassigning names.
1145
- *
1146
- * This is a convenience method that calls the static ANT.upgrade() method
1147
- * using this instance's process ID and signer.
1148
- *
1149
- * current version with latest ANT registry version and skip if already up to date.
1150
- *
1151
- * @param names @type {string[]} The ArNS names to reassign to the upgraded ANT.
1152
- * @param arioProcessId @type {string} The processId of the ARIO contract.
1153
- * @param antRegistryId @type {string} Optional ANT registry ID.
1154
- * @param onSigningProgress Progress callback function.
1155
- * @returns {Promise} The upgrade results.
1156
- * @example
1157
- * ```ts
1158
- * const result = await ant.upgrade({
1159
- * names: ["example", "test"],
1160
- * arioProcessId: ARIO_MAINNET_PROCESS_ID
1161
- * });
1162
- * console.log(`Upgraded to process: ${result.forkedProcessId}`);
1163
- * ```
1164
- */
1165
- async upgrade(params) {
1166
- const { names, reassignAffiliatedNames, arioProcessId, antRegistryId, skipVersionCheck, onSigningProgress, } = params ?? {};
1167
- // Determine if we should reassign all names or specific names
1168
- const shouldReassignAll = names === undefined || names.length === 0
1169
- ? (reassignAffiliatedNames ?? true)
1170
- : false;
1171
- if (shouldReassignAll) {
1172
- return ANT.upgrade({
1173
- signer: this.signer,
1174
- antProcessId: this.processId,
1175
- ao: this.process.ao,
1176
- hyperbeamUrl: this.hyperbeamUrl?.toString(),
1177
- reassignAffiliatedNames: true,
1178
- arioProcessId: arioProcessId,
1179
- antRegistryId: antRegistryId,
1180
- onSigningProgress: onSigningProgress,
1181
- skipVersionCheck: skipVersionCheck,
1182
- });
1183
- }
1184
- else {
1185
- return ANT.upgrade({
1186
- signer: this.signer,
1187
- antProcessId: this.processId,
1188
- ao: this.process.ao,
1189
- hyperbeamUrl: this.hyperbeamUrl?.toString(),
1190
- names: names,
1191
- reassignAffiliatedNames: false,
1192
- arioProcessId: arioProcessId,
1193
- antRegistryId: antRegistryId,
1194
- onSigningProgress: onSigningProgress,
1195
- skipVersionCheck: skipVersionCheck,
36
+ return new SolanaANTReadable({
37
+ rpc: config.rpc,
38
+ processId: config.processId,
39
+ commitment: config.commitment,
40
+ antProgramId: explicit ?? detected ?? ARIO_ANT_PROGRAM_ID,
1196
41
  });
1197
- }
42
+ })();
1198
43
  }
1199
44
  /**
1200
- * Transfers ownership of a specific record (undername) to another address. This allows delegation of control for individual records within an ANT while maintaining the ANT owner's ultimate authority.
1201
- *
1202
- * @param undername @type {string} The subdomain/record whose ownership you want to transfer.
1203
- * @param recipient @type {string} The address of the new owner for this record.
1204
- * @returns {Promise<AoMessageResult>} The result of the interaction.
1205
- * @example
1206
- * ```ts
1207
- * ant.transferRecord({ undername: "alice", recipient: "new-owner-address-123..." }); // transfers ownership of the "alice" record to the new owner
1208
- * ```
45
+ * Spawn a new ANT mints an MPL Core asset and initializes the
46
+ * `ario-ant` PDAs in a single transaction. Returns
47
+ * `{ processId, mint, signature }`.
1209
48
  */
1210
- async transferRecord({ undername, recipient, }, options) {
1211
- return this.process.send({
1212
- tags: [
1213
- ...(options?.tags ?? []),
1214
- { name: 'Action', value: 'Transfer-Record' },
1215
- { name: 'Sub-Domain', value: undername },
1216
- { name: 'Recipient', value: recipient },
1217
- ],
1218
- signer: this.signer,
1219
- });
49
+ static async spawn(params) {
50
+ const { spawnSolanaANT } = await import('../solana/spawn-ant.js');
51
+ return spawnSolanaANT(params);
1220
52
  }
1221
53
  }