@t2000/sdk 10.5.0 → 10.7.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
@@ -1140,8 +1140,8 @@ declare function buildAgentCoinModule(params: AgentCoinParams): Promise<AgentCoi
1140
1140
  * freezes CoinMetadata + TreasuryCap (the can't-rug set).
1141
1141
  *
1142
1142
  * PTB 2 — `buildTokenizeTx`: bind the coin type to the Agent ID → split the
1143
- * supply 50/50 → create the Cetus AGENT/SUI pool seeded with the LP half +
1144
- * launcher-supplied SUI → wrap the position in a 10-year `LpLock` whose sole
1143
+ * supply 50/50 → create the Cetus AGENT/USDC pool seeded with the LP half +
1144
+ * launcher-supplied USDC → wrap the position in a 10-year `LpLock` whose sole
1145
1145
  * beneficiary is the agent wallet → finalize the registry record. Atomic:
1146
1146
  * either the agent ends tokenized-with-locked-LP or nothing is recorded.
1147
1147
  *
@@ -1150,17 +1150,19 @@ declare function buildAgentCoinModule(params: AgentCoinParams): Promise<AgentCoi
1150
1150
  * leaves a published-but-unbound coin (launcher's gas, nobody's harm) and
1151
1151
  * PTB 2 is simply retried.
1152
1152
  *
1153
- * NO GAS SPONSORSHIP on either PTB: PTB 2 seeds SUI liquidity from `tx.gas`,
1154
- * and under Enoki sponsorship `tx.gas` is the SPONSOR's coin t2000 must
1155
- * never seed LP (SPEC_AGENT_CAPITAL guards). The launcher holds SUI by
1156
- * construction (they're supplying the liquidity).
1153
+ * The quote side is USDC (L3 override 2026-07-25) selected from the
1154
+ * launcher's own coins, so gas sponsorship is now PERMITTED (sponsor gas can
1155
+ * no longer become LP). v1 ships unsponsored; wire the job/register sponsor
1156
+ * pattern if SUI-less launchers appear.
1157
1157
  *
1158
1158
  * These builders construct UNSIGNED transactions; auth lives in the Move
1159
1159
  * layer (`registry::bind/finalize` re-check agent-or-confirmed-owner on
1160
1160
  * `ctx.sender()` every call).
1161
1161
  */
1162
- /** The published `agent_capital` package id (mainnet, deployed 2026-07-24,
1163
- * tx `J1dxR72oFhoiZtnwZng9jnDtBev58K9Z8PdPBtMp5eBb`). Env-overridable for
1162
+ /** The published `agent_capital` package id (mainnet, FRESH deploy
1163
+ * 2026-07-25 from the t2000 deployer `0xe7ac…`, tx `3FvSLERmmTLp396D…`
1164
+ * supersedes the orphaned 2026-07-24 `0x33a04c67…` publish, which was cut
1165
+ * from the wrong wallet and never bound a token). Env-overridable for
1164
1166
  * testnet/dev (same pattern as `A2A_ESCROW_PACKAGE_ID`). */
1165
1167
  declare const AGENT_CAPITAL_PACKAGE_ID: string;
1166
1168
  /** The shared `CapitalRegistry` object id (mainnet). */
@@ -1168,9 +1170,10 @@ declare const CAPITAL_REGISTRY_ID: string;
1168
1170
  /** `initial_shared_version` of the CapitalRegistry — lets builders reference
1169
1171
  * the shared object without a resolution round-trip. */
1170
1172
  declare const CAPITAL_REGISTRY_VERSION: number;
1171
- /** Minimum SUI the launcher must seed the pool with enough that the pool
1172
- * opens with real two-sided liquidity rather than dust. Floor, no rounding. */
1173
- declare const MIN_LP_SUI = 1000000000n;
1173
+ /** Minimum USDC the launcher must seed the pool with (L3 override 2026-07-25:
1174
+ * the quote side is USDC, the settlement stable never SUI). Enough that the
1175
+ * pool opens with real two-sided liquidity rather than dust. */
1176
+ declare const MIN_LP_USDC = 5000000n;
1174
1177
  interface PublishAgentCoinArgs {
1175
1178
  /** Coin branding; `recipient` MUST be the launcher (checked). */
1176
1179
  coin: AgentCoinParams;
@@ -1196,26 +1199,22 @@ interface TokenizeArgs {
1196
1199
  coinType: string;
1197
1200
  /** The launcher-owned Coin object holding the full 1B supply (from PTB 1). */
1198
1201
  supplyCoinId: string;
1199
- /** The published coin's CoinMetadata object id (frozen, from PTB 1). */
1200
- coinMetadataId: string;
1201
- /** SUI CoinMetadata object id (constant on mainnet, arg for testnet). */
1202
- suiMetadataId?: string;
1203
- /** Raw MIST the launcher seeds the pool with (≥ MIN_LP_SUI). Split from
1204
- * gas — the launcher's own SUI, definitionally. */
1205
- lpSuiAmount: bigint;
1202
+ /** Raw USDC (6dp) the launcher seeds the pool with (≥ MIN_LP_USDC)
1203
+ * selected from the launcher's own coins, never platform funds. */
1204
+ lpUsdcAmount: bigint;
1206
1205
  /** Pool display url — the agent icon; optional. */
1207
1206
  poolUrl?: string;
1208
1207
  /** Pair orientation — from `simulate`-then-flip (see cetus-clmm.ts note). */
1209
- suiFirst?: boolean;
1208
+ usdcFirst?: boolean;
1210
1209
  /** The `agent_id::registry` shared object id. */
1211
1210
  agentRegistryId: string;
1211
+ /** Client for USDC coin selection (gRPC). */
1212
+ client: SuiCoreClient;
1212
1213
  }
1213
- /** SUI CoinMetadata on mainnet (immutable, well-known). */
1214
- declare const SUI_COIN_METADATA_ID = "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3";
1215
1214
  /**
1216
1215
  * PTB 2 — bind + split 50/50 + pool + 10y lock + finalize, atomically.
1217
1216
  */
1218
- declare function buildTokenizeTx(args: TokenizeArgs): Transaction;
1217
+ declare function buildTokenizeTx(args: TokenizeArgs): Promise<Transaction>;
1219
1218
 
1220
1219
  /**
1221
1220
  * Cetus CLMM — pool creation + position plumbing for Agent Capital launches
@@ -1247,4 +1246,4 @@ declare const CETUS_POSITION_TYPE: string;
1247
1246
  */
1248
1247
  declare const AGENT_POOL_TICK_SPACING = 200;
1249
1248
 
1250
- export { AGENT_CAPITAL_PACKAGE_ID, 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_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, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MIN_LP_SUI, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, type PublishAgentCoinArgs, type PublishAgentCoinResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_COIN_METADATA_ID, 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, buildPublishAgentCoinTx, buildRevokeLeafTx, buildTokenizeTx, chatCompletion, chatCompletionStream, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateAgentCoinParams, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
1249
+ export { AGENT_CAPITAL_PACKAGE_ID, 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_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, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MIN_LP_USDC, type NormalizedAddress, 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, buildPublishAgentCoinTx, buildRevokeLeafTx, buildTokenizeTx, chatCompletion, chatCompletionStream, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateAgentCoinParams, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
package/dist/index.d.ts CHANGED
@@ -1140,8 +1140,8 @@ declare function buildAgentCoinModule(params: AgentCoinParams): Promise<AgentCoi
1140
1140
  * freezes CoinMetadata + TreasuryCap (the can't-rug set).
1141
1141
  *
1142
1142
  * PTB 2 — `buildTokenizeTx`: bind the coin type to the Agent ID → split the
1143
- * supply 50/50 → create the Cetus AGENT/SUI pool seeded with the LP half +
1144
- * launcher-supplied SUI → wrap the position in a 10-year `LpLock` whose sole
1143
+ * supply 50/50 → create the Cetus AGENT/USDC pool seeded with the LP half +
1144
+ * launcher-supplied USDC → wrap the position in a 10-year `LpLock` whose sole
1145
1145
  * beneficiary is the agent wallet → finalize the registry record. Atomic:
1146
1146
  * either the agent ends tokenized-with-locked-LP or nothing is recorded.
1147
1147
  *
@@ -1150,17 +1150,19 @@ declare function buildAgentCoinModule(params: AgentCoinParams): Promise<AgentCoi
1150
1150
  * leaves a published-but-unbound coin (launcher's gas, nobody's harm) and
1151
1151
  * PTB 2 is simply retried.
1152
1152
  *
1153
- * NO GAS SPONSORSHIP on either PTB: PTB 2 seeds SUI liquidity from `tx.gas`,
1154
- * and under Enoki sponsorship `tx.gas` is the SPONSOR's coin t2000 must
1155
- * never seed LP (SPEC_AGENT_CAPITAL guards). The launcher holds SUI by
1156
- * construction (they're supplying the liquidity).
1153
+ * The quote side is USDC (L3 override 2026-07-25) selected from the
1154
+ * launcher's own coins, so gas sponsorship is now PERMITTED (sponsor gas can
1155
+ * no longer become LP). v1 ships unsponsored; wire the job/register sponsor
1156
+ * pattern if SUI-less launchers appear.
1157
1157
  *
1158
1158
  * These builders construct UNSIGNED transactions; auth lives in the Move
1159
1159
  * layer (`registry::bind/finalize` re-check agent-or-confirmed-owner on
1160
1160
  * `ctx.sender()` every call).
1161
1161
  */
1162
- /** The published `agent_capital` package id (mainnet, deployed 2026-07-24,
1163
- * tx `J1dxR72oFhoiZtnwZng9jnDtBev58K9Z8PdPBtMp5eBb`). Env-overridable for
1162
+ /** The published `agent_capital` package id (mainnet, FRESH deploy
1163
+ * 2026-07-25 from the t2000 deployer `0xe7ac…`, tx `3FvSLERmmTLp396D…`
1164
+ * supersedes the orphaned 2026-07-24 `0x33a04c67…` publish, which was cut
1165
+ * from the wrong wallet and never bound a token). Env-overridable for
1164
1166
  * testnet/dev (same pattern as `A2A_ESCROW_PACKAGE_ID`). */
1165
1167
  declare const AGENT_CAPITAL_PACKAGE_ID: string;
1166
1168
  /** The shared `CapitalRegistry` object id (mainnet). */
@@ -1168,9 +1170,10 @@ declare const CAPITAL_REGISTRY_ID: string;
1168
1170
  /** `initial_shared_version` of the CapitalRegistry — lets builders reference
1169
1171
  * the shared object without a resolution round-trip. */
1170
1172
  declare const CAPITAL_REGISTRY_VERSION: number;
1171
- /** Minimum SUI the launcher must seed the pool with enough that the pool
1172
- * opens with real two-sided liquidity rather than dust. Floor, no rounding. */
1173
- declare const MIN_LP_SUI = 1000000000n;
1173
+ /** Minimum USDC the launcher must seed the pool with (L3 override 2026-07-25:
1174
+ * the quote side is USDC, the settlement stable never SUI). Enough that the
1175
+ * pool opens with real two-sided liquidity rather than dust. */
1176
+ declare const MIN_LP_USDC = 5000000n;
1174
1177
  interface PublishAgentCoinArgs {
1175
1178
  /** Coin branding; `recipient` MUST be the launcher (checked). */
1176
1179
  coin: AgentCoinParams;
@@ -1196,26 +1199,22 @@ interface TokenizeArgs {
1196
1199
  coinType: string;
1197
1200
  /** The launcher-owned Coin object holding the full 1B supply (from PTB 1). */
1198
1201
  supplyCoinId: string;
1199
- /** The published coin's CoinMetadata object id (frozen, from PTB 1). */
1200
- coinMetadataId: string;
1201
- /** SUI CoinMetadata object id (constant on mainnet, arg for testnet). */
1202
- suiMetadataId?: string;
1203
- /** Raw MIST the launcher seeds the pool with (≥ MIN_LP_SUI). Split from
1204
- * gas — the launcher's own SUI, definitionally. */
1205
- lpSuiAmount: bigint;
1202
+ /** Raw USDC (6dp) the launcher seeds the pool with (≥ MIN_LP_USDC)
1203
+ * selected from the launcher's own coins, never platform funds. */
1204
+ lpUsdcAmount: bigint;
1206
1205
  /** Pool display url — the agent icon; optional. */
1207
1206
  poolUrl?: string;
1208
1207
  /** Pair orientation — from `simulate`-then-flip (see cetus-clmm.ts note). */
1209
- suiFirst?: boolean;
1208
+ usdcFirst?: boolean;
1210
1209
  /** The `agent_id::registry` shared object id. */
1211
1210
  agentRegistryId: string;
1211
+ /** Client for USDC coin selection (gRPC). */
1212
+ client: SuiCoreClient;
1212
1213
  }
1213
- /** SUI CoinMetadata on mainnet (immutable, well-known). */
1214
- declare const SUI_COIN_METADATA_ID = "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3";
1215
1214
  /**
1216
1215
  * PTB 2 — bind + split 50/50 + pool + 10y lock + finalize, atomically.
1217
1216
  */
1218
- declare function buildTokenizeTx(args: TokenizeArgs): Transaction;
1217
+ declare function buildTokenizeTx(args: TokenizeArgs): Promise<Transaction>;
1219
1218
 
1220
1219
  /**
1221
1220
  * Cetus CLMM — pool creation + position plumbing for Agent Capital launches
@@ -1247,4 +1246,4 @@ declare const CETUS_POSITION_TYPE: string;
1247
1246
  */
1248
1247
  declare const AGENT_POOL_TICK_SPACING = 200;
1249
1248
 
1250
- export { AGENT_CAPITAL_PACKAGE_ID, 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_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, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MIN_LP_SUI, type NormalizedAddress, OverlayFeeConfig, PayOptions, PayResult, PaymentRequest, type PublishAgentCoinArgs, type PublishAgentCoinResult, SPONSORED_PYTH_DEPENDENT_PROVIDERS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_COIN_METADATA_ID, 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, buildPublishAgentCoinTx, buildRevokeLeafTx, buildTokenizeTx, chatCompletion, chatCompletionStream, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateAgentCoinParams, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
1249
+ export { AGENT_CAPITAL_PACKAGE_ID, 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_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, InvalidAddressError, type LabelValidationResult, type LimitAssertInput, LimitEnforcer, LimitExceededError, type LimitKind, type LimitOperation, type LimitsConfig, type LimitsFile, MIN_LP_USDC, type NormalizedAddress, 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, buildPublishAgentCoinTx, buildRevokeLeafTx, buildTokenizeTx, chatCompletion, chatCompletionStream, clearLimits, composeTx, dailySpentToday, deriveAllowedAddressesFromPtb, displayHandle, exportPrivateKey, fullHandle, generateKeypair, getAddress, getLimits, getSponsoredSwapProviders, getSwapQuote, hasLimits, keypairFromPrivateKey, listModels, loadKey, looksLikeSuiNs, normalizeAddressInput, queryBalance, readLimitsFile, recordDailySpend, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, saveBech32, saveKey, setLimits, validateAgentCoinParams, validateLabel, verifyReceipt, walletExists, writeLimitsFile };
package/dist/index.js CHANGED
@@ -3886,6 +3886,7 @@ init_preflight();
3886
3886
  // src/capital/launch.ts
3887
3887
  init_errors();
3888
3888
  init_token_registry();
3889
+ init_coinSelection();
3889
3890
 
3890
3891
  // src/protocols/cetus-clmm.ts
3891
3892
  var CETUS_CLMM_PACKAGE_ID = process.env.CETUS_CLMM_PACKAGE_ID ?? "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb";
@@ -3911,10 +3912,10 @@ function bigintSqrt(n) {
3911
3912
  }
3912
3913
  return prev;
3913
3914
  }
3914
- function createPoolV2(tx, args) {
3915
+ function createPoolV3(tx, args) {
3915
3916
  const [tickLower, tickUpper] = fullRangeTickRange(tx);
3916
3917
  return tx.moveCall({
3917
- target: `${CETUS_CLMM_PUBLISHED_AT}::pool_creator::create_pool_v2`,
3918
+ target: `${CETUS_CLMM_PUBLISHED_AT}::pool_creator::create_pool_v3`,
3918
3919
  typeArguments: [args.coinTypeA, args.coinTypeB],
3919
3920
  arguments: [
3920
3921
  tx.object(CETUS_GLOBAL_CONFIG_ID),
@@ -3926,8 +3927,6 @@ function createPoolV2(tx, args) {
3926
3927
  tickUpper,
3927
3928
  args.coinA,
3928
3929
  args.coinB,
3929
- tx.object(args.metadataA),
3930
- tx.object(args.metadataB),
3931
3930
  tx.pure.bool(args.fixAmountA),
3932
3931
  tx.object.clock()
3933
3932
  ]
@@ -4091,10 +4090,10 @@ async function buildAgentCoinModule(params) {
4091
4090
  }
4092
4091
 
4093
4092
  // src/capital/launch.ts
4094
- var AGENT_CAPITAL_PACKAGE_ID = process.env.AGENT_CAPITAL_PACKAGE_ID ?? "0x33a04c672381c1de7178f56221e4ebfc4712675feecc2a0b70c25efbb500fc25";
4095
- var CAPITAL_REGISTRY_ID = process.env.CAPITAL_REGISTRY_ID ?? "0xd75a72e80c1a5181cc9bb095089cc236e3e20be11b5982ab21e76c54508bd2d7";
4093
+ var AGENT_CAPITAL_PACKAGE_ID = process.env.AGENT_CAPITAL_PACKAGE_ID ?? "0xa83ecc4e530594f8e184faf6a4c3da6791267f6791a653644d59e2e603c055b8";
4094
+ var CAPITAL_REGISTRY_ID = process.env.CAPITAL_REGISTRY_ID ?? "0xef4057baac856d65b47f14a1ba14211299637955ea5bc15d7708f6eef27ee0df";
4096
4095
  var CAPITAL_REGISTRY_VERSION = Number(
4097
- process.env.CAPITAL_REGISTRY_VERSION ?? 951301211
4096
+ process.env.CAPITAL_REGISTRY_VERSION ?? 931861908
4098
4097
  );
4099
4098
  function assertDeployed() {
4100
4099
  if (!AGENT_CAPITAL_PACKAGE_ID || !CAPITAL_REGISTRY_ID) {
@@ -4104,7 +4103,7 @@ function assertDeployed() {
4104
4103
  );
4105
4104
  }
4106
4105
  }
4107
- var MIN_LP_SUI = 1000000000n;
4106
+ var MIN_LP_USDC = 5000000n;
4108
4107
  var REGISTRY_MODULE = "registry";
4109
4108
  var LP_LOCK_MODULE = "lp_lock";
4110
4109
  async function buildPublishAgentCoinTx(args) {
@@ -4130,8 +4129,7 @@ async function buildPublishAgentCoinTx(args) {
4130
4129
  });
4131
4130
  return { tx, moduleName: mod.moduleName, otw: mod.otw };
4132
4131
  }
4133
- var SUI_COIN_METADATA_ID = "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3";
4134
- function buildTokenizeTx(args) {
4132
+ async function buildTokenizeTx(args) {
4135
4133
  assertDeployed();
4136
4134
  if (!isValidSuiAddress(args.agent)) {
4137
4135
  throw new T2000Error("INVALID_ADDRESS", `bad agent: ${args.agent}`);
@@ -4139,10 +4137,10 @@ function buildTokenizeTx(args) {
4139
4137
  if (!isValidSuiAddress(args.launcher)) {
4140
4138
  throw new T2000Error("INVALID_ADDRESS", `bad launcher: ${args.launcher}`);
4141
4139
  }
4142
- if (args.lpSuiAmount < MIN_LP_SUI) {
4140
+ if (args.lpUsdcAmount < MIN_LP_USDC) {
4143
4141
  throw new T2000Error(
4144
4142
  "INVALID_AMOUNT",
4145
- `lpSuiAmount ${args.lpSuiAmount} < minimum ${MIN_LP_SUI} MIST (1 SUI)`
4143
+ `lpUsdcAmount ${args.lpUsdcAmount} < minimum ${MIN_LP_USDC} raw (5 USDC)`
4146
4144
  );
4147
4145
  }
4148
4146
  const tx = new Transaction();
@@ -4166,18 +4164,22 @@ function buildTokenizeTx(args) {
4166
4164
  const [lpCoin] = tx.splitCoins(supplyCoin, [
4167
4165
  tx.pure.u64(AGENT_TOKEN_LP_ALLOCATION)
4168
4166
  ]);
4169
- const [lpSui] = tx.splitCoins(tx.gas, [tx.pure.u64(args.lpSuiAmount)]);
4170
- const suiFirst = args.suiFirst ?? false;
4171
- const sqrtPrice = suiFirst ? sqrtPriceX64FromAmounts(args.lpSuiAmount, AGENT_TOKEN_LP_ALLOCATION) : sqrtPriceX64FromAmounts(AGENT_TOKEN_LP_ALLOCATION, args.lpSuiAmount);
4172
- const poolResult = createPoolV2(tx, {
4173
- coinTypeA: suiFirst ? SUI_TYPE : args.coinType,
4174
- coinTypeB: suiFirst ? args.coinType : SUI_TYPE,
4175
- metadataA: suiFirst ? args.suiMetadataId ?? SUI_COIN_METADATA_ID : args.coinMetadataId,
4176
- metadataB: suiFirst ? args.coinMetadataId : args.suiMetadataId ?? SUI_COIN_METADATA_ID,
4177
- coinA: suiFirst ? lpSui : lpCoin,
4178
- coinB: suiFirst ? lpCoin : lpSui,
4167
+ const { coin: lpUsdc } = await selectAndSplitCoin(
4168
+ tx,
4169
+ args.client,
4170
+ args.launcher,
4171
+ USDC_TYPE,
4172
+ args.lpUsdcAmount
4173
+ );
4174
+ const usdcFirst = args.usdcFirst ?? false;
4175
+ const sqrtPrice = usdcFirst ? sqrtPriceX64FromAmounts(args.lpUsdcAmount, AGENT_TOKEN_LP_ALLOCATION) : sqrtPriceX64FromAmounts(AGENT_TOKEN_LP_ALLOCATION, args.lpUsdcAmount);
4176
+ const poolResult = createPoolV3(tx, {
4177
+ coinTypeA: usdcFirst ? USDC_TYPE : args.coinType,
4178
+ coinTypeB: usdcFirst ? args.coinType : USDC_TYPE,
4179
+ coinA: usdcFirst ? lpUsdc : lpCoin,
4180
+ coinB: usdcFirst ? lpCoin : lpUsdc,
4179
4181
  sqrtPriceX64: sqrtPrice,
4180
- fixAmountA: !suiFirst,
4182
+ fixAmountA: !usdcFirst,
4181
4183
  // always fix the AGENT side
4182
4184
  url: args.poolUrl
4183
4185
  });
@@ -4202,13 +4204,13 @@ function buildTokenizeTx(args) {
4202
4204
  tx.object.clock()
4203
4205
  ]
4204
4206
  });
4205
- const agentRefund = suiFirst ? refundB : refundA;
4206
- const suiRefund = suiFirst ? refundA : refundB;
4207
+ const agentRefund = usdcFirst ? refundB : refundA;
4208
+ const usdcRefund = usdcFirst ? refundA : refundB;
4207
4209
  tx.transferObjects([supplyCoin, agentRefund], tx.pure.address(args.agent));
4208
- tx.transferObjects([suiRefund], tx.pure.address(args.launcher));
4210
+ tx.transferObjects([usdcRefund], tx.pure.address(args.launcher));
4209
4211
  return tx;
4210
4212
  }
4211
4213
 
4212
- export { A2A_ESCROW_FEE_CONFIG_ID, A2A_ESCROW_PACKAGE_ID, AGENT_CAPITAL_PACKAGE_ID, 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, CAPITAL_REGISTRY_ID, CAPITAL_REGISTRY_VERSION, CETUS_CLMM_PACKAGE_ID, CETUS_GLOBAL_CONFIG_ID, CETUS_POOLS_ID, CETUS_POSITION_TYPE, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_API_BASE, DEFAULT_COMMERCE_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, JOB_STATES, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MANIFEST_TYPE, MAX_DELIVER_HORIZON_MS, MAX_JOB_USDC, MAX_REVIEW_WINDOW_MS, MIN_LP_SUI, MIST_PER_SUI, NAVX_TYPE, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, SENDABLE_ASSETS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_COIN_METADATA_ID, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SYMBOL_BLOCKLIST, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, addSendToTx, addSwapToTx, approxUsdValue, assertAllowedAsset, assertLimitConfig, buildAddLeafTx, buildAgentCoinModule, buildCreateJobTx, buildDeliverJobTx, buildPublishAgentCoinTx, buildRefundJobTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, buildTokenizeTx, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, 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, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, jobActionsFor, keypairFromPrivateKey, listModels, listServices, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseMppSuiChallenge, parseSuiRpcTx, payWithMpp, preflightCreateJob, preflightFail, preflightPay, preflightSend, preflightSwap, putJobSpec, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateAgentCoinParams, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, verifyReceipt, walletExists, writeLimitsFile };
4214
+ export { A2A_ESCROW_FEE_CONFIG_ID, A2A_ESCROW_PACKAGE_ID, AGENT_CAPITAL_PACKAGE_ID, 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, CAPITAL_REGISTRY_ID, CAPITAL_REGISTRY_VERSION, CETUS_CLMM_PACKAGE_ID, CETUS_GLOBAL_CONFIG_ID, CETUS_POOLS_ID, CETUS_POSITION_TYPE, CETUS_USDC_SUI_POOL, CLOCK_ID, COIN_REGISTRY, DEFAULT_API_BASE, DEFAULT_COMMERCE_API_BASE, DEFAULT_GRPC_URL, DEFAULT_NETWORK, ETH_TYPE, GASLESS_MIN_STABLE_AMOUNT, GASLESS_STABLE_TYPES, GAS_RESERVE_MIN, IKA_TYPE, InvalidAddressError, JOB_STATES, KNOWN_TARGETS, KeypairSigner, LABEL_PATTERNS, LOFI_TYPE, LimitEnforcer, LimitExceededError, MANIFEST_TYPE, MAX_DELIVER_HORIZON_MS, MAX_JOB_USDC, MAX_REVIEW_WINDOW_MS, MIN_LP_USDC, MIST_PER_SUI, NAVX_TYPE, OPERATION_ASSETS, OVERLAY_FEE_RATE, PREFLIGHT_MAX_AMOUNT, PREFLIGHT_OK, SENDABLE_ASSETS, SPONSORED_PYTH_DEPENDENT_PROVIDERS, STABLE_ASSETS, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, SUI_DECIMALS, SUI_TYPE, SUPPORTED_ASSETS, SYMBOL_BLOCKLIST, SuinsNotRegisteredError, SuinsRpcError, T2000, T2000Error, T2000_OVERLAY_FEE_WALLET, TOKEN_MAP, USDC_DECIMALS, USDC_TYPE, USDE_TYPE, USDSUI_TYPE, USDT_TYPE, WAL_TYPE, WBTC_TYPE, WRITE_APPENDER_REGISTRY, ZkLoginSigner, addSendToTx, addSwapToTx, approxUsdValue, assertAllowedAsset, assertLimitConfig, buildAddLeafTx, buildAgentCoinModule, buildCreateJobTx, buildDeliverJobTx, buildPublishAgentCoinTx, buildRefundJobTx, buildRejectJobTx, buildReleaseJobTx, buildRevokeLeafTx, buildSendTx, buildSwapTx, buildTokenizeTx, chatCompletion, chatCompletionStream, checkPositiveAmount, checkSuiAddress, 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, getSponsoredSwapProviders, getSuiClient, getSuiGrpcClient, getSwapQuote, hasLimits, isAllowedAsset, isCetusRouteFresh, isInRegistry, jobActionsFor, keypairFromPrivateKey, listModels, listServices, loadKey, looksLikeSuiNs, mapMoveAbortCode, mapWalletError, mistToSui, normalizeAddressInput, normalizeAsset, normalizeCoinType, parseMppSuiChallenge, parseSuiRpcTx, payWithMpp, preflightCreateJob, preflightFail, preflightPay, preflightSend, preflightSwap, putJobSpec, queryBalance, queryHistory, queryTransaction, rawToStable, rawToUsdc, readLimitsFile, recordDailySpend, refineLendingLabel, resolveAddressToSuinsViaRpc, resolveSuinsViaRpc, resolveSymbol, resolveTokenType, saveBech32, saveKey, selectAndSplitCoin, selectSuiCoin, serializeCetusRoute, setLimits, simulateTransaction, stableToRaw, suiToMist, throwIfSimulationFailed, truncateAddress, usdcToRaw, validateAddress, validateAgentCoinParams, validateLabel, verifyCetusRouteCoinMatch, verifyJobForSeller, verifyReceipt, walletExists, writeLimitsFile };
4213
4215
  //# sourceMappingURL=index.js.map
4214
4216
  //# sourceMappingURL=index.js.map