@t2000/cli 4.3.0 → 4.4.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.
@@ -1,5 +1,4 @@
1
1
  import { createRequire as __createRequire } from 'module'; import { fileURLToPath as __fileURLToPath } from 'url'; import { dirname as __pathDirname } from 'path'; const require = __createRequire(import.meta.url); const __filename = __fileURLToPath(import.meta.url); const __dirname = __pathDirname(__filename);
2
- import "./chunk-SDO3BBBC.js";
3
2
  import "./chunk-OCLKPYUU.js";
4
3
  import {
5
4
  Transaction
@@ -10,13 +9,14 @@ import {
10
9
  Credential_exports,
11
10
  Method_exports,
12
11
  zod_exports
13
- } from "./chunk-XLHETABG.js";
12
+ } from "./chunk-W7ACGWI5.js";
13
+ import "./chunk-KC2WRBJB.js";
14
14
  import "./chunk-NGS6K3I3.js";
15
- import "./chunk-PR2QAGO2.js";
15
+ import "./chunk-77SWBATH.js";
16
16
  import "./chunk-7LGHVVIJ.js";
17
17
  import "./chunk-YPWSCLE3.js";
18
18
 
19
- // ../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_2fc258641ebc604b0cf60b30740909c1/node_modules/@suimpp/mpp/dist/client.js
19
+ // ../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@3.25.76__express@5.2.1_hono@4.12_f01adfc448f369aa1dacd5a54f4d2679/node_modules/@suimpp/mpp/dist/client.js
20
20
  var suiCharge = Method_exports.from({
21
21
  intent: "charge",
22
22
  name: "sui",
@@ -145,4 +145,4 @@ export {
145
145
  sui,
146
146
  suiCharge
147
147
  };
148
- //# sourceMappingURL=client-UCPLLOGQ.js.map
148
+ //# sourceMappingURL=client-WUGFY2SS.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_2fc258641ebc604b0cf60b30740909c1/node_modules/@suimpp/mpp/src/method.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_2fc258641ebc604b0cf60b30740909c1/node_modules/@suimpp/mpp/src/proof.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_2fc258641ebc604b0cf60b30740909c1/node_modules/@suimpp/mpp/src/utils.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_2fc258641ebc604b0cf60b30740909c1/node_modules/@suimpp/mpp/src/constants.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@4.4.3__express@5.2.1_hono@4.12.9_2fc258641ebc604b0cf60b30740909c1/node_modules/@suimpp/mpp/src/client.ts"],"sourcesContent":["import { Method, z } from 'mppx';\n\nexport const suiCharge = Method.from({\n intent: 'charge',\n name: 'sui',\n schema: {\n credential: {\n payload: z.object({\n digest: z.string(),\n signature: z.string(),\n }),\n },\n request: z.object({\n amount: z.string(),\n currency: z.string(),\n recipient: z.string(),\n }),\n },\n});\n","import type { Challenge } from 'mppx';\n\nexport interface SuiPaymentProofMessage {\n challenge: Challenge.Challenge<\n {\n amount: string;\n currency: string;\n recipient: string;\n },\n 'charge',\n 'sui'\n >;\n digest: string;\n}\n\nconst textEncoder = new TextEncoder();\n\nexport function createSuiPaymentProofMessage({\n challenge,\n digest,\n}: SuiPaymentProofMessage): string {\n return JSON.stringify({\n domain: 'suimpp.sui.payment-proof',\n version: 1,\n method: challenge.method,\n intent: challenge.intent,\n challengeId: challenge.id,\n amount: challenge.request.amount,\n currency: challenge.request.currency,\n recipient: challenge.request.recipient,\n digest,\n });\n}\n\nexport function createSuiPaymentProofBytes(\n message: SuiPaymentProofMessage,\n): Uint8Array {\n return textEncoder.encode(createSuiPaymentProofMessage(message));\n}\n","/**\n * Parse a string amount to raw bigint units without floating-point math.\n * \"0.01\" with 6 decimals → 10000n\n */\nexport function parseAmountToRaw(amount: string, decimals: number): bigint {\n const [whole = '0', frac = ''] = amount.split('.');\n const paddedFrac = frac.padEnd(decimals, '0').slice(0, decimals);\n return BigInt(whole + paddedFrac);\n}\n\n/**\n * Retry an async function with linear backoff.\n * Throws the last error if all attempts fail.\n */\nexport async function withRetry<T>(\n fn: () => Promise<T>,\n {\n attempts = 5,\n baseDelayMs = 1000,\n }: { attempts?: number; baseDelayMs?: number } = {},\n): Promise<T> {\n let lastError: unknown;\n for (let i = 0; i < attempts; i++) {\n try {\n return await fn();\n } catch (err) {\n lastError = err;\n if (i < attempts - 1) {\n await new Promise((r) => setTimeout(r, baseDelayMs * (i + 1)));\n }\n }\n }\n throw lastError;\n}\n","export interface Currency {\n type: string;\n decimals: number;\n}\n\nexport const SUI_USDC_TYPE =\n '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC';\n\nexport const SUI_USDC_TESTNET_TYPE =\n '0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC';\n\nexport const SUI_DOLLAR_TYPE =\n '0x44f838219cf67b058f3b37907b655f226153c18e33dfcd0da559a844fea9b1c1::usdsui::USDSUI';\n\nexport const USDC = {\n type: SUI_USDC_TYPE,\n decimals: 6,\n} as const satisfies Currency;\n\nexport const USDC_TESTNET = {\n type: SUI_USDC_TESTNET_TYPE,\n decimals: 6,\n} as const satisfies Currency;\n\nexport const SUI_DOLLAR = {\n type: SUI_DOLLAR_TYPE,\n decimals: 6,\n} as const satisfies Currency;\n","import type { ClientWithCoreApi } from '@mysten/sui/client';\nimport type { Signer } from '@mysten/sui/cryptography';\nimport { Transaction } from '@mysten/sui/transactions';\nimport { Credential, Method } from 'mppx';\nimport type { Currency } from './constants.js';\nimport { suiCharge } from './method.js';\nimport { createSuiPaymentProofBytes } from './proof.js';\nimport { parseAmountToRaw } from './utils.js';\n\nexport { suiCharge } from './method.js';\nexport {\n SUI_DOLLAR,\n SUI_DOLLAR_TYPE,\n SUI_USDC_TESTNET_TYPE,\n SUI_USDC_TYPE,\n USDC,\n USDC_TESTNET,\n} from './constants.js';\nexport type { Currency } from './constants.js';\n\nexport interface SuiChargeOptions {\n client: ClientWithCoreApi;\n signer: Signer;\n currency: Currency;\n /** Override transaction execution (e.g. to route through a gas manager). */\n execute?: (tx: Transaction) => Promise<{ digest: string }>;\n}\n\ntype TransactionResult = { digest: string };\n\nexport function sui(options: SuiChargeOptions) {\n if (!options.currency) {\n throw new Error('[suimpp] Currency is required');\n }\n\n return Method.toClient(suiCharge, {\n async createCredential({ challenge }) {\n const { amount, currency, recipient } = challenge.request;\n if (currency !== options.currency.type) {\n throw new Error(`Unsupported currency: ${currency}`);\n }\n const amountRaw = parseAmountToRaw(amount, options.currency.decimals);\n\n const tx = new Transaction();\n tx.setSender(options.signer.toSuiAddress());\n\n // `send_funds` so that the recipient receives the balance in ABs (not coins)\n tx.moveCall({\n target: '0x2::balance::send_funds',\n arguments: [\n tx.balance({ type: options.currency.type, balance: amountRaw }),\n tx.pure.address(recipient),\n ],\n typeArguments: [options.currency.type],\n });\n\n let result: TransactionResult;\n try {\n if (options.execute) {\n result = await options.execute(tx);\n } else {\n const execResult =\n await options.client.core.signAndExecuteTransaction({\n transaction: await tx.build({ client: options.client }),\n signer: options.signer,\n include: { effects: true },\n });\n if (execResult.FailedTransaction) {\n throw new Error(\n execResult.FailedTransaction.status.error?.message ??\n 'Transaction failed',\n );\n }\n if (!execResult.Transaction) {\n throw new Error('Transaction failed');\n }\n result = execResult.Transaction;\n }\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n throw new Error(`Payment transaction failed: ${msg}`);\n }\n\n const proof = await options.signer.signPersonalMessage(\n createSuiPaymentProofBytes({\n challenge,\n digest: result.digest,\n }),\n );\n\n return Credential.serialize({\n challenge,\n payload: {\n digest: result.digest,\n signature: proof.signature,\n },\n });\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEO,IAAM,YAAY,eAAO,KAAK;EACnC,QAAQ;EACR,MAAM;EACN,QAAQ;IACN,YAAY;MACV,SAAS,YAAE,OAAO;QAChB,QAAQ,YAAE,OAAA;QACV,WAAW,YAAE,OAAA;MAAO,CACrB;IAAA;IAEH,SAAS,YAAE,OAAO;MAChB,QAAQ,YAAE,OAAA;MACV,UAAU,YAAE,OAAA;MACZ,WAAW,YAAE,OAAA;IAAO,CACrB;EAAA;AAEL,CAAC;ACHD,IAAM,cAAc,IAAI,YAAA;AAEjB,SAAS,6BAA6B;EAC3C;EACA;AACF,GAAmC;AACjC,SAAO,KAAK,UAAU;IACpB,QAAQ;IACR,SAAS;IACT,QAAQ,UAAU;IAClB,QAAQ,UAAU;IAClB,aAAa,UAAU;IACvB,QAAQ,UAAU,QAAQ;IAC1B,UAAU,UAAU,QAAQ;IAC5B,WAAW,UAAU,QAAQ;IAC7B;EAAA,CACD;AACH;AAEO,SAAS,2BACd,SACY;AACZ,SAAO,YAAY,OAAO,6BAA6B,OAAO,CAAC;AACjE;AClCO,SAAS,iBAAiB,QAAgB,UAA0B;AACzE,QAAM,CAAC,QAAQ,KAAK,OAAO,EAAE,IAAI,OAAO,MAAM,GAAG;AACjD,QAAM,aAAa,KAAK,OAAO,UAAU,GAAG,EAAE,MAAM,GAAG,QAAQ;AAC/D,SAAO,OAAO,QAAQ,UAAU;AAClC;ACHO,IAAM,gBACX;AAEK,IAAM,wBACX;AAEK,IAAM,kBACX;AAEK,IAAM,OAAO;EAClB,MAAM;EACN,UAAU;AACZ;AAEO,IAAM,eAAe;EAC1B,MAAM;EACN,UAAU;AACZ;AAEO,IAAM,aAAa;EACxB,MAAM;EACN,UAAU;AACZ;ACGO,SAAS,IAAI,SAA2B;AAC7C,MAA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2B;UACzB;UACA,QAAQ,OAAO;QAAA,CAChB;MAAA;AAGH,aAAO,mBAAW,UAAU;QAC1B;QACA,SAAS;UACP,QAAQ,OAAO;UACf,WAAW,MAAM;QAAA;MACnB,CACD;IACH;EAAA,CACD;AACH;","names":["Method"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@3.25.76__express@5.2.1_hono@4.12_f01adfc448f369aa1dacd5a54f4d2679/node_modules/@suimpp/mpp/src/method.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@3.25.76__express@5.2.1_hono@4.12_f01adfc448f369aa1dacd5a54f4d2679/node_modules/@suimpp/mpp/src/proof.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@3.25.76__express@5.2.1_hono@4.12_f01adfc448f369aa1dacd5a54f4d2679/node_modules/@suimpp/mpp/src/utils.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@3.25.76__express@5.2.1_hono@4.12_f01adfc448f369aa1dacd5a54f4d2679/node_modules/@suimpp/mpp/src/constants.ts","../../../node_modules/.pnpm/@suimpp+mpp@0.7.0_@modelcontextprotocol+sdk@1.28.0_zod@3.25.76__express@5.2.1_hono@4.12_f01adfc448f369aa1dacd5a54f4d2679/node_modules/@suimpp/mpp/src/client.ts"],"sourcesContent":["import { Method, z } from 'mppx';\n\nexport const suiCharge = Method.from({\n intent: 'charge',\n name: 'sui',\n schema: {\n credential: {\n payload: z.object({\n digest: z.string(),\n signature: z.string(),\n }),\n },\n request: z.object({\n amount: z.string(),\n currency: z.string(),\n recipient: z.string(),\n }),\n },\n});\n","import type { Challenge } from 'mppx';\n\nexport interface SuiPaymentProofMessage {\n challenge: Challenge.Challenge<\n {\n amount: string;\n currency: string;\n recipient: string;\n },\n 'charge',\n 'sui'\n >;\n digest: string;\n}\n\nconst textEncoder = new TextEncoder();\n\nexport function createSuiPaymentProofMessage({\n challenge,\n digest,\n}: SuiPaymentProofMessage): string {\n return JSON.stringify({\n domain: 'suimpp.sui.payment-proof',\n version: 1,\n method: challenge.method,\n intent: challenge.intent,\n challengeId: challenge.id,\n amount: challenge.request.amount,\n currency: challenge.request.currency,\n recipient: challenge.request.recipient,\n digest,\n });\n}\n\nexport function createSuiPaymentProofBytes(\n message: SuiPaymentProofMessage,\n): Uint8Array {\n return textEncoder.encode(createSuiPaymentProofMessage(message));\n}\n","/**\n * Parse a string amount to raw bigint units without floating-point math.\n * \"0.01\" with 6 decimals → 10000n\n */\nexport function parseAmountToRaw(amount: string, decimals: number): bigint {\n const [whole = '0', frac = ''] = amount.split('.');\n const paddedFrac = frac.padEnd(decimals, '0').slice(0, decimals);\n return BigInt(whole + paddedFrac);\n}\n\n/**\n * Retry an async function with linear backoff.\n * Throws the last error if all attempts fail.\n */\nexport async function withRetry<T>(\n fn: () => Promise<T>,\n {\n attempts = 5,\n baseDelayMs = 1000,\n }: { attempts?: number; baseDelayMs?: number } = {},\n): Promise<T> {\n let lastError: unknown;\n for (let i = 0; i < attempts; i++) {\n try {\n return await fn();\n } catch (err) {\n lastError = err;\n if (i < attempts - 1) {\n await new Promise((r) => setTimeout(r, baseDelayMs * (i + 1)));\n }\n }\n }\n throw lastError;\n}\n","export interface Currency {\n type: string;\n decimals: number;\n}\n\nexport const SUI_USDC_TYPE =\n '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC';\n\nexport const SUI_USDC_TESTNET_TYPE =\n '0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC';\n\nexport const SUI_DOLLAR_TYPE =\n '0x44f838219cf67b058f3b37907b655f226153c18e33dfcd0da559a844fea9b1c1::usdsui::USDSUI';\n\nexport const USDC = {\n type: SUI_USDC_TYPE,\n decimals: 6,\n} as const satisfies Currency;\n\nexport const USDC_TESTNET = {\n type: SUI_USDC_TESTNET_TYPE,\n decimals: 6,\n} as const satisfies Currency;\n\nexport const SUI_DOLLAR = {\n type: SUI_DOLLAR_TYPE,\n decimals: 6,\n} as const satisfies Currency;\n","import type { ClientWithCoreApi } from '@mysten/sui/client';\nimport type { Signer } from '@mysten/sui/cryptography';\nimport { Transaction } from '@mysten/sui/transactions';\nimport { Credential, Method } from 'mppx';\nimport type { Currency } from './constants.js';\nimport { suiCharge } from './method.js';\nimport { createSuiPaymentProofBytes } from './proof.js';\nimport { parseAmountToRaw } from './utils.js';\n\nexport { suiCharge } from './method.js';\nexport {\n SUI_DOLLAR,\n SUI_DOLLAR_TYPE,\n SUI_USDC_TESTNET_TYPE,\n SUI_USDC_TYPE,\n USDC,\n USDC_TESTNET,\n} from './constants.js';\nexport type { Currency } from './constants.js';\n\nexport interface SuiChargeOptions {\n client: ClientWithCoreApi;\n signer: Signer;\n currency: Currency;\n /** Override transaction execution (e.g. to route through a gas manager). */\n execute?: (tx: Transaction) => Promise<{ digest: string }>;\n}\n\ntype TransactionResult = { digest: string };\n\nexport function sui(options: SuiChargeOptions) {\n if (!options.currency) {\n throw new Error('[suimpp] Currency is required');\n }\n\n return Method.toClient(suiCharge, {\n async createCredential({ challenge }) {\n const { amount, currency, recipient } = challenge.request;\n if (currency !== options.currency.type) {\n throw new Error(`Unsupported currency: ${currency}`);\n }\n const amountRaw = parseAmountToRaw(amount, options.currency.decimals);\n\n const tx = new Transaction();\n tx.setSender(options.signer.toSuiAddress());\n\n // `send_funds` so that the recipient receives the balance in ABs (not coins)\n tx.moveCall({\n target: '0x2::balance::send_funds',\n arguments: [\n tx.balance({ type: options.currency.type, balance: amountRaw }),\n tx.pure.address(recipient),\n ],\n typeArguments: [options.currency.type],\n });\n\n let result: TransactionResult;\n try {\n if (options.execute) {\n result = await options.execute(tx);\n } else {\n const execResult =\n await options.client.core.signAndExecuteTransaction({\n transaction: await tx.build({ client: options.client }),\n signer: options.signer,\n include: { effects: true },\n });\n if (execResult.FailedTransaction) {\n throw new Error(\n execResult.FailedTransaction.status.error?.message ??\n 'Transaction failed',\n );\n }\n if (!execResult.Transaction) {\n throw new Error('Transaction failed');\n }\n result = execResult.Transaction;\n }\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n throw new Error(`Payment transaction failed: ${msg}`);\n }\n\n const proof = await options.signer.signPersonalMessage(\n createSuiPaymentProofBytes({\n challenge,\n digest: result.digest,\n }),\n );\n\n return Credential.serialize({\n challenge,\n payload: {\n digest: result.digest,\n signature: proof.signature,\n },\n });\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEO,IAAM,YAAY,eAAO,KAAK;EACnC,QAAQ;EACR,MAAM;EACN,QAAQ;IACN,YAAY;MACV,SAAS,YAAE,OAAO;QAChB,QAAQ,YAAE,OAAA;QACV,WAAW,YAAE,OAAA;MAAO,CACrB;IAAA;IAEH,SAAS,YAAE,OAAO;MAChB,QAAQ,YAAE,OAAA;MACV,UAAU,YAAE,OAAA;MACZ,WAAW,YAAE,OAAA;IAAO,CACrB;EAAA;AAEL,CAAC;ACHD,IAAM,cAAc,IAAI,YAAA;AAEjB,SAAS,6BAA6B;EAC3C;EACA;AACF,GAAmC;AACjC,SAAO,KAAK,UAAU;IACpB,QAAQ;IACR,SAAS;IACT,QAAQ,UAAU;IAClB,QAAQ,UAAU;IAClB,aAAa,UAAU;IACvB,QAAQ,UAAU,QAAQ;IAC1B,UAAU,UAAU,QAAQ;IAC5B,WAAW,UAAU,QAAQ;IAC7B;EAAA,CACD;AACH;AAEO,SAAS,2BACd,SACY;AACZ,SAAO,YAAY,OAAO,6BAA6B,OAAO,CAAC;AACjE;AClCO,SAAS,iBAAiB,QAAgB,UAA0B;AACzE,QAAM,CAAC,QAAQ,KAAK,OAAO,EAAE,IAAI,OAAO,MAAM,GAAG;AACjD,QAAM,aAAa,KAAK,OAAO,UAAU,GAAG,EAAE,MAAM,GAAG,QAAQ;AAC/D,SA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