@t2000/sdk 10.21.2 → 10.22.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/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, b5 as SwapResult, b6 as SwapQuoteResult, X as SupportedAsset, Q as SendResult, B as BalanceResponse, a3 as TransactionRecord, i as DepositInfo, b7 as PaymentRequest, ae as ZkLoginProof, b8 as SuiCoreClient, u as OverlayFeeConfig, b9 as SponsoredCoinMergeCache, Y as SwapRouteResult, ba as SendableAsset } from './commerce-CS4wgrg5.cjs';
5
- export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, bb as CETUS_USDC_SUI_POOL, C as CLOCK_ID, c as COIN_REGISTRY, d as ClassifyBalanceChange, e as ClassifyResult, f as CoinMeta, bc as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, g as DEFAULT_COMMERCE_API_BASE, bd as DEFAULT_GRPC_URL, h as DEFAULT_NETWORK, E as ETH_TYPE, j as ExtractedTransfer, be as GASLESS_MIN_STABLE_AMOUNT, bf 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, bg as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bh as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bi as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bj as SelectAndSplitResult, bk as SerializedCetusRoute, bl as SerializedCetusRoutePath, bm 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, bn as addSendToTx, bo as addSwapToTx, bp as assertAllowedAsset, bq as assertBuyerRequirements, ag as buildCreateJobTx, br 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, bs as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bt as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bu as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bv as getSuiClient, bw as getSuiGrpcClient, bx as isAllowedAsset, by as isCetusRouteFresh, bz as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bA as normalizeAsset, bB as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithMpp, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, aT as putJobSpec, bC as queryHistory, bD as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bE as selectAndSplitCoin, bF as selectSuiCoin, bG as serializeCetusRoute, bH as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bI as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bJ as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-CS4wgrg5.cjs';
4
+ import { Z as T2000Error, b4 as T2000Options, a4 as TransactionSigner, w as PayOptions, x as PayResult, b5 as SwapResult, b6 as SwapQuoteResult, X as SupportedAsset, Q as SendResult, B as BalanceResponse, a3 as TransactionRecord, i as DepositInfo, b7 as PaymentRequest, ae as ZkLoginProof, b8 as SuiCoreClient, u as OverlayFeeConfig, b9 as SponsoredCoinMergeCache, Y as SwapRouteResult, ba as SendableAsset } from './commerce-D79xwwJ8.cjs';
5
+ export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, bb as CETUS_USDC_SUI_POOL, C as CLOCK_ID, c as COIN_REGISTRY, d as ClassifyBalanceChange, e as ClassifyResult, f as CoinMeta, bc as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, g as DEFAULT_COMMERCE_API_BASE, bd as DEFAULT_GRPC_URL, h as DEFAULT_NETWORK, E as ETH_TYPE, j as ExtractedTransfer, be as GASLESS_MIN_STABLE_AMOUNT, bf 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, bg as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bh as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bi as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bj as SelectAndSplitResult, bk as SerializedCetusRoute, bl as SerializedCetusRoutePath, bm 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, bn as addSendToTx, bo as addSwapToTx, bp as assertAllowedAsset, bq as assertBuyerRequirements, ag as buildCreateJobTx, br 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, bs as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bt as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bu as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bv as getSuiClient, bw as getSuiGrpcClient, bx as isAllowedAsset, by as isCetusRouteFresh, bz as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bA as normalizeAsset, bB as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithX402, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, aT as putJobSpec, bC as queryHistory, bD as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bE as selectAndSplitCoin, bF as selectSuiCoin, bG as serializeCetusRoute, bH as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bI as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bJ as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-D79xwwJ8.cjs';
6
6
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
7
7
  import { SuinsClient } from '@mysten/suins';
8
8
  import '@mysten/sui/client';
@@ -1237,200 +1237,4 @@ declare function fullHandle(label: string, parentName?: string): string;
1237
1237
  */
1238
1238
  declare function displayHandle(label: string, parentName?: string): string;
1239
1239
 
