@ar.io/sdk 2.3.3-alpha.1 → 2.4.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 +37 -3
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/io.js +13 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +13 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/io.d.ts +5 -0
- package/lib/types/types/io.d.ts +5 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/io.js
CHANGED
|
@@ -513,6 +513,19 @@ class IOWriteable extends IOReadable {
|
|
|
513
513
|
{ name: 'Action', value: 'Decrease-Delegate-Stake' },
|
|
514
514
|
{ name: 'Target', value: params.target },
|
|
515
515
|
{ name: 'Quantity', value: params.decreaseQty.valueOf().toString() },
|
|
516
|
+
{ name: 'Instant', value: `${params.instant || false}` },
|
|
517
|
+
],
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
async instantDelegateWithdrawal(params, options) {
|
|
521
|
+
const { tags = [] } = options || {};
|
|
522
|
+
return this.process.send({
|
|
523
|
+
signer: this.signer,
|
|
524
|
+
tags: [
|
|
525
|
+
...tags,
|
|
526
|
+
{ name: 'Action', value: 'Decrease-Delegate-Stake' },
|
|
527
|
+
{ name: 'Target', value: params.target },
|
|
528
|
+
{ name: 'Vault-Id', value: params.vaultId },
|
|
516
529
|
],
|
|
517
530
|
});
|
|
518
531
|
}
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/io.js
CHANGED
|
@@ -508,6 +508,19 @@ export class IOWriteable extends IOReadable {
|
|
|
508
508
|
{ name: 'Action', value: 'Decrease-Delegate-Stake' },
|
|
509
509
|
{ name: 'Target', value: params.target },
|
|
510
510
|
{ name: 'Quantity', value: params.decreaseQty.valueOf().toString() },
|
|
511
|
+
{ name: 'Instant', value: `${params.instant || false}` },
|
|
512
|
+
],
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
async instantDelegateWithdrawal(params, options) {
|
|
516
|
+
const { tags = [] } = options || {};
|
|
517
|
+
return this.process.send({
|
|
518
|
+
signer: this.signer,
|
|
519
|
+
tags: [
|
|
520
|
+
...tags,
|
|
521
|
+
{ name: 'Action', value: 'Decrease-Delegate-Stake' },
|
|
522
|
+
{ name: 'Target', value: params.target },
|
|
523
|
+
{ name: 'Vault-Id', value: params.vaultId },
|
|
511
524
|
],
|
|
512
525
|
});
|
|
513
526
|
}
|
package/lib/esm/version.js
CHANGED
package/lib/types/common/io.d.ts
CHANGED
|
@@ -114,6 +114,11 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
|
|
|
114
114
|
decreaseDelegateStake(params: {
|
|
115
115
|
target: string;
|
|
116
116
|
decreaseQty: number | mIOToken;
|
|
117
|
+
instant?: boolean;
|
|
118
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
119
|
+
instantDelegateWithdrawal(params: {
|
|
120
|
+
target: string;
|
|
121
|
+
vaultId: string;
|
|
117
122
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
118
123
|
increaseOperatorStake(params: {
|
|
119
124
|
increaseQty: number | mIOToken;
|
package/lib/types/types/io.d.ts
CHANGED
|
@@ -269,6 +269,11 @@ export interface AoIOWrite extends AoIORead {
|
|
|
269
269
|
decreaseDelegateStake(params: {
|
|
270
270
|
target: WalletAddress;
|
|
271
271
|
decreaseQty: number | mIOToken;
|
|
272
|
+
instant?: boolean;
|
|
273
|
+
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
274
|
+
instantDelegateWithdrawal(params: {
|
|
275
|
+
target: WalletAddress;
|
|
276
|
+
vaultId: string;
|
|
272
277
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
273
278
|
saveObservations(params: {
|
|
274
279
|
reportTxId: TransactionId;
|
package/lib/types/version.d.ts
CHANGED