@ar.io/sdk 3.24.0 → 4.0.0-alpha.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.
Files changed (169) hide show
  1. package/README.md +682 -600
  2. package/lib/esm/cli/cli.js +188 -152
  3. package/lib/esm/cli/commands/antCommands.js +23 -58
  4. package/lib/esm/cli/commands/arnsPurchaseCommands.js +48 -30
  5. package/lib/esm/cli/commands/escrowCommands.js +221 -0
  6. package/lib/esm/cli/commands/gatewayWriteCommands.js +142 -23
  7. package/lib/esm/cli/commands/pruneCommands.js +150 -0
  8. package/lib/esm/cli/commands/readCommands.js +22 -3
  9. package/lib/esm/cli/commands/transfer.js +6 -6
  10. package/lib/esm/cli/options.js +124 -58
  11. package/lib/esm/cli/utils.js +280 -174
  12. package/lib/esm/common/ant-registry.js +17 -143
  13. package/lib/esm/common/ant.js +44 -1167
  14. package/lib/esm/common/faucet.js +11 -6
  15. package/lib/esm/common/index.js +0 -4
  16. package/lib/esm/common/io.js +25 -1412
  17. package/lib/esm/constants.js +13 -19
  18. package/lib/esm/solana/ant-readable.js +724 -0
  19. package/lib/esm/solana/ant-registry-readable.js +133 -0
  20. package/lib/esm/solana/ant-registry-writeable.js +472 -0
  21. package/lib/esm/solana/ant-writeable.js +384 -0
  22. package/lib/esm/solana/ata.js +70 -0
  23. package/lib/esm/solana/canonical-message.js +128 -0
  24. package/lib/esm/solana/clusters.js +111 -0
  25. package/lib/esm/solana/constants.js +146 -0
  26. package/lib/esm/solana/delegation-math.js +112 -0
  27. package/lib/esm/solana/deserialize.js +711 -0
  28. package/lib/esm/solana/escrow.js +839 -0
  29. package/lib/{cjs/utils/json.js → esm/solana/events.js} +15 -10
  30. package/lib/esm/solana/funding-plan.js +699 -0
  31. package/lib/esm/solana/index.js +126 -0
  32. package/lib/esm/solana/instruction.js +39 -0
  33. package/lib/esm/solana/io-readable.js +2182 -0
  34. package/lib/esm/solana/io-writeable.js +3196 -0
  35. package/lib/esm/solana/json-rpc.js +90 -0
  36. package/lib/esm/solana/metadata.js +81 -0
  37. package/lib/esm/solana/mpl-core.js +192 -0
  38. package/lib/esm/solana/pda.js +332 -0
  39. package/lib/esm/solana/predict-prescribed-observers.js +110 -0
  40. package/lib/esm/solana/retry.js +117 -0
  41. package/lib/esm/solana/rpc-circuit-breaker.js +258 -0
  42. package/lib/esm/solana/send.js +372 -0
  43. package/lib/esm/solana/spawn-ant.js +224 -0
  44. package/lib/esm/solana/types.js +1 -0
  45. package/lib/esm/types/ant.js +27 -15
  46. package/lib/esm/types/io.js +8 -11
  47. package/lib/esm/utils/ant.js +0 -63
  48. package/lib/esm/utils/index.js +0 -3
  49. package/lib/esm/version.js +1 -1
  50. package/lib/types/cli/commands/antCommands.d.ts +5 -13
  51. package/lib/types/cli/commands/arnsPurchaseCommands.d.ts +33 -7
  52. package/lib/types/cli/commands/escrowCommands.d.ts +68 -0
  53. package/lib/types/cli/commands/gatewayWriteCommands.d.ts +12 -11
  54. package/lib/types/cli/commands/pruneCommands.d.ts +31 -0
  55. package/lib/types/cli/commands/readCommands.d.ts +27 -22
  56. package/lib/types/cli/commands/transfer.d.ts +9 -9
  57. package/lib/types/cli/options.d.ts +76 -21
  58. package/lib/types/cli/types.d.ts +11 -13
  59. package/lib/types/cli/utils.d.ts +71 -31
  60. package/lib/types/common/ant-registry.d.ts +49 -47
  61. package/lib/types/common/ant.d.ts +54 -539
  62. package/lib/types/common/faucet.d.ts +20 -8
  63. package/lib/types/common/index.d.ts +0 -3
  64. package/lib/types/common/io.d.ts +51 -263
  65. package/lib/types/constants.d.ts +11 -18
  66. package/lib/types/solana/ant-readable.d.ts +180 -0
  67. package/lib/types/solana/ant-registry-readable.d.ts +105 -0
  68. package/lib/types/solana/ant-registry-writeable.d.ts +249 -0
  69. package/lib/types/solana/ant-writeable.d.ts +177 -0
  70. package/lib/types/solana/ata.d.ts +44 -0
  71. package/lib/types/solana/canonical-message.d.ts +121 -0
  72. package/lib/types/solana/clusters.d.ts +109 -0
  73. package/lib/types/solana/constants.d.ts +119 -0
  74. package/lib/types/solana/delegation-math.d.ts +45 -0
  75. package/lib/types/solana/deserialize.d.ts +262 -0
  76. package/lib/types/solana/escrow.d.ts +480 -0
  77. package/lib/types/solana/events.d.ts +38 -0
  78. package/lib/types/solana/funding-plan.d.ts +225 -0
  79. package/lib/types/solana/index.d.ts +87 -0
  80. package/lib/types/solana/instruction.d.ts +39 -0
  81. package/lib/types/solana/io-readable.d.ts +499 -0
  82. package/lib/types/solana/io-writeable.d.ts +893 -0
  83. package/lib/types/solana/json-rpc.d.ts +47 -0
  84. package/lib/types/solana/metadata.d.ts +84 -0
  85. package/lib/types/solana/mpl-core.d.ts +120 -0
  86. package/lib/types/solana/pda.d.ts +95 -0
  87. package/lib/types/solana/predict-prescribed-observers.d.ts +28 -0
  88. package/lib/types/solana/retry.d.ts +62 -0
  89. package/lib/types/solana/rpc-circuit-breaker.d.ts +78 -0
  90. package/lib/types/solana/send.d.ts +94 -0
  91. package/lib/types/solana/spawn-ant.d.ts +145 -0
  92. package/lib/types/solana/types.d.ts +82 -0
  93. package/lib/types/types/ant-registry.d.ts +43 -4
  94. package/lib/types/types/ant.d.ts +114 -96
  95. package/lib/types/types/common.d.ts +18 -74
  96. package/lib/types/types/faucet.d.ts +2 -2
  97. package/lib/types/types/io.d.ts +244 -158
  98. package/lib/types/types/token.d.ts +0 -12
  99. package/lib/types/utils/ant.d.ts +1 -12
  100. package/lib/types/utils/index.d.ts +0 -3
  101. package/lib/types/version.d.ts +1 -1
  102. package/package.json +36 -33
  103. package/lib/cjs/cli/cli.js +0 -822
  104. package/lib/cjs/cli/commands/antCommands.js +0 -113
  105. package/lib/cjs/cli/commands/arnsPurchaseCommands.js +0 -212
  106. package/lib/cjs/cli/commands/gatewayWriteCommands.js +0 -210
  107. package/lib/cjs/cli/commands/readCommands.js +0 -215
  108. package/lib/cjs/cli/commands/transfer.js +0 -159
  109. package/lib/cjs/cli/options.js +0 -470
  110. package/lib/cjs/cli/types.js +0 -2
  111. package/lib/cjs/cli/utils.js +0 -639
  112. package/lib/cjs/common/ant-registry.js +0 -155
  113. package/lib/cjs/common/ant-versions.js +0 -93
  114. package/lib/cjs/common/ant.js +0 -1182
  115. package/lib/cjs/common/arweave.js +0 -27
  116. package/lib/cjs/common/contracts/ao-process.js +0 -224
  117. package/lib/cjs/common/error.js +0 -64
  118. package/lib/cjs/common/faucet.js +0 -150
  119. package/lib/cjs/common/hyperbeam/hb.js +0 -173
  120. package/lib/cjs/common/index.js +0 -42
  121. package/lib/cjs/common/io.js +0 -1423
  122. package/lib/cjs/common/logger.js +0 -83
  123. package/lib/cjs/common/loggers/winston.js +0 -68
  124. package/lib/cjs/common/marketplace.js +0 -731
  125. package/lib/cjs/common/turbo.js +0 -223
  126. package/lib/cjs/constants.js +0 -41
  127. package/lib/cjs/node/index.js +0 -39
  128. package/lib/cjs/package.json +0 -1
  129. package/lib/cjs/types/ant-registry.js +0 -2
  130. package/lib/cjs/types/ant.js +0 -168
  131. package/lib/cjs/types/common.js +0 -2
  132. package/lib/cjs/types/faucet.js +0 -2
  133. package/lib/cjs/types/index.js +0 -37
  134. package/lib/cjs/types/io.js +0 -51
  135. package/lib/cjs/types/token.js +0 -116
  136. package/lib/cjs/utils/ant.js +0 -108
  137. package/lib/cjs/utils/ao.js +0 -432
  138. package/lib/cjs/utils/arweave.js +0 -285
  139. package/lib/cjs/utils/base64.js +0 -62
  140. package/lib/cjs/utils/hash.js +0 -56
  141. package/lib/cjs/utils/index.js +0 -38
  142. package/lib/cjs/utils/processes.js +0 -173
  143. package/lib/cjs/utils/random.js +0 -30
  144. package/lib/cjs/utils/schema.js +0 -15
  145. package/lib/cjs/utils/url.js +0 -37
  146. package/lib/cjs/version.js +0 -20
  147. package/lib/cjs/web/index.js +0 -41
  148. package/lib/esm/common/ant-versions.js +0 -87
  149. package/lib/esm/common/arweave.js +0 -21
  150. package/lib/esm/common/contracts/ao-process.js +0 -220
  151. package/lib/esm/common/hyperbeam/hb.js +0 -169
  152. package/lib/esm/common/marketplace.js +0 -724
  153. package/lib/esm/common/turbo.js +0 -215
  154. package/lib/esm/node/index.js +0 -20
  155. package/lib/esm/utils/ao.js +0 -420
  156. package/lib/esm/utils/arweave.js +0 -271
  157. package/lib/esm/utils/processes.js +0 -167
  158. package/lib/esm/web/index.js +0 -20
  159. package/lib/types/common/ant-versions.d.ts +0 -39
  160. package/lib/types/common/arweave.d.ts +0 -17
  161. package/lib/types/common/contracts/ao-process.d.ts +0 -47
  162. package/lib/types/common/hyperbeam/hb.d.ts +0 -88
  163. package/lib/types/common/marketplace.d.ts +0 -568
  164. package/lib/types/common/turbo.d.ts +0 -61
  165. package/lib/types/node/index.d.ts +0 -20
  166. package/lib/types/utils/ao.d.ts +0 -80
  167. package/lib/types/utils/arweave.d.ts +0 -79
  168. package/lib/types/utils/processes.d.ts +0 -39
  169. package/lib/types/web/index.d.ts +0 -20
