@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.
- package/README.md +682 -600
- package/lib/esm/cli/cli.js +188 -152
- package/lib/esm/cli/commands/antCommands.js +23 -58
- package/lib/esm/cli/commands/arnsPurchaseCommands.js +48 -30
- package/lib/esm/cli/commands/escrowCommands.js +221 -0
- package/lib/esm/cli/commands/gatewayWriteCommands.js +142 -23
- package/lib/esm/cli/commands/pruneCommands.js +150 -0
- package/lib/esm/cli/commands/readCommands.js +22 -3
- package/lib/esm/cli/commands/transfer.js +6 -6
- package/lib/esm/cli/options.js +124 -58
- package/lib/esm/cli/utils.js +280 -174
- package/lib/esm/common/ant-registry.js +17 -143
- package/lib/esm/common/ant.js +44 -1167
- package/lib/esm/common/faucet.js +11 -6
- package/lib/esm/common/index.js +0 -4
- package/lib/esm/common/io.js +25 -1412
- package/lib/esm/constants.js +13 -19
- package/lib/esm/solana/ant-readable.js +724 -0
- package/lib/esm/solana/ant-registry-readable.js +133 -0
- package/lib/esm/solana/ant-registry-writeable.js +472 -0
- package/lib/esm/solana/ant-writeable.js +384 -0
- package/lib/esm/solana/ata.js +70 -0
- package/lib/esm/solana/canonical-message.js +128 -0
- package/lib/esm/solana/clusters.js +111 -0
- package/lib/esm/solana/constants.js +146 -0
- package/lib/esm/solana/delegation-math.js +112 -0
- package/lib/esm/solana/deserialize.js +711 -0
- package/lib/esm/solana/escrow.js +839 -0
- package/lib/{cjs/utils/json.js → esm/solana/events.js} +15 -10
- package/lib/esm/solana/funding-plan.js +699 -0
- package/lib/esm/solana/index.js +126 -0
- package/lib/esm/solana/instruction.js +39 -0
- package/lib/esm/solana/io-readable.js +2182 -0
- package/lib/esm/solana/io-writeable.js +3196 -0
- package/lib/esm/solana/json-rpc.js +90 -0
- package/lib/esm/solana/metadata.js +81 -0
- package/lib/esm/solana/mpl-core.js +192 -0
- package/lib/esm/solana/pda.js +332 -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 +372 -0
- package/lib/esm/solana/spawn-ant.js +224 -0
- package/lib/esm/solana/types.js +1 -0
- package/lib/esm/types/ant.js +27 -15
- package/lib/esm/types/io.js +8 -11
- package/lib/esm/utils/ant.js +0 -63
- package/lib/esm/utils/index.js +0 -3
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/antCommands.d.ts +5 -13
- package/lib/types/cli/commands/arnsPurchaseCommands.d.ts +33 -7
- package/lib/types/cli/commands/escrowCommands.d.ts +68 -0
- package/lib/types/cli/commands/gatewayWriteCommands.d.ts +12 -11
- package/lib/types/cli/commands/pruneCommands.d.ts +31 -0
- package/lib/types/cli/commands/readCommands.d.ts +27 -22
- package/lib/types/cli/commands/transfer.d.ts +9 -9
- package/lib/types/cli/options.d.ts +76 -21
- package/lib/types/cli/types.d.ts +11 -13
- package/lib/types/cli/utils.d.ts +71 -31
- package/lib/types/common/ant-registry.d.ts +49 -47
- package/lib/types/common/ant.d.ts +54 -539
- 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 +51 -263
- package/lib/types/constants.d.ts +11 -18
- package/lib/types/solana/ant-readable.d.ts +180 -0
- package/lib/types/solana/ant-registry-readable.d.ts +105 -0
- package/lib/types/solana/ant-registry-writeable.d.ts +249 -0
- package/lib/types/solana/ant-writeable.d.ts +177 -0
- package/lib/types/solana/ata.d.ts +44 -0
- package/lib/types/solana/canonical-message.d.ts +121 -0
- package/lib/types/solana/clusters.d.ts +109 -0
- package/lib/types/solana/constants.d.ts +119 -0
- package/lib/types/solana/delegation-math.d.ts +45 -0
- package/lib/types/solana/deserialize.d.ts +262 -0
- package/lib/types/solana/escrow.d.ts +480 -0
- package/lib/types/solana/events.d.ts +38 -0
- package/lib/types/solana/funding-plan.d.ts +225 -0
- package/lib/types/solana/index.d.ts +87 -0
- package/lib/types/solana/instruction.d.ts +39 -0
- package/lib/types/solana/io-readable.d.ts +499 -0
- package/lib/types/solana/io-writeable.d.ts +893 -0
- package/lib/types/solana/json-rpc.d.ts +47 -0
- package/lib/types/solana/metadata.d.ts +84 -0
- package/lib/types/solana/mpl-core.d.ts +120 -0
- package/lib/types/solana/pda.d.ts +95 -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 +94 -0
- package/lib/types/solana/spawn-ant.d.ts +145 -0
- package/lib/types/solana/types.d.ts +82 -0
- package/lib/types/types/ant-registry.d.ts +43 -4
- package/lib/types/types/ant.d.ts +114 -96
- 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 +244 -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 +36 -33
- package/lib/cjs/cli/cli.js +0 -822
- package/lib/cjs/cli/commands/antCommands.js +0 -113
- package/lib/cjs/cli/commands/arnsPurchaseCommands.js +0 -212
- package/lib/cjs/cli/commands/gatewayWriteCommands.js +0 -210
- package/lib/cjs/cli/commands/readCommands.js +0 -215
- package/lib/cjs/cli/commands/transfer.js +0 -159
- package/lib/cjs/cli/options.js +0 -470
- package/lib/cjs/cli/types.js +0 -2
- package/lib/cjs/cli/utils.js +0 -639
- package/lib/cjs/common/ant-registry.js +0 -155
- package/lib/cjs/common/ant-versions.js +0 -93
- package/lib/cjs/common/ant.js +0 -1182
- package/lib/cjs/common/arweave.js +0 -27
- package/lib/cjs/common/contracts/ao-process.js +0 -224
- package/lib/cjs/common/error.js +0 -64
- package/lib/cjs/common/faucet.js +0 -150
- package/lib/cjs/common/hyperbeam/hb.js +0 -173
- package/lib/cjs/common/index.js +0 -42
- package/lib/cjs/common/io.js +0 -1423
- package/lib/cjs/common/logger.js +0 -83
- package/lib/cjs/common/loggers/winston.js +0 -68
- package/lib/cjs/common/marketplace.js +0 -731
- package/lib/cjs/common/turbo.js +0 -223
- package/lib/cjs/constants.js +0 -41
- package/lib/cjs/node/index.js +0 -39
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/types/ant-registry.js +0 -2
- package/lib/cjs/types/ant.js +0 -168
- package/lib/cjs/types/common.js +0 -2
- package/lib/cjs/types/faucet.js +0 -2
- package/lib/cjs/types/index.js +0 -37
- package/lib/cjs/types/io.js +0 -51
- package/lib/cjs/types/token.js +0 -116
- package/lib/cjs/utils/ant.js +0 -108
- package/lib/cjs/utils/ao.js +0 -432
- package/lib/cjs/utils/arweave.js +0 -285
- package/lib/cjs/utils/base64.js +0 -62
- package/lib/cjs/utils/hash.js +0 -56
- package/lib/cjs/utils/index.js +0 -38
- package/lib/cjs/utils/processes.js +0 -173
- package/lib/cjs/utils/random.js +0 -30
- package/lib/cjs/utils/schema.js +0 -15
- package/lib/cjs/utils/url.js +0 -37
- package/lib/cjs/version.js +0 -20
- package/lib/cjs/web/index.js +0 -41
- 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 -220
- package/lib/esm/common/hyperbeam/hb.js +0 -169
- package/lib/esm/common/marketplace.js +0 -724
- package/lib/esm/common/turbo.js +0 -215
- package/lib/esm/node/index.js +0 -20
- package/lib/esm/utils/ao.js +0 -420
- 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 -47
- package/lib/types/common/hyperbeam/hb.d.ts +0 -88
- package/lib/types/common/marketplace.d.ts +0 -568
- package/lib/types/common/turbo.d.ts +0 -61
- package/lib/types/node/index.d.ts +0 -20
- 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
package/lib/types/types/io.d.ts
CHANGED
|
@@ -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 {
|
|
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:
|
|
45
|
+
epochIndex: EpochIndex;
|
|
51
46
|
};
|
|
52
47
|
export type EpochInput = EpochTimestampInput | EpochIndexInput | undefined;
|
|
53
|
-
export type
|
|
54
|
-
export type
|
|
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
|
|
59
|
-
export type
|
|
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
|
|
64
|
-
export type
|
|
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
|
|
65
|
+
export type ArNSReservedNameData = {
|
|
71
66
|
target?: string;
|
|
72
67
|
endTimestamp?: number;
|
|
73
68
|
};
|
|
74
|
-
export type
|
|
75
|
-
export type
|
|
69
|
+
export type ArNSNameData = ArNSPermabuyData | ArNSLeaseData;
|
|
70
|
+
export type ArNSNameDataWithName = ArNSNameData & {
|
|
76
71
|
name: string;
|
|
77
72
|
};
|
|
78
|
-
export type
|
|
73
|
+
export type ArNSReservedNameDataWithName = ArNSReservedNameData & {
|
|
79
74
|
name: string;
|
|
80
75
|
};
|
|
81
|
-
export type
|
|
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
|
|
83
|
+
export type ArNSPermabuyData = ArNSBaseNameData & {
|
|
89
84
|
type: 'permabuy';
|
|
90
85
|
};
|
|
91
|
-
export type
|
|
86
|
+
export type ArNSLeaseData = ArNSBaseNameData & {
|
|
92
87
|
type: 'lease';
|
|
93
88
|
endTimestamp: Timestamp;
|
|
94
89
|
};
|
|
95
|
-
export type
|
|
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
|
|
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
|
|
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
|
|
110
|
+
export type EpochDistributed = EpochDistributionTotalsData & {
|
|
116
111
|
/** @deprecated Use getEligibleEpochRewards getEpochDistributions, will be removed in a future release */
|
|
117
|
-
rewards:
|
|
112
|
+
rewards: EpochDistributionRewards;
|
|
118
113
|
distributedTimestamp: Timestamp;
|
|
119
114
|
totalDistributedRewards: number;
|
|
120
115
|
};
|
|
121
|
-
export type
|
|
122
|
-
export type
|
|
123
|
-
epochIndex:
|
|
116
|
+
export type EpochDistributionData = EpochDistributionTotalsData | EpochDistributed;
|
|
117
|
+
export type EpochData<D = EpochDistributionData> = {
|
|
118
|
+
epochIndex: EpochIndex;
|
|
124
119
|
startHeight: BlockHeight;
|
|
125
|
-
observations:
|
|
126
|
-
prescribedObservers:
|
|
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:
|
|
140
|
-
export declare const isDistributedEpoch: (data:
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
168
|
-
bundlers:
|
|
172
|
+
export type GatewayServices = {
|
|
173
|
+
bundlers: GatewayService[];
|
|
169
174
|
};
|
|
170
|
-
export type
|
|
171
|
-
export type
|
|
172
|
-
export type
|
|
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
|
|
177
|
-
settings:
|
|
178
|
-
stats:
|
|
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:
|
|
186
|
-
services?:
|
|
190
|
+
weights: GatewayWeights;
|
|
191
|
+
services?: GatewayServices;
|
|
187
192
|
};
|
|
188
|
-
export type
|
|
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
|
|
202
|
+
export type WeightedObserver = {
|
|
198
203
|
gatewayAddress: WalletAddress;
|
|
199
204
|
observerAddress: WalletAddress;
|
|
200
205
|
stake: number;
|
|
201
206
|
startTimestamp: number;
|
|
202
|
-
} &
|
|
203
|
-
export type
|
|
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
|
|
218
|
+
export type GatewayWithAddress = Gateway & {
|
|
214
219
|
gatewayAddress: WalletAddress;
|
|
215
220
|
};
|
|
216
|
-
export type
|
|
221
|
+
export type GatewayDelegate = {
|
|
217
222
|
delegatedStake: number;
|
|
218
223
|
startTimestamp: Timestamp;
|
|
219
224
|
};
|
|
220
|
-
export type
|
|
225
|
+
export type GatewayDelegateWithAddress = GatewayDelegate & {
|
|
221
226
|
address: WalletAddress;
|
|
222
227
|
};
|
|
223
|
-
export type
|
|
228
|
+
export type AllDelegates = GatewayDelegateWithAddress & {
|
|
224
229
|
gatewayAddress: WalletAddress;
|
|
225
230
|
vaultedStake: number;
|
|
226
231
|
cursorId: string;
|
|
227
232
|
};
|
|
228
|
-
export type
|
|
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
|
-
|
|
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
|
|
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
|
|
273
|
+
export type DelegationBase = {
|
|
253
274
|
type: 'stake' | 'vault';
|
|
254
275
|
gatewayAddress: WalletAddress;
|
|
255
276
|
delegationId: string;
|
|
256
277
|
};
|
|
257
|
-
export type
|
|
278
|
+
export type VaultDelegation = DelegationBase & VaultData & {
|
|
258
279
|
type: 'vault';
|
|
259
280
|
vaultId: TransactionId;
|
|
260
281
|
};
|
|
261
|
-
export type
|
|
282
|
+
export type StakeDelegation = DelegationBase & {
|
|
262
283
|
type: 'stake';
|
|
263
284
|
startTimestamp: Timestamp;
|
|
264
285
|
balance: number;
|
|
265
286
|
};
|
|
266
|
-
export type
|
|
287
|
+
export type Delegation = StakeDelegation | VaultDelegation;
|
|
267
288
|
/** Operator stake being withdrawn from a given gateway */
|
|
268
|
-
export type
|
|
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
|
|
297
|
+
export type AllGatewayVaults = GatewayVault & {
|
|
277
298
|
gatewayAddress: WalletAddress;
|
|
278
299
|
};
|
|
279
|
-
|
|
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
|
|
284
|
-
export type
|
|
314
|
+
export type UpdateGatewaySettingsParams = AtLeastOne<Omit<JoinNetworkParams, 'operatorStake'>>;
|
|
315
|
+
export type ArNSNameParams = {
|
|
285
316
|
name: string;
|
|
286
317
|
};
|
|
287
|
-
export type
|
|
318
|
+
export type AddressParams = {
|
|
288
319
|
address: WalletAddress;
|
|
289
320
|
};
|
|
290
|
-
export type
|
|
291
|
-
export type
|
|
292
|
-
export type
|
|
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
|
|
297
|
-
export type
|
|
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
|
|
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
|
-
|
|
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
|
|
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?:
|
|
401
|
+
returnedNameDetails?: ReturnedName & {
|
|
340
402
|
basePrice: number;
|
|
341
403
|
};
|
|
342
|
-
fundingPlan?:
|
|
404
|
+
fundingPlan?: FundingPlan;
|
|
343
405
|
wincQty?: string;
|
|
344
406
|
};
|
|
345
|
-
export type
|
|
407
|
+
export type GetVaultParams = {
|
|
346
408
|
address: WalletAddress;
|
|
347
409
|
vaultId: string;
|
|
348
410
|
};
|
|
349
|
-
export type
|
|
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
|
|
429
|
+
export type BuyRecordParams = ArNSPurchaseParams & {
|
|
355
430
|
years?: number;
|
|
356
431
|
type: 'lease' | 'permabuy';
|
|
357
432
|
processId?: string;
|
|
358
433
|
};
|
|
359
|
-
export type
|
|
434
|
+
export type ExtendLeaseParams = ArNSPurchaseParams & {
|
|
360
435
|
years: number;
|
|
361
436
|
};
|
|
362
|
-
export type
|
|
437
|
+
export type IncreaseUndernameLimitParams = ArNSPurchaseParams & {
|
|
363
438
|
increaseCount: number;
|
|
364
439
|
};
|
|
365
|
-
export type
|
|
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
|
|
446
|
+
export type RevokeVaultParams = {
|
|
372
447
|
vaultId: TransactionId;
|
|
373
448
|
recipient: WalletAddress;
|
|
374
449
|
};
|
|
375
|
-
export type
|
|
450
|
+
export type CreateVaultParams = {
|
|
376
451
|
quantity: mARIOToken | number;
|
|
377
452
|
lockLengthMs: number;
|
|
378
453
|
};
|
|
379
|
-
export type
|
|
454
|
+
export type ExtendVaultParams = {
|
|
380
455
|
vaultId: string;
|
|
381
456
|
extendLengthMs: number;
|
|
382
457
|
};
|
|
383
|
-
export type
|
|
458
|
+
export type IncreaseVaultParams = {
|
|
384
459
|
vaultId: string;
|
|
385
460
|
quantity: mARIOToken | number;
|
|
386
461
|
};
|
|
387
|
-
export type
|
|
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
|
|
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<
|
|
454
|
-
getEpochSettings(): Promise<
|
|
455
|
-
getGateway({ address }:
|
|
456
|
-
getGatewayDelegates({ address, ...pageParams }:
|
|
457
|
-
getGatewayDelegateAllowList(params:
|
|
458
|
-
getGateways(params?: PaginationParams<
|
|
459
|
-
getDelegations(params: PaginationParams<
|
|
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<
|
|
462
|
-
getAllowedDelegates(params:
|
|
463
|
-
getGatewayVaults(params: PaginationParams<
|
|
535
|
+
}): Promise<PaginationResult<Delegation>>;
|
|
536
|
+
getAllowedDelegates(params: PaginatedAddressParams): Promise<PaginationResult<WalletAddress>>;
|
|
537
|
+
getGatewayVaults(params: PaginationParams<GatewayVault> & {
|
|
464
538
|
address: WalletAddress;
|
|
465
|
-
}): Promise<PaginationResult<
|
|
539
|
+
}): Promise<PaginationResult<GatewayVault>>;
|
|
466
540
|
getBalance(params: {
|
|
467
541
|
address: WalletAddress;
|
|
468
542
|
}): Promise<number>;
|
|
469
|
-
getBalances(params?: PaginationParams<
|
|
543
|
+
getBalances(params?: PaginationParams<BalanceWithAddress>): Promise<PaginationResult<BalanceWithAddress>>;
|
|
470
544
|
getArNSRecord({ name }: {
|
|
471
545
|
name: string;
|
|
472
|
-
}): Promise<
|
|
473
|
-
getArNSRecords(params?:
|
|
474
|
-
getArNSRecordsForAddress(params: PaginationParams<
|
|
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<
|
|
478
|
-
getArNSReservedNames(params?: PaginationParams<
|
|
551
|
+
}): Promise<PaginationResult<ArNSNameDataWithName>>;
|
|
552
|
+
getArNSReservedNames(params?: PaginationParams<ArNSReservedNameDataWithName>): Promise<PaginationResult<ArNSReservedNameDataWithName>>;
|
|
479
553
|
getArNSReservedName({ name, }: {
|
|
480
554
|
name: string;
|
|
481
|
-
}): Promise<
|
|
482
|
-
getArNSReturnedNames(params?: PaginationParams<
|
|
555
|
+
}): Promise<ArNSReservedNameData>;
|
|
556
|
+
getArNSReturnedNames(params?: PaginationParams<ReturnedName>): Promise<PaginationResult<ReturnedName>>;
|
|
483
557
|
getArNSReturnedName({ name }: {
|
|
484
558
|
name: string;
|
|
485
|
-
}): Promise<
|
|
486
|
-
getEpoch(epoch?: EpochInput): Promise<
|
|
487
|
-
getCurrentEpoch(): Promise<
|
|
488
|
-
getPrescribedObservers(epoch?: EpochInput): Promise<
|
|
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<
|
|
491
|
-
getDistributions(epoch?: EpochInput): Promise<
|
|
492
|
-
getEligibleEpochRewards(epoch?: EpochInput, params?: PaginationParams<
|
|
493
|
-
getTokenCost({ intent, type, years, name, quantity, }:
|
|
494
|
-
getCostDetails({ intent, type, years, name, quantity, fundFrom, }:
|
|
495
|
-
getRegistrationFees(): Promise<
|
|
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<
|
|
499
|
-
getVault({ address, vaultId }:
|
|
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<
|
|
503
|
-
getPrimaryNameRequests(params?: PaginationParams<
|
|
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<
|
|
509
|
-
getPrimaryNames(params?: PaginationParams<
|
|
582
|
+
}): Promise<PrimaryName>;
|
|
583
|
+
getPrimaryNames(params?: PaginationParams<PrimaryName>): Promise<PaginationResult<PrimaryName>>;
|
|
510
584
|
getRedelegationFee(params: {
|
|
511
585
|
address: WalletAddress;
|
|
512
|
-
}): Promise<
|
|
513
|
-
getGatewayRegistrySettings(): Promise<
|
|
514
|
-
getAllDelegates(params?: PaginationParams<
|
|
515
|
-
getAllGatewayVaults(params?: PaginationParams<
|
|
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
|
|
518
|
-
transfer:
|
|
594
|
+
export interface ARIOWrite extends ARIORead {
|
|
595
|
+
transfer: WriteAction<{
|
|
519
596
|
target: WalletAddress;
|
|
520
597
|
qty: number | mARIOToken;
|
|
521
598
|
}>;
|
|
522
|
-
vaultedTransfer:
|
|
523
|
-
revokeVault:
|
|
524
|
-
createVault:
|
|
525
|
-
extendVault:
|
|
526
|
-
increaseVault:
|
|
527
|
-
joinNetwork:
|
|
528
|
-
leaveNetwork: (options?: WriteOptions) => Promise<
|
|
529
|
-
updateGatewaySettings:
|
|
530
|
-
increaseOperatorStake:
|
|
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:
|
|
610
|
+
decreaseOperatorStake: WriteAction<{
|
|
534
611
|
decreaseQty: number | mARIOToken;
|
|
535
612
|
instant?: boolean;
|
|
536
613
|
}>;
|
|
537
|
-
delegateStake:
|
|
538
|
-
decreaseDelegateStake:
|
|
614
|
+
delegateStake: WriteAction<DelegateStakeParams>;
|
|
615
|
+
decreaseDelegateStake: WriteAction<{
|
|
539
616
|
target: WalletAddress;
|
|
540
617
|
decreaseQty: number | mARIOToken;
|
|
541
618
|
instant?: boolean;
|
|
542
619
|
}>;
|
|
543
|
-
instantWithdrawal:
|
|
620
|
+
instantWithdrawal: WriteAction<{
|
|
544
621
|
gatewayAddress?: WalletAddress;
|
|
545
622
|
vaultId: string;
|
|
546
623
|
}>;
|
|
547
|
-
saveObservations:
|
|
624
|
+
saveObservations: WriteAction<{
|
|
548
625
|
reportTxId: TransactionId;
|
|
549
626
|
failedGateways: WalletAddress[];
|
|
550
627
|
}>;
|
|
551
|
-
buyRecord:
|
|
552
|
-
upgradeRecord:
|
|
553
|
-
extendLease:
|
|
554
|
-
increaseUndernameLimit:
|
|
555
|
-
cancelWithdrawal:
|
|
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:
|
|
560
|
-
setPrimaryName:
|
|
561
|
-
redelegateStake:
|
|
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
|
|
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 {};
|