{"version":3,"file":"barrel.mjs","names":[],"sources":["../src/udt/index.ts","../src/udtPausable/index.ts","../src/barrel.ts"],"sourcesContent":["import { ccc } from \"@ckb-ccc/core\";\nimport { ssri } from \"@ckb-ccc/ssri\";\n\n/**\n * Represents a User Defined Token (UDT) script compliant with the SSRI protocol.\n *\n * This class provides a comprehensive implementation for interacting with User Defined Tokens,\n * supporting various token operations such as querying metadata, checking balances, and performing transfers.\n * It supports both SSRI-compliant UDTs and legacy sUDT/xUDT standard tokens.\n *\n * @public\n * @category Blockchain\n * @category Token\n */\nexport class Udt extends ssri.Trait {\n  public readonly script: ccc.Script;\n\n  /**\n   * Constructs a new UDT (User Defined Token) script instance.\n   * By default it is a SSRI-compliant UDT.\n   *\n   * @param code - The script code cell of the UDT.\n   * @param script - The type script of the UDT.\n   * @param config - Optional configuration for the UDT instance.\n   * @param config.executor - The SSRI executor instance. If provided, enables SSRI-based operations.\n   * @example\n   * ```typescript\n   * const udt = new Udt(code, script, { executor });\n   * ```\n   */\n  constructor(\n    code: ccc.OutPointLike,\n    script: ccc.ScriptLike,\n    config?: {\n      executor?: ssri.Executor | null;\n    } | null,\n  ) {\n    super(code, config?.executor);\n    this.script = ccc.Script.from(script);\n  }\n\n  /**\n   * Retrieves the human-readable name of the User Defined Token.\n   *\n   * @param context - Optional SSRI context for script execution.\n   * @returns A promise resolving to the token's name.\n   */\n  async name(\n    context?: ssri.ContextScript,\n  ): Promise<ssri.ExecutorResponse<string | undefined>> {\n    if (this.executor) {\n      const res = await this.executor.runScriptTry(this.code, \"UDT.name\", [], {\n        script: this.script,\n        ...context,\n      });\n      if (res) {\n        return res.map((res) => ccc.bytesTo(res, \"utf8\"));\n      }\n    }\n\n    return ssri.ExecutorResponse.new(undefined);\n  }\n\n  /**\n   * Retrieves the symbol of the UDT.\n   * @param context - Optional SSRI context for script execution.\n   * @returns The symbol of the UDT.\n   */\n  async symbol(\n    context?: ssri.ContextScript,\n  ): Promise<ssri.ExecutorResponse<string | undefined>> {\n    if (this.executor) {\n      const res = await this.executor.runScriptTry(\n        this.code,\n        \"UDT.symbol\",\n        [],\n        {\n          script: this.script,\n          ...context,\n        },\n      );\n      if (res) {\n        return res.map((res) => ccc.bytesTo(res, \"utf8\"));\n      }\n    }\n\n    return ssri.ExecutorResponse.new(undefined);\n  }\n\n  /**\n   * Retrieves the decimals of the UDT.\n   * @param context - Optional SSRI context for script execution.\n   * @returns The decimals of the UDT.\n   */\n  async decimals(\n    context?: ssri.ContextScript,\n  ): Promise<ssri.ExecutorResponse<ccc.Num | undefined>> {\n    if (this.executor) {\n      const res = await this.executor.runScriptTry(\n        this.code,\n        \"UDT.decimals\",\n        [],\n        {\n          script: this.script,\n          ...context,\n        },\n      );\n      if (res) {\n        return res.map((res) => ccc.numFromBytes(res));\n      }\n    }\n\n    return ssri.ExecutorResponse.new(undefined);\n  }\n\n  /**\n   * Retrieves the icon of the UDT.\n   * @param context - Optional SSRI context for script execution.\n   * @returns The icon of the UDT.\n   */\n  async icon(\n    context?: ssri.ContextScript,\n  ): Promise<ssri.ExecutorResponse<string | undefined>> {\n    if (this.executor) {\n      const res = await this.executor.runScriptTry(this.code, \"UDT.icon\", [], {\n        script: this.script,\n        ...context,\n      });\n      if (res) {\n        return res.map((res) => ccc.bytesTo(res, \"utf8\"));\n      }\n    }\n\n    return ssri.ExecutorResponse.new(undefined);\n  }\n\n  /**\n   * Transfers UDT to specified addresses.\n   * @param signer - The signer to use for the transaction.\n   * @param transfers - The array of transfers.\n   * @param transfers.to - The receiver of token.\n   * @param transfers.amount - The amount of token to the receiver.\n   * @param tx - Transfer on the basis of an existing transaction to achieve combined actions. If not provided, a new transaction will be created.\n   * @returns The transaction result.\n   * @tag Mutation - This method represents a mutation of the onchain state and will return a transaction object.\n   * @example\n   * ```typescript\n   * const { script: change } = await signer.getRecommendedAddressObj();\n   * const { script: to } = await ccc.Address.fromString(receiver, signer.client);\n   *\n   * const udt = new Udt(\n   *   {\n   *     txHash: \"0x4e2e832e0b1e7b5994681b621b00c1e65f577ee4b440ef95fa07db9bb3d50269\",\n   *     index: 0,\n   *   },\n   *   {\n   *     codeHash: \"0xcc9dc33ef234e14bc788c43a4848556a5fb16401a04662fc55db9bb201987037\",\n   *     hashType: \"type\",\n   *     args: \"0x71fd1985b2971a9903e4d8ed0d59e6710166985217ca0681437883837b86162f\"\n   *   },\n   * );\n   *\n   * const { res: tx } = await udtTrait.transfer(\n   *   signer,\n   *   [{ to, amount: 100 }],\n   * );\n   *\n   * const completedTx = udt.completeUdtBy(tx, signer);\n   * await completedTx.completeInputsByCapacity(signer);\n   * await completedTx.completeFeeBy(signer);\n   * const transferTxHash = await signer.sendTransaction(completedTx);\n   * ```\n   */\n  async transfer(\n    signer: ccc.Signer,\n    transfers: {\n      to: ccc.ScriptLike;\n      amount: ccc.NumLike;\n    }[],\n    tx?: ccc.TransactionLike | null,\n  ): Promise<ssri.ExecutorResponse<ccc.Transaction>> {\n    let resTx;\n    if (this.executor) {\n      const txReq = ccc.Transaction.from(tx ?? {});\n      await txReq.completeInputsAtLeastOne(signer);\n\n      const res = await this.executor.runScriptTry(\n        this.code,\n        \"UDT.transfer\",\n        [\n          txReq.toBytes(),\n          ccc.ScriptVec.encode(transfers.map(({ to }) => to)),\n          ccc.mol.Uint128Vec.encode(transfers.map(({ amount }) => amount)),\n        ],\n        {\n          script: this.script,\n        },\n      );\n      if (res) {\n        resTx = res.map((res) => ccc.Transaction.fromBytes(res));\n      }\n    }\n\n    if (!resTx) {\n      const transfer = ccc.Transaction.from(tx ?? {});\n      for (const { to, amount } of transfers) {\n        transfer.addOutput(\n          {\n            lock: to,\n            type: this.script,\n          },\n          ccc.numLeToBytes(amount, 16),\n        );\n      }\n      resTx = ssri.ExecutorResponse.new(transfer);\n    }\n    resTx.res.addCellDeps({\n      outPoint: this.code,\n      depType: \"code\",\n    });\n    return resTx;\n  }\n\n  /**\n   * Mints new tokens to specified addresses. See the example in `transfer` as they are similar.\n   * @param signer - The signer to use for the transaction.\n   * @param mints - Array of mints\n   * @param mints.to - receiver of token\n   * @param mints.amount - amount to the receiver\n   * @param tx - Optional existing transaction to build upon\n   * @returns The transaction containing the mint operation\n   * @tag Mutation - This method represents a mutation of the onchain state\n   */\n  async mint(\n    signer: ccc.Signer,\n    mints: {\n      to: ccc.ScriptLike;\n      amount: ccc.NumLike;\n    }[],\n    tx?: ccc.TransactionLike | null,\n  ): Promise<ssri.ExecutorResponse<ccc.Transaction>> {\n    let resTx;\n    if (this.executor) {\n      const txReq = ccc.Transaction.from(tx ?? {});\n      await txReq.completeInputsAtLeastOne(signer);\n\n      const res = await this.executor.runScriptTry(\n        this.code,\n        \"UDT.mint\",\n        [\n          txReq.toBytes(),\n          ccc.ScriptVec.encode(mints.map(({ to }) => to)),\n          ccc.mol.Uint128Vec.encode(mints.map(({ amount }) => amount)),\n        ],\n        {\n          script: this.script,\n        },\n      );\n      if (res) {\n        resTx = res.map((res) => ccc.Transaction.fromBytes(res));\n      }\n    }\n\n    if (!resTx) {\n      const mint = ccc.Transaction.from(tx ?? {});\n      for (const { to, amount } of mints) {\n        mint.addOutput(\n          {\n            lock: to,\n            type: this.script,\n          },\n          ccc.numLeToBytes(amount, 16),\n        );\n      }\n      resTx = ssri.ExecutorResponse.new(mint);\n    }\n    resTx.res.addCellDeps({\n      outPoint: this.code,\n      depType: \"code\",\n    });\n    return resTx;\n  }\n\n  /**\n   * Completes a UDT transaction by adding change output to a specific lock script.\n   * @param txLike - The transaction to complete.\n   * @param signer - The signer to use for input selection.\n   * @param change - The lock script for the change output.\n   * @returns The completed transaction.\n   */\n  async completeChangeToLock(\n    txLike: ccc.TransactionLike,\n    signer: ccc.Signer,\n    change: ccc.ScriptLike,\n  ) {\n    const tx = ccc.Transaction.from(txLike);\n\n    await tx.completeInputsByUdt(signer, this.script);\n    const balanceDiff =\n      (await tx.getInputsUdtBalance(signer.client, this.script)) -\n      tx.getOutputsUdtBalance(this.script);\n    if (balanceDiff > ccc.Zero) {\n      tx.addOutput(\n        {\n          lock: change,\n          type: this.script,\n        },\n        ccc.numLeToBytes(balanceDiff, 16),\n      );\n    }\n\n    return tx;\n  }\n\n  /**\n   * Completes a UDT transaction by adding change output to the signer's address.\n   * @param tx - The transaction to complete.\n   * @param from - The signer to use for input selection and change address.\n   * @returns The completed transaction.\n   */\n  async completeBy(tx: ccc.TransactionLike, from: ccc.Signer) {\n    const { script } = await from.getRecommendedAddressObj();\n\n    return this.completeChangeToLock(tx, from, script);\n  }\n}\n","import { ccc } from \"@ckb-ccc/core\";\nimport { ssri } from \"@ckb-ccc/ssri\";\nimport { Udt } from \"../udt/index.js\";\n\n/**\n * Represents a UDT (User Defined Token) with pausable functionality.\n * @extends {Udt} This must be a SSRI UDT that does not fallback to xUDT.\n * @public\n */\nexport class UdtPausable extends Udt {\n  constructor(\n    code: ccc.OutPointLike,\n    script: ccc.ScriptLike,\n    config: {\n      executor: ssri.Executor;\n    },\n  ) {\n    super(code, script, config);\n  }\n\n  /**\n   * Pauses the UDT for the specified lock scripts. Pausing/Unpause without lock scripts should take effect on the global level. Note that this method is only available if the pausable UDT uses external pause list.\n   * @param signer - The signer to use for the transaction.\n   * @param locks - The array of lock scripts to be paused.\n   * @param tx - The transaction to be used.\n   * @param extraLockHashes - Additional lock hashes to be paused.\n   * @returns The transaction result.\n   * @tag Mutation - This method represents a mutation of the onchain state and will return a transaction to be sent.\n   */\n  async pause(\n    signer: ccc.Signer,\n    locks: ccc.ScriptLike[],\n    tx?: ccc.TransactionLike | null,\n    extraLockHashes?: ccc.HexLike[] | null,\n  ): Promise<ssri.ExecutorResponse<ccc.Transaction>> {\n    const txReq = ccc.Transaction.from(tx ?? {});\n    await txReq.completeInputsAtLeastOne(signer);\n\n    const res = await this.assertExecutor().runScript(\n      this.code,\n      \"UDTPausable.pause\",\n      [\n        txReq.toBytes(),\n        ccc.mol.Byte32Vec.encode(\n          locks\n            .map((l) => ccc.Script.from(l).hash())\n            .concat(extraLockHashes?.map(ccc.hexFrom) ?? []),\n        ),\n      ],\n      { script: this.script },\n    );\n    const resTx = res.map((res) => ccc.Transaction.fromBytes(res));\n    resTx.res.addCellDeps({\n      outPoint: this.code,\n      depType: \"code\",\n    });\n    return resTx;\n  }\n\n  /**\n   * Unpauses the UDT for the specified lock scripts. Note that this method is only available if the pausable UDT uses external pause list.\n   * @param signer - The signer to use for the transaction.\n   * @param locks - The array of lock scripts to be unpaused.\n   * @param tx - The transaction to be used.\n   * @param extraLockHashes - Additional lock hashes to be unpaused.\n   * @returns The transaction result.\n   * @tag Mutation - This method represents a mutation of the onchain state and will return a transaction to be sent.\n   */\n  async unpause(\n    signer: ccc.Signer,\n    locks: ccc.ScriptLike[],\n    tx?: ccc.TransactionLike | null,\n    extraLockHashes?: ccc.HexLike[] | null,\n  ): Promise<ssri.ExecutorResponse<ccc.Transaction>> {\n    const txReq = ccc.Transaction.from(tx ?? {});\n    await txReq.completeInputsAtLeastOne(signer);\n\n    const res = await this.assertExecutor().runScript(\n      this.code,\n      \"UDTPausable.unpause\",\n      [\n        txReq.toBytes(),\n        ccc.mol.Byte32Vec.encode(\n          locks\n            .map((l) => ccc.Script.from(l).hash())\n            .concat(extraLockHashes?.map(ccc.hexFrom) ?? []),\n        ),\n      ],\n      { script: this.script },\n    );\n    const resTx = res.map((res) => ccc.Transaction.fromBytes(res));\n    resTx.res.addCellDeps({\n      outPoint: this.code,\n      depType: \"code\",\n    });\n    return resTx;\n  }\n\n  /**\n   * Checks if the UDT is paused for the specified lock scripts within a transaction. If not using external pause list, it can also be run on Code environment level.\n   * @param locks - The lock scripts to check.\n   * @param extraLockHashes - Additional lock hashes to check.\n   * @returns True if any of the lock scripts are paused, false otherwise.\n   */\n  async isPaused(\n    locks: ccc.ScriptLike[],\n    extraLockHashes?: ccc.HexLike[] | null,\n  ): Promise<ssri.ExecutorResponse<boolean[]>> {\n    const res = await this.assertExecutor().runScript(\n      this.code,\n      \"UDTPausable.is_paused\",\n      [\n        ccc.mol.Byte32Vec.encode(\n          locks\n            .map((l) => ccc.Script.from(l).hash())\n            .concat(extraLockHashes?.map(ccc.hexFrom) ?? []),\n        ),\n      ],\n      { script: this.script },\n    );\n    return res.map((res) => ccc.mol.BoolVec.decode(res));\n  }\n\n  /**\n   * Enumerates all paused lock hashes in UDTPausableData.\n   * @returns The array of lock hashes.\n   */\n  async enumeratePaused(\n    offset?: ccc.Num,\n    limit?: ccc.Num,\n  ): Promise<ssri.ExecutorResponse<ccc.Hex[]>> {\n    const res = await this.assertExecutor().runScript(\n      this.code,\n      \"UDTPausable.enumerate_paused\",\n      [ccc.numToBytes(offset ?? 0, 8), ccc.numToBytes(limit ?? 0, 8)],\n      { script: this.script },\n    );\n\n    return res.map((res) => ccc.mol.Byte32Vec.decode(res));\n  }\n}\n","export * from \"./udt/index.js\";\nexport * from \"./udtPausable/index.js\";\n"],"mappings":"6HAcA,IAAa,EAAb,cAAyB,EAAK,KAAM,CAgBlC,YACE,EACA,EACA,EAGA,CACA,MAAM,EAAM,GAAQ,QAAQ,EAC5B,KAAK,OAAS,EAAI,OAAO,KAAK,CAAM,CACtC,CAQA,MAAM,KACJ,EACoD,CACpD,GAAI,KAAK,SAAU,CACjB,IAAM,EAAM,MAAM,KAAK,SAAS,aAAa,KAAK,KAAM,WAAY,CAAC,EAAG,CACtE,OAAQ,KAAK,OACb,GAAG,CACL,CAAC,EACD,GAAI,EACF,OAAO,EAAI,IAAK,GAAQ,EAAI,QAAQ,EAAK,MAAM,CAAC,CAEpD,CAEA,OAAO,EAAK,iBAAiB,IAAI,IAAA,EAAS,CAC5C,CAOA,MAAM,OACJ,EACoD,CACpD,GAAI,KAAK,SAAU,CACjB,IAAM,EAAM,MAAM,KAAK,SAAS,aAC9B,KAAK,KACL,aACA,CAAC,EACD,CACE,OAAQ,KAAK,OACb,GAAG,CACL,CACF,EACA,GAAI,EACF,OAAO,EAAI,IAAK,GAAQ,EAAI,QAAQ,EAAK,MAAM,CAAC,CAEpD,CAEA,OAAO,EAAK,iBAAiB,IAAI,IAAA,EAAS,CA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