@t2000/sdk 9.6.0 → 9.7.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/dist/browser.cjs +213 -0
- 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 +202 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +216 -0
- 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 +205 -1
- package/dist/index.js.map +1 -1
- package/dist/{send-YAYf0YR3.d.cts → job-CSq0DRsC.d.cts} +107 -1
- package/dist/{send-YAYf0YR3.d.ts → job-CSq0DRsC.d.ts} +107 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
3
3
|
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
4
|
-
import { T as T2000Error,
|
|
5
|
-
export {
|
|
4
|
+
import { T as T2000Error, aU as T2000Options, Z as TransactionSigner, q as PayOptions, r as PayResult, aV as SwapResult, aW as SwapQuoteResult, H as SupportedAsset, w as SendResult, B as BalanceResponse, Y as TransactionRecord, e as DepositInfo, aX as PaymentRequest, a6 as ZkLoginProof, aY as SuiCoreClient, o as OverlayFeeConfig, aZ as SponsoredCoinMergeCache, Q as SwapRouteResult, a_ as SendableAsset } from './job-CSq0DRsC.cjs';
|
|
5
|
+
export { A as A2A_ESCROW_PACKAGE_ID, a$ as CETUS_USDC_SUI_POOL, C as CLOCK_ID, a as COIN_REGISTRY, b as ClassifyBalanceChange, c as ClassifyResult, d as CoinMeta, b0 as CoinPage, b1 as DEFAULT_GRPC_URL, D as DEFAULT_NETWORK, E as ETH_TYPE, f as ExtractedTransfer, b2 as GASLESS_MIN_STABLE_AMOUNT, b3 as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, g as Job, h as JobState, i as JobTerms, j as JobVerification, K as KNOWN_TARGETS, k as KeypairSigner, L as LABEL_PATTERNS, l as LOFI_TYPE, M as MANIFEST_TYPE, m as MAX_JOB_USDC, n as MIST_PER_SUI, N as NAVX_TYPE, b4 as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, b5 as Operation, P as PREFLIGHT_MAX_AMOUNT, p as PREFLIGHT_OK, s as PreflightResult, b6 as SENDABLE_ASSETS, S as STABLE_ASSETS, t as SUI_DECIMALS, u as SUI_TYPE, v as SUPPORTED_ASSETS, b7 as SelectAndSplitResult, b8 as SerializedCetusRoute, b9 as SerializedCetusRoutePath, ba as SerializedRouterDataV3, x as SimulationResult, y as StableAsset, z as SuiHolding, F as SuiRpcTxBlock, R as T2000ErrorCode, U as T2000ErrorData, V as T2000_OVERLAY_FEE_WALLET, W as TOKEN_MAP, X as TransactionLeg, _ as TxDirection, $ as USDC_DECIMALS, a0 as USDC_TYPE, a1 as USDE_TYPE, a2 as USDSUI_TYPE, a3 as USDT_TYPE, a4 as WAL_TYPE, a5 as WBTC_TYPE, a7 as ZkLoginSigner, bb as addSendToTx, bc as addSwapToTx, bd as assertAllowedAsset, a8 as buildCreateJobTx, a9 as buildDeliverJobTx, aa as buildRefundJobTx, ab as buildRejectJobTx, ac as buildReleaseJobTx, ad as buildSendTx, ae as buildSwapTx, af as checkPositiveAmount, ag as checkSuiAddress, ah as classifyAction, ai as classifyLabel, aj as classifyTransaction, be as deserializeCetusRoute, ak as executeTx, al as extractAllUserLegs, am as extractTransferDetails, an as extractTxCommands, ao as extractTxSender, ap as fallbackLabel, bf as fetchAllCoins, aq as findSwapRoute, ar as formatAssetAmount, as as formatSui, at as formatUsd, bg as getCoinMeta, au as getDecimals, av as getDecimalsForCoinType, aw as getJob, bh as getSuiClient, bi as getSuiGrpcClient, bj as isAllowedAsset, bk as isCetusRouteFresh, bl as isInRegistry, ax as jobActionsFor, ay as mapMoveAbortCode, az as mapWalletError, aA as mistToSui, bm as normalizeAsset, bn as normalizeCoinType, aB as parseMppSuiChallenge, aC as parseSuiRpcTx, aD as payWithMpp, aE as preflightCreateJob, aF as preflightFail, aG as preflightPay, aH as preflightSend, aI as preflightSwap, bo as queryHistory, bp as queryTransaction, aJ as rawToStable, aK as rawToUsdc, aL as refineLendingLabel, aM as resolveSymbol, aN as resolveTokenType, bq as selectAndSplitCoin, br as selectSuiCoin, bs as serializeCetusRoute, bt as simulateTransaction, aO as stableToRaw, aP as suiToMist, bu as throwIfSimulationFailed, aQ as truncateAddress, aR as usdcToRaw, aS as validateAddress, bv as verifyCetusRouteCoinMatch, aT as verifyJobForSeller } from './job-CSq0DRsC.cjs';
|
|
6
6
|
import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
3
3
|
import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
|
|
4
|
-
import { T as T2000Error,
|
|
5
|
-
export {
|
|
4
|
+
import { T as T2000Error, aU as T2000Options, Z as TransactionSigner, q as PayOptions, r as PayResult, aV as SwapResult, aW as SwapQuoteResult, H as SupportedAsset, w as SendResult, B as BalanceResponse, Y as TransactionRecord, e as DepositInfo, aX as PaymentRequest, a6 as ZkLoginProof, aY as SuiCoreClient, o as OverlayFeeConfig, aZ as SponsoredCoinMergeCache, Q as SwapRouteResult, a_ as SendableAsset } from './job-CSq0DRsC.js';
|
|
5
|
+
export { A as A2A_ESCROW_PACKAGE_ID, a$ as CETUS_USDC_SUI_POOL, C as CLOCK_ID, a as COIN_REGISTRY, b as ClassifyBalanceChange, c as ClassifyResult, d as CoinMeta, b0 as CoinPage, b1 as DEFAULT_GRPC_URL, D as DEFAULT_NETWORK, E as ETH_TYPE, f as ExtractedTransfer, b2 as GASLESS_MIN_STABLE_AMOUNT, b3 as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, g as Job, h as JobState, i as JobTerms, j as JobVerification, K as KNOWN_TARGETS, k as KeypairSigner, L as LABEL_PATTERNS, l as LOFI_TYPE, M as MANIFEST_TYPE, m as MAX_JOB_USDC, n as MIST_PER_SUI, N as NAVX_TYPE, b4 as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, b5 as Operation, P as PREFLIGHT_MAX_AMOUNT, p as PREFLIGHT_OK, s as PreflightResult, b6 as SENDABLE_ASSETS, S as STABLE_ASSETS, t as SUI_DECIMALS, u as SUI_TYPE, v as SUPPORTED_ASSETS, b7 as SelectAndSplitResult, b8 as SerializedCetusRoute, b9 as SerializedCetusRoutePath, ba as SerializedRouterDataV3, x as SimulationResult, y as StableAsset, z as SuiHolding, F as SuiRpcTxBlock, R as T2000ErrorCode, U as T2000ErrorData, V as T2000_OVERLAY_FEE_WALLET, W as TOKEN_MAP, X as TransactionLeg, _ as TxDirection, $ as USDC_DECIMALS, a0 as USDC_TYPE, a1 as USDE_TYPE, a2 as USDSUI_TYPE, a3 as USDT_TYPE, a4 as WAL_TYPE, a5 as WBTC_TYPE, a7 as ZkLoginSigner, bb as addSendToTx, bc as addSwapToTx, bd as assertAllowedAsset, a8 as buildCreateJobTx, a9 as buildDeliverJobTx, aa as buildRefundJobTx, ab as buildRejectJobTx, ac as buildReleaseJobTx, ad as buildSendTx, ae as buildSwapTx, af as checkPositiveAmount, ag as checkSuiAddress, ah as classifyAction, ai as classifyLabel, aj as classifyTransaction, be as deserializeCetusRoute, ak as executeTx, al as extractAllUserLegs, am as extractTransferDetails, an as extractTxCommands, ao as extractTxSender, ap as fallbackLabel, bf as fetchAllCoins, aq as findSwapRoute, ar as formatAssetAmount, as as formatSui, at as formatUsd, bg as getCoinMeta, au as getDecimals, av as getDecimalsForCoinType, aw as getJob, bh as getSuiClient, bi as getSuiGrpcClient, bj as isAllowedAsset, bk as isCetusRouteFresh, bl as isInRegistry, ax as jobActionsFor, ay as mapMoveAbortCode, az as mapWalletError, aA as mistToSui, bm as normalizeAsset, bn as normalizeCoinType, aB as parseMppSuiChallenge, aC as parseSuiRpcTx, aD as payWithMpp, aE as preflightCreateJob, aF as preflightFail, aG as preflightPay, aH as preflightSend, aI as preflightSwap, bo as queryHistory, bp as queryTransaction, aJ as rawToStable, aK as rawToUsdc, aL as refineLendingLabel, aM as resolveSymbol, aN as resolveTokenType, bq as selectAndSplitCoin, br as selectSuiCoin, bs as serializeCetusRoute, bt as simulateTransaction, aO as stableToRaw, aP as suiToMist, bu as throwIfSimulationFailed, aQ as truncateAddress, aR as usdcToRaw, aS as validateAddress, bv as verifyCetusRouteCoinMatch, aT as verifyJobForSeller } from './job-CSq0DRsC.js';
|
|
6
6
|
import { TransactionObjectArgument, Transaction } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
package/dist/index.js
CHANGED
|
@@ -3125,6 +3125,210 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
3125
3125
|
|
|
3126
3126
|
// src/index.ts
|
|
3127
3127
|
init_errors();
|
|
3128
|
+
|
|
3129
|
+
// src/wallet/job.ts
|
|
3130
|
+
init_errors();
|
|
3131
|
+
init_token_registry();
|
|
3132
|
+
init_preflight();
|
|
3133
|
+
init_coinSelection();
|
|
3134
|
+
var A2A_ESCROW_PACKAGE_ID = process.env.A2A_ESCROW_PACKAGE_ID ?? "0x9e67c380fb7079d793d6d15ff916b24d82779d7119bfa4631863102ed485c0a0";
|
|
3135
|
+
var CLOCK_ID2 = "0x6";
|
|
3136
|
+
var MODULE = "escrow";
|
|
3137
|
+
var MAX_JOB_USDC = 50;
|
|
3138
|
+
var JOB_STATES = [
|
|
3139
|
+
"funded",
|
|
3140
|
+
"delivered",
|
|
3141
|
+
"released",
|
|
3142
|
+
"refunded",
|
|
3143
|
+
"rejected"
|
|
3144
|
+
];
|
|
3145
|
+
function hexToBytes2(hex) {
|
|
3146
|
+
const clean = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
3147
|
+
if (clean.length === 0 || clean.length % 2 !== 0 || /[^0-9a-fA-F]/.test(clean)) {
|
|
3148
|
+
throw new T2000Error(
|
|
3149
|
+
"INVALID_AMOUNT",
|
|
3150
|
+
`Expected a hex hash (0x\u2026), got "${hex.slice(0, 32)}"`
|
|
3151
|
+
);
|
|
3152
|
+
}
|
|
3153
|
+
const out = [];
|
|
3154
|
+
for (let i = 0; i < clean.length; i += 2) {
|
|
3155
|
+
out.push(Number.parseInt(clean.slice(i, i + 2), 16));
|
|
3156
|
+
}
|
|
3157
|
+
return out;
|
|
3158
|
+
}
|
|
3159
|
+
function bytesToHex2(bytes) {
|
|
3160
|
+
const arr = typeof bytes === "string" ? Array.from(atob(bytes), (c) => c.charCodeAt(0)) : bytes;
|
|
3161
|
+
let s = "0x";
|
|
3162
|
+
for (const b of arr) s += b.toString(16).padStart(2, "0");
|
|
3163
|
+
return s;
|
|
3164
|
+
}
|
|
3165
|
+
function preflightCreateJob(terms) {
|
|
3166
|
+
const addressCheck = checkSuiAddress(terms.seller);
|
|
3167
|
+
if (!addressCheck.valid) return addressCheck;
|
|
3168
|
+
if (!Number.isFinite(terms.amountUsdc) || terms.amountUsdc <= 0) {
|
|
3169
|
+
return preflightFail("INVALID_AMOUNT", `Amount must be positive. Got ${terms.amountUsdc}.`);
|
|
3170
|
+
}
|
|
3171
|
+
if (terms.amountUsdc > MAX_JOB_USDC) {
|
|
3172
|
+
return preflightFail(
|
|
3173
|
+
"INVALID_AMOUNT",
|
|
3174
|
+
`v1 caps escrow jobs at ${MAX_JOB_USDC} USDC (no-arbitration split only stays fair at small sizes). Got ${terms.amountUsdc}.`
|
|
3175
|
+
);
|
|
3176
|
+
}
|
|
3177
|
+
if (terms.deliverByMs <= Date.now()) {
|
|
3178
|
+
return preflightFail("INVALID_AMOUNT", "deliverByMs must be in the future.");
|
|
3179
|
+
}
|
|
3180
|
+
if (terms.reviewWindowMs < 0) {
|
|
3181
|
+
return preflightFail("INVALID_AMOUNT", "reviewWindowMs must be \u2265 0.");
|
|
3182
|
+
}
|
|
3183
|
+
if (!Number.isInteger(terms.rejectSplitBps) || terms.rejectSplitBps < 0 || terms.rejectSplitBps > 1e4) {
|
|
3184
|
+
return preflightFail("INVALID_AMOUNT", "rejectSplitBps must be an integer 0\u201310000.");
|
|
3185
|
+
}
|
|
3186
|
+
try {
|
|
3187
|
+
hexToBytes2(terms.specHash);
|
|
3188
|
+
} catch (e) {
|
|
3189
|
+
return preflightFail("INVALID_AMOUNT", e.message);
|
|
3190
|
+
}
|
|
3191
|
+
return PREFLIGHT_OK;
|
|
3192
|
+
}
|
|
3193
|
+
async function buildCreateJobTx({
|
|
3194
|
+
client,
|
|
3195
|
+
buyer,
|
|
3196
|
+
terms
|
|
3197
|
+
}) {
|
|
3198
|
+
const pf = preflightCreateJob(terms);
|
|
3199
|
+
if (!pf.valid) throw new T2000Error(pf.code, pf.error);
|
|
3200
|
+
const seller = validateAddress(terms.seller);
|
|
3201
|
+
if (seller === validateAddress(buyer)) {
|
|
3202
|
+
throw new T2000Error("INVALID_ADDRESS", "Buyer and seller must be different wallets.");
|
|
3203
|
+
}
|
|
3204
|
+
const rawAmount = BigInt(Math.floor(terms.amountUsdc * 10 ** USDC_DECIMALS));
|
|
3205
|
+
const tx = new Transaction();
|
|
3206
|
+
const { coin } = await selectAndSplitCoin(tx, client, buyer, USDC_TYPE, rawAmount, {
|
|
3207
|
+
allowSwapAll: false
|
|
3208
|
+
});
|
|
3209
|
+
tx.moveCall({
|
|
3210
|
+
target: `${A2A_ESCROW_PACKAGE_ID}::${MODULE}::create`,
|
|
3211
|
+
typeArguments: [USDC_TYPE],
|
|
3212
|
+
arguments: [
|
|
3213
|
+
tx.pure.address(seller),
|
|
3214
|
+
coin,
|
|
3215
|
+
tx.pure.vector("u8", hexToBytes2(terms.specHash)),
|
|
3216
|
+
tx.pure.u64(terms.deliverByMs),
|
|
3217
|
+
tx.pure.u64(terms.reviewWindowMs),
|
|
3218
|
+
tx.pure.u64(terms.rejectSplitBps),
|
|
3219
|
+
tx.object(CLOCK_ID2)
|
|
3220
|
+
]
|
|
3221
|
+
});
|
|
3222
|
+
return tx;
|
|
3223
|
+
}
|
|
3224
|
+
function jobCall(jobId, fn) {
|
|
3225
|
+
const tx = new Transaction();
|
|
3226
|
+
tx.moveCall({
|
|
3227
|
+
target: `${A2A_ESCROW_PACKAGE_ID}::${MODULE}::${fn}`,
|
|
3228
|
+
typeArguments: [USDC_TYPE],
|
|
3229
|
+
arguments: [tx.object(jobId), tx.object(CLOCK_ID2)]
|
|
3230
|
+
});
|
|
3231
|
+
return tx;
|
|
3232
|
+
}
|
|
3233
|
+
function buildDeliverJobTx(jobId, deliveryHash) {
|
|
3234
|
+
const tx = new Transaction();
|
|
3235
|
+
tx.moveCall({
|
|
3236
|
+
target: `${A2A_ESCROW_PACKAGE_ID}::${MODULE}::deliver`,
|
|
3237
|
+
typeArguments: [USDC_TYPE],
|
|
3238
|
+
arguments: [
|
|
3239
|
+
tx.object(jobId),
|
|
3240
|
+
tx.pure.vector("u8", hexToBytes2(deliveryHash)),
|
|
3241
|
+
tx.object(CLOCK_ID2)
|
|
3242
|
+
]
|
|
3243
|
+
});
|
|
3244
|
+
return tx;
|
|
3245
|
+
}
|
|
3246
|
+
function buildReleaseJobTx(jobId) {
|
|
3247
|
+
return jobCall(jobId, "release");
|
|
3248
|
+
}
|
|
3249
|
+
function buildRejectJobTx(jobId) {
|
|
3250
|
+
return jobCall(jobId, "reject");
|
|
3251
|
+
}
|
|
3252
|
+
function buildRefundJobTx(jobId) {
|
|
3253
|
+
return jobCall(jobId, "refund");
|
|
3254
|
+
}
|
|
3255
|
+
async function getJob(client, jobId) {
|
|
3256
|
+
const resp = await client.core.getObject({ objectId: jobId, include: { json: true } }).catch((e) => {
|
|
3257
|
+
throw new T2000Error(
|
|
3258
|
+
"RPC_ERROR",
|
|
3259
|
+
`Job ${jobId} not found: ${e instanceof Error ? e.message : String(e)}`
|
|
3260
|
+
);
|
|
3261
|
+
});
|
|
3262
|
+
const objType = resp.object?.type ?? "";
|
|
3263
|
+
const json = resp.object?.json;
|
|
3264
|
+
if (!json || !objType.includes(`::${MODULE}::Job<`)) {
|
|
3265
|
+
throw new T2000Error("RPC_ERROR", `Object ${jobId} is not an a2a_escrow Job.`);
|
|
3266
|
+
}
|
|
3267
|
+
const stateNum = Number(json.state ?? -1);
|
|
3268
|
+
const state = JOB_STATES[stateNum];
|
|
3269
|
+
if (!state) {
|
|
3270
|
+
throw new T2000Error("RPC_ERROR", `Job ${jobId} has unknown state ${stateNum}.`);
|
|
3271
|
+
}
|
|
3272
|
+
const deliveredAtMs = Number(json.delivered_at_ms ?? 0);
|
|
3273
|
+
const deliveryBytes = json.delivery_hash ?? [];
|
|
3274
|
+
const hasDelivery = deliveredAtMs > 0;
|
|
3275
|
+
return {
|
|
3276
|
+
id: jobId,
|
|
3277
|
+
buyer: String(json.buyer),
|
|
3278
|
+
seller: String(json.seller),
|
|
3279
|
+
amountUsdc: Number(json.amount) / 10 ** USDC_DECIMALS,
|
|
3280
|
+
escrowUsdc: Number(json.escrow) / 10 ** USDC_DECIMALS,
|
|
3281
|
+
specHash: bytesToHex2(json.spec_hash ?? []),
|
|
3282
|
+
deliverByMs: Number(json.deliver_by_ms),
|
|
3283
|
+
reviewWindowMs: Number(json.review_window_ms),
|
|
3284
|
+
rejectSplitBps: Number(json.reject_split_bps),
|
|
3285
|
+
state,
|
|
3286
|
+
deliveryHash: hasDelivery ? bytesToHex2(deliveryBytes) : null,
|
|
3287
|
+
deliveredAtMs: hasDelivery ? deliveredAtMs : null,
|
|
3288
|
+
createdAtMs: Number(json.created_at_ms)
|
|
3289
|
+
};
|
|
3290
|
+
}
|
|
3291
|
+
function jobActionsFor(job, caller, nowMs = Date.now()) {
|
|
3292
|
+
const me = validateAddress(caller);
|
|
3293
|
+
const isBuyer = me === job.buyer;
|
|
3294
|
+
const isSeller = me === job.seller;
|
|
3295
|
+
const actions = [];
|
|
3296
|
+
if (job.state === "funded") {
|
|
3297
|
+
if (isSeller && nowMs <= job.deliverByMs) actions.push("deliver");
|
|
3298
|
+
if (isBuyer) actions.push("release");
|
|
3299
|
+
if (nowMs > job.deliverByMs) actions.push("refund");
|
|
3300
|
+
} else if (job.state === "delivered") {
|
|
3301
|
+
const windowClosesMs = (job.deliveredAtMs ?? 0) + job.reviewWindowMs;
|
|
3302
|
+
if (isBuyer && nowMs <= windowClosesMs) actions.push("release", "reject");
|
|
3303
|
+
if (nowMs > windowClosesMs) actions.push("release");
|
|
3304
|
+
}
|
|
3305
|
+
return actions;
|
|
3306
|
+
}
|
|
3307
|
+
async function verifyJobForSeller({
|
|
3308
|
+
client,
|
|
3309
|
+
jobId,
|
|
3310
|
+
seller,
|
|
3311
|
+
minAmountUsdc,
|
|
3312
|
+
minRunwayMs = 6e4
|
|
3313
|
+
}) {
|
|
3314
|
+
const job = await getJob(client, jobId);
|
|
3315
|
+
const problems = [];
|
|
3316
|
+
if (job.state !== "funded") {
|
|
3317
|
+
problems.push(`state is "${job.state}", expected "funded"`);
|
|
3318
|
+
}
|
|
3319
|
+
if (job.seller !== validateAddress(seller)) {
|
|
3320
|
+
problems.push(`job pays ${job.seller}, not this seller`);
|
|
3321
|
+
}
|
|
3322
|
+
if (job.escrowUsdc < minAmountUsdc) {
|
|
3323
|
+
problems.push(`escrow holds ${job.escrowUsdc} USDC, price is ${minAmountUsdc}`);
|
|
3324
|
+
}
|
|
3325
|
+
if (job.deliverByMs - Date.now() < minRunwayMs) {
|
|
3326
|
+
problems.push("deadline too close to accept");
|
|
3327
|
+
}
|
|
3328
|
+
return { ok: problems.length === 0, job, problems };
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
// src/index.ts
|
|
3128
3332
|
init_coinSelection();
|
|
3129
3333
|
|
|
3130
3334
|
// src/composeTx.ts
|
|
@@ -3548,6 +3752,6 @@ function displayHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
|
3548
3752
|
// src/index.ts
|
|
3549
3753
|
init_preflight();
|
|
3550
3754
|
|
|
3551
|
-
export { AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MANIFEST_TYPE, MIST_PER_SUI, NAVX_TYPE, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, SENDABLE_ASSETS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, addSendToTx, addSwapToTx, approxUsdValue, assertAllowedAsset, assertLimitConfig, buildAddLeafTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, classifyAction, classifyLabel, classifyTransaction, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getLimits, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, keypairFromPrivateKey, listModels, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseMppSuiChallenge, parseSuiRpcTx, payWithMpp, preflightFail, preflightPay, preflightSend, preflightSwap, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyReceipt, walletExists, writeLimitsFile };
|
|
3755
|
+
export { A2A_ESCROW_PACKAGE_ID, AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, JOB_STATES, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MANIFEST_TYPE, MAX_JOB_USDC, MIST_PER_SUI, NAVX_TYPE, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, SENDABLE_ASSETS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, addSendToTx, addSwapToTx, approxUsdValue, assertAllowedAsset, assertLimitConfig, buildAddLeafTx, buildCreateJobTx, buildDeliverJobTx, buildRefundJobTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, classifyAction, classifyLabel, classifyTransaction, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getJob, getLimits, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, jobActionsFor, keypairFromPrivateKey, listModels, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseMppSuiChallenge, parseSuiRpcTx, payWithMpp, preflightCreateJob, preflightFail, preflightPay, preflightSend, preflightSwap, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, verifyReceipt, walletExists, writeLimitsFile };
|
|
3552
3756
|
//# sourceMappingURL=index.js.map
|
|
3553
3757
|
//# sourceMappingURL=index.js.map
|