@ar.io/sdk 2.4.0-alpha.5 → 2.4.0-alpha.7

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
@@ -48,14 +48,14 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
48
48
  - [`updateGatewaySettings(gatewaySettings)`](#updategatewaysettingsgatewaysettings)
49
49
  - [`increaseDelegateStake({ target, qty })`](#increasedelegatestake-target-qty-)
50
50
  - [`decreaseDelegateStake({ target, qty, instant })`](#decreasedelegatestake-target-qty-instant-)
51
- - [`instantDelegateWithdrawal({ target, vaultId })`](#instantdelegatewithdrawal-target-vaultid-)
51
+ - [`instantWithdrawal({ gatewayAddress, vaultId })`](#instantwithdrawal-gatewayaddress-vaultid-)
52
52
  - [`increaseOperatorStake({ qty })`](#increaseoperatorstake-qty-)
53
53
  - [`decreaseOperatorStake({ qty })`](#decreaseoperatorstake-qty-)
54
54
  - [`saveObservations({ reportTxId, failedGateways })`](#saveobservations-reporttxid-failedgateways-)
55
55
  - [`transfer({ target, qty })`](#transfer-target-qty-)
56
56
  - [`increaseUndernameLimit({ name, qty })`](#increaseundernamelimit-name-qty-)
57
57
  - [`extendLease({ name, years })`](#extendlease-name-years-)
58
- - [`cancelDelegateWithdrawal({ address, vaultId })`](#canceldelegatewithdrawal-address-vaultid-)
58
+ - [`cancelWithdrawal({ gatewayAddress, vaultId })`](#cancelwithdrawal-gatewayaddress-vaultid-)
59
59
  - [`submitAuctionBid({ name, type, years, processId })`](#submitauctionbid-name-type-years-processid-)
60
60
  - [Configuration](#configuration)
61
61
  - [Arweave Name Tokens (ANT's)](#arweave-name-tokens-ants)
@@ -1109,18 +1109,19 @@ const { id: txId } = await io.decreaseDelegateStake({
1109
1109
  });
1110
1110
  ```
1111
1111
 
1112
- #### `instantDelegateWithdrawal({ target, vaultId })`
1112
+ #### `instantWithdrawal({ gatewayAddress, vaultId })`
1113
1113
 
1114
- Instantly withdraws vaulted delegate tokens at the cost of the early withdrawal fee.
1114
+ Instantly withdraws an existing vault on a gateway. If no `gatewayAddress` is provided, the signer's address will be used.
1115
1115
 
1116
1116
  _Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
1117
1117
 
1118
1118
  ```typescript
1119
1119
  const io = IO.init({ signer: new ArweaveSigner(jwk) });
1120
- const { id: txId } = await io.instantDelegateWithdrawal(
1120
+ // removes a delegated vault from a gateway
1121
+ const { id: txId } = await io.instantWithdrawal(
1121
1122
  {
1122
1123
  // gateway address where delegate vault exists
1123
- target: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
1124
+ gatewayAddress: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
1124
1125
  // delegated vault id to cancel
1125
1126
  vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
1126
1127
  },
@@ -1129,6 +1130,12 @@ const { id: txId } = await io.instantDelegateWithdrawal(
1129
1130
  tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
1130
1131
  },
1131
1132
  );
1133
+ // removes an operator vault from a gateway
1134
+ const { id: txId } = await io.instantWithdrawal(
1135
+ {
1136
+ vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
1137
+ },
1138
+ );
1132
1139
  ```
1133
1140
 
1134
1141
  #### `increaseOperatorStake({ qty })`
@@ -1238,24 +1245,32 @@ const { id: txId } = await io.extendLease(
1238
1245
  );
1239
1246
  ```
1240
1247
 
1241
- #### `cancelDelegateWithdrawal({ address, vaultId })`
1248
+ #### `cancelWithdrawal({ gatewayAddress, vaultId })`
1242
1249
 
1243
- Cancels a pending delegate withdrawal.
1250
+ Cancels an existing vault on a gateway. The vaulted stake will be returned to the callers stake. If no `gatewayAddress` is provided, the signer's address will be used.
1244
1251
 
1245
1252
  _Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
1246
1253
 
1247
1254
  ```typescript
1248
1255
  const io = IO.init({ signer: new ArweaveSigner(jwk) });
1249
- const { id: txId } = await io.cancelDelegateWithdrawal(
1256
+ // cancels a delegated vault from a gateway
1257
+ const { id: txId } = await io.cancelWithdrawal(
1250
1258
  {
1251
1259
  // gateway address where vault exists
1252
- address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
1260
+ gatewayAddress: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
1253
1261
  // vault id to cancel
1254
1262
  vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
1255
1263
  },
1256
1264
  // optional additional tags
1257
1265
  { tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
1258
1266
  );
1267
+ // cancels an operator vault from a gateway
1268
+ const { id: txId } = await io.cancelWithdrawal(
1269
+ {
1270
+ // operator vault id to cancel
1271
+ vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
1272
+ },
1273
+ );
1259
1274
  ```
1260
1275
 
1261
1276
  #### `submitAuctionBid({ name, type, years, processId })`