@mysten/kiosk 0.8.1 → 0.8.2
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/CHANGELOG.md +13 -0
- package/dist/cjs/client/kiosk-transaction.d.ts +4 -2
- package/dist/cjs/client/kiosk-transaction.js +16 -3
- package/dist/cjs/client/kiosk-transaction.js.map +2 -2
- package/dist/esm/client/kiosk-transaction.d.ts +4 -2
- package/dist/esm/client/kiosk-transaction.js +16 -3
- package/dist/esm/client/kiosk-transaction.js.map +2 -2
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/client/kiosk-transaction.ts +16 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @mysten/kiosk
|
|
2
2
|
|
|
3
|
+
## 0.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a3971c3524: Fixes `lock` function arguments. `itemId` is replaced by `item`, which accepts an ObjectArgument instead of a string. `itemId` is still supported but deprecated, and will be removed in future versions.
|
|
8
|
+
- Updated dependencies [a34f1cb67d]
|
|
9
|
+
- Updated dependencies [c08e3569ef]
|
|
10
|
+
- Updated dependencies [9a14e61db4]
|
|
11
|
+
- Updated dependencies [13e922d9b1]
|
|
12
|
+
- Updated dependencies [a34f1cb67d]
|
|
13
|
+
- Updated dependencies [220a766d86]
|
|
14
|
+
- @mysten/sui.js@0.50.0
|
|
15
|
+
|
|
3
16
|
## 0.8.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -129,11 +129,13 @@ export declare class KioskTransaction {
|
|
|
129
129
|
* A function to take lock an item in the kiosk.
|
|
130
130
|
|
|
131
131
|
* @param itemType The type `T` of the item
|
|
132
|
-
* @param
|
|
132
|
+
* @param item The ID or Transaction Argument of the item
|
|
133
|
+
* @param itemId The ID of the item - Deprecated: Use `item` instead.
|
|
133
134
|
* @param policy The Policy ID or Transaction Argument for item T
|
|
134
135
|
*/
|
|
135
|
-
lock({ itemType, itemId, policy }:
|
|
136
|
+
lock({ itemType, item, itemId, policy, }: ItemReference & {
|
|
136
137
|
policy: ObjectArgument;
|
|
138
|
+
itemId?: string;
|
|
137
139
|
}): this;
|
|
138
140
|
/**
|
|
139
141
|
* Purchase an item from a seller's kiosk.
|
|
@@ -284,12 +284,25 @@ class KioskTransaction {
|
|
|
284
284
|
* A function to take lock an item in the kiosk.
|
|
285
285
|
|
|
286
286
|
* @param itemType The type `T` of the item
|
|
287
|
-
* @param
|
|
287
|
+
* @param item The ID or Transaction Argument of the item
|
|
288
|
+
* @param itemId The ID of the item - Deprecated: Use `item` instead.
|
|
288
289
|
* @param policy The Policy ID or Transaction Argument for item T
|
|
289
290
|
*/
|
|
290
|
-
lock({
|
|
291
|
+
lock({
|
|
292
|
+
itemType,
|
|
293
|
+
item,
|
|
294
|
+
itemId,
|
|
295
|
+
policy
|
|
296
|
+
}) {
|
|
291
297
|
__privateMethod(this, _validateKioskIsSet, validateKioskIsSet_fn).call(this);
|
|
292
|
-
kioskTx.lock(
|
|
298
|
+
kioskTx.lock(
|
|
299
|
+
this.transactionBlock,
|
|
300
|
+
itemType,
|
|
301
|
+
this.kiosk,
|
|
302
|
+
this.kioskCap,
|
|
303
|
+
policy,
|
|
304
|
+
itemId ?? item
|
|
305
|
+
);
|
|
293
306
|
return this;
|
|
294
307
|
}
|
|
295
308
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/client/kiosk-transaction.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tTransactionArgument,\n\tTransactionBlock,\n\tTransactionObjectArgument,\n} from '@mysten/sui.js/transactions';\n\nimport * as kioskTx from '../tx/kiosk.js';\nimport { convertToPersonalTx, transferPersonalCapTx } from '../tx/personal-kiosk.js';\nimport { confirmRequest } from '../tx/transfer-policy.js';\nimport type {\n\tItemId,\n\tItemReference,\n\tItemValue,\n\tKioskOwnerCap,\n\tObjectArgument,\n\tPrice,\n\tPurchaseOptions,\n} from '../types/index.js';\nimport { getNormalizedRuleType } from '../utils.js';\nimport type { KioskClient } from './kiosk-client.js';\n\nexport type KioskTransactionParams = {\n\t/** The TransactionBlock for this run */\n\ttransactionBlock: TransactionBlock;\n\t/**\n\t * You can create a new KioskClient by calling `new KioskClient()`\n\t */\n\tkioskClient: KioskClient;\n\t/**\n\t * You can optionally pass in the `cap` as returned\n\t * from `kioskClient.getOwnedKiosks` when initializing the client\n\t * Otherwise, you can set it by calling `kioskTransaction.setCap()`\n\t */\n\tcap?: KioskOwnerCap;\n};\n\n/**\n * A helper for building transactions that involve kiosk.\n */\nexport class KioskTransaction {\n\ttransactionBlock: TransactionBlock;\n\tkioskClient: KioskClient;\n\tkiosk?: TransactionObjectArgument;\n\tkioskCap?: TransactionObjectArgument;\n\t// If we're pending `share` of a new kiosk, `finalize()` will share it.\n\t#pendingShare?: boolean;\n\t// If we're pending transferring of the cap, `finalize()` will either error or transfer the cap if it's a new personal.\n\t#pendingTransfer?: boolean;\n\t// The promise that the personalCap will be returned on `finalize()`.\n\t#promise?: TransactionArgument | undefined;\n\t// The personal kiosk argument.\n\t#personalCap?: TransactionObjectArgument;\n\t// A flag that checks whether kiosk TX is finalized.\n\t#finalized: boolean = false;\n\n\tconstructor({ transactionBlock, kioskClient, cap }: KioskTransactionParams) {\n\t\tthis.transactionBlock = transactionBlock;\n\t\tthis.kioskClient = kioskClient;\n\n\t\tif (cap) this.setCap(cap);\n\t}\n\n\t/**\n\t * Creates a kiosk and saves `kiosk` and `kioskOwnerCap` in state.\n\t * Helpful if we want to chain some actions before sharing + transferring the cap to the specified address.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreate() {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.#setPendingStatuses({\n\t\t\tshare: true,\n\t\t\ttransfer: true,\n\t\t});\n\t\tconst [kiosk, cap] = kioskTx.createKiosk(this.transactionBlock);\n\t\tthis.kiosk = kiosk;\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a personal kiosk & shares it.\n\t * The `PersonalKioskCap` is transferred to the signer.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreatePersonal(borrow?: boolean) {\n\t\tthis.#pendingShare = true;\n\t\treturn this.create().convertToPersonal(borrow);\n\t}\n\n\t/**\n\t * Converts a kiosk to a Personal (Soulbound) Kiosk.\n\t * Requires initialization by either calling `ktxb.create()` or `ktxb.setCap()`.\n\t */\n\tconvertToPersonal(borrow?: boolean) {\n\t\tthis.#validateKioskIsSet();\n\n\t\tconst cap = convertToPersonalTx(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tthis.kioskClient.getRulePackageId('personalKioskRulePackageId'),\n\t\t);\n\n\t\t// if we enable `borrow`, we borrow the kioskCap from the cap.\n\t\tif (borrow) this.#borrowFromPersonalCap(cap);\n\t\telse this.#personalCap = cap;\n\n\t\tthis.#setPendingStatuses({ transfer: true });\n\t\treturn this;\n\t}\n\n\t/**\n\t * Single function way to create a kiosk, share it and transfer the cap to the specified address.\n\t */\n\tcreateAndShare(address: string) {\n\t\tthis.#validateFinalizedStatus();\n\t\tconst cap = kioskTx.createKioskAndShare(this.transactionBlock);\n\t\tthis.transactionBlock.transferObjects([cap], this.transactionBlock.pure.address(address));\n\t}\n\n\t/**\n\t * Shares the kiosk.\n\t */\n\tshare() {\n\t\tthis.#validateKioskIsSet();\n\t\tthis.#setPendingStatuses({ share: false });\n\t\tkioskTx.shareKiosk(this.transactionBlock, this.kiosk!);\n\t}\n\n\t/**\n\t * Should be called only after `create` is called.\n\t * It shares the kiosk & transfers the cap to the specified address.\n\t */\n\tshareAndTransferCap(address: string) {\n\t\tif (this.#personalCap)\n\t\t\tthrow new Error('You can only call `shareAndTransferCap` on a non-personal kiosk.');\n\t\tthis.#setPendingStatuses({ transfer: false });\n\t\tthis.share();\n\t\tthis.transactionBlock.transferObjects(\n\t\t\t[this.kioskCap!],\n\t\t\tthis.transactionBlock.pure.address(address),\n\t\t);\n\t}\n\n\t/**\n\t * A function to borrow an item from a kiosk & execute any function with it.\n\t * Example: You could borrow a Fren out of a kiosk, attach an accessory (or mix), and return it.\n\t */\n\tborrowTx({ itemType, itemId }: ItemId, callback: (item: TransactionArgument) => void) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\tcallback(itemObj);\n\n\t\tthis.return({ itemType, item: itemObj, promise });\n\t}\n\n\t/**\n\t * Borrows an item from the kiosk.\n\t * This will fail if the item is listed for sale.\n\t *\n\t * Requires calling `return`.\n\t */\n\tborrow({ itemType, itemId }: ItemId): [TransactionArgument, TransactionArgument] {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\treturn [itemObj, promise];\n\t}\n\n\t/**\n\t * Returns the item back to the kiosk.\n\t * Accepts the parameters returned from the `borrow` function.\n\t */\n\treturn({ itemType, item, promise }: ItemValue & { promise: TransactionArgument }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.returnValue(this.transactionBlock, itemType, this.kiosk!, item, promise);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to withdraw from kiosk\n\t * @param address Where to trasnfer the coin.\n\t * @param amount The amount we aim to withdraw.\n\t */\n\twithdraw(address: string, amount?: string | bigint | number) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst coin = kioskTx.withdrawFromKiosk(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tamount,\n\t\t);\n\t\tthis.transactionBlock.transferObjects([coin], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t */\n\tplace({ itemType, item }: ItemReference) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.place(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk and list it for sale in one transaction.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t * @param price The price in MIST\n\t */\n\tplaceAndList({ itemType, item, price }: ItemReference & Price) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.placeAndList(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to list an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t */\n\tlist({ itemType, itemId, price }: ItemId & { price: string | bigint }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.list(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to delist an item from the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\tdelist({ itemType, itemId }: ItemId) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.delist(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take an item from the kiosk. The transaction won't succeed if the item is listed or locked.\n\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\ttake({ itemType, itemId }: ItemId): TransactionObjectArgument {\n\t\tthis.#validateKioskIsSet();\n\t\treturn kioskTx.take(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t}\n\n\t/**\n\t * Transfer a non-locked/non-listed item to an address.\n\t *\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param address The destination address\n\t */\n\ttransfer({ itemType, itemId, address }: ItemId & { address: string }) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst item = this.take({ itemType, itemId });\n\t\tthis.transactionBlock.transferObjects([item], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take lock an item in the kiosk.\n\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param policy The Policy ID or Transaction Argument for item T\n\t */\n\tlock({ itemType, itemId, policy }: ItemId & { policy: ObjectArgument }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.lock(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, policy, itemId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Purchase an item from a seller's kiosk.\n\t * Returns [item, transferRequest]\n\t * Can be called like: `const [item, transferRequest] = kioskTx.purchase({...})`\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t */\n\tpurchase({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument }): [\n\t\tTransactionObjectArgument,\n\t\tTransactionObjectArgument,\n\t] {\n\t\t// Split the coin for the amount of the listing.\n\t\tconst coin = this.transactionBlock.splitCoins(this.transactionBlock.gas, [\n\t\t\tthis.transactionBlock.pure.u64(price),\n\t\t]);\n\t\treturn kioskTx.purchase(this.transactionBlock, itemType, sellerKiosk, itemId, coin);\n\t}\n\n\t/**\n\t * A function to purchase and resolve a transfer policy.\n\t * If the transfer policy has the `lock` rule, the item is locked in the kiosk.\n\t * Otherwise, the item is placed in the kiosk.\n\t * @param itemType The type of the item\n\t * @param itemId The id of the item\n\t * @param price The price of the specified item\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t * @param extraArgs Used to pass arguments for custom rule resolvers.\n\t */\n\tasync purchaseAndResolve({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t\textraArgs,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument } & PurchaseOptions) {\n\t\tthis.#validateKioskIsSet();\n\t\t// Get a list of the transfer policies.\n\t\tconst policies = await this.kioskClient.getTransferPolicies({ type: itemType });\n\n\t\tif (policies.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`The type ${itemType} doesn't have a Transfer Policy so it can't be traded through kiosk.`,\n\t\t\t);\n\t\t}\n\n\t\tconst policy = policies[0]; // we now pick the first one. We need to add an option to define which one.\n\n\t\t// initialize the purchase `kiosk::purchase`\n\t\tconst [purchasedItem, transferRequest] = this.purchase({\n\t\t\titemType,\n\t\t\titemId,\n\t\t\tprice,\n\t\t\tsellerKiosk,\n\t\t});\n\n\t\tlet canTransferOutsideKiosk = true;\n\n\t\tfor (const rule of policy.rules) {\n\t\t\tconst ruleDefinition = this.kioskClient.rules.find(\n\t\t\t\t(x) => getNormalizedRuleType(x.rule) === getNormalizedRuleType(rule),\n\t\t\t);\n\t\t\tif (!ruleDefinition) throw new Error(`No resolver for the following rule: ${rule}.`);\n\n\t\t\tif (ruleDefinition.hasLockingRule) canTransferOutsideKiosk = false;\n\n\t\t\truleDefinition.resolveRuleFunction({\n\t\t\t\tpackageId: ruleDefinition.packageId,\n\t\t\t\ttransactionBlock: this.transactionBlock,\n\t\t\t\titemType,\n\t\t\t\titemId,\n\t\t\t\tprice: price.toString(),\n\t\t\t\tsellerKiosk,\n\t\t\t\tpolicyId: policy.id,\n\t\t\t\ttransferRequest,\n\t\t\t\tpurchasedItem,\n\t\t\t\tkiosk: this.kiosk!,\n\t\t\t\tkioskCap: this.kioskCap!,\n\t\t\t\textraArgs: extraArgs || {},\n\t\t\t});\n\t\t}\n\n\t\tconfirmRequest(this.transactionBlock, itemType, policy.id, transferRequest);\n\n\t\tif (canTransferOutsideKiosk) this.place({ itemType, item: purchasedItem });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to setup the client using an existing `ownerCap`,\n\t * as return from the `kioskClient.getOwnedKiosks` function.\n\t * @param cap `KioskOwnerCap` object as returned from `getOwnedKiosks` SDK call.\n\t */\n\tsetCap(cap: KioskOwnerCap) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = this.transactionBlock.object(cap.kioskId);\n\t\tif (!cap.isPersonal) {\n\t\t\tthis.kioskCap = this.transactionBlock.object(cap.objectId);\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#borrowFromPersonalCap(cap.objectId);\n\t}\n\n\t/**\n\t *\tA function that ends up the kiosk building txb & returns the `kioskOwnerCap` back to the\n\t * `PersonalKioskCap`, in case we are operating on a personal kiosk.\n\t * \tIt will also share the `kiosk` if it's not shared, and finalize the transfer of the personal cap if it's pending.\n\t */\n\tfinalize() {\n\t\tthis.#validateKioskIsSet();\n\t\t// If we're pending the sharing of the new kiosk, share it.\n\t\tif (this.#pendingShare) this.share();\n\n\t\t// If we're operating on a non-personal kiosk, we don't need to do anything else.\n\t\tif (!this.#personalCap) {\n\t\t\t// If we're pending transfer though, we inform user to call `shareAndTransferCap()`.\n\t\t\tif (this.#pendingTransfer)\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'You need to transfer the `kioskOwnerCap` by calling `shareAndTransferCap()` before wrap',\n\t\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst packageId = this.kioskClient.getRulePackageId('personalKioskRulePackageId');\n\n\t\t// if we have a promise, return the `ownerCap` back to the personal cap.\n\t\tif (this.#promise) {\n\t\t\tthis.transactionBlock.moveCall({\n\t\t\t\ttarget: `${packageId}::personal_kiosk::return_val`,\n\t\t\t\targuments: [\n\t\t\t\t\tthis.#personalCap,\n\t\t\t\t\tthis.transactionBlock.object(this.kioskCap!),\n\t\t\t\t\tthis.#promise!,\n\t\t\t\t],\n\t\t\t});\n\t\t}\n\n\t\t// If we are pending transferring the personalCap, we do it here.\n\t\tif (this.#pendingTransfer)\n\t\t\ttransferPersonalCapTx(this.transactionBlock, this.#personalCap, packageId);\n\n\t\t// Mark the transaction block as finalized, so no other functions can be called.\n\t\tthis.#finalized = true;\n\t}\n\n\t// Some setters in case we want custom behavior.\n\tsetKioskCap(cap: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\tsetKiosk(kiosk: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = kiosk;\n\t\treturn this;\n\t}\n\n\t// Some getters\n\t/*\n\t * Returns the active transaction's kiosk, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKiosk() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kiosk) throw new Error('Kiosk is not set.');\n\t\treturn this.kiosk;\n\t}\n\n\t/*\n\t * Returns the active transaction's kioskOwnerCap, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKioskCap() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kioskCap) throw new Error('Kiosk cap is not set');\n\t\treturn this.kioskCap;\n\t}\n\n\t/**\n\t * A function to borrow from `personalCap`.\n\t */\n\t#borrowFromPersonalCap(personalCap: ObjectArgument) {\n\t\tconst [kioskCap, promise] = this.transactionBlock.moveCall({\n\t\t\ttarget: `${this.kioskClient.getRulePackageId(\n\t\t\t\t'personalKioskRulePackageId',\n\t\t\t)}::personal_kiosk::borrow_val`,\n\t\t\targuments: [this.transactionBlock.object(personalCap)],\n\t\t});\n\n\t\tthis.kioskCap = kioskCap;\n\t\tthis.#personalCap = this.transactionBlock.object(personalCap);\n\t\tthis.#promise = promise;\n\n\t\treturn this;\n\t}\n\n\t#setPendingStatuses({ share, transfer }: { share?: boolean; transfer?: boolean }) {\n\t\tif (transfer !== undefined) this.#pendingTransfer = transfer;\n\t\tif (share !== undefined) this.#pendingShare = share;\n\t}\n\n\t#validateKioskIsSet() {\n\t\tthis.#validateFinalizedStatus();\n\n\t\tif (!this.kiosk || !this.kioskCap)\n\t\t\tthrow new Error(\n\t\t\t\t'You need to initialize the client by either supplying an existing owner cap or by creating a new by calling `.create()`',\n\t\t\t);\n\t}\n\n\t// Validates that `finalize`\n\t#validateFinalizedStatus() {\n\t\tif (this.#finalized)\n\t\t\tthrow new Error(\"You can't add more transactions to a finalized kiosk transaction block.\");\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,cAAyB;AACzB,4BAA2D;AAC3D,6BAA+B;AAU/B,mBAAsC;AArBtC;AA0CO,MAAM,iBAAiB;AAAA,EAgB7B,YAAY,EAAE,kBAAkB,aAAa,IAAI,GAA2B;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tTransactionArgument,\n\tTransactionBlock,\n\tTransactionObjectArgument,\n} from '@mysten/sui.js/transactions';\n\nimport * as kioskTx from '../tx/kiosk.js';\nimport { convertToPersonalTx, transferPersonalCapTx } from '../tx/personal-kiosk.js';\nimport { confirmRequest } from '../tx/transfer-policy.js';\nimport type {\n\tItemId,\n\tItemReference,\n\tItemValue,\n\tKioskOwnerCap,\n\tObjectArgument,\n\tPrice,\n\tPurchaseOptions,\n} from '../types/index.js';\nimport { getNormalizedRuleType } from '../utils.js';\nimport type { KioskClient } from './kiosk-client.js';\n\nexport type KioskTransactionParams = {\n\t/** The TransactionBlock for this run */\n\ttransactionBlock: TransactionBlock;\n\t/**\n\t * You can create a new KioskClient by calling `new KioskClient()`\n\t */\n\tkioskClient: KioskClient;\n\t/**\n\t * You can optionally pass in the `cap` as returned\n\t * from `kioskClient.getOwnedKiosks` when initializing the client\n\t * Otherwise, you can set it by calling `kioskTransaction.setCap()`\n\t */\n\tcap?: KioskOwnerCap;\n};\n\n/**\n * A helper for building transactions that involve kiosk.\n */\nexport class KioskTransaction {\n\ttransactionBlock: TransactionBlock;\n\tkioskClient: KioskClient;\n\tkiosk?: TransactionObjectArgument;\n\tkioskCap?: TransactionObjectArgument;\n\t// If we're pending `share` of a new kiosk, `finalize()` will share it.\n\t#pendingShare?: boolean;\n\t// If we're pending transferring of the cap, `finalize()` will either error or transfer the cap if it's a new personal.\n\t#pendingTransfer?: boolean;\n\t// The promise that the personalCap will be returned on `finalize()`.\n\t#promise?: TransactionArgument | undefined;\n\t// The personal kiosk argument.\n\t#personalCap?: TransactionObjectArgument;\n\t// A flag that checks whether kiosk TX is finalized.\n\t#finalized: boolean = false;\n\n\tconstructor({ transactionBlock, kioskClient, cap }: KioskTransactionParams) {\n\t\tthis.transactionBlock = transactionBlock;\n\t\tthis.kioskClient = kioskClient;\n\n\t\tif (cap) this.setCap(cap);\n\t}\n\n\t/**\n\t * Creates a kiosk and saves `kiosk` and `kioskOwnerCap` in state.\n\t * Helpful if we want to chain some actions before sharing + transferring the cap to the specified address.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreate() {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.#setPendingStatuses({\n\t\t\tshare: true,\n\t\t\ttransfer: true,\n\t\t});\n\t\tconst [kiosk, cap] = kioskTx.createKiosk(this.transactionBlock);\n\t\tthis.kiosk = kiosk;\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a personal kiosk & shares it.\n\t * The `PersonalKioskCap` is transferred to the signer.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreatePersonal(borrow?: boolean) {\n\t\tthis.#pendingShare = true;\n\t\treturn this.create().convertToPersonal(borrow);\n\t}\n\n\t/**\n\t * Converts a kiosk to a Personal (Soulbound) Kiosk.\n\t * Requires initialization by either calling `ktxb.create()` or `ktxb.setCap()`.\n\t */\n\tconvertToPersonal(borrow?: boolean) {\n\t\tthis.#validateKioskIsSet();\n\n\t\tconst cap = convertToPersonalTx(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tthis.kioskClient.getRulePackageId('personalKioskRulePackageId'),\n\t\t);\n\n\t\t// if we enable `borrow`, we borrow the kioskCap from the cap.\n\t\tif (borrow) this.#borrowFromPersonalCap(cap);\n\t\telse this.#personalCap = cap;\n\n\t\tthis.#setPendingStatuses({ transfer: true });\n\t\treturn this;\n\t}\n\n\t/**\n\t * Single function way to create a kiosk, share it and transfer the cap to the specified address.\n\t */\n\tcreateAndShare(address: string) {\n\t\tthis.#validateFinalizedStatus();\n\t\tconst cap = kioskTx.createKioskAndShare(this.transactionBlock);\n\t\tthis.transactionBlock.transferObjects([cap], this.transactionBlock.pure.address(address));\n\t}\n\n\t/**\n\t * Shares the kiosk.\n\t */\n\tshare() {\n\t\tthis.#validateKioskIsSet();\n\t\tthis.#setPendingStatuses({ share: false });\n\t\tkioskTx.shareKiosk(this.transactionBlock, this.kiosk!);\n\t}\n\n\t/**\n\t * Should be called only after `create` is called.\n\t * It shares the kiosk & transfers the cap to the specified address.\n\t */\n\tshareAndTransferCap(address: string) {\n\t\tif (this.#personalCap)\n\t\t\tthrow new Error('You can only call `shareAndTransferCap` on a non-personal kiosk.');\n\t\tthis.#setPendingStatuses({ transfer: false });\n\t\tthis.share();\n\t\tthis.transactionBlock.transferObjects(\n\t\t\t[this.kioskCap!],\n\t\t\tthis.transactionBlock.pure.address(address),\n\t\t);\n\t}\n\n\t/**\n\t * A function to borrow an item from a kiosk & execute any function with it.\n\t * Example: You could borrow a Fren out of a kiosk, attach an accessory (or mix), and return it.\n\t */\n\tborrowTx({ itemType, itemId }: ItemId, callback: (item: TransactionArgument) => void) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\tcallback(itemObj);\n\n\t\tthis.return({ itemType, item: itemObj, promise });\n\t}\n\n\t/**\n\t * Borrows an item from the kiosk.\n\t * This will fail if the item is listed for sale.\n\t *\n\t * Requires calling `return`.\n\t */\n\tborrow({ itemType, itemId }: ItemId): [TransactionArgument, TransactionArgument] {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\treturn [itemObj, promise];\n\t}\n\n\t/**\n\t * Returns the item back to the kiosk.\n\t * Accepts the parameters returned from the `borrow` function.\n\t */\n\treturn({ itemType, item, promise }: ItemValue & { promise: TransactionArgument }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.returnValue(this.transactionBlock, itemType, this.kiosk!, item, promise);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to withdraw from kiosk\n\t * @param address Where to trasnfer the coin.\n\t * @param amount The amount we aim to withdraw.\n\t */\n\twithdraw(address: string, amount?: string | bigint | number) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst coin = kioskTx.withdrawFromKiosk(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tamount,\n\t\t);\n\t\tthis.transactionBlock.transferObjects([coin], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t */\n\tplace({ itemType, item }: ItemReference) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.place(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk and list it for sale in one transaction.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t * @param price The price in MIST\n\t */\n\tplaceAndList({ itemType, item, price }: ItemReference & Price) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.placeAndList(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to list an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t */\n\tlist({ itemType, itemId, price }: ItemId & { price: string | bigint }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.list(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to delist an item from the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\tdelist({ itemType, itemId }: ItemId) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.delist(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take an item from the kiosk. The transaction won't succeed if the item is listed or locked.\n\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\ttake({ itemType, itemId }: ItemId): TransactionObjectArgument {\n\t\tthis.#validateKioskIsSet();\n\t\treturn kioskTx.take(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t}\n\n\t/**\n\t * Transfer a non-locked/non-listed item to an address.\n\t *\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param address The destination address\n\t */\n\ttransfer({ itemType, itemId, address }: ItemId & { address: string }) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst item = this.take({ itemType, itemId });\n\t\tthis.transactionBlock.transferObjects([item], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take lock an item in the kiosk.\n\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t * @param itemId The ID of the item - Deprecated: Use `item` instead.\n\t * @param policy The Policy ID or Transaction Argument for item T\n\t */\n\tlock({\n\t\titemType,\n\t\titem,\n\t\titemId,\n\t\tpolicy,\n\t}: ItemReference & { policy: ObjectArgument; itemId?: string }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.lock(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tpolicy,\n\t\t\titemId ?? item,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Purchase an item from a seller's kiosk.\n\t * Returns [item, transferRequest]\n\t * Can be called like: `const [item, transferRequest] = kioskTx.purchase({...})`\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t */\n\tpurchase({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument }): [\n\t\tTransactionObjectArgument,\n\t\tTransactionObjectArgument,\n\t] {\n\t\t// Split the coin for the amount of the listing.\n\t\tconst coin = this.transactionBlock.splitCoins(this.transactionBlock.gas, [\n\t\t\tthis.transactionBlock.pure.u64(price),\n\t\t]);\n\t\treturn kioskTx.purchase(this.transactionBlock, itemType, sellerKiosk, itemId, coin);\n\t}\n\n\t/**\n\t * A function to purchase and resolve a transfer policy.\n\t * If the transfer policy has the `lock` rule, the item is locked in the kiosk.\n\t * Otherwise, the item is placed in the kiosk.\n\t * @param itemType The type of the item\n\t * @param itemId The id of the item\n\t * @param price The price of the specified item\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t * @param extraArgs Used to pass arguments for custom rule resolvers.\n\t */\n\tasync purchaseAndResolve({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t\textraArgs,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument } & PurchaseOptions) {\n\t\tthis.#validateKioskIsSet();\n\t\t// Get a list of the transfer policies.\n\t\tconst policies = await this.kioskClient.getTransferPolicies({ type: itemType });\n\n\t\tif (policies.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`The type ${itemType} doesn't have a Transfer Policy so it can't be traded through kiosk.`,\n\t\t\t);\n\t\t}\n\n\t\tconst policy = policies[0]; // we now pick the first one. We need to add an option to define which one.\n\n\t\t// initialize the purchase `kiosk::purchase`\n\t\tconst [purchasedItem, transferRequest] = this.purchase({\n\t\t\titemType,\n\t\t\titemId,\n\t\t\tprice,\n\t\t\tsellerKiosk,\n\t\t});\n\n\t\tlet canTransferOutsideKiosk = true;\n\n\t\tfor (const rule of policy.rules) {\n\t\t\tconst ruleDefinition = this.kioskClient.rules.find(\n\t\t\t\t(x) => getNormalizedRuleType(x.rule) === getNormalizedRuleType(rule),\n\t\t\t);\n\t\t\tif (!ruleDefinition) throw new Error(`No resolver for the following rule: ${rule}.`);\n\n\t\t\tif (ruleDefinition.hasLockingRule) canTransferOutsideKiosk = false;\n\n\t\t\truleDefinition.resolveRuleFunction({\n\t\t\t\tpackageId: ruleDefinition.packageId,\n\t\t\t\ttransactionBlock: this.transactionBlock,\n\t\t\t\titemType,\n\t\t\t\titemId,\n\t\t\t\tprice: price.toString(),\n\t\t\t\tsellerKiosk,\n\t\t\t\tpolicyId: policy.id,\n\t\t\t\ttransferRequest,\n\t\t\t\tpurchasedItem,\n\t\t\t\tkiosk: this.kiosk!,\n\t\t\t\tkioskCap: this.kioskCap!,\n\t\t\t\textraArgs: extraArgs || {},\n\t\t\t});\n\t\t}\n\n\t\tconfirmRequest(this.transactionBlock, itemType, policy.id, transferRequest);\n\n\t\tif (canTransferOutsideKiosk) this.place({ itemType, item: purchasedItem });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to setup the client using an existing `ownerCap`,\n\t * as return from the `kioskClient.getOwnedKiosks` function.\n\t * @param cap `KioskOwnerCap` object as returned from `getOwnedKiosks` SDK call.\n\t */\n\tsetCap(cap: KioskOwnerCap) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = this.transactionBlock.object(cap.kioskId);\n\t\tif (!cap.isPersonal) {\n\t\t\tthis.kioskCap = this.transactionBlock.object(cap.objectId);\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#borrowFromPersonalCap(cap.objectId);\n\t}\n\n\t/**\n\t *\tA function that ends up the kiosk building txb & returns the `kioskOwnerCap` back to the\n\t * `PersonalKioskCap`, in case we are operating on a personal kiosk.\n\t * \tIt will also share the `kiosk` if it's not shared, and finalize the transfer of the personal cap if it's pending.\n\t */\n\tfinalize() {\n\t\tthis.#validateKioskIsSet();\n\t\t// If we're pending the sharing of the new kiosk, share it.\n\t\tif (this.#pendingShare) this.share();\n\n\t\t// If we're operating on a non-personal kiosk, we don't need to do anything else.\n\t\tif (!this.#personalCap) {\n\t\t\t// If we're pending transfer though, we inform user to call `shareAndTransferCap()`.\n\t\t\tif (this.#pendingTransfer)\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'You need to transfer the `kioskOwnerCap` by calling `shareAndTransferCap()` before wrap',\n\t\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst packageId = this.kioskClient.getRulePackageId('personalKioskRulePackageId');\n\n\t\t// if we have a promise, return the `ownerCap` back to the personal cap.\n\t\tif (this.#promise) {\n\t\t\tthis.transactionBlock.moveCall({\n\t\t\t\ttarget: `${packageId}::personal_kiosk::return_val`,\n\t\t\t\targuments: [\n\t\t\t\t\tthis.#personalCap,\n\t\t\t\t\tthis.transactionBlock.object(this.kioskCap!),\n\t\t\t\t\tthis.#promise!,\n\t\t\t\t],\n\t\t\t});\n\t\t}\n\n\t\t// If we are pending transferring the personalCap, we do it here.\n\t\tif (this.#pendingTransfer)\n\t\t\ttransferPersonalCapTx(this.transactionBlock, this.#personalCap, packageId);\n\n\t\t// Mark the transaction block as finalized, so no other functions can be called.\n\t\tthis.#finalized = true;\n\t}\n\n\t// Some setters in case we want custom behavior.\n\tsetKioskCap(cap: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\tsetKiosk(kiosk: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = kiosk;\n\t\treturn this;\n\t}\n\n\t// Some getters\n\t/*\n\t * Returns the active transaction's kiosk, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKiosk() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kiosk) throw new Error('Kiosk is not set.');\n\t\treturn this.kiosk;\n\t}\n\n\t/*\n\t * Returns the active transaction's kioskOwnerCap, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKioskCap() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kioskCap) throw new Error('Kiosk cap is not set');\n\t\treturn this.kioskCap;\n\t}\n\n\t/**\n\t * A function to borrow from `personalCap`.\n\t */\n\t#borrowFromPersonalCap(personalCap: ObjectArgument) {\n\t\tconst [kioskCap, promise] = this.transactionBlock.moveCall({\n\t\t\ttarget: `${this.kioskClient.getRulePackageId(\n\t\t\t\t'personalKioskRulePackageId',\n\t\t\t)}::personal_kiosk::borrow_val`,\n\t\t\targuments: [this.transactionBlock.object(personalCap)],\n\t\t});\n\n\t\tthis.kioskCap = kioskCap;\n\t\tthis.#personalCap = this.transactionBlock.object(personalCap);\n\t\tthis.#promise = promise;\n\n\t\treturn this;\n\t}\n\n\t#setPendingStatuses({ share, transfer }: { share?: boolean; transfer?: boolean }) {\n\t\tif (transfer !== undefined) this.#pendingTransfer = transfer;\n\t\tif (share !== undefined) this.#pendingShare = share;\n\t}\n\n\t#validateKioskIsSet() {\n\t\tthis.#validateFinalizedStatus();\n\n\t\tif (!this.kiosk || !this.kioskCap)\n\t\t\tthrow new Error(\n\t\t\t\t'You need to initialize the client by either supplying an existing owner cap or by creating a new by calling `.create()`',\n\t\t\t);\n\t}\n\n\t// Validates that `finalize`\n\t#validateFinalizedStatus() {\n\t\tif (this.#finalized)\n\t\t\tthrow new Error(\"You can't add more transactions to a finalized kiosk transaction block.\");\n\t}\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -129,11 +129,13 @@ export declare class KioskTransaction {
|
|
|
129
129
|
* A function to take lock an item in the kiosk.
|
|
130
130
|
|
|
131
131
|
* @param itemType The type `T` of the item
|
|
132
|
-
* @param
|
|
132
|
+
* @param item The ID or Transaction Argument of the item
|
|
133
|
+
* @param itemId The ID of the item - Deprecated: Use `item` instead.
|
|
133
134
|
* @param policy The Policy ID or Transaction Argument for item T
|
|
134
135
|
*/
|
|
135
|
-
lock({ itemType, itemId, policy }:
|
|
136
|
+
lock({ itemType, item, itemId, policy, }: ItemReference & {
|
|
136
137
|
policy: ObjectArgument;
|
|
138
|
+
itemId?: string;
|
|
137
139
|
}): this;
|
|
138
140
|
/**
|
|
139
141
|
* Purchase an item from a seller's kiosk.
|
|
@@ -251,12 +251,25 @@ class KioskTransaction {
|
|
|
251
251
|
* A function to take lock an item in the kiosk.
|
|
252
252
|
|
|
253
253
|
* @param itemType The type `T` of the item
|
|
254
|
-
* @param
|
|
254
|
+
* @param item The ID or Transaction Argument of the item
|
|
255
|
+
* @param itemId The ID of the item - Deprecated: Use `item` instead.
|
|
255
256
|
* @param policy The Policy ID or Transaction Argument for item T
|
|
256
257
|
*/
|
|
257
|
-
lock({
|
|
258
|
+
lock({
|
|
259
|
+
itemType,
|
|
260
|
+
item,
|
|
261
|
+
itemId,
|
|
262
|
+
policy
|
|
263
|
+
}) {
|
|
258
264
|
__privateMethod(this, _validateKioskIsSet, validateKioskIsSet_fn).call(this);
|
|
259
|
-
kioskTx.lock(
|
|
265
|
+
kioskTx.lock(
|
|
266
|
+
this.transactionBlock,
|
|
267
|
+
itemType,
|
|
268
|
+
this.kiosk,
|
|
269
|
+
this.kioskCap,
|
|
270
|
+
policy,
|
|
271
|
+
itemId ?? item
|
|
272
|
+
);
|
|
260
273
|
return this;
|
|
261
274
|
}
|
|
262
275
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/client/kiosk-transaction.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tTransactionArgument,\n\tTransactionBlock,\n\tTransactionObjectArgument,\n} from '@mysten/sui.js/transactions';\n\nimport * as kioskTx from '../tx/kiosk.js';\nimport { convertToPersonalTx, transferPersonalCapTx } from '../tx/personal-kiosk.js';\nimport { confirmRequest } from '../tx/transfer-policy.js';\nimport type {\n\tItemId,\n\tItemReference,\n\tItemValue,\n\tKioskOwnerCap,\n\tObjectArgument,\n\tPrice,\n\tPurchaseOptions,\n} from '../types/index.js';\nimport { getNormalizedRuleType } from '../utils.js';\nimport type { KioskClient } from './kiosk-client.js';\n\nexport type KioskTransactionParams = {\n\t/** The TransactionBlock for this run */\n\ttransactionBlock: TransactionBlock;\n\t/**\n\t * You can create a new KioskClient by calling `new KioskClient()`\n\t */\n\tkioskClient: KioskClient;\n\t/**\n\t * You can optionally pass in the `cap` as returned\n\t * from `kioskClient.getOwnedKiosks` when initializing the client\n\t * Otherwise, you can set it by calling `kioskTransaction.setCap()`\n\t */\n\tcap?: KioskOwnerCap;\n};\n\n/**\n * A helper for building transactions that involve kiosk.\n */\nexport class KioskTransaction {\n\ttransactionBlock: TransactionBlock;\n\tkioskClient: KioskClient;\n\tkiosk?: TransactionObjectArgument;\n\tkioskCap?: TransactionObjectArgument;\n\t// If we're pending `share` of a new kiosk, `finalize()` will share it.\n\t#pendingShare?: boolean;\n\t// If we're pending transferring of the cap, `finalize()` will either error or transfer the cap if it's a new personal.\n\t#pendingTransfer?: boolean;\n\t// The promise that the personalCap will be returned on `finalize()`.\n\t#promise?: TransactionArgument | undefined;\n\t// The personal kiosk argument.\n\t#personalCap?: TransactionObjectArgument;\n\t// A flag that checks whether kiosk TX is finalized.\n\t#finalized: boolean = false;\n\n\tconstructor({ transactionBlock, kioskClient, cap }: KioskTransactionParams) {\n\t\tthis.transactionBlock = transactionBlock;\n\t\tthis.kioskClient = kioskClient;\n\n\t\tif (cap) this.setCap(cap);\n\t}\n\n\t/**\n\t * Creates a kiosk and saves `kiosk` and `kioskOwnerCap` in state.\n\t * Helpful if we want to chain some actions before sharing + transferring the cap to the specified address.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreate() {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.#setPendingStatuses({\n\t\t\tshare: true,\n\t\t\ttransfer: true,\n\t\t});\n\t\tconst [kiosk, cap] = kioskTx.createKiosk(this.transactionBlock);\n\t\tthis.kiosk = kiosk;\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a personal kiosk & shares it.\n\t * The `PersonalKioskCap` is transferred to the signer.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreatePersonal(borrow?: boolean) {\n\t\tthis.#pendingShare = true;\n\t\treturn this.create().convertToPersonal(borrow);\n\t}\n\n\t/**\n\t * Converts a kiosk to a Personal (Soulbound) Kiosk.\n\t * Requires initialization by either calling `ktxb.create()` or `ktxb.setCap()`.\n\t */\n\tconvertToPersonal(borrow?: boolean) {\n\t\tthis.#validateKioskIsSet();\n\n\t\tconst cap = convertToPersonalTx(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tthis.kioskClient.getRulePackageId('personalKioskRulePackageId'),\n\t\t);\n\n\t\t// if we enable `borrow`, we borrow the kioskCap from the cap.\n\t\tif (borrow) this.#borrowFromPersonalCap(cap);\n\t\telse this.#personalCap = cap;\n\n\t\tthis.#setPendingStatuses({ transfer: true });\n\t\treturn this;\n\t}\n\n\t/**\n\t * Single function way to create a kiosk, share it and transfer the cap to the specified address.\n\t */\n\tcreateAndShare(address: string) {\n\t\tthis.#validateFinalizedStatus();\n\t\tconst cap = kioskTx.createKioskAndShare(this.transactionBlock);\n\t\tthis.transactionBlock.transferObjects([cap], this.transactionBlock.pure.address(address));\n\t}\n\n\t/**\n\t * Shares the kiosk.\n\t */\n\tshare() {\n\t\tthis.#validateKioskIsSet();\n\t\tthis.#setPendingStatuses({ share: false });\n\t\tkioskTx.shareKiosk(this.transactionBlock, this.kiosk!);\n\t}\n\n\t/**\n\t * Should be called only after `create` is called.\n\t * It shares the kiosk & transfers the cap to the specified address.\n\t */\n\tshareAndTransferCap(address: string) {\n\t\tif (this.#personalCap)\n\t\t\tthrow new Error('You can only call `shareAndTransferCap` on a non-personal kiosk.');\n\t\tthis.#setPendingStatuses({ transfer: false });\n\t\tthis.share();\n\t\tthis.transactionBlock.transferObjects(\n\t\t\t[this.kioskCap!],\n\t\t\tthis.transactionBlock.pure.address(address),\n\t\t);\n\t}\n\n\t/**\n\t * A function to borrow an item from a kiosk & execute any function with it.\n\t * Example: You could borrow a Fren out of a kiosk, attach an accessory (or mix), and return it.\n\t */\n\tborrowTx({ itemType, itemId }: ItemId, callback: (item: TransactionArgument) => void) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\tcallback(itemObj);\n\n\t\tthis.return({ itemType, item: itemObj, promise });\n\t}\n\n\t/**\n\t * Borrows an item from the kiosk.\n\t * This will fail if the item is listed for sale.\n\t *\n\t * Requires calling `return`.\n\t */\n\tborrow({ itemType, itemId }: ItemId): [TransactionArgument, TransactionArgument] {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\treturn [itemObj, promise];\n\t}\n\n\t/**\n\t * Returns the item back to the kiosk.\n\t * Accepts the parameters returned from the `borrow` function.\n\t */\n\treturn({ itemType, item, promise }: ItemValue & { promise: TransactionArgument }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.returnValue(this.transactionBlock, itemType, this.kiosk!, item, promise);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to withdraw from kiosk\n\t * @param address Where to trasnfer the coin.\n\t * @param amount The amount we aim to withdraw.\n\t */\n\twithdraw(address: string, amount?: string | bigint | number) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst coin = kioskTx.withdrawFromKiosk(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tamount,\n\t\t);\n\t\tthis.transactionBlock.transferObjects([coin], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t */\n\tplace({ itemType, item }: ItemReference) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.place(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk and list it for sale in one transaction.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t * @param price The price in MIST\n\t */\n\tplaceAndList({ itemType, item, price }: ItemReference & Price) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.placeAndList(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to list an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t */\n\tlist({ itemType, itemId, price }: ItemId & { price: string | bigint }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.list(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to delist an item from the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\tdelist({ itemType, itemId }: ItemId) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.delist(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take an item from the kiosk. The transaction won't succeed if the item is listed or locked.\n\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\ttake({ itemType, itemId }: ItemId): TransactionObjectArgument {\n\t\tthis.#validateKioskIsSet();\n\t\treturn kioskTx.take(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t}\n\n\t/**\n\t * Transfer a non-locked/non-listed item to an address.\n\t *\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param address The destination address\n\t */\n\ttransfer({ itemType, itemId, address }: ItemId & { address: string }) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst item = this.take({ itemType, itemId });\n\t\tthis.transactionBlock.transferObjects([item], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take lock an item in the kiosk.\n\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param policy The Policy ID or Transaction Argument for item T\n\t */\n\tlock({ itemType, itemId, policy }: ItemId & { policy: ObjectArgument }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.lock(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, policy, itemId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Purchase an item from a seller's kiosk.\n\t * Returns [item, transferRequest]\n\t * Can be called like: `const [item, transferRequest] = kioskTx.purchase({...})`\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t */\n\tpurchase({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument }): [\n\t\tTransactionObjectArgument,\n\t\tTransactionObjectArgument,\n\t] {\n\t\t// Split the coin for the amount of the listing.\n\t\tconst coin = this.transactionBlock.splitCoins(this.transactionBlock.gas, [\n\t\t\tthis.transactionBlock.pure.u64(price),\n\t\t]);\n\t\treturn kioskTx.purchase(this.transactionBlock, itemType, sellerKiosk, itemId, coin);\n\t}\n\n\t/**\n\t * A function to purchase and resolve a transfer policy.\n\t * If the transfer policy has the `lock` rule, the item is locked in the kiosk.\n\t * Otherwise, the item is placed in the kiosk.\n\t * @param itemType The type of the item\n\t * @param itemId The id of the item\n\t * @param price The price of the specified item\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t * @param extraArgs Used to pass arguments for custom rule resolvers.\n\t */\n\tasync purchaseAndResolve({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t\textraArgs,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument } & PurchaseOptions) {\n\t\tthis.#validateKioskIsSet();\n\t\t// Get a list of the transfer policies.\n\t\tconst policies = await this.kioskClient.getTransferPolicies({ type: itemType });\n\n\t\tif (policies.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`The type ${itemType} doesn't have a Transfer Policy so it can't be traded through kiosk.`,\n\t\t\t);\n\t\t}\n\n\t\tconst policy = policies[0]; // we now pick the first one. We need to add an option to define which one.\n\n\t\t// initialize the purchase `kiosk::purchase`\n\t\tconst [purchasedItem, transferRequest] = this.purchase({\n\t\t\titemType,\n\t\t\titemId,\n\t\t\tprice,\n\t\t\tsellerKiosk,\n\t\t});\n\n\t\tlet canTransferOutsideKiosk = true;\n\n\t\tfor (const rule of policy.rules) {\n\t\t\tconst ruleDefinition = this.kioskClient.rules.find(\n\t\t\t\t(x) => getNormalizedRuleType(x.rule) === getNormalizedRuleType(rule),\n\t\t\t);\n\t\t\tif (!ruleDefinition) throw new Error(`No resolver for the following rule: ${rule}.`);\n\n\t\t\tif (ruleDefinition.hasLockingRule) canTransferOutsideKiosk = false;\n\n\t\t\truleDefinition.resolveRuleFunction({\n\t\t\t\tpackageId: ruleDefinition.packageId,\n\t\t\t\ttransactionBlock: this.transactionBlock,\n\t\t\t\titemType,\n\t\t\t\titemId,\n\t\t\t\tprice: price.toString(),\n\t\t\t\tsellerKiosk,\n\t\t\t\tpolicyId: policy.id,\n\t\t\t\ttransferRequest,\n\t\t\t\tpurchasedItem,\n\t\t\t\tkiosk: this.kiosk!,\n\t\t\t\tkioskCap: this.kioskCap!,\n\t\t\t\textraArgs: extraArgs || {},\n\t\t\t});\n\t\t}\n\n\t\tconfirmRequest(this.transactionBlock, itemType, policy.id, transferRequest);\n\n\t\tif (canTransferOutsideKiosk) this.place({ itemType, item: purchasedItem });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to setup the client using an existing `ownerCap`,\n\t * as return from the `kioskClient.getOwnedKiosks` function.\n\t * @param cap `KioskOwnerCap` object as returned from `getOwnedKiosks` SDK call.\n\t */\n\tsetCap(cap: KioskOwnerCap) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = this.transactionBlock.object(cap.kioskId);\n\t\tif (!cap.isPersonal) {\n\t\t\tthis.kioskCap = this.transactionBlock.object(cap.objectId);\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#borrowFromPersonalCap(cap.objectId);\n\t}\n\n\t/**\n\t *\tA function that ends up the kiosk building txb & returns the `kioskOwnerCap` back to the\n\t * `PersonalKioskCap`, in case we are operating on a personal kiosk.\n\t * \tIt will also share the `kiosk` if it's not shared, and finalize the transfer of the personal cap if it's pending.\n\t */\n\tfinalize() {\n\t\tthis.#validateKioskIsSet();\n\t\t// If we're pending the sharing of the new kiosk, share it.\n\t\tif (this.#pendingShare) this.share();\n\n\t\t// If we're operating on a non-personal kiosk, we don't need to do anything else.\n\t\tif (!this.#personalCap) {\n\t\t\t// If we're pending transfer though, we inform user to call `shareAndTransferCap()`.\n\t\t\tif (this.#pendingTransfer)\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'You need to transfer the `kioskOwnerCap` by calling `shareAndTransferCap()` before wrap',\n\t\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst packageId = this.kioskClient.getRulePackageId('personalKioskRulePackageId');\n\n\t\t// if we have a promise, return the `ownerCap` back to the personal cap.\n\t\tif (this.#promise) {\n\t\t\tthis.transactionBlock.moveCall({\n\t\t\t\ttarget: `${packageId}::personal_kiosk::return_val`,\n\t\t\t\targuments: [\n\t\t\t\t\tthis.#personalCap,\n\t\t\t\t\tthis.transactionBlock.object(this.kioskCap!),\n\t\t\t\t\tthis.#promise!,\n\t\t\t\t],\n\t\t\t});\n\t\t}\n\n\t\t// If we are pending transferring the personalCap, we do it here.\n\t\tif (this.#pendingTransfer)\n\t\t\ttransferPersonalCapTx(this.transactionBlock, this.#personalCap, packageId);\n\n\t\t// Mark the transaction block as finalized, so no other functions can be called.\n\t\tthis.#finalized = true;\n\t}\n\n\t// Some setters in case we want custom behavior.\n\tsetKioskCap(cap: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\tsetKiosk(kiosk: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = kiosk;\n\t\treturn this;\n\t}\n\n\t// Some getters\n\t/*\n\t * Returns the active transaction's kiosk, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKiosk() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kiosk) throw new Error('Kiosk is not set.');\n\t\treturn this.kiosk;\n\t}\n\n\t/*\n\t * Returns the active transaction's kioskOwnerCap, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKioskCap() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kioskCap) throw new Error('Kiosk cap is not set');\n\t\treturn this.kioskCap;\n\t}\n\n\t/**\n\t * A function to borrow from `personalCap`.\n\t */\n\t#borrowFromPersonalCap(personalCap: ObjectArgument) {\n\t\tconst [kioskCap, promise] = this.transactionBlock.moveCall({\n\t\t\ttarget: `${this.kioskClient.getRulePackageId(\n\t\t\t\t'personalKioskRulePackageId',\n\t\t\t)}::personal_kiosk::borrow_val`,\n\t\t\targuments: [this.transactionBlock.object(personalCap)],\n\t\t});\n\n\t\tthis.kioskCap = kioskCap;\n\t\tthis.#personalCap = this.transactionBlock.object(personalCap);\n\t\tthis.#promise = promise;\n\n\t\treturn this;\n\t}\n\n\t#setPendingStatuses({ share, transfer }: { share?: boolean; transfer?: boolean }) {\n\t\tif (transfer !== undefined) this.#pendingTransfer = transfer;\n\t\tif (share !== undefined) this.#pendingShare = share;\n\t}\n\n\t#validateKioskIsSet() {\n\t\tthis.#validateFinalizedStatus();\n\n\t\tif (!this.kiosk || !this.kioskCap)\n\t\t\tthrow new Error(\n\t\t\t\t'You need to initialize the client by either supplying an existing owner cap or by creating a new by calling `.create()`',\n\t\t\t);\n\t}\n\n\t// Validates that `finalize`\n\t#validateFinalizedStatus() {\n\t\tif (this.#finalized)\n\t\t\tthrow new Error(\"You can't add more transactions to a finalized kiosk transaction block.\");\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AASA,YAAY,aAAa;AACzB,SAAS,qBAAqB,6BAA6B;AAC3D,SAAS,sBAAsB;AAU/B,SAAS,6BAA6B;AAqB/B,MAAM,iBAAiB;AAAA,EAgB7B,YAAY,EAAE,kBAAkB,aAAa,IAAI,GAA2B;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tTransactionArgument,\n\tTransactionBlock,\n\tTransactionObjectArgument,\n} from '@mysten/sui.js/transactions';\n\nimport * as kioskTx from '../tx/kiosk.js';\nimport { convertToPersonalTx, transferPersonalCapTx } from '../tx/personal-kiosk.js';\nimport { confirmRequest } from '../tx/transfer-policy.js';\nimport type {\n\tItemId,\n\tItemReference,\n\tItemValue,\n\tKioskOwnerCap,\n\tObjectArgument,\n\tPrice,\n\tPurchaseOptions,\n} from '../types/index.js';\nimport { getNormalizedRuleType } from '../utils.js';\nimport type { KioskClient } from './kiosk-client.js';\n\nexport type KioskTransactionParams = {\n\t/** The TransactionBlock for this run */\n\ttransactionBlock: TransactionBlock;\n\t/**\n\t * You can create a new KioskClient by calling `new KioskClient()`\n\t */\n\tkioskClient: KioskClient;\n\t/**\n\t * You can optionally pass in the `cap` as returned\n\t * from `kioskClient.getOwnedKiosks` when initializing the client\n\t * Otherwise, you can set it by calling `kioskTransaction.setCap()`\n\t */\n\tcap?: KioskOwnerCap;\n};\n\n/**\n * A helper for building transactions that involve kiosk.\n */\nexport class KioskTransaction {\n\ttransactionBlock: TransactionBlock;\n\tkioskClient: KioskClient;\n\tkiosk?: TransactionObjectArgument;\n\tkioskCap?: TransactionObjectArgument;\n\t// If we're pending `share` of a new kiosk, `finalize()` will share it.\n\t#pendingShare?: boolean;\n\t// If we're pending transferring of the cap, `finalize()` will either error or transfer the cap if it's a new personal.\n\t#pendingTransfer?: boolean;\n\t// The promise that the personalCap will be returned on `finalize()`.\n\t#promise?: TransactionArgument | undefined;\n\t// The personal kiosk argument.\n\t#personalCap?: TransactionObjectArgument;\n\t// A flag that checks whether kiosk TX is finalized.\n\t#finalized: boolean = false;\n\n\tconstructor({ transactionBlock, kioskClient, cap }: KioskTransactionParams) {\n\t\tthis.transactionBlock = transactionBlock;\n\t\tthis.kioskClient = kioskClient;\n\n\t\tif (cap) this.setCap(cap);\n\t}\n\n\t/**\n\t * Creates a kiosk and saves `kiosk` and `kioskOwnerCap` in state.\n\t * Helpful if we want to chain some actions before sharing + transferring the cap to the specified address.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreate() {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.#setPendingStatuses({\n\t\t\tshare: true,\n\t\t\ttransfer: true,\n\t\t});\n\t\tconst [kiosk, cap] = kioskTx.createKiosk(this.transactionBlock);\n\t\tthis.kiosk = kiosk;\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a personal kiosk & shares it.\n\t * The `PersonalKioskCap` is transferred to the signer.\n\t * @param borrow If true, the `kioskOwnerCap` is borrowed from the `PersonalKioskCap` to be used in next transactions.\n\t */\n\tcreatePersonal(borrow?: boolean) {\n\t\tthis.#pendingShare = true;\n\t\treturn this.create().convertToPersonal(borrow);\n\t}\n\n\t/**\n\t * Converts a kiosk to a Personal (Soulbound) Kiosk.\n\t * Requires initialization by either calling `ktxb.create()` or `ktxb.setCap()`.\n\t */\n\tconvertToPersonal(borrow?: boolean) {\n\t\tthis.#validateKioskIsSet();\n\n\t\tconst cap = convertToPersonalTx(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tthis.kioskClient.getRulePackageId('personalKioskRulePackageId'),\n\t\t);\n\n\t\t// if we enable `borrow`, we borrow the kioskCap from the cap.\n\t\tif (borrow) this.#borrowFromPersonalCap(cap);\n\t\telse this.#personalCap = cap;\n\n\t\tthis.#setPendingStatuses({ transfer: true });\n\t\treturn this;\n\t}\n\n\t/**\n\t * Single function way to create a kiosk, share it and transfer the cap to the specified address.\n\t */\n\tcreateAndShare(address: string) {\n\t\tthis.#validateFinalizedStatus();\n\t\tconst cap = kioskTx.createKioskAndShare(this.transactionBlock);\n\t\tthis.transactionBlock.transferObjects([cap], this.transactionBlock.pure.address(address));\n\t}\n\n\t/**\n\t * Shares the kiosk.\n\t */\n\tshare() {\n\t\tthis.#validateKioskIsSet();\n\t\tthis.#setPendingStatuses({ share: false });\n\t\tkioskTx.shareKiosk(this.transactionBlock, this.kiosk!);\n\t}\n\n\t/**\n\t * Should be called only after `create` is called.\n\t * It shares the kiosk & transfers the cap to the specified address.\n\t */\n\tshareAndTransferCap(address: string) {\n\t\tif (this.#personalCap)\n\t\t\tthrow new Error('You can only call `shareAndTransferCap` on a non-personal kiosk.');\n\t\tthis.#setPendingStatuses({ transfer: false });\n\t\tthis.share();\n\t\tthis.transactionBlock.transferObjects(\n\t\t\t[this.kioskCap!],\n\t\t\tthis.transactionBlock.pure.address(address),\n\t\t);\n\t}\n\n\t/**\n\t * A function to borrow an item from a kiosk & execute any function with it.\n\t * Example: You could borrow a Fren out of a kiosk, attach an accessory (or mix), and return it.\n\t */\n\tborrowTx({ itemType, itemId }: ItemId, callback: (item: TransactionArgument) => void) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\tcallback(itemObj);\n\n\t\tthis.return({ itemType, item: itemObj, promise });\n\t}\n\n\t/**\n\t * Borrows an item from the kiosk.\n\t * This will fail if the item is listed for sale.\n\t *\n\t * Requires calling `return`.\n\t */\n\tborrow({ itemType, itemId }: ItemId): [TransactionArgument, TransactionArgument] {\n\t\tthis.#validateKioskIsSet();\n\t\tconst [itemObj, promise] = kioskTx.borrowValue(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\titemId,\n\t\t);\n\n\t\treturn [itemObj, promise];\n\t}\n\n\t/**\n\t * Returns the item back to the kiosk.\n\t * Accepts the parameters returned from the `borrow` function.\n\t */\n\treturn({ itemType, item, promise }: ItemValue & { promise: TransactionArgument }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.returnValue(this.transactionBlock, itemType, this.kiosk!, item, promise);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to withdraw from kiosk\n\t * @param address Where to trasnfer the coin.\n\t * @param amount The amount we aim to withdraw.\n\t */\n\twithdraw(address: string, amount?: string | bigint | number) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst coin = kioskTx.withdrawFromKiosk(\n\t\t\tthis.transactionBlock,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tamount,\n\t\t);\n\t\tthis.transactionBlock.transferObjects([coin], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t */\n\tplace({ itemType, item }: ItemReference) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.place(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to place an item in the kiosk and list it for sale in one transaction.\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t * @param price The price in MIST\n\t */\n\tplaceAndList({ itemType, item, price }: ItemReference & Price) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.placeAndList(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, item, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to list an item in the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t */\n\tlist({ itemType, itemId, price }: ItemId & { price: string | bigint }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.list(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId, price);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to delist an item from the kiosk.\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\tdelist({ itemType, itemId }: ItemId) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.delist(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take an item from the kiosk. The transaction won't succeed if the item is listed or locked.\n\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t */\n\ttake({ itemType, itemId }: ItemId): TransactionObjectArgument {\n\t\tthis.#validateKioskIsSet();\n\t\treturn kioskTx.take(this.transactionBlock, itemType, this.kiosk!, this.kioskCap!, itemId);\n\t}\n\n\t/**\n\t * Transfer a non-locked/non-listed item to an address.\n\t *\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param address The destination address\n\t */\n\ttransfer({ itemType, itemId, address }: ItemId & { address: string }) {\n\t\tthis.#validateKioskIsSet();\n\t\tconst item = this.take({ itemType, itemId });\n\t\tthis.transactionBlock.transferObjects([item], this.transactionBlock.pure.address(address));\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to take lock an item in the kiosk.\n\n\t * @param itemType The type `T` of the item\n\t * @param item The ID or Transaction Argument of the item\n\t * @param itemId The ID of the item - Deprecated: Use `item` instead.\n\t * @param policy The Policy ID or Transaction Argument for item T\n\t */\n\tlock({\n\t\titemType,\n\t\titem,\n\t\titemId,\n\t\tpolicy,\n\t}: ItemReference & { policy: ObjectArgument; itemId?: string }) {\n\t\tthis.#validateKioskIsSet();\n\t\tkioskTx.lock(\n\t\t\tthis.transactionBlock,\n\t\t\titemType,\n\t\t\tthis.kiosk!,\n\t\t\tthis.kioskCap!,\n\t\t\tpolicy,\n\t\t\titemId ?? item,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Purchase an item from a seller's kiosk.\n\t * Returns [item, transferRequest]\n\t * Can be called like: `const [item, transferRequest] = kioskTx.purchase({...})`\n\t * @param itemType The type `T` of the item\n\t * @param itemId The ID of the item\n\t * @param price The price in MIST\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t */\n\tpurchase({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument }): [\n\t\tTransactionObjectArgument,\n\t\tTransactionObjectArgument,\n\t] {\n\t\t// Split the coin for the amount of the listing.\n\t\tconst coin = this.transactionBlock.splitCoins(this.transactionBlock.gas, [\n\t\t\tthis.transactionBlock.pure.u64(price),\n\t\t]);\n\t\treturn kioskTx.purchase(this.transactionBlock, itemType, sellerKiosk, itemId, coin);\n\t}\n\n\t/**\n\t * A function to purchase and resolve a transfer policy.\n\t * If the transfer policy has the `lock` rule, the item is locked in the kiosk.\n\t * Otherwise, the item is placed in the kiosk.\n\t * @param itemType The type of the item\n\t * @param itemId The id of the item\n\t * @param price The price of the specified item\n\t * @param sellerKiosk The kiosk which is selling the item. Can be an id or an object argument.\n\t * @param extraArgs Used to pass arguments for custom rule resolvers.\n\t */\n\tasync purchaseAndResolve({\n\t\titemType,\n\t\titemId,\n\t\tprice,\n\t\tsellerKiosk,\n\t\textraArgs,\n\t}: ItemId & Price & { sellerKiosk: ObjectArgument } & PurchaseOptions) {\n\t\tthis.#validateKioskIsSet();\n\t\t// Get a list of the transfer policies.\n\t\tconst policies = await this.kioskClient.getTransferPolicies({ type: itemType });\n\n\t\tif (policies.length === 0) {\n\t\t\tthrow new Error(\n\t\t\t\t`The type ${itemType} doesn't have a Transfer Policy so it can't be traded through kiosk.`,\n\t\t\t);\n\t\t}\n\n\t\tconst policy = policies[0]; // we now pick the first one. We need to add an option to define which one.\n\n\t\t// initialize the purchase `kiosk::purchase`\n\t\tconst [purchasedItem, transferRequest] = this.purchase({\n\t\t\titemType,\n\t\t\titemId,\n\t\t\tprice,\n\t\t\tsellerKiosk,\n\t\t});\n\n\t\tlet canTransferOutsideKiosk = true;\n\n\t\tfor (const rule of policy.rules) {\n\t\t\tconst ruleDefinition = this.kioskClient.rules.find(\n\t\t\t\t(x) => getNormalizedRuleType(x.rule) === getNormalizedRuleType(rule),\n\t\t\t);\n\t\t\tif (!ruleDefinition) throw new Error(`No resolver for the following rule: ${rule}.`);\n\n\t\t\tif (ruleDefinition.hasLockingRule) canTransferOutsideKiosk = false;\n\n\t\t\truleDefinition.resolveRuleFunction({\n\t\t\t\tpackageId: ruleDefinition.packageId,\n\t\t\t\ttransactionBlock: this.transactionBlock,\n\t\t\t\titemType,\n\t\t\t\titemId,\n\t\t\t\tprice: price.toString(),\n\t\t\t\tsellerKiosk,\n\t\t\t\tpolicyId: policy.id,\n\t\t\t\ttransferRequest,\n\t\t\t\tpurchasedItem,\n\t\t\t\tkiosk: this.kiosk!,\n\t\t\t\tkioskCap: this.kioskCap!,\n\t\t\t\textraArgs: extraArgs || {},\n\t\t\t});\n\t\t}\n\n\t\tconfirmRequest(this.transactionBlock, itemType, policy.id, transferRequest);\n\n\t\tif (canTransferOutsideKiosk) this.place({ itemType, item: purchasedItem });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * A function to setup the client using an existing `ownerCap`,\n\t * as return from the `kioskClient.getOwnedKiosks` function.\n\t * @param cap `KioskOwnerCap` object as returned from `getOwnedKiosks` SDK call.\n\t */\n\tsetCap(cap: KioskOwnerCap) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = this.transactionBlock.object(cap.kioskId);\n\t\tif (!cap.isPersonal) {\n\t\t\tthis.kioskCap = this.transactionBlock.object(cap.objectId);\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#borrowFromPersonalCap(cap.objectId);\n\t}\n\n\t/**\n\t *\tA function that ends up the kiosk building txb & returns the `kioskOwnerCap` back to the\n\t * `PersonalKioskCap`, in case we are operating on a personal kiosk.\n\t * \tIt will also share the `kiosk` if it's not shared, and finalize the transfer of the personal cap if it's pending.\n\t */\n\tfinalize() {\n\t\tthis.#validateKioskIsSet();\n\t\t// If we're pending the sharing of the new kiosk, share it.\n\t\tif (this.#pendingShare) this.share();\n\n\t\t// If we're operating on a non-personal kiosk, we don't need to do anything else.\n\t\tif (!this.#personalCap) {\n\t\t\t// If we're pending transfer though, we inform user to call `shareAndTransferCap()`.\n\t\t\tif (this.#pendingTransfer)\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'You need to transfer the `kioskOwnerCap` by calling `shareAndTransferCap()` before wrap',\n\t\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst packageId = this.kioskClient.getRulePackageId('personalKioskRulePackageId');\n\n\t\t// if we have a promise, return the `ownerCap` back to the personal cap.\n\t\tif (this.#promise) {\n\t\t\tthis.transactionBlock.moveCall({\n\t\t\t\ttarget: `${packageId}::personal_kiosk::return_val`,\n\t\t\t\targuments: [\n\t\t\t\t\tthis.#personalCap,\n\t\t\t\t\tthis.transactionBlock.object(this.kioskCap!),\n\t\t\t\t\tthis.#promise!,\n\t\t\t\t],\n\t\t\t});\n\t\t}\n\n\t\t// If we are pending transferring the personalCap, we do it here.\n\t\tif (this.#pendingTransfer)\n\t\t\ttransferPersonalCapTx(this.transactionBlock, this.#personalCap, packageId);\n\n\t\t// Mark the transaction block as finalized, so no other functions can be called.\n\t\tthis.#finalized = true;\n\t}\n\n\t// Some setters in case we want custom behavior.\n\tsetKioskCap(cap: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kioskCap = cap;\n\t\treturn this;\n\t}\n\n\tsetKiosk(kiosk: TransactionObjectArgument) {\n\t\tthis.#validateFinalizedStatus();\n\t\tthis.kiosk = kiosk;\n\t\treturn this;\n\t}\n\n\t// Some getters\n\t/*\n\t * Returns the active transaction's kiosk, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKiosk() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kiosk) throw new Error('Kiosk is not set.');\n\t\treturn this.kiosk;\n\t}\n\n\t/*\n\t * Returns the active transaction's kioskOwnerCap, or undefined if `setCap` or `create()` hasn't been called yet.\n\t */\n\tgetKioskCap() {\n\t\tthis.#validateFinalizedStatus();\n\t\tif (!this.kioskCap) throw new Error('Kiosk cap is not set');\n\t\treturn this.kioskCap;\n\t}\n\n\t/**\n\t * A function to borrow from `personalCap`.\n\t */\n\t#borrowFromPersonalCap(personalCap: ObjectArgument) {\n\t\tconst [kioskCap, promise] = this.transactionBlock.moveCall({\n\t\t\ttarget: `${this.kioskClient.getRulePackageId(\n\t\t\t\t'personalKioskRulePackageId',\n\t\t\t)}::personal_kiosk::borrow_val`,\n\t\t\targuments: [this.transactionBlock.object(personalCap)],\n\t\t});\n\n\t\tthis.kioskCap = kioskCap;\n\t\tthis.#personalCap = this.transactionBlock.object(personalCap);\n\t\tthis.#promise = promise;\n\n\t\treturn this;\n\t}\n\n\t#setPendingStatuses({ share, transfer }: { share?: boolean; transfer?: boolean }) {\n\t\tif (transfer !== undefined) this.#pendingTransfer = transfer;\n\t\tif (share !== undefined) this.#pendingShare = share;\n\t}\n\n\t#validateKioskIsSet() {\n\t\tthis.#validateFinalizedStatus();\n\n\t\tif (!this.kiosk || !this.kioskCap)\n\t\t\tthrow new Error(\n\t\t\t\t'You need to initialize the client by either supplying an existing owner cap or by creating a new by calling `.create()`',\n\t\t\t);\n\t}\n\n\t// Validates that `finalize`\n\t#validateFinalizedStatus() {\n\t\tif (this.#finalized)\n\t\t\tthrow new Error(\"You can't add more transactions to a finalized kiosk transaction block.\");\n\t}\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../bcs/dist/cjs/b58.d.ts","../../bcs/dist/cjs/b64.d.ts","../../bcs/dist/cjs/reader.d.ts","../../bcs/dist/cjs/types.d.ts","../../bcs/dist/cjs/writer.d.ts","../../bcs/dist/cjs/bcs-type.d.ts","../../bcs/dist/cjs/bcs.d.ts","../../bcs/dist/cjs/hex.d.ts","../../bcs/dist/cjs/utils.d.ts","../../bcs/dist/cjs/legacy-registry.d.ts","../../bcs/dist/cjs/index.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/error.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/utils.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/struct.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/coercions.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/refinements.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/types.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/utilities.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/index.d.ts","../../typescript/dist/cjs/types/common.d.ts","../../typescript/dist/cjs/types/objects.d.ts","../../typescript/dist/cjs/bcs/type-tag-serializer.d.ts","../../typescript/dist/cjs/bcs/index.d.ts","../../typescript/dist/cjs/client/rpc-websocket-client.d.ts","../../typescript/dist/cjs/client/http-transport.d.ts","../../typescript/dist/cjs/client/network.d.ts","../../typescript/dist/cjs/client/types/generated.d.ts","../../typescript/dist/cjs/client/types/chain.d.ts","../../typescript/dist/cjs/client/types/coins.d.ts","../../typescript/dist/cjs/client/types/common.d.ts","../../typescript/dist/cjs/client/types/changes.d.ts","../../typescript/dist/cjs/cryptography/intent.d.ts","../../typescript/dist/cjs/cryptography/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature-scheme.d.ts","../../typescript/dist/cjs/multisig/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature.d.ts","../../typescript/dist/cjs/cryptography/mnemonics.d.ts","../../typescript/dist/cjs/cryptography/keypair.d.ts","../../typescript/dist/cjs/cryptography/index.d.ts","../../typescript/dist/cjs/types/normalized.d.ts","../../typescript/dist/cjs/types/index.d.ts","../../typescript/dist/cjs/builder/Inputs.d.ts","../../typescript/dist/cjs/builder/Transactions.d.ts","../../typescript/dist/cjs/builder/pure.d.ts","../../typescript/dist/cjs/builder/TransactionBlockData.d.ts","../../typescript/dist/cjs/builder/TransactionBlock.d.ts","../../typescript/dist/cjs/builder/serializer.d.ts","../../typescript/dist/cjs/builder/bcs.d.ts","../../typescript/dist/cjs/builder/index.d.ts","../../typescript/dist/cjs/client/types/params.d.ts","../../typescript/dist/cjs/client/types/index.d.ts","../../typescript/dist/cjs/client/client.d.ts","../../typescript/dist/cjs/client/errors.d.ts","../../typescript/dist/cjs/client/index.d.ts","../../typescript/dist/cjs/builder/export.d.ts","../src/tx/kiosk.ts","../src/tx/rules/resolve.ts","../src/constants.ts","../src/types/kiosk.ts","../src/types/transfer-policy.ts","../src/types/index.ts","../src/bcs.ts","../../typescript/dist/cjs/utils/format.d.ts","../../typescript/dist/cjs/utils/sui-types.d.ts","../../typescript/dist/cjs/utils/index.d.ts","../src/utils.ts","../src/query/kiosk.ts","../src/query/transfer-policy.ts","../src/client/kiosk-client.ts","../src/tx/rules/attach.ts","../src/tx/transfer-policy.ts","../src/client/tp-transaction.ts","../src/tx/personal-kiosk.ts","../src/client/kiosk-transaction.ts","../src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"b304a0dbc45734f46afbc75f40510b68f8c8575ef0b5cb8cd3e9b1e91bf1e169","5354a072b3ac903eb7fd90335dc277df9c1f41c650ddb495e7d3837870ce8f37","ec95aac5334a7f581ca3703334d605fd099255c4e7ae6cc0f758a8a61bd2583d","d312a279203f83e7dc60d23135820fd4c3b93a6f5b7f4aba6780c3e99e02dcc1","763bfc2a8911c4b6e4b81bf60b129d194d5db024609bf8f26b65e163e9e1552b","279945d96a86deee3252f9587af1013eca5027d6989c11da3e0e109f73b7064d","860ce8146a712fc5d88bfc6c3a2b8f6b835238a8009941b306871663ee920ebe","da0d6e82a836d320b4aedffcdbeda8444263533483ec4fc36a188da9995beee8","877a5f022af5433e1e2d9aeecfb92e35d10635812cec615c4b64fc16234201c7","15d652995d4fc8b2b019cdf0c14f424a536cfba2acedceed14bceab4c46ddc9f","1047322d9c62521bf58c817ad4579730e394f284e848d7e7e52199a2fc057920","5041d1e151f77eb97f762c51fade8d268f271de2f8b165b050e7caa4b7f8c4bd","0296071bdd869379505de371c04065cc68ddfb9564d6b75cda2373b0130bf57f","00cac821c5c6466146321dc8192f48c84d9f7c321f862b9a4a01a6a832ce6a2f","c6eff85f66b05eba0a5af516cfa2e7ce0c6d2a2cc71bc4c543915c823cea9ce8","434272013d17121b677ec280c2309b16442cd47060af926d1deba5a00fa26856","b55144428bf4cdc9d7f5027035b45e165feb6064538a06339aa3d7186aead0fb","0c7192e40da80243d167d93fd23c11d2efba22dc27fda3602d99889ed02ade86","0706139fea91b191554d605cc00192d295832707c54782c14b2e770f84786576","7a66b004fbf03f4388a4b1cab9c56e8d7783cde6dffe11740b4d4a5fd8ea2962","40f629bb8dbdcca0d098f515980fe12d8c3d8016e5f171f5974dc3a365d124dc","a7ac1b038e5708a8146a6a033a325f578c579e4a9ca33ea370dc71f08e4cf412","617149ab95b9af0071b7f97d6eab5a329818c2e00c27f07819ec4d07be9eff05","6d68d23b4426718f335edcb10a26ffa873d155a4d6678f3660f36f4df5ea5a73","672f2984ea0180d19d72c3b49cd90a4a4f0f98e511f6aa01248168217c8add1d","3ac7c43ef8ba2fbcaade1891039ed9b74cb3f40219360495b939c868f93db28d","a295bd6c1e044b63f35bd1c2a0bd6311712fb88d1107a1fc3e0695279dacf022","964bd6aefed84b3c9fb3b69a48dee86b7700dc79a6976db75e38ebdcb71a34e4","7142789577fd90bacde1a3d92ed9da5c86c25b2d5deace47e0ebfb32eaa4e5de","17e850a4aa91db529a27a63ab8c1060c1dc2bab9e59c2e15f92b27b23222a370","e07d4eac48bb68fe5fa8dc50136d2c0e494302f1d514e9bc8bbb49d676536f5d","8e92292bc3805f96d1988c3548dab65d3b941e7c975b4cdb76c8b50eef815152","4f77dc3fb5c167d70a3381ed6f0460e225cdcd1e92e57cf0561c1dbbf4b1d06b","85f34d2bd3cf830bd6eaf365f00a87399c63e056ea887d10a13fe2a426174c1b","6e2b929b96c3c3b9085dd03a1cb48b820d5cddd7d533e12c167d5efdcd3ecb94","3751bfdb6089fc635ac6670517387aaf0049f99c9b9bbb1cda7722a5ada6c126","eb3671ec7a51c0e20962ba24be3fd7a41919455739c123e774d5dd5f125eec25","fa4db2dc803d0eb7e08346318c9a7d21677f8cf98d462cfd0a6a12c8cfb31c92","6673741ec24a5e5dacd4e34642fd04246521b85ad5816447a359f941a3868337","4f32a56579111f4bae35cd512deb712e6c7e54d6166419efd950f906cfbb3bb9","4c91be8d873064981e9f0a16a4e30c54292cddf9c13cb71eed6e0d76eb8b75b4","d4a4aaaa115b2ff81485fd51383254e9726a9aed3032af71f6eae0cbb0b1d7ea","90342db9643b8f88b334cd9ce8ad8b952dd7c947162940c54baac6581db62fbf","9a1da17eba055daf804d9bc61805961f6cbd6265a10ab33d53293415462464a6","09848148e7d9056992861396dfd15807e66f62196483a85640141157f87e3e62","b1a0fcbf76ed96379e3757a44eec4f2de164e7018085933d14924e8c6de13df2","5f9226e66cd6358f5a9f82cb46ec091bacdd535d220e50e6af0f800e1dd0d2b8","143d16563c5b476d29ad8429d9cc65290bb20244bbe5fad6803252cfd36fa1cb","4d9edaa343cccb6138f68fe1ea88d6bb8915473442ed14dd3ac209260c8337b0","0770502837dc34fc1da48dab57a6bff1f3fcf97576990a7f58f49a359d6c57b5","1cc19398cebbcda80c612f0989bd1dc124097914402fa315fd2e2595b69812d9","2a4bf44344fddabb3095ca3a57582209fa7cb6cc7486f7ec8fe09008c1cc576b","fef1dcd2d08e4fa2d4617499beb25162894ecebf9032ea2037a7e4e33d896eb9","5d6243442242f523d700101991a98c94b97a82f5ea7cfea4506881eeae5712ed","a92eb3a0db5b455d6350b2fb6f23593721ebe6af71f7f442d0b2b0e8f36830ae",{"version":"b2456beac00d2e3270ec892a3205358a07b3219a6368ed7c5da2c02c3325c2f4","signature":"7181fe29fa26260e4b32fcb9663df64499302c52153ffd448e224f1becb84521"},{"version":"dee0e9c574a1ec00681eb5c0e9aee2364cb8f177a74e6148e48556d46b46fa6f","signature":"11eb9418df601a8fdc8c8dbd61290c6bd95d6fb6fcbef4d47cb6b391103e8267"},{"version":"a11de17a9d374b0692ba4e5213a188047ec315e5d8a936b4b67c1af70ecf794a","signature":"a06f84567ded23e0b70480e61559acddb6ba32aab20c3fa5b549415a049df701"},{"version":"b1ac353ea3e3384975f528e964792bff9df1de29350764739b7bd83f4c559e1a","signature":"07b032114c6aef058c3267e82e5d4678c9ab1dbff743f1d3375baff2aa7d0248"},{"version":"cba4eed95ee9fa85ba0e0cdc7534569db7941f5d6f8198600395e02da9a73345","signature":"bf8987544198b8d44386c5af2720e16f2f590ca2330ac5e25d177c7004a9e1d2"},{"version":"17a906aa9cdea01ce158d87e8f191f28392daf1eb7f5a957906e92171c4e877f","signature":"b33851ce6a5d8ea09c539babd3b74bc3899a1d614d023505217b345a208bb81d"},{"version":"ed303ce7224a274b11cc03f557ad71e9292c10ba81786e4f0134d43d7dfbfe2b","signature":"f8c195f36b2651e649c0bc45c77128026bde3233001c53bda8a201439630f742"},"ddc8c232a5b14c7cb91899a5c5fc74b798a441de0d6816eca6ef622f4100460c","8f57cd17e3be015f1ec2ee98b7573c1befea707f730d5601fac4c4b3ceec0ff3","4333858c2567f4031499dffa613ba53dcf8b0588cc5df9776bc494fe01773276",{"version":"9df7f206246aa6aa16b603452bf85fb76fe5c08f3e88c44011d5a4368cd251d7","signature":"e4d8351aaad89913ae180018e99593588e526f58f741c6963da2f4b92299512e"},{"version":"eddaa909a3b790c1a5cb2cf0e1d8f7135af2a3fe7e1749980ce9efb07750a5ba","signature":"92a2680ff92291f4a2f93fcd68acb7409c8d0947d9f7ef17c002e9c7aa264ca6"},{"version":"8348706b60fc71b1a0da5023469b12a5484d143f1e4b683f5e01c745d1161881","signature":"0bcdc67f527270f768c98165753510f358c2a01d0f736a2cd8170f812a8782d7"},{"version":"1abfb2eb04fdc8f1067ef47160703e053b42780e0146b311f4464a113bf891c2","signature":"d2dd7368a1ed745a8b762aa16c1dea8deb2bfbab4c6bcea8ee036103ae787af2"},{"version":"dc529ede1fd7017889041ef23b309ac3714648a051b7b5232d25254497a5996e","signature":"a340ea35c84fd6a151c7477853d040da3116aab52d5043a2291d7f5f630f4831"},{"version":"2efae43d083c4617ae8f9c3b02a568ed7e12e9edcf8593cfe1cda8e15b8dba7f","signature":"2b61452148dad69c51800c1422bc30a447d37bfdde5658f24072ee5ad97a5926"},{"version":"bca253c1c50ff881d0895236ac8272769a3afe08de57eb6e0d5b89f1539ae39a","signature":"c8d57022572064609db955efc3893a29571e8bad04a0e7b94ed860f13c051839"},{"version":"97daab1b71f6cb50f7503cc2afe0660018d6b66ff4877ba769b60dee4761b8c8","signature":"d919ac8928be2c448de8e20a5dc89fc2aca06a42f1c35d68446ed7189801408e"},{"version":"0a52a549b661cae9cab25c11b59051f05578a8c9fa036fbe53d4dedf979192c2","signature":"c65cc07d2303719d2e22ec74a5025448f28cb82aa7718a0330586f413b3bbcb6"},{"version":"5d41a3ea79cc33b761340019fa537f1a8ccc7f62ad12612570f16069f4dd21c4","signature":"6ea60168b0cbacd112c0b64be4589e4491593dbacb6f5319b900cf94aa5ea9b2"}],"root":[[116,122],[126,135]],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"fileIdsList":[[72,74,75,76,77,78],[72,73],[74],[73,74],[72,74],[63,65],[64,66],[61,62,63,64,65,66,67,68,69,70],[63,64,65,66],[66],[64],[83,121],[114,118,121,127,128],[115,116,121,126,129,131,133],[115,121,129,130,131],[117,121],[118,121,126,129,132,134],[114,121,125,126],[114,121,122,125,126],[83,115,121],[115,121],[116,121],[114,115,118,119,120],[114,115,121],[114,121,122,125],[64,71,81,82],[83],[71,79,83,101],[71,83,99,101,102,103,104,105,114],[79,83,103],[79,83],[71],[102,103,106,107],[102,103,106,107,108],[71,103],[114],[85,99,109,111],[84],[85,86,111,112,113],[87],[87,88,89,90,91,110],[87,109],[92,93,94,96,97,98],[92,93,94,96],[92,99],[93,94,95],[93,94,96],[81,100],[79],[79,80],[71,79,123,124],[114,118,119,120,121],[115,121,129],[121],[114,121]],"referencedMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,12],[129,13],[134,14],[132,15],[118,16],[135,17],[127,18],[128,19],[116,20],[133,21],[130,21],[117,22],[131,20],[121,23],[119,24],[120,24],[126,25],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"exportedModulesMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,27],[129,52],[134,53],[132,53],[118,54],[135,17],[127,55],[128,55],[116,21],[133,21],[130,21],[117,54],[131,21],[121,23],[119,24],[120,24],[126,55],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"semanticDiagnosticsPerFile":[72,79,74,75,76,77,78,73,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,61,62,66,67,68,71,70,63,64,69,65,122,129,134,132,118,135,127,128,116,133,130,117,131,121,119,120,126,83,82,102,106,105,103,108,115,109,104,107,112,113,85,114,86,84,88,91,89,90,87,111,110,99,92,98,97,93,94,96,95,80,101,100,81,123,125,124],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.1.6"}
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../bcs/dist/cjs/b58.d.ts","../../bcs/dist/cjs/b64.d.ts","../../bcs/dist/cjs/reader.d.ts","../../bcs/dist/cjs/types.d.ts","../../bcs/dist/cjs/writer.d.ts","../../bcs/dist/cjs/bcs-type.d.ts","../../bcs/dist/cjs/bcs.d.ts","../../bcs/dist/cjs/hex.d.ts","../../bcs/dist/cjs/utils.d.ts","../../bcs/dist/cjs/legacy-registry.d.ts","../../bcs/dist/cjs/index.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/error.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/utils.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/struct.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/coercions.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/refinements.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/types.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/utilities.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/index.d.ts","../../typescript/dist/cjs/types/common.d.ts","../../typescript/dist/cjs/types/objects.d.ts","../../typescript/dist/cjs/bcs/type-tag-serializer.d.ts","../../typescript/dist/cjs/bcs/index.d.ts","../../typescript/dist/cjs/client/rpc-websocket-client.d.ts","../../typescript/dist/cjs/client/http-transport.d.ts","../../typescript/dist/cjs/client/network.d.ts","../../typescript/dist/cjs/client/types/generated.d.ts","../../typescript/dist/cjs/client/types/chain.d.ts","../../typescript/dist/cjs/client/types/coins.d.ts","../../typescript/dist/cjs/client/types/common.d.ts","../../typescript/dist/cjs/client/types/changes.d.ts","../../typescript/dist/cjs/cryptography/intent.d.ts","../../typescript/dist/cjs/cryptography/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature-scheme.d.ts","../../typescript/dist/cjs/multisig/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature.d.ts","../../typescript/dist/cjs/cryptography/mnemonics.d.ts","../../typescript/dist/cjs/cryptography/keypair.d.ts","../../typescript/dist/cjs/cryptography/index.d.ts","../../typescript/dist/cjs/types/normalized.d.ts","../../typescript/dist/cjs/types/index.d.ts","../../typescript/dist/cjs/builder/Inputs.d.ts","../../typescript/dist/cjs/builder/Transactions.d.ts","../../typescript/dist/cjs/builder/pure.d.ts","../../typescript/dist/cjs/builder/TransactionBlockData.d.ts","../../typescript/dist/cjs/builder/TransactionBlock.d.ts","../../typescript/dist/cjs/builder/serializer.d.ts","../../typescript/dist/cjs/builder/bcs.d.ts","../../typescript/dist/cjs/builder/index.d.ts","../../typescript/dist/cjs/client/types/params.d.ts","../../typescript/dist/cjs/client/types/index.d.ts","../../typescript/dist/cjs/client/client.d.ts","../../typescript/dist/cjs/client/errors.d.ts","../../typescript/dist/cjs/client/index.d.ts","../../typescript/dist/cjs/builder/export.d.ts","../src/tx/kiosk.ts","../src/tx/rules/resolve.ts","../src/constants.ts","../src/types/kiosk.ts","../src/types/transfer-policy.ts","../src/types/index.ts","../src/bcs.ts","../../typescript/dist/cjs/utils/format.d.ts","../../typescript/dist/cjs/utils/sui-types.d.ts","../../typescript/dist/cjs/utils/index.d.ts","../src/utils.ts","../src/query/kiosk.ts","../src/query/transfer-policy.ts","../src/client/kiosk-client.ts","../src/tx/rules/attach.ts","../src/tx/transfer-policy.ts","../src/client/tp-transaction.ts","../src/tx/personal-kiosk.ts","../src/client/kiosk-transaction.ts","../src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"b304a0dbc45734f46afbc75f40510b68f8c8575ef0b5cb8cd3e9b1e91bf1e169","b0968fa9dabd4a0a1dd69a53f2c3f5a458d71e6374bd80139c3616d839171c65","ec95aac5334a7f581ca3703334d605fd099255c4e7ae6cc0f758a8a61bd2583d","d312a279203f83e7dc60d23135820fd4c3b93a6f5b7f4aba6780c3e99e02dcc1","763bfc2a8911c4b6e4b81bf60b129d194d5db024609bf8f26b65e163e9e1552b","279945d96a86deee3252f9587af1013eca5027d6989c11da3e0e109f73b7064d","860ce8146a712fc5d88bfc6c3a2b8f6b835238a8009941b306871663ee920ebe","da0d6e82a836d320b4aedffcdbeda8444263533483ec4fc36a188da9995beee8","877a5f022af5433e1e2d9aeecfb92e35d10635812cec615c4b64fc16234201c7","15d652995d4fc8b2b019cdf0c14f424a536cfba2acedceed14bceab4c46ddc9f","1047322d9c62521bf58c817ad4579730e394f284e848d7e7e52199a2fc057920","5041d1e151f77eb97f762c51fade8d268f271de2f8b165b050e7caa4b7f8c4bd","0296071bdd869379505de371c04065cc68ddfb9564d6b75cda2373b0130bf57f","00cac821c5c6466146321dc8192f48c84d9f7c321f862b9a4a01a6a832ce6a2f","c6eff85f66b05eba0a5af516cfa2e7ce0c6d2a2cc71bc4c543915c823cea9ce8","434272013d17121b677ec280c2309b16442cd47060af926d1deba5a00fa26856","b55144428bf4cdc9d7f5027035b45e165feb6064538a06339aa3d7186aead0fb","0c7192e40da80243d167d93fd23c11d2efba22dc27fda3602d99889ed02ade86","0706139fea91b191554d605cc00192d295832707c54782c14b2e770f84786576","7a66b004fbf03f4388a4b1cab9c56e8d7783cde6dffe11740b4d4a5fd8ea2962","40f629bb8dbdcca0d098f515980fe12d8c3d8016e5f171f5974dc3a365d124dc","a7ac1b038e5708a8146a6a033a325f578c579e4a9ca33ea370dc71f08e4cf412","617149ab95b9af0071b7f97d6eab5a329818c2e00c27f07819ec4d07be9eff05","6d68d23b4426718f335edcb10a26ffa873d155a4d6678f3660f36f4df5ea5a73","672f2984ea0180d19d72c3b49cd90a4a4f0f98e511f6aa01248168217c8add1d","3ac7c43ef8ba2fbcaade1891039ed9b74cb3f40219360495b939c868f93db28d","a295bd6c1e044b63f35bd1c2a0bd6311712fb88d1107a1fc3e0695279dacf022","964bd6aefed84b3c9fb3b69a48dee86b7700dc79a6976db75e38ebdcb71a34e4","7142789577fd90bacde1a3d92ed9da5c86c25b2d5deace47e0ebfb32eaa4e5de","17e850a4aa91db529a27a63ab8c1060c1dc2bab9e59c2e15f92b27b23222a370","e07d4eac48bb68fe5fa8dc50136d2c0e494302f1d514e9bc8bbb49d676536f5d","8e92292bc3805f96d1988c3548dab65d3b941e7c975b4cdb76c8b50eef815152","4f77dc3fb5c167d70a3381ed6f0460e225cdcd1e92e57cf0561c1dbbf4b1d06b","85f34d2bd3cf830bd6eaf365f00a87399c63e056ea887d10a13fe2a426174c1b","6e2b929b96c3c3b9085dd03a1cb48b820d5cddd7d533e12c167d5efdcd3ecb94","3751bfdb6089fc635ac6670517387aaf0049f99c9b9bbb1cda7722a5ada6c126","eb3671ec7a51c0e20962ba24be3fd7a41919455739c123e774d5dd5f125eec25","4d1242909df21c651da7a29db77f0f497f9865e1876967254cba5810fd15c234","47ff7f29fe14ea5b000b7f2f3526e18c73292cc00d963f3caf09240e1202ec1b","4f32a56579111f4bae35cd512deb712e6c7e54d6166419efd950f906cfbb3bb9","4c91be8d873064981e9f0a16a4e30c54292cddf9c13cb71eed6e0d76eb8b75b4","d4a4aaaa115b2ff81485fd51383254e9726a9aed3032af71f6eae0cbb0b1d7ea","90342db9643b8f88b334cd9ce8ad8b952dd7c947162940c54baac6581db62fbf","9a1da17eba055daf804d9bc61805961f6cbd6265a10ab33d53293415462464a6","09848148e7d9056992861396dfd15807e66f62196483a85640141157f87e3e62","b534d56449d6b7105e1ff91103f405bf9ed139be6ba111ddc5fb445059da63c5","5f9226e66cd6358f5a9f82cb46ec091bacdd535d220e50e6af0f800e1dd0d2b8","143d16563c5b476d29ad8429d9cc65290bb20244bbe5fad6803252cfd36fa1cb","4d9edaa343cccb6138f68fe1ea88d6bb8915473442ed14dd3ac209260c8337b0","0770502837dc34fc1da48dab57a6bff1f3fcf97576990a7f58f49a359d6c57b5","1cc19398cebbcda80c612f0989bd1dc124097914402fa315fd2e2595b69812d9","1ce19fcaa9511f1489a39b8d24c8f122d1b44ef20b2db777529033331ce7d492","fef1dcd2d08e4fa2d4617499beb25162894ecebf9032ea2037a7e4e33d896eb9","5d6243442242f523d700101991a98c94b97a82f5ea7cfea4506881eeae5712ed","a92eb3a0db5b455d6350b2fb6f23593721ebe6af71f7f442d0b2b0e8f36830ae",{"version":"b2456beac00d2e3270ec892a3205358a07b3219a6368ed7c5da2c02c3325c2f4","signature":"7181fe29fa26260e4b32fcb9663df64499302c52153ffd448e224f1becb84521"},{"version":"dee0e9c574a1ec00681eb5c0e9aee2364cb8f177a74e6148e48556d46b46fa6f","signature":"11eb9418df601a8fdc8c8dbd61290c6bd95d6fb6fcbef4d47cb6b391103e8267"},{"version":"a11de17a9d374b0692ba4e5213a188047ec315e5d8a936b4b67c1af70ecf794a","signature":"a06f84567ded23e0b70480e61559acddb6ba32aab20c3fa5b549415a049df701"},{"version":"b1ac353ea3e3384975f528e964792bff9df1de29350764739b7bd83f4c559e1a","signature":"07b032114c6aef058c3267e82e5d4678c9ab1dbff743f1d3375baff2aa7d0248"},{"version":"cba4eed95ee9fa85ba0e0cdc7534569db7941f5d6f8198600395e02da9a73345","signature":"bf8987544198b8d44386c5af2720e16f2f590ca2330ac5e25d177c7004a9e1d2"},{"version":"17a906aa9cdea01ce158d87e8f191f28392daf1eb7f5a957906e92171c4e877f","signature":"b33851ce6a5d8ea09c539babd3b74bc3899a1d614d023505217b345a208bb81d"},{"version":"ed303ce7224a274b11cc03f557ad71e9292c10ba81786e4f0134d43d7dfbfe2b","signature":"f8c195f36b2651e649c0bc45c77128026bde3233001c53bda8a201439630f742"},"ddc8c232a5b14c7cb91899a5c5fc74b798a441de0d6816eca6ef622f4100460c","8f57cd17e3be015f1ec2ee98b7573c1befea707f730d5601fac4c4b3ceec0ff3","4333858c2567f4031499dffa613ba53dcf8b0588cc5df9776bc494fe01773276",{"version":"9df7f206246aa6aa16b603452bf85fb76fe5c08f3e88c44011d5a4368cd251d7","signature":"e4d8351aaad89913ae180018e99593588e526f58f741c6963da2f4b92299512e"},{"version":"eddaa909a3b790c1a5cb2cf0e1d8f7135af2a3fe7e1749980ce9efb07750a5ba","signature":"92a2680ff92291f4a2f93fcd68acb7409c8d0947d9f7ef17c002e9c7aa264ca6"},{"version":"8348706b60fc71b1a0da5023469b12a5484d143f1e4b683f5e01c745d1161881","signature":"0bcdc67f527270f768c98165753510f358c2a01d0f736a2cd8170f812a8782d7"},{"version":"1abfb2eb04fdc8f1067ef47160703e053b42780e0146b311f4464a113bf891c2","signature":"d2dd7368a1ed745a8b762aa16c1dea8deb2bfbab4c6bcea8ee036103ae787af2"},{"version":"dc529ede1fd7017889041ef23b309ac3714648a051b7b5232d25254497a5996e","signature":"a340ea35c84fd6a151c7477853d040da3116aab52d5043a2291d7f5f630f4831"},{"version":"2efae43d083c4617ae8f9c3b02a568ed7e12e9edcf8593cfe1cda8e15b8dba7f","signature":"2b61452148dad69c51800c1422bc30a447d37bfdde5658f24072ee5ad97a5926"},{"version":"bca253c1c50ff881d0895236ac8272769a3afe08de57eb6e0d5b89f1539ae39a","signature":"c8d57022572064609db955efc3893a29571e8bad04a0e7b94ed860f13c051839"},{"version":"97daab1b71f6cb50f7503cc2afe0660018d6b66ff4877ba769b60dee4761b8c8","signature":"d919ac8928be2c448de8e20a5dc89fc2aca06a42f1c35d68446ed7189801408e"},{"version":"6900b889086ad263b45ba6e091b07490c9cad51a192aea7be79abb10f3242280","signature":"d1d119ba558c88f407521a9476253c4642d254105c287c379e17743dd25f6a4a"},{"version":"5d41a3ea79cc33b761340019fa537f1a8ccc7f62ad12612570f16069f4dd21c4","signature":"6ea60168b0cbacd112c0b64be4589e4491593dbacb6f5319b900cf94aa5ea9b2"}],"root":[[116,122],[126,135]],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./esm","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"fileIdsList":[[72,74,75,76,77,78],[72,73],[74],[73,74],[72,74],[63,65],[64,66],[61,62,63,64,65,66,67,68,69,70],[63,64,65,66],[66],[64],[83,121],[114,118,121,127,128],[115,116,121,126,129,131,133],[115,121,129,130,131],[117,121],[118,121,126,129,132,134],[114,121,125,126],[114,121,122,125,126],[83,115,121],[115,121],[116,121],[114,115,118,119,120],[114,115,121],[114,121,122,125],[64,71,81,82],[83],[71,79,83,101],[71,83,99,101,102,103,104,105,114],[79,83,103],[79,83],[71],[102,103,106,107],[102,103,106,107,108],[71,103],[114],[85,99,109,111],[84],[85,86,111,112,113],[87],[87,88,89,90,91,110],[87,109],[92,93,94,96,97,98],[92,93,94,96],[92,99],[93,94,95],[93,94,96],[81,100],[79],[79,80],[71,79,123,124],[114,118,119,120,121],[115,121,129],[121],[114,121]],"referencedMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,12],[129,13],[134,14],[132,15],[118,16],[135,17],[127,18],[128,19],[116,20],[133,21],[130,21],[117,22],[131,20],[121,23],[119,24],[120,24],[126,25],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"exportedModulesMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,27],[129,52],[134,53],[132,53],[118,54],[135,17],[127,55],[128,55],[116,21],[133,21],[130,21],[117,54],[131,21],[121,23],[119,24],[120,24],[126,55],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"semanticDiagnosticsPerFile":[72,79,74,75,76,77,78,73,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,61,62,66,67,68,71,70,63,64,69,65,122,129,134,132,118,135,127,128,116,133,130,117,131,121,119,120,126,83,82,102,106,105,103,108,115,109,104,107,112,113,85,114,86,84,88,91,89,90,87,111,110,99,92,98,97,93,94,96,95,80,101,100,81,123,125,124],"latestChangedDtsFile":"./esm/index.d.ts"},"version":"5.1.6"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../bcs/dist/cjs/b58.d.ts","../../bcs/dist/cjs/b64.d.ts","../../bcs/dist/cjs/reader.d.ts","../../bcs/dist/cjs/types.d.ts","../../bcs/dist/cjs/writer.d.ts","../../bcs/dist/cjs/bcs-type.d.ts","../../bcs/dist/cjs/bcs.d.ts","../../bcs/dist/cjs/hex.d.ts","../../bcs/dist/cjs/utils.d.ts","../../bcs/dist/cjs/legacy-registry.d.ts","../../bcs/dist/cjs/index.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/error.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/utils.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/struct.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/coercions.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/refinements.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/types.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/utilities.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/index.d.ts","../../typescript/dist/cjs/types/common.d.ts","../../typescript/dist/cjs/types/objects.d.ts","../../typescript/dist/cjs/bcs/type-tag-serializer.d.ts","../../typescript/dist/cjs/bcs/index.d.ts","../../typescript/dist/cjs/client/rpc-websocket-client.d.ts","../../typescript/dist/cjs/client/http-transport.d.ts","../../typescript/dist/cjs/client/network.d.ts","../../typescript/dist/cjs/client/types/generated.d.ts","../../typescript/dist/cjs/client/types/chain.d.ts","../../typescript/dist/cjs/client/types/coins.d.ts","../../typescript/dist/cjs/client/types/common.d.ts","../../typescript/dist/cjs/client/types/changes.d.ts","../../typescript/dist/cjs/cryptography/intent.d.ts","../../typescript/dist/cjs/cryptography/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature-scheme.d.ts","../../typescript/dist/cjs/multisig/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature.d.ts","../../typescript/dist/cjs/cryptography/mnemonics.d.ts","../../typescript/dist/cjs/cryptography/keypair.d.ts","../../typescript/dist/cjs/cryptography/index.d.ts","../../typescript/dist/cjs/types/normalized.d.ts","../../typescript/dist/cjs/types/index.d.ts","../../typescript/dist/cjs/builder/Inputs.d.ts","../../typescript/dist/cjs/builder/Transactions.d.ts","../../typescript/dist/cjs/builder/pure.d.ts","../../typescript/dist/cjs/builder/TransactionBlockData.d.ts","../../typescript/dist/cjs/builder/TransactionBlock.d.ts","../../typescript/dist/cjs/builder/serializer.d.ts","../../typescript/dist/cjs/builder/bcs.d.ts","../../typescript/dist/cjs/builder/index.d.ts","../../typescript/dist/cjs/client/types/params.d.ts","../../typescript/dist/cjs/client/types/index.d.ts","../../typescript/dist/cjs/client/client.d.ts","../../typescript/dist/cjs/client/errors.d.ts","../../typescript/dist/cjs/client/index.d.ts","../../typescript/dist/cjs/builder/export.d.ts","../src/tx/kiosk.ts","../src/tx/rules/resolve.ts","../src/constants.ts","../src/types/kiosk.ts","../src/types/transfer-policy.ts","../src/types/index.ts","../src/bcs.ts","../../typescript/dist/cjs/utils/format.d.ts","../../typescript/dist/cjs/utils/sui-types.d.ts","../../typescript/dist/cjs/utils/index.d.ts","../src/utils.ts","../src/query/kiosk.ts","../src/query/transfer-policy.ts","../src/client/kiosk-client.ts","../src/tx/rules/attach.ts","../src/tx/transfer-policy.ts","../src/client/tp-transaction.ts","../src/tx/personal-kiosk.ts","../src/client/kiosk-transaction.ts","../src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"b304a0dbc45734f46afbc75f40510b68f8c8575ef0b5cb8cd3e9b1e91bf1e169","5354a072b3ac903eb7fd90335dc277df9c1f41c650ddb495e7d3837870ce8f37","ec95aac5334a7f581ca3703334d605fd099255c4e7ae6cc0f758a8a61bd2583d","d312a279203f83e7dc60d23135820fd4c3b93a6f5b7f4aba6780c3e99e02dcc1","763bfc2a8911c4b6e4b81bf60b129d194d5db024609bf8f26b65e163e9e1552b","279945d96a86deee3252f9587af1013eca5027d6989c11da3e0e109f73b7064d","860ce8146a712fc5d88bfc6c3a2b8f6b835238a8009941b306871663ee920ebe","da0d6e82a836d320b4aedffcdbeda8444263533483ec4fc36a188da9995beee8","877a5f022af5433e1e2d9aeecfb92e35d10635812cec615c4b64fc16234201c7","15d652995d4fc8b2b019cdf0c14f424a536cfba2acedceed14bceab4c46ddc9f","1047322d9c62521bf58c817ad4579730e394f284e848d7e7e52199a2fc057920","5041d1e151f77eb97f762c51fade8d268f271de2f8b165b050e7caa4b7f8c4bd","0296071bdd869379505de371c04065cc68ddfb9564d6b75cda2373b0130bf57f","00cac821c5c6466146321dc8192f48c84d9f7c321f862b9a4a01a6a832ce6a2f","c6eff85f66b05eba0a5af516cfa2e7ce0c6d2a2cc71bc4c543915c823cea9ce8","434272013d17121b677ec280c2309b16442cd47060af926d1deba5a00fa26856","b55144428bf4cdc9d7f5027035b45e165feb6064538a06339aa3d7186aead0fb","0c7192e40da80243d167d93fd23c11d2efba22dc27fda3602d99889ed02ade86","0706139fea91b191554d605cc00192d295832707c54782c14b2e770f84786576","7a66b004fbf03f4388a4b1cab9c56e8d7783cde6dffe11740b4d4a5fd8ea2962","40f629bb8dbdcca0d098f515980fe12d8c3d8016e5f171f5974dc3a365d124dc","a7ac1b038e5708a8146a6a033a325f578c579e4a9ca33ea370dc71f08e4cf412","617149ab95b9af0071b7f97d6eab5a329818c2e00c27f07819ec4d07be9eff05","6d68d23b4426718f335edcb10a26ffa873d155a4d6678f3660f36f4df5ea5a73","672f2984ea0180d19d72c3b49cd90a4a4f0f98e511f6aa01248168217c8add1d","3ac7c43ef8ba2fbcaade1891039ed9b74cb3f40219360495b939c868f93db28d","a295bd6c1e044b63f35bd1c2a0bd6311712fb88d1107a1fc3e0695279dacf022","964bd6aefed84b3c9fb3b69a48dee86b7700dc79a6976db75e38ebdcb71a34e4","7142789577fd90bacde1a3d92ed9da5c86c25b2d5deace47e0ebfb32eaa4e5de","17e850a4aa91db529a27a63ab8c1060c1dc2bab9e59c2e15f92b27b23222a370","e07d4eac48bb68fe5fa8dc50136d2c0e494302f1d514e9bc8bbb49d676536f5d","8e92292bc3805f96d1988c3548dab65d3b941e7c975b4cdb76c8b50eef815152","4f77dc3fb5c167d70a3381ed6f0460e225cdcd1e92e57cf0561c1dbbf4b1d06b","85f34d2bd3cf830bd6eaf365f00a87399c63e056ea887d10a13fe2a426174c1b","6e2b929b96c3c3b9085dd03a1cb48b820d5cddd7d533e12c167d5efdcd3ecb94","3751bfdb6089fc635ac6670517387aaf0049f99c9b9bbb1cda7722a5ada6c126","eb3671ec7a51c0e20962ba24be3fd7a41919455739c123e774d5dd5f125eec25","fa4db2dc803d0eb7e08346318c9a7d21677f8cf98d462cfd0a6a12c8cfb31c92","6673741ec24a5e5dacd4e34642fd04246521b85ad5816447a359f941a3868337","4f32a56579111f4bae35cd512deb712e6c7e54d6166419efd950f906cfbb3bb9","4c91be8d873064981e9f0a16a4e30c54292cddf9c13cb71eed6e0d76eb8b75b4","d4a4aaaa115b2ff81485fd51383254e9726a9aed3032af71f6eae0cbb0b1d7ea","90342db9643b8f88b334cd9ce8ad8b952dd7c947162940c54baac6581db62fbf","9a1da17eba055daf804d9bc61805961f6cbd6265a10ab33d53293415462464a6","09848148e7d9056992861396dfd15807e66f62196483a85640141157f87e3e62","b1a0fcbf76ed96379e3757a44eec4f2de164e7018085933d14924e8c6de13df2","5f9226e66cd6358f5a9f82cb46ec091bacdd535d220e50e6af0f800e1dd0d2b8","143d16563c5b476d29ad8429d9cc65290bb20244bbe5fad6803252cfd36fa1cb","4d9edaa343cccb6138f68fe1ea88d6bb8915473442ed14dd3ac209260c8337b0","0770502837dc34fc1da48dab57a6bff1f3fcf97576990a7f58f49a359d6c57b5","1cc19398cebbcda80c612f0989bd1dc124097914402fa315fd2e2595b69812d9","2a4bf44344fddabb3095ca3a57582209fa7cb6cc7486f7ec8fe09008c1cc576b","fef1dcd2d08e4fa2d4617499beb25162894ecebf9032ea2037a7e4e33d896eb9","5d6243442242f523d700101991a98c94b97a82f5ea7cfea4506881eeae5712ed","a92eb3a0db5b455d6350b2fb6f23593721ebe6af71f7f442d0b2b0e8f36830ae",{"version":"b2456beac00d2e3270ec892a3205358a07b3219a6368ed7c5da2c02c3325c2f4","signature":"7181fe29fa26260e4b32fcb9663df64499302c52153ffd448e224f1becb84521"},{"version":"dee0e9c574a1ec00681eb5c0e9aee2364cb8f177a74e6148e48556d46b46fa6f","signature":"11eb9418df601a8fdc8c8dbd61290c6bd95d6fb6fcbef4d47cb6b391103e8267"},{"version":"a11de17a9d374b0692ba4e5213a188047ec315e5d8a936b4b67c1af70ecf794a","signature":"a06f84567ded23e0b70480e61559acddb6ba32aab20c3fa5b549415a049df701"},{"version":"b1ac353ea3e3384975f528e964792bff9df1de29350764739b7bd83f4c559e1a","signature":"07b032114c6aef058c3267e82e5d4678c9ab1dbff743f1d3375baff2aa7d0248"},{"version":"cba4eed95ee9fa85ba0e0cdc7534569db7941f5d6f8198600395e02da9a73345","signature":"bf8987544198b8d44386c5af2720e16f2f590ca2330ac5e25d177c7004a9e1d2"},{"version":"17a906aa9cdea01ce158d87e8f191f28392daf1eb7f5a957906e92171c4e877f","signature":"b33851ce6a5d8ea09c539babd3b74bc3899a1d614d023505217b345a208bb81d"},{"version":"ed303ce7224a274b11cc03f557ad71e9292c10ba81786e4f0134d43d7dfbfe2b","signature":"f8c195f36b2651e649c0bc45c77128026bde3233001c53bda8a201439630f742"},"ddc8c232a5b14c7cb91899a5c5fc74b798a441de0d6816eca6ef622f4100460c","8f57cd17e3be015f1ec2ee98b7573c1befea707f730d5601fac4c4b3ceec0ff3","4333858c2567f4031499dffa613ba53dcf8b0588cc5df9776bc494fe01773276",{"version":"9df7f206246aa6aa16b603452bf85fb76fe5c08f3e88c44011d5a4368cd251d7","signature":"e4d8351aaad89913ae180018e99593588e526f58f741c6963da2f4b92299512e"},{"version":"eddaa909a3b790c1a5cb2cf0e1d8f7135af2a3fe7e1749980ce9efb07750a5ba","signature":"92a2680ff92291f4a2f93fcd68acb7409c8d0947d9f7ef17c002e9c7aa264ca6"},{"version":"8348706b60fc71b1a0da5023469b12a5484d143f1e4b683f5e01c745d1161881","signature":"0bcdc67f527270f768c98165753510f358c2a01d0f736a2cd8170f812a8782d7"},{"version":"1abfb2eb04fdc8f1067ef47160703e053b42780e0146b311f4464a113bf891c2","signature":"d2dd7368a1ed745a8b762aa16c1dea8deb2bfbab4c6bcea8ee036103ae787af2"},{"version":"dc529ede1fd7017889041ef23b309ac3714648a051b7b5232d25254497a5996e","signature":"a340ea35c84fd6a151c7477853d040da3116aab52d5043a2291d7f5f630f4831"},{"version":"2efae43d083c4617ae8f9c3b02a568ed7e12e9edcf8593cfe1cda8e15b8dba7f","signature":"2b61452148dad69c51800c1422bc30a447d37bfdde5658f24072ee5ad97a5926"},{"version":"bca253c1c50ff881d0895236ac8272769a3afe08de57eb6e0d5b89f1539ae39a","signature":"c8d57022572064609db955efc3893a29571e8bad04a0e7b94ed860f13c051839"},{"version":"97daab1b71f6cb50f7503cc2afe0660018d6b66ff4877ba769b60dee4761b8c8","signature":"d919ac8928be2c448de8e20a5dc89fc2aca06a42f1c35d68446ed7189801408e"},{"version":"0a52a549b661cae9cab25c11b59051f05578a8c9fa036fbe53d4dedf979192c2","signature":"c65cc07d2303719d2e22ec74a5025448f28cb82aa7718a0330586f413b3bbcb6"},{"version":"5d41a3ea79cc33b761340019fa537f1a8ccc7f62ad12612570f16069f4dd21c4","signature":"6ea60168b0cbacd112c0b64be4589e4491593dbacb6f5319b900cf94aa5ea9b2"}],"root":[[116,122],[126,135]],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./cjs","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"fileIdsList":[[72,74,75,76,77,78],[72,73],[74],[73,74],[72,74],[63,65],[64,66],[61,62,63,64,65,66,67,68,69,70],[63,64,65,66],[66],[64],[83,121],[114,118,121,127,128],[115,116,121,126,129,131,133],[115,121,129,130,131],[117,121],[118,121,126,129,132,134],[114,121,125,126],[114,121,122,125,126],[83,115,121],[115,121],[116,121],[114,115,118,119,120],[114,115,121],[114,121,122,125],[64,71,81,82],[83],[71,79,83,101],[71,83,99,101,102,103,104,105,114],[79,83,103],[79,83],[71],[102,103,106,107],[102,103,106,107,108],[71,103],[114],[85,99,109,111],[84],[85,86,111,112,113],[87],[87,88,89,90,91,110],[87,109],[92,93,94,96,97,98],[92,93,94,96],[92,99],[93,94,95],[93,94,96],[81,100],[79],[79,80],[71,79,123,124],[114,118,119,120,121],[115,121,129],[121],[114,121]],"referencedMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,12],[129,13],[134,14],[132,15],[118,16],[135,17],[127,18],[128,19],[116,20],[133,21],[130,21],[117,22],[131,20],[121,23],[119,24],[120,24],[126,25],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"exportedModulesMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,27],[129,52],[134,53],[132,53],[118,54],[135,17],[127,55],[128,55],[116,21],[133,21],[130,21],[117,54],[131,21],[121,23],[119,24],[120,24],[126,55],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"semanticDiagnosticsPerFile":[72,79,74,75,76,77,78,73,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,61,62,66,67,68,71,70,63,64,69,65,122,129,134,132,118,135,127,128,116,133,130,117,131,121,119,120,126,83,82,102,106,105,103,108,115,109,104,107,112,113,85,114,86,84,88,91,89,90,87,111,110,99,92,98,97,93,94,96,95,80,101,100,81,123,125,124],"latestChangedDtsFile":"./cjs/index.d.ts"},"version":"5.1.6"}
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.1.6/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../bcs/dist/cjs/b58.d.ts","../../bcs/dist/cjs/b64.d.ts","../../bcs/dist/cjs/reader.d.ts","../../bcs/dist/cjs/types.d.ts","../../bcs/dist/cjs/writer.d.ts","../../bcs/dist/cjs/bcs-type.d.ts","../../bcs/dist/cjs/bcs.d.ts","../../bcs/dist/cjs/hex.d.ts","../../bcs/dist/cjs/utils.d.ts","../../bcs/dist/cjs/legacy-registry.d.ts","../../bcs/dist/cjs/index.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/error.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/utils.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/struct.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/coercions.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/refinements.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/types.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/structs/utilities.d.ts","../../../node_modules/.pnpm/superstruct@1.0.3/node_modules/superstruct/dist/index.d.ts","../../typescript/dist/cjs/types/common.d.ts","../../typescript/dist/cjs/types/objects.d.ts","../../typescript/dist/cjs/bcs/type-tag-serializer.d.ts","../../typescript/dist/cjs/bcs/index.d.ts","../../typescript/dist/cjs/client/rpc-websocket-client.d.ts","../../typescript/dist/cjs/client/http-transport.d.ts","../../typescript/dist/cjs/client/network.d.ts","../../typescript/dist/cjs/client/types/generated.d.ts","../../typescript/dist/cjs/client/types/chain.d.ts","../../typescript/dist/cjs/client/types/coins.d.ts","../../typescript/dist/cjs/client/types/common.d.ts","../../typescript/dist/cjs/client/types/changes.d.ts","../../typescript/dist/cjs/cryptography/intent.d.ts","../../typescript/dist/cjs/cryptography/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature-scheme.d.ts","../../typescript/dist/cjs/multisig/publickey.d.ts","../../typescript/dist/cjs/cryptography/signature.d.ts","../../typescript/dist/cjs/cryptography/mnemonics.d.ts","../../typescript/dist/cjs/cryptography/keypair.d.ts","../../typescript/dist/cjs/cryptography/index.d.ts","../../typescript/dist/cjs/types/normalized.d.ts","../../typescript/dist/cjs/types/index.d.ts","../../typescript/dist/cjs/builder/Inputs.d.ts","../../typescript/dist/cjs/builder/Transactions.d.ts","../../typescript/dist/cjs/builder/pure.d.ts","../../typescript/dist/cjs/builder/TransactionBlockData.d.ts","../../typescript/dist/cjs/builder/TransactionBlock.d.ts","../../typescript/dist/cjs/builder/serializer.d.ts","../../typescript/dist/cjs/builder/bcs.d.ts","../../typescript/dist/cjs/builder/index.d.ts","../../typescript/dist/cjs/client/types/params.d.ts","../../typescript/dist/cjs/client/types/index.d.ts","../../typescript/dist/cjs/client/client.d.ts","../../typescript/dist/cjs/client/errors.d.ts","../../typescript/dist/cjs/client/index.d.ts","../../typescript/dist/cjs/builder/export.d.ts","../src/tx/kiosk.ts","../src/tx/rules/resolve.ts","../src/constants.ts","../src/types/kiosk.ts","../src/types/transfer-policy.ts","../src/types/index.ts","../src/bcs.ts","../../typescript/dist/cjs/utils/format.d.ts","../../typescript/dist/cjs/utils/sui-types.d.ts","../../typescript/dist/cjs/utils/index.d.ts","../src/utils.ts","../src/query/kiosk.ts","../src/query/transfer-policy.ts","../src/client/kiosk-client.ts","../src/tx/rules/attach.ts","../src/tx/transfer-policy.ts","../src/client/tp-transaction.ts","../src/tx/personal-kiosk.ts","../src/client/kiosk-transaction.ts","../src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"f06948deb2a51aae25184561c9640fb66afeddb34531a9212d011792b1d19e0a","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"930b0e15811f84e203d3c23508674d5ded88266df4b10abee7b31b2ac77632d2","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"b304a0dbc45734f46afbc75f40510b68f8c8575ef0b5cb8cd3e9b1e91bf1e169","b0968fa9dabd4a0a1dd69a53f2c3f5a458d71e6374bd80139c3616d839171c65","ec95aac5334a7f581ca3703334d605fd099255c4e7ae6cc0f758a8a61bd2583d","d312a279203f83e7dc60d23135820fd4c3b93a6f5b7f4aba6780c3e99e02dcc1","763bfc2a8911c4b6e4b81bf60b129d194d5db024609bf8f26b65e163e9e1552b","279945d96a86deee3252f9587af1013eca5027d6989c11da3e0e109f73b7064d","860ce8146a712fc5d88bfc6c3a2b8f6b835238a8009941b306871663ee920ebe","da0d6e82a836d320b4aedffcdbeda8444263533483ec4fc36a188da9995beee8","877a5f022af5433e1e2d9aeecfb92e35d10635812cec615c4b64fc16234201c7","15d652995d4fc8b2b019cdf0c14f424a536cfba2acedceed14bceab4c46ddc9f","1047322d9c62521bf58c817ad4579730e394f284e848d7e7e52199a2fc057920","5041d1e151f77eb97f762c51fade8d268f271de2f8b165b050e7caa4b7f8c4bd","0296071bdd869379505de371c04065cc68ddfb9564d6b75cda2373b0130bf57f","00cac821c5c6466146321dc8192f48c84d9f7c321f862b9a4a01a6a832ce6a2f","c6eff85f66b05eba0a5af516cfa2e7ce0c6d2a2cc71bc4c543915c823cea9ce8","434272013d17121b677ec280c2309b16442cd47060af926d1deba5a00fa26856","b55144428bf4cdc9d7f5027035b45e165feb6064538a06339aa3d7186aead0fb","0c7192e40da80243d167d93fd23c11d2efba22dc27fda3602d99889ed02ade86","0706139fea91b191554d605cc00192d295832707c54782c14b2e770f84786576","7a66b004fbf03f4388a4b1cab9c56e8d7783cde6dffe11740b4d4a5fd8ea2962","40f629bb8dbdcca0d098f515980fe12d8c3d8016e5f171f5974dc3a365d124dc","a7ac1b038e5708a8146a6a033a325f578c579e4a9ca33ea370dc71f08e4cf412","617149ab95b9af0071b7f97d6eab5a329818c2e00c27f07819ec4d07be9eff05","6d68d23b4426718f335edcb10a26ffa873d155a4d6678f3660f36f4df5ea5a73","672f2984ea0180d19d72c3b49cd90a4a4f0f98e511f6aa01248168217c8add1d","3ac7c43ef8ba2fbcaade1891039ed9b74cb3f40219360495b939c868f93db28d","a295bd6c1e044b63f35bd1c2a0bd6311712fb88d1107a1fc3e0695279dacf022","964bd6aefed84b3c9fb3b69a48dee86b7700dc79a6976db75e38ebdcb71a34e4","7142789577fd90bacde1a3d92ed9da5c86c25b2d5deace47e0ebfb32eaa4e5de","17e850a4aa91db529a27a63ab8c1060c1dc2bab9e59c2e15f92b27b23222a370","e07d4eac48bb68fe5fa8dc50136d2c0e494302f1d514e9bc8bbb49d676536f5d","8e92292bc3805f96d1988c3548dab65d3b941e7c975b4cdb76c8b50eef815152","4f77dc3fb5c167d70a3381ed6f0460e225cdcd1e92e57cf0561c1dbbf4b1d06b","85f34d2bd3cf830bd6eaf365f00a87399c63e056ea887d10a13fe2a426174c1b","6e2b929b96c3c3b9085dd03a1cb48b820d5cddd7d533e12c167d5efdcd3ecb94","3751bfdb6089fc635ac6670517387aaf0049f99c9b9bbb1cda7722a5ada6c126","eb3671ec7a51c0e20962ba24be3fd7a41919455739c123e774d5dd5f125eec25","4d1242909df21c651da7a29db77f0f497f9865e1876967254cba5810fd15c234","47ff7f29fe14ea5b000b7f2f3526e18c73292cc00d963f3caf09240e1202ec1b","4f32a56579111f4bae35cd512deb712e6c7e54d6166419efd950f906cfbb3bb9","4c91be8d873064981e9f0a16a4e30c54292cddf9c13cb71eed6e0d76eb8b75b4","d4a4aaaa115b2ff81485fd51383254e9726a9aed3032af71f6eae0cbb0b1d7ea","90342db9643b8f88b334cd9ce8ad8b952dd7c947162940c54baac6581db62fbf","9a1da17eba055daf804d9bc61805961f6cbd6265a10ab33d53293415462464a6","09848148e7d9056992861396dfd15807e66f62196483a85640141157f87e3e62","b534d56449d6b7105e1ff91103f405bf9ed139be6ba111ddc5fb445059da63c5","5f9226e66cd6358f5a9f82cb46ec091bacdd535d220e50e6af0f800e1dd0d2b8","143d16563c5b476d29ad8429d9cc65290bb20244bbe5fad6803252cfd36fa1cb","4d9edaa343cccb6138f68fe1ea88d6bb8915473442ed14dd3ac209260c8337b0","0770502837dc34fc1da48dab57a6bff1f3fcf97576990a7f58f49a359d6c57b5","1cc19398cebbcda80c612f0989bd1dc124097914402fa315fd2e2595b69812d9","1ce19fcaa9511f1489a39b8d24c8f122d1b44ef20b2db777529033331ce7d492","fef1dcd2d08e4fa2d4617499beb25162894ecebf9032ea2037a7e4e33d896eb9","5d6243442242f523d700101991a98c94b97a82f5ea7cfea4506881eeae5712ed","a92eb3a0db5b455d6350b2fb6f23593721ebe6af71f7f442d0b2b0e8f36830ae",{"version":"b2456beac00d2e3270ec892a3205358a07b3219a6368ed7c5da2c02c3325c2f4","signature":"7181fe29fa26260e4b32fcb9663df64499302c52153ffd448e224f1becb84521"},{"version":"dee0e9c574a1ec00681eb5c0e9aee2364cb8f177a74e6148e48556d46b46fa6f","signature":"11eb9418df601a8fdc8c8dbd61290c6bd95d6fb6fcbef4d47cb6b391103e8267"},{"version":"a11de17a9d374b0692ba4e5213a188047ec315e5d8a936b4b67c1af70ecf794a","signature":"a06f84567ded23e0b70480e61559acddb6ba32aab20c3fa5b549415a049df701"},{"version":"b1ac353ea3e3384975f528e964792bff9df1de29350764739b7bd83f4c559e1a","signature":"07b032114c6aef058c3267e82e5d4678c9ab1dbff743f1d3375baff2aa7d0248"},{"version":"cba4eed95ee9fa85ba0e0cdc7534569db7941f5d6f8198600395e02da9a73345","signature":"bf8987544198b8d44386c5af2720e16f2f590ca2330ac5e25d177c7004a9e1d2"},{"version":"17a906aa9cdea01ce158d87e8f191f28392daf1eb7f5a957906e92171c4e877f","signature":"b33851ce6a5d8ea09c539babd3b74bc3899a1d614d023505217b345a208bb81d"},{"version":"ed303ce7224a274b11cc03f557ad71e9292c10ba81786e4f0134d43d7dfbfe2b","signature":"f8c195f36b2651e649c0bc45c77128026bde3233001c53bda8a201439630f742"},"ddc8c232a5b14c7cb91899a5c5fc74b798a441de0d6816eca6ef622f4100460c","8f57cd17e3be015f1ec2ee98b7573c1befea707f730d5601fac4c4b3ceec0ff3","4333858c2567f4031499dffa613ba53dcf8b0588cc5df9776bc494fe01773276",{"version":"9df7f206246aa6aa16b603452bf85fb76fe5c08f3e88c44011d5a4368cd251d7","signature":"e4d8351aaad89913ae180018e99593588e526f58f741c6963da2f4b92299512e"},{"version":"eddaa909a3b790c1a5cb2cf0e1d8f7135af2a3fe7e1749980ce9efb07750a5ba","signature":"92a2680ff92291f4a2f93fcd68acb7409c8d0947d9f7ef17c002e9c7aa264ca6"},{"version":"8348706b60fc71b1a0da5023469b12a5484d143f1e4b683f5e01c745d1161881","signature":"0bcdc67f527270f768c98165753510f358c2a01d0f736a2cd8170f812a8782d7"},{"version":"1abfb2eb04fdc8f1067ef47160703e053b42780e0146b311f4464a113bf891c2","signature":"d2dd7368a1ed745a8b762aa16c1dea8deb2bfbab4c6bcea8ee036103ae787af2"},{"version":"dc529ede1fd7017889041ef23b309ac3714648a051b7b5232d25254497a5996e","signature":"a340ea35c84fd6a151c7477853d040da3116aab52d5043a2291d7f5f630f4831"},{"version":"2efae43d083c4617ae8f9c3b02a568ed7e12e9edcf8593cfe1cda8e15b8dba7f","signature":"2b61452148dad69c51800c1422bc30a447d37bfdde5658f24072ee5ad97a5926"},{"version":"bca253c1c50ff881d0895236ac8272769a3afe08de57eb6e0d5b89f1539ae39a","signature":"c8d57022572064609db955efc3893a29571e8bad04a0e7b94ed860f13c051839"},{"version":"97daab1b71f6cb50f7503cc2afe0660018d6b66ff4877ba769b60dee4761b8c8","signature":"d919ac8928be2c448de8e20a5dc89fc2aca06a42f1c35d68446ed7189801408e"},{"version":"6900b889086ad263b45ba6e091b07490c9cad51a192aea7be79abb10f3242280","signature":"d1d119ba558c88f407521a9476253c4642d254105c287c379e17743dd25f6a4a"},{"version":"5d41a3ea79cc33b761340019fa537f1a8ccc7f62ad12612570f16069f4dd21c4","signature":"6ea60168b0cbacd112c0b64be4589e4491593dbacb6f5319b900cf94aa5ea9b2"}],"root":[[116,122],[126,135]],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./cjs","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7},"fileIdsList":[[72,74,75,76,77,78],[72,73],[74],[73,74],[72,74],[63,65],[64,66],[61,62,63,64,65,66,67,68,69,70],[63,64,65,66],[66],[64],[83,121],[114,118,121,127,128],[115,116,121,126,129,131,133],[115,121,129,130,131],[117,121],[118,121,126,129,132,134],[114,121,125,126],[114,121,122,125,126],[83,115,121],[115,121],[116,121],[114,115,118,119,120],[114,115,121],[114,121,122,125],[64,71,81,82],[83],[71,79,83,101],[71,83,99,101,102,103,104,105,114],[79,83,103],[79,83],[71],[102,103,106,107],[102,103,106,107,108],[71,103],[114],[85,99,109,111],[84],[85,86,111,112,113],[87],[87,88,89,90,91,110],[87,109],[92,93,94,96,97,98],[92,93,94,96],[92,99],[93,94,95],[93,94,96],[81,100],[79],[79,80],[71,79,123,124],[114,118,119,120,121],[115,121,129],[121],[114,121]],"referencedMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,12],[129,13],[134,14],[132,15],[118,16],[135,17],[127,18],[128,19],[116,20],[133,21],[130,21],[117,22],[131,20],[121,23],[119,24],[120,24],[126,25],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"exportedModulesMap":[[79,1],[74,2],[75,3],[76,3],[77,4],[78,4],[73,5],[66,6],[67,7],[71,8],[70,9],[64,10],[69,11],[65,11],[122,27],[129,52],[134,53],[132,53],[118,54],[135,17],[127,55],[128,55],[116,21],[133,21],[130,21],[117,54],[131,21],[121,23],[119,24],[120,24],[126,55],[83,26],[82,27],[102,28],[106,29],[105,30],[103,31],[108,32],[115,33],[109,34],[104,35],[107,36],[112,37],[85,38],[114,39],[88,40],[91,40],[90,27],[111,41],[110,42],[99,43],[98,44],[93,45],[96,46],[95,47],[80,31],[101,48],[100,49],[81,50],[125,51]],"semanticDiagnosticsPerFile":[72,79,74,75,76,77,78,73,59,60,12,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,37,34,35,36,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,56,54,55,57,10,1,11,58,61,62,66,67,68,71,70,63,64,69,65,122,129,134,132,118,135,127,128,116,133,130,117,131,121,119,120,126,83,82,102,106,105,103,108,115,109,104,107,112,113,85,114,86,84,88,91,89,90,87,111,110,99,92,98,97,93,94,96,95,80,101,100,81,123,125,124],"latestChangedDtsFile":"./cjs/index.d.ts"},"version":"5.1.6"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@mysten/kiosk",
|
|
3
3
|
"author": "Mysten Labs <build@mystenlabs.com>",
|
|
4
4
|
"description": "Sui Kiosk library",
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"main": "./dist/cjs/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=16"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@mysten/sui.js": "0.
|
|
27
|
+
"@mysten/sui.js": "0.50.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"cross-env": "^7.0.3",
|
|
@@ -285,12 +285,25 @@ export class KioskTransaction {
|
|
|
285
285
|
* A function to take lock an item in the kiosk.
|
|
286
286
|
|
|
287
287
|
* @param itemType The type `T` of the item
|
|
288
|
-
* @param
|
|
288
|
+
* @param item The ID or Transaction Argument of the item
|
|
289
|
+
* @param itemId The ID of the item - Deprecated: Use `item` instead.
|
|
289
290
|
* @param policy The Policy ID or Transaction Argument for item T
|
|
290
291
|
*/
|
|
291
|
-
lock({
|
|
292
|
+
lock({
|
|
293
|
+
itemType,
|
|
294
|
+
item,
|
|
295
|
+
itemId,
|
|
296
|
+
policy,
|
|
297
|
+
}: ItemReference & { policy: ObjectArgument; itemId?: string }) {
|
|
292
298
|
this.#validateKioskIsSet();
|
|
293
|
-
kioskTx.lock(
|
|
299
|
+
kioskTx.lock(
|
|
300
|
+
this.transactionBlock,
|
|
301
|
+
itemType,
|
|
302
|
+
this.kiosk!,
|
|
303
|
+
this.kioskCap!,
|
|
304
|
+
policy,
|
|
305
|
+
itemId ?? item,
|
|
306
|
+
);
|
|
294
307
|
return this;
|
|
295
308
|
}
|
|
296
309
|
|