@ar.io/sdk 4.0.0-solana.9 → 4.0.1
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.
- package/README.md +721 -673
- package/lib/esm/cli/cli.js +28 -152
- package/lib/esm/cli/commands/antCommands.js +5 -66
- package/lib/esm/cli/commands/arnsPurchaseCommands.js +7 -28
- package/lib/esm/cli/commands/escrowCommands.js +23 -4
- package/lib/esm/cli/commands/gatewayWriteCommands.js +15 -8
- package/lib/esm/cli/commands/pruneCommands.js +14 -26
- package/lib/esm/cli/commands/readCommands.js +12 -1
- package/lib/esm/cli/options.js +2 -75
- package/lib/esm/cli/utils.js +96 -209
- package/lib/esm/common/ant-registry.js +12 -160
- package/lib/esm/common/ant.js +40 -1208
- package/lib/esm/common/faucet.js +17 -6
- package/lib/esm/common/index.js +0 -4
- package/lib/esm/common/io.js +13 -1441
- package/lib/esm/constants.js +0 -18
- package/lib/esm/solana/ant-readable.js +391 -54
- package/lib/esm/solana/ant-registry-readable.js +15 -0
- package/lib/esm/solana/ant-registry-writeable.js +19 -4
- package/lib/esm/solana/ant-writeable.js +43 -11
- package/lib/esm/solana/ata.js +15 -0
- package/lib/esm/solana/canonical-message.js +45 -9
- package/lib/esm/solana/clusters.js +69 -22
- package/lib/esm/solana/constants.js +21 -5
- package/lib/esm/solana/delegation-math.js +49 -0
- package/lib/esm/solana/deserialize.js +263 -727
- package/lib/esm/solana/escrow.js +145 -103
- package/lib/esm/solana/events.js +20 -199
- package/lib/esm/solana/funding-plan.js +19 -2
- package/lib/esm/solana/index.js +53 -12
- package/lib/esm/solana/instruction.js +15 -0
- package/lib/esm/solana/io-readable.js +510 -58
- package/lib/esm/solana/io-writeable.js +1179 -183
- package/lib/esm/solana/json-rpc.js +20 -4
- package/lib/esm/solana/metadata.js +15 -0
- package/lib/esm/solana/mpl-core.js +55 -5
- package/lib/esm/solana/pda.js +15 -0
- package/lib/esm/solana/predict-prescribed-observers.js +110 -0
- package/lib/esm/solana/retry.js +117 -0
- package/lib/esm/solana/rpc-circuit-breaker.js +258 -0
- package/lib/esm/solana/send.js +258 -3
- package/lib/esm/solana/spawn-ant.js +16 -2
- package/lib/esm/types/ant.js +8 -8
- package/lib/esm/types/io.js +0 -10
- package/lib/esm/utils/ant.js +0 -64
- package/lib/esm/utils/index.js +0 -3
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/antCommands.d.ts +6 -9
- package/lib/types/cli/commands/arnsPurchaseCommands.d.ts +27 -13
- package/lib/types/cli/commands/escrowCommands.d.ts +6 -0
- package/lib/types/cli/commands/gatewayWriteCommands.d.ts +12 -11
- package/lib/types/cli/commands/pruneCommands.d.ts +11 -11
- package/lib/types/cli/commands/readCommands.d.ts +25 -22
- package/lib/types/cli/commands/transfer.d.ts +9 -9
- package/lib/types/cli/options.d.ts +0 -57
- package/lib/types/cli/types.d.ts +6 -14
- package/lib/types/cli/utils.d.ts +34 -32
- package/lib/types/common/ant-registry.d.ts +35 -74
- package/lib/types/common/ant.d.ts +52 -570
- package/lib/types/common/faucet.d.ts +20 -8
- package/lib/types/common/index.d.ts +0 -3
- package/lib/types/common/io.d.ts +56 -288
- package/lib/types/constants.d.ts +0 -17
- package/lib/types/solana/ant-readable.d.ts +65 -6
- package/lib/types/solana/ant-registry-readable.d.ts +17 -2
- package/lib/types/solana/ant-registry-writeable.d.ts +20 -5
- package/lib/types/solana/ant-writeable.d.ts +39 -24
- package/lib/types/solana/ata.d.ts +15 -0
- package/lib/types/solana/canonical-message.d.ts +44 -5
- package/lib/types/solana/clusters.d.ts +68 -21
- package/lib/types/solana/constants.d.ts +16 -0
- package/lib/types/solana/delegation-math.d.ts +25 -0
- package/lib/types/solana/deserialize.d.ts +28 -198
- package/lib/types/solana/escrow.d.ts +128 -51
- package/lib/types/solana/events.d.ts +26 -144
- package/lib/types/solana/funding-plan.d.ts +15 -0
- package/lib/types/solana/index.d.ts +27 -3
- package/lib/types/solana/instruction.d.ts +15 -0
- package/lib/types/solana/io-readable.d.ts +185 -46
- package/lib/types/solana/io-writeable.d.ts +450 -77
- package/lib/types/solana/json-rpc.d.ts +15 -0
- package/lib/types/solana/metadata.d.ts +15 -0
- package/lib/types/solana/mpl-core.d.ts +44 -0
- package/lib/types/solana/predict-prescribed-observers.d.ts +28 -0
- package/lib/types/solana/retry.d.ts +62 -0
- package/lib/types/solana/rpc-circuit-breaker.d.ts +78 -0
- package/lib/types/solana/send.d.ts +80 -2
- package/lib/types/solana/spawn-ant.d.ts +15 -0
- package/lib/types/solana/types.d.ts +15 -0
- package/lib/types/types/ant-registry.d.ts +4 -4
- package/lib/types/types/ant.d.ts +92 -92
- package/lib/types/types/common.d.ts +18 -74
- package/lib/types/types/faucet.d.ts +2 -2
- package/lib/types/types/io.d.ts +189 -158
- package/lib/types/types/token.d.ts +0 -12
- package/lib/types/utils/ant.d.ts +1 -12
- package/lib/types/utils/index.d.ts +0 -3
- package/lib/types/version.d.ts +1 -1
- package/package.json +23 -37
- package/lib/esm/common/ant-versions.js +0 -87
- package/lib/esm/common/arweave.js +0 -21
- package/lib/esm/common/contracts/ao-process.js +0 -218
- package/lib/esm/common/hyperbeam/hb.js +0 -169
- package/lib/esm/common/marketplace.js +0 -669
- package/lib/esm/common/turbo.js +0 -215
- package/lib/esm/node/index.js +0 -20
- package/lib/esm/solana/generated/ant/events/aclEntryAddedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/aclEntryRemovedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/antMetadataUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/antReconciledEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/antTransferredEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/attributesClearedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/attributesSyncedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/controllerAddedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/controllerRemovedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/index.js +0 -16
- package/lib/esm/solana/generated/ant/events/recordMetadataPrunedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/recordMetadataRemovedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/recordMetadataUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/recordRemovedEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/recordSetEvent.js +0 -21
- package/lib/esm/solana/generated/ant/events/recordTransferredEvent.js +0 -21
- package/lib/esm/solana/generated/ant-escrow/events/escrowCancelledEvent.js +0 -21
- package/lib/esm/solana/generated/ant-escrow/events/escrowClaimedEvent.js +0 -21
- package/lib/esm/solana/generated/ant-escrow/events/escrowDepositedEvent.js +0 -21
- package/lib/esm/solana/generated/ant-escrow/events/escrowRecipientUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/ant-escrow/events/index.js +0 -5
- package/lib/esm/solana/generated/arns/events/demandFactorUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/index.js +0 -13
- package/lib/esm/solana/generated/arns/events/leaseExtendedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/namePurchasedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/nameReassignedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/nameReleasedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/nameReservedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/nameUnreservedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/nameUpgradedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/namesPrunedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/reservedNameClaimedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/returnedNamePurchasedEvent.js +0 -21
- package/lib/esm/solana/generated/arns/events/undernameIncreasedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/configUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/coreMigrationFinalizedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/index.js +0 -14
- package/lib/esm/solana/generated/core/events/primaryNameRemovedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/primaryNameRequestExpiredEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/primaryNameRequestedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/primaryNameSetEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/supplyFinalizedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/transferEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/vaultCreatedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/vaultExtendedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/vaultIncreasedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/vaultReleasedEvent.js +0 -21
- package/lib/esm/solana/generated/core/events/vaultRevokedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/allowlistToggledEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/delegateAllowlistedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/delegationClosedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/delegationDecreasedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/delegationEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/epochClosedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/epochCreatedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/epochDistributedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/epochPrescribedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/epochWeightsTalliedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/epochsToggledEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/fundingPlanAppliedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/garMigrationFinalizedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/gatewayFinalizedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/gatewayJoinedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/gatewayLeavingEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/gatewayPrunedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/gatewaySettingsUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/index.js +0 -31
- package/lib/esm/solana/generated/gar/events/instantWithdrawalEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/observationSubmittedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/observerAddressUpdatedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/operatorStakeIncreasedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/redelegationEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/residueVaultCreatedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/rewardsCompoundedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/stakePaymentEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/withdrawalCancelledEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/withdrawalClaimedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/withdrawalCreatedEvent.js +0 -21
- package/lib/esm/solana/generated/gar/events/withdrawalPaymentEvent.js +0 -21
- package/lib/esm/solana/generated/mpl-core/accounts/assetV1.js +0 -42
- package/lib/esm/solana/generated/mpl-core/accounts/collectionV1.js +0 -42
- package/lib/esm/solana/generated/mpl-core/accounts/hashedAssetV1.js +0 -45
- package/lib/esm/solana/generated/mpl-core/accounts/index.js +0 -12
- package/lib/esm/solana/generated/mpl-core/accounts/pluginHeaderV1.js +0 -45
- package/lib/esm/solana/generated/mpl-core/accounts/pluginRegistryV1.js +0 -42
- package/lib/esm/solana/generated/mpl-core/errors/index.js +0 -8
- package/lib/esm/solana/generated/mpl-core/errors/mplCore.js +0 -136
- package/lib/esm/solana/generated/mpl-core/index.js +0 -8
- package/lib/esm/solana/generated/mpl-core/instructions/addCollectionExternalPluginAdapterV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/addCollectionPluginV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/addExternalPluginAdapterV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/addPluginV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/approveCollectionPluginAuthorityV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/approvePluginAuthorityV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/burnCollectionV1.js +0 -49
- package/lib/esm/solana/generated/mpl-core/instructions/burnV1.js +0 -49
- package/lib/esm/solana/generated/mpl-core/instructions/collect.js +0 -42
- package/lib/esm/solana/generated/mpl-core/instructions/compressV1.js +0 -50
- package/lib/esm/solana/generated/mpl-core/instructions/createCollectionV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/createCollectionV2.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/createV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/createV2.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/decompressV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/executeV1.js +0 -56
- package/lib/esm/solana/generated/mpl-core/instructions/index.js +0 -40
- package/lib/esm/solana/generated/mpl-core/instructions/removeCollectionExternalPluginAdapterV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/removeCollectionPluginV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/removeExternalPluginAdapterV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/removePluginV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/revokeCollectionPluginAuthorityV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/revokePluginAuthorityV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/transferV1.js +0 -49
- package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionExternalPluginAdapterV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionInfoV1.js +0 -45
- package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionPluginV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/updateCollectionV1.js +0 -52
- package/lib/esm/solana/generated/mpl-core/instructions/updateExternalPluginAdapterV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/updatePluginV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/updateV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/updateV2.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/writeCollectionExternalPluginAdapterDataV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/instructions/writeExternalPluginAdapterDataV1.js +0 -53
- package/lib/esm/solana/generated/mpl-core/program-address.js +0 -1
- package/lib/esm/solana/generated/mpl-core/types/addAssetsToGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/addBlocker.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/addCollectionsToGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/addGroupsToGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/agentIdentity.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/agentIdentityInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/agentIdentityUpdateInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/appData.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/appDataInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/appDataUpdateInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/attribute.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/attributes.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/authority.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/autograph.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/autographSignature.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/bubblegumV2.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/burnDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/closeGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/compressionProof.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/creator.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/dataSection.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/dataSectionInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/dataSectionUpdateInfo.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/dataState.js +0 -23
- package/lib/esm/solana/generated/mpl-core/types/edition.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/externalCheckResult.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapter.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterInitInfo.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterKey.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterSchema.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterType.js +0 -28
- package/lib/esm/solana/generated/mpl-core/types/externalPluginAdapterUpdateInfo.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/externalRegistryRecord.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/externalValidationResult.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/extraAccount.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/freezeDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/freezeExecute.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/groups.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/hashablePluginSchema.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/hashedAssetSchema.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/hookableLifecycleEvent.js +0 -26
- package/lib/esm/solana/generated/mpl-core/types/immutableMetadata.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/index.js +0 -89
- package/lib/esm/solana/generated/mpl-core/types/key.js +0 -28
- package/lib/esm/solana/generated/mpl-core/types/lifecycleHook.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/lifecycleHookInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/lifecycleHookUpdateInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/linkedAppData.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/linkedAppDataInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/linkedAppDataUpdateInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/linkedDataKey.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/linkedLifecycleHook.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/linkedLifecycleHookInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/linkedLifecycleHookUpdateInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/masterEdition.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/oracle.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/oracleInitInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/oracleUpdateInfo.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/oracleValidation.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/permanentBurnDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/permanentFreezeDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/permanentFreezeExecute.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/permanentTransferDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/plugin.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/pluginAuthorityPair.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/pluginType.js +0 -40
- package/lib/esm/solana/generated/mpl-core/types/registryRecord.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/relationshipKind.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/removeAssetsFromGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/removeCollectionsFromGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/removeGroupsFromGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/royalties.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/ruleSet.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/seed.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/transferDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/updateAuthority.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/updateDelegate.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/updateGroupV1Args.js +0 -17
- package/lib/esm/solana/generated/mpl-core/types/updateType.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/validationResult.js +0 -25
- package/lib/esm/solana/generated/mpl-core/types/validationResultsOffset.js +0 -24
- package/lib/esm/solana/generated/mpl-core/types/verifiedCreators.js +0 -18
- package/lib/esm/solana/generated/mpl-core/types/verifiedCreatorsSignature.js +0 -17
- package/lib/esm/utils/ao.js +0 -421
- package/lib/esm/utils/arweave.js +0 -271
- package/lib/esm/utils/processes.js +0 -167
- package/lib/esm/web/index.js +0 -20
- package/lib/types/common/ant-versions.d.ts +0 -39
- package/lib/types/common/arweave.d.ts +0 -17
- package/lib/types/common/contracts/ao-process.d.ts +0 -33
- package/lib/types/common/hyperbeam/hb.d.ts +0 -88
- package/lib/types/common/marketplace.d.ts +0 -556
- package/lib/types/common/turbo.d.ts +0 -61
- package/lib/types/node/index.d.ts +0 -20
- package/lib/types/solana/generated/ant/events/aclEntryAddedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/aclEntryRemovedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/antMetadataUpdatedEvent.d.ts +0 -28
- package/lib/types/solana/generated/ant/events/antReconciledEvent.d.ts +0 -28
- package/lib/types/solana/generated/ant/events/antTransferredEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/attributesClearedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/attributesSyncedEvent.d.ts +0 -24
- package/lib/types/solana/generated/ant/events/controllerAddedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/controllerRemovedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/index.d.ts +0 -15
- package/lib/types/solana/generated/ant/events/recordMetadataPrunedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/recordMetadataRemovedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/recordMetadataUpdatedEvent.d.ts +0 -28
- package/lib/types/solana/generated/ant/events/recordRemovedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant/events/recordSetEvent.d.ts +0 -34
- package/lib/types/solana/generated/ant/events/recordTransferredEvent.d.ts +0 -30
- package/lib/types/solana/generated/ant-escrow/events/escrowCancelledEvent.d.ts +0 -28
- package/lib/types/solana/generated/ant-escrow/events/escrowClaimedEvent.d.ts +0 -32
- package/lib/types/solana/generated/ant-escrow/events/escrowDepositedEvent.d.ts +0 -36
- package/lib/types/solana/generated/ant-escrow/events/escrowRecipientUpdatedEvent.d.ts +0 -26
- package/lib/types/solana/generated/ant-escrow/events/index.d.ts +0 -4
- package/lib/types/solana/generated/arns/events/demandFactorUpdatedEvent.d.ts +0 -28
- package/lib/types/solana/generated/arns/events/index.d.ts +0 -12
- package/lib/types/solana/generated/arns/events/leaseExtendedEvent.d.ts +0 -32
- package/lib/types/solana/generated/arns/events/namePurchasedEvent.d.ts +0 -34
- package/lib/types/solana/generated/arns/events/nameReassignedEvent.d.ts +0 -28
- package/lib/types/solana/generated/arns/events/nameReleasedEvent.d.ts +0 -24
- package/lib/types/solana/generated/arns/events/nameReservedEvent.d.ts +0 -28
- package/lib/types/solana/generated/arns/events/nameUnreservedEvent.d.ts +0 -24
- package/lib/types/solana/generated/arns/events/nameUpgradedEvent.d.ts +0 -28
- package/lib/types/solana/generated/arns/events/namesPrunedEvent.d.ts +0 -26
- package/lib/types/solana/generated/arns/events/reservedNameClaimedEvent.d.ts +0 -24
- package/lib/types/solana/generated/arns/events/returnedNamePurchasedEvent.d.ts +0 -32
- package/lib/types/solana/generated/arns/events/undernameIncreasedEvent.d.ts +0 -32
- package/lib/types/solana/generated/core/events/configUpdatedEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/coreMigrationFinalizedEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/index.d.ts +0 -13
- package/lib/types/solana/generated/core/events/primaryNameRemovedEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/primaryNameRequestExpiredEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/primaryNameRequestedEvent.d.ts +0 -30
- package/lib/types/solana/generated/core/events/primaryNameSetEvent.d.ts +0 -24
- package/lib/types/solana/generated/core/events/supplyFinalizedEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/transferEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/vaultCreatedEvent.d.ts +0 -28
- package/lib/types/solana/generated/core/events/vaultExtendedEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/vaultIncreasedEvent.d.ts +0 -28
- package/lib/types/solana/generated/core/events/vaultReleasedEvent.d.ts +0 -26
- package/lib/types/solana/generated/core/events/vaultRevokedEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/allowlistToggledEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/delegateAllowlistedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/delegationClosedEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/delegationDecreasedEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/delegationEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/epochClosedEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/epochCreatedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/epochDistributedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/epochPrescribedEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/epochWeightsTalliedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/epochsToggledEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/fundingPlanAppliedEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/garMigrationFinalizedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/gatewayFinalizedEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/gatewayJoinedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/gatewayLeavingEvent.d.ts +0 -22
- package/lib/types/solana/generated/gar/events/gatewayPrunedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/gatewaySettingsUpdatedEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/index.d.ts +0 -30
- package/lib/types/solana/generated/gar/events/instantWithdrawalEvent.d.ts +0 -30
- package/lib/types/solana/generated/gar/events/observationSubmittedEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/observerAddressUpdatedEvent.d.ts +0 -24
- package/lib/types/solana/generated/gar/events/operatorStakeIncreasedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/redelegationEvent.d.ts +0 -30
- package/lib/types/solana/generated/gar/events/residueVaultCreatedEvent.d.ts +0 -30
- package/lib/types/solana/generated/gar/events/rewardsCompoundedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/stakePaymentEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/withdrawalCancelledEvent.d.ts +0 -30
- package/lib/types/solana/generated/gar/events/withdrawalClaimedEvent.d.ts +0 -26
- package/lib/types/solana/generated/gar/events/withdrawalCreatedEvent.d.ts +0 -28
- package/lib/types/solana/generated/gar/events/withdrawalPaymentEvent.d.ts +0 -28
- package/lib/types/solana/generated/mpl-core/accounts/assetV1.d.ts +0 -37
- package/lib/types/solana/generated/mpl-core/accounts/collectionV1.d.ts +0 -37
- package/lib/types/solana/generated/mpl-core/accounts/hashedAssetV1.d.ts +0 -30
- package/lib/types/solana/generated/mpl-core/accounts/index.d.ts +0 -12
- package/lib/types/solana/generated/mpl-core/accounts/pluginHeaderV1.d.ts +0 -30
- package/lib/types/solana/generated/mpl-core/accounts/pluginRegistryV1.d.ts +0 -31
- package/lib/types/solana/generated/mpl-core/errors/index.d.ts +0 -8
- package/lib/types/solana/generated/mpl-core/errors/mplCore.d.ts +0 -133
- package/lib/types/solana/generated/mpl-core/index.d.ts +0 -8
- package/lib/types/solana/generated/mpl-core/instructions/addCollectionExternalPluginAdapterV1.d.ts +0 -56
- package/lib/types/solana/generated/mpl-core/instructions/addCollectionPluginV1.d.ts +0 -59
- package/lib/types/solana/generated/mpl-core/instructions/addExternalPluginAdapterV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/addPluginV1.d.ts +0 -63
- package/lib/types/solana/generated/mpl-core/instructions/approveCollectionPluginAuthorityV1.d.ts +0 -59
- package/lib/types/solana/generated/mpl-core/instructions/approvePluginAuthorityV1.d.ts +0 -63
- package/lib/types/solana/generated/mpl-core/instructions/burnCollectionV1.d.ts +0 -52
- package/lib/types/solana/generated/mpl-core/instructions/burnV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/collect.d.ts +0 -39
- package/lib/types/solana/generated/mpl-core/instructions/compressV1.d.ts +0 -55
- package/lib/types/solana/generated/mpl-core/instructions/createCollectionV1.d.ts +0 -58
- package/lib/types/solana/generated/mpl-core/instructions/createCollectionV2.d.ts +0 -61
- package/lib/types/solana/generated/mpl-core/instructions/createV1.d.ts +0 -77
- package/lib/types/solana/generated/mpl-core/instructions/createV2.d.ts +0 -80
- package/lib/types/solana/generated/mpl-core/instructions/decompressV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/executeV1.d.ts +0 -63
- package/lib/types/solana/generated/mpl-core/instructions/index.d.ts +0 -40
- package/lib/types/solana/generated/mpl-core/instructions/removeCollectionExternalPluginAdapterV1.d.ts +0 -56
- package/lib/types/solana/generated/mpl-core/instructions/removeCollectionPluginV1.d.ts +0 -56
- package/lib/types/solana/generated/mpl-core/instructions/removeExternalPluginAdapterV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/removePluginV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/revokeCollectionPluginAuthorityV1.d.ts +0 -56
- package/lib/types/solana/generated/mpl-core/instructions/revokePluginAuthorityV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/transferV1.d.ts +0 -64
- package/lib/types/solana/generated/mpl-core/instructions/updateCollectionExternalPluginAdapterV1.d.ts +0 -59
- package/lib/types/solana/generated/mpl-core/instructions/updateCollectionInfoV1.d.ts +0 -47
- package/lib/types/solana/generated/mpl-core/instructions/updateCollectionPluginV1.d.ts +0 -56
- package/lib/types/solana/generated/mpl-core/instructions/updateCollectionV1.d.ts +0 -62
- package/lib/types/solana/generated/mpl-core/instructions/updateExternalPluginAdapterV1.d.ts +0 -63
- package/lib/types/solana/generated/mpl-core/instructions/updatePluginV1.d.ts +0 -60
- package/lib/types/solana/generated/mpl-core/instructions/updateV1.d.ts +0 -66
- package/lib/types/solana/generated/mpl-core/instructions/updateV2.d.ts +0 -70
- package/lib/types/solana/generated/mpl-core/instructions/writeCollectionExternalPluginAdapterDataV1.d.ts +0 -63
- package/lib/types/solana/generated/mpl-core/instructions/writeExternalPluginAdapterDataV1.d.ts +0 -67
- package/lib/types/solana/generated/mpl-core/program-address.d.ts +0 -7
- package/lib/types/solana/generated/mpl-core/types/addAssetsToGroupV1Args.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/addBlocker.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/addCollectionsToGroupV1Args.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/addGroupsToGroupV1Args.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/agentIdentity.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/agentIdentityInitInfo.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/agentIdentityUpdateInfo.d.ts +0 -20
- package/lib/types/solana/generated/mpl-core/types/appData.d.ts +0 -20
- package/lib/types/solana/generated/mpl-core/types/appDataInitInfo.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/appDataUpdateInfo.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/attribute.d.ts +0 -16
- package/lib/types/solana/generated/mpl-core/types/attributes.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/authority.d.ts +0 -29
- package/lib/types/solana/generated/mpl-core/types/autograph.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/autographSignature.d.ts +0 -16
- package/lib/types/solana/generated/mpl-core/types/bubblegumV2.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/burnDelegate.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/closeGroupV1Args.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/compressionProof.d.ts +0 -28
- package/lib/types/solana/generated/mpl-core/types/creator.d.ts +0 -16
- package/lib/types/solana/generated/mpl-core/types/dataSection.d.ts +0 -20
- package/lib/types/solana/generated/mpl-core/types/dataSectionInitInfo.d.ts +0 -20
- package/lib/types/solana/generated/mpl-core/types/dataSectionUpdateInfo.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/dataState.d.ts +0 -16
- package/lib/types/solana/generated/mpl-core/types/edition.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/externalCheckResult.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/externalPluginAdapter.d.ts +0 -66
- package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterInitInfo.d.ts +0 -66
- package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterKey.d.ts +0 -64
- package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterSchema.d.ts +0 -17
- package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterType.d.ts +0 -21
- package/lib/types/solana/generated/mpl-core/types/externalPluginAdapterUpdateInfo.d.ts +0 -59
- package/lib/types/solana/generated/mpl-core/types/externalRegistryRecord.d.ts +0 -28
- package/lib/types/solana/generated/mpl-core/types/externalValidationResult.d.ts +0 -17
- package/lib/types/solana/generated/mpl-core/types/extraAccount.d.ts +0 -86
- package/lib/types/solana/generated/mpl-core/types/freezeDelegate.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/freezeExecute.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/groups.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/hashablePluginSchema.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/hashedAssetSchema.d.ts +0 -16
- package/lib/types/solana/generated/mpl-core/types/hookableLifecycleEvent.d.ts +0 -19
- package/lib/types/solana/generated/mpl-core/types/immutableMetadata.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/index.d.ts +0 -89
- package/lib/types/solana/generated/mpl-core/types/key.d.ts +0 -21
- package/lib/types/solana/generated/mpl-core/types/lifecycleHook.d.ts +0 -24
- package/lib/types/solana/generated/mpl-core/types/lifecycleHookInitInfo.d.ts +0 -28
- package/lib/types/solana/generated/mpl-core/types/lifecycleHookUpdateInfo.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/linkedAppData.d.ts +0 -20
- package/lib/types/solana/generated/mpl-core/types/linkedAppDataInitInfo.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/linkedAppDataUpdateInfo.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/linkedDataKey.d.ts +0 -31
- package/lib/types/solana/generated/mpl-core/types/linkedLifecycleHook.d.ts +0 -24
- package/lib/types/solana/generated/mpl-core/types/linkedLifecycleHookInitInfo.d.ts +0 -28
- package/lib/types/solana/generated/mpl-core/types/linkedLifecycleHookUpdateInfo.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/masterEdition.d.ts +0 -21
- package/lib/types/solana/generated/mpl-core/types/oracle.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/oracleInitInfo.d.ts +0 -26
- package/lib/types/solana/generated/mpl-core/types/oracleUpdateInfo.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/oracleValidation.d.ts +0 -35
- package/lib/types/solana/generated/mpl-core/types/permanentBurnDelegate.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/permanentFreezeDelegate.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/permanentFreezeExecute.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/permanentTransferDelegate.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/plugin.d.ts +0 -150
- package/lib/types/solana/generated/mpl-core/types/pluginAuthorityPair.d.ts +0 -20
- package/lib/types/solana/generated/mpl-core/types/pluginType.d.ts +0 -33
- package/lib/types/solana/generated/mpl-core/types/registryRecord.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/relationshipKind.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/removeAssetsFromGroupV1Args.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/removeCollectionsFromGroupV1Args.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/removeGroupsFromGroupV1Args.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/royalties.d.ts +0 -22
- package/lib/types/solana/generated/mpl-core/types/ruleSet.d.ts +0 -27
- package/lib/types/solana/generated/mpl-core/types/seed.d.ts +0 -36
- package/lib/types/solana/generated/mpl-core/types/transferDelegate.d.ts +0 -13
- package/lib/types/solana/generated/mpl-core/types/updateAuthority.d.ts +0 -27
- package/lib/types/solana/generated/mpl-core/types/updateDelegate.d.ts +0 -15
- package/lib/types/solana/generated/mpl-core/types/updateGroupV1Args.d.ts +0 -19
- package/lib/types/solana/generated/mpl-core/types/updateType.d.ts +0 -17
- package/lib/types/solana/generated/mpl-core/types/validationResult.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/validationResultsOffset.d.ts +0 -33
- package/lib/types/solana/generated/mpl-core/types/verifiedCreators.d.ts +0 -18
- package/lib/types/solana/generated/mpl-core/types/verifiedCreatorsSignature.d.ts +0 -16
- package/lib/types/utils/ao.d.ts +0 -80
- package/lib/types/utils/arweave.d.ts +0 -79
- package/lib/types/utils/processes.d.ts +0 -39
- package/lib/types/web/index.d.ts +0 -20
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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
|
+
/**
|
|
17
|
+
* Solana implementation of ARIOWrite interface.
|
|
3
18
|
*
|
|
4
19
|
* Extends SolanaARIOReadable with write operations that build and send
|
|
5
20
|
* Solana transactions via Codama-generated instruction builders.
|
|
@@ -20,11 +35,35 @@
|
|
|
20
35
|
*/
|
|
21
36
|
import { type Address, type Instruction } from '@solana/kit';
|
|
22
37
|
import type { ILogger } from '../common/logger.js';
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
38
|
+
import type { MessageResult, WriteOptions } from '../types/common.js';
|
|
39
|
+
import type { ArNSPurchaseParams, BuyRecordParams, CreateVaultParams, DelegateStakeParams, ExtendLeaseParams, ExtendVaultParams, IncreaseUndernameLimitParams, IncreaseVaultParams, JoinNetworkParams, RedelegateStakeParams, RevokeVaultParams, UpdateGatewaySettingsParams, VaultedTransferParams } from '../types/io.js';
|
|
25
40
|
import type { mARIOToken } from '../types/token.js';
|
|
41
|
+
import { deserializeEpochSettingsFull } from './deserialize.js';
|
|
26
42
|
import { SolanaARIOReadable } from './io-readable.js';
|
|
27
43
|
import type { SolanaRpcSubscriptions, SolanaSigner, SolanaWriteConfig } from './types.js';
|
|
44
|
+
/**
|
|
45
|
+
* Pick the swapped-gateway operator that `finalize_gone` needs as a writable
|
|
46
|
+
* `remaining_accounts[0]`.
|
|
47
|
+
*
|
|
48
|
+
* `finalize_gone` reclaims a gateway's slot from the compact GatewayRegistry by
|
|
49
|
+
* moving the LAST active slot into it and rewriting that swapped gateway's
|
|
50
|
+
* stored `registry_index`. When the finalized gateway is NOT already the last
|
|
51
|
+
* slot, the on-chain handler requires the swapped Gateway PDA (writable) at
|
|
52
|
+
* `remaining_accounts[0]`; when it IS the last slot, no swap occurs and no
|
|
53
|
+
* extra account is needed. See
|
|
54
|
+
* `programs/ario-gar/src/instructions/gateway.rs::finalize_gone`.
|
|
55
|
+
*
|
|
56
|
+
* `registryAddresses` MUST be the active registry operator addresses in slot
|
|
57
|
+
* order (`getRegistryGatewayAddresses()` — length === on-chain
|
|
58
|
+
* `registry.count`), so `registryAddresses[length - 1]` is exactly the
|
|
59
|
+
* `registry.gateways[count - 1].address` the on-chain swap reads.
|
|
60
|
+
*
|
|
61
|
+
* @returns the swapped gateway's operator address, or `null` when the finalized
|
|
62
|
+
* gateway already occupies the last slot.
|
|
63
|
+
* @throws if `registryIndex` is outside the active registry count (mirrors the
|
|
64
|
+
* on-chain `index < registry.count` guard, surfacing a stale index early).
|
|
65
|
+
*/
|
|
66
|
+
export declare function selectFinalizeGoneSwapOperator(registryIndex: number, registryAddresses: string[]): string | null;
|
|
28
67
|
/**
|
|
29
68
|
* Split a primary name into its undername + base parts using the same rule
|
|
30
69
|
* as the on-chain `splitn(2, '_')` in `programs/ario-core/src/instructions/primary_name.rs`:
|
|
@@ -82,6 +121,102 @@ export declare function buildObservationBitmap(registryAddresses: string[], fail
|
|
|
82
121
|
* auditability that the field exists for.
|
|
83
122
|
*/
|
|
84
123
|
export declare function encodeReportTxId(reportTxId: string | undefined): Buffer;
|
|
124
|
+
/**
|
|
125
|
+
* Max `compound_delegation_rewards` instructions packed into one batched tx.
|
|
126
|
+
* Each is a SEPARATE instruction carrying a gateway + delegation + delegator
|
|
127
|
+
* account, so — unlike the single-ix `remaining_accounts` lifecycle batch (see
|
|
128
|
+
* `MAX_LIFECYCLE_BATCH`) and unlike prescribe (which uses an ALT) — the per-item
|
|
129
|
+
* tx cost is high and there is nothing to compress. Cap low enough that a full
|
|
130
|
+
* worst-case batch (all-distinct gateways → no account dedup) stays under
|
|
131
|
+
* Solana's 1232-byte transaction limit. A full batch of 12 overflows it and
|
|
132
|
+
* wedged epoch progression on staging-V2 (the RPC rejected the tx — observed at
|
|
133
|
+
* 1928B base64, well over the 1232B raw cap). Exported so the regression test in
|
|
134
|
+
* `compound-crank.test.ts` asserts this invariant against the live constant.
|
|
135
|
+
*/
|
|
136
|
+
export declare const MAX_COMPOUND_BATCH = 6;
|
|
137
|
+
/** The single on-chain action a {@link SolanaARIOWriteable.crankEpochStep} call performed. */
|
|
138
|
+
export type CrankAction = 'create' | 'tally' | 'prescribe' | 'distribute' | 'compound' | 'update_demand_factor' | 'prune_returned_names' | 'close_observation' | 'close' | 'idle';
|
|
139
|
+
/** Options for {@link SolanaARIOWriteable.crankEpochStep}. */
|
|
140
|
+
export interface CrankEpochStepOptions {
|
|
141
|
+
/** Gateways per tally/distribute batch. Default 30. */
|
|
142
|
+
batchSize?: number;
|
|
143
|
+
/**
|
|
144
|
+
* NameRegistry account for the name-prescription leg. Defaults to the
|
|
145
|
+
* registry derived from the configured ArNS program. Pass `null` to disable
|
|
146
|
+
* name prescription entirely.
|
|
147
|
+
*/
|
|
148
|
+
nameRegistryAccount?: Address | null;
|
|
149
|
+
/** Close fully-distributed epochs older than `epochRetention`. Default true. */
|
|
150
|
+
enableClose?: boolean;
|
|
151
|
+
/** Epochs of retention before an epoch may be closed (GAR-006). Default 7. */
|
|
152
|
+
epochRetention?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Compound pending delegate rewards (settle the reward-per-share accumulator
|
|
155
|
+
* into delegated stake) once the live epoch is fully distributed, so the next
|
|
156
|
+
* epoch's tally weights the compounded stake. Default true. The delegate
|
|
157
|
+
* rewards are correct in the accumulator regardless — this only materializes
|
|
158
|
+
* them on-chain. Each step compounds one batch; runs only in the otherwise-
|
|
159
|
+
* idle tail (never during tally/distribute).
|
|
160
|
+
*/
|
|
161
|
+
enableCompound?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Skip compounding delegations whose pending reward is at/below this (mARIO).
|
|
164
|
+
* Avoids dust compounds that only advance `reward_debt`. Default 0.
|
|
165
|
+
*/
|
|
166
|
+
compoundMinPendingRewards?: number;
|
|
167
|
+
/**
|
|
168
|
+
* Roll the demand factor forward when its (wall-clock) period has elapsed.
|
|
169
|
+
* Idempotent — only sends a tx when the stored period is behind. Pricing is
|
|
170
|
+
* always lazily correct without this; it keeps the STORED factor (and reads
|
|
171
|
+
* between buys) current. Default true. Runs only in the idle tail.
|
|
172
|
+
*/
|
|
173
|
+
enableDemandFactorRoll?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Prune expired ReturnedName PDAs (auction window elapsed) as part of the
|
|
176
|
+
* crank. Default true. Runs whenever the epoch lifecycle is otherwise idle
|
|
177
|
+
* (the live observation window AND the post-distribution tail), one batch per
|
|
178
|
+
* step. It scans the ReturnedName PDAs DIRECTLY (via getExpiredReturnedNames)
|
|
179
|
+
* and does NOT consult `config.next_returned_names_prune_timestamp` — that
|
|
180
|
+
* hint is only set for on-chain returns and is never updated for imported
|
|
181
|
+
* returned names, so trusting it strands imported auctions forever.
|
|
182
|
+
*/
|
|
183
|
+
enablePrune?: boolean;
|
|
184
|
+
/** ReturnedName PDAs to prune per tx (u8, max 255). Default 15. */
|
|
185
|
+
pruneBatchSize?: number;
|
|
186
|
+
/**
|
|
187
|
+
* Minimum wall-clock gap between returned-name prune SCANS (ms). The scan is a
|
|
188
|
+
* `getProgramAccounts` over ReturnedName PDAs, so this throttles it below the
|
|
189
|
+
* crank poll rate. Default 60_000 (1 min). Set 0 to scan every step (tests).
|
|
190
|
+
*/
|
|
191
|
+
pruneScanIntervalMs?: number;
|
|
192
|
+
/** Unix seconds; defaults to the wall clock. Injectable for testing. */
|
|
193
|
+
now?: number;
|
|
194
|
+
}
|
|
195
|
+
/** Result of a single {@link SolanaARIOWriteable.crankEpochStep} call. */
|
|
196
|
+
export interface CrankEpochStepResult {
|
|
197
|
+
/** The action performed (or `'idle'` when nothing was due). */
|
|
198
|
+
action: CrankAction;
|
|
199
|
+
/** The epoch the action targeted (absent for `'idle'`). */
|
|
200
|
+
epochIndex?: number;
|
|
201
|
+
/** Confirmed transaction signature, when an action was submitted. */
|
|
202
|
+
txId?: string;
|
|
203
|
+
/** Batch progress for `'tally'` / `'distribute'`. */
|
|
204
|
+
progress?: {
|
|
205
|
+
index: number;
|
|
206
|
+
total: number;
|
|
207
|
+
};
|
|
208
|
+
/** For `action: 'idle'`, why nothing was done. */
|
|
209
|
+
reason?: 'epochs_disabled' | 'waiting_for_genesis' | 'waiting_for_epoch' | 'waiting_for_observations' | 'epoch_complete';
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Detect the GAR `InvalidGatewayAccount` error by Anchor error name/message
|
|
213
|
+
* (walking the cause chain + `context.logs`), NOT by numeric code — codes are
|
|
214
|
+
* `6000 + enum-index` and shift across program versions, but the name and
|
|
215
|
+
* message are stable. `prescribe_epoch` raises this when a supplied observer
|
|
216
|
+
* Gateway PDA is missing/spoofed (e.g. a predicted observer left the registry
|
|
217
|
+
* between prediction and tx landing).
|
|
218
|
+
*/
|
|
219
|
+
export declare function isInvalidGatewayAccountError(error: unknown): boolean;
|
|
85
220
|
export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
86
221
|
protected readonly signer: SolanaSigner;
|
|
87
222
|
protected readonly rpcSubscriptions: SolanaRpcSubscriptions;
|
|
@@ -109,6 +244,17 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
109
244
|
* (codama only reads the named keys from `input`).
|
|
110
245
|
*/
|
|
111
246
|
private withArnsDefaults;
|
|
247
|
+
/**
|
|
248
|
+
* If the on-chain ArnsRecord for `name` hasn't been migrated to the
|
|
249
|
+
* current schema (name_hash at offset 8 doesn't match the expected
|
|
250
|
+
* hash), return a `migrate_arns_record` instruction that must be
|
|
251
|
+
* prepended to any operation referencing the record with PDA seed
|
|
252
|
+
* verification.
|
|
253
|
+
*
|
|
254
|
+
* Returns an empty array when the record is already up-to-date or
|
|
255
|
+
* doesn't exist.
|
|
256
|
+
*/
|
|
257
|
+
private _buildMigrateArnsRecordIxIfNeeded;
|
|
112
258
|
/** Inject ARIO core default PDAs (config). */
|
|
113
259
|
private withCoreDefaults;
|
|
114
260
|
/** Inject GAR default PDAs (settings, epochSettings, registry). */
|
|
@@ -118,38 +264,38 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
118
264
|
transfer(params: {
|
|
119
265
|
target: string;
|
|
120
266
|
qty: number | mARIOToken;
|
|
121
|
-
}, _options?: WriteOptions): Promise<
|
|
122
|
-
vaultedTransfer(params:
|
|
123
|
-
createVault(params:
|
|
267
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
268
|
+
vaultedTransfer(params: VaultedTransferParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
269
|
+
createVault(params: CreateVaultParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
124
270
|
/** Read VaultCounter's next_id (returns 0n if not yet created). */
|
|
125
271
|
private getNextVaultId;
|
|
126
|
-
extendVault(params:
|
|
127
|
-
increaseVault(params:
|
|
128
|
-
revokeVault(params:
|
|
129
|
-
joinNetwork(params:
|
|
130
|
-
leaveNetwork(_options?: WriteOptions): Promise<
|
|
131
|
-
updateGatewaySettings(params:
|
|
272
|
+
extendVault(params: ExtendVaultParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
273
|
+
increaseVault(params: IncreaseVaultParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
274
|
+
revokeVault(params: RevokeVaultParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
275
|
+
joinNetwork(params: JoinNetworkParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
276
|
+
leaveNetwork(_options?: WriteOptions): Promise<MessageResult>;
|
|
277
|
+
updateGatewaySettings(params: UpdateGatewaySettingsParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
132
278
|
increaseOperatorStake(params: {
|
|
133
279
|
increaseQty: number | mARIOToken;
|
|
134
|
-
}, _options?: WriteOptions): Promise<
|
|
280
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
135
281
|
decreaseOperatorStake(params: {
|
|
136
282
|
decreaseQty: number | mARIOToken;
|
|
137
283
|
instant?: boolean;
|
|
138
|
-
}, _options?: WriteOptions): Promise<
|
|
139
|
-
delegateStake(params:
|
|
284
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
285
|
+
delegateStake(params: DelegateStakeParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
140
286
|
decreaseDelegateStake(params: {
|
|
141
287
|
target: string;
|
|
142
288
|
decreaseQty: number | mARIOToken;
|
|
143
289
|
instant?: boolean;
|
|
144
|
-
}, _options?: WriteOptions): Promise<
|
|
290
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
145
291
|
instantWithdrawal(params: {
|
|
146
292
|
gatewayAddress?: string;
|
|
147
293
|
vaultId: string;
|
|
148
|
-
}, _options?: WriteOptions): Promise<
|
|
294
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
149
295
|
cancelWithdrawal(params: {
|
|
150
296
|
gatewayAddress?: string;
|
|
151
297
|
vaultId: string;
|
|
152
|
-
}, _options?: WriteOptions): Promise<
|
|
298
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
153
299
|
saveObservations(params: {
|
|
154
300
|
reportTxId: string;
|
|
155
301
|
failedGateways: string[];
|
|
@@ -157,9 +303,9 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
157
303
|
/** Raw 256-byte gateway results bitfield (if provided, overrides failedGateways) */
|
|
158
304
|
gatewayResults?: Uint8Array;
|
|
159
305
|
gatewayCount?: number;
|
|
160
|
-
}, _options?: WriteOptions): Promise<
|
|
161
|
-
redelegateStake(params:
|
|
162
|
-
buyRecord(params:
|
|
306
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
307
|
+
redelegateStake(params: RedelegateStakeParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
308
|
+
buyRecord(params: BuyRecordParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
163
309
|
/**
|
|
164
310
|
* Resolve a `FundingPlan` for a fee-paying ArNS ix. When `params.sources`
|
|
165
311
|
* is set, use it verbatim (caller-supplied plan); otherwise discover the
|
|
@@ -197,24 +343,22 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
197
343
|
*/
|
|
198
344
|
private _materializeFundingPlan;
|
|
199
345
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
346
|
+
* Simulate the on-chain `get_token_cost` instruction and return the exact
|
|
347
|
+
* cost as a `bigint` (mARIO). This guarantees byte-exact agreement with the
|
|
348
|
+
* on-chain pricing math, avoiding integer-division rounding divergences
|
|
349
|
+
* that plagued the previous client-side reimplementation.
|
|
203
350
|
*
|
|
204
|
-
* The
|
|
205
|
-
*
|
|
206
|
-
* live demand-factor and verifies sum(sources) == cost, so an overestimate
|
|
207
|
-
* fails fast with `FundingPlanAmountMismatch`. Callers should retry with a
|
|
208
|
-
* fresh estimate on that error.
|
|
351
|
+
* The program writes a LE-u64 cost into the transaction's return data;
|
|
352
|
+
* we parse it from the simulation result.
|
|
209
353
|
*/
|
|
210
|
-
private
|
|
354
|
+
private _simulateTokenCost;
|
|
211
355
|
private arnsConfigPda;
|
|
212
356
|
private demandFactorPda;
|
|
213
357
|
private nameRegistryPda;
|
|
214
|
-
upgradeRecord(params:
|
|
358
|
+
upgradeRecord(params: ArNSPurchaseParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
215
359
|
syncAttributes(params: {
|
|
216
360
|
name: string;
|
|
217
|
-
}, _options?: WriteOptions): Promise<
|
|
361
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
218
362
|
/**
|
|
219
363
|
* Build a `sync_attributes` instruction for `name` IFF the signer is
|
|
220
364
|
* the current MPL Core asset owner. Returns `null` otherwise.
|
|
@@ -250,8 +394,8 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
250
394
|
private _buildSyncAttributesIxUnconditional;
|
|
251
395
|
/** Pure builder; no RPC. Used by both gated + unconditional helpers. */
|
|
252
396
|
private _buildSyncAttributesIxFor;
|
|
253
|
-
extendLease(params:
|
|
254
|
-
increaseUndernameLimit(params:
|
|
397
|
+
extendLease(params: ExtendLeaseParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
398
|
+
increaseUndernameLimit(params: IncreaseUndernameLimitParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
255
399
|
/**
|
|
256
400
|
* Shared dispatch helper for the 3 manage variants (upgrade / extend /
|
|
257
401
|
* increaseUndername). They share the same account shape per the
|
|
@@ -262,22 +406,43 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
262
406
|
*/
|
|
263
407
|
private _buildManageStakeIx;
|
|
264
408
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
409
|
+
* If the signer already has a primary name set, build the instruction(s)
|
|
410
|
+
* needed to remove it so they can be prepended to a request/set tx —
|
|
411
|
+
* enabling single-tx "change primary name" flows.
|
|
412
|
+
*
|
|
413
|
+
* Returns an empty array when the signer has no existing primary name.
|
|
414
|
+
*
|
|
415
|
+
* Throws when the signer has a legacy primary-name state (forward
|
|
416
|
+
* `PrimaryName` PDA exists but its paired `PrimaryNameReverse` PDA does
|
|
417
|
+
* NOT). Both `remove_primary_name` AND `request_and_set_primary_name`
|
|
418
|
+
* require the reverse PDA on-chain — the latter rejects with
|
|
419
|
+
* `MustRemoveExistingPrimaryName` (0x1786, code 6022) any time a
|
|
420
|
+
* forward record already exists for the signer, regardless of reverse
|
|
421
|
+
* state. Silently skipping the remove would queue a tx guaranteed to
|
|
422
|
+
* fail with that opaque error. Surfacing it at the client with a clear
|
|
423
|
+
* remediation pointer is the only safe behavior.
|
|
424
|
+
*
|
|
425
|
+
* The legacy state should not exist on any cluster post-snapshot/import
|
|
426
|
+
* PR #159 (which emits PrimaryNameReverse in lockstep with PrimaryName)
|
|
427
|
+
* — it's a relic of pre-#159 imports. Operators on affected clusters
|
|
428
|
+
* must run `yarn workspace @ar-io/migration-import backfill:primary-name-reverse`
|
|
429
|
+
* (in the solana-ar-io repo) before this method can succeed.
|
|
267
430
|
*/
|
|
268
|
-
private
|
|
431
|
+
private _buildRemoveExistingPrimaryNameIxs;
|
|
269
432
|
/**
|
|
270
433
|
* Build the `remaining_accounts` slice + the `antProgramId` arg the
|
|
271
434
|
* four ario-core primary-name instructions consume. Sprint 2/5
|
|
272
435
|
* reshape (ADR-016): ario-core no longer reads MPL Core asset bytes.
|
|
273
|
-
* Authorization is "caller is the AntRecord
|
|
274
|
-
*
|
|
436
|
+
* Authorization is "caller is the effective AntRecord owner for this
|
|
437
|
+
* name", resolved from the `AntRecord` + `AntConfig` PDAs (freshness-
|
|
438
|
+
* gated against `AntConfig.last_known_owner` — see ario-core BD-097 /
|
|
439
|
+
* BD-109). Both are program-PDA-pinned lookups.
|
|
275
440
|
*
|
|
276
441
|
* Layouts the on-chain handlers expect:
|
|
277
442
|
* request_primary_name: [arnsRecord, demandFactor]
|
|
278
|
-
* request_and_set_primary_name: [arnsRecord, demandFactor, antRecord]
|
|
279
|
-
* approve_primary_name: [arnsRecord, antRecord]
|
|
280
|
-
* remove_primary_name_for_base_name: [arnsRecord, antRecord(@)]
|
|
443
|
+
* request_and_set_primary_name: [arnsRecord, demandFactor, antRecord, antConfig]
|
|
444
|
+
* approve_primary_name: [arnsRecord, antRecord, antConfig]
|
|
445
|
+
* remove_primary_name_for_base_name: [arnsRecord, antRecord(@), antConfig]
|
|
281
446
|
*
|
|
282
447
|
* `antRecord` keys off the undername part for undernames (e.g.
|
|
283
448
|
* "blog_arweave" → AntRecord at "blog") or the canonical "@" sentinel
|
|
@@ -287,14 +452,17 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
287
452
|
*
|
|
288
453
|
* `antProgram` honors ADR-016 / BD-100 pluggability: the asset's
|
|
289
454
|
* `ANT Program` Attributes-plugin trait selects which program owns the
|
|
290
|
-
* AntRecord PDA. Absent / unparseable → canonical fallback.
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
455
|
+
* AntRecord PDA. Absent / unparseable → canonical fallback. The detected
|
|
456
|
+
* trait is untrusted asset/RPC data, so it is honored only when it matches
|
|
457
|
+
* the canonical program or this client's explicitly-configured
|
|
458
|
+
* `this.antProgram`; any other value falls back to the configured program
|
|
459
|
+
* (see the SECURITY note in the body). Both the PDA derivation here and the
|
|
460
|
+
* `ant_program_id` arg the caller passes to the on-chain ix MUST agree (the
|
|
461
|
+
* handler re-derives and rejects mismatches).
|
|
294
462
|
*/
|
|
295
463
|
private _buildPrimaryNameValidationAccounts;
|
|
296
|
-
requestPrimaryName(params:
|
|
297
|
-
setPrimaryName(params:
|
|
464
|
+
requestPrimaryName(params: ArNSPurchaseParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
465
|
+
setPrimaryName(params: ArNSPurchaseParams, _options?: WriteOptions): Promise<MessageResult>;
|
|
298
466
|
/**
|
|
299
467
|
* Build a `request_primary_name_from_funding_plan` or
|
|
300
468
|
* `request_and_set_primary_name_from_funding_plan` ix. Forwards both:
|
|
@@ -317,40 +485,60 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
317
485
|
*
|
|
318
486
|
* Mirrors the on-chain `approve_primary_name` instruction
|
|
319
487
|
* (`programs/ario-core/src/instructions/primary_name.rs`).
|
|
320
|
-
* remaining_accounts: [arns_record(base), ant_record(undername | @)].
|
|
488
|
+
* remaining_accounts: [arns_record(base), ant_record(undername | @), ant_config].
|
|
321
489
|
*/
|
|
322
490
|
approvePrimaryName(params: {
|
|
323
491
|
initiator: Address;
|
|
324
492
|
name: string;
|
|
325
|
-
}, _options?: WriteOptions): Promise<
|
|
493
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
326
494
|
/** Release tokens from an unlocked vault back to the owner. */
|
|
327
495
|
releaseVault(params: {
|
|
328
496
|
vaultId: string;
|
|
329
|
-
}, _options?: WriteOptions): Promise<
|
|
497
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
330
498
|
/** Close an expired primary name request (permissionless — anyone can call). */
|
|
331
499
|
closeExpiredRequest(params: {
|
|
332
500
|
initiator: string;
|
|
333
|
-
}, _options?: WriteOptions): Promise<
|
|
501
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
334
502
|
/** Claim tokens from a completed withdrawal (after lock period). */
|
|
335
503
|
claimWithdrawal(params: {
|
|
336
504
|
withdrawalId: string;
|
|
337
|
-
}, _options?: WriteOptions): Promise<
|
|
505
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
338
506
|
/** Claim delegated stake from a gateway that is leaving the network. */
|
|
339
507
|
claimDelegateFromLeavingGateway(params: {
|
|
340
508
|
gatewayAddress: string;
|
|
341
|
-
}, _options?: WriteOptions): Promise<
|
|
509
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
510
|
+
/**
|
|
511
|
+
* Claim a delegate's stake out of a gateway that has DISABLED delegation
|
|
512
|
+
* (`allow_delegated_staking == false`), moving it into the delegate's own
|
|
513
|
+
* withdrawal vault (WP §6.3 / Fix #6). This is the disabled-gateway analog of
|
|
514
|
+
* {@link claimDelegateFromLeavingGateway}: the on-chain instruction is
|
|
515
|
+
* permissionless, so a cranker can sweep delegates out (the operator cannot
|
|
516
|
+
* re-enable delegation until `total_delegated_stake == 0` and the cooldown
|
|
517
|
+
* elapses). The withdrawal-counter and withdrawal PDAs are seeded by the
|
|
518
|
+
* DELEGATOR, so a cranker must pass that delegate's `delegatorAddress`.
|
|
519
|
+
*
|
|
520
|
+
* @param params.gatewayAddress The gateway whose delegation was disabled.
|
|
521
|
+
* @param params.delegatorAddress The delegate to claim for. Defaults to the
|
|
522
|
+
* signer (self-claim). Pass another address to crank on a delegate's behalf;
|
|
523
|
+
* the signer covers rent (`payer`) but stake still routes to the delegate's
|
|
524
|
+
* own vault (the delegator key is bound by the delegation PDA seeds).
|
|
525
|
+
*/
|
|
526
|
+
claimDelegateFromDisabledGateway(params: {
|
|
527
|
+
gatewayAddress: string;
|
|
528
|
+
delegatorAddress?: string;
|
|
529
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
342
530
|
/** Add an address to the gateway's delegation allowlist. */
|
|
343
531
|
allowDelegate(params: {
|
|
344
532
|
delegate: string;
|
|
345
|
-
}, _options?: WriteOptions): Promise<
|
|
533
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
346
534
|
/** Remove an address from the gateway's delegation allowlist. */
|
|
347
535
|
disallowDelegate(params: {
|
|
348
536
|
delegate: string;
|
|
349
|
-
}, _options?: WriteOptions): Promise<
|
|
537
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
350
538
|
/** Enable or disable the delegation allowlist for the gateway. */
|
|
351
539
|
setAllowlistEnabled(params: {
|
|
352
540
|
enabled: boolean;
|
|
353
|
-
}, _options?: WriteOptions): Promise<
|
|
541
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
354
542
|
/**
|
|
355
543
|
* Buy a name from the returned name auction (Dutch auction with premium).
|
|
356
544
|
*
|
|
@@ -364,21 +552,74 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
364
552
|
type: 'lease' | 'permabuy';
|
|
365
553
|
years?: number;
|
|
366
554
|
processId: string;
|
|
367
|
-
} & Partial<
|
|
555
|
+
} & Partial<ArNSPurchaseParams>, _options?: WriteOptions): Promise<MessageResult>;
|
|
556
|
+
/**
|
|
557
|
+
* Pick a single stake-derived funding source that can cover a returned-name
|
|
558
|
+
* purchase, for the single-source `buy_returned_name_from_*` paths.
|
|
559
|
+
*
|
|
560
|
+
* Returned-name prices decay per slot, so the multi-source funding plan
|
|
561
|
+
* (which pre-commits exact amounts) can't match the execution-time cost. The
|
|
562
|
+
* single-source paths carry no amount — the program draws the live cost — so
|
|
563
|
+
* we only need to pick ONE source with enough stake. We size the pick against
|
|
564
|
+
* the premium-inclusive estimate (an upper bound, since the price only falls
|
|
565
|
+
* from now) and choose the largest matching source. Returns `null` when no
|
|
566
|
+
* single source covers the estimate.
|
|
567
|
+
*/
|
|
568
|
+
private _autoPickReturnedNameStakeSource;
|
|
368
569
|
/** Reassign an ArNS name to a different ANT. */
|
|
369
570
|
reassignName(params: {
|
|
370
571
|
name: string;
|
|
371
572
|
processId: string;
|
|
372
|
-
}, _options?: WriteOptions): Promise<
|
|
573
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
373
574
|
/** Release a permabuy name back to the registry (creates a returned name auction). */
|
|
374
575
|
releaseName(params: {
|
|
375
576
|
name: string;
|
|
376
|
-
}, _options?: WriteOptions): Promise<
|
|
577
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
578
|
+
/**
|
|
579
|
+
* Roll the demand factor forward to the current period. Permissionless and
|
|
580
|
+
* idempotent — a no-op within the same period. Pricing already rolls the
|
|
581
|
+
* factor inline on every buy/extend, so this only refreshes the STORED
|
|
582
|
+
* factor that `getDemandFactor` and between-buy price previews read; a
|
|
583
|
+
* periodic crank (~once per 24h `PERIOD_LENGTH_SECONDS`) keeps it current.
|
|
584
|
+
*/
|
|
585
|
+
updateDemandFactor(_options?: WriteOptions): Promise<MessageResult>;
|
|
586
|
+
/**
|
|
587
|
+
* Materialize a single delegate's pending rewards into their delegated
|
|
588
|
+
* stake by settling the gateway's reward-per-share accumulator.
|
|
589
|
+
* Permissionless — there is no signer beyond the fee payer; `delegator` is
|
|
590
|
+
* only a PDA-derivation seed. Rewards always accrue correctly in the
|
|
591
|
+
* accumulator regardless of this call; compounding makes the on-chain
|
|
592
|
+
* `delegatedStake` reflect them (and earn compound interest in the next
|
|
593
|
+
* epoch's weighting). Idempotent — a no-op once already settled.
|
|
594
|
+
*/
|
|
595
|
+
compoundDelegationRewards(params: {
|
|
596
|
+
gateway: string;
|
|
597
|
+
delegator: string;
|
|
598
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
599
|
+
/**
|
|
600
|
+
* Compound many delegates' rewards in a SINGLE transaction — one
|
|
601
|
+
* `compound_delegation_rewards` instruction per entry. Idempotent and
|
|
602
|
+
* permissionless, so partial batches are safe to retry. Keep each batch
|
|
603
|
+
* within the per-tx account/CU budget; grouping entries that share a gateway
|
|
604
|
+
* lowers the unique-account count (the gateway account is reused across
|
|
605
|
+
* instructions). Typical cranker usage: enumerate with
|
|
606
|
+
* `SolanaARIOReadable.getDelegationsToCompound`, chunk, then call this.
|
|
607
|
+
*/
|
|
608
|
+
compoundDelegationRewardsBatch(delegations: Array<{
|
|
609
|
+
gateway: string;
|
|
610
|
+
delegator: string;
|
|
611
|
+
}>, _options?: WriteOptions): Promise<MessageResult>;
|
|
612
|
+
/**
|
|
613
|
+
* Build a single `compound_delegation_rewards` instruction (shared by the
|
|
614
|
+
* single + batch methods). PDAs are derived under the configured gar program
|
|
615
|
+
* so the program-id override always targets the right cluster.
|
|
616
|
+
*/
|
|
617
|
+
private buildCompoundDelegationRewardsInstruction;
|
|
377
618
|
/**
|
|
378
619
|
* Create a new epoch. Permissionless — anyone can call when the next
|
|
379
620
|
* epoch's start time has arrived.
|
|
380
621
|
*/
|
|
381
|
-
createEpoch(_options?: WriteOptions): Promise<
|
|
622
|
+
createEpoch(_options?: WriteOptions): Promise<MessageResult>;
|
|
382
623
|
/**
|
|
383
624
|
* Tally weights for a batch of gateways. Permissionless — call repeatedly
|
|
384
625
|
* until all gateways are processed. Pass gateway PDAs as
|
|
@@ -387,19 +628,32 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
387
628
|
tallyWeights(params: {
|
|
388
629
|
epochIndex: number;
|
|
389
630
|
gatewayAccounts: Address[];
|
|
390
|
-
}, _options?: WriteOptions): Promise<
|
|
631
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
391
632
|
/**
|
|
392
633
|
* Prescribe observers and names for an epoch. Permissionless — call after
|
|
393
|
-
* weights are tallied.
|
|
394
|
-
*
|
|
634
|
+
* weights are tallied.
|
|
635
|
+
*
|
|
636
|
+
* `gatewayAccounts` MUST be the Gateway PDAs of the SELECTED observers only
|
|
637
|
+
* — at most `epoch_settings.prescribed_observer_count` (≤50), NOT the whole
|
|
638
|
+
* registry. The selection is computed on-chain; mirror it off-chain with
|
|
639
|
+
* {@link predictPrescribedObservers} / {@link getPredictedObserverPDAs} to
|
|
640
|
+
* learn the set. Passing every registry gateway (e.g. via
|
|
641
|
+
* {@link getAllRegistryGatewayPDAs}) hits Solana's `MAX_TX_ACCOUNT_LOCKS = 64`
|
|
642
|
+
* on large registries and the tx fails at pre-flight.
|
|
643
|
+
*
|
|
644
|
+
* The selected PDAs are appended as `remaining_accounts`, followed by the
|
|
645
|
+
* optional `nameRegistryAccount` (must be LAST) which enables the name
|
|
395
646
|
* prescription leg.
|
|
647
|
+
*
|
|
648
|
+
* If a selected gateway leaves between prediction and tx landing, the tx
|
|
649
|
+
* fails with `InvalidGatewayAccount` — retry once with a fresh prediction.
|
|
396
650
|
*/
|
|
397
651
|
prescribeEpoch(params: {
|
|
398
652
|
epochIndex: number;
|
|
399
653
|
gatewayAccounts: Address[];
|
|
400
654
|
/** Optional NameRegistry account — pass to enable name prescription */
|
|
401
655
|
nameRegistryAccount?: Address;
|
|
402
|
-
}, _options?: WriteOptions): Promise<
|
|
656
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
403
657
|
/**
|
|
404
658
|
* Distribute rewards for a completed epoch in batches. Permissionless —
|
|
405
659
|
* call after epoch ends. Gateway PDAs appended as `remaining_accounts`.
|
|
@@ -407,14 +661,14 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
407
661
|
distributeEpoch(params: {
|
|
408
662
|
epochIndex: number;
|
|
409
663
|
gatewayAccounts: Address[];
|
|
410
|
-
}, _options?: WriteOptions): Promise<
|
|
664
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
411
665
|
/**
|
|
412
666
|
* Close an old epoch account and reclaim rent. Permissionless — call after
|
|
413
667
|
* the epoch is distributed and at least 7 epochs have passed.
|
|
414
668
|
*/
|
|
415
669
|
closeEpoch(params: {
|
|
416
670
|
epochIndex: number;
|
|
417
|
-
}, _options?: WriteOptions): Promise<
|
|
671
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
418
672
|
/**
|
|
419
673
|
* Get gateway PDAs for a batch starting at registryIndex.
|
|
420
674
|
* Reads the GatewayRegistry and derives PDAs for the next `batchSize`
|
|
@@ -423,6 +677,108 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
423
677
|
getRegistryGatewayPDAs(startIndex: number, batchSize: number): Promise<Address[]>;
|
|
424
678
|
/** Get ALL active gateway PDAs from the registry. */
|
|
425
679
|
getAllRegistryGatewayPDAs(): Promise<Address[]>;
|
|
680
|
+
/**
|
|
681
|
+
* Predict the Gateway PDAs that `prescribe_epoch` will select as observers
|
|
682
|
+
* for `epochIndex`, mirroring the on-chain weighted-roulette selection.
|
|
683
|
+
*
|
|
684
|
+
* Returns at most `epoch_settings.prescribed_observer_count` (≤50) PDAs
|
|
685
|
+
* regardless of registry size — the set to pass as `gatewayAccounts` to
|
|
686
|
+
* {@link prescribeEpoch}. This is the size-safe replacement for
|
|
687
|
+
* {@link getAllRegistryGatewayPDAs} on the prescribe path (which oversupplies
|
|
688
|
+
* and trips `MAX_TX_ACCOUNT_LOCKS = 64` on large registries).
|
|
689
|
+
*
|
|
690
|
+
* Reads three accounts (epoch, registry, epoch settings) at the configured
|
|
691
|
+
* commitment so the prediction reflects live registry weights. If a selected
|
|
692
|
+
* gateway races out before the tx lands, `prescribeEpoch` throws
|
|
693
|
+
* `InvalidGatewayAccount` — re-call this and retry once.
|
|
694
|
+
*/
|
|
695
|
+
getPredictedObserverPDAs(epochIndex: number): Promise<Address[]>;
|
|
696
|
+
/**
|
|
697
|
+
* Reclaim rent from the ephemeral Address Lookup Tables this signer created
|
|
698
|
+
* for `prescribe_epoch` (see {@link sendWithEphemeralLookupTable}). Each
|
|
699
|
+
* prescribe leaves a single-use table allocated (~0.0126 SOL); reclaiming
|
|
700
|
+
* needs a deactivate → ~513-slot cooldown → close sequence, so it can't run
|
|
701
|
+
* inline. Call this from a throttled/permissionless cleanup pass (cranker /
|
|
702
|
+
* observer) to deactivate active tables and close cooled-down ones, refunding
|
|
703
|
+
* the rent to the signer.
|
|
704
|
+
*
|
|
705
|
+
* Discovery reads the signer's transaction history (RPC-portable; the ALT
|
|
706
|
+
* program can't be enumerated via `getProgramAccounts`). The GAR + ArNS
|
|
707
|
+
* program IDs are passed as the entry-ownership fingerprint so only genuine
|
|
708
|
+
* prescribe tables are touched. Best-effort: at most `maxTables` submissions
|
|
709
|
+
* per call, scanning at most `scanLimit` recent signatures.
|
|
710
|
+
*/
|
|
711
|
+
reclaimLookupTableRent(opts?: {
|
|
712
|
+
maxTables?: number;
|
|
713
|
+
scanLimit?: number;
|
|
714
|
+
}): Promise<{
|
|
715
|
+
deactivated: number;
|
|
716
|
+
closed: number;
|
|
717
|
+
candidates: number;
|
|
718
|
+
scannedSignatures: number;
|
|
719
|
+
}>;
|
|
720
|
+
/** Read and deserialize the full EpochSettings account. */
|
|
721
|
+
getEpochSettingsFull(): Promise<ReturnType<typeof deserializeEpochSettingsFull>>;
|
|
722
|
+
/**
|
|
723
|
+
* Submit `prescribe_epoch` using the off-chain-predicted observer set, with a
|
|
724
|
+
* single re-predict-and-retry on `InvalidGatewayAccount` (covers a gateway
|
|
725
|
+
* leaving the registry between the prediction read and the tx landing).
|
|
726
|
+
*/
|
|
727
|
+
protected prescribeWithPrediction(epochIndex: number, nameRegistryAccount?: Address): Promise<MessageResult>;
|
|
728
|
+
/**
|
|
729
|
+
* Advance the epoch lifecycle by ONE on-chain action and return what it did.
|
|
730
|
+
*
|
|
731
|
+
* Stateless and idempotent: it reads `EpochSettings` + the current `Epoch`,
|
|
732
|
+
* determines the single next required step
|
|
733
|
+
* (`create` → `tally` → `prescribe` → `distribute` → `close`), submits it,
|
|
734
|
+
* and returns a {@link CrankEpochStepResult}. Call it repeatedly on your own
|
|
735
|
+
* schedule — it owns *which* on-chain action is correct and *which accounts*
|
|
736
|
+
* it needs; you own scheduling, logging, error classification, and any
|
|
737
|
+
* permissionless cleanup.
|
|
738
|
+
*
|
|
739
|
+
* Crucially, the `prescribe` leg uses {@link getPredictedObserverPDAs} (only
|
|
740
|
+
* the ~`prescribed_observer_count` selected Gateway PDAs), so it never trips
|
|
741
|
+
* `MAX_TX_ACCOUNT_LOCKS = 64` on large registries — and it re-predicts and
|
|
742
|
+
* retries once on `InvalidGatewayAccount`.
|
|
743
|
+
*
|
|
744
|
+
* Errors propagate to the caller (classify/retry as you see fit); the only
|
|
745
|
+
* internally-handled error is the prescribe `InvalidGatewayAccount` retry.
|
|
746
|
+
*/
|
|
747
|
+
crankEpochStep(opts?: CrankEpochStepOptions): Promise<CrankEpochStepResult>;
|
|
748
|
+
/**
|
|
749
|
+
* One compound batch over delegations with pending rewards (≤
|
|
750
|
+
* {@link MAX_COMPOUND_BATCH} per tx), or `null` when none are due. Settling
|
|
751
|
+
* is idempotent, so this converges over a few crank steps then no-ops until
|
|
752
|
+
* the next epoch's distribution advances the accumulator again.
|
|
753
|
+
*/
|
|
754
|
+
private maybeCompoundStep;
|
|
755
|
+
/**
|
|
756
|
+
* Roll the demand factor forward if its (wall-clock) period elapsed since the
|
|
757
|
+
* last stored roll, else `null`. Mirrors the on-chain period math; the roll
|
|
758
|
+
* itself is idempotent.
|
|
759
|
+
*/
|
|
760
|
+
private maybeRollDemandFactorStep;
|
|
761
|
+
/** Wall-clock (ms) of the last returned-name prune scan; throttles the
|
|
762
|
+
* getProgramAccounts scan below the crank poll rate. */
|
|
763
|
+
private lastReturnedNamePruneScanMs;
|
|
764
|
+
/**
|
|
765
|
+
* One prune batch over ReturnedName PDAs whose 14-day auction window has
|
|
766
|
+
* elapsed (≤ {@link CrankEpochStepOptions.pruneBatchSize} per tx), or `null`
|
|
767
|
+
* when none are due / the scan is throttled. Scans the PDAs directly — it does
|
|
768
|
+
* NOT gate on `config.next_returned_names_prune_timestamp`, which is never set
|
|
769
|
+
* for imported returned names and would strand them. The contract re-checks
|
|
770
|
+
* each account's window, so a slightly-skewed client clock is safe.
|
|
771
|
+
*/
|
|
772
|
+
private maybePruneReturnedNamesStep;
|
|
773
|
+
/**
|
|
774
|
+
* The DemandFactor account's stored period + period-zero start (seconds) —
|
|
775
|
+
* the gate for {@link maybeRollDemandFactorStep}. `null` if the account
|
|
776
|
+
* doesn't exist (pre-genesis).
|
|
777
|
+
*/
|
|
778
|
+
getDemandFactorPeriodState(): Promise<{
|
|
779
|
+
currentPeriod: number;
|
|
780
|
+
periodZeroStartTimestamp: number;
|
|
781
|
+
} | null>;
|
|
426
782
|
/**
|
|
427
783
|
* Read the raw epoch account data for cranker state inspection.
|
|
428
784
|
* Returns null if the epoch account doesn't exist yet.
|
|
@@ -433,6 +789,8 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
433
789
|
weightsTallied: number;
|
|
434
790
|
prescriptionsDone: number;
|
|
435
791
|
rewardsDistributed: number;
|
|
792
|
+
observationsSubmitted: number;
|
|
793
|
+
observationsClosed: number;
|
|
436
794
|
activeGatewayCount: number;
|
|
437
795
|
endTimestamp: number;
|
|
438
796
|
} | null>;
|
|
@@ -445,10 +803,13 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
445
803
|
* [8 per_obs][8 reward_rate][8 weight_lo][8 weight_hi][32 hashchain]
|
|
446
804
|
* [4 active_gw_count][4 dist_idx][4 tally_idx]
|
|
447
805
|
* [1 observer_count][1 name_count][1 obs_submitted][1 rewards_dist]
|
|
448
|
-
* [1 weights_tallied][1 prescriptions_done][1 bump][1
|
|
806
|
+
* [1 weights_tallied][1 prescriptions_done][1 bump][1 obs_closed]
|
|
449
807
|
* [6000 failure_counts][1600 prescribed_observers]
|
|
450
808
|
* [1600 prescribed_observer_gateways][64 prescribed_names]
|
|
451
809
|
* [7 has_observed][5 _pad2]
|
|
810
|
+
*
|
|
811
|
+
* NOTE: byte +123 is `observations_closed` (NOT padding) — `close_epoch`
|
|
812
|
+
* reverts with EpochObservationsNotClosed until it equals obs_submitted.
|
|
452
813
|
*/
|
|
453
814
|
private fetchEpochRawFields;
|
|
454
815
|
/**
|
|
@@ -461,14 +822,14 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
461
822
|
pruneExpiredNames(params: {
|
|
462
823
|
maxNames: number;
|
|
463
824
|
arnsRecords: string[];
|
|
464
|
-
}, _options?: WriteOptions): Promise<
|
|
825
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
465
826
|
/**
|
|
466
827
|
* Convert a single expired-but-not-yet-returned lease into a `ReturnedName`
|
|
467
828
|
* (kicks off the Dutch auction). Permissionless.
|
|
468
829
|
*/
|
|
469
830
|
pruneNameToReturned(params: {
|
|
470
831
|
name: string;
|
|
471
|
-
}, _options?: WriteOptions): Promise<
|
|
832
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
472
833
|
/**
|
|
473
834
|
* Batch-prune expired ReturnedName PDAs (auction window elapsed). Caller
|
|
474
835
|
* supplies the eligible PDAs as `returnedNames`; they're appended as
|
|
@@ -477,14 +838,14 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
477
838
|
pruneReturnedNames(params: {
|
|
478
839
|
maxNames: number;
|
|
479
840
|
returnedNames: string[];
|
|
480
|
-
}, _options?: WriteOptions): Promise<
|
|
841
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
481
842
|
/**
|
|
482
843
|
* Close a single expired ReservedName PDA. Permissionless after
|
|
483
844
|
* `expires_at`.
|
|
484
845
|
*/
|
|
485
846
|
pruneExpiredReservation(params: {
|
|
486
847
|
name: string;
|
|
487
|
-
}, _options?: WriteOptions): Promise<
|
|
848
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
488
849
|
/**
|
|
489
850
|
* Slash and remove a deficient gateway (`stats.failed_consecutive >=
|
|
490
851
|
* max_consecutive_failures`). Builds the protected exit vault for the
|
|
@@ -496,14 +857,14 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
496
857
|
*/
|
|
497
858
|
pruneGateway(params: {
|
|
498
859
|
gateway: string;
|
|
499
|
-
}, _options?: WriteOptions): Promise<
|
|
860
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
500
861
|
/**
|
|
501
862
|
* GC a `Leaving`/`Gone` gateway whose leave window has fully elapsed.
|
|
502
863
|
* Closes the Gateway PDA and refunds rent to the caller. Permissionless.
|
|
503
864
|
*/
|
|
504
865
|
finalizeGone(params: {
|
|
505
866
|
gateway: string;
|
|
506
|
-
}, _options?: WriteOptions): Promise<
|
|
867
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
507
868
|
/**
|
|
508
869
|
* Reclaim rent from an Observation PDA whose epoch has been distributed.
|
|
509
870
|
* Permissionless. Pass `epochIndex` and the `observer` address used as
|
|
@@ -512,7 +873,19 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
512
873
|
closeObservation(params: {
|
|
513
874
|
epochIndex: number;
|
|
514
875
|
observer: string;
|
|
515
|
-
}, _options?: WriteOptions): Promise<
|
|
876
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
877
|
+
/**
|
|
878
|
+
* Close multiple Observation PDAs for one epoch in a single tx (each
|
|
879
|
+
* `close_observation` increments the parent Epoch's `observations_closed`).
|
|
880
|
+
* Permissionless; rent is refunded to the payer. Used by the crank to satisfy
|
|
881
|
+
* `close_epoch`'s `observations_closed == observations_submitted` precondition
|
|
882
|
+
* before closing a retention-aged epoch. Keep the batch small — each ix carries
|
|
883
|
+
* the Epoch + Observation + payer + system accounts.
|
|
884
|
+
*/
|
|
885
|
+
closeObservations(params: {
|
|
886
|
+
epochIndex: number;
|
|
887
|
+
observers: string[];
|
|
888
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
516
889
|
/**
|
|
517
890
|
* Close an empty Delegation PDA (`amount == 0`) and refund rent to the
|
|
518
891
|
* original delegator (NOT the caller — see GAR-016, prevents griefing).
|
|
@@ -521,7 +894,7 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
521
894
|
closeEmptyDelegation(params: {
|
|
522
895
|
gateway: string;
|
|
523
896
|
delegator: string;
|
|
524
|
-
}, _options?: WriteOptions): Promise<
|
|
897
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
525
898
|
/**
|
|
526
899
|
* Close a drained Withdrawal PDA (`amount == 0`) and refund rent to the
|
|
527
900
|
* original owner (NOT the caller). Permissionless.
|
|
@@ -529,5 +902,5 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
|
|
|
529
902
|
closeDrainedWithdrawal(params: {
|
|
530
903
|
owner: string;
|
|
531
904
|
withdrawalId: number | bigint;
|
|
532
|
-
}, _options?: WriteOptions): Promise<
|
|
905
|
+
}, _options?: WriteOptions): Promise<MessageResult>;
|
|
533
906
|
}
|