1240
- /** The locked v1 economics: 1B whole coins at 6 decimals (D-5 / L2-A). */
1241
- declare const AGENT_TOKEN_DECIMALS = 6;
1242
- declare const AGENT_TOKEN_TOTAL_SUPPLY = 1000000000000000n;
1243
- /** 50% LP / 50% agent treasury. */
1244
- declare const AGENT_TOKEN_LP_ALLOCATION: bigint;
1245
- declare const AGENT_TOKEN_TREASURY_ALLOCATION: bigint;
1246
- interface AgentCoinParams {
1247
- /** Ticker, 2–8 chars A–Z0–9, becomes module name (lowercased) + OTW. */
1248
- symbol: string;
1249
- name: string;
1250
- description: string;
1251
- iconUrl: string;
1252
- /** Receives the full minted supply — the LAUNCHER (who then signs the
1253
- * split/pool/lock transaction). Never a platform address. */
1254
- recipient: string;
1255
- }
1256
- /**
1257
- * Impersonation blocklist — top Sui-ecosystem + majors tickers an agent token
1258
- * must not squat (SPEC_AGENT_CAPITAL guards; kept deliberately short and
1259
- * high-confidence, console moderation covers the long tail).
1260
- */
1261
- declare const SYMBOL_BLOCKLIST: Set<string>;
1262
- /** Validate launch params; throws `T2000Error('INVALID_AMOUNT'|…)` shapes the
1263
- * console can surface directly. */
1264
- declare function validateAgentCoinParams(params: AgentCoinParams): void;
1265
- interface AgentCoinModule {
1266
- /** Rewritten module bytecode, ready for `tx.publish`. */
1267
- modules: number[][];
1268
- dependencies: string[];
1269
- /** Lowercased module name — the published coin type is
1270
- * `<pkg>::<moduleName>::<otw>`. */
1271
- moduleName: string;
1272
- otw: string;
1273
- }
1274
- /**
1275
- * Rewrite the compiled template for one agent's launch. Deterministic — same
1276
- * params, same bytes. Async because `@mysten/move-bytecode-template` (WASM)
1277
- * is loaded lazily HERE, not at module top level: a top-level import makes
1278
- * every SDK consumer's bundler ship/locate the .wasm at startup, which broke
1279
- * the CLI bundle in CI — only the launch path may pay that cost.
1280
- */
1281
- declare function buildAgentCoinModule(params: AgentCoinParams): Promise<AgentCoinModule>;
1282
-
1283
- /**
1284
- * Agent Capital launch orchestrator (SPEC_ACP_SUI §6, decisions D-5 + L2-A).
1285
- *
1286
- * A launch is TWO launcher-signed transactions:
1287
- *
1288
- * PTB 1 — `buildPublishAgentCoinTx`: publish the rewritten coin package +
1289
- * burn its UpgradeCap. `init` mints the full 1B supply to the launcher and
1290
- * freezes CoinMetadata + TreasuryCap (the can't-rug set).
1291
- *
1292
- * PTB 2 — `buildTokenizeTx`: bind the coin type to the Agent ID → split the
1293
- * supply 50/50 → create the Cetus AGENT/USDC pool seeded with the LP half +
1294
- * launcher-supplied USDC → wrap the position in a 10-year `LpLock` whose sole
1295
- * beneficiary is the agent wallet → finalize the registry record. Atomic:
1296
- * either the agent ends tokenized-with-locked-LP or nothing is recorded.
1297
- *
1298
- * Bind CANNOT live in PTB 1 — a type argument can't name a package being
1299
- * published in the same transaction — so a crashed launch between the PTBs
1300
- * leaves a published-but-unbound coin (launcher's gas, nobody's harm) and
1301
- * PTB 2 is simply retried.
1302
- *
1303
- * The quote side is USDC (L3 override 2026-07-25) — selected from the
1304
- * launcher's own coins, so gas sponsorship is now PERMITTED (sponsor gas can
1305
- * no longer become LP). v1 ships unsponsored; wire the job/register sponsor
1306
- * pattern if SUI-less launchers appear.
1307
- *
1308
- * These builders construct UNSIGNED transactions; auth lives in the Move
1309
- * layer (`registry::bind/finalize` re-check agent-or-confirmed-owner on
1310
- * `ctx.sender()` every call).
1311
- */
1312
- /** The published `agent_capital` package id (mainnet, FRESH deploy
1313
- * 2026-07-25 from the t2000 deployer `0xe7ac…`, tx `3FvSLERmmTLp396D…` —
1314
- * supersedes the orphaned 2026-07-24 `0x33a04c67…` publish, which was cut
1315
- * from the wrong wallet and never bound a token). Env-overridable for
1316
- * testnet/dev (same pattern as `A2A_ESCROW_PACKAGE_ID`). */
1317
- declare const AGENT_CAPITAL_PACKAGE_ID: string;
1318
- /** Latest upgraded package id — moveCall targets MUST use this (v1 lacks
1319
- * the `vesting` module; Sui routes calls by the id you name). Original id
1320
- * above stays for type/event references. v3 = batch-safe vesting claim. */
1321
- declare const AGENT_CAPITAL_PUBLISHED_AT: string;
1322
- /** The shared `CapitalRegistry` object id (mainnet). */
1323
- declare const CAPITAL_REGISTRY_ID: string;
1324
- /** `initial_shared_version` of the CapitalRegistry — lets builders reference
1325
- * the shared object without a resolution round-trip. */
1326
- declare const CAPITAL_REGISTRY_VERSION: number;
1327
- /** Minimum USDC the launcher must seed the pool with (L3 override 2026-07-25:
1328
- * the quote side is USDC, the settlement stable — never SUI). Enough that the
1329
- * pool opens with real two-sided liquidity rather than dust. */
1330
- declare const MIN_LP_USDC = 5000000n;
1331
- interface PublishAgentCoinArgs {
1332
- /** Coin branding; `recipient` MUST be the launcher (checked). */
1333
- coin: AgentCoinParams;
1334
- /** The wallet signing + funding this launch. */
1335
- launcher: string;
1336
- }
1337
- interface PublishAgentCoinResult {
1338
- tx: Transaction;
1339
- /** Module + OTW the published coin type will use:
1340
- * `<newPkg>::<moduleName>::<otw>`. */
1341
- moduleName: string;
1342
- otw: string;
1343
- }
1344
- /** PTB 1 — publish the agent coin package, burn upgradability in-tx.
1345
- * Async: the bytecode-template WASM loads lazily on first use. */
1346
- declare function buildPublishAgentCoinTx(args: PublishAgentCoinArgs): Promise<PublishAgentCoinResult>;
1347
- interface TokenizeArgs {
1348
- /** The agent being tokenized (Agent ID key — its wallet address). */
1349
- agent: string;
1350
- /** Signer: the agent itself or its CONFIRMED owner. */
1351
- launcher: string;
1352
- /** Published coin type from PTB 1: `<pkg>::<module>::<OTW>`. */
1353
- coinType: string;
1354
- /** The launcher-owned Coin object holding the full 1B supply (from PTB 1). */
1355
- supplyCoinId: string;
1356
- /** Raw USDC (6dp) the launcher seeds the pool with (≥ MIN_LP_USDC) —
1357
- * selected from the launcher's own coins, never platform funds. */
1358
- lpUsdcAmount: bigint;
1359
- /** Pool display url — the agent icon; optional. */
1360
- poolUrl?: string;
1361
- /** Pair orientation — from `simulate`-then-flip (see cetus-clmm.ts note). */
1362
- usdcFirst?: boolean;
1363
- /** The `agent_id::registry` shared object id. */
1364
- agentRegistryId: string;
1365
- /** Client for USDC coin selection (gRPC). */
1366
- client: SuiCoreClient;
1367
- }
1368
- /**
1369
- * PTB 2 — bind + split 50/50 + pool + 10y lock + finalize, atomically.
1370
- */
1371
- declare function buildTokenizeTx(args: TokenizeArgs): Promise<Transaction>;
1372
-
1373
- /**
1374
- * Cetus CLMM — pool creation + position plumbing for Agent Capital launches
1375
- * (SPEC_ACP_SUI §6). ISOLATED like `cetus-swap.ts`: this is the only file that
1376
- * may reference the Cetus CLMM surface.
1377
- *
1378
- * Deliberately NOT the Cetus CLMM TS SDK — pool creation is three moveCalls
1379
- * against the on-chain package (`pool_creator::create_pool_v2`,
1380
- * `position::pool_id`, `pool_creator::full_range_tick_range`), which is
1381
- * exactly the "thin `@mysten/sui` tx builders" shape Critical Rule 2 asks
1382
- * for. The aggregator SDK exception stays scoped to swaps.
1383
- *
1384
- * Signatures pinned against `cetus-clmm-interface` tag `mainnet-v1.52.3`
1385
- * (same tag the Move package depends on).
1386
- */
1387
- /** Cetus CLMM original package id (mainnet) — TYPE references (Position, …)
1388
- * and moveCall targets resolve through it; the runtime routes to the latest
1389
- * upgraded version recorded on-chain. */
1390
- declare const CETUS_CLMM_PACKAGE_ID: string;
1391
- /** Shared `GlobalConfig` (mainnet). */
1392
- declare const CETUS_GLOBAL_CONFIG_ID: string;
1393
- /** Shared `factory::Pools` (mainnet). */
1394
- declare const CETUS_POOLS_ID: string;
1395
- /** The canonical Position type tag (original package id, per Sui type rules). */
1396
- declare const CETUS_POSITION_TYPE: string;
1397
- /**
1398
- * Tick spacing 200 = the 1% fee tier — the Virtuals-shape choice for agent
1399
- * tokens: maximum fee flow to the agent wallet on a volatile new pair.
1400
- */
1401
- declare const AGENT_POOL_TICK_SPACING = 200;
1402
-
1403
- /**
1404
- * Direct-pool swap for agent tokens (S.815). The Cetus AGGREGATOR does not
1405
- * route fresh pools (probed 2026-07-25: "available path is empty" for $FS),
1406
- * so agent-token trading swaps DIRECTLY against the token's known pool via
1407
- * the integrate package's `pool_script::swap_a2b/b2a` entry — works from
1408
- * minute zero for every launch. Quote = a server-side simulation of the
1409
- * same transaction (the sim IS the price; no math to drift).
1410
- *
1411
- * Verified by mainnet simulation both directions on the $FS pool.
1412
- */
1413
- /** Cetus `integrate` latest published-at (mainnet, MVR v16 — their docs
1414
- * address table). The older ids fail the clmm version gate. */
1415
- declare const CETUS_INTEGRATE_PUBLISHED_AT: string;
1416
- interface DirectPoolSwapArgs {
1417
- client: SuiCoreClient;
1418
- /** The swapper (signs + receives output; pays own gas — unsponsored). */
1419
- sender: string;
1420
- /** The agent token's Cetus pool (from the AgentToken record). */
1421
- poolId: string;
1422
- /** buy = USDC → AGENT · sell = AGENT → USDC. */
1423
- direction: 'buy' | 'sell';
1424
- /** Raw input amount (USDC 6dp for buy; token 6dp for sell). */
1425
- amountIn: bigint;
1426
- /** Raw minimum output — slippage floor; 0n when simulating for a quote. */
1427
- minOut: bigint;
1428
- }
1429
- /**
1430
- * Build the unsigned direct-pool swap. Reads the pool's `Pool<A, B>` type
1431
- * args (pair orientation is whatever Cetus canonicalized at creation) and
1432
- * picks `swap_a2b` / `swap_b2a` so input→output matches `direction`.
1433
- */
1434
- declare function buildDirectPoolSwapTx(args: DirectPoolSwapArgs): Promise<Transaction>;
1435
-
1436
- export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AGENT_CAPITAL_PACKAGE_ID, AGENT_CAPITAL_PUBLISHED_AT, AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AGENT_POOL_TICK_SPACING, AGENT_TOKEN_DECIMALS, AGENT_TOKEN_LP_ALLOCATION, AGENT_TOKEN_TOTAL_SUPPLY, AGENT_TOKEN_TREASURY_ALLOCATION, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AgentCoinModule, type AgentCoinParams, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, CAPITAL_REGISTRY_ID, CAPITAL_REGISTRY_VERSION, CETUS_CLMM_PACKAGE_ID, CETUS_GLOBAL_CONFIG_ID, CETUS_INTEGRATE_PUBLISHED_AT, CETUS_POOLS_ID, CETUS_POSITION_TYPE, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, type CheckStatus, type ComposeTxOptions, type ComposeTxResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, type DirectPoolSwapArgs, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_OPEN_WINDOW_MS, MIN_LP_USDC, type NormalizedAddress, OPENING_CLAIM_POLICY_ANY_ACTIVE, type OpenJobFilter, type OpenJobRow, type Opening, type OpeningTerms, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, type PublishAgentCoinArgs, type PublishAgentCoinResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SYMBOL_BLOCKLIST, SendResult, type SendTransferInput, SendableAsset, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, type TokenizeArgs, 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, buildAgentCoinModule, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateOpeningTx, buildDirectPoolSwapTx, buildPublishAgentCoinTx, buildRefundUnclaimedTx, buildRevokeLeafTx, buildTokenizeTx, 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, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateAgentCoinParams, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
1240
+ export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_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, 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, 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, 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, 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, b5 as SwapResult, b6 as SwapQuoteResult, X as SupportedAsset, Q as SendResult, B as BalanceResponse, a3 as TransactionRecord, i as DepositInfo, b7 as PaymentRequest, ae as ZkLoginProof, b8 as SuiCoreClient, u as OverlayFeeConfig, b9 as SponsoredCoinMergeCache, Y as SwapRouteResult, ba as SendableAsset } from './commerce-CS4wgrg5.js';
5
- export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, bb as CETUS_USDC_SUI_POOL, C as CLOCK_ID, c as COIN_REGISTRY, d as ClassifyBalanceChange, e as ClassifyResult, f as CoinMeta, bc as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, g as DEFAULT_COMMERCE_API_BASE, bd as DEFAULT_GRPC_URL, h as DEFAULT_NETWORK, E as ETH_TYPE, j as ExtractedTransfer, be as GASLESS_MIN_STABLE_AMOUNT, bf 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, bg as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bh as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bi as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bj as SelectAndSplitResult, bk as SerializedCetusRoute, bl as SerializedCetusRoutePath, bm 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, bn as addSendToTx, bo as addSwapToTx, bp as assertAllowedAsset, bq as assertBuyerRequirements, ag as buildCreateJobTx, br 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, bs as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bt as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bu as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bv as getSuiClient, bw as getSuiGrpcClient, bx as isAllowedAsset, by as isCetusRouteFresh, bz as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bA as normalizeAsset, bB as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithMpp, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, aT as putJobSpec, bC as queryHistory, bD as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bE as selectAndSplitCoin, bF as selectSuiCoin, bG as serializeCetusRoute, bH as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bI as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bJ as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-CS4wgrg5.js';
4
+ import { Z as T2000Error, b4 as T2000Options, a4 as TransactionSigner, w as PayOptions, x as PayResult, b5 as SwapResult, b6 as SwapQuoteResult, X as SupportedAsset, Q as SendResult, B as BalanceResponse, a3 as TransactionRecord, i as DepositInfo, b7 as PaymentRequest, ae as ZkLoginProof, b8 as SuiCoreClient, u as OverlayFeeConfig, b9 as SponsoredCoinMergeCache, Y as SwapRouteResult, ba as SendableAsset } from './commerce-D79xwwJ8.js';
5
+ export { A as A2A_ESCROW_FEE_CONFIG_ID, a as A2A_ESCROW_PACKAGE_ID, b as ActivityReportConfig, bb as CETUS_USDC_SUI_POOL, C as CLOCK_ID, c as COIN_REGISTRY, d as ClassifyBalanceChange, e as ClassifyResult, f as CoinMeta, bc as CoinPage, D as DEFAULT_ACTIVITY_REPORT_URL, g as DEFAULT_COMMERCE_API_BASE, bd as DEFAULT_GRPC_URL, h as DEFAULT_NETWORK, E as ETH_TYPE, j as ExtractedTransfer, be as GASLESS_MIN_STABLE_AMOUNT, bf 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, bg as OPERATION_ASSETS, O as OVERLAY_FEE_RATE, bh as Operation, P as PREFLIGHT_MAX_AMOUNT, v as PREFLIGHT_OK, y as PreflightResult, bi as SENDABLE_ASSETS, S as STABLE_ASSETS, z as SUI_DECIMALS, F as SUI_TYPE, H as SUPPORTED_ASSETS, bj as SelectAndSplitResult, bk as SerializedCetusRoute, bl as SerializedCetusRoutePath, bm 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, bn as addSendToTx, bo as addSwapToTx, bp as assertAllowedAsset, bq as assertBuyerRequirements, ag as buildCreateJobTx, br 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, bs as deserializeCetusRoute, as as executeTx, at as extractAllUserLegs, au as extractTransferDetails, av as extractTxCommands, aw as extractTxSender, ax as fallbackLabel, bt as fetchAllCoins, ay as fetchService, az as findSwapRoute, aA as formatAssetAmount, aB as formatSui, aC as formatUsd, bu as getCoinMeta, aD as getDecimals, aE as getDecimalsForCoinType, aF as getJob, aG as getJobSpec, bv as getSuiClient, bw as getSuiGrpcClient, bx as isAllowedAsset, by as isCetusRouteFresh, bz as isInRegistry, aH as jobActionsFor, aI as listServices, aJ as mapMoveAbortCode, aK as mapWalletError, aL as mistToSui, bA as normalizeAsset, bB as normalizeCoinType, aM as parseSuiRpcTx, aN as payWithX402, aO as preflightCreateJob, aP as preflightFail, aQ as preflightPay, aR as preflightSend, aS as preflightSwap, aT as putJobSpec, bC as queryHistory, bD as queryTransaction, aU as rawToStable, aV as rawToUsdc, aW as refineLendingLabel, aX as reportX402Activity, aY as resolveSymbol, aZ as resolveTokenType, bE as selectAndSplitCoin, bF as selectSuiCoin, bG as serializeCetusRoute, bH as simulateTransaction, a_ as stableToRaw, a$ as suiToMist, bI as throwIfSimulationFailed, b0 as truncateAddress, b1 as usdcToRaw, b2 as validateAddress, bJ as verifyCetusRouteCoinMatch, b3 as verifyJobForSeller } from './commerce-D79xwwJ8.js';
6
6
  import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