@@ -13,8 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { AOProcess } from '../common/index.js';
17
- import { AoCreatePrimaryNameRequest, AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AoWriteAction, AtLeastOne, BlockHeight, BuyArNSNameProgressEvents, ProcessId, SetPrimaryNameProgressEvents, Timestamp, TransactionId, WalletAddress, WriteOptions } from './index.js';
16
+ import { AtLeastOne, BlockHeight, BuyArNSNameProgressEvents, CreatePrimaryNameRequest, MessageResult, PrimaryName, PrimaryNameRequest, ProcessId, RedelegationFeeInfo, SetPrimaryNameProgressEvents, Timestamp, TransactionId, WalletAddress, WriteAction, WriteOptions } from './index.js';
18
17
  import { mARIOToken } from './token.js';
19
18
  type NestedKeys<T> = T extends object ? T extends readonly unknown[] ? never : {
20
19
  [K in keyof T & string]: T[K] extends object ? `${K}.${NestedKeys<T[K]>}` : K;
@@ -39,91 +38,87 @@ export type PaginationResult<T> = {
39
38
  export type ProcessIdConfig = {
40
39
  processId?: string;
41
40
  };
42
- export type ProcessConfig = {
43
- process?: AOProcess;
44
- };
45
- export type ProcessConfiguration = ProcessConfig | ProcessIdConfig;
46
41
  export type EpochTimestampInput = {
47
42
  timestamp: Timestamp;
48
43
  };
49
44
  export type EpochIndexInput = {
50
- epochIndex: AoEpochIndex;
45
+ epochIndex: EpochIndex;
51
46
  };
52
47
  export type EpochInput = EpochTimestampInput | EpochIndexInput | undefined;
53
- export type AoBalances = Record<WalletAddress, number>;
54
- export type AoRegistrationFees = Record<number, {
48
+ export type Balances = Record<WalletAddress, number>;
49
+ export type RegistrationFees = Record<number, {
55
50
  lease: Record<number, number>;
56
51
  permabuy: number;
57
52
  }>;
58
- export type AoEpochIndex = number;
59
- export type AoEpochObservationData = {
53
+ export type EpochIndex = number;
54
+ export type EpochObservationData = {
60
55
  failureSummaries: Record<WalletAddress, WalletAddress[]>;
61
56
  reports: Record<WalletAddress, TransactionId>;
62
57
  };
63
- export type AoEpochPrescribedObservers = Record<WalletAddress, WalletAddress[]>;
64
- export type AoVaultData = {
58
+ export type EpochPrescribedObservers = Record<WalletAddress, WalletAddress[]>;
59
+ export type VaultData = {
65
60
  balance: number;
66
61
  startTimestamp: Timestamp;
67
62
  endTimestamp: Timestamp;
68
63
  controller?: WalletAddress;
69
64
  };
70
- export type AoArNSReservedNameData = {
65
+ export type ArNSReservedNameData = {
71
66
  target?: string;
72
67
  endTimestamp?: number;
73
68
  };
74
- export type AoArNSNameData = AoArNSPermabuyData | AoArNSLeaseData;
75
- export type AoArNSNameDataWithName = AoArNSNameData & {
69
+ export type ArNSNameData = ArNSPermabuyData | ArNSLeaseData;
70
+ export type ArNSNameDataWithName = ArNSNameData & {
76
71
  name: string;
77
72
  };
78
- export type AoArNSReservedNameDataWithName = AoArNSReservedNameData & {
73
+ export type ArNSReservedNameDataWithName = ArNSReservedNameData & {
79
74
  name: string;
80
75
  };
81
- export type AoArNSBaseNameData = {
76
+ export type ArNSBaseNameData = {
82
77
  processId: ProcessId;
83
78
  startTimestamp: number;
84
79
  type: 'lease' | 'permabuy';
85
80
  undernameLimit: number;
86
81
  purchasePrice: number;
87
82
  };
88
- export type AoArNSPermabuyData = AoArNSBaseNameData & {
83
+ export type ArNSPermabuyData = ArNSBaseNameData & {
89
84
  type: 'permabuy';
90
85
  };
91
- export type AoArNSLeaseData = AoArNSBaseNameData & {
86
+ export type ArNSLeaseData = ArNSBaseNameData & {
92
87
  type: 'lease';
93
88
  endTimestamp: Timestamp;
94
89
  };
95
- export type AoEpochSettings = {
90
+ export type EpochSettings = {
96
91
  epochZeroStartTimestamp: Timestamp;
97
92
  durationMs: number;
98
93
  prescribedNameCount: number;
99
94
  maxObservers: number;
100
95
  };
101
- export type AoEpochDistributionTotalsData = {
96
+ export type EpochDistributionTotalsData = {
102
97
  totalEligibleGateways: number;
103
98
  totalEligibleRewards: number;
104
99
  totalEligibleObserverReward: number;
105
100
  totalEligibleGatewayReward: number;
106
101
  };
107
102
  /** @deprecated Use getEligibleEpochRewards getEpochDistributions, will be removed in a future release */
108
- export type AoEpochDistributionRewards = {
103
+ export type EpochDistributionRewards = {
109
104
  eligible: Record<WalletAddress, {
110
105
  delegateRewards: Record<WalletAddress, number>;
111
106
  operatorReward: number;
112
107
  }>;
113
108
  distributed: Record<WalletAddress, number>;
114
109
  };
115
- export type AoEpochDistributed = AoEpochDistributionTotalsData & {
110
+ export type EpochDistributed = EpochDistributionTotalsData & {
116
111
  /** @deprecated Use getEligibleEpochRewards getEpochDistributions, will be removed in a future release */
117
- rewards: AoEpochDistributionRewards;
112
+ rewards: EpochDistributionRewards;
118
113
  distributedTimestamp: Timestamp;
119
114
  totalDistributedRewards: number;
120
115
  };
121
- export type AoEpochDistributionData = AoEpochDistributionTotalsData | AoEpochDistributed;
122
- export type AoEpochData<D = AoEpochDistributionData> = {
123
- epochIndex: AoEpochIndex;
116
+ export type EpochDistributionData = EpochDistributionTotalsData | EpochDistributed;
117
+ export type EpochData<D = EpochDistributionData> = {
118
+ epochIndex: EpochIndex;
124
119
  startHeight: BlockHeight;
125
- observations: AoEpochObservationData;
126
- prescribedObservers: AoWeightedObserver[];
120
+ observations: EpochObservationData;
121
+ prescribedObservers: WeightedObserver[];
127
122
  prescribedNames: string[];
128
123
  startTimestamp: Timestamp;
129
124
  endTimestamp: Timestamp;
@@ -136,20 +131,30 @@ export type AoEpochData<D = AoEpochDistributionData> = {
136
131
  totalReservedNames: number;
137
132
  };
138
133
  };
139
- export declare const isDistributedEpochData: (data: AoEpochDistributed | AoEpochDistributionTotalsData) => data is AoEpochDistributed;
140
- export declare const isDistributedEpoch: (data: AoEpochData) => data is AoEpochData<AoEpochDistributed> & {
134
+ export declare const isDistributedEpochData: (data: EpochDistributed | EpochDistributionTotalsData) => data is EpochDistributed;
135
+ export declare const isDistributedEpoch: (data: EpochData) => data is EpochData<EpochDistributed> & {
141
136
  distributions: {
142
137
  rewards: object;
143
138
  };
144
139
  };
145
- export type AoEligibleDistribution = {
140
+ export type EligibleDistribution = {
146
141
  type: 'operatorReward' | 'delegateReward';
147
142
  recipient: WalletAddress;
148
143
  eligibleReward: number;
149
144
  gatewayAddress: WalletAddress;
150
145
  cursorId: string;
151
146
  };
152
- export type AoTokenSupplyData = {
147
+ /**
148
+ * The six ARIO supply buckets. They are mutually exclusive and sum to `total`:
149
+ * circulating + locked + staked + delegated + withdrawn + protocolBalance === total
150
+ *
151
+ * `protocolBalance` is the protocol **reward reserve** (the pool epoch rewards
152
+ * are paid from) — on Solana this is the live balance of the protocol token
153
+ * account, matching AO's `protocolBalance` (the qNvAoz0 reserve). It is NOT the
154
+ * on-chain `ArioConfig.protocol_balance` accounting field, which folds the
155
+ * staking buckets in and would double-count.
156
+ */
157
+ export type TokenSupplyData = {
153
158
  total: number;
154
159
  circulating: number;
155
160
  locked: number;
@@ -158,34 +163,34 @@ export type AoTokenSupplyData = {
158
163
  staked: number;
159
164
  protocolBalance: number;
160
165
  };
161
- export type AoGatewayService = {
166
+ export type GatewayService = {
162
167
  fqdn: string;
163
168
  path: string;
164
169
  protocol: 'https';
165
170
  port: number;
166
171
  };
167
- export type AoGatewayServices = {
168
- bundlers: AoGatewayService[];
172
+ export type GatewayServices = {
173
+ bundlers: GatewayService[];
169
174
  };
170
- export type AoGatewayDelegates = Record<WalletAddress, AoGatewayDelegate>;
171
- export type AoGatewayDelegateAllowList = WalletAddress[];
172
- export type AoWalletVault = AoVaultData & {
175
+ export type GatewayDelegates = Record<WalletAddress, GatewayDelegate>;
176
+ export type GatewayDelegateAllowList = WalletAddress[];
177
+ export type WalletVault = VaultData & {
173
178
  address: WalletAddress;
174
179
  vaultId: string;
175
180
  };
176
- export type AoGateway = {
177
- settings: AoGatewaySettings;
178
- stats: AoGatewayStats;
181
+ export type Gateway = {
182
+ settings: GatewaySettings;
183
+ stats: GatewayStats;
179
184
  totalDelegatedStake: number;
180
185
  startTimestamp: Timestamp;
181
186
  endTimestamp: Timestamp;
182
187
  observerAddress: WalletAddress;
183
188
  operatorStake: number;
184
189
  status: 'joined' | 'leaving';
185
- weights: AoGatewayWeights;
186
- services?: AoGatewayServices;
190
+ weights: GatewayWeights;
191
+ services?: GatewayServices;
187
192
  };
188
- export type AoGatewayStats = {
193
+ export type GatewayStats = {
189
194
  passedConsecutiveEpochs: number;
190
195
  failedConsecutiveEpochs: number;
191
196
  totalEpochCount: number;
@@ -194,13 +199,13 @@ export type AoGatewayStats = {
194
199
  observedEpochCount: number;
195
200
  prescribedEpochCount: number;
196
201
  };
197
- export type AoWeightedObserver = {
202
+ export type WeightedObserver = {
198
203
  gatewayAddress: WalletAddress;
199
204
  observerAddress: WalletAddress;
200
205
  stake: number;
201
206
  startTimestamp: number;
202
- } & AoGatewayWeights;
203
- export type AoGatewayWeights = {
207
+ } & GatewayWeights;
208
+ export type GatewayWeights = {
204
209
  stakeWeight: number;
205
210
  tenureWeight: number;
206
211
  gatewayRewardRatioWeight: number;
@@ -210,22 +215,22 @@ export type AoGatewayWeights = {
210
215
  compositeWeight: number;
211
216
  normalizedCompositeWeight: number;
212
217
  };
213
- export type AoGatewayWithAddress = AoGateway & {
218
+ export type GatewayWithAddress = Gateway & {
214
219
  gatewayAddress: WalletAddress;
215
220
  };
216
- export type AoGatewayDelegate = {
221
+ export type GatewayDelegate = {
217
222
  delegatedStake: number;
218
223
  startTimestamp: Timestamp;
219
224
  };
220
- export type AoGatewayDelegateWithAddress = AoGatewayDelegate & {
225
+ export type GatewayDelegateWithAddress = GatewayDelegate & {
221
226
  address: WalletAddress;
222
227
  };
223
- export type AoAllDelegates = AoGatewayDelegateWithAddress & {
228
+ export type AllDelegates = GatewayDelegateWithAddress & {
224
229
  gatewayAddress: WalletAddress;
225
230
  vaultedStake: number;
226
231
  cursorId: string;
227
232
  };
228
- export type AoGatewaySettings = {
233
+ export type GatewaySettings = {
229
234
  allowDelegatedStaking: boolean | 'allowlist';
230
235
  delegateRewardShareRatio: number;
231
236
  allowedDelegates: WalletAddress[];
@@ -237,35 +242,51 @@ export type AoGatewaySettings = {
237
242
  fqdn: string;
238
243
  port: number;
239
244
  protocol: 'https';
240
- };
241
- export type AoBalanceWithAddress = {
245
+ /**
246
+ * Solana only (GATEWAY_VERSION 1.1.0+). A `delegateRewardShareRatio` change
247
+ * requested mid-epoch is staged here and applied at the next epoch's
248
+ * `tally_weights` (WP §6.3 / Fix #7), so the active value stays epoch-stable.
249
+ * When set, render the active `delegateRewardShareRatio` as the current rate
250
+ * and this as "pending until next epoch". Percent (0-95), same scale as
251
+ * `delegateRewardShareRatio`. Undefined when no change is queued.
252
+ */
253
+ pendingDelegateRewardShareRatio?: number;
254
+ /**
255
+ * Solana only (GATEWAY_VERSION 1.1.0+). Unix seconds when the operator
256
+ * disabled delegation (WP §6.3 / Fix #6). Re-enabling is blocked until every
257
+ * delegate has been withdrawn AND the withdrawal-period cooldown has elapsed
258
+ * since this time. Undefined when delegation is enabled.
259
+ */
260
+ delegationDisabledAt?: number;
261
+ };
262
+ export type BalanceWithAddress = {
242
263
  address: WalletAddress;
243
264
  balance: number;
244
265
  };
245
- export type AoReturnedName = {
266
+ export type ReturnedName = {
246
267
  name: string;
247
268
  startTimestamp: Timestamp;
248
269
  endTimestamp: Timestamp;
249
270
  initiator: string;
250
271
  premiumMultiplier: number;
251
272
  };
252
- export type AoDelegationBase = {
273
+ export type DelegationBase = {
253
274
  type: 'stake' | 'vault';
254
275
  gatewayAddress: WalletAddress;
255
276
  delegationId: string;
256
277
  };
257
- export type AoVaultDelegation = AoDelegationBase & AoVaultData & {
278
+ export type VaultDelegation = DelegationBase & VaultData & {
258
279
  type: 'vault';
259
280
  vaultId: TransactionId;
260
281
  };
261
- export type AoStakeDelegation = AoDelegationBase & {
282
+ export type StakeDelegation = DelegationBase & {
262
283
  type: 'stake';
263
284
  startTimestamp: Timestamp;
264
285
  balance: number;
265
286
  };
266
- export type AoDelegation = AoStakeDelegation | AoVaultDelegation;
287
+ export type Delegation = StakeDelegation | VaultDelegation;
267
288
  /** Operator stake being withdrawn from a given gateway */
268
- export type AoGatewayVault = {
289
+ export type GatewayVault = {
269
290
  cursorId: string;
270
291
  vaultId: TransactionId;
271
292
  balance: number;
@@ -273,28 +294,38 @@ export type AoGatewayVault = {
273
294
  startTimestamp: Timestamp;
274
295
  };
275
296
  /** Operator stake being withdrawn from all gateway gateways */
276
- export type AoAllGatewayVaults = AoGatewayVault & {
297
+ export type AllGatewayVaults = GatewayVault & {
277
298
  gatewayAddress: WalletAddress;
278
299
  };
279
- export type AoJoinNetworkParams = Pick<AoGateway, 'operatorStake'> & Partial<AoGatewaySettings> & {
300
+ /**
301
+ * A pending or matured stake withdrawal owned by a wallet. Covers both
302
+ * operator-stake decreases and delegate-stake decreases — discriminate with
303
+ * `isDelegate`. A withdrawal is claimable when `Date.now() >= endTimestamp`.
304
+ *
305
+ * Solana-only: AO releases withdrawals automatically at maturity and has no
306
+ * equivalent per-owner read.
307
+ */
308
+ export type UserWithdrawal = AllGatewayVaults & {
309
+ isDelegate: boolean;
310
+ };
311
+ export type JoinNetworkParams = Pick<Gateway, 'operatorStake'> & Partial<GatewaySettings> & {
280
312
  observerAddress?: WalletAddress;
281
- services?: AoGatewayServices;
282
313
  };
283
- export type AoUpdateGatewaySettingsParams = AtLeastOne<Omit<AoJoinNetworkParams, 'operatorStake'>>;
284
- export type AoArNSNameParams = {
314
+ export type UpdateGatewaySettingsParams = AtLeastOne<Omit<JoinNetworkParams, 'operatorStake'>>;
315
+ export type ArNSNameParams = {
285
316
  name: string;
286
317
  };
287
- export type AoAddressParams = {
318
+ export type AddressParams = {
288
319
  address: WalletAddress;
289
320
  };
290
- export type AoBalanceParams = AoAddressParams;
291
- export type AoPaginatedAddressParams = PaginationParams<string> & AoAddressParams;
292
- export type AoDelegateStakeParams = {
321
+ export type BalanceParams = AddressParams;
322
+ export type PaginatedAddressParams = PaginationParams<string> & AddressParams;
323
+ export type DelegateStakeParams = {
293
324
  target: WalletAddress;
294
325
  stakeQty: number | mARIOToken;
295
326
  };
296
- export type AoGetArNSRecordsParams = PaginationParams<AoArNSNameDataWithName>;
297
- export type AoRedelegateStakeParams = {
327
+ export type GetArNSRecordsParams = PaginationParams<ArNSNameDataWithName>;
328
+ export type RedelegateStakeParams = {
298
329
  target: string;
299
330
  source: string;
300
331
  stakeQty: number | mARIOToken;
@@ -304,7 +335,7 @@ export declare const validIntents: readonly ["Buy-Name", "Buy-Record", "Extend-L
304
335
  export declare const intentsUsingYears: readonly ["Buy-Record", "Buy-Name", "Extend-Lease"];
305
336
  export type Intent = (typeof validIntents)[number];
306
337
  export declare const isValidIntent: (intent: string) => intent is Intent;
307
- export type AoTokenCostParams = {
338
+ export type TokenCostParams = {
308
339
  intent: Intent;
309
340
  type?: 'permabuy' | 'lease';
310
341
  years?: number;
@@ -312,13 +343,44 @@ export type AoTokenCostParams = {
312
343
  quantity?: number;
313
344
  fromAddress?: WalletAddress;
314
345
  };
315
- export declare const fundFromOptions: readonly ["balance", "stakes", "any", "turbo"];
346
+ export declare const fundFromOptions: readonly ["balance", "stakes", "withdrawal", "plan", "any", "turbo"];
316
347
  export type FundFrom = (typeof fundFromOptions)[number];
317
348
  export declare const isValidFundFrom: (fundFrom: string) => fundFrom is FundFrom;
318
- export type AoGetCostDetailsParams = AoTokenCostParams & {
349
+ /**
350
+ * One entry in a multi-source funding plan. Mirrors the on-chain
351
+ * `ario_gar::FundingSourceSpec` shape (kind + amount); `gateway` is an
352
+ * SDK-side hint for explicit (non-discovered) plans so the executor knows
353
+ * which gateway PDA to slot in for `Delegation` / `OperatorStake` sources.
354
+ *
355
+ * Multi-gateway: `Delegation` sources may span up to MAX_DELEGATION_SOURCES
356
+ * (3) distinct gateways per plan. `Balance` and `Withdrawal` sources are
357
+ * gateway-independent. Hard cap of MAX_FUNDING_SOURCES (5) total sources
358
+ * per `pay_from_funding_plan` call.
359
+ */
360
+ export type FundingSourceKind = 'balance' | 'delegation' | 'operatorStake' | 'withdrawal';
361
+ export type FundingSourceSpec = {
362
+ kind: FundingSourceKind;
363
+ /** mARIO amount drawn from this source. Must be > 0. */
364
+ amount: bigint;
365
+ /**
366
+ * Bound gateway (base58). Required for `delegation` / `operatorStake` in
367
+ * multi-gateway explicit plans; ignored for `balance` / `withdrawal`. When
368
+ * omitted on stake-locked sources, the executor falls back to
369
+ * `params.gatewayAddress`.
370
+ */
371
+ gateway?: WalletAddress;
372
+ /**
373
+ * Withdrawal vault id — required for `kind: 'withdrawal'` in multi-
374
+ * withdrawal plans. Single-withdrawal plans may omit it and rely on
375
+ * `params.withdrawalId`. Ignored for non-withdrawal kinds. Client-side
376
+ * metadata only — does NOT change the on-chain wire format.
377
+ */
378
+ withdrawalId?: bigint;
379
+ };
380
+ export type GetCostDetailsParams = TokenCostParams & {
319
381
  fundFrom?: FundFrom;
320
382
  };
321
- export type AoFundingPlan = {
383
+ export type FundingPlan = {
322
384
  address: WalletAddress;
323
385
  balance: number;
324
386
  stakes: Record<WalletAddress, {
@@ -336,55 +398,68 @@ export type CostDiscount = {
336
398
  export type CostDetailsResult = {
337
399
  tokenCost: number;
338
400
  discounts: CostDiscount[];
339
- returnedNameDetails?: AoReturnedName & {
401
+ returnedNameDetails?: ReturnedName & {
340
402
  basePrice: number;
341
403
  };
342
- fundingPlan?: AoFundingPlan;
404
+ fundingPlan?: FundingPlan;
343
405
  wincQty?: string;
344
406
  };
345
- export type AoGetVaultParams = {
407
+ export type GetVaultParams = {
346
408
  address: WalletAddress;
347
409
  vaultId: string;
348
410
  };
349
- export type AoArNSPurchaseParams = AoArNSNameParams & {
411
+ export type ArNSPurchaseParams = ArNSNameParams & {
350
412
  fundFrom?: FundFrom;
413
+ /** Gateway operator address — required when fundFrom is 'stakes' */
414
+ gatewayAddress?: WalletAddress;
415
+ /** If true, fund from operator stake instead of delegation (default: delegation) */
416
+ fundAsOperator?: boolean;
417
+ /** Withdrawal vault id — required when fundFrom is 'withdrawal' (Solana only) */
418
+ withdrawalId?: bigint;
419
+ /**
420
+ * Explicit funding plan — when provided AND fundFrom is 'plan' or 'any',
421
+ * the SDK skips source discovery and uses these sources verbatim. Caller
422
+ * is responsible for matching `sum(amounts) == cost` and respecting the
423
+ * single-gateway invariant. Solana only.
424
+ */
425
+ sources?: FundingSourceSpec[];
351
426
  paidBy?: WalletAddress | WalletAddress[];
352
427
  referrer?: string;
353
428
  };
354
- export type AoBuyRecordParams = AoArNSPurchaseParams & {
429
+ export type BuyRecordParams = ArNSPurchaseParams & {
355
430
  years?: number;
356
431
  type: 'lease' | 'permabuy';
357
432
  processId?: string;
358
433
  };
359
- export type AoExtendLeaseParams = AoArNSPurchaseParams & {
434
+ export type ExtendLeaseParams = ArNSPurchaseParams & {
360
435
  years: number;
361
436
  };
362
- export type AoIncreaseUndernameLimitParams = AoArNSPurchaseParams & {
437
+ export type IncreaseUndernameLimitParams = ArNSPurchaseParams & {
363
438
  increaseCount: number;
364
439
  };
365
- export type AoVaultedTransferParams = {
440
+ export type VaultedTransferParams = {
366
441
  recipient: WalletAddress;
367
442
  quantity: mARIOToken | number;
368
443
  lockLengthMs: number;
369
444
  revokable?: boolean;
370
445
  };
371
- export type AoRevokeVaultParams = {
446
+ export type RevokeVaultParams = {
372
447
  vaultId: TransactionId;
373
448
  recipient: WalletAddress;
374
449
  };
375
- export type AoCreateVaultParams = {
450
+ export type CreateVaultParams = {
376
451
  quantity: mARIOToken | number;
377
452
  lockLengthMs: number;
378
453
  };
379
- export type AoExtendVaultParams = {
454
+ export type ExtendVaultParams = {
380
455
  vaultId: string;
381
456
  extendLengthMs: number;
382
457
  };
383
- export type AoIncreaseVaultParams = {
458
+ export type IncreaseVaultParams = {
384
459
  vaultId: string;
385
460
  quantity: mARIOToken | number;
386
461
  };
387
- export type AoGatewayRegistrySettings = {
462
+ export type GatewayRegistrySettings = {
388
463
  delegates: {
389
464
  minStake: number;
390
465
  withdrawLengthMs: number;
@@ -439,8 +514,7 @@ export interface ArNSNameResolver {
439
514
  name: string;
440
515
  }): Promise<ArNSNameResolutionData>;
441
516
  }
442
- export interface AoARIORead extends ArNSNameResolver {
443
- process: AOProcess;
517
+ export interface ARIORead extends ArNSNameResolver {
444
518
  getInfo(): Promise<{
445
519
  Ticker: string;
446
520
  Name: string;
@@ -450,117 +524,129 @@ export interface AoARIORead extends ArNSNameResolver {
450
524
  LastCreatedEpochIndex: number;
451
525
  LastDistributedEpochIndex: number;
452
526
  }>;
453
- getTokenSupply(): Promise<AoTokenSupplyData>;
454
- getEpochSettings(): Promise<AoEpochSettings>;
455
- getGateway({ address }: AoAddressParams): Promise<AoGateway>;
456
- getGatewayDelegates({ address, ...pageParams }: AoAddressParams & PaginationParams<AoGatewayDelegateWithAddress>): Promise<PaginationResult<AoGatewayDelegateWithAddress>>;
457
- getGatewayDelegateAllowList(params: AoPaginatedAddressParams): Promise<PaginationResult<WalletAddress>>;
458
- getGateways(params?: PaginationParams<AoGatewayWithAddress>): Promise<PaginationResult<AoGatewayWithAddress>>;
459
- getDelegations(params: PaginationParams<AoDelegation> & {
527
+ getTokenSupply(): Promise<TokenSupplyData>;
528
+ getEpochSettings(): Promise<EpochSettings>;
529
+ getGateway({ address }: AddressParams): Promise<Gateway>;
530
+ getGatewayDelegates({ address, ...pageParams }: AddressParams & PaginationParams<GatewayDelegateWithAddress>): Promise<PaginationResult<GatewayDelegateWithAddress>>;
531
+ getGatewayDelegateAllowList(params: PaginatedAddressParams): Promise<PaginationResult<WalletAddress>>;
532
+ getGateways(params?: PaginationParams<GatewayWithAddress>): Promise<PaginationResult<GatewayWithAddress>>;
533
+ getDelegations(params: PaginationParams<Delegation> & {
460
534
  address: WalletAddress;
461
- }): Promise<PaginationResult<AoDelegation>>;
462
- getAllowedDelegates(params: AoPaginatedAddressParams): Promise<PaginationResult<WalletAddress>>;
463
- getGatewayVaults(params: PaginationParams<AoGatewayVault> & {
535
+ }): Promise<PaginationResult<Delegation>>;
536
+ getAllowedDelegates(params: PaginatedAddressParams): Promise<PaginationResult<WalletAddress>>;
537
+ getGatewayVaults(params: PaginationParams<GatewayVault> & {
464
538
  address: WalletAddress;
465
- }): Promise<PaginationResult<AoGatewayVault>>;
539
+ }): Promise<PaginationResult<GatewayVault>>;
466
540
  getBalance(params: {
467
541
  address: WalletAddress;
468
542
  }): Promise<number>;
469
- getBalances(params?: PaginationParams<AoBalanceWithAddress>): Promise<PaginationResult<AoBalanceWithAddress>>;
543
+ getBalances(params?: PaginationParams<BalanceWithAddress>): Promise<PaginationResult<BalanceWithAddress>>;
470
544
  getArNSRecord({ name }: {
471
545
  name: string;
472
- }): Promise<AoArNSNameData>;
473
- getArNSRecords(params?: AoGetArNSRecordsParams): Promise<PaginationResult<AoArNSNameDataWithName>>;
474
- getArNSRecordsForAddress(params: PaginationParams<AoArNSNameDataWithName> & {
546
+ }): Promise<ArNSNameData>;
547
+ getArNSRecords(params?: GetArNSRecordsParams): Promise<PaginationResult<ArNSNameDataWithName>>;
548
+ getArNSRecordsForAddress(params: PaginationParams<ArNSNameDataWithName> & {
475
549
  address: WalletAddress;
476
550
  antRegistryProcessId?: string;
477
- }): Promise<PaginationResult<AoArNSNameDataWithName>>;
478
- getArNSReservedNames(params?: PaginationParams<AoArNSReservedNameDataWithName>): Promise<PaginationResult<AoArNSReservedNameDataWithName>>;
551
+ }): Promise<PaginationResult<ArNSNameDataWithName>>;
552
+ getArNSReservedNames(params?: PaginationParams<ArNSReservedNameDataWithName>): Promise<PaginationResult<ArNSReservedNameDataWithName>>;
479
553
  getArNSReservedName({ name, }: {
480
554
  name: string;
481
- }): Promise<AoArNSReservedNameData>;
482
- getArNSReturnedNames(params?: PaginationParams<AoReturnedName>): Promise<PaginationResult<AoReturnedName>>;
555
+ }): Promise<ArNSReservedNameData>;
556
+ getArNSReturnedNames(params?: PaginationParams<ReturnedName>): Promise<PaginationResult<ReturnedName>>;
483
557
  getArNSReturnedName({ name }: {
484
558
  name: string;
485
- }): Promise<AoReturnedName>;
486
- getEpoch(epoch?: EpochInput): Promise<AoEpochData>;
487
- getCurrentEpoch(): Promise<AoEpochData>;
488
- getPrescribedObservers(epoch?: EpochInput): Promise<AoWeightedObserver[]>;
559
+ }): Promise<ReturnedName>;
560
+ getEpoch(epoch?: EpochInput): Promise<EpochData>;
561
+ getCurrentEpoch(): Promise<EpochData>;
562
+ getPrescribedObservers(epoch?: EpochInput): Promise<WeightedObserver[]>;
489
563
  getPrescribedNames(epoch?: EpochInput): Promise<string[]>;
490
- getObservations(epoch?: EpochInput): Promise<AoEpochObservationData>;
491
- getDistributions(epoch?: EpochInput): Promise<AoEpochDistributionData>;
492
- getEligibleEpochRewards(epoch?: EpochInput, params?: PaginationParams<AoEligibleDistribution>): Promise<PaginationResult<AoEligibleDistribution>>;
493
- getTokenCost({ intent, type, years, name, quantity, }: AoTokenCostParams): Promise<number>;
494
- getCostDetails({ intent, type, years, name, quantity, fundFrom, }: AoGetCostDetailsParams): Promise<CostDetailsResult>;
495
- getRegistrationFees(): Promise<AoRegistrationFees>;
564
+ getObservations(epoch?: EpochInput): Promise<EpochObservationData>;
565
+ getDistributions(epoch?: EpochInput): Promise<EpochDistributionData>;
566
+ getEligibleEpochRewards(epoch?: EpochInput, params?: PaginationParams<EligibleDistribution>): Promise<PaginationResult<EligibleDistribution>>;
567
+ getTokenCost({ intent, type, years, name, quantity, }: TokenCostParams): Promise<number>;
568
+ getCostDetails({ intent, type, years, name, quantity, fundFrom, }: GetCostDetailsParams): Promise<CostDetailsResult>;
569
+ getRegistrationFees(): Promise<RegistrationFees>;
496
570
  getDemandFactor(): Promise<number>;
497
571
  getDemandFactorSettings(): Promise<DemandFactorSettings>;
498
- getVaults(params?: PaginationParams<AoWalletVault>): Promise<PaginationResult<AoWalletVault>>;
499
- getVault({ address, vaultId }: AoGetVaultParams): Promise<AoVaultData>;
572
+ getVaults(params?: PaginationParams<WalletVault>): Promise<PaginationResult<WalletVault>>;
573
+ getVault({ address, vaultId }: GetVaultParams): Promise<VaultData>;
500
574
  getPrimaryNameRequest(params: {
501
575
  initiator: WalletAddress;
502
- }): Promise<AoPrimaryNameRequest>;
503
- getPrimaryNameRequests(params?: PaginationParams<AoPrimaryNameRequest>): Promise<PaginationResult<AoPrimaryNameRequest>>;
576
+ }): Promise<PrimaryNameRequest>;
577
+ getPrimaryNameRequests(params?: PaginationParams<PrimaryNameRequest>): Promise<PaginationResult<PrimaryNameRequest>>;
504
578
  getPrimaryName(params: {
505
579
  address: WalletAddress;
506
580
  } | {
507
581
  name: string;
508
- }): Promise<AoPrimaryName>;
509
- getPrimaryNames(params?: PaginationParams<AoPrimaryName>): Promise<PaginationResult<AoPrimaryName>>;
582
+ }): Promise<PrimaryName>;
583
+ getPrimaryNames(params?: PaginationParams<PrimaryName>): Promise<PaginationResult<PrimaryName>>;
510
584
  getRedelegationFee(params: {
511
585
  address: WalletAddress;
512
- }): Promise<AoRedelegationFeeInfo>;
513
- getGatewayRegistrySettings(): Promise<AoGatewayRegistrySettings>;
514
- getAllDelegates(params?: PaginationParams<AoAllDelegates>): Promise<PaginationResult<AoAllDelegates>>;
515
- getAllGatewayVaults(params?: PaginationParams<AoAllGatewayVaults>): Promise<PaginationResult<AoAllGatewayVaults>>;
586
+ }): Promise<RedelegationFeeInfo>;
587
+ getGatewayRegistrySettings(): Promise<GatewayRegistrySettings>;
588
+ getAllDelegates(params?: PaginationParams<AllDelegates>): Promise<PaginationResult<AllDelegates>>;
589
+ getAllGatewayVaults(params?: PaginationParams<AllGatewayVaults>): Promise<PaginationResult<AllGatewayVaults>>;
590
+ getWithdrawals(params: PaginationParams<UserWithdrawal> & {
591
+ address: WalletAddress;
592
+ }): Promise<PaginationResult<UserWithdrawal>>;
516
593
  }
517
- export interface AoARIOWrite extends AoARIORead {
518
- transfer: AoWriteAction<{
594
+ export interface ARIOWrite extends ARIORead {
595
+ transfer: WriteAction<{
519
596
  target: WalletAddress;
520
597
  qty: number | mARIOToken;
521
598
  }>;
522
- vaultedTransfer: AoWriteAction<AoVaultedTransferParams>;
523
- revokeVault: AoWriteAction<AoRevokeVaultParams>;
524
- createVault: AoWriteAction<AoCreateVaultParams>;
525
- extendVault: AoWriteAction<AoExtendVaultParams>;
526
- increaseVault: AoWriteAction<AoIncreaseVaultParams>;
527
- joinNetwork: AoWriteAction<AoJoinNetworkParams>;
528
- leaveNetwork: (options?: WriteOptions) => Promise<AoMessageResult>;
529
- updateGatewaySettings: AoWriteAction<AoUpdateGatewaySettingsParams>;
530
- increaseOperatorStake: AoWriteAction<{
599
+ vaultedTransfer: WriteAction<VaultedTransferParams>;
600
+ revokeVault: WriteAction<RevokeVaultParams>;
601
+ createVault: WriteAction<CreateVaultParams>;
602
+ extendVault: WriteAction<ExtendVaultParams>;
603
+ increaseVault: WriteAction<IncreaseVaultParams>;
604
+ joinNetwork: WriteAction<JoinNetworkParams>;
605
+ leaveNetwork: (options?: WriteOptions) => Promise<MessageResult>;
606
+ updateGatewaySettings: WriteAction<UpdateGatewaySettingsParams>;
607
+ increaseOperatorStake: WriteAction<{
531
608
  increaseQty: number | mARIOToken;
532
609
  }>;
533
- decreaseOperatorStake: AoWriteAction<{
610
+ decreaseOperatorStake: WriteAction<{
534
611
  decreaseQty: number | mARIOToken;
535
612
  instant?: boolean;
536
613
  }>;
537
- delegateStake: AoWriteAction<AoDelegateStakeParams>;
538
- decreaseDelegateStake: AoWriteAction<{
614
+ delegateStake: WriteAction<DelegateStakeParams>;
615
+ decreaseDelegateStake: WriteAction<{
539
616
  target: WalletAddress;
540
617
  decreaseQty: number | mARIOToken;
541
618
  instant?: boolean;
542
619
  }>;
543
- instantWithdrawal: AoWriteAction<{
620
+ instantWithdrawal: WriteAction<{
544
621
  gatewayAddress?: WalletAddress;
545
622
  vaultId: string;
546
623
  }>;
547
- saveObservations: AoWriteAction<{
624
+ saveObservations: WriteAction<{
548
625
  reportTxId: TransactionId;
549
626
  failedGateways: WalletAddress[];
550
627
  }>;
551
- buyRecord: AoWriteAction<AoBuyRecordParams, AoMessageResult, keyof BuyArNSNameProgressEvents, BuyArNSNameProgressEvents[keyof BuyArNSNameProgressEvents]>;
552
- upgradeRecord: AoWriteAction<AoArNSPurchaseParams, AoMessageResult>;
553
- extendLease: AoWriteAction<AoExtendLeaseParams, AoMessageResult>;
554
- increaseUndernameLimit: AoWriteAction<AoIncreaseUndernameLimitParams, AoMessageResult>;
555
- cancelWithdrawal: AoWriteAction<{
628
+ buyRecord: WriteAction<BuyRecordParams, MessageResult, keyof BuyArNSNameProgressEvents, BuyArNSNameProgressEvents[keyof BuyArNSNameProgressEvents]>;
629
+ upgradeRecord: WriteAction<ArNSPurchaseParams, MessageResult>;
630
+ extendLease: WriteAction<ExtendLeaseParams, MessageResult>;
631
+ increaseUndernameLimit: WriteAction<IncreaseUndernameLimitParams, MessageResult>;
632
+ cancelWithdrawal: WriteAction<{
556
633
  gatewayAddress?: WalletAddress;
557
634
  vaultId: string;
558
635
  }>;
559
- requestPrimaryName(params: AoArNSPurchaseParams, options?: WriteOptions): Promise<AoMessageResult<AoCreatePrimaryNameRequest>>;
560
- setPrimaryName: AoWriteAction<AoArNSPurchaseParams, AoMessageResult, keyof SetPrimaryNameProgressEvents, SetPrimaryNameProgressEvents[keyof SetPrimaryNameProgressEvents]>;
561
- redelegateStake: AoWriteAction<AoRedelegateStakeParams>;
636
+ requestPrimaryName(params: ArNSPurchaseParams, options?: WriteOptions): Promise<MessageResult<CreatePrimaryNameRequest>>;
637
+ setPrimaryName: WriteAction<ArNSPurchaseParams, MessageResult, keyof SetPrimaryNameProgressEvents, SetPrimaryNameProgressEvents[keyof SetPrimaryNameProgressEvents]>;
638
+ redelegateStake: WriteAction<RedelegateStakeParams>;
639
+ /**
640
+ * Reconcile an ANT NFT's on-chain Attributes plugin (`ArNS Name`, `Type`,
641
+ * `Undername Limit`) with its current `ArnsRecord` state. Permissionless
642
+ * cache-sync — useful when a `buyRecord`/`reassignName` was performed on
643
+ * behalf of a different ANT holder, leaving traits unpopulated.
644
+ *
645
+ * Solana-only: throws on the AO backend (AO ANTs have no NFT trait surface).
646
+ */
647
+ syncAttributes: WriteAction<{
648
+ name: string;
649
+ }, MessageResult>;
562
650
  }
563
- export declare function isProcessConfiguration(config: object | undefined): config is Required<ProcessConfiguration> & Record<string, never>;
564
- export declare function isProcessIdConfiguration(config: object | undefined): config is Required<ProcessIdConfig> & Record<string, never>;
565
- export declare function isLeasedArNSRecord(record: AoArNSNameData): record is AoArNSLeaseData;
651
+ export declare function isLeasedArNSRecord(record: ArNSNameData): record is ArNSLeaseData;
566
652
  export {};