@t2000/sdk 10.25.0 → 10.26.0
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 +18 -9
- 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 +18 -9
- package/dist/browser.js.map +1 -1
- package/dist/{commerce-B_eH6fvR.d.cts → commerce-DOKu1FYI.d.cts} +45 -1
- package/dist/{commerce-B_eH6fvR.d.ts → commerce-DOKu1FYI.d.ts} +45 -1
- package/dist/index.cjs +100 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +99 -15
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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 { Z as T2000Error, b4 as T2000Options, a4 as TransactionSigner, w as PayOptions, x as PayResult,
|
|
5
|
-
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig,
|
|
4
|
+
import { Z as T2000Error, b4 as T2000Options, a4 as TransactionSigner, w as PayOptions, b5 as X402Probe, x as PayResult, b6 as SerializedCetusRoute, b7 as SwapResult, b8 as SwapQuoteResult, X as SupportedAsset, Q as SendResult, B as BalanceResponse, a3 as TransactionRecord, i as DepositInfo, b9 as PaymentRequest, ae as ZkLoginProof, ba as SuiCoreClient, u as OverlayFeeConfig, bb as SponsoredCoinMergeCache, Y as SwapRouteResult, bc as SendableAsset } from './commerce-DOKu1FYI.cjs';
|
|
5
|
+
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, bd as CETUS_USDC_SUI_POOL, C as CLOCK_ID, c as COIN_REGISTRY, d as ClassifyBalanceChange, e as ClassifyResult, f as CoinMeta, be as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, g as DEFAULT_COMMERCE_API_BASE, bf as DEFAULT_GRPC_URL, h as DEFAULT_NETWORK, E as ETH_TYPE, j as ExtractedTransfer, bg as GASLESS_MIN_STABLE_AMOUNT, bh as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, k as Job, l as JobState, m as JobTerms, n as JobVerification, K as KNOWN_TARGETS, o as KeypairSigner, L as LABEL_PATTERNS, p as LOFI_TYPE, M as MANIFEST_TYPE, q as MAX_DELIVER_HORIZON_MS, r as MAX_JOB_USDC, s as MAX_REVIEW_WINDOW_MS, t as MIST_PER_SUI, N as NAVX_TYPE, bi as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bj as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bk as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bl as SelectAndSplitResult, bm as SerializedCetusRoutePath, bn as SerializedRouterDataV3, R as ServiceListing, T as SimulationResult, U as StableAsset, V as SuiHolding, W as SuiRpcTxBlock, _ as T2000ErrorCode, $ as T2000ErrorData, a0 as T2000_OVERLAY_FEE_WALLET, a1 as TOKEN_MAP, a2 as TransactionLeg, a5 as TxDirection, a6 as USDC_DECIMALS, a7 as USDC_TYPE, a8 as USDE_TYPE, a9 as USDSUI_TYPE, aa as USDT_TYPE, ab as WAL_TYPE, ac as WBTC_TYPE, ad as X402ActivityPayload, af as ZkLoginSigner, bo as addSendToTx, bp as addSwapToTx, bq as assertAllowedAsset, br as assertBuyerRequirements, ag as buildCreateJobTx, bs as buildDeclineJobTx, ah as buildDeliverJobTx, ai as buildRefundJobTx, aj as buildRejectJobTx, ak as buildReleaseJobTx, al as buildSendTx, am as buildSwapTx, an as checkPositiveAmount, ao as checkSuiAddress, ap as classifyAction, aq as classifyLabel, ar as classifyTransaction, bt as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bu as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bv as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bw as getSuiClient, bx as getSuiGrpcClient, by as isAllowedAsset, bz as isCetusRouteFresh, bA as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bB as normalizeAsset, bC as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithX402, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, bD as probeX402, aT as putJobSpec, bE as queryHistory, bF as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bG as selectAndSplitCoin, bH as selectSuiCoin, bI as serializeCetusRoute, bJ as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bK as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bL as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-DOKu1FYI.cjs';
|
|
6
6
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
|
@@ -275,6 +275,13 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
275
275
|
get keypair(): Ed25519Keypair;
|
|
276
276
|
/** Transaction signer (works for both keypair and zkLogin). */
|
|
277
277
|
get signer(): TransactionSigner;
|
|
278
|
+
/**
|
|
279
|
+
* READ-ONLY price probe for an x402 endpoint (S.919). Reports what `pay()`
|
|
280
|
+
* would cost without signing or spending, so a caller (Connect's
|
|
281
|
+
* `t2000_pay_probe`, the CLI, a UI) can show terms before committing.
|
|
282
|
+
* No limit gate: nothing moves.
|
|
283
|
+
*/
|
|
284
|
+
payProbe(options: PayOptions): Promise<X402Probe>;
|
|
278
285
|
pay(options: PayOptions): Promise<PayResult>;
|
|
279
286
|
/** Non-streaming chat completion against Private Inference. */
|
|
280
287
|
chat(params: ChatParams): Promise<ChatResult>;
|
|
@@ -425,6 +432,15 @@ declare const SUI_ADDRESS_STRICT_REGEX: RegExp;
|
|
|
425
432
|
* but every label must use only `[a-z0-9-]`.
|
|
426
433
|
*/
|
|
427
434
|
declare const SUINS_NAME_REGEX: RegExp;
|
|
435
|
+
/**
|
|
436
|
+
* Canonicalize user paste BEFORE address/SuiNS shape checks:
|
|
437
|
+
* - `label@audric` → `label.audric.sui` (lowercased) — the literal parent
|
|
438
|
+
* string deliberately matches `AUDRIC_PARENT_NAME` in
|
|
439
|
+
* `protocols/suins-leaf.ts` (not imported: that module pulls the heavy
|
|
440
|
+
* `@mysten/suins` client into every normalizer consumer).
|
|
441
|
+
* - everything else (0x, `.sui` names, garbage) passes through trimmed.
|
|
442
|
+
*/
|
|
443
|
+
declare function canonicalizeRecipientInput(raw: string): string;
|
|
428
444
|
declare class InvalidAddressError extends Error {
|
|
429
445
|
readonly raw: string;
|
|
430
446
|
constructor(raw: string);
|
|
@@ -1251,4 +1267,4 @@ declare function fullHandle(label: string, parentName?: string): string;
|
|
|
1251
1267
|
*/
|
|
1252
1268
|
declare function displayHandle(label: string, parentName?: string): string;
|
|
1253
1269
|
|
|
1254
|
-
export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, type CheckStatus, type ComposeTxOptions, type ComposeTxResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, ESCROW_JOB_TYPE_MARKER, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_OPEN_WINDOW_MS, type NormalizedAddress, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_TYPE_MARKER, type OpenJobFilter, type OpenJobRow, type Opening, type OpeningTerms, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, SerializedCetusRoute, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, type TrustMode, type UpstreamClaim, type VerifyAnchor, type VerifyCheck, type VerifyOptions, type VerifyResult, type VerifyUpstream, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateOpeningTx, buildRefundUnclaimedTx, buildRevokeLeafTx, cancelOpenJob, chatCompletion, chatCompletionStream, claimOpenJob, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, listOpenJobs, loadKey, looksLikeSuiNs, normalizeAddressInput, postOpenJob, preflightCreateOpening, queryBalance, readLimitsFile, recordDailySpend, refundOpenJob, resolveAddressToSuinsViaRpc, resolveCreatedObjectId, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
|
|
1270
|
+
export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, type CheckStatus, type ComposeTxOptions, type ComposeTxResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, ESCROW_JOB_TYPE_MARKER, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_OPEN_WINDOW_MS, type NormalizedAddress, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_TYPE_MARKER, type OpenJobFilter, type OpenJobRow, type Opening, type OpeningTerms, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, SerializedCetusRoute, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, type TrustMode, type UpstreamClaim, type VerifyAnchor, type VerifyCheck, type VerifyOptions, type VerifyResult, type VerifyUpstream, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, X402Probe, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateOpeningTx, buildRefundUnclaimedTx, buildRevokeLeafTx, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, claimOpenJob, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, listOpenJobs, loadKey, looksLikeSuiNs, normalizeAddressInput, postOpenJob, preflightCreateOpening, queryBalance, readLimitsFile, recordDailySpend, refundOpenJob, resolveAddressToSuinsViaRpc, resolveCreatedObjectId, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
|
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 { Z as T2000Error, b4 as T2000Options, a4 as TransactionSigner, w as PayOptions, x as PayResult,
|
|
5
|
-
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig,
|
|
4
|
+
import { Z as T2000Error, b4 as T2000Options, a4 as TransactionSigner, w as PayOptions, b5 as X402Probe, x as PayResult, b6 as SerializedCetusRoute, b7 as SwapResult, b8 as SwapQuoteResult, X as SupportedAsset, Q as SendResult, B as BalanceResponse, a3 as TransactionRecord, i as DepositInfo, b9 as PaymentRequest, ae as ZkLoginProof, ba as SuiCoreClient, u as OverlayFeeConfig, bb as SponsoredCoinMergeCache, Y as SwapRouteResult, bc as SendableAsset } from './commerce-DOKu1FYI.js';
|
|
5
|
+
export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, bd as CETUS_USDC_SUI_POOL, C as CLOCK_ID, c as COIN_REGISTRY, d as ClassifyBalanceChange, e as ClassifyResult, f as CoinMeta, be as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, g as DEFAULT_COMMERCE_API_BASE, bf as DEFAULT_GRPC_URL, h as DEFAULT_NETWORK, E as ETH_TYPE, j as ExtractedTransfer, bg as GASLESS_MIN_STABLE_AMOUNT, bh as GASLESS_STABLE_TYPES, G as GAS_RESERVE_MIN, I as IKA_TYPE, J as JOB_STATES, k as Job, l as JobState, m as JobTerms, n as JobVerification, K as KNOWN_TARGETS, o as KeypairSigner, L as LABEL_PATTERNS, p as LOFI_TYPE, M as MANIFEST_TYPE, q as MAX_DELIVER_HORIZON_MS, r as MAX_JOB_USDC, s as MAX_REVIEW_WINDOW_MS, t as MIST_PER_SUI, N as NAVX_TYPE, bi as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bj as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bk as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bl as SelectAndSplitResult, bm as SerializedCetusRoutePath, bn as SerializedRouterDataV3, R as ServiceListing, T as SimulationResult, U as StableAsset, V as SuiHolding, W as SuiRpcTxBlock, _ as T2000ErrorCode, $ as T2000ErrorData, a0 as T2000_OVERLAY_FEE_WALLET, a1 as TOKEN_MAP, a2 as TransactionLeg, a5 as TxDirection, a6 as USDC_DECIMALS, a7 as USDC_TYPE, a8 as USDE_TYPE, a9 as USDSUI_TYPE, aa as USDT_TYPE, ab as WAL_TYPE, ac as WBTC_TYPE, ad as X402ActivityPayload, af as ZkLoginSigner, bo as addSendToTx, bp as addSwapToTx, bq as assertAllowedAsset, br as assertBuyerRequirements, ag as buildCreateJobTx, bs as buildDeclineJobTx, ah as buildDeliverJobTx, ai as buildRefundJobTx, aj as buildRejectJobTx, ak as buildReleaseJobTx, al as buildSendTx, am as buildSwapTx, an as checkPositiveAmount, ao as checkSuiAddress, ap as classifyAction, aq as classifyLabel, ar as classifyTransaction, bt as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bu as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bv as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bw as getSuiClient, bx as getSuiGrpcClient, by as isAllowedAsset, bz as isCetusRouteFresh, bA as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bB as normalizeAsset, bC as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithX402, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, bD as probeX402, aT as putJobSpec, bE as queryHistory, bF as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bG as selectAndSplitCoin, bH as selectSuiCoin, bI as serializeCetusRoute, bJ as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bK as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bL as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-DOKu1FYI.js';
|
|
6
6
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
7
7
|
import { SuinsClient } from '@mysten/suins';
|
|
8
8
|
import '@mysten/sui/client';
|
|
@@ -275,6 +275,13 @@ declare class T2000 extends EventEmitter<T2000Events> {
|
|
|
275
275
|
get keypair(): Ed25519Keypair;
|
|
276
276
|
/** Transaction signer (works for both keypair and zkLogin). */
|
|
277
277
|
get signer(): TransactionSigner;
|
|
278
|
+
/**
|
|
279
|
+
* READ-ONLY price probe for an x402 endpoint (S.919). Reports what `pay()`
|
|
280
|
+
* would cost without signing or spending, so a caller (Connect's
|
|
281
|
+
* `t2000_pay_probe`, the CLI, a UI) can show terms before committing.
|
|
282
|
+
* No limit gate: nothing moves.
|
|
283
|
+
*/
|
|
284
|
+
payProbe(options: PayOptions): Promise<X402Probe>;
|
|
278
285
|
pay(options: PayOptions): Promise<PayResult>;
|
|
279
286
|
/** Non-streaming chat completion against Private Inference. */
|
|
280
287
|
chat(params: ChatParams): Promise<ChatResult>;
|
|
@@ -425,6 +432,15 @@ declare const SUI_ADDRESS_STRICT_REGEX: RegExp;
|
|
|
425
432
|
* but every label must use only `[a-z0-9-]`.
|
|
426
433
|
*/
|
|
427
434
|
declare const SUINS_NAME_REGEX: RegExp;
|
|
435
|
+
/**
|
|
436
|
+
* Canonicalize user paste BEFORE address/SuiNS shape checks:
|
|
437
|
+
* - `label@audric` → `label.audric.sui` (lowercased) — the literal parent
|
|
438
|
+
* string deliberately matches `AUDRIC_PARENT_NAME` in
|
|
439
|
+
* `protocols/suins-leaf.ts` (not imported: that module pulls the heavy
|
|
440
|
+
* `@mysten/suins` client into every normalizer consumer).
|
|
441
|
+
* - everything else (0x, `.sui` names, garbage) passes through trimmed.
|
|
442
|
+
*/
|
|
443
|
+
declare function canonicalizeRecipientInput(raw: string): string;
|
|
428
444
|
declare class InvalidAddressError extends Error {
|
|
429
445
|
readonly raw: string;
|
|
430
446
|
constructor(raw: string);
|
|
@@ -1251,4 +1267,4 @@ declare function fullHandle(label: string, parentName?: string): string;
|
|
|
1251
1267
|
*/
|
|
1252
1268
|
declare function displayHandle(label: string, parentName?: string): string;
|
|
1253
1269
|
|
|
1254
|
-
export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, type CheckStatus, type ComposeTxOptions, type ComposeTxResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, ESCROW_JOB_TYPE_MARKER, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_OPEN_WINDOW_MS, type NormalizedAddress, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_TYPE_MARKER, type OpenJobFilter, type OpenJobRow, type Opening, type OpeningTerms, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, SerializedCetusRoute, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, type TrustMode, type UpstreamClaim, type VerifyAnchor, type VerifyCheck, type VerifyOptions, type VerifyResult, type VerifyUpstream, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateOpeningTx, buildRefundUnclaimedTx, buildRevokeLeafTx, cancelOpenJob, chatCompletion, chatCompletionStream, claimOpenJob, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, listOpenJobs, loadKey, looksLikeSuiNs, normalizeAddressInput, postOpenJob, preflightCreateOpening, queryBalance, readLimitsFile, recordDailySpend, refundOpenJob, resolveAddressToSuinsViaRpc, resolveCreatedObjectId, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
|
|
1270
|
+
export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, type CheckStatus, type ComposeTxOptions, type ComposeTxResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, ESCROW_JOB_TYPE_MARKER, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_OPEN_WINDOW_MS, type NormalizedAddress, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_TYPE_MARKER, type OpenJobFilter, type OpenJobRow, type Opening, type OpeningTerms, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SendResult, type SendTransferInput, SendableAsset, SerializedCetusRoute, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, TransactionRecord, TransactionSigner, type TrustMode, type UpstreamClaim, type VerifyAnchor, type VerifyCheck, type VerifyOptions, type VerifyResult, type VerifyUpstream, WRITE_APPENDER_REGISTRY, type WriteStep, type WriteToolName, X402Probe, ZkLoginProof, approxUsdValue, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateOpeningTx, buildRefundUnclaimedTx, buildRevokeLeafTx, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, claimOpenJob, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, listOpenJobs, loadKey, looksLikeSuiNs, normalizeAddressInput, postOpenJob, preflightCreateOpening, queryBalance, readLimitsFile, recordDailySpend, refundOpenJob, resolveAddressToSuinsViaRpc, resolveCreatedObjectId, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
|
package/dist/index.js
CHANGED
|
@@ -1134,11 +1134,65 @@ function preflightPay(input) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
return PREFLIGHT_OK;
|
|
1136
1136
|
}
|
|
1137
|
-
async function
|
|
1138
|
-
const {
|
|
1139
|
-
|
|
1140
|
-
const pf = preflightPay({ url: options.url, maxPrice: options.maxPrice });
|
|
1137
|
+
async function probeX402(args) {
|
|
1138
|
+
const { network } = args;
|
|
1139
|
+
const pf = preflightPay({ url: args.options.url, maxPrice: args.options.maxPrice });
|
|
1141
1140
|
if (!pf.valid) throw new T2000Error(pf.code, pf.error);
|
|
1141
|
+
const { reqInit } = normalizePayRequest(args.options);
|
|
1142
|
+
const probe = await fetch(args.options.url, reqInit);
|
|
1143
|
+
if (probe.status !== 402) {
|
|
1144
|
+
return {
|
|
1145
|
+
kind: "free",
|
|
1146
|
+
status: probe.status,
|
|
1147
|
+
note: "No payment required \u2014 this endpoint served without a 402."
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
const pick = await pickSuiExactRequirements(probe, network);
|
|
1151
|
+
if (pick.kind === "payable") {
|
|
1152
|
+
const requirements = pick.requirements;
|
|
1153
|
+
const priceUsdc = atomicToHuman(
|
|
1154
|
+
BigInt(requirements.maxAmountRequired),
|
|
1155
|
+
await assetDecimals(requirements.asset)
|
|
1156
|
+
);
|
|
1157
|
+
const { isX402EscrowRequirements } = await import('@t2000/sui-x402');
|
|
1158
|
+
if (isX402EscrowRequirements(requirements)) {
|
|
1159
|
+
return {
|
|
1160
|
+
kind: "escrow",
|
|
1161
|
+
priceUsdc,
|
|
1162
|
+
payTo: requirements.payTo,
|
|
1163
|
+
note: "This endpoint sells deliverable work through on-chain escrow, not an instant call. Hire it as a job instead \u2014 funds lock in a Job object and release on delivery."
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
return {
|
|
1167
|
+
kind: "payable",
|
|
1168
|
+
priceUsdc,
|
|
1169
|
+
asset: requirements.asset,
|
|
1170
|
+
payTo: requirements.payTo,
|
|
1171
|
+
network
|
|
1172
|
+
};
|
|
1173
|
+
}
|
|
1174
|
+
if (hasPaymentAuthenticateHeader(probe)) {
|
|
1175
|
+
return {
|
|
1176
|
+
kind: "unsupported",
|
|
1177
|
+
reason: "header-only-402-unsupported",
|
|
1178
|
+
note: "This seller answered a header-only 402 (WWW-Authenticate: Payment) with no payable x402 accepts[] envelope. That dialect is no longer supported \u2014 the seller must offer x402 (e.g. @t2000/serve emits it)."
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
if (pick.kind === "incomplete") {
|
|
1182
|
+
return {
|
|
1183
|
+
kind: "incomplete",
|
|
1184
|
+
reason: "incomplete-x402-accepts",
|
|
1185
|
+
note: "Seller's x402 challenge is incomplete (missing extra.suimpp) \u2014 the 402 advertises an exact/sui entry but carries no settlement challenge to bind a payment to."
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
return {
|
|
1189
|
+
kind: "not-x402",
|
|
1190
|
+
status: probe.status,
|
|
1191
|
+
note: `Endpoint returned 402 without an x402 'exact' / sui:${network} requirement in the body. Nothing this SDK can pay.`
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
function normalizePayRequest(input) {
|
|
1195
|
+
let options = input;
|
|
1142
1196
|
const method = (options.method ?? "GET").toUpperCase();
|
|
1143
1197
|
const canHaveBody = method !== "GET" && method !== "HEAD";
|
|
1144
1198
|
if (canHaveBody && typeof options.body === "string" && isJsonText(options.body) && !hasContentType(options.headers)) {
|
|
@@ -1147,11 +1201,23 @@ async function payWithX402(args) {
|
|
|
1147
1201
|
headers: { ...options.headers ?? {}, "content-type": "application/json" }
|
|
1148
1202
|
};
|
|
1149
1203
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1204
|
+
return {
|
|
1205
|
+
options,
|
|
1206
|
+
reqInit: {
|
|
1207
|
+
method,
|
|
1208
|
+
headers: options.headers,
|
|
1209
|
+
body: canHaveBody ? options.body : void 0
|
|
1210
|
+
}
|
|
1154
1211
|
};
|
|
1212
|
+
}
|
|
1213
|
+
async function payWithX402(args) {
|
|
1214
|
+
const { signer, client } = args;
|
|
1215
|
+
let options = args.options;
|
|
1216
|
+
const pf = preflightPay({ url: options.url, maxPrice: options.maxPrice });
|
|
1217
|
+
if (!pf.valid) throw new T2000Error(pf.code, pf.error);
|
|
1218
|
+
const normalized = normalizePayRequest(options);
|
|
1219
|
+
options = normalized.options;
|
|
1220
|
+
const reqInit = normalized.reqInit;
|
|
1155
1221
|
const probe = await fetch(options.url, reqInit);
|
|
1156
1222
|
if (probe.status !== 402) {
|
|
1157
1223
|
return finalize(probe, { paid: false });
|
|
@@ -1936,10 +2002,19 @@ var REVERSE_NAME_QUERY = `query ReverseSuins($address: SuiAddress!) {
|
|
|
1936
2002
|
var SUI_ADDRESS_REGEX = /^0x[a-fA-F0-9]{1,64}$/i;
|
|
1937
2003
|
var SUI_ADDRESS_STRICT_REGEX = /^0x[a-fA-F0-9]{64}$/i;
|
|
1938
2004
|
var SUINS_NAME_REGEX = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.sui$/;
|
|
2005
|
+
var AUDRIC_HANDLE_RE = /^([a-z0-9-]+)@audric$/i;
|
|
2006
|
+
function canonicalizeRecipientInput(raw) {
|
|
2007
|
+
const trimmed = raw.trim();
|
|
2008
|
+
const m = AUDRIC_HANDLE_RE.exec(trimmed);
|
|
2009
|
+
if (m) {
|
|
2010
|
+
return `${m[1].toLowerCase()}.audric.sui`;
|
|
2011
|
+
}
|
|
2012
|
+
return trimmed;
|
|
2013
|
+
}
|
|
1939
2014
|
var InvalidAddressError = class extends Error {
|
|
1940
2015
|
constructor(raw) {
|
|
1941
2016
|
super(
|
|
1942
|
-
`"${raw}" isn't a valid Sui address or SuiNS name. Pass a 0x-prefixed hex address (e.g. 0x40cd\u20263e62)
|
|
2017
|
+
`"${raw}" isn't a valid Sui address or SuiNS name. Pass a 0x-prefixed hex address (e.g. 0x40cd\u20263e62), a SuiNS name ending in .sui (e.g. alex.sui), or a Passport handle (e.g. alex@audric).`
|
|
1943
2018
|
);
|
|
1944
2019
|
this.raw = raw;
|
|
1945
2020
|
this.name = "InvalidAddressError";
|
|
@@ -1963,10 +2038,10 @@ var SuinsRpcError = class extends Error {
|
|
|
1963
2038
|
};
|
|
1964
2039
|
function looksLikeSuiNs(value) {
|
|
1965
2040
|
if (!value) return false;
|
|
1966
|
-
return SUINS_NAME_REGEX.test(value
|
|
2041
|
+
return SUINS_NAME_REGEX.test(canonicalizeRecipientInput(value).toLowerCase());
|
|
1967
2042
|
}
|
|
1968
2043
|
async function resolveSuinsViaRpc(rawName, ctx = {}) {
|
|
1969
|
-
const name = rawName
|
|
2044
|
+
const name = canonicalizeRecipientInput(rawName).toLowerCase();
|
|
1970
2045
|
if (!SUINS_NAME_REGEX.test(name)) {
|
|
1971
2046
|
throw new InvalidAddressError(rawName);
|
|
1972
2047
|
}
|
|
@@ -2011,7 +2086,7 @@ async function resolveAddressToSuinsViaRpc(rawAddress, ctx = {}) {
|
|
|
2011
2086
|
return domain ? [domain] : [];
|
|
2012
2087
|
}
|
|
2013
2088
|
async function normalizeAddressInput(value, ctx = {}) {
|
|
2014
|
-
const trimmed = value
|
|
2089
|
+
const trimmed = canonicalizeRecipientInput(value);
|
|
2015
2090
|
if (SUI_ADDRESS_REGEX.test(trimmed)) {
|
|
2016
2091
|
return { address: trimmed.toLowerCase(), suinsName: null, raw: value };
|
|
2017
2092
|
}
|
|
@@ -2784,6 +2859,15 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
2784
2859
|
return this._signer;
|
|
2785
2860
|
}
|
|
2786
2861
|
// -- MPP Payments --
|
|
2862
|
+
/**
|
|
2863
|
+
* READ-ONLY price probe for an x402 endpoint (S.919). Reports what `pay()`
|
|
2864
|
+
* would cost without signing or spending, so a caller (Connect's
|
|
2865
|
+
* `t2000_pay_probe`, the CLI, a UI) can show terms before committing.
|
|
2866
|
+
* No limit gate: nothing moves.
|
|
2867
|
+
*/
|
|
2868
|
+
async payProbe(options) {
|
|
2869
|
+
return await probeX402({ network: this.client.network, options });
|
|
2870
|
+
}
|
|
2787
2871
|
async pay(options) {
|
|
2788
2872
|
this.limits.assert({ operation: "pay", amountUsd: options.maxPrice ?? 0, force: options.force });
|
|
2789
2873
|
const result = await payWithX402({ signer: this._signer, client: this.client, options });
|
|
@@ -3074,7 +3158,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
3074
3158
|
* with the live execute path (never resolve the same input two ways).
|
|
3075
3159
|
*/
|
|
3076
3160
|
async resolveRecipient(input) {
|
|
3077
|
-
const trimmed = input
|
|
3161
|
+
const trimmed = canonicalizeRecipientInput(input);
|
|
3078
3162
|
if (SUI_ADDRESS_REGEX.test(trimmed)) {
|
|
3079
3163
|
return { address: trimmed.toLowerCase() };
|
|
3080
3164
|
}
|
|
@@ -3098,7 +3182,7 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
3098
3182
|
}
|
|
3099
3183
|
throw new T2000Error(
|
|
3100
3184
|
"INVALID_ADDRESS",
|
|
3101
|
-
`Cannot resolve recipient "${input}". Provide a 0x address
|
|
3185
|
+
`Cannot resolve recipient "${input}". Provide a 0x address, a .sui name, or a Passport handle (name@audric).`
|
|
3102
3186
|
);
|
|
3103
3187
|
}
|
|
3104
3188
|
async balance() {
|
|
@@ -4201,6 +4285,6 @@ function displayHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
|
4201
4285
|
// src/index.ts
|
|
4202
4286
|
init_preflight();
|
|
4203
4287
|
|
|
4204
|
-
export { A2A_ESCROW_FEE_CONFIG_ID, A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_ACTIVITY_REPORT_URL, DEFAULT_API_BASE, DEFAULT_COMMERCE_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ESCROW_JOB_TYPE_MARKER, 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_DELIVER_HORIZON_MS, MAX_JOB_USDC, MAX_OPEN_WINDOW_MS, MAX_REVIEW_WINDOW_MS, MIST_PER_SUI, NAVX_TYPE, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_TYPE_MARKER, 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, assertBuyerRequirements, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateJobTx, buildCreateOpeningTx, buildDeclineJobTx, buildDeliverJobTx, buildRefundJobTx, buildRefundUnclaimedTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, cancelOpenJob, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, claimOpenJob, classifyAction, classifyLabel, classifyTransaction, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, fetchService, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getJob, getJobSpec, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, jobActionsFor, keypairFromPrivateKey, listModels, listOpenJobs, listServices, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseSuiRpcTx, payWithX402, postOpenJob, preflightCreateJob, preflightCreateOpening, preflightFail, preflightPay, preflightSend, preflightSwap, putJobSpec, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, refundOpenJob, reportX402Activity, resolveAddressToSuinsViaRpc, resolveCreatedObjectId, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, verifyReceipt, walletExists, writeLimitsFile };
|
|
4288
|
+
export { A2A_ESCROW_FEE_CONFIG_ID, A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_ACTIVITY_REPORT_URL, DEFAULT_API_BASE, DEFAULT_COMMERCE_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ESCROW_JOB_TYPE_MARKER, 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_DELIVER_HORIZON_MS, MAX_JOB_USDC, MAX_OPEN_WINDOW_MS, MAX_REVIEW_WINDOW_MS, MIST_PER_SUI, NAVX_TYPE, OPENING_CLAIM_POLICY_ANY_ACTIVE, OPENING_TYPE_MARKER, 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, assertBuyerRequirements, assertLimitConfig, buildAddLeafTx, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateJobTx, buildCreateOpeningTx, buildDeclineJobTx, buildDeliverJobTx, buildRefundJobTx, buildRefundUnclaimedTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, cancelOpenJob, canonicalizeRecipientInput, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, claimOpenJob, classifyAction, classifyLabel, classifyTransaction, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, deserializeCetusRoute, displayHandle, executeTx, exportPrivateKey, extractAllUserLegs, extractTransferDetails, extractTxCommands, extractTxSender, fallbackLabel, fetchAllCoins, fetchService, findSwapRoute, formatAssetAmount, formatSui, formatUsd, fullHandle, generateKeypair, getAddress, getCoinMeta, getDecimals, getDecimalsForCoinType, getJob, getJobSpec, getLimits, getOpenJob, getOpening, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, jobActionsFor, keypairFromPrivateKey, listModels, listOpenJobs, listServices, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseSuiRpcTx, payWithX402, postOpenJob, preflightCreateJob, preflightCreateOpening, preflightFail, preflightPay, preflightSend, preflightSwap, probeX402, putJobSpec, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, refundOpenJob, reportX402Activity, resolveAddressToSuinsViaRpc, resolveCreatedObjectId, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, verifyReceipt, walletExists, writeLimitsFile };
|
|
4205
4289
|
//# sourceMappingURL=index.js.map
|
|
4206
4290
|
//# sourceMappingURL=index.js.map
|