@ckb-ccc/core 1.13.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/address.advanced-BHxWrbFc.mjs +2 -0
  3. package/dist/address.advanced-BHxWrbFc.mjs.map +1 -0
  4. package/dist/advanced.d.mts +1 -1
  5. package/dist/advanced.mjs +1 -1
  6. package/{dist.commonjs/advancedBarrel-DRDT4GBS.d.ts → dist/advancedBarrel-Dwyn3WMm.d.mts} +437 -14
  7. package/dist/advancedBarrel-Dwyn3WMm.d.mts.map +1 -0
  8. package/dist/advancedBarrel.d.mts +1 -1
  9. package/dist/advancedBarrel.mjs +1 -1
  10. package/dist/barrel-DO-IW8Ui.mjs +7 -0
  11. package/dist/barrel-DO-IW8Ui.mjs.map +1 -0
  12. package/dist/barrel.d.mts +2 -2
  13. package/dist/barrel.mjs +1 -1
  14. package/dist/index.d.mts +2 -2
  15. package/dist/index.mjs +1 -1
  16. package/dist.commonjs/address.advanced-UCU9Hn8t.js +2 -0
  17. package/dist.commonjs/address.advanced-UCU9Hn8t.js.map +1 -0
  18. package/dist.commonjs/advanced.d.ts +1 -1
  19. package/dist.commonjs/advanced.js +1 -1
  20. package/{dist/advancedBarrel-BD7EAPVd.d.mts → dist.commonjs/advancedBarrel-D97MfkUZ.d.ts} +438 -13
  21. package/dist.commonjs/advancedBarrel-D97MfkUZ.d.ts.map +1 -0
  22. package/dist.commonjs/advancedBarrel.d.ts +1 -1
  23. package/dist.commonjs/advancedBarrel.js +1 -1
  24. package/dist.commonjs/barrel-D5PRJCB6.js +21 -0
  25. package/dist.commonjs/barrel-D5PRJCB6.js.map +1 -0
  26. package/dist.commonjs/barrel.d.ts +2 -2
  27. package/dist.commonjs/barrel.js +1 -1
  28. package/dist.commonjs/index.d.ts +2 -2
  29. package/dist.commonjs/index.js +1 -1
  30. package/package.json +23 -12
  31. package/src/address/address.advanced.ts +3 -3
  32. package/src/ckb/transaction.ts +20 -1
  33. package/src/client/clientPublicMainnet.advanced.ts +17 -0
  34. package/src/client/clientPublicTestnet.advanced.ts +17 -0
  35. package/src/client/knownScript.ts +1 -0
  36. package/src/codec/entity.ts +12 -8
  37. package/src/hasher/hasherCkb.ts +7 -1
  38. package/src/hex/index.ts +82 -2
  39. package/src/molecule/codec.ts +15 -15
  40. package/src/num/index.ts +17 -4
  41. package/src/signer/ckb/index.ts +3 -1
  42. package/src/signer/ckb/secp256k1Signing.ts +94 -0
  43. package/src/signer/ckb/signerCkbPrivateKey.ts +6 -11
  44. package/src/signer/ckb/signerCkbPublicKey.ts +8 -3
  45. package/src/signer/ckb/signerMultisigCkbPrivateKey.ts +129 -0
  46. package/src/signer/ckb/signerMultisigCkbReadonly.ts +713 -0
  47. package/src/signer/signer/index.ts +100 -1
  48. package/tsdown.config.mts +12 -3
  49. package/dist/address.advanced-CWGrVD-M.mjs +0 -2
  50. package/dist/address.advanced-CWGrVD-M.mjs.map +0 -1
  51. package/dist/advancedBarrel-BD7EAPVd.d.mts.map +0 -1
  52. package/dist/barrel-DchA_RPN.mjs +0 -7
  53. package/dist/barrel-DchA_RPN.mjs.map +0 -1
  54. package/dist.commonjs/address.advanced-COp7SNhZ.js +0 -2
  55. package/dist.commonjs/address.advanced-COp7SNhZ.js.map +0 -1
  56. package/dist.commonjs/advancedBarrel-DRDT4GBS.d.ts.map +0 -1
  57. package/dist.commonjs/barrel-CXC2Uy5L.js +0 -7
  58. package/dist.commonjs/barrel-CXC2Uy5L.js.map +0 -1
  59. package/src/signer/ckb/verifyCkbSecp256k1.ts +0 -31
