@mysten/payment-kit 0.1.3 → 0.1.4
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/calls.d.mts.map +1 -1
- package/dist/client.d.mts.map +1 -1
- package/dist/constants.d.mts +0 -1
- package/dist/constants.d.mts.map +1 -1
- package/dist/error.d.mts.map +1 -1
- package/dist/transactions.d.mts.map +1 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/uri.d.mts +0 -1
- package/dist/uri.d.mts.map +1 -1
- package/dist/uri.mjs +1 -1
- package/dist/uri.mjs.map +1 -1
- package/package.json +7 -4
package/dist/calls.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calls.d.mts","names":[],"sources":["../src/calls.ts"],"
|
|
1
|
+
{"version":3,"file":"calls.d.mts","names":[],"sources":["../src/calls.ts"],"mappings":";;;;UA0BiB,qBAAA;EAChB,aAAA,EAAe,uBAAA;AAAA;AAAA,cAGH,eAAA;EAAA;cAGA,OAAA,EAAS,qBAAA;EANrB;;AAGD;;;;;;EAeC,sBAAA,GAA0B,OAAA,EAAS,6BAAA,MAA6B,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;EA8B5B;;;;;;;;EAApC,uBAAA,GAA2B,OAAA,EAAS,8BAAA,MAA8B,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;EA4C9B;;;;;;;;EAjBpC,cAAA;IAAkB;EAAA,GAAkB,qBAAA,MAAqB,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;EAgDtD;;;;;;;;EA/BH,gCAAA;IAAoC,YAAA;IAAA,UAAA;IAAA,uBAAA;IAAA;EAAA,GAKjC,iCAAA,MAAiC,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;EAoDN;;;;;;;;EA/B9B,6BAAA;IAAiC,YAAA;IAAA,UAAA;IAAA,oBAAA;IAAA;EAAA,GAK9B,8BAAA,MAA8B,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;EAsDJ;;;;;;;;EAjC7B,oBAAA;IAAwB,QAAA;IAAA,YAAA;IAAA,UAAA;IAAA;EAAA,GAKrB,2BAAA,MAA2B,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;EAnIJ;;;;;;;;EAwJ1B,mBAAA;IAAuB,QAAA;IAAA,KAAA;IAAA,MAAA;IAAA,QAAA;IAAA,YAAA;IAAA;EAAA,GAOpB,0BAAA,MAA0B,EAAA,EAAA,yBAAA,CAAA,WAAA,KAAA,yBAAA,CAAA,iBAAA;AAAA"}
|
package/dist/client.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"
|
|
1
|
+
{"version":3,"file":"client.d.mts","names":[],"sources":["../src/client.ts"],"mappings":";;;;;;iBAsBgB,UAAA,2BAAA,CAAA;EAAwC;AAAA;;;;qBAGnC,iBAAA,KAAiB,gBAAA;AAAA;AAAA,cAMzB,gBAAA;EAAA;EAIZ,KAAA,EAAO,eAAA;EACP,EAAA,EAAI,sBAAA;cAEQ,OAAA,EAAS,uBAAA;EAbgB;;;;;;;;;EA+C/B,gBAAA,CACL,OAAA,EAAS,uBAAA,GACP,OAAA,CAAQ,wBAAA;;;;;AA3CZ;;;;;EAoFC,qBAAA,CAAsB,YAAA;AAAA"}
|
package/dist/constants.d.mts
CHANGED
package/dist/constants.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.mts","names":[],"sources":["../src/constants.ts"],"
|
|
1
|
+
{"version":3,"file":"constants.d.mts","names":[],"sources":["../src/constants.ts"],"mappings":";cAiBa,qBAAA;AAAA,cAEA,wBAAA"}
|
package/dist/error.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.mts","names":[],"sources":["../src/error.ts"],"
|
|
1
|
+
{"version":3,"file":"error.d.mts","names":[],"sources":["../src/error.ts"],"mappings":";cAGa,qBAAA,SAA8B,KAAA;AAAA,cAE9B,kBAAA,SAA2B,qBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.mts","names":[],"sources":["../src/transactions.ts"],"
|
|
1
|
+
{"version":3,"file":"transactions.d.mts","names":[],"sources":["../src/transactions.ts"],"mappings":";;;;;UAeiB,6BAAA;EAChB,KAAA,EAAO,eAAA;AAAA;AAAA,cAGK,sBAAA;EAAA;cAGA,OAAA,EAAS,6BAAA;EANC;AAGvB;;;;;;;EAeC,sBAAA,CAAuB,OAAA,EAAS,6BAAA,GAA6B,WAAA;EA8BrC;;;;;;;;EAfxB,uBAAA,CAAwB,OAAA,EAAS,8BAAA,GAA8B,WAAA;EA2ER;;;;;;;;EA5DvD,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAqB,WAAA;EA9BtB;;;;;;;;EA6CvB,gCAAA,CAAiC,OAAA,EAAS,iCAAA,GAAiC,WAAA;EAf9B;;;;;;;;EA8B7C,6BAAA,CAA8B,OAAA,EAAS,8BAAA,GAA8B,WAAA;EAerE;;;;;;;;EAAA,oBAAA,CAAqB,OAAA,EAAS,2BAAA,GAA2B,WAAA;EAeF;;;;;;;;EAAvD,mBAAA,CAAoB,OAAA,EAAS,0BAAA,GAA0B,WAAA;AAAA"}
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;;;KAMY,uBAAA;EACX,SAAA;EACA,WAAA;AAAA;AAAA,UAGgB,0BAAA,SAAmC,iBAAA;AAAA,UAEnC,uBAAA;EAChB,MAAA,EAAQ,0BAAA;AAAA;AAAA,KAGG,QAAA;EACP,YAAA;EAAuB,UAAA;AAAA;EACvB,YAAA;EAAsB,UAAA;AAAA;AAAA,KAEf,mBAAA;EACX,UAAA;AAAA,IACG,QAAA;AAAA,KAEQ,cAAA;EACX,QAAA;EACA,KAAA;EACA,MAAA;EACA,QAAA;AAAA;AAAA,KAGW,uBAAA,GAA0B,cAAA,GAAiB,QAAA;AAAA,UAEtC,wBAAA;EAChB,GAAA;EACA,wBAAA;EACA,mBAAA;AAAA;AAAA,KAGW,8BAAA;EACX,MAAA;EACA,UAAA,GAAa,iBAAA;AAAA,IACV,cAAA;AAAA,KAEQ,6BAAA,GAAgC,8BAAA,GAAiC,QAAA;AAAA,KAEjE,qBAAA;EACX,YAAA;AAAA;AAAA,KAGW,iCAAA;EACX,uBAAA;AAAA,IACG,mBAAA;AAAA,KAEQ,8BAAA;EACX,oBAAA;AAAA,IACG,mBAAA;AAAA,KAEQ,2BAAA;EACX,QAAA;AAAA,IACG,mBAAA;AAAA,KAEQ,0BAAA;EACX,QAAA;AAAA,IACG,cAAA,GACH,QAAA;AAAA,KAEW,gBAAA;EACX,eAAA;EACA,MAAA;EACA,QAAA;EACA,KAAA;EACA,KAAA;EACA,OAAA;EACA,OAAA;AAAA,IACG,OAAA,CAAQ,QAAA"}
|
package/dist/uri.d.mts
CHANGED
package/dist/uri.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.d.mts","names":[],"sources":["../src/uri.ts"],"
|
|
1
|
+
{"version":3,"file":"uri.d.mts","names":[],"sources":["../src/uri.ts"],"mappings":";;;;;AAmCA;;;;;AAiEA;;;;;;;;cAjEa,2BAAA,GAA+B,MAAA,EAAQ,gBAAA;;;;;;;;;;cAiEvC,0BAAA,GAA8B,GAAA,aAAc,gBAAA"}
|
package/dist/uri.mjs
CHANGED
|
@@ -80,7 +80,7 @@ const parsePaymentTransactionUri = (uri) => {
|
|
|
80
80
|
nonce,
|
|
81
81
|
label: params.get("label") ?? void 0,
|
|
82
82
|
message: params.get("message") ?? void 0,
|
|
83
|
-
iconUrl: params.get("
|
|
83
|
+
iconUrl: params.get("iconUrl") ?? void 0
|
|
84
84
|
};
|
|
85
85
|
if (registryId) return {
|
|
86
86
|
...baseParams,
|
package/dist/uri.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.mjs","names":[],"sources":["../src/uri.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isValidNamedType, isValidSuiAddress, isValidSuiObjectId } from '@mysten/sui/utils';\nimport type { PaymentUriParams } from './types.js';\nimport { PaymentKitUriError } from './error.js';\nimport { SUI_PAYMENT_KIT_PROTOCOL } from './constants.js';\n\nconst isValidNonce = (nonce: string) => {\n\treturn nonce.length <= 36;\n};\n\nconst isValidAmount = (amount: bigint) => {\n\treturn amount > 0n;\n};\n\nconst isValidCoinType = (coinType: string) => {\n\treturn isValidNamedType(coinType);\n};\n\n/**\n * Create a payment transaction URI from the given parameters.\n * Returns the constructed URI string.\n *\n * @example\n * ```ts\n * const uri = createPaymentTransactionUri({\n * receiverAddress: \"0x...\",\n * amount: \"10000000\", (0.01 SUI)\n * coinType: \"0x2::sui::SUI\",\n * nonce: <nonce>,\n * registryName: \"my-registry\"\n * });\n * ```\n */\nexport const createPaymentTransactionUri = (params: PaymentUriParams): string => {\n\tconst { receiverAddress, amount, coinType, nonce, registryId, registryName } = params;\n\n\tconst uri = new URL(SUI_PAYMENT_KIT_PROTOCOL);\n\n\tif (isValidSuiAddress(receiverAddress)) {\n\t\turi.searchParams.append('receiver', receiverAddress);\n\t} else {\n\t\tthrow new PaymentKitUriError('Invalid Sui address');\n\t}\n\n\tif (isValidAmount(amount)) {\n\t\turi.searchParams.append('amount', amount.toString());\n\t} else {\n\t\tthrow new PaymentKitUriError('Amount must be a positive numeric string');\n\t}\n\n\tif (isValidCoinType(coinType)) {\n\t\turi.searchParams.append('coinType', coinType);\n\t} else {\n\t\tthrow new PaymentKitUriError('Invalid Coin Type');\n\t}\n\n\tif (isValidNonce(nonce)) {\n\t\turi.searchParams.append('nonce', nonce);\n\t} else {\n\t\tthrow new PaymentKitUriError('Nonce length exceeds maximum of 36 characters');\n\t}\n\n\tif (registryId) {\n\t\tif (isValidSuiObjectId(registryId)) {\n\t\t\turi.searchParams.append('registry', registryId);\n\t\t} else {\n\t\t\tthrow new PaymentKitUriError('Invalid Sui Object Id for Registry Id');\n\t\t}\n\t}\n\n\tif (registryName) {\n\t\turi.searchParams.append('registry', registryName);\n\t}\n\n\tif (params.label) {\n\t\turi.searchParams.append('label', params.label);\n\t}\n\n\tif (params.message) {\n\t\turi.searchParams.append('message', params.message);\n\t}\n\n\tif (params.iconUrl) {\n\t\turi.searchParams.append('iconUrl', params.iconUrl);\n\t}\n\n\treturn uri.toString();\n};\n\n/**\n * Parse a payment transaction URI into its components.\n * Returns the parsed payment URI parameters.\n *\n * @example\n * ```ts\n * const params = parsePaymentTransactionUri(\"sui:0x...?amount=1000000&coinType=0x...&nonce=...\");\n * ```\n */\nexport const parsePaymentTransactionUri = (uri: string): PaymentUriParams => {\n\tif (!uri.startsWith(SUI_PAYMENT_KIT_PROTOCOL + '?')) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Must start with sui:pay?');\n\t}\n\n\tconst url = new URL(uri);\n\n\t// Extract query parameters\n\tconst params = url.searchParams;\n\tconst receiver = params.get('receiver');\n\tconst amount = params.get('amount');\n\tconst coinType = params.get('coinType');\n\tconst nonce = params.get('nonce');\n\n\t// Amount and CoinType are required\n\tif (!receiver || !amount || !coinType || !nonce) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Missing required parameters');\n\t}\n\n\t// Validate the receiver address\n\tif (!isValidSuiAddress(receiver)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Receiver address is not valid');\n\t}\n\n\tif (!isValidCoinType(coinType)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Coin Type is not valid');\n\t}\n\n\tif (!isValidNonce(nonce)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Nonce length exceeds maximum of 36 characters');\n\t}\n\n\t// Validate amount is a valid numeric string (int or float) and positive\n\tconst bigIntAmount = BigInt(amount);\n\tif (!isValidAmount(bigIntAmount)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Amount must be a positive number');\n\t}\n\n\t// Extract optional registry parameter\n\tconst registry = params.get('registry') ?? undefined;\n\n\t// Determine if registry is an ID or name\n\tlet registryId: string | undefined;\n\tlet registryName: string | undefined;\n\n\tif (registry) {\n\t\tif (isValidSuiObjectId(registry)) {\n\t\t\tregistryId = registry;\n\t\t} else {\n\t\t\tregistryName = registry;\n\t\t}\n\t}\n\n\tconst baseParams = {\n\t\treceiverAddress: receiver,\n\t\tamount: bigIntAmount,\n\t\tcoinType,\n\t\tnonce: nonce,\n\t\tlabel: params.get('label') ?? undefined,\n\t\tmessage: params.get('message') ?? undefined,\n\t\ticonUrl: params.get('
|
|
1
|
+
{"version":3,"file":"uri.mjs","names":[],"sources":["../src/uri.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { isValidNamedType, isValidSuiAddress, isValidSuiObjectId } from '@mysten/sui/utils';\nimport type { PaymentUriParams } from './types.js';\nimport { PaymentKitUriError } from './error.js';\nimport { SUI_PAYMENT_KIT_PROTOCOL } from './constants.js';\n\nconst isValidNonce = (nonce: string) => {\n\treturn nonce.length <= 36;\n};\n\nconst isValidAmount = (amount: bigint) => {\n\treturn amount > 0n;\n};\n\nconst isValidCoinType = (coinType: string) => {\n\treturn isValidNamedType(coinType);\n};\n\n/**\n * Create a payment transaction URI from the given parameters.\n * Returns the constructed URI string.\n *\n * @example\n * ```ts\n * const uri = createPaymentTransactionUri({\n * receiverAddress: \"0x...\",\n * amount: \"10000000\", (0.01 SUI)\n * coinType: \"0x2::sui::SUI\",\n * nonce: <nonce>,\n * registryName: \"my-registry\"\n * });\n * ```\n */\nexport const createPaymentTransactionUri = (params: PaymentUriParams): string => {\n\tconst { receiverAddress, amount, coinType, nonce, registryId, registryName } = params;\n\n\tconst uri = new URL(SUI_PAYMENT_KIT_PROTOCOL);\n\n\tif (isValidSuiAddress(receiverAddress)) {\n\t\turi.searchParams.append('receiver', receiverAddress);\n\t} else {\n\t\tthrow new PaymentKitUriError('Invalid Sui address');\n\t}\n\n\tif (isValidAmount(amount)) {\n\t\turi.searchParams.append('amount', amount.toString());\n\t} else {\n\t\tthrow new PaymentKitUriError('Amount must be a positive numeric string');\n\t}\n\n\tif (isValidCoinType(coinType)) {\n\t\turi.searchParams.append('coinType', coinType);\n\t} else {\n\t\tthrow new PaymentKitUriError('Invalid Coin Type');\n\t}\n\n\tif (isValidNonce(nonce)) {\n\t\turi.searchParams.append('nonce', nonce);\n\t} else {\n\t\tthrow new PaymentKitUriError('Nonce length exceeds maximum of 36 characters');\n\t}\n\n\tif (registryId) {\n\t\tif (isValidSuiObjectId(registryId)) {\n\t\t\turi.searchParams.append('registry', registryId);\n\t\t} else {\n\t\t\tthrow new PaymentKitUriError('Invalid Sui Object Id for Registry Id');\n\t\t}\n\t}\n\n\tif (registryName) {\n\t\turi.searchParams.append('registry', registryName);\n\t}\n\n\tif (params.label) {\n\t\turi.searchParams.append('label', params.label);\n\t}\n\n\tif (params.message) {\n\t\turi.searchParams.append('message', params.message);\n\t}\n\n\tif (params.iconUrl) {\n\t\turi.searchParams.append('iconUrl', params.iconUrl);\n\t}\n\n\treturn uri.toString();\n};\n\n/**\n * Parse a payment transaction URI into its components.\n * Returns the parsed payment URI parameters.\n *\n * @example\n * ```ts\n * const params = parsePaymentTransactionUri(\"sui:0x...?amount=1000000&coinType=0x...&nonce=...\");\n * ```\n */\nexport const parsePaymentTransactionUri = (uri: string): PaymentUriParams => {\n\tif (!uri.startsWith(SUI_PAYMENT_KIT_PROTOCOL + '?')) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Must start with sui:pay?');\n\t}\n\n\tconst url = new URL(uri);\n\n\t// Extract query parameters\n\tconst params = url.searchParams;\n\tconst receiver = params.get('receiver');\n\tconst amount = params.get('amount');\n\tconst coinType = params.get('coinType');\n\tconst nonce = params.get('nonce');\n\n\t// Amount and CoinType are required\n\tif (!receiver || !amount || !coinType || !nonce) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Missing required parameters');\n\t}\n\n\t// Validate the receiver address\n\tif (!isValidSuiAddress(receiver)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Receiver address is not valid');\n\t}\n\n\tif (!isValidCoinType(coinType)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Coin Type is not valid');\n\t}\n\n\tif (!isValidNonce(nonce)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Nonce length exceeds maximum of 36 characters');\n\t}\n\n\t// Validate amount is a valid numeric string (int or float) and positive\n\tconst bigIntAmount = BigInt(amount);\n\tif (!isValidAmount(bigIntAmount)) {\n\t\tthrow new PaymentKitUriError('Invalid URI: Amount must be a positive number');\n\t}\n\n\t// Extract optional registry parameter\n\tconst registry = params.get('registry') ?? undefined;\n\n\t// Determine if registry is an ID or name\n\tlet registryId: string | undefined;\n\tlet registryName: string | undefined;\n\n\tif (registry) {\n\t\tif (isValidSuiObjectId(registry)) {\n\t\t\tregistryId = registry;\n\t\t} else {\n\t\t\tregistryName = registry;\n\t\t}\n\t}\n\n\tconst baseParams = {\n\t\treceiverAddress: receiver,\n\t\tamount: bigIntAmount,\n\t\tcoinType,\n\t\tnonce: nonce,\n\t\tlabel: params.get('label') ?? undefined,\n\t\tmessage: params.get('message') ?? undefined,\n\t\ticonUrl: params.get('iconUrl') ?? undefined,\n\t};\n\n\tif (registryId) {\n\t\treturn { ...baseParams, registryId };\n\t}\n\n\treturn { ...baseParams, registryName };\n};\n"],"mappings":";;;;;AAQA,MAAM,gBAAgB,UAAkB;AACvC,QAAO,MAAM,UAAU;;AAGxB,MAAM,iBAAiB,WAAmB;AACzC,QAAO,SAAS;;AAGjB,MAAM,mBAAmB,aAAqB;AAC7C,QAAO,iBAAiB,SAAS;;;;;;;;;;;;;;;;;AAkBlC,MAAa,+BAA+B,WAAqC;CAChF,MAAM,EAAE,iBAAiB,QAAQ,UAAU,OAAO,YAAY,iBAAiB;CAE/E,MAAM,MAAM,IAAI,IAAI,yBAAyB;AAE7C,KAAI,kBAAkB,gBAAgB,CACrC,KAAI,aAAa,OAAO,YAAY,gBAAgB;KAEpD,OAAM,IAAI,mBAAmB,sBAAsB;AAGpD,KAAI,cAAc,OAAO,CACxB,KAAI,aAAa,OAAO,UAAU,OAAO,UAAU,CAAC;KAEpD,OAAM,IAAI,mBAAmB,2CAA2C;AAGzE,KAAI,gBAAgB,SAAS,CAC5B,KAAI,aAAa,OAAO,YAAY,SAAS;KAE7C,OAAM,IAAI,mBAAmB,oBAAoB;AAGlD,KAAI,aAAa,MAAM,CACtB,KAAI,aAAa,OAAO,SAAS,MAAM;KAEvC,OAAM,IAAI,mBAAmB,gDAAgD;AAG9E,KAAI,WACH,KAAI,mBAAmB,WAAW,CACjC,KAAI,aAAa,OAAO,YAAY,WAAW;KAE/C,OAAM,IAAI,mBAAmB,wCAAwC;AAIvE,KAAI,aACH,KAAI,aAAa,OAAO,YAAY,aAAa;AAGlD,KAAI,OAAO,MACV,KAAI,aAAa,OAAO,SAAS,OAAO,MAAM;AAG/C,KAAI,OAAO,QACV,KAAI,aAAa,OAAO,WAAW,OAAO,QAAQ;AAGnD,KAAI,OAAO,QACV,KAAI,aAAa,OAAO,WAAW,OAAO,QAAQ;AAGnD,QAAO,IAAI,UAAU;;;;;;;;;;;AAYtB,MAAa,8BAA8B,QAAkC;AAC5E,KAAI,CAAC,IAAI,WAAW,2BAA2B,IAAI,CAClD,OAAM,IAAI,mBAAmB,wCAAwC;CAMtE,MAAM,SAHM,IAAI,IAAI,IAAI,CAGL;CACnB,MAAM,WAAW,OAAO,IAAI,WAAW;CACvC,MAAM,SAAS,OAAO,IAAI,SAAS;CACnC,MAAM,WAAW,OAAO,IAAI,WAAW;CACvC,MAAM,QAAQ,OAAO,IAAI,QAAQ;AAGjC,KAAI,CAAC,YAAY,CAAC,UAAU,CAAC,YAAY,CAAC,MACzC,OAAM,IAAI,mBAAmB,2CAA2C;AAIzE,KAAI,CAAC,kBAAkB,SAAS,CAC/B,OAAM,IAAI,mBAAmB,6CAA6C;AAG3E,KAAI,CAAC,gBAAgB,SAAS,CAC7B,OAAM,IAAI,mBAAmB,sCAAsC;AAGpE,KAAI,CAAC,aAAa,MAAM,CACvB,OAAM,IAAI,mBAAmB,6DAA6D;CAI3F,MAAM,eAAe,OAAO,OAAO;AACnC,KAAI,CAAC,cAAc,aAAa,CAC/B,OAAM,IAAI,mBAAmB,gDAAgD;CAI9E,MAAM,WAAW,OAAO,IAAI,WAAW,IAAI;CAG3C,IAAI;CACJ,IAAI;AAEJ,KAAI,SACH,KAAI,mBAAmB,SAAS,CAC/B,cAAa;KAEb,gBAAe;CAIjB,MAAM,aAAa;EAClB,iBAAiB;EACjB,QAAQ;EACR;EACO;EACP,OAAO,OAAO,IAAI,QAAQ,IAAI;EAC9B,SAAS,OAAO,IAAI,UAAU,IAAI;EAClC,SAAS,OAAO,IAAI,UAAU,IAAI;EAClC;AAED,KAAI,WACH,QAAO;EAAE,GAAG;EAAY;EAAY;AAGrC,QAAO;EAAE,GAAG;EAAY;EAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten/payment-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sui Payment Kit",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "^5.9.3",
|
|
32
|
+
"vitest": "^4.0.17",
|
|
32
33
|
"@mysten/codegen": "^0.8.3"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@mysten/
|
|
36
|
-
"@mysten/
|
|
36
|
+
"@mysten/sui": "^2.13.3",
|
|
37
|
+
"@mysten/bcs": "^2.0.3"
|
|
37
38
|
},
|
|
38
39
|
"scripts": {
|
|
39
40
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
|
@@ -45,6 +46,8 @@
|
|
|
45
46
|
"oxlint:check": "oxlint .",
|
|
46
47
|
"oxlint:fix": "oxlint --fix",
|
|
47
48
|
"lint": "pnpm run oxlint:check && pnpm run prettier:check",
|
|
48
|
-
"lint:fix": "pnpm run oxlint:fix && pnpm run prettier:fix"
|
|
49
|
+
"lint:fix": "pnpm run oxlint:fix && pnpm run prettier:fix",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"vitest": "vitest"
|
|
49
52
|
}
|
|
50
53
|
}
|