@t2000/sdk 10.25.1 → 10.27.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 +22 -11
- 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 +22 -11
- package/dist/browser.js.map +1 -1
- package/dist/{commerce-B_eH6fvR.d.cts → commerce-DR_F-Eg6.d.cts} +56 -2
- package/dist/{commerce-B_eH6fvR.d.ts → commerce-DR_F-Eg6.d.ts} +56 -2
- package/dist/index.cjs +97 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -3
- package/dist/index.d.ts +31 -3
- package/dist/index.js +94 -11
- 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-DR_F-Eg6.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, bi as MAINNET_A2A_ESCROW_PACKAGE_ID, 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, bj as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bk as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bl as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bm as SelectAndSplitResult, bn as SerializedCetusRoutePath, bo 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, bp as addSendToTx, bq as addSwapToTx, br as assertAllowedAsset, bs as assertBuyerRequirements, ag as buildCreateJobTx, bt 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, bu as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bv as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bw as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bx as getSuiClient, by as getSuiGrpcClient, bz as isAllowedAsset, bA as isCetusRouteFresh, bB as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bC as normalizeAsset, bD as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithX402, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, bE as probeX402, aT as putJobSpec, bF as queryHistory, bG as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bH as selectAndSplitCoin, bI as selectSuiCoin, bJ as serializeCetusRoute, bK as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bL as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bM as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-DR_F-Eg6.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>;
|
|
@@ -588,6 +595,10 @@ declare function getAddress(keypair: Ed25519Keypair): string;
|
|
|
588
595
|
* adds `escrow::decline`; v2 added the `opening` module). New-verb calls
|
|
589
596
|
* (opening + decline) target this; original-id verbs stay put, and older
|
|
590
597
|
* package ids remain callable for published clients. */
|
|
598
|
+
/** The published `opening` package id on MAINNET — a literal, never an env
|
|
599
|
+
* read, so it can serve as a signature-time trust anchor (S.930). Must match
|
|
600
|
+
* the Move upgrade publish notes. */
|
|
601
|
+
declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x69ad93c555519de520a5c7f7f2963ad6f8b91cefc098fc2eed75942dcb5bcbe7";
|
|
591
602
|
declare const A2A_ESCROW_OPENING_PACKAGE_ID: string;
|
|
592
603
|
/**
|
|
593
604
|
* PINNED per-upgrade package ids — event-filter anchors, NEVER bump these.
|
|
@@ -665,6 +676,23 @@ declare function getOpening(client: SuiCoreClient, openingId: string): Promise<O
|
|
|
665
676
|
* on-chain Openings. `id` is the Opening OBJECT id (0x…). Buyer addresses
|
|
666
677
|
* never appear (registered-agent buyers surface by id); the claiming ASP
|
|
667
678
|
* is public. Title + brief are public by design. */
|
|
679
|
+
/** A host-installed veto on sponsored open-board transactions (S.930).
|
|
680
|
+
*
|
|
681
|
+
* Called twice per verb: once with no `txBytes` before the prepare request
|
|
682
|
+
* (so an untrusted API host can be refused before it learns the address),
|
|
683
|
+
* and once with the prepared bytes before they are signed. Throwing from
|
|
684
|
+
* either aborts the verb.
|
|
685
|
+
*
|
|
686
|
+
* The SDK deliberately ships NO default policy: package-id verification
|
|
687
|
+
* needs non-env literals and a notion of "the canonical host", both of which
|
|
688
|
+
* belong to the host application. Unset = today's behavior. */
|
|
689
|
+
type SponsoredTxGuard = (ctx: {
|
|
690
|
+
base: string;
|
|
691
|
+
action: string;
|
|
692
|
+
txBytes?: string;
|
|
693
|
+
}) => void;
|
|
694
|
+
/** Install (or clear, with `null`) the sponsored-tx guard. */
|
|
695
|
+
declare function setSponsoredTxGuard(guard: SponsoredTxGuard | null): void;
|
|
668
696
|
interface OpenJobRow {
|
|
669
697
|
id: string;
|
|
670
698
|
title: string | null;
|
|
@@ -1260,4 +1288,4 @@ declare function fullHandle(label: string, parentName?: string): string;
|
|
|
1260
1288
|
*/
|
|
1261
1289
|
declare function displayHandle(label: string, parentName?: string): string;
|
|
1262
1290
|
|
|
1263
|
-
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, 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 };
|
|
1291
|
+
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, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, 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 SponsoredTxGuard, 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, setSponsoredTxGuard, 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-DR_F-Eg6.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, bi as MAINNET_A2A_ESCROW_PACKAGE_ID, 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, bj as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bk as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bl as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bm as SelectAndSplitResult, bn as SerializedCetusRoutePath, bo 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, bp as addSendToTx, bq as addSwapToTx, br as assertAllowedAsset, bs as assertBuyerRequirements, ag as buildCreateJobTx, bt 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, bu as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bv as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bw as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bx as getSuiClient, by as getSuiGrpcClient, bz as isAllowedAsset, bA as isCetusRouteFresh, bB as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bC as normalizeAsset, bD as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithX402, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, bE as probeX402, aT as putJobSpec, bF as queryHistory, bG as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bH as selectAndSplitCoin, bI as selectSuiCoin, bJ as serializeCetusRoute, bK as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bL as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bM as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-DR_F-Eg6.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>;
|
|
@@ -588,6 +595,10 @@ declare function getAddress(keypair: Ed25519Keypair): string;
|
|
|
588
595
|
* adds `escrow::decline`; v2 added the `opening` module). New-verb calls
|
|
589
596
|
* (opening + decline) target this; original-id verbs stay put, and older
|
|
590
597
|
* package ids remain callable for published clients. */
|
|
598
|
+
/** The published `opening` package id on MAINNET — a literal, never an env
|
|
599
|
+
* read, so it can serve as a signature-time trust anchor (S.930). Must match
|
|
600
|
+
* the Move upgrade publish notes. */
|
|
601
|
+
declare const MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x69ad93c555519de520a5c7f7f2963ad6f8b91cefc098fc2eed75942dcb5bcbe7";
|
|
591
602
|
declare const A2A_ESCROW_OPENING_PACKAGE_ID: string;
|
|
592
603
|
/**
|
|
593
604
|
* PINNED per-upgrade package ids — event-filter anchors, NEVER bump these.
|
|
@@ -665,6 +676,23 @@ declare function getOpening(client: SuiCoreClient, openingId: string): Promise<O
|
|
|
665
676
|
* on-chain Openings. `id` is the Opening OBJECT id (0x…). Buyer addresses
|
|
666
677
|
* never appear (registered-agent buyers surface by id); the claiming ASP
|
|
667
678
|
* is public. Title + brief are public by design. */
|
|
679
|
+
/** A host-installed veto on sponsored open-board transactions (S.930).
|
|
680
|
+
*
|
|
681
|
+
* Called twice per verb: once with no `txBytes` before the prepare request
|
|
682
|
+
* (so an untrusted API host can be refused before it learns the address),
|
|
683
|
+
* and once with the prepared bytes before they are signed. Throwing from
|
|
684
|
+
* either aborts the verb.
|
|
685
|
+
*
|
|
686
|
+
* The SDK deliberately ships NO default policy: package-id verification
|
|
687
|
+
* needs non-env literals and a notion of "the canonical host", both of which
|
|
688
|
+
* belong to the host application. Unset = today's behavior. */
|
|
689
|
+
type SponsoredTxGuard = (ctx: {
|
|
690
|
+
base: string;
|
|
691
|
+
action: string;
|
|
692
|
+
txBytes?: string;
|
|
693
|
+
}) => void;
|
|
694
|
+
/** Install (or clear, with `null`) the sponsored-tx guard. */
|
|
695
|
+
declare function setSponsoredTxGuard(guard: SponsoredTxGuard | null): void;
|
|
668
696
|
interface OpenJobRow {
|
|
669
697
|
id: string;
|
|
670
698
|
title: string | null;
|
|
@@ -1260,4 +1288,4 @@ declare function fullHandle(label: string, parentName?: string): string;
|
|
|
1260
1288
|
*/
|
|
1261
1289
|
declare function displayHandle(label: string, parentName?: string): string;
|
|
1262
1290
|
|
|
1263
|
-
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, 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 };
|
|
1291
|
+
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, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, 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 SponsoredTxGuard, 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, setSponsoredTxGuard, 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 });
|
|
@@ -2793,6 +2859,15 @@ var T2000 = class _T2000 extends EventEmitter {
|
|
|
2793
2859
|
return this._signer;
|
|
2794
2860
|
}
|
|
2795
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
|
+
}
|
|
2796
2871
|
async pay(options) {
|
|
2797
2872
|
this.limits.assert({ operation: "pay", amountUsd: options.maxPrice ?? 0, force: options.force });
|
|
2798
2873
|
const result = await payWithX402({ signer: this._signer, client: this.client, options });
|
|
@@ -3211,7 +3286,8 @@ init_coinSelection();
|
|
|
3211
3286
|
init_errors();
|
|
3212
3287
|
init_token_registry();
|
|
3213
3288
|
init_coinSelection();
|
|
3214
|
-
var
|
|
3289
|
+
var MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID = "0x69ad93c555519de520a5c7f7f2963ad6f8b91cefc098fc2eed75942dcb5bcbe7";
|
|
3290
|
+
var A2A_ESCROW_OPENING_PACKAGE_ID = process.env.A2A_ESCROW_OPENING_PACKAGE_ID ?? MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID;
|
|
3215
3291
|
var A2A_ESCROW_PACKAGE_V2_ID = "0x860288d789dc617f6474a0a6801d6011e53bf30d5fb801cdad47b9bc6adb098b";
|
|
3216
3292
|
var A2A_ESCROW_PACKAGE_V3_ID = "0x69ad93c555519de520a5c7f7f2963ad6f8b91cefc098fc2eed75942dcb5bcbe7";
|
|
3217
3293
|
var CLOCK_ID2 = "0x6";
|
|
@@ -3347,7 +3423,8 @@ async function getOpening(client, openingId) {
|
|
|
3347
3423
|
}
|
|
3348
3424
|
|
|
3349
3425
|
// src/wallet/job.ts
|
|
3350
|
-
var
|
|
3426
|
+
var MAINNET_A2A_ESCROW_PACKAGE_ID = "0x358a819c1c016e2cc84ef5fbea81cba90c31f7f8a62bf45cb5e5276acf198bdd";
|
|
3427
|
+
var A2A_ESCROW_PACKAGE_ID = process.env.A2A_ESCROW_PACKAGE_ID ?? MAINNET_A2A_ESCROW_PACKAGE_ID;
|
|
3351
3428
|
var A2A_ESCROW_FEE_CONFIG_ID = process.env.A2A_ESCROW_FEE_CONFIG_ID ?? "0xddaa25570950b7484dbf20797ebcf75707be9c87cd67bef2a06ed2e81d2c494b";
|
|
3352
3429
|
var A2A_ESCROW_FEE_CONFIG_VERSION = Number(
|
|
3353
3430
|
process.env.A2A_ESCROW_FEE_CONFIG_VERSION ?? 931861903
|
|
@@ -3717,6 +3794,10 @@ async function fetchJson(url, init) {
|
|
|
3717
3794
|
}
|
|
3718
3795
|
return json;
|
|
3719
3796
|
}
|
|
3797
|
+
var sponsoredTxGuard = null;
|
|
3798
|
+
function setSponsoredTxGuard(guard) {
|
|
3799
|
+
sponsoredTxGuard = guard;
|
|
3800
|
+
}
|
|
3720
3801
|
async function listOpenJobs(base, filter = {}) {
|
|
3721
3802
|
const params = new URLSearchParams();
|
|
3722
3803
|
if (filter.status) params.set("status", filter.status);
|
|
@@ -3735,6 +3816,7 @@ async function getOpenJob(base, id) {
|
|
|
3735
3816
|
}
|
|
3736
3817
|
async function sponsoredOpeningVerb(base, signer, action, params) {
|
|
3737
3818
|
const address = signer.getAddress();
|
|
3819
|
+
sponsoredTxGuard?.({ base, action });
|
|
3738
3820
|
const prep = await fetchJson(`${base}/job/prepare`, {
|
|
3739
3821
|
method: "POST",
|
|
3740
3822
|
body: { address, action, params }
|
|
@@ -3744,6 +3826,7 @@ async function sponsoredOpeningVerb(base, signer, action, params) {
|
|
|
3744
3826
|
if (!(nonce && txBytes)) {
|
|
3745
3827
|
throw new Error("Failed to prepare the transaction.");
|
|
3746
3828
|
}
|
|
3829
|
+
sponsoredTxGuard?.({ base, action, txBytes });
|
|
3747
3830
|
const { signature } = await signer.signTransaction(fromBase64(txBytes));
|
|
3748
3831
|
const json = await fetchJson(`${base}/job/submit`, {
|
|
3749
3832
|
method: "POST",
|
|
@@ -4210,6 +4293,6 @@ function displayHandle(label, parentName = AUDRIC_PARENT_NAME) {
|
|
|
4210
4293
|
// src/index.ts
|
|
4211
4294
|
init_preflight();
|
|
4212
4295
|
|
|
4213
|
-
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, 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 };
|
|
4296
|
+
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, MAINNET_A2A_ESCROW_OPENING_PACKAGE_ID, MAINNET_A2A_ESCROW_PACKAGE_ID, 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, setSponsoredTxGuard, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, verifyReceipt, walletExists, writeLimitsFile };
|
|
4214
4297
|
//# sourceMappingURL=index.js.map
|
|
4215
4298
|
//# sourceMappingURL=index.js.map
|