@ar.io/sdk 3.4.0-alpha.2 → 3.4.0-alpha.4

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.
@@ -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({ target, qty, }: {
460
+ transfer: AoWriteAction<{
449
461
  target: WalletAddress;
450
- qty: number;
451
- }, options?: WriteOptions): Promise<AoMessageResult>;
452
- vaultedTransfer({ recipient, quantity, lockLengthMs, revokable }: AoVaultedTransferParams, options?: WriteOptions): Promise<AoMessageResult>;
453
- revokeVault({ vaultId, recipient }: AoRevokeVaultParams, options?: WriteOptions): Promise<AoMessageResult>;
454
- joinNetwork(params: AoJoinNetworkParams, options?: WriteOptions): Promise<AoMessageResult>;
455
- leaveNetwork(options?: WriteOptions): Promise<AoMessageResult>;
456
- updateGatewaySettings(params: AoUpdateGatewaySettingsParams, options?: WriteOptions): Promise<AoMessageResult>;
457
- increaseOperatorStake(params: {
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
- }, options?: WriteOptions): Promise<AoMessageResult>;
460
- decreaseOperatorStake(params: {
474
+ }>;
475
+ decreaseOperatorStake: AoWriteAction<{
461
476
  decreaseQty: number | mARIOToken;
462
477
  instant?: boolean;
463
- }, options?: WriteOptions): Promise<AoMessageResult>;
464
- delegateStake(params: {
465
- target: WalletAddress;
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
- }, options?: WriteOptions): Promise<AoMessageResult>;
473
- instantWithdrawal(params: {
484
+ }>;
485
+ instantWithdrawal: AoWriteAction<{
474
486
  gatewayAddress?: WalletAddress;
475
487
  vaultId: string;
476
- }, options?: WriteOptions): Promise<AoMessageResult>;
477
- saveObservations(params: {
488
+ }>;
489
+ saveObservations: AoWriteAction<{
478
490
  reportTxId: TransactionId;
479
491
  failedGateways: WalletAddress[];
480
- }, options?: WriteOptions): Promise<AoMessageResult>;
481
- buyRecord(params: AoBuyRecordParams, options?: WriteOptions): Promise<AoMessageResult>;
482
- upgradeRecord(params: AoArNSPurchaseParams, options?: WriteOptions): Promise<AoMessageResult>;
483
- extendLease(params: AoExtendLeaseParams, options?: WriteOptions): Promise<AoMessageResult>;
484
- increaseUndernameLimit(params: AoIncreaseUndernameLimitParams, options?: WriteOptions): Promise<AoMessageResult>;
485
- cancelWithdrawal(params: {
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
- }, options?: WriteOptions): Promise<AoMessageResult>;
489
- requestPrimaryName(params: AoArNSPurchaseParams, options?: WriteOptions): Promise<AoMessageResult>;
490
- redelegateStake(params: AoRedelegateStakeParams, options?: WriteOptions): Promise<AoMessageResult>;
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>;
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "3.4.0-alpha.1";
16
+ export declare const version = "3.4.0-alpha.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.4.0-alpha.2",
3
+ "version": "3.4.0-alpha.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"