@t2000/sdk 1.24.2 → 1.24.3
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/dist/adapters/descriptors.cjs +22 -1
- package/dist/adapters/descriptors.cjs.map +1 -1
- package/dist/adapters/descriptors.js +22 -1
- package/dist/adapters/descriptors.js.map +1 -1
- package/dist/adapters/index.cjs +22 -1
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.js +22 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/browser.cjs +3 -3
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +3 -3
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +25 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/dist/{types-DCb8Xt_q.d.ts → types-D1-rO-J4.d.ts} +10 -3
- package/dist/{types-D03bON1v.d.cts → types-DvNhsBbN.d.cts} +10 -3
- package/package.json +1 -1
|
@@ -429,10 +429,17 @@ declare function calculateFee(operation: FeeOperation, amount: number): Protocol
|
|
|
429
429
|
* @param paymentCoin Coin to split the fee from (mutated in place)
|
|
430
430
|
* @param feeBps Fee rate in basis points (e.g. `SAVE_FEE_BPS = 10n` = 0.1%)
|
|
431
431
|
* @param receiver Treasury wallet address (typically `T2000_OVERLAY_FEE_WALLET`)
|
|
432
|
-
* @param amount
|
|
432
|
+
* @param amount Display-units input amount (matches what was passed to the
|
|
433
433
|
* protocol operation; used to compute the raw fee amount)
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
* @param decimals Coin decimals for raw conversion. Defaults to USDC_DECIMALS
|
|
435
|
+
* (6). Pass the actual coin decimals when skimming a fee
|
|
436
|
+
* from a non-USDC coin (e.g. USDsui = 6, GOLD = 6, ETH = 8,
|
|
437
|
+
* SUI = 9). Backward-compatible: existing USDC callers can
|
|
438
|
+
* omit. Wrong decimals → wrong raw amount → either fee
|
|
439
|
+
* too small (silent loss) or too large (PTB revert from
|
|
440
|
+
* insufficient coin balance).
|
|
441
|
+
*/
|
|
442
|
+
declare function addFeeTransfer(tx: Transaction, paymentCoin: TransactionObjectArgument, feeBps: bigint, receiver: string, amount: number, decimals?: number): void;
|
|
436
443
|
|
|
437
444
|
/**
|
|
438
445
|
* Unified token registry — single source of truth for coin types, decimals, symbols, and tiers.
|
|
@@ -429,10 +429,17 @@ declare function calculateFee(operation: FeeOperation, amount: number): Protocol
|
|
|
429
429
|
* @param paymentCoin Coin to split the fee from (mutated in place)
|
|
430
430
|
* @param feeBps Fee rate in basis points (e.g. `SAVE_FEE_BPS = 10n` = 0.1%)
|
|
431
431
|
* @param receiver Treasury wallet address (typically `T2000_OVERLAY_FEE_WALLET`)
|
|
432
|
-
* @param amount
|
|
432
|
+
* @param amount Display-units input amount (matches what was passed to the
|
|
433
433
|
* protocol operation; used to compute the raw fee amount)
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
* @param decimals Coin decimals for raw conversion. Defaults to USDC_DECIMALS
|
|
435
|
+
* (6). Pass the actual coin decimals when skimming a fee
|
|
436
|
+
* from a non-USDC coin (e.g. USDsui = 6, GOLD = 6, ETH = 8,
|
|
437
|
+
* SUI = 9). Backward-compatible: existing USDC callers can
|
|
438
|
+
* omit. Wrong decimals → wrong raw amount → either fee
|
|
439
|
+
* too small (silent loss) or too large (PTB revert from
|
|
440
|
+
* insufficient coin balance).
|
|
441
|
+
*/
|
|
442
|
+
declare function addFeeTransfer(tx: Transaction, paymentCoin: TransactionObjectArgument, feeBps: bigint, receiver: string, amount: number, decimals?: number): void;
|
|
436
443
|
|
|
437
444
|
/**
|
|
438
445
|
* Unified token registry — single source of truth for coin types, decimals, symbols, and tiers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t2000/sdk",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.3",
|
|
4
4
|
"description": "TypeScript SDK for AI agent bank accounts on Sui — send, save, borrow, swap. NAVI lending + Cetus aggregator routing, sponsored gas, zkLogin compatible.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|