@@ -1,2 +1,2 @@
1
- import { $ as CellDep, $n as btcP2pkhAddressFromPublicKey, $r as CodecUint256BE, $t as ClientFindCellsResponse, Ai as numLeToBytes, An as verifyMessageNostrEvent, Ar as hashCkb, At as HashTypeCodec, B as ClientPublicTestnet, Bi as AddressLike, Bn as SignerDummy, Br as CodecByte16, Bt as Epoch, Ci as Num, Ct as depTypeFrom, Di as numFrom, Dt as udtBalanceFrom, Ei as numBeToBytes, Et as isDaoOutputLimitExceeded, Fi as Codec, Fn as verifyMessageEvmPersonal, Fr as Zero, Ft as ScriptVec, G as ClientCacheMemory, Gi as BytesLike, Gn as SignerDoge, Gr as CodecRaw, Gt as CellDepInfo, H as ClientJsonRpc, Hi as HexLike, Hn as verifyMessageDogeEcdsa, Hr as CodecByte4, Ht as epochFrom, Ii as CodecLike, In as SignerEvmAddressReadonly, Ir as fixedPointFrom, It as hashTypeFrom, J as ErrorTransactionInsufficientCoin, Ji as bytesEq, Jn as verifyMessageCkbSecp256k1, Jr as CodecUint128LE, Jt as ClientBlockHeader, K as ClientCache, Ki as bytesConcat, Kn as verifyMessageJoyId, Kr as CodecUint128, Kt as CellDepInfoLike, Li as DecodedType, Ln as SignerEvm, Lr as fixedPointToString, Lt as hashTypeFromBytes, Mi as numMin, Mn as SignerNostrPublicKeyReadonly, Mr as FixedPoint, Mt as Script, Ni as numToBytes, Nn as NostrEvent, Nr as FixedPointLike, Nt as ScriptLike, Oi as numFromBytes, On as buildNostrEventFromMessage, Or as HasherKeecak256, Ot as LumosTransactionSkeletonType, Pi as numToHex, Pn as SignerNostr, Pr as One, Pt as ScriptOpt, Q as CellAnyLike, Qn as btcEcdsaPublicKeyHash, Qr as CodecUint256, Qt as ClientBlockUncleLike, Ri as EncodableType, Rn as SignerOpenLink, Rr as CodecBool, Rt as hashTypeToBytes, Si as stringify, St as calcDaoProfit, Ti as numBeFromBytes, Tt as depTypeToBytes, U as ClientJsonRpcConfig, Ui as hexFrom, Un as SignerDogePrivateKey, Ur as CodecByte8, Ut as epochFromHex, V as ClientPublicMainnet, Vi as Hex, Vn as messageHashDogeEcdsa, Vr as CodecByte32, Vt as EpochLike, W as Client, Wi as Bytes, Wn as SignerDogeAddressReadonly, Wr as CodecBytes, Wt as epochToHex, X as Cell, Xi as bytesTo, Xn as SignerCkbPrivateKey, Xr as CodecUint16BE, Xt as ClientBlockLike, Y as hashTypeId, Yi as bytesFrom, Yn as SignerCkbScriptReadonly, Yr as CodecUint16, Yt as ClientBlockHeaderLike, Z as CellAny, Zn as SignerCkbPublicKey, Zr as CodecUint16LE, Zt as ClientBlockUncle, _i as apply, _n as ErrorClientWaitTransactionTimeout, _r as barrel_d_exports, _t as Transaction, ai as CodecUint512BE, an as ClientIndexerSearchKeyLike, ar as SignerBtc, at as CellLike, bi as reduceAsync, bn as ScriptInfoLike, br as RequestorJsonRpc, bt as WitnessArgsLike, ci as CodecUint64BE, cn as ClientTransactionResponse, cr as Signer, ct as CellOutputVec, di as codecPadding, dn as ErrorClientBaseLike, dr as SignerType, dt as DepTypeLike, ei as CodecUint256LE, en as ClientFindTransactionsGroupedResponse, er as btcPublicKeyFromP2pkhAddress, et as CellDepLike, fi as codecUint, fn as ErrorClientDuplicatedTransaction, fr as Wallet, ft as OutPoint, gi as Constructor, gn as ErrorClientVerification, gr as SignPsbtOptionsLike, gt as SinceLike, hi as codec, hn as ErrorClientResolveUnknown, hr as SignPsbtOptions, ht as Since, ii as CodecUint512, in as ClientIndexerSearchKeyFilterLike, ir as SignerBtcPublicKeyReadonly, it as CellInputVec, ji as numMax, jn as SignerNostrPrivateKey, jr as Hasher, jt as HashTypeLike, ki as numLeFromBytes, kn as nostrEventHash, kr as HasherCkb, kt as HashType, li as CodecUint64LE, ln as ClientTransactionResponseLike, lr as SignerInfo, lt as DepType, mi as Entity, mn as ErrorClientRBFRejected, mr as InputToSignLike, mt as RawTransaction, ni as CodecUint32BE, nn as ClientIndexerSearchKey, nr as messageHashBtcEcdsa, nt as CellInput, oi as CodecUint512LE, on as ClientIndexerSearchKeyTransaction, or as NetworkPreference, ot as CellOutput, pi as codecUintNumber, pn as ErrorClientMaxFeeRateExceeded, pr as InputToSign, pt as OutPointLike, q as ErrorTransactionInsufficientCapacity, qi as bytesConcatTo, qn as messageHashCkbSecp256k1, qr as CodecUint128BE, qt as ClientBlock, ri as CodecUint32LE, rn as ClientIndexerSearchKeyFilter, rr as verifyMessageBtcEcdsa, rt as CellInputLike, si as CodecUint64, sn as ClientIndexerSearchKeyTransactionLike, sr as Signature, st as CellOutputLike, ti as CodecUint32, tn as ClientFindTransactionsResponse, tr as btcVarLengthBytesFrom, tt as CellDepVec, ui as CodecUint8, un as ErrorClientBase, ur as SignerSignType, ut as DepTypeCodec, vi as gcd, vn as OutputsValidator, vr as keystoreDecrypt, vt as TransactionLike, wi as NumLike, wt as depTypeFromBytes, xi as sleep, xn as TransactionStatus, xr as RequestorJsonRpcConfig, xt as calcDaoClaimEpoch, yi as isWebview, yn as ScriptInfo, yr as keystoreEncrypt, yt as WitnessArgs, zi as Address, zn as SignerAlwaysError, zr as CodecByte, zt as KnownScript } from "./advancedBarrel-DRDT4GBS.js";
2
- export { Address, AddressLike, Bytes, BytesLike, Cell, CellAny, CellAnyLike, CellDep, CellDepInfo, CellDepInfoLike, CellDepLike, CellDepVec, CellInput, CellInputLike, CellInputVec, CellLike, CellOutput, CellOutputLike, CellOutputVec, Client, ClientBlock, ClientBlockHeader, ClientBlockHeaderLike, ClientBlockLike, ClientBlockUncle, ClientBlockUncleLike, ClientCache, ClientCacheMemory, ClientFindCellsResponse, ClientFindTransactionsGroupedResponse, ClientFindTransactionsResponse, ClientIndexerSearchKey, ClientIndexerSearchKeyFilter, ClientIndexerSearchKeyFilterLike, ClientIndexerSearchKeyLike, ClientIndexerSearchKeyTransaction, ClientIndexerSearchKeyTransactionLike, ClientJsonRpc, ClientJsonRpcConfig, ClientPublicMainnet, ClientPublicTestnet, ClientTransactionResponse, ClientTransactionResponseLike, Codec, CodecBool, CodecByte, CodecByte16, CodecByte32, CodecByte4, CodecByte8, CodecBytes, CodecLike, CodecRaw, CodecUint128, CodecUint128BE, CodecUint128LE, CodecUint16, CodecUint16BE, CodecUint16LE, CodecUint256, CodecUint256BE, CodecUint256LE, CodecUint32, CodecUint32BE, CodecUint32LE, CodecUint512, CodecUint512BE, CodecUint512LE, CodecUint64, CodecUint64BE, CodecUint64LE, CodecUint8, Constructor, DecodedType, DepType, DepTypeCodec, DepTypeLike, EncodableType, Entity, Epoch, EpochLike, ErrorClientBase, ErrorClientBaseLike, ErrorClientDuplicatedTransaction, ErrorClientMaxFeeRateExceeded, ErrorClientRBFRejected, ErrorClientResolveUnknown, ErrorClientVerification, ErrorClientWaitTransactionTimeout, ErrorTransactionInsufficientCapacity, ErrorTransactionInsufficientCoin, FixedPoint, FixedPointLike, HashType, HashTypeCodec, HashTypeLike, Hasher, HasherCkb, HasherKeecak256, Hex, HexLike, InputToSign, InputToSignLike, KnownScript, LumosTransactionSkeletonType, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, Script, ScriptInfo, ScriptInfoLike, ScriptLike, ScriptOpt, ScriptVec, SignPsbtOptions, SignPsbtOptionsLike, Signature, Signer, SignerAlwaysError, SignerBtc, SignerBtcPublicKeyReadonly, SignerCkbPrivateKey, SignerCkbPublicKey, SignerCkbScriptReadonly, SignerDoge, SignerDogeAddressReadonly, SignerDogePrivateKey, SignerDummy, SignerEvm, SignerEvmAddressReadonly, SignerInfo, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, apply, btcEcdsaPublicKeyHash, btcP2pkhAddressFromPublicKey, btcPublicKeyFromP2pkhAddress, btcVarLengthBytesFrom, buildNostrEventFromMessage, bytesConcat, bytesConcatTo, bytesEq, bytesFrom, bytesTo, calcDaoClaimEpoch, calcDaoProfit, codec, codecPadding, codecUint, codecUintNumber, depTypeFrom, depTypeFromBytes, depTypeToBytes, epochFrom, epochFromHex, epochToHex, fixedPointFrom, fixedPointToString, gcd, hashCkb, hashTypeFrom, hashTypeFromBytes, hashTypeId, hashTypeToBytes, hexFrom, isDaoOutputLimitExceeded, isWebview, keystoreDecrypt, keystoreEncrypt, messageHashBtcEcdsa, messageHashCkbSecp256k1, messageHashDogeEcdsa, barrel_d_exports as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, reduceAsync, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent };
1
+ import { $ as CellDep, $i as AddressLike, $n as SignerCkbPublicKey, $r as CodecByte16, $t as ClientFindCellsResponse, Ai as apply, An as verifyMessageNostrEvent, Ar as RequestorJsonRpc, At as HashTypeCodec, B as ClientPublicTestnet, Bi as numFrom, Bn as SignerDummy, Br as HASH_CKB_SHORT_LENGTH, Bt as Epoch, Ci as CodecUint8, Cr as InputToSign, Ct as depTypeFrom, Di as Entity, Dr as barrel_d_exports, Dt as udtBalanceFrom, Ei as codecUintNumber, Er as SignPsbtOptionsLike, Et as isDaoOutputLimitExceeded, Fi as stringify, Fn as verifyMessageEvmPersonal, Ft as ScriptVec, G as ClientCacheMemory, Gi as numMin, Gn as SignerDoge, Gr as FixedPoint, Gt as CellDepInfo, H as ClientJsonRpc, Hi as numLeFromBytes, Hn as verifyMessageDogeEcdsa, Hr as hashCkb, Ht as epochFrom, Ii as Num, In as SignerEvmAddressReadonly, It as hashTypeFrom, J as ErrorTransactionInsufficientCoin, Ji as Codec, Jn as MultisigCkbWitness, Jr as Zero, Jt as ClientBlockHeader, K as ClientCache, Ki as numToBytes, Kn as verifyMessageJoyId, Kr as FixedPointLike, Kt as CellDepInfoLike, Li as NumLike, Ln as SignerEvm, Lt as hashTypeFromBytes, Mi as isWebview, Mn as SignerNostrPublicKeyReadonly, Mt as Script, Ni as reduceAsync, Nn as NostrEvent, Nt as ScriptLike, Oi as codec, On as buildNostrEventFromMessage, Or as keystoreDecrypt, Ot as LumosTransactionSkeletonType, Pi as sleep, Pn as SignerNostr, Pt as ScriptOpt, Q as CellAnyLike, Qi as Address, Qn as SignerCkbPrivateKey, Qr as CodecByte, Qt as ClientBlockUncleLike, Ri as numBeFromBytes, Rn as SignerOpenLink, Rr as HasherKeecak256, Rt as hashTypeToBytes, Si as CodecUint64LE, Sr as Wallet, St as calcDaoProfit, Ti as codecUint, Tr as SignPsbtOptions, Tt as depTypeToBytes, U as ClientJsonRpcConfig, Ui as numLeToBytes, Un as SignerDogePrivateKey, Ur as hashCkbShort, Ut as epochFromHex, V as ClientPublicMainnet, Vi as numFromBytes, Vn as messageHashDogeEcdsa, Vr as HasherCkb, Vt as EpochLike, W as Client, Wi as numMax, Wn as SignerDogeAddressReadonly, Wr as Hasher, Wt as epochToHex, X as Cell, Xi as DecodedType, Xn as SignerMultisigCkbReadonly, Xr as fixedPointToString, Xt as ClientBlockLike, Y as hashTypeId, Yi as CodecLike, Yn as MultisigCkbWitnessLike, Yr as fixedPointFrom, Yt as ClientBlockHeaderLike, Z as CellAny, Zi as EncodableType, Zn as SignerCkbScriptReadonly, Zr as CodecBool, Zt as ClientBlockUncle, _i as CodecUint512, _n as ErrorClientWaitTransactionTimeout, _r as SignerInfo, _t as Transaction, aa as Bytes, ai as CodecUint128, an as ClientIndexerSearchKeyLike, ar as verifyMessageSecp256k1, at as CellLike, bi as CodecUint64, bn as ScriptInfoLike, br as SignerSignType, bt as WitnessArgsLike, ca as bytesConcatTo, ci as CodecUint16, cn as ClientTransactionResponse, cr as btcPublicKeyFromP2pkhAddress, ct as CellOutputVec, da as bytesTo, di as CodecUint256, dn as ErrorClientBaseLike, dr as verifyMessageBtcEcdsa, dt as DepTypeLike, ea as Hex, ei as CodecByte32, en as ClientFindTransactionsGroupedResponse, er as SECP256K1_SIGNATURE_LENGTH, et as CellDepLike, fi as CodecUint256BE, fn as ErrorClientDuplicatedTransaction, fr as SignerBtcPublicKeyReadonly, ft as OutPoint, gi as CodecUint32LE, gn as ErrorClientVerification, gr as Signer, gt as SinceLike, hi as CodecUint32BE, hn as ErrorClientResolveUnknown, hr as Signature, ht as Since, ia as hexFrom, ii as CodecRaw, in as ClientIndexerSearchKeyFilterLike, ir as verifyMessageCkbSecp256k1, it as CellInputVec, ji as gcd, jn as SignerNostrPrivateKey, jr as RequestorJsonRpcConfig, jt as HashTypeLike, ki as Constructor, kn as nostrEventHash, kr as keystoreEncrypt, kt as HashType, la as bytesEq, li as CodecUint16BE, ln as ClientTransactionResponseLike, lr as btcVarLengthBytesFrom, lt as DepType, mi as CodecUint32, mn as ErrorClientRBFRejected, mr as NetworkPreference, mt as RawTransaction, na as bytesLen, ni as CodecByte8, nn as ClientIndexerSearchKey, nr as recoverMessageSecp256k1, nt as CellInput, oa as BytesLike, oi as CodecUint128BE, on as ClientIndexerSearchKeyTransaction, or as btcEcdsaPublicKeyHash, ot as CellOutput, pi as CodecUint256LE, pn as ErrorClientMaxFeeRateExceeded, pr as SignerBtc, pt as OutPointLike, q as ErrorTransactionInsufficientCapacity, qi as numToHex, qn as SignerMultisigCkbPrivateKey, qr as One, qt as ClientBlock, ra as bytesLenUnsafe, ri as CodecBytes, rn as ClientIndexerSearchKeyFilter, rr as signMessageSecp256k1, rt as CellInputLike, sa as bytesConcat, si as CodecUint128LE, sn as ClientIndexerSearchKeyTransactionLike, sr as btcP2pkhAddressFromPublicKey, st as CellOutputLike, ta as HexLike, ti as CodecByte4, tn as ClientFindTransactionsResponse, tr as messageHashCkbSecp256k1, tt as CellDepVec, ua as bytesFrom, ui as CodecUint16LE, un as ErrorClientBase, ur as messageHashBtcEcdsa, ut as DepTypeCodec, vi as CodecUint512BE, vn as OutputsValidator, vr as SignerMultisig, vt as TransactionLike, wi as codecPadding, wr as InputToSignLike, wt as depTypeFromBytes, xi as CodecUint64BE, xn as TransactionStatus, xr as SignerType, xt as calcDaoClaimEpoch, yi as CodecUint512LE, yn as ScriptInfo, yr as SignerMultisigNotEnoughSignaturesError, yt as WitnessArgs, zi as numBeToBytes, zn as SignerAlwaysError, zr as HASH_CKB_LENGTH, zt as KnownScript } from "./advancedBarrel-D97MfkUZ.js";
2
+ export { Address, AddressLike, Bytes, BytesLike, Cell, CellAny, CellAnyLike, CellDep, CellDepInfo, CellDepInfoLike, CellDepLike, CellDepVec, CellInput, CellInputLike, CellInputVec, CellLike, CellOutput, CellOutputLike, CellOutputVec, Client, ClientBlock, ClientBlockHeader, ClientBlockHeaderLike, ClientBlockLike, ClientBlockUncle, ClientBlockUncleLike, ClientCache, ClientCacheMemory, ClientFindCellsResponse, ClientFindTransactionsGroupedResponse, ClientFindTransactionsResponse, ClientIndexerSearchKey, ClientIndexerSearchKeyFilter, ClientIndexerSearchKeyFilterLike, ClientIndexerSearchKeyLike, ClientIndexerSearchKeyTransaction, ClientIndexerSearchKeyTransactionLike, ClientJsonRpc, ClientJsonRpcConfig, ClientPublicMainnet, ClientPublicTestnet, ClientTransactionResponse, ClientTransactionResponseLike, Codec, CodecBool, CodecByte, CodecByte16, CodecByte32, CodecByte4, CodecByte8, CodecBytes, CodecLike, CodecRaw, CodecUint128, CodecUint128BE, CodecUint128LE, CodecUint16, CodecUint16BE, CodecUint16LE, CodecUint256, CodecUint256BE, CodecUint256LE, CodecUint32, CodecUint32BE, CodecUint32LE, CodecUint512, CodecUint512BE, CodecUint512LE, CodecUint64, CodecUint64BE, CodecUint64LE, CodecUint8, Constructor, DecodedType, DepType, DepTypeCodec, DepTypeLike, EncodableType, Entity, Epoch, EpochLike, ErrorClientBase, ErrorClientBaseLike, ErrorClientDuplicatedTransaction, ErrorClientMaxFeeRateExceeded, ErrorClientRBFRejected, ErrorClientResolveUnknown, ErrorClientVerification, ErrorClientWaitTransactionTimeout, ErrorTransactionInsufficientCapacity, ErrorTransactionInsufficientCoin, FixedPoint, FixedPointLike, HASH_CKB_LENGTH, HASH_CKB_SHORT_LENGTH, HashType, HashTypeCodec, HashTypeLike, Hasher, HasherCkb, HasherKeecak256, Hex, HexLike, InputToSign, InputToSignLike, KnownScript, LumosTransactionSkeletonType, MultisigCkbWitness, MultisigCkbWitnessLike, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, SECP256K1_SIGNATURE_LENGTH, Script, ScriptInfo, ScriptInfoLike, ScriptLike, ScriptOpt, ScriptVec, SignPsbtOptions, SignPsbtOptionsLike, Signature, Signer, SignerAlwaysError, SignerBtc, SignerBtcPublicKeyReadonly, SignerCkbPrivateKey, SignerCkbPublicKey, SignerCkbScriptReadonly, SignerDoge, SignerDogeAddressReadonly, SignerDogePrivateKey, SignerDummy, SignerEvm, SignerEvmAddressReadonly, SignerInfo, SignerMultisig, SignerMultisigCkbPrivateKey, SignerMultisigCkbReadonly, SignerMultisigNotEnoughSignaturesError, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, apply, btcEcdsaPublicKeyHash, btcP2pkhAddressFromPublicKey, btcPublicKeyFromP2pkhAddress, btcVarLengthBytesFrom, buildNostrEventFromMessage, bytesConcat, bytesConcatTo, bytesEq, bytesFrom, bytesLen, bytesLenUnsafe, bytesTo, calcDaoClaimEpoch, calcDaoProfit, codec, codecPadding, codecUint, codecUintNumber, depTypeFrom, depTypeFromBytes, depTypeToBytes, epochFrom, epochFromHex, epochToHex, fixedPointFrom, fixedPointToString, gcd, hashCkb, hashCkbShort, hashTypeFrom, hashTypeFromBytes, hashTypeId, hashTypeToBytes, hexFrom, isDaoOutputLimitExceeded, isWebview, keystoreDecrypt, keystoreEncrypt, messageHashBtcEcdsa, messageHashCkbSecp256k1, messageHashDogeEcdsa, barrel_d_exports as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, recoverMessageSecp256k1, reduceAsync, signMessageSecp256k1, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1 };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-COp7SNhZ.js"),t=require("./barrel-CXC2Uy5L.js");exports.Address=t.H,exports.Bytes=e.hr,exports.Cell=e.a,exports.CellAny=e.o,Object.defineProperty(exports,"CellDep",{enumerable:!0,get:function(){return e.s}}),exports.CellDepInfo=e.nt,exports.CellDepVec=e.c,Object.defineProperty(exports,"CellInput",{enumerable:!0,get:function(){return e.l}}),exports.CellInputVec=e.u,Object.defineProperty(exports,"CellOutput",{enumerable:!0,get:function(){return e.d}}),exports.CellOutputVec=e.f,exports.Client=t.J,exports.ClientBlock=e.rt,exports.ClientBlockHeader=e.it,exports.ClientBlockUncle=e.at,exports.ClientCache=t.X,exports.ClientCacheMemory=t.Y,exports.ClientIndexerSearchKey=e.ot,exports.ClientIndexerSearchKeyFilter=e.st,exports.ClientIndexerSearchKeyTransaction=e.ct,exports.ClientJsonRpc=t.K,exports.ClientPublicMainnet=t.G,exports.ClientPublicTestnet=t.W,exports.ClientTransactionResponse=e.lt,exports.Codec=e.mr,exports.CodecBool=e.Sn,exports.CodecByte=e.Cn,exports.CodecByte16=e.wn,exports.CodecByte32=e.Tn,exports.CodecByte4=e.En,exports.CodecByte8=e.Dn,exports.CodecBytes=e.On,exports.CodecRaw=e.kn,exports.CodecUint128=e.An,exports.CodecUint128BE=e.jn,exports.CodecUint128LE=e.Mn,exports.CodecUint16=e.Nn,exports.CodecUint16BE=e.Pn,exports.CodecUint16LE=e.Fn,exports.CodecUint256=e.In,exports.CodecUint256BE=e.Ln,exports.CodecUint256LE=e.Rn,exports.CodecUint32=e.zn,exports.CodecUint32BE=e.Bn,exports.CodecUint32LE=e.Vn,exports.CodecUint512=e.Hn,exports.CodecUint512BE=e.Un,exports.CodecUint512LE=e.Wn,exports.CodecUint64=e.Gn,exports.CodecUint64BE=e.Kn,exports.CodecUint64LE=e.qn,exports.CodecUint8=e.Jn,exports.DepTypeCodec=e.p,exports.Entity=e.cr,Object.defineProperty(exports,"Epoch",{enumerable:!0,get:function(){return e.xt}}),exports.ErrorClientBase=e.ut,exports.ErrorClientDuplicatedTransaction=e.dt,exports.ErrorClientMaxFeeRateExceeded=e.ft,exports.ErrorClientRBFRejected=e.pt,exports.ErrorClientResolveUnknown=e.mt,exports.ErrorClientVerification=e.ht,exports.ErrorClientWaitTransactionTimeout=e.gt,exports.ErrorTransactionInsufficientCapacity=e.E,exports.ErrorTransactionInsufficientCoin=e.D,exports.HashTypeCodec=e.j,exports.HasherCkb=e.ur,exports.HasherKeecak256=t.Q,exports.InputToSign=t.R,exports.KnownScript=e.J,exports.One=e.vn,Object.defineProperty(exports,"OutPoint",{enumerable:!0,get:function(){return e.m}}),exports.RawTransaction=e.h,exports.RequestorJsonRpc=t.q,Object.defineProperty(exports,"Script",{enumerable:!0,get:function(){return e.M}}),exports.ScriptInfo=e._t,exports.ScriptOpt=e.N,exports.ScriptVec=e.P,exports.SignPsbtOptions=t.z,exports.Signature=t.v,exports.Signer=t.y,exports.SignerAlwaysError=t.c,exports.SignerBtc=t._,exports.SignerBtcPublicKeyReadonly=t.g,exports.SignerCkbPrivateKey=t.m,exports.SignerCkbPublicKey=t.h,exports.SignerCkbScriptReadonly=t.p,exports.SignerDoge=t.f,exports.SignerDogeAddressReadonly=t.d,exports.SignerDogePrivateKey=t.u,exports.SignerDummy=t.l,exports.SignerEvm=t.o,exports.SignerEvmAddressReadonly=t.a,exports.SignerInfo=t.b,exports.SignerNostr=t.i,exports.SignerNostrPrivateKey=t.n,exports.SignerNostrPublicKeyReadonly=t.r,exports.SignerOpenLink=t.s,exports.SignerSignType=t.x,exports.SignerType=t.S,Object.defineProperty(exports,"Since",{enumerable:!0,get:function(){return e.g}}),Object.defineProperty(exports,"Transaction",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(exports,"WitnessArgs",{enumerable:!0,get:function(){return e.v}}),exports.Zero=e.yn,exports.apply=e.Tt,exports.btcEcdsaPublicKeyHash=t.M,exports.btcP2pkhAddressFromPublicKey=t.N,exports.btcPublicKeyFromP2pkhAddress=t.P,exports.btcVarLengthBytesFrom=t.F,exports.buildNostrEventFromMessage=t.C,exports.bytesConcat=e.gr,exports.bytesConcatTo=e._r,exports.bytesEq=e.vr,exports.bytesFrom=e.yr,exports.bytesTo=e.br,exports.calcDaoClaimEpoch=e.y,exports.calcDaoProfit=e.b,exports.codec=e.lr,exports.codecPadding=e.Yn,exports.codecUint=e.Xn,exports.codecUintNumber=e.Zn,exports.depTypeFrom=e.x,exports.depTypeFromBytes=e.S,exports.depTypeToBytes=e.C,exports.epochFrom=e.St,exports.epochFromHex=e.Ct,exports.epochToHex=e.wt,exports.fixedPointFrom=e.bn,exports.fixedPointToString=e.xn,exports.gcd=e.Et,exports.hashCkb=e.dr,exports.hashTypeFrom=e.F,exports.hashTypeFromBytes=e.I,exports.hashTypeId=t.U,exports.hashTypeToBytes=e.L,exports.hexFrom=e.pr,exports.isDaoOutputLimitExceeded=e.w,exports.isWebview=e.Dt,exports.keystoreDecrypt=t.B,exports.keystoreEncrypt=t.V,exports.messageHashBtcEcdsa=t.I,exports.messageHashCkbSecp256k1=t.A,exports.messageHashDogeEcdsa=t.D,Object.defineProperty(exports,"mol",{enumerable:!0,get:function(){return t.Z}}),exports.nostrEventHash=t.w,exports.numBeFromBytes=e.Qn,exports.numBeToBytes=e.$n,exports.numFrom=e.er,exports.numFromBytes=e.tr,exports.numLeFromBytes=e.nr,exports.numLeToBytes=e.rr,exports.numMax=e.ir,exports.numMin=e.ar,exports.numToBytes=e.or,exports.numToHex=e.sr,exports.reduceAsync=e.Ot,exports.sleep=e.kt,exports.stringify=e.At,exports.udtBalanceFrom=e.T,exports.verifyMessageBtcEcdsa=t.L,exports.verifyMessageCkbSecp256k1=t.j,exports.verifyMessageDogeEcdsa=t.O,exports.verifyMessageEvmPersonal=t.E,exports.verifyMessageJoyId=t.k,exports.verifyMessageNostrEvent=t.T;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-UCU9Hn8t.js"),t=require("./barrel-D5PRJCB6.js");exports.Address=t.Z,exports.Bytes=e.Zr,exports.Cell=e.a,exports.CellAny=e.o,Object.defineProperty(exports,"CellDep",{enumerable:!0,get:function(){return e.s}}),exports.CellDepInfo=e.nt,exports.CellDepVec=e.c,Object.defineProperty(exports,"CellInput",{enumerable:!0,get:function(){return e.l}}),exports.CellInputVec=e.u,Object.defineProperty(exports,"CellOutput",{enumerable:!0,get:function(){return e.d}}),exports.CellOutputVec=e.f,exports.Client=t.rt,exports.ClientBlock=e.rt,exports.ClientBlockHeader=e.it,exports.ClientBlockUncle=e.at,exports.ClientCache=t.at,exports.ClientCacheMemory=t.it,exports.ClientIndexerSearchKey=e.ot,exports.ClientIndexerSearchKeyFilter=e.st,exports.ClientIndexerSearchKeyTransaction=e.ct,exports.ClientJsonRpc=t.tt,exports.ClientPublicMainnet=t.et,exports.ClientPublicTestnet=t.$,exports.ClientTransactionResponse=e.lt,exports.Codec=e.Xr,exports.CodecBool=e.yn,exports.CodecByte=e.bn,exports.CodecByte16=e.xn,exports.CodecByte32=e.Sn,exports.CodecByte4=e.Cn,exports.CodecByte8=e.wn,exports.CodecBytes=e.Tn,exports.CodecRaw=e.En,exports.CodecUint128=e.Dn,exports.CodecUint128BE=e.On,exports.CodecUint128LE=e.kn,exports.CodecUint16=e.An,exports.CodecUint16BE=e.jn,exports.CodecUint16LE=e.Mn,exports.CodecUint256=e.Nn,exports.CodecUint256BE=e.Pn,exports.CodecUint256LE=e.Fn,exports.CodecUint32=e.In,exports.CodecUint32BE=e.Ln,exports.CodecUint32LE=e.Rn,exports.CodecUint512=e.zn,exports.CodecUint512BE=e.Bn,exports.CodecUint512LE=e.Vn,exports.CodecUint64=e.Hn,exports.CodecUint64BE=e.Un,exports.CodecUint64LE=e.Wn,exports.CodecUint8=e.Gn,exports.DepTypeCodec=e.p,exports.Entity=e.lr,Object.defineProperty(exports,"Epoch",{enumerable:!0,get:function(){return e.xt}}),exports.ErrorClientBase=e.ut,exports.ErrorClientDuplicatedTransaction=e.dt,exports.ErrorClientMaxFeeRateExceeded=e.ft,exports.ErrorClientRBFRejected=e.pt,exports.ErrorClientResolveUnknown=e.mt,exports.ErrorClientVerification=e.ht,exports.ErrorClientWaitTransactionTimeout=e.gt,exports.ErrorTransactionInsufficientCapacity=e.E,exports.ErrorTransactionInsufficientCoin=e.D,exports.HASH_CKB_LENGTH=e.dr,exports.HASH_CKB_SHORT_LENGTH=e.fr,exports.HashTypeCodec=e.j,exports.HasherCkb=e.pr,exports.HasherKeecak256=t.st,exports.InputToSign=t.q,exports.KnownScript=e.J,Object.defineProperty(exports,"MultisigCkbWitness",{enumerable:!0,get:function(){return t.m}}),exports.One=e.ar,Object.defineProperty(exports,"OutPoint",{enumerable:!0,get:function(){return e.m}}),exports.RawTransaction=e.h,exports.RequestorJsonRpc=t.nt,exports.SECP256K1_SIGNATURE_LENGTH=t.F,Object.defineProperty(exports,"Script",{enumerable:!0,get:function(){return e.M}}),exports.ScriptInfo=e._t,exports.ScriptOpt=e.N,exports.ScriptVec=e.P,exports.SignPsbtOptions=t.J,exports.Signature=t.x,exports.Signer=t.S,exports.SignerAlwaysError=t.c,exports.SignerBtc=t.b,exports.SignerBtcPublicKeyReadonly=t.y,exports.SignerCkbPrivateKey=t._,exports.SignerCkbPublicKey=t.v,exports.SignerCkbScriptReadonly=t.g,exports.SignerDoge=t.f,exports.SignerDogeAddressReadonly=t.d,exports.SignerDogePrivateKey=t.u,exports.SignerDummy=t.l,exports.SignerEvm=t.o,exports.SignerEvmAddressReadonly=t.a,exports.SignerInfo=t.C,exports.SignerMultisig=t.w,exports.SignerMultisigCkbPrivateKey=t.p,exports.SignerMultisigCkbReadonly=t.h,exports.SignerMultisigNotEnoughSignaturesError=t.T,exports.SignerNostr=t.i,exports.SignerNostrPrivateKey=t.n,exports.SignerNostrPublicKeyReadonly=t.r,exports.SignerOpenLink=t.s,exports.SignerSignType=t.E,exports.SignerType=t.D,Object.defineProperty(exports,"Since",{enumerable:!0,get:function(){return e.g}}),Object.defineProperty(exports,"Transaction",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(exports,"WitnessArgs",{enumerable:!0,get:function(){return e.v}}),exports.Zero=e.or,exports.apply=e.Et,exports.btcEcdsaPublicKeyHash=t.V,exports.btcP2pkhAddressFromPublicKey=t.H,exports.btcPublicKeyFromP2pkhAddress=t.U,exports.btcVarLengthBytesFrom=t.W,exports.buildNostrEventFromMessage=t.O,exports.bytesConcat=e.Qr,exports.bytesConcatTo=e.$r,exports.bytesEq=e.ei,exports.bytesFrom=e.ti,exports.bytesLen=e._r,exports.bytesLenUnsafe=e.vr,exports.bytesTo=e.ni,exports.calcDaoClaimEpoch=e.y,exports.calcDaoProfit=e.b,exports.codec=e.ur,exports.codecPadding=e.Kn,exports.codecUint=e.qn,exports.codecUintNumber=e.Jn,exports.depTypeFrom=e.x,exports.depTypeFromBytes=e.S,exports.depTypeToBytes=e.C,exports.epochFrom=e.St,exports.epochFromHex=e.Ct,exports.epochToHex=e.wt,exports.fixedPointFrom=e.sr,exports.fixedPointToString=e.cr,exports.gcd=e.Dt,exports.hashCkb=e.mr,exports.hashCkbShort=e.hr,exports.hashTypeFrom=e.F,exports.hashTypeFromBytes=e.I,exports.hashTypeId=t.Q,exports.hashTypeToBytes=e.L,exports.hexFrom=e.yr,exports.isDaoOutputLimitExceeded=e.w,exports.isWebview=e.Ot,exports.keystoreDecrypt=t.Y,exports.keystoreEncrypt=t.X,exports.messageHashBtcEcdsa=t.G,exports.messageHashCkbSecp256k1=t.I,exports.messageHashDogeEcdsa=t.M,Object.defineProperty(exports,"mol",{enumerable:!0,get:function(){return t.ot}}),exports.nostrEventHash=t.k,exports.numBeFromBytes=e.Yn,exports.numBeToBytes=e.Xn,exports.numFrom=e.Zn,exports.numFromBytes=e.Qn,exports.numLeFromBytes=e.$n,exports.numLeToBytes=e.er,exports.numMax=e.tr,exports.numMin=e.nr,exports.numToBytes=e.rr,exports.numToHex=e.ir,exports.recoverMessageSecp256k1=t.L,exports.reduceAsync=e.kt,exports.signMessageSecp256k1=t.R,exports.sleep=e.At,exports.stringify=e.jt,exports.udtBalanceFrom=e.T,exports.verifyMessageBtcEcdsa=t.K,exports.verifyMessageCkbSecp256k1=t.z,exports.verifyMessageDogeEcdsa=t.N,exports.verifyMessageEvmPersonal=t.j,exports.verifyMessageJoyId=t.P,exports.verifyMessageNostrEvent=t.A,exports.verifyMessageSecp256k1=t.B;
@@ -1,2 +1,2 @@
1
- import { $ as CellDep, $n as btcP2pkhAddressFromPublicKey, $r as CodecUint256BE, $t as ClientFindCellsResponse, Ai as numLeToBytes, An as verifyMessageNostrEvent, Ar as hashCkb, At as HashTypeCodec, B as ClientPublicTestnet, Bi as AddressLike, Bn as SignerDummy, Br as CodecByte16, Bt as Epoch, Ci as Num, Ct as depTypeFrom, Di as numFrom, Dn as barrel_d_exports, Dt as udtBalanceFrom, Ei as numBeToBytes, Et as isDaoOutputLimitExceeded, Fi as Codec, Fn as verifyMessageEvmPersonal, Fr as Zero, Ft as ScriptVec, G as ClientCacheMemory, Gi as BytesLike, Gn as SignerDoge, Gr as CodecRaw, Gt as CellDepInfo, H as ClientJsonRpc, Hi as HexLike, Hn as verifyMessageDogeEcdsa, Hr as CodecByte4, Ht as epochFrom, Ii as CodecLike, In as SignerEvmAddressReadonly, Ir as fixedPointFrom, It as hashTypeFrom, J as ErrorTransactionInsufficientCoin, Ji as bytesEq, Jn as verifyMessageCkbSecp256k1, Jr as CodecUint128LE, Jt as ClientBlockHeader, K as ClientCache, Ki as bytesConcat, Kn as verifyMessageJoyId, Kr as CodecUint128, Kt as CellDepInfoLike, Li as DecodedType, Ln as SignerEvm, Lr as fixedPointToString, Lt as hashTypeFromBytes, Mi as numMin, Mn as SignerNostrPublicKeyReadonly, Mr as FixedPoint, Mt as Script, Ni as numToBytes, Nn as NostrEvent, Nr as FixedPointLike, Nt as ScriptLike, Oi as numFromBytes, On as buildNostrEventFromMessage, Or as HasherKeecak256, Ot as LumosTransactionSkeletonType, Pi as numToHex, Pn as SignerNostr, Pr as One, Pt as ScriptOpt, Q as CellAnyLike, Qn as btcEcdsaPublicKeyHash, Qr as CodecUint256, Qt as ClientBlockUncleLike, Ri as EncodableType, Rn as SignerOpenLink, Rr as CodecBool, Rt as hashTypeToBytes, Si as stringify, St as calcDaoProfit, Ti as numBeFromBytes, Tt as depTypeToBytes, U as ClientJsonRpcConfig, Ui as hexFrom, Un as SignerDogePrivateKey, Ur as CodecByte8, Ut as epochFromHex, V as ClientPublicMainnet, Vi as Hex, Vn as messageHashDogeEcdsa, Vr as CodecByte32, Vt as EpochLike, W as Client, Wi as Bytes, Wn as SignerDogeAddressReadonly, Wr as CodecBytes, Wt as epochToHex, X as Cell, Xi as bytesTo, Xn as SignerCkbPrivateKey, Xr as CodecUint16BE, Xt as ClientBlockLike, Y as hashTypeId, Yi as bytesFrom, Yn as SignerCkbScriptReadonly, Yr as CodecUint16, Yt as ClientBlockHeaderLike, Z as CellAny, Zn as SignerCkbPublicKey, Zr as CodecUint16LE, Zt as ClientBlockUncle, _i as apply, _n as ErrorClientWaitTransactionTimeout, _r as barrel_d_exports$1, _t as Transaction, ai as CodecUint512BE, an as ClientIndexerSearchKeyLike, ar as SignerBtc, at as CellLike, bi as reduceAsync, bn as ScriptInfoLike, br as RequestorJsonRpc, bt as WitnessArgsLike, ci as CodecUint64BE, cn as ClientTransactionResponse, cr as Signer, ct as CellOutputVec, di as codecPadding, dn as ErrorClientBaseLike, dr as SignerType, dt as DepTypeLike, ei as CodecUint256LE, en as ClientFindTransactionsGroupedResponse, er as btcPublicKeyFromP2pkhAddress, et as CellDepLike, fi as codecUint, fn as ErrorClientDuplicatedTransaction, fr as Wallet, ft as OutPoint, gi as Constructor, gn as ErrorClientVerification, gr as SignPsbtOptionsLike, gt as SinceLike, hi as codec, hn as ErrorClientResolveUnknown, hr as SignPsbtOptions, ht as Since, ii as CodecUint512, in as ClientIndexerSearchKeyFilterLike, ir as SignerBtcPublicKeyReadonly, it as CellInputVec, ji as numMax, jn as SignerNostrPrivateKey, jr as Hasher, jt as HashTypeLike, ki as numLeFromBytes, kn as nostrEventHash, kr as HasherCkb, kt as HashType, li as CodecUint64LE, ln as ClientTransactionResponseLike, lr as SignerInfo, lt as DepType, mi as Entity, mn as ErrorClientRBFRejected, mr as InputToSignLike, mt as RawTransaction, ni as CodecUint32BE, nn as ClientIndexerSearchKey, nr as messageHashBtcEcdsa, nt as CellInput, oi as CodecUint512LE, on as ClientIndexerSearchKeyTransaction, or as NetworkPreference, ot as CellOutput, pi as codecUintNumber, pn as ErrorClientMaxFeeRateExceeded, pr as InputToSign, pt as OutPointLike, q as ErrorTransactionInsufficientCapacity, qi as bytesConcatTo, qn as messageHashCkbSecp256k1, qr as CodecUint128BE, qt as ClientBlock, ri as CodecUint32LE, rn as ClientIndexerSearchKeyFilter, rr as verifyMessageBtcEcdsa, rt as CellInputLike, si as CodecUint64, sn as ClientIndexerSearchKeyTransactionLike, sr as Signature, st as CellOutputLike, ti as CodecUint32, tn as ClientFindTransactionsResponse, tr as btcVarLengthBytesFrom, tt as CellDepVec, ui as CodecUint8, un as ErrorClientBase, ur as SignerSignType, ut as DepTypeCodec, vi as gcd, vn as OutputsValidator, vr as keystoreDecrypt, vt as TransactionLike, wi as NumLike, wt as depTypeFromBytes, xi as sleep, xn as TransactionStatus, xr as RequestorJsonRpcConfig, xt as calcDaoClaimEpoch, yi as isWebview, yn as ScriptInfo, yr as keystoreEncrypt, yt as WitnessArgs, zi as Address, zn as SignerAlwaysError, zr as CodecByte, zt as KnownScript } from "./advancedBarrel-DRDT4GBS.js";
2
- export { Address, AddressLike, Bytes, BytesLike, Cell, CellAny, CellAnyLike, CellDep, CellDepInfo, CellDepInfoLike, CellDepLike, CellDepVec, CellInput, CellInputLike, CellInputVec, CellLike, CellOutput, CellOutputLike, CellOutputVec, Client, ClientBlock, ClientBlockHeader, ClientBlockHeaderLike, ClientBlockLike, ClientBlockUncle, ClientBlockUncleLike, ClientCache, ClientCacheMemory, ClientFindCellsResponse, ClientFindTransactionsGroupedResponse, ClientFindTransactionsResponse, ClientIndexerSearchKey, ClientIndexerSearchKeyFilter, ClientIndexerSearchKeyFilterLike, ClientIndexerSearchKeyLike, ClientIndexerSearchKeyTransaction, ClientIndexerSearchKeyTransactionLike, ClientJsonRpc, ClientJsonRpcConfig, ClientPublicMainnet, ClientPublicTestnet, ClientTransactionResponse, ClientTransactionResponseLike, Codec, CodecBool, CodecByte, CodecByte16, CodecByte32, CodecByte4, CodecByte8, CodecBytes, CodecLike, CodecRaw, CodecUint128, CodecUint128BE, CodecUint128LE, CodecUint16, CodecUint16BE, CodecUint16LE, CodecUint256, CodecUint256BE, CodecUint256LE, CodecUint32, CodecUint32BE, CodecUint32LE, CodecUint512, CodecUint512BE, CodecUint512LE, CodecUint64, CodecUint64BE, CodecUint64LE, CodecUint8, Constructor, DecodedType, DepType, DepTypeCodec, DepTypeLike, EncodableType, Entity, Epoch, EpochLike, ErrorClientBase, ErrorClientBaseLike, ErrorClientDuplicatedTransaction, ErrorClientMaxFeeRateExceeded, ErrorClientRBFRejected, ErrorClientResolveUnknown, ErrorClientVerification, ErrorClientWaitTransactionTimeout, ErrorTransactionInsufficientCapacity, ErrorTransactionInsufficientCoin, FixedPoint, FixedPointLike, HashType, HashTypeCodec, HashTypeLike, Hasher, HasherCkb, HasherKeecak256, Hex, HexLike, InputToSign, InputToSignLike, KnownScript, LumosTransactionSkeletonType, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, Script, ScriptInfo, ScriptInfoLike, ScriptLike, ScriptOpt, ScriptVec, SignPsbtOptions, SignPsbtOptionsLike, Signature, Signer, SignerAlwaysError, SignerBtc, SignerBtcPublicKeyReadonly, SignerCkbPrivateKey, SignerCkbPublicKey, SignerCkbScriptReadonly, SignerDoge, SignerDogeAddressReadonly, SignerDogePrivateKey, SignerDummy, SignerEvm, SignerEvmAddressReadonly, SignerInfo, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, apply, btcEcdsaPublicKeyHash, btcP2pkhAddressFromPublicKey, btcPublicKeyFromP2pkhAddress, btcVarLengthBytesFrom, buildNostrEventFromMessage, bytesConcat, bytesConcatTo, bytesEq, bytesFrom, bytesTo, calcDaoClaimEpoch, calcDaoProfit, barrel_d_exports as ccc, codec, codecPadding, codecUint, codecUintNumber, depTypeFrom, depTypeFromBytes, depTypeToBytes, epochFrom, epochFromHex, epochToHex, fixedPointFrom, fixedPointToString, gcd, hashCkb, hashTypeFrom, hashTypeFromBytes, hashTypeId, hashTypeToBytes, hexFrom, isDaoOutputLimitExceeded, isWebview, keystoreDecrypt, keystoreEncrypt, messageHashBtcEcdsa, messageHashCkbSecp256k1, messageHashDogeEcdsa, barrel_d_exports$1 as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, reduceAsync, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent };
1
+ import { $ as CellDep, $i as AddressLike, $n as SignerCkbPublicKey, $r as CodecByte16, $t as ClientFindCellsResponse, Ai as apply, An as verifyMessageNostrEvent, Ar as RequestorJsonRpc, At as HashTypeCodec, B as ClientPublicTestnet, Bi as numFrom, Bn as SignerDummy, Br as HASH_CKB_SHORT_LENGTH, Bt as Epoch, Ci as CodecUint8, Cr as InputToSign, Ct as depTypeFrom, Di as Entity, Dn as barrel_d_exports, Dr as barrel_d_exports$1, Dt as udtBalanceFrom, Ei as codecUintNumber, Er as SignPsbtOptionsLike, Et as isDaoOutputLimitExceeded, Fi as stringify, Fn as verifyMessageEvmPersonal, Ft as ScriptVec, G as ClientCacheMemory, Gi as numMin, Gn as SignerDoge, Gr as FixedPoint, Gt as CellDepInfo, H as ClientJsonRpc, Hi as numLeFromBytes, Hn as verifyMessageDogeEcdsa, Hr as hashCkb, Ht as epochFrom, Ii as Num, In as SignerEvmAddressReadonly, It as hashTypeFrom, J as ErrorTransactionInsufficientCoin, Ji as Codec, Jn as MultisigCkbWitness, Jr as Zero, Jt as ClientBlockHeader, K as ClientCache, Ki as numToBytes, Kn as verifyMessageJoyId, Kr as FixedPointLike, Kt as CellDepInfoLike, Li as NumLike, Ln as SignerEvm, Lt as hashTypeFromBytes, Mi as isWebview, Mn as SignerNostrPublicKeyReadonly, Mt as Script, Ni as reduceAsync, Nn as NostrEvent, Nt as ScriptLike, Oi as codec, On as buildNostrEventFromMessage, Or as keystoreDecrypt, Ot as LumosTransactionSkeletonType, Pi as sleep, Pn as SignerNostr, Pt as ScriptOpt, Q as CellAnyLike, Qi as Address, Qn as SignerCkbPrivateKey, Qr as CodecByte, Qt as ClientBlockUncleLike, Ri as numBeFromBytes, Rn as SignerOpenLink, Rr as HasherKeecak256, Rt as hashTypeToBytes, Si as CodecUint64LE, Sr as Wallet, St as calcDaoProfit, Ti as codecUint, Tr as SignPsbtOptions, Tt as depTypeToBytes, U as ClientJsonRpcConfig, Ui as numLeToBytes, Un as SignerDogePrivateKey, Ur as hashCkbShort, Ut as epochFromHex, V as ClientPublicMainnet, Vi as numFromBytes, Vn as messageHashDogeEcdsa, Vr as HasherCkb, Vt as EpochLike, W as Client, Wi as numMax, Wn as SignerDogeAddressReadonly, Wr as Hasher, Wt as epochToHex, X as Cell, Xi as DecodedType, Xn as SignerMultisigCkbReadonly, Xr as fixedPointToString, Xt as ClientBlockLike, Y as hashTypeId, Yi as CodecLike, Yn as MultisigCkbWitnessLike, Yr as fixedPointFrom, Yt as ClientBlockHeaderLike, Z as CellAny, Zi as EncodableType, Zn as SignerCkbScriptReadonly, Zr as CodecBool, Zt as ClientBlockUncle, _i as CodecUint512, _n as ErrorClientWaitTransactionTimeout, _r as SignerInfo, _t as Transaction, aa as Bytes, ai as CodecUint128, an as ClientIndexerSearchKeyLike, ar as verifyMessageSecp256k1, at as CellLike, bi as CodecUint64, bn as ScriptInfoLike, br as SignerSignType, bt as WitnessArgsLike, ca as bytesConcatTo, ci as CodecUint16, cn as ClientTransactionResponse, cr as btcPublicKeyFromP2pkhAddress, ct as CellOutputVec, da as bytesTo, di as CodecUint256, dn as ErrorClientBaseLike, dr as verifyMessageBtcEcdsa, dt as DepTypeLike, ea as Hex, ei as CodecByte32, en as ClientFindTransactionsGroupedResponse, er as SECP256K1_SIGNATURE_LENGTH, et as CellDepLike, fi as CodecUint256BE, fn as ErrorClientDuplicatedTransaction, fr as SignerBtcPublicKeyReadonly, ft as OutPoint, gi as CodecUint32LE, gn as ErrorClientVerification, gr as Signer, gt as SinceLike, hi as CodecUint32BE, hn as ErrorClientResolveUnknown, hr as Signature, ht as Since, ia as hexFrom, ii as CodecRaw, in as ClientIndexerSearchKeyFilterLike, ir as verifyMessageCkbSecp256k1, it as CellInputVec, ji as gcd, jn as SignerNostrPrivateKey, jr as RequestorJsonRpcConfig, jt as HashTypeLike, ki as Constructor, kn as nostrEventHash, kr as keystoreEncrypt, kt as HashType, la as bytesEq, li as CodecUint16BE, ln as ClientTransactionResponseLike, lr as btcVarLengthBytesFrom, lt as DepType, mi as CodecUint32, mn as ErrorClientRBFRejected, mr as NetworkPreference, mt as RawTransaction, na as bytesLen, ni as CodecByte8, nn as ClientIndexerSearchKey, nr as recoverMessageSecp256k1, nt as CellInput, oa as BytesLike, oi as CodecUint128BE, on as ClientIndexerSearchKeyTransaction, or as btcEcdsaPublicKeyHash, ot as CellOutput, pi as CodecUint256LE, pn as ErrorClientMaxFeeRateExceeded, pr as SignerBtc, pt as OutPointLike, q as ErrorTransactionInsufficientCapacity, qi as numToHex, qn as SignerMultisigCkbPrivateKey, qr as One, qt as ClientBlock, ra as bytesLenUnsafe, ri as CodecBytes, rn as ClientIndexerSearchKeyFilter, rr as signMessageSecp256k1, rt as CellInputLike, sa as bytesConcat, si as CodecUint128LE, sn as ClientIndexerSearchKeyTransactionLike, sr as btcP2pkhAddressFromPublicKey, st as CellOutputLike, ta as HexLike, ti as CodecByte4, tn as ClientFindTransactionsResponse, tr as messageHashCkbSecp256k1, tt as CellDepVec, ua as bytesFrom, ui as CodecUint16LE, un as ErrorClientBase, ur as messageHashBtcEcdsa, ut as DepTypeCodec, vi as CodecUint512BE, vn as OutputsValidator, vr as SignerMultisig, vt as TransactionLike, wi as codecPadding, wr as InputToSignLike, wt as depTypeFromBytes, xi as CodecUint64BE, xn as TransactionStatus, xr as SignerType, xt as calcDaoClaimEpoch, yi as CodecUint512LE, yn as ScriptInfo, yr as SignerMultisigNotEnoughSignaturesError, yt as WitnessArgs, zi as numBeToBytes, zn as SignerAlwaysError, zr as HASH_CKB_LENGTH, zt as KnownScript } from "./advancedBarrel-D97MfkUZ.js";
2
+ export { Address, AddressLike, Bytes, BytesLike, Cell, CellAny, CellAnyLike, CellDep, CellDepInfo, CellDepInfoLike, CellDepLike, CellDepVec, CellInput, CellInputLike, CellInputVec, CellLike, CellOutput, CellOutputLike, CellOutputVec, Client, ClientBlock, ClientBlockHeader, ClientBlockHeaderLike, ClientBlockLike, ClientBlockUncle, ClientBlockUncleLike, ClientCache, ClientCacheMemory, ClientFindCellsResponse, ClientFindTransactionsGroupedResponse, ClientFindTransactionsResponse, ClientIndexerSearchKey, ClientIndexerSearchKeyFilter, ClientIndexerSearchKeyFilterLike, ClientIndexerSearchKeyLike, ClientIndexerSearchKeyTransaction, ClientIndexerSearchKeyTransactionLike, ClientJsonRpc, ClientJsonRpcConfig, ClientPublicMainnet, ClientPublicTestnet, ClientTransactionResponse, ClientTransactionResponseLike, Codec, CodecBool, CodecByte, CodecByte16, CodecByte32, CodecByte4, CodecByte8, CodecBytes, CodecLike, CodecRaw, CodecUint128, CodecUint128BE, CodecUint128LE, CodecUint16, CodecUint16BE, CodecUint16LE, CodecUint256, CodecUint256BE, CodecUint256LE, CodecUint32, CodecUint32BE, CodecUint32LE, CodecUint512, CodecUint512BE, CodecUint512LE, CodecUint64, CodecUint64BE, CodecUint64LE, CodecUint8, Constructor, DecodedType, DepType, DepTypeCodec, DepTypeLike, EncodableType, Entity, Epoch, EpochLike, ErrorClientBase, ErrorClientBaseLike, ErrorClientDuplicatedTransaction, ErrorClientMaxFeeRateExceeded, ErrorClientRBFRejected, ErrorClientResolveUnknown, ErrorClientVerification, ErrorClientWaitTransactionTimeout, ErrorTransactionInsufficientCapacity, ErrorTransactionInsufficientCoin, FixedPoint, FixedPointLike, HASH_CKB_LENGTH, HASH_CKB_SHORT_LENGTH, HashType, HashTypeCodec, HashTypeLike, Hasher, HasherCkb, HasherKeecak256, Hex, HexLike, InputToSign, InputToSignLike, KnownScript, LumosTransactionSkeletonType, MultisigCkbWitness, MultisigCkbWitnessLike, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, SECP256K1_SIGNATURE_LENGTH, Script, ScriptInfo, ScriptInfoLike, ScriptLike, ScriptOpt, ScriptVec, SignPsbtOptions, SignPsbtOptionsLike, Signature, Signer, SignerAlwaysError, SignerBtc, SignerBtcPublicKeyReadonly, SignerCkbPrivateKey, SignerCkbPublicKey, SignerCkbScriptReadonly, SignerDoge, SignerDogeAddressReadonly, SignerDogePrivateKey, SignerDummy, SignerEvm, SignerEvmAddressReadonly, SignerInfo, SignerMultisig, SignerMultisigCkbPrivateKey, SignerMultisigCkbReadonly, SignerMultisigNotEnoughSignaturesError, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, apply, btcEcdsaPublicKeyHash, btcP2pkhAddressFromPublicKey, btcPublicKeyFromP2pkhAddress, btcVarLengthBytesFrom, buildNostrEventFromMessage, bytesConcat, bytesConcatTo, bytesEq, bytesFrom, bytesLen, bytesLenUnsafe, bytesTo, calcDaoClaimEpoch, calcDaoProfit, barrel_d_exports as ccc, codec, codecPadding, codecUint, codecUintNumber, depTypeFrom, depTypeFromBytes, depTypeToBytes, epochFrom, epochFromHex, epochToHex, fixedPointFrom, fixedPointToString, gcd, hashCkb, hashCkbShort, hashTypeFrom, hashTypeFromBytes, hashTypeId, hashTypeToBytes, hexFrom, isDaoOutputLimitExceeded, isWebview, keystoreDecrypt, keystoreEncrypt, messageHashBtcEcdsa, messageHashCkbSecp256k1, messageHashDogeEcdsa, barrel_d_exports$1 as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, recoverMessageSecp256k1, reduceAsync, signMessageSecp256k1, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1 };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-COp7SNhZ.js"),t=require("./barrel-CXC2Uy5L.js");exports.Address=t.H,exports.Bytes=e.hr,exports.Cell=e.a,exports.CellAny=e.o,Object.defineProperty(exports,"CellDep",{enumerable:!0,get:function(){return e.s}}),exports.CellDepInfo=e.nt,exports.CellDepVec=e.c,Object.defineProperty(exports,"CellInput",{enumerable:!0,get:function(){return e.l}}),exports.CellInputVec=e.u,Object.defineProperty(exports,"CellOutput",{enumerable:!0,get:function(){return e.d}}),exports.CellOutputVec=e.f,exports.Client=t.J,exports.ClientBlock=e.rt,exports.ClientBlockHeader=e.it,exports.ClientBlockUncle=e.at,exports.ClientCache=t.X,exports.ClientCacheMemory=t.Y,exports.ClientIndexerSearchKey=e.ot,exports.ClientIndexerSearchKeyFilter=e.st,exports.ClientIndexerSearchKeyTransaction=e.ct,exports.ClientJsonRpc=t.K,exports.ClientPublicMainnet=t.G,exports.ClientPublicTestnet=t.W,exports.ClientTransactionResponse=e.lt,exports.Codec=e.mr,exports.CodecBool=e.Sn,exports.CodecByte=e.Cn,exports.CodecByte16=e.wn,exports.CodecByte32=e.Tn,exports.CodecByte4=e.En,exports.CodecByte8=e.Dn,exports.CodecBytes=e.On,exports.CodecRaw=e.kn,exports.CodecUint128=e.An,exports.CodecUint128BE=e.jn,exports.CodecUint128LE=e.Mn,exports.CodecUint16=e.Nn,exports.CodecUint16BE=e.Pn,exports.CodecUint16LE=e.Fn,exports.CodecUint256=e.In,exports.CodecUint256BE=e.Ln,exports.CodecUint256LE=e.Rn,exports.CodecUint32=e.zn,exports.CodecUint32BE=e.Bn,exports.CodecUint32LE=e.Vn,exports.CodecUint512=e.Hn,exports.CodecUint512BE=e.Un,exports.CodecUint512LE=e.Wn,exports.CodecUint64=e.Gn,exports.CodecUint64BE=e.Kn,exports.CodecUint64LE=e.qn,exports.CodecUint8=e.Jn,exports.DepTypeCodec=e.p,exports.Entity=e.cr,Object.defineProperty(exports,"Epoch",{enumerable:!0,get:function(){return e.xt}}),exports.ErrorClientBase=e.ut,exports.ErrorClientDuplicatedTransaction=e.dt,exports.ErrorClientMaxFeeRateExceeded=e.ft,exports.ErrorClientRBFRejected=e.pt,exports.ErrorClientResolveUnknown=e.mt,exports.ErrorClientVerification=e.ht,exports.ErrorClientWaitTransactionTimeout=e.gt,exports.ErrorTransactionInsufficientCapacity=e.E,exports.ErrorTransactionInsufficientCoin=e.D,exports.HashTypeCodec=e.j,exports.HasherCkb=e.ur,exports.HasherKeecak256=t.Q,exports.InputToSign=t.R,exports.KnownScript=e.J,exports.One=e.vn,Object.defineProperty(exports,"OutPoint",{enumerable:!0,get:function(){return e.m}}),exports.RawTransaction=e.h,exports.RequestorJsonRpc=t.q,Object.defineProperty(exports,"Script",{enumerable:!0,get:function(){return e.M}}),exports.ScriptInfo=e._t,exports.ScriptOpt=e.N,exports.ScriptVec=e.P,exports.SignPsbtOptions=t.z,exports.Signature=t.v,exports.Signer=t.y,exports.SignerAlwaysError=t.c,exports.SignerBtc=t._,exports.SignerBtcPublicKeyReadonly=t.g,exports.SignerCkbPrivateKey=t.m,exports.SignerCkbPublicKey=t.h,exports.SignerCkbScriptReadonly=t.p,exports.SignerDoge=t.f,exports.SignerDogeAddressReadonly=t.d,exports.SignerDogePrivateKey=t.u,exports.SignerDummy=t.l,exports.SignerEvm=t.o,exports.SignerEvmAddressReadonly=t.a,exports.SignerInfo=t.b,exports.SignerNostr=t.i,exports.SignerNostrPrivateKey=t.n,exports.SignerNostrPublicKeyReadonly=t.r,exports.SignerOpenLink=t.s,exports.SignerSignType=t.x,exports.SignerType=t.S,Object.defineProperty(exports,"Since",{enumerable:!0,get:function(){return e.g}}),Object.defineProperty(exports,"Transaction",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(exports,"WitnessArgs",{enumerable:!0,get:function(){return e.v}}),exports.Zero=e.yn,exports.apply=e.Tt,exports.btcEcdsaPublicKeyHash=t.M,exports.btcP2pkhAddressFromPublicKey=t.N,exports.btcPublicKeyFromP2pkhAddress=t.P,exports.btcVarLengthBytesFrom=t.F,exports.buildNostrEventFromMessage=t.C,exports.bytesConcat=e.gr,exports.bytesConcatTo=e._r,exports.bytesEq=e.vr,exports.bytesFrom=e.yr,exports.bytesTo=e.br,exports.calcDaoClaimEpoch=e.y,exports.calcDaoProfit=e.b,Object.defineProperty(exports,"ccc",{enumerable:!0,get:function(){return t.t}}),exports.codec=e.lr,exports.codecPadding=e.Yn,exports.codecUint=e.Xn,exports.codecUintNumber=e.Zn,exports.depTypeFrom=e.x,exports.depTypeFromBytes=e.S,exports.depTypeToBytes=e.C,exports.epochFrom=e.St,exports.epochFromHex=e.Ct,exports.epochToHex=e.wt,exports.fixedPointFrom=e.bn,exports.fixedPointToString=e.xn,exports.gcd=e.Et,exports.hashCkb=e.dr,exports.hashTypeFrom=e.F,exports.hashTypeFromBytes=e.I,exports.hashTypeId=t.U,exports.hashTypeToBytes=e.L,exports.hexFrom=e.pr,exports.isDaoOutputLimitExceeded=e.w,exports.isWebview=e.Dt,exports.keystoreDecrypt=t.B,exports.keystoreEncrypt=t.V,exports.messageHashBtcEcdsa=t.I,exports.messageHashCkbSecp256k1=t.A,exports.messageHashDogeEcdsa=t.D,Object.defineProperty(exports,"mol",{enumerable:!0,get:function(){return t.Z}}),exports.nostrEventHash=t.w,exports.numBeFromBytes=e.Qn,exports.numBeToBytes=e.$n,exports.numFrom=e.er,exports.numFromBytes=e.tr,exports.numLeFromBytes=e.nr,exports.numLeToBytes=e.rr,exports.numMax=e.ir,exports.numMin=e.ar,exports.numToBytes=e.or,exports.numToHex=e.sr,exports.reduceAsync=e.Ot,exports.sleep=e.kt,exports.stringify=e.At,exports.udtBalanceFrom=e.T,exports.verifyMessageBtcEcdsa=t.L,exports.verifyMessageCkbSecp256k1=t.j,exports.verifyMessageDogeEcdsa=t.O,exports.verifyMessageEvmPersonal=t.E,exports.verifyMessageJoyId=t.k,exports.verifyMessageNostrEvent=t.T;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-UCU9Hn8t.js"),t=require("./barrel-D5PRJCB6.js");exports.Address=t.Z,exports.Bytes=e.Zr,exports.Cell=e.a,exports.CellAny=e.o,Object.defineProperty(exports,"CellDep",{enumerable:!0,get:function(){return e.s}}),exports.CellDepInfo=e.nt,exports.CellDepVec=e.c,Object.defineProperty(exports,"CellInput",{enumerable:!0,get:function(){return e.l}}),exports.CellInputVec=e.u,Object.defineProperty(exports,"CellOutput",{enumerable:!0,get:function(){return e.d}}),exports.CellOutputVec=e.f,exports.Client=t.rt,exports.ClientBlock=e.rt,exports.ClientBlockHeader=e.it,exports.ClientBlockUncle=e.at,exports.ClientCache=t.at,exports.ClientCacheMemory=t.it,exports.ClientIndexerSearchKey=e.ot,exports.ClientIndexerSearchKeyFilter=e.st,exports.ClientIndexerSearchKeyTransaction=e.ct,exports.ClientJsonRpc=t.tt,exports.ClientPublicMainnet=t.et,exports.ClientPublicTestnet=t.$,exports.ClientTransactionResponse=e.lt,exports.Codec=e.Xr,exports.CodecBool=e.yn,exports.CodecByte=e.bn,exports.CodecByte16=e.xn,exports.CodecByte32=e.Sn,exports.CodecByte4=e.Cn,exports.CodecByte8=e.wn,exports.CodecBytes=e.Tn,exports.CodecRaw=e.En,exports.CodecUint128=e.Dn,exports.CodecUint128BE=e.On,exports.CodecUint128LE=e.kn,exports.CodecUint16=e.An,exports.CodecUint16BE=e.jn,exports.CodecUint16LE=e.Mn,exports.CodecUint256=e.Nn,exports.CodecUint256BE=e.Pn,exports.CodecUint256LE=e.Fn,exports.CodecUint32=e.In,exports.CodecUint32BE=e.Ln,exports.CodecUint32LE=e.Rn,exports.CodecUint512=e.zn,exports.CodecUint512BE=e.Bn,exports.CodecUint512LE=e.Vn,exports.CodecUint64=e.Hn,exports.CodecUint64BE=e.Un,exports.CodecUint64LE=e.Wn,exports.CodecUint8=e.Gn,exports.DepTypeCodec=e.p,exports.Entity=e.lr,Object.defineProperty(exports,"Epoch",{enumerable:!0,get:function(){return e.xt}}),exports.ErrorClientBase=e.ut,exports.ErrorClientDuplicatedTransaction=e.dt,exports.ErrorClientMaxFeeRateExceeded=e.ft,exports.ErrorClientRBFRejected=e.pt,exports.ErrorClientResolveUnknown=e.mt,exports.ErrorClientVerification=e.ht,exports.ErrorClientWaitTransactionTimeout=e.gt,exports.ErrorTransactionInsufficientCapacity=e.E,exports.ErrorTransactionInsufficientCoin=e.D,exports.HASH_CKB_LENGTH=e.dr,exports.HASH_CKB_SHORT_LENGTH=e.fr,exports.HashTypeCodec=e.j,exports.HasherCkb=e.pr,exports.HasherKeecak256=t.st,exports.InputToSign=t.q,exports.KnownScript=e.J,Object.defineProperty(exports,"MultisigCkbWitness",{enumerable:!0,get:function(){return t.m}}),exports.One=e.ar,Object.defineProperty(exports,"OutPoint",{enumerable:!0,get:function(){return e.m}}),exports.RawTransaction=e.h,exports.RequestorJsonRpc=t.nt,exports.SECP256K1_SIGNATURE_LENGTH=t.F,Object.defineProperty(exports,"Script",{enumerable:!0,get:function(){return e.M}}),exports.ScriptInfo=e._t,exports.ScriptOpt=e.N,exports.ScriptVec=e.P,exports.SignPsbtOptions=t.J,exports.Signature=t.x,exports.Signer=t.S,exports.SignerAlwaysError=t.c,exports.SignerBtc=t.b,exports.SignerBtcPublicKeyReadonly=t.y,exports.SignerCkbPrivateKey=t._,exports.SignerCkbPublicKey=t.v,exports.SignerCkbScriptReadonly=t.g,exports.SignerDoge=t.f,exports.SignerDogeAddressReadonly=t.d,exports.SignerDogePrivateKey=t.u,exports.SignerDummy=t.l,exports.SignerEvm=t.o,exports.SignerEvmAddressReadonly=t.a,exports.SignerInfo=t.C,exports.SignerMultisig=t.w,exports.SignerMultisigCkbPrivateKey=t.p,exports.SignerMultisigCkbReadonly=t.h,exports.SignerMultisigNotEnoughSignaturesError=t.T,exports.SignerNostr=t.i,exports.SignerNostrPrivateKey=t.n,exports.SignerNostrPublicKeyReadonly=t.r,exports.SignerOpenLink=t.s,exports.SignerSignType=t.E,exports.SignerType=t.D,Object.defineProperty(exports,"Since",{enumerable:!0,get:function(){return e.g}}),Object.defineProperty(exports,"Transaction",{enumerable:!0,get:function(){return e._}}),Object.defineProperty(exports,"WitnessArgs",{enumerable:!0,get:function(){return e.v}}),exports.Zero=e.or,exports.apply=e.Et,exports.btcEcdsaPublicKeyHash=t.V,exports.btcP2pkhAddressFromPublicKey=t.H,exports.btcPublicKeyFromP2pkhAddress=t.U,exports.btcVarLengthBytesFrom=t.W,exports.buildNostrEventFromMessage=t.O,exports.bytesConcat=e.Qr,exports.bytesConcatTo=e.$r,exports.bytesEq=e.ei,exports.bytesFrom=e.ti,exports.bytesLen=e._r,exports.bytesLenUnsafe=e.vr,exports.bytesTo=e.ni,exports.calcDaoClaimEpoch=e.y,exports.calcDaoProfit=e.b,Object.defineProperty(exports,"ccc",{enumerable:!0,get:function(){return t.t}}),exports.codec=e.ur,exports.codecPadding=e.Kn,exports.codecUint=e.qn,exports.codecUintNumber=e.Jn,exports.depTypeFrom=e.x,exports.depTypeFromBytes=e.S,exports.depTypeToBytes=e.C,exports.epochFrom=e.St,exports.epochFromHex=e.Ct,exports.epochToHex=e.wt,exports.fixedPointFrom=e.sr,exports.fixedPointToString=e.cr,exports.gcd=e.Dt,exports.hashCkb=e.mr,exports.hashCkbShort=e.hr,exports.hashTypeFrom=e.F,exports.hashTypeFromBytes=e.I,exports.hashTypeId=t.Q,exports.hashTypeToBytes=e.L,exports.hexFrom=e.yr,exports.isDaoOutputLimitExceeded=e.w,exports.isWebview=e.Ot,exports.keystoreDecrypt=t.Y,exports.keystoreEncrypt=t.X,exports.messageHashBtcEcdsa=t.G,exports.messageHashCkbSecp256k1=t.I,exports.messageHashDogeEcdsa=t.M,Object.defineProperty(exports,"mol",{enumerable:!0,get:function(){return t.ot}}),exports.nostrEventHash=t.k,exports.numBeFromBytes=e.Yn,exports.numBeToBytes=e.Xn,exports.numFrom=e.Zn,exports.numFromBytes=e.Qn,exports.numLeFromBytes=e.$n,exports.numLeToBytes=e.er,exports.numMax=e.tr,exports.numMin=e.nr,exports.numToBytes=e.rr,exports.numToHex=e.ir,exports.recoverMessageSecp256k1=t.L,exports.reduceAsync=e.kt,exports.signMessageSecp256k1=t.R,exports.sleep=e.At,exports.stringify=e.jt,exports.udtBalanceFrom=e.T,exports.verifyMessageBtcEcdsa=t.K,exports.verifyMessageCkbSecp256k1=t.z,exports.verifyMessageDogeEcdsa=t.N,exports.verifyMessageEvmPersonal=t.j,exports.verifyMessageJoyId=t.P,exports.verifyMessageNostrEvent=t.A,exports.verifyMessageSecp256k1=t.B;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/core",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "description": "Core of CCC - CKBer's Codebase",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
@@ -33,34 +33,45 @@
33
33
  "./package.json": "./package.json"
