@ar.io/sdk 3.4.0-alpha.3 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/bundles/web.bundle.min.js +65 -65
- package/lib/cjs/cli/cli.js +18 -0
- package/lib/cjs/cli/commands/transfer.js +83 -1
- package/lib/cjs/cli/options.js +5 -1
- package/lib/cjs/cli/utils.js +15 -1
- package/lib/cjs/common/io.js +36 -0
- package/lib/cjs/types/io.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +19 -1
- package/lib/esm/cli/commands/transfer.js +80 -1
- package/lib/esm/cli/options.js +5 -1
- package/lib/esm/cli/utils.js +13 -0
- package/lib/esm/common/io.js +36 -0
- package/lib/esm/types/io.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/transfer.d.ts +16 -1
- package/lib/types/cli/options.d.ts +4 -0
- package/lib/types/cli/utils.d.ts +1 -0
- package/lib/types/common/io.d.ts +4 -1
- package/lib/types/types/ant.d.ts +18 -21
- package/lib/types/types/common.d.ts +2 -0
- package/lib/types/types/io.d.ts +43 -31
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/types/types/io.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { AOProcess } from '../common/index.js';
|
|
17
|
-
import { AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AtLeastOne, BlockHeight, ProcessId, Timestamp, TransactionId, WalletAddress, WriteOptions } from './index.js';
|
|
17
|
+
import { AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AoWriteAction, AtLeastOne, BlockHeight, ProcessId, Timestamp, TransactionId, WalletAddress, WriteOptions } from './index.js';
|
|
18
18
|
import { mARIOToken } from './token.js';
|
|
19
19
|
type NestedKeys<T> = T extends object ? T extends readonly unknown[] ? never : {
|
|
20
20
|
[K in keyof T & string]: T[K] extends object ? `${K}.${NestedKeys<T[K]>}` : K;
|
|
@@ -345,6 +345,18 @@ export type AoRevokeVaultParams = {
|
|
|
345
345
|
vaultId: TransactionId;
|
|
346
346
|
recipient: WalletAddress;
|
|
347
347
|
};
|
|
348
|
+
export type AoCreateVaultParams = {
|
|
349
|
+
quantity: mARIOToken | number;
|
|
350
|
+
lockLengthMs: number;
|
|
351
|
+
};
|
|
352
|
+
export type AoExtendVaultParams = {
|
|
353
|
+
vaultId: string;
|
|
354
|
+
extendLengthMs: number;
|
|
355
|
+
};
|
|
356
|
+
export type AoIncreaseVaultParams = {
|
|
357
|
+
vaultId: string;
|
|
358
|
+
quantity: mARIOToken | number;
|
|
359
|
+
};
|
|
348
360
|
export type AoGatewayRegistrySettings = {
|
|
349
361
|
delegates: {
|
|
350
362
|
minStake: number;
|
|
@@ -445,49 +457,49 @@ export interface AoARIORead {
|
|
|
445
457
|
getAllGatewayVaults(params?: PaginationParams<AoAllGatewayVaults>): Promise<PaginationResult<AoAllGatewayVaults>>;
|
|
446
458
|
}
|
|
447
459
|
export interface AoARIOWrite extends AoARIORead {
|
|
448
|
-
transfer
|
|
460
|
+
transfer: AoWriteAction<{
|
|
449
461
|
target: WalletAddress;
|
|
450
|
-
qty: number;
|
|
451
|
-
}
|
|
452
|
-
vaultedTransfer
|
|
453
|
-
revokeVault
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
462
|
+
qty: number | mARIOToken;
|
|
463
|
+
}>;
|
|
464
|
+
vaultedTransfer: AoWriteAction<AoVaultedTransferParams>;
|
|
465
|
+
revokeVault: AoWriteAction<AoRevokeVaultParams>;
|
|
466
|
+
createVault: AoWriteAction<AoCreateVaultParams>;
|
|
467
|
+
extendVault: AoWriteAction<AoExtendVaultParams>;
|
|
468
|
+
increaseVault: AoWriteAction<AoIncreaseVaultParams>;
|
|
469
|
+
joinNetwork: AoWriteAction<AoJoinNetworkParams>;
|
|
470
|
+
leaveNetwork: (options?: WriteOptions) => Promise<AoMessageResult>;
|
|
471
|
+
updateGatewaySettings: AoWriteAction<AoUpdateGatewaySettingsParams>;
|
|
472
|
+
increaseOperatorStake: AoWriteAction<{
|
|
458
473
|
increaseQty: number | mARIOToken;
|
|
459
|
-
}
|
|
460
|
-
decreaseOperatorStake
|
|
474
|
+
}>;
|
|
475
|
+
decreaseOperatorStake: AoWriteAction<{
|
|
461
476
|
decreaseQty: number | mARIOToken;
|
|
462
477
|
instant?: boolean;
|
|
463
|
-
}
|
|
464
|
-
delegateStake
|
|
465
|
-
|
|
466
|
-
stakeQty: number | mARIOToken;
|
|
467
|
-
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
468
|
-
decreaseDelegateStake(params: {
|
|
478
|
+
}>;
|
|
479
|
+
delegateStake: AoWriteAction<AoDelegateStakeParams>;
|
|
480
|
+
decreaseDelegateStake: AoWriteAction<{
|
|
469
481
|
target: WalletAddress;
|
|
470
482
|
decreaseQty: number | mARIOToken;
|
|
471
483
|
instant?: boolean;
|
|
472
|
-
}
|
|
473
|
-
instantWithdrawal
|
|
484
|
+
}>;
|
|
485
|
+
instantWithdrawal: AoWriteAction<{
|
|
474
486
|
gatewayAddress?: WalletAddress;
|
|
475
487
|
vaultId: string;
|
|
476
|
-
}
|
|
477
|
-
saveObservations
|
|
488
|
+
}>;
|
|
489
|
+
saveObservations: AoWriteAction<{
|
|
478
490
|
reportTxId: TransactionId;
|
|
479
491
|
failedGateways: WalletAddress[];
|
|
480
|
-
}
|
|
481
|
-
buyRecord
|
|
482
|
-
upgradeRecord
|
|
483
|
-
extendLease
|
|
484
|
-
increaseUndernameLimit
|
|
485
|
-
cancelWithdrawal
|
|
492
|
+
}>;
|
|
493
|
+
buyRecord: AoWriteAction<AoBuyRecordParams>;
|
|
494
|
+
upgradeRecord: AoWriteAction<AoArNSPurchaseParams>;
|
|
495
|
+
extendLease: AoWriteAction<AoExtendLeaseParams>;
|
|
496
|
+
increaseUndernameLimit: AoWriteAction<AoIncreaseUndernameLimitParams>;
|
|
497
|
+
cancelWithdrawal: AoWriteAction<{
|
|
486
498
|
gatewayAddress?: WalletAddress;
|
|
487
499
|
vaultId: string;
|
|
488
|
-
}
|
|
489
|
-
requestPrimaryName
|
|
490
|
-
redelegateStake
|
|
500
|
+
}>;
|
|
501
|
+
requestPrimaryName: AoWriteAction<AoArNSPurchaseParams>;
|
|
502
|
+
redelegateStake: AoWriteAction<AoRedelegateStakeParams>;
|
|
491
503
|
}
|
|
492
504
|
export declare function isProcessConfiguration(config: object): config is Required<ProcessConfiguration> & Record<string, never>;
|
|
493
505
|
export declare function isProcessIdConfiguration(config: object): config is Required<ProcessIdConfig> & Record<string, never>;
|
package/lib/types/version.d.ts
CHANGED