7
7
  import { SuinsClient } from '@mysten/suins';
8
8
  import '@mysten/sui/client';
@@ -1237,200 +1237,4 @@ declare function fullHandle(label: string, parentName?: string): string;
1237
1237
  */
1238
1238
  declare function displayHandle(label: string, parentName?: string): string;
1239
1239
 
1240
- /** The locked v1 economics: 1B whole coins at 6 decimals (D-5 / L2-A). */
1241
- declare const AGENT_TOKEN_DECIMALS = 6;
1242
- declare const AGENT_TOKEN_TOTAL_SUPPLY = 1000000000000000n;
1243
- /** 50% LP / 50% agent treasury. */
1244
- declare const AGENT_TOKEN_LP_ALLOCATION: bigint;
1245
- declare const AGENT_TOKEN_TREASURY_ALLOCATION: bigint;
1246
- interface AgentCoinParams {
1247
- /** Ticker, 2–8 chars A–Z0–9, becomes module name (lowercased) + OTW. */
1248
- symbol: string;
1249
- name: string;
1250
- description: string;
1251
- iconUrl: string;
1252
- /** Receives the full minted supply — the LAUNCHER (who then signs the
1253
- * split/pool/lock transaction). Never a platform address. */
1254
- recipient: string;
1255
- }
1256
- /**
1257
- * Impersonation blocklist — top Sui-ecosystem + majors tickers an agent token
1258
- * must not squat (SPEC_AGENT_CAPITAL guards; kept deliberately short and
1259
- * high-confidence, console moderation covers the long tail).
1260
- */
1261
- declare const SYMBOL_BLOCKLIST: Set<string>;
1262
- /** Validate launch params; throws `T2000Error('INVALID_AMOUNT'|…)` shapes the
1263
- * console can surface directly. */
1264
- declare function validateAgentCoinParams(params: AgentCoinParams): void;
1265
- interface AgentCoinModule {
1266
- /** Rewritten module bytecode, ready for `tx.publish`. */
1267
- modules: number[][];
1268
- dependencies: string[];
1269
- /** Lowercased module name — the published coin type is
1270
- * `<pkg>::<moduleName>::<otw>`. */
1271
- moduleName: string;
1272
- otw: string;
1273
- }
1274
- /**
1275
- * Rewrite the compiled template for one agent's launch. Deterministic — same
1276
- * params, same bytes. Async because `@mysten/move-bytecode-template` (WASM)
1277
- * is loaded lazily HERE, not at module top level: a top-level import makes
1278
- * every SDK consumer's bundler ship/locate the .wasm at startup, which broke
1279
- * the CLI bundle in CI — only the launch path may pay that cost.
1280
- */
1281
- declare function buildAgentCoinModule(params: AgentCoinParams): Promise<AgentCoinModule>;
1282
-
1283
- /**
1284
- * Agent Capital launch orchestrator (SPEC_ACP_SUI §6, decisions D-5 + L2-A).
1285
- *
1286
- * A launch is TWO launcher-signed transactions:
1287
- *
1288
- * PTB 1 — `buildPublishAgentCoinTx`: publish the rewritten coin package +
1289
- * burn its UpgradeCap. `init` mints the full 1B supply to the launcher and
1290
- * freezes CoinMetadata + TreasuryCap (the can't-rug set).
1291
- *
1292
- * PTB 2 — `buildTokenizeTx`: bind the coin type to the Agent ID → split the
1293
- * supply 50/50 → create the Cetus AGENT/USDC pool seeded with the LP half +
1294
- * launcher-supplied USDC → wrap the position in a 10-year `LpLock` whose sole
1295
- * beneficiary is the agent wallet → finalize the registry record. Atomic:
1296
- * either the agent ends tokenized-with-locked-LP or nothing is recorded.
1297
- *
1298
- * Bind CANNOT live in PTB 1 — a type argument can't name a package being
1299
- * published in the same transaction — so a crashed launch between the PTBs
1300
- * leaves a published-but-unbound coin (launcher's gas, nobody's harm) and
1301
- * PTB 2 is simply retried.
1302
- *
1303
- * The quote side is USDC (L3 override 2026-07-25) — selected from the
1304
- * launcher's own coins, so gas sponsorship is now PERMITTED (sponsor gas can
1305
- * no longer become LP). v1 ships unsponsored; wire the job/register sponsor
1306
- * pattern if SUI-less launchers appear.
1307
- *
1308
- * These builders construct UNSIGNED transactions; auth lives in the Move
1309
- * layer (`registry::bind/finalize` re-check agent-or-confirmed-owner on
1310
- * `ctx.sender()` every call).
1311
- */
1312
- /** The published `agent_capital` package id (mainnet, FRESH deploy
1313
- * 2026-07-25 from the t2000 deployer `0xe7ac…`, tx `3FvSLERmmTLp396D…` —
1314
- * supersedes the orphaned 2026-07-24 `0x33a04c67…` publish, which was cut
1315
- * from the wrong wallet and never bound a token). Env-overridable for
1316
- * testnet/dev (same pattern as `A2A_ESCROW_PACKAGE_ID`). */
1317
- declare const AGENT_CAPITAL_PACKAGE_ID: string;
1318
- /** Latest upgraded package id — moveCall targets MUST use this (v1 lacks
1319
- * the `vesting` module; Sui routes calls by the id you name). Original id
1320
- * above stays for type/event references. v3 = batch-safe vesting claim. */
1321
- declare const AGENT_CAPITAL_PUBLISHED_AT: string;
1322
- /** The shared `CapitalRegistry` object id (mainnet). */
1323
- declare const CAPITAL_REGISTRY_ID: string;
1324
- /** `initial_shared_version` of the CapitalRegistry — lets builders reference
1325
- * the shared object without a resolution round-trip. */
1326
- declare const CAPITAL_REGISTRY_VERSION: number;
1327
- /** Minimum USDC the launcher must seed the pool with (L3 override 2026-07-25:
1328
- * the quote side is USDC, the settlement stable — never SUI). Enough that the
1329
- * pool opens with real two-sided liquidity rather than dust. */
1330
- declare const MIN_LP_USDC = 5000000n;
1331
- interface PublishAgentCoinArgs {
1332
- /** Coin branding; `recipient` MUST be the launcher (checked). */
1333
- coin: AgentCoinParams;
1334
- /** The wallet signing + funding this launch. */
1335
- launcher: string;
1336
- }
1337
- interface PublishAgentCoinResult {
1338
- tx: Transaction;
1339
- /** Module + OTW the published coin type will use:
1340
- * `<newPkg>::<moduleName>::<otw>`. */
1341
- moduleName: string;
1342
- otw: string;
1343
- }
1344
- /** PTB 1 — publish the agent coin package, burn upgradability in-tx.
1345
- * Async: the bytecode-template WASM loads lazily on first use. */
1346
- declare function buildPublishAgentCoinTx(args: PublishAgentCoinArgs): Promise<PublishAgentCoinResult>;
1347
- interface TokenizeArgs {
1348
- /** The agent being tokenized (Agent ID key — its wallet address). */
1349
- agent: string;
1350
- /** Signer: the agent itself or its CONFIRMED owner. */
1351
- launcher: string;
1352
- /** Published coin type from PTB 1: `<pkg>::<module>::<OTW>`. */
1353
- coinType: string;
1354
- /** The launcher-owned Coin object holding the full 1B supply (from PTB 1). */
1355
- supplyCoinId: string;
1356
- /** Raw USDC (6dp) the launcher seeds the pool with (≥ MIN_LP_USDC) —
1357
- * selected from the launcher's own coins, never platform funds. */
1358
- lpUsdcAmount: bigint;
1359
- /** Pool display url — the agent icon; optional. */
1360
- poolUrl?: string;
1361
- /** Pair orientation — from `simulate`-then-flip (see cetus-clmm.ts note). */
1362
- usdcFirst?: boolean;
1363
- /** The `agent_id::registry` shared object id. */
1364
- agentRegistryId: string;
1365
- /** Client for USDC coin selection (gRPC). */
1366
- client: SuiCoreClient;
1367
- }
1368
- /**
1369
- * PTB 2 — bind + split 50/50 + pool + 10y lock + finalize, atomically.
1370
- */
1371
- declare function buildTokenizeTx(args: TokenizeArgs): Promise<Transaction>;
1372
-
1373
- /**
1374
- * Cetus CLMM — pool creation + position plumbing for Agent Capital launches
1375
- * (SPEC_ACP_SUI §6). ISOLATED like `cetus-swap.ts`: this is the only file that
1376
- * may reference the Cetus CLMM surface.
1377
- *
1378
- * Deliberately NOT the Cetus CLMM TS SDK — pool creation is three moveCalls
1379
- * against the on-chain package (`pool_creator::create_pool_v2`,
1380
- * `position::pool_id`, `pool_creator::full_range_tick_range`), which is
1381
- * exactly the "thin `@mysten/sui` tx builders" shape Critical Rule 2 asks
1382
- * for. The aggregator SDK exception stays scoped to swaps.
1383
- *
1384
- * Signatures pinned against `cetus-clmm-interface` tag `mainnet-v1.52.3`
1385
- * (same tag the Move package depends on).
1386
- */
1387
- /** Cetus CLMM original package id (mainnet) — TYPE references (Position, …)
1388
- * and moveCall targets resolve through it; the runtime routes to the latest
1389
- * upgraded version recorded on-chain. */
1390
- declare const CETUS_CLMM_PACKAGE_ID: string;
1391
- /** Shared `GlobalConfig` (mainnet). */
1392
- declare const CETUS_GLOBAL_CONFIG_ID: string;
1393
- /** Shared `factory::Pools` (mainnet). */
1394
- declare const CETUS_POOLS_ID: string;
1395
- /** The canonical Position type tag (original package id, per Sui type rules). */
1396
- declare const CETUS_POSITION_TYPE: string;
1397
- /**
1398
- * Tick spacing 200 = the 1% fee tier — the Virtuals-shape choice for agent
1399
- * tokens: maximum fee flow to the agent wallet on a volatile new pair.
1400
- */
1401
- declare const AGENT_POOL_TICK_SPACING = 200;
1402
-
1403
- /**
1404
- * Direct-pool swap for agent tokens (S.815). The Cetus AGGREGATOR does not
1405
- * route fresh pools (probed 2026-07-25: "available path is empty" for $FS),
1406
- * so agent-token trading swaps DIRECTLY against the token's known pool via
1407
- * the integrate package's `pool_script::swap_a2b/b2a` entry — works from
1408
- * minute zero for every launch. Quote = a server-side simulation of the
1409
- * same transaction (the sim IS the price; no math to drift).
1410
- *
1411
- * Verified by mainnet simulation both directions on the $FS pool.
1412
- */
1413
- /** Cetus `integrate` latest published-at (mainnet, MVR v16 — their docs
1414
- * address table). The older ids fail the clmm version gate. */
1415
- declare const CETUS_INTEGRATE_PUBLISHED_AT: string;
1416
- interface DirectPoolSwapArgs {
1417
- client: SuiCoreClient;
1418
- /** The swapper (signs + receives output; pays own gas — unsponsored). */
1419
- sender: string;
1420
- /** The agent token's Cetus pool (from the AgentToken record). */
1421
- poolId: string;
1422
- /** buy = USDC → AGENT · sell = AGENT → USDC. */
1423
- direction: 'buy' | 'sell';
1424
- /** Raw input amount (USDC 6dp for buy; token 6dp for sell). */
1425
- amountIn: bigint;
1426
- /** Raw minimum output — slippage floor; 0n when simulating for a quote. */
1427
- minOut: bigint;
1428
- }
1429
- /**
1430
- * Build the unsigned direct-pool swap. Reads the pool's `Pool<A, B>` type
1431
- * args (pair orientation is whatever Cetus canonicalized at creation) and
1432
- * picks `swap_a2b` / `swap_b2a` so input→output matches `direction`.
1433
- */
1434
- declare function buildDirectPoolSwapTx(args: DirectPoolSwapArgs): Promise<Transaction>;
1435
-
1436
- export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AGENT_CAPITAL_PACKAGE_ID, AGENT_CAPITAL_PUBLISHED_AT, AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_ID, AGENT_POOL_TICK_SPACING, AGENT_TOKEN_DECIMALS, AGENT_TOKEN_LP_ALLOCATION, AGENT_TOKEN_TOTAL_SUPPLY, AGENT_TOKEN_TREASURY_ALLOCATION, AUDRIC_PARENT, AUDRIC_PARENT_NAME, AUDRIC_PARENT_NFT_ID, type AgentCoinModule, type AgentCoinParams, type ApiModel, type AppenderContext, BalanceResponse, type BuildAddLeafParams, type BuildRevokeLeafParams, CAPITAL_REGISTRY_ID, CAPITAL_REGISTRY_VERSION, CETUS_CLMM_PACKAGE_ID, CETUS_GLOBAL_CONFIG_ID, CETUS_INTEGRATE_PUBLISHED_AT, CETUS_POOLS_ID, CETUS_POSITION_TYPE, type ChatMessage, type ChatParams, type ChatResult, type ChatUsage, type CheckStatus, type ComposeTxOptions, type ComposeTxResult, DEFAULT_API_BASE, type DailySpend, DepositInfo, type DirectPoolSwapArgs, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MAX_OPEN_WINDOW_MS, MIN_LP_USDC, type NormalizedAddress, OPENING_CLAIM_POLICY_ANY_ACTIVE, type OpenJobFilter, type OpenJobRow, type Opening, type OpeningTerms, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, type PublishAgentCoinArgs, type PublishAgentCoinResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SYMBOL_BLOCKLIST, SendResult, type SendTransferInput, SendableAsset, type StepPreview, SuinsNotRegisteredError, type SuinsParent, SuinsRpcError, SupportedAsset, type SwapExecuteInput, SwapQuoteResult, SwapResult, SwapRouteResult, T2000, T2000Error, T2000Options, type TokenizeArgs, 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, buildAgentCoinModule, buildCancelOpeningTx, buildClaimOpeningTx, buildCreateOpeningTx, buildDirectPoolSwapTx, buildPublishAgentCoinTx, buildRefundUnclaimedTx, buildRevokeLeafTx, buildTokenizeTx, 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, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateAgentCoinParams, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
1240
+ export { A2A_ESCROW_OPENING_PACKAGE_ID, A2A_ESCROW_PACKAGE_V2_ID, A2A_ESCROW_PACKAGE_V3_ID, AGENT_ID_PARENT, AGENT_ID_PARENT_NAME, AGENT_ID_PARENT_NFT_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, 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, 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, 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, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateLabel, verifyReceipt, walletExists, writeLimitsFile };