34
34
  },
35
35
  "devDependencies": {
36
- "@eslint/js": "^9.34.0",
36
+ "@eslint/js": "^10.0.1",
37
37
  "@types/ws": "^8.18.1",
38
- "eslint": "^9.34.0",
38
+ "eslint": "^10.5.0",
39
39
  "eslint-config-prettier": "^10.1.8",
40
- "eslint-plugin-prettier": "^5.5.4",
41
- "prettier": "^3.6.2",
42
- "prettier-plugin-organize-imports": "^4.2.0",
40
+ "eslint-plugin-prettier": "^5.5.6",
41
+ "prettier": "^3.8.4",
42
+ "prettier-plugin-organize-imports": "^4.3.0",
43
43
  "tsdown": "0.22.3",
44
- "typescript": "^5.9.2",
45
- "typescript-eslint": "^8.41.0",
46
- "vitest": "^3.2.4"
44
+ "typescript": "^6.0.3",
45
+ "typescript-eslint": "^8.61.1",
46
+ "vitest": "^4.1.9"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@joyid/ckb": "^1.1.2",
52
+ "@joyid/ckb": "^1.1.4",
53
53
  "@noble/ciphers": "^2.2.0",
54
54
  "@noble/curves": "^2.2.0",
55
55
  "@noble/hashes": "^2.2.0",
56
56
  "bech32": "^2.0.0",
57
57
  "bs58check": "^4.0.0",
58
58
  "buffer": "^6.0.3",
59
- "ethers": "^6.15.0",
59
+ "ethers": "^6.17.0",
60
60
  "isomorphic-ws": "^5.0.0",
61
- "ws": "^8.18.3"
61
+ "ws": "^8.21.0"
62
62
  },
