@zing-protocol/zing-sdk 0.0.13 → 0.0.14
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.
|
@@ -364,3 +364,18 @@ export interface BurnOrKeepPositiveCoinOptions {
|
|
|
364
364
|
typeArguments: [string];
|
|
365
365
|
}
|
|
366
366
|
export declare function burnOrKeepPositiveCoin(options: BurnOrKeepPositiveCoinOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
367
|
+
export interface PayoutArguments {
|
|
368
|
+
treasury: RawTransactionArgument<string>;
|
|
369
|
+
coin: RawTransactionArgument<string>;
|
|
370
|
+
recipient: RawTransactionArgument<string>;
|
|
371
|
+
}
|
|
372
|
+
export interface PayoutOptions {
|
|
373
|
+
package?: string;
|
|
374
|
+
arguments: PayoutArguments | [
|
|
375
|
+
treasury: RawTransactionArgument<string>,
|
|
376
|
+
coin: RawTransactionArgument<string>,
|
|
377
|
+
recipient: RawTransactionArgument<string>
|
|
378
|
+
];
|
|
379
|
+
typeArguments: [string];
|
|
380
|
+
}
|
|
381
|
+
export declare function payout(options: PayoutOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -472,3 +472,19 @@ export function burnOrKeepPositiveCoin(options) {
|
|
|
472
472
|
typeArguments: options.typeArguments,
|
|
473
473
|
});
|
|
474
474
|
}
|
|
475
|
+
export function payout(options) {
|
|
476
|
+
const packageAddress = options.package ?? "@local-pkg/zing_studio";
|
|
477
|
+
const argumentsTypes = [
|
|
478
|
+
`${packageAddress}::treasury::Treasury`,
|
|
479
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<${options.typeArguments[0]}>`,
|
|
480
|
+
"address",
|
|
481
|
+
];
|
|
482
|
+
const parameterNames = ["treasury", "coin", "recipient"];
|
|
483
|
+
return (tx) => tx.moveCall({
|
|
484
|
+
package: packageAddress,
|
|
485
|
+
module: "app",
|
|
486
|
+
function: "payout",
|
|
487
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
488
|
+
typeArguments: options.typeArguments,
|
|
489
|
+
});
|
|
490
|
+
}
|