@ar.io/sdk 3.4.0-alpha.3 → 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.
package/README.md CHANGED
@@ -35,6 +35,9 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
35
35
  - [`getVaults({ cursor, limit, sortBy, sortOrder })`](#getvaults-cursor-limit-sortby-sortorder-)
36
36
  - [`vaultedTransfer({ recipient, quantity, lockLengthMs, revokable })`](#vaultedtransfer-recipient-quantity-locklengthms-revokable-)
37
37
  - [`revokeVault({ recipient, vaultId })`](#revokevault-recipient-vaultid-)
38
+ - [`createVault({ lockLengthMs, quantity })`](#createvault-locklengthms-quantity-)
39
+ - [`extendVault({ vaultId, extendLengthMs })`](#extendvault-vaultid-extendlengthms-)
40
+ - [`increaseVault({ vaultId, quantity })`](#increasevault-vaultid-quantity-)
38
41
  - [Gateways](#gateways)
39
42
  - [`getGateway({ address })`](#getgateway-address-)
40
43
  - [`getGateways({ cursor, limit, sortBy, sortOrder })`](#getgateways-cursor-limit-sortby-sortorder-)
@@ -550,6 +553,45 @@ const { id: txId } = await ario.revokeVault({
550
553
  });
551
554
  ```
552
555
 
556
+ #### `createVault({ lockLengthMs, quantity })`
557
+
558
+ Creates a vault for the specified `quantity` of mARIO from the signer's balance and locks it for the specified `lockLengthMs` milliseconds.
559
+
560
+ ```typescript
561
+ const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
562
+
563
+ const { id: txId } = await ario.createVault({
564
+ lockLengthMs: 1000 * 60 * 60 * 24 * 365, // 1 year
565
+ quantity: new ARIOToken(1000).toMARIO(),
566
+ });
567
+ ```
568
+
569
+ #### `extendVault({ vaultId, extendLengthMs })`
570
+
571
+ Extends the lock length of a signer's vault by the specified `extendLengthMs` milliseconds.
572
+
573
+ ```typescript
574
+ const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
575
+
576
+ const { id: txId } = await ario.extendVault({
577
+ vaultId: 'vaultIdOne',
578
+ extendLengthMs: 1000 * 60 * 60 * 24 * 365, // 1 year
579
+ });
580
+ ```
581
+
582
+ #### `increaseVault({ vaultId, quantity })`
583
+
584
+ Increases the balance of a signer's vault by the specified `quantity` of mARIO.
585
+
586
+ ```typescript
587
+ const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
588
+
589
+ const { id: txId } = await ario.increaseVault({
590
+ vaultId: 'vaultIdOne',
591
+ quantity: new ARIOToken(1000).toMARIO(),
592
+ });
593
+ ```
594
+
553
595
  ### Gateways
554
596
 
555
597
  #### `getGateway({ address })`