63
63
  "types": "./dist.commonjs/index.d.ts",
64
+ "inlinedDependencies": {
65
+ "@noble/ciphers": "2.2.0",
66
+ "@noble/curves": "2.2.0",
67
+ "@noble/hashes": [
68
+ "1.8.0",
69
+ "2.2.0"
70
+ ],
71
+ "base-x": "5.0.1",
72
+ "bs58": "6.0.0",
73
+ "bs58check": "4.0.0"
74
+ },
64
75
  "scripts": {
65
76
  "test": "vitest",
66
77
  "test:ci": "vitest run",
@@ -30,10 +30,10 @@ export function addressPayloadFromString(address: string): {
30
30
  try {
31
31
  const { words, prefix } = bech32m.decode(address, ADDRESS_BECH32_LIMIT);
32
32
  const decoded = bech32m.fromWords(words);
33
- const formatType = decoded[0];
33
+ const formatType: AddressFormat = decoded[0];
34
34
  const payload = decoded.slice(1);
35
35
 
36
- if (formatType === (AddressFormat.Full as number)) {
36
+ if (formatType === AddressFormat.Full) {
37
37
  return { prefix, format: AddressFormat.Full, payload };
38
38
  }
39
39
  } catch (_) {}
@@ -42,7 +42,7 @@ export function addressPayloadFromString(address: string): {
42
42
  try {
43
43
  const { prefix, words } = bech32.decode(address, ADDRESS_BECH32_LIMIT);
44
44
  const decoded = bech32.fromWords(words);
45
- const formatType = decoded[0];
45
+ const formatType: AddressFormat = decoded[0];
46
46
  const payload = decoded.slice(1);
47
47
  if (
48
48
  [
@@ -1768,10 +1768,29 @@ export class Transaction extends Entity.Base<TransactionLike, Transaction>() {
1768
1768
  *
1769
1769
  * @example
1770
1770
  * ```typescript
1771
- * const witnessArgs = await tx.getWitnessArgsAt(0);
1771
+ * const witnessArgs = tx.getWitnessArgsAt(0);
1772
1772
  * ```
1773
1773
  */
1774
1774
  getWitnessArgsAt(index: number): WitnessArgs | undefined {
1775
+ try {
1776
+ return this.getWitnessArgsAtUnsafe(index);
1777
+ } catch (_) {
1778
+ return undefined;
1779
+ }
1780
+ }
1781
+
1782
+ /**
1783
+ * Get witness at index as WitnessArgs, throw if failed to decode
1784
+ *
1785
+ * @param index - The index of the witness.
1786
+ * @returns The witness parsed as WitnessArgs.
1787
+ *
1788
+ * @example
1789
+ * ```typescript
1790
+ * const witnessArgs = tx.getWitnessArgsAtUnsafe(0);
1791
+ * ```
1792
+ */
1793
+ getWitnessArgsAtUnsafe(index: number): WitnessArgs | undefined {
1775
1794
  const rawWitness = this.witnesses[index];
1776
1795
  return (rawWitness ?? "0x") !== "0x"
1777
1796
  ? WitnessArgs.fromBytes(rawWitness)
@@ -54,6 +54,23 @@ export const MAINNET_SCRIPTS: Record<KnownScript, ScriptInfoLike | undefined> =
54
54
  },
55
55
  ],
56
56
  },
57
+ [KnownScript.Secp256k1MultisigV2Beta]: {
58
+ codeHash:
59
+ "0xd1a9f877aed3f5e07cb9c52b61ab96d06f250ae6883cc7f0a2423db0976fc821",
60
+ hashType: "type",
61
+ cellDeps: [
62
+ {
63
+ cellDep: {
64
+ outPoint: {
65
+ txHash:
66
+ "0x44be4f4feda80c0e41783ab10e191df3b2bb5c3731b0970c916dbec385dcdc60",
67
+ index: 0,
68
+ },
69
+ depType: "depGroup",
70
+ },
71
+ },
72
+ ],
73
+ },
57
74
  [KnownScript.Secp256k1MultisigV2]: {
58
75
  codeHash:
59
76
  "0x36c971b8d41fbd94aabca77dc75e826729ac98447b46f91e00796155dddb0d29",
@@ -54,6 +54,23 @@ export const TESTNET_SCRIPTS: Record<KnownScript, ScriptInfoLike> =
54
54
  },
55
55
  ],
56
56
  },
57
+ [KnownScript.Secp256k1MultisigV2Beta]: {
58
+ codeHash:
59
+ "0x765b3ed6ae264b335d07e73ac332bf2c0f38f8d3340ed521cb447b4c42dd5f09",
60
+ hashType: "type",
61
+ cellDeps: [
62
+ {
63
+ cellDep: {
64
+ outPoint: {
65
+ txHash:
66
+ "0xf2013f123b2cb745e3fdf5c935a3925647496f88090503eef58332a9245b4172",
67
+ index: 0,
68
+ },
69
+ depType: "depGroup",
70
+ },
71
+ },
72
+ ],
73
+ },
57
74
  [KnownScript.Secp256k1MultisigV2]: {
58
75
  codeHash:
59
76
  "0x36c971b8d41fbd94aabca77dc75e826729ac98447b46f91e00796155dddb0d29",
@@ -5,6 +5,7 @@ export enum KnownScript {
5
5
  NervosDao = "NervosDao",
6
6
  Secp256k1Blake160 = "Secp256k1Blake160",
7
7
  Secp256k1Multisig = "Secp256k1Multisig",
8
+ Secp256k1MultisigV2Beta = "Secp256k1MultisigV2Beta", // Fix rare failing case (https://github.com/nervosnetwork/ckb-system-scripts/pull/98)
8
9
  Secp256k1MultisigV2 = "Secp256k1MultisigV2", // Enhanced since handling (https://github.com/nervosnetwork/ckb-system-scripts/pull/99)
9
10
  AnyoneCanPay = "AnyoneCanPay",
10
11
  TypeId = "TypeId",
@@ -1,8 +1,7 @@
1
- import { Bytes, bytesEq, BytesLike } from "../bytes/index.js";
1
+ import { Bytes, bytesEq, bytesFrom, BytesLike } from "../bytes/index.js";
2
2
  import { hashCkb } from "../hasher/index.js";
3
3
  import { Hex, hexFrom } from "../hex/index.js";
4
4
  import { Constructor } from "../utils/index.js";
5
- import { Codec } from "./codec.js";
6
5
 
7
6
  /**
8
7
  * The base class of CCC to create a serializable instance. This should be used with the {@link codec} decorator.
@@ -92,9 +91,7 @@ export abstract class Entity {
92
91
  * @returns A clone of the entity
93
92
  */
94
93
  clone(): SubType {
95
- return (this.constructor as typeof Impl).fromBytes(
96
- this.toBytes(),
97
- ) as unknown as SubType;
94
+ return (this.constructor as typeof Impl).fromBytes(this.toBytes());
98
95
  }
99
96
 
100
97
  /**
@@ -172,7 +169,14 @@ export function codec<
172
169
  Encodable,
173
170
  TypeLike extends Encodable,
174
171
  Decoded extends TypeLike,
175
- >(codec: Codec<Encodable, Decoded>) {
172
+ >(codec: {
173
+ encode: (encodable: Encodable) => Bytes;
174
+ decode: (
175
+ decodable: Bytes,
176
+ config?: { isExtraFieldIgnored?: boolean },
177
+ ) => Decoded;
178
+ byteLength?: number;
179
+ }) {
176
180
  return function <
177
181
  Type extends TypeLike,
178
182
  ConstructorType extends Constructor<Type> & {
@@ -191,12 +195,12 @@ export function codec<
191
195
  }
192
196
  if (Constructor.decode === undefined) {
193
197
  Constructor.decode = function (bytesLike: BytesLike) {
194
- return Constructor.from(codec.decode(bytesLike));
198
+ return Constructor.from(codec.decode(bytesFrom(bytesLike)));
195
199
  };
196
200
  }
197
201
  if (Constructor.fromBytes === undefined) {
198
202
  Constructor.fromBytes = function (bytes: BytesLike) {
199
- return Constructor.from(codec.decode(bytes));
203
+ return Constructor.from(codec.decode(bytesFrom(bytes)));
200
204
  };
201
205
  }
202
206
 
@@ -4,6 +4,9 @@ import { Hex, hexFrom } from "../hex/index.js";
4
4
  import { CKB_BLAKE2B_PERSONAL } from "./advanced.js";
5
5
  import { Hasher } from "./hasher.js";
6
6
 
7
+ export const HASH_CKB_LENGTH = 32;
8
+ export const HASH_CKB_SHORT_LENGTH = 20;
9
+
7
10
  /**
8
11
  * @public
9
12
  */
@@ -73,9 +76,12 @@ export class HasherCkb implements Hasher {
73
76
  * const hash = hashCkb("some data"); // Outputs something like "0x..."
74
77
  * ```
75
78
  */
76
-
77
79
  export function hashCkb(...data: BytesLike[]): Hex {
78
80
  const hasher = new HasherCkb();
79
81
  data.forEach((d) => hasher.update(d));
80
82
  return hasher.digest();
81
83
  }
84
+
85
+ export function hashCkbShort(...data: BytesLike[]): Hex {
86
+ return hashCkb(...data).slice(0, HASH_CKB_SHORT_LENGTH * 2 + 2) as Hex;
87
+ }
package/src/hex/index.ts CHANGED
@@ -13,8 +13,33 @@ export type Hex = `0x${string}`;
13
13
  export type HexLike = BytesLike;
14
14
 
15
15
  /**
16
- * Converts a HexLike value to a Hex string.
17
- * @public
16
+ * Determines whether a given value is a properly formatted hexadecimal string (ccc.Hex).
17
+ *
18
+ * A valid hexadecimal string:
19
+ * - Has at least two characters.
20
+ * - Starts with "0x".
21
+ * - Has an even length.
22
+ * - Contains only characters representing digits (0-9) or lowercase letters (a-f) after the "0x" prefix.
23
+ *
24
+ * @param v - The value to validate as a hexadecimal (ccc.Hex) string.
25
+ * @returns True if the string is a valid hex string, false otherwise.
26
+ */
27
+ function isNormalizedHex(v: unknown): v is Hex {
28
+ if (!(typeof v === "string" && v.length % 2 === 0 && v.startsWith("0x"))) {
29
+ return false;
30
+ }
31
+
32
+ for (let i = 2; i < v.length; i++) {
33
+ const c = v.charAt(i);
34
+ if (!(("0" <= c && c <= "9") || ("a" <= c && c <= "f"))) {
35
+ return false;
36
+ }
37
+ }
38
+ return true;
39
+ }
40
+
41
+ /**
42
+ * Returns the hexadecimal representation of the given value.
18
43
  *
19
44
  * @param hex - The value to convert, which can be a string, Uint8Array, ArrayBuffer, or number array.
20
45
  * @returns A Hex string representing the value.
@@ -26,5 +51,60 @@ export type HexLike = BytesLike;
26
51
  * ```
27
52
  */
28
53
  export function hexFrom(hex: HexLike): Hex {
54
+ // Pass through already-normalized hex to avoid allocating a new string.
55
+ if (isNormalizedHex(hex)) {
56
+ return hex;
57
+ }
58
+
29
59
  return `0x${bytesTo(bytesFrom(hex), "hex")}`;
30
60
  }
61
+
62
+ /**
63
+ * Return the number of bytes occupied by `hexLike`.
64
+ *
65
+ * @param hexLike - Hex-like value
66
+ * @returns Byte length of `hexLike`.
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * bytesLen("0x48656c6c6f") // 5
71
+ * bytesLen(new Uint8Array([1, 2, 3])) // 3
72
+ * bytesLen(new ArrayBuffer(4)) // 4
73
+ * bytesLen([1, 2]) // 2
74
+ * ```
75
+ *
76
+ * @see bytesLenUnsafe - Fast version for already-normalized Hex strings
77
+ *
78
+ * @note Prefer direct `.length`/`.byteLength` access on Uint8Array/ArrayBuffer when you already have bytes.
79
+ * Use `bytesLen()` only when you need length without performing additional operations.
80
+ * @see bytesFrom - Convert values to Bytes (Uint8Array)
81
+ */
82
+ export function bytesLen(hexLike: HexLike): number {
83
+ if (isNormalizedHex(hexLike)) {
84
+ return bytesLenUnsafe(hexLike);
85
+ }
86
+
87
+ return bytesFrom(hexLike).length;
88
+ }
89
+
90
+ /**
91
+ * Fast byte length for Hex strings.
92
+ *
93
+ * This function efficiently calculates the byte length of Hex values:
94
+ * - Skips validation (caller must ensure input is valid Hex)
95
+ * - Handles odd-digit hex as if it were padded with a leading zero (e.g., "0x123" is treated as "0x0123").
96
+ *
97
+ * @param hex - A valid Hex string (with "0x" prefix).
98
+ * @returns Byte length of the hex string.
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * bytesLenUnsafe("0x48656c6c6f") // 5
103
+ * bytesLenUnsafe("0x123") // 2 (odd digits round up via padding)
104
+ * ```
105
+ *
106
+ * @see bytesLen - Validated version for untrusted input
107
+ */
108
+ export function bytesLenUnsafe(hex: Hex): number {
109
+ return Math.floor((hex.length - 1) / 2);
110
+ }
@@ -71,7 +71,7 @@ export function fixedItemVec<Encodable, Decoded>(
71
71
  }
72
72
  return bytesFrom(concatted);
73
73
  } catch (e: unknown) {
74
- throw new Error(`fixedItemVec(${e?.toString()})`);
74
+ throw new Error("fixedItemVec failed", { cause: e });
75
75
  }
76
76
  },
77
77
  decode(buffer, config) {
@@ -101,7 +101,7 @@ export function fixedItemVec<Encodable, Decoded>(
101
101
  }
102
102
  return decodedArray;
103
103
  } catch (e) {
104
- throw new Error(`fixedItemVec(${e?.toString()})`);
104
+ throw new Error("fixedItemVec failed", { cause: e });
105
105
  }
106
106
  },
107
107
  });
@@ -131,7 +131,7 @@ export function dynItemVec<Encodable, Decoded>(
131
131
  const packedTotalSize = uint32To(header.length + body.length + 4);
132
132
  return bytesConcat(packedTotalSize, header, body);
133
133
  } catch (e) {
134
- throw new Error(`dynItemVec(${e?.toString()})`);
134
+ throw new Error("dynItemVec failed", { cause: e });
135
135
  }
136
136
  },
137
137
  decode(buffer, config) {
@@ -168,7 +168,7 @@ export function dynItemVec<Encodable, Decoded>(
168
168
  }
169
169
  return decodedArray;
170
170
  } catch (e) {
171
- throw new Error(`dynItemVec(${e?.toString()})`);
171
+ throw new Error("dynItemVec failed", { cause: e });
172
172
  }
173
173
  },
174
174
  });
@@ -205,7 +205,7 @@ export function option<Encodable, Decoded>(
205
205
  try {
206
206
  return innerCodec.encode(userDefinedOrNull);
207
207
  } catch (e) {
208
- throw new Error(`option(${e?.toString()})`);
208
+ throw new Error("option failed", { cause: e });
209
209
  }
210
210
  },
211
211
  decode(buffer, config) {
@@ -216,7 +216,7 @@ export function option<Encodable, Decoded>(
216
216
  try {
217
217
  return innerCodec.decode(buffer, config);
218
218
  } catch (e) {
219
- throw new Error(`option(${e?.toString()})`);
219
+ throw new Error("option failed", { cause: e });
220
220
  }
221
221
  },
222
222
  });
@@ -236,7 +236,7 @@ export function byteVec<Encodable, Decoded>(
236
236
  const byteLength = uint32To(payload.byteLength);
237
237
  return bytesConcat(byteLength, payload);
238
238
  } catch (e) {
239
- throw new Error(`byteVec(${e?.toString()})`);
239
+ throw new Error("byteVec failed", { cause: e });
240
240
  }
241
241
  },
242
242
  decode(buffer, config) {
@@ -255,7 +255,7 @@ export function byteVec<Encodable, Decoded>(
255
255
  try {
256
256
  return codec.decode(value.slice(4), config);
257
257
  } catch (e: unknown) {
258
- throw new Error(`byteVec(${e?.toString()})`);
258
+ throw new Error("byteVec failed", { cause: e });
259
259
  }
260
260
  },
261
261
  });
@@ -313,7 +313,7 @@ export function table<
313
313
  bytesConcatTo(body, encoded);
314
314
  offset += encoded.byteLength;
315
315
  } catch (e: unknown) {
316
- throw new Error(`table.${key}(${e?.toString()})`);
316
+ throw new Error(`table.${key} failed`, { cause: e });
317
317
  }
318
318
  }
319
319
 
@@ -371,7 +371,7 @@ export function table<
371
371
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
372
372
  Object.assign(object, { [field]: codec.decode(payload, config) });
373
373
  } catch (e: unknown) {
374
- throw new Error(`table.${field}(${e?.toString()})`);
374
+ throw new Error(`table.${field} failed`, { cause: e });
375
375
  }
376
376
  }
377
377
  return object as Decoded;
@@ -472,7 +472,7 @@ export function union<T extends Record<string, CodecLike<any, any>>>(
472
472
  const body = codec.encode(value);
473
473
  return bytesConcat(header, body);
474
474
  } catch (e: unknown) {
475
- throw new Error(`union.(${typeStr})(${e?.toString()})`);
475
+ throw new Error(`union.${typeStr} failed`, { cause: e });
476
476
  }
477
477
  },
478
478
  decode(buffer, config) {
@@ -538,7 +538,7 @@ export function struct<
538
538
  const encoded = codecLayout[key].encode((object as any)[key]);
539
539
  bytesConcatTo(bytes, encoded);
540
540
  } catch (e: unknown) {
541
- throw new Error(`struct.${key}(${e?.toString()})`);
541
+ throw new Error(`struct.${key} failed`, { cause: e });
542
542
  }
543
543
  }
544
544
 
@@ -554,7 +554,7 @@ export function struct<
554
554
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
555
555
  Object.assign(object, { [key]: codec.decode(payload, config) });
556
556
  } catch (e: unknown) {
557
- throw new Error(`struct.${key}(${(e as Error).toString()})`);
557
+ throw new Error(`struct.${key} failed`, { cause: e });
558
558
  }
559
559
  offset = offset + codec.byteLength!;
560
560
  });
@@ -589,7 +589,7 @@ export function array<Encodable, Decoded>(
589
589
 
590
590
  return bytesFrom(bytes);
591
591
  } catch (e: unknown) {
592
- throw new Error(`array(${e?.toString()})`);
592
+ throw new Error("array failed", { cause: e });
593
593
  }
594
594
  },
595
595
  decode(buffer, config) {
@@ -608,7 +608,7 @@ export function array<Encodable, Decoded>(
608
608
  }
609
609
  return result;
610
610
  } catch (e: unknown) {
611
- throw new Error(`array(${e?.toString()})`);
611
+ throw new Error("array failed", { cause: e });
612
612
  }
613
613
  },
614
614
  });