@ckb-ccc/core 1.18.2 → 2.0.0-next.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.
- package/CHANGELOG.md +36 -1
- package/dist/address.advanced-LxntWbev.mjs +2 -0
- package/dist/address.advanced-LxntWbev.mjs.map +1 -0
- package/dist/advanced.d.mts +1 -1
- package/dist/advanced.mjs +1 -1
- package/{dist.commonjs/advancedBarrel-CJAh6sm8.d.ts → dist/advancedBarrel-BHwnMJqR.d.mts} +749 -382
- package/dist/advancedBarrel-BHwnMJqR.d.mts.map +1 -0
- package/dist/advancedBarrel.d.mts +1 -1
- package/dist/advancedBarrel.mjs +1 -1
- package/dist/barrel-C-BaV9Pe.mjs +7 -0
- package/dist/barrel-C-BaV9Pe.mjs.map +1 -0
- package/dist/barrel.d.mts +2 -2
- package/dist/barrel.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist.commonjs/address.advanced-BqcYOpZn.js +2 -0
- package/dist.commonjs/address.advanced-BqcYOpZn.js.map +1 -0
- package/dist.commonjs/advanced.d.ts +1 -1
- package/dist.commonjs/advanced.js +1 -1
- package/{dist/advancedBarrel-BbbHx4z4.d.mts → dist.commonjs/advancedBarrel-DNdhwiU0.d.ts} +750 -381
- package/dist.commonjs/advancedBarrel-DNdhwiU0.d.ts.map +1 -0
- package/dist.commonjs/advancedBarrel.d.ts +1 -1
- package/dist.commonjs/advancedBarrel.js +1 -1
- package/dist.commonjs/{barrel-sjLZcS0R.js → barrel-BBOmj4RJ.js} +10 -10
- package/dist.commonjs/barrel-BBOmj4RJ.js.map +1 -0
- package/dist.commonjs/barrel.d.ts +2 -2
- package/dist.commonjs/barrel.js +1 -1
- package/dist.commonjs/index.d.ts +2 -2
- package/dist.commonjs/index.js +1 -1
- package/package.json +1 -1
- package/src/ckb/epoch.ts +44 -26
- package/src/ckb/script.ts +23 -46
- package/src/ckb/transaction.ts +192 -195
- package/src/client/client.ts +2 -2
- package/src/client/jsonRpc/client.ts +3 -7
- package/src/codec/codec.ts +65 -40
- package/src/codec/entity.ts +95 -67
- package/src/codec/predefined.ts +11 -0
- package/src/molecule/codec.ts +116 -8
- package/src/molecule/predefined.ts +1 -0
- package/src/signer/ckb/signerMultisigCkbReadonly.ts +36 -24
- package/src/signer/ckb/verifyJoyId.ts +39 -11
- package/src/signer/index.ts +17 -0
- package/src/signer/signer/index.ts +11 -0
- package/src/signer/signerFromSignature.ts +65 -0
- package/src/utils/index.ts +108 -26
- package/dist/address.advanced-Cka_9tcR.mjs +0 -2
- package/dist/address.advanced-Cka_9tcR.mjs.map +0 -1
- package/dist/advancedBarrel-BbbHx4z4.d.mts.map +0 -1
- package/dist/barrel-Ctu3ZNcR.mjs +0 -7
- package/dist/barrel-Ctu3ZNcR.mjs.map +0 -1
- package/dist.commonjs/address.advanced-BAaFklsW.js +0 -2
- package/dist.commonjs/address.advanced-BAaFklsW.js.map +0 -1
- package/dist.commonjs/advancedBarrel-CJAh6sm8.d.ts.map +0 -1
- package/dist.commonjs/barrel-sjLZcS0R.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as CellDep, $i as
|
|
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, SignerCkbAlwaysSuccess, 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
|
+
import { $ as CellDep, $i as DecodedType, $n as SignerCkbScriptReadonly, $r as CodecBool, $t as ClientFindCellsResponse, Ai as codec, An as buildNostrEventFromMessage, Ar as keystoreDecrypt, At as HashTypeCodec, B as ClientPublicTestnet, Bi as NumLike, Bn as SignerOpenLink, Br as HasherKeecak256, Bt as Epoch, Ci as CodecUint64BE, Cr as SignerType, Ct as depTypeFrom, Di as codecUint, Dr as SignPsbtOptions, Dt as udtBalanceFrom, Ei as codecPadding, Er as InputToSignLike, Et as isDaoOutputLimitExceeded, Fi as reduce, Fn as NostrEvent, Ft as ScriptVec, G as ClientCacheMemory, Gi as numLeFromBytes, Gn as SignerDogePrivateKey, Gr as hashCkbShort, Gt as CellDepInfo, H as ClientJsonRpc, Hi as numBeToBytes, Hn as SignerDummy, Hr as HASH_CKB_SHORT_LENGTH, Ht as epochFrom, Ii as reduceAsync, In as SignerNostr, It as hashTypeFrom, J as ErrorTransactionInsufficientCoin, Ji as numMin, Jn as verifyMessageJoyId, Jr as FixedPointLike, Jt as ClientBlockHeader, K as ClientCache, Ki as numLeToBytes, Kn as SignerDogeAddressReadonly, Kr as Hasher, Kt as CellDepInfoLike, Li as sleep, Ln as verifyMessageEvmPersonal, Lt as hashTypeFromBytes, Mi as apply, Mn as verifyMessageNostrEvent, Mr as RequestorJsonRpc, Mt as Script, Ni as gcd, Nn as SignerNostrPrivateKey, Nr as RequestorJsonRpcConfig, Nt as ScriptLike, Oi as codecUintNumber, On as Signer, Or as SignPsbtOptionsLike, Ot as LumosTransactionSkeletonType, Pi as isWebview, Pn as SignerNostrPublicKeyReadonly, Pt as ScriptOpt, Q as CellAnyLike, Qi as CodecLike, Qn as SignerMultisigCkbReadonly, Qr as fixedPointToString, Qt as ClientBlockUncleLike, Ri as stringify, Rn as SignerEvmAddressReadonly, Rt as hashTypeToBytes, Si as CodecUint64, Sr as SignerSignType, St as calcDaoProfit, Ti as CodecUint8, Tr as InputToSign, Tt as depTypeToBytes, U as ClientJsonRpcConfig, Ui as numFrom, Un as messageHashDogeEcdsa, Ur as HasherCkb, Ut as epochFromHex, V as ClientPublicMainnet, Vi as numBeFromBytes, Vn as SignerAlwaysError, Vr as HASH_CKB_LENGTH, Vt as EpochLike, W as Client, Wi as numFromBytes, Wn as verifyMessageDogeEcdsa, Wr as hashCkb, Wt as epochToHex, X as Cell, Xi as numToHex, Xn as MultisigCkbWitness, Xr as Zero, Xt as ClientBlockLike, Y as hashTypeId, Yi as numToBytes, Yn as SignerMultisigCkbPrivateKey, Yr as One, Yt as ClientBlockHeaderLike, Z as CellAny, Zi as Codec, Zn as MultisigCkbWitnessLike, Zr as fixedPointFrom, Zt as ClientBlockUncle, _i as CodecUint32BE, _n as ErrorClientWaitTransactionTimeout, _r as NetworkPreference, _t as Transaction, aa as bytesLen, ai as CodecBytes, an as ClientIndexerSearchKeyLike, ar as recoverMessageSecp256k1, at as CellLike, bi as CodecUint512BE, bn as ScriptInfoLike, br as SignerMultisig, bt as WitnessArgsLike, ca as Bytes, ci as CodecUint128BE, cn as ClientTransactionResponse, cr as verifyMessageSecp256k1, ct as CellOutputVec, da as bytesConcatTo, di as CodecUint16BE, dn as ErrorClientBaseLike, dr as btcPublicKeyFromP2pkhAddress, dt as DepTypeLike, ea as EncodableType, ei as CodecByte, en as ClientFindTransactionsGroupedResponse, er as SignerCkbPrivateKey, et as CellDepLike, fa as bytesEq, fi as CodecUint16LE, fn as ErrorClientDuplicatedTransaction, fr as btcVarLengthBytesFrom, ft as OutPoint, gi as CodecUint32, gn as ErrorClientVerification, gr as SignerBtc, gt as SinceLike, hi as CodecUint256LE, hn as ErrorClientResolveUnknown, hr as SignerBtcPublicKeyReadonly, ht as Since, ia as HexLike, ii as CodecByte8, in as ClientIndexerSearchKeyFilterLike, ir as messageHashCkbSecp256k1, it as CellInputVec, ji as Constructor, jn as nostrEventHash, jr as keystoreEncrypt, jt as HashTypeLike, ki as Entity, kn as signerFromSignature, kr as barrel_d_exports, kt as HashType, la as BytesLike, li as CodecUint128LE, ln as ClientTransactionResponseLike, lr as btcEcdsaPublicKeyHash, lt as DepType, ma as bytesTo, mi as CodecUint256BE, mn as ErrorClientRBFRejected, mr as verifyMessageBtcEcdsa, mt as RawTransaction, na as AddressLike, ni as CodecByte32, nn as ClientIndexerSearchKey, nr as SignerCkbAlwaysSuccess, nt as CellInput, oa as bytesLenUnsafe, oi as CodecRaw, on as ClientIndexerSearchKeyTransaction, or as signMessageSecp256k1, ot as CellOutput, pa as bytesFrom, pi as CodecUint256, pn as ErrorClientMaxFeeRateExceeded, pr as messageHashBtcEcdsa, pt as OutPointLike, q as ErrorTransactionInsufficientCapacity, qi as numMax, qn as SignerDoge, qr as FixedPoint, qt as ClientBlock, ra as Hex, ri as CodecByte4, rn as ClientIndexerSearchKeyFilter, rr as SECP256K1_SIGNATURE_LENGTH, rt as CellInputLike, sa as hexFrom, si as CodecUint128, sn as ClientIndexerSearchKeyTransactionLike, sr as verifyMessageCkbSecp256k1, st as CellOutputLike, ta as Address, ti as CodecByte16, tn as ClientFindTransactionsResponse, tr as SignerCkbPublicKey, tt as CellDepVec, ua as bytesConcat, ui as CodecUint16, un as ErrorClientBase, ur as btcP2pkhAddressFromPublicKey, ut as DepTypeCodec, vi as CodecUint32LE, vn as OutputsValidator, vr as Signature, vt as TransactionLike, wi as CodecUint64LE, wr as Wallet, wt as depTypeFromBytes, xi as CodecUint512LE, xn as TransactionStatus, xr as SignerMultisigNotEnoughSignaturesError, xt as calcDaoClaimEpoch, yi as CodecUint512, yn as ScriptInfo, yr as SignerInfo, yt as WitnessArgs, zi as Num, zn as SignerEvm, zt as KnownScript } from "./advancedBarrel-DNdhwiU0.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, SignerCkbAlwaysSuccess, 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, reduce, reduceAsync, signMessageSecp256k1, signerFromSignature, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1 };
|
package/dist.commonjs/barrel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-BqcYOpZn.js"),t=require("./barrel-BBOmj4RJ.js");exports.Address=t.$,exports.Bytes=e.Jr,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.at,exports.ClientBlock=e.rt,exports.ClientBlockHeader=e.it,exports.ClientBlockUncle=e.at,exports.ClientCache=t.st,exports.ClientCacheMemory=t.ot,exports.ClientIndexerSearchKey=e.ot,exports.ClientIndexerSearchKeyFilter=e.st,exports.ClientIndexerSearchKeyTransaction=e.ct,exports.ClientJsonRpc=t.rt,exports.ClientPublicMainnet=t.nt,exports.ClientPublicTestnet=t.tt,exports.ClientTransactionResponse=e.lt,exports.Codec=e.qr,exports.CodecBool=e.bn,exports.CodecByte=e.xn,exports.CodecByte16=e.Sn,exports.CodecByte32=e.Cn,exports.CodecByte4=e.wn,exports.CodecByte8=e.Tn,exports.CodecBytes=e.En,exports.CodecRaw=e.Dn,exports.CodecUint128=e.On,exports.CodecUint128BE=e.kn,exports.CodecUint128LE=e.An,exports.CodecUint16=e.jn,exports.CodecUint16BE=e.Mn,exports.CodecUint16LE=e.Nn,exports.CodecUint256=e.Pn,exports.CodecUint256BE=e.Fn,exports.CodecUint256LE=e.In,exports.CodecUint32=e.Ln,exports.CodecUint32BE=e.Rn,exports.CodecUint32LE=e.zn,exports.CodecUint512=e.Bn,exports.CodecUint512BE=e.Vn,exports.CodecUint512LE=e.Hn,exports.CodecUint64=e.Un,exports.CodecUint64BE=e.Wn,exports.CodecUint64LE=e.Gn,exports.CodecUint8=e.Kn,exports.DepTypeCodec=e.p,exports.Entity=e.ur,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.fr,exports.HASH_CKB_SHORT_LENGTH=e.pr,exports.HashTypeCodec=e.j,exports.HasherCkb=e.mr,exports.HasherKeecak256=t.lt,exports.InputToSign=t.Y,exports.KnownScript=e.J,Object.defineProperty(exports,"MultisigCkbWitness",{enumerable:!0,get:function(){return t.g}}),exports.One=e.or,Object.defineProperty(exports,"OutPoint",{enumerable:!0,get:function(){return e.m}}),exports.RawTransaction=e.h,exports.RequestorJsonRpc=t.it,exports.SECP256K1_SIGNATURE_LENGTH=t.L,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.X,exports.Signature=t.w,exports.Signer=t.n,exports.SignerAlwaysError=t.u,exports.SignerBtc=t.C,exports.SignerBtcPublicKeyReadonly=t.S,exports.SignerCkbAlwaysSuccess=t.x,exports.SignerCkbPrivateKey=t.y,exports.SignerCkbPublicKey=t.b,exports.SignerCkbScriptReadonly=t.v,exports.SignerDoge=t.m,exports.SignerDogeAddressReadonly=t.p,exports.SignerDogePrivateKey=t.f,exports.SignerDummy=t.d,exports.SignerEvm=t.c,exports.SignerEvmAddressReadonly=t.s,exports.SignerInfo=t.T,exports.SignerMultisig=t.E,exports.SignerMultisigCkbPrivateKey=t.h,exports.SignerMultisigCkbReadonly=t._,exports.SignerMultisigNotEnoughSignaturesError=t.D,exports.SignerNostr=t.o,exports.SignerNostrPrivateKey=t.i,exports.SignerNostrPublicKeyReadonly=t.a,exports.SignerOpenLink=t.l,exports.SignerSignType=t.O,exports.SignerType=t.k,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.sr,exports.apply=e.Et,exports.btcEcdsaPublicKeyHash=t.U,exports.btcP2pkhAddressFromPublicKey=t.W,exports.btcPublicKeyFromP2pkhAddress=t.G,exports.btcVarLengthBytesFrom=t.K,exports.buildNostrEventFromMessage=t.A,exports.bytesConcat=e.Yr,exports.bytesConcatTo=e.Xr,exports.bytesEq=e.Zr,exports.bytesFrom=e.Qr,exports.bytesLen=e.vr,exports.bytesLenUnsafe=e.yr,exports.bytesTo=e.$r,exports.calcDaoClaimEpoch=e.y,exports.calcDaoProfit=e.b,exports.codec=e.dr,exports.codecPadding=e.qn,exports.codecUint=e.Jn,exports.codecUintNumber=e.Yn,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.cr,exports.fixedPointToString=e.lr,exports.gcd=e.Dt,exports.hashCkb=e.hr,exports.hashCkbShort=e.gr,exports.hashTypeFrom=e.F,exports.hashTypeFromBytes=e.I,exports.hashTypeId=t.et,exports.hashTypeToBytes=e.L,exports.hexFrom=e.br,exports.isDaoOutputLimitExceeded=e.w,exports.isWebview=e.Ot,exports.keystoreDecrypt=t.Z,exports.keystoreEncrypt=t.Q,exports.messageHashBtcEcdsa=t.q,exports.messageHashCkbSecp256k1=t.R,exports.messageHashDogeEcdsa=t.P,Object.defineProperty(exports,"mol",{enumerable:!0,get:function(){return t.ct}}),exports.nostrEventHash=t.j,exports.numBeFromBytes=e.Xn,exports.numBeToBytes=e.Zn,exports.numFrom=e.Qn,exports.numFromBytes=e.$n,exports.numLeFromBytes=e.er,exports.numLeToBytes=e.tr,exports.numMax=e.nr,exports.numMin=e.rr,exports.numToBytes=e.ir,exports.numToHex=e.ar,exports.recoverMessageSecp256k1=t.z,exports.reduce=e.kt,exports.reduceAsync=e.At,exports.signMessageSecp256k1=t.B,exports.signerFromSignature=t.r,exports.sleep=e.jt,exports.stringify=e.Mt,exports.udtBalanceFrom=e.T,exports.verifyMessageBtcEcdsa=t.J,exports.verifyMessageCkbSecp256k1=t.V,exports.verifyMessageDogeEcdsa=t.F,exports.verifyMessageEvmPersonal=t.N,exports.verifyMessageJoyId=t.I,exports.verifyMessageNostrEvent=t.M,exports.verifyMessageSecp256k1=t.H;
|
package/dist.commonjs/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as CellDep, $i as
|
|
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, SignerCkbAlwaysSuccess, 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
|
+
import { $ as CellDep, $i as DecodedType, $n as SignerCkbScriptReadonly, $r as CodecBool, $t as ClientFindCellsResponse, Ai as codec, An as buildNostrEventFromMessage, Ar as keystoreDecrypt, At as HashTypeCodec, B as ClientPublicTestnet, Bi as NumLike, Bn as SignerOpenLink, Br as HasherKeecak256, Bt as Epoch, Ci as CodecUint64BE, Cr as SignerType, Ct as depTypeFrom, Di as codecUint, Dn as barrel_d_exports, Dr as SignPsbtOptions, Dt as udtBalanceFrom, Ei as codecPadding, Er as InputToSignLike, Et as isDaoOutputLimitExceeded, Fi as reduce, Fn as NostrEvent, Ft as ScriptVec, G as ClientCacheMemory, Gi as numLeFromBytes, Gn as SignerDogePrivateKey, Gr as hashCkbShort, Gt as CellDepInfo, H as ClientJsonRpc, Hi as numBeToBytes, Hn as SignerDummy, Hr as HASH_CKB_SHORT_LENGTH, Ht as epochFrom, Ii as reduceAsync, In as SignerNostr, It as hashTypeFrom, J as ErrorTransactionInsufficientCoin, Ji as numMin, Jn as verifyMessageJoyId, Jr as FixedPointLike, Jt as ClientBlockHeader, K as ClientCache, Ki as numLeToBytes, Kn as SignerDogeAddressReadonly, Kr as Hasher, Kt as CellDepInfoLike, Li as sleep, Ln as verifyMessageEvmPersonal, Lt as hashTypeFromBytes, Mi as apply, Mn as verifyMessageNostrEvent, Mr as RequestorJsonRpc, Mt as Script, Ni as gcd, Nn as SignerNostrPrivateKey, Nr as RequestorJsonRpcConfig, Nt as ScriptLike, Oi as codecUintNumber, On as Signer, Or as SignPsbtOptionsLike, Ot as LumosTransactionSkeletonType, Pi as isWebview, Pn as SignerNostrPublicKeyReadonly, Pt as ScriptOpt, Q as CellAnyLike, Qi as CodecLike, Qn as SignerMultisigCkbReadonly, Qr as fixedPointToString, Qt as ClientBlockUncleLike, Ri as stringify, Rn as SignerEvmAddressReadonly, Rt as hashTypeToBytes, Si as CodecUint64, Sr as SignerSignType, St as calcDaoProfit, Ti as CodecUint8, Tr as InputToSign, Tt as depTypeToBytes, U as ClientJsonRpcConfig, Ui as numFrom, Un as messageHashDogeEcdsa, Ur as HasherCkb, Ut as epochFromHex, V as ClientPublicMainnet, Vi as numBeFromBytes, Vn as SignerAlwaysError, Vr as HASH_CKB_LENGTH, Vt as EpochLike, W as Client, Wi as numFromBytes, Wn as verifyMessageDogeEcdsa, Wr as hashCkb, Wt as epochToHex, X as Cell, Xi as numToHex, Xn as MultisigCkbWitness, Xr as Zero, Xt as ClientBlockLike, Y as hashTypeId, Yi as numToBytes, Yn as SignerMultisigCkbPrivateKey, Yr as One, Yt as ClientBlockHeaderLike, Z as CellAny, Zi as Codec, Zn as MultisigCkbWitnessLike, Zr as fixedPointFrom, Zt as ClientBlockUncle, _i as CodecUint32BE, _n as ErrorClientWaitTransactionTimeout, _r as NetworkPreference, _t as Transaction, aa as bytesLen, ai as CodecBytes, an as ClientIndexerSearchKeyLike, ar as recoverMessageSecp256k1, at as CellLike, bi as CodecUint512BE, bn as ScriptInfoLike, br as SignerMultisig, bt as WitnessArgsLike, ca as Bytes, ci as CodecUint128BE, cn as ClientTransactionResponse, cr as verifyMessageSecp256k1, ct as CellOutputVec, da as bytesConcatTo, di as CodecUint16BE, dn as ErrorClientBaseLike, dr as btcPublicKeyFromP2pkhAddress, dt as DepTypeLike, ea as EncodableType, ei as CodecByte, en as ClientFindTransactionsGroupedResponse, er as SignerCkbPrivateKey, et as CellDepLike, fa as bytesEq, fi as CodecUint16LE, fn as ErrorClientDuplicatedTransaction, fr as btcVarLengthBytesFrom, ft as OutPoint, gi as CodecUint32, gn as ErrorClientVerification, gr as SignerBtc, gt as SinceLike, hi as CodecUint256LE, hn as ErrorClientResolveUnknown, hr as SignerBtcPublicKeyReadonly, ht as Since, ia as HexLike, ii as CodecByte8, in as ClientIndexerSearchKeyFilterLike, ir as messageHashCkbSecp256k1, it as CellInputVec, ji as Constructor, jn as nostrEventHash, jr as keystoreEncrypt, jt as HashTypeLike, ki as Entity, kn as signerFromSignature, kr as barrel_d_exports$1, kt as HashType, la as BytesLike, li as CodecUint128LE, ln as ClientTransactionResponseLike, lr as btcEcdsaPublicKeyHash, lt as DepType, ma as bytesTo, mi as CodecUint256BE, mn as ErrorClientRBFRejected, mr as verifyMessageBtcEcdsa, mt as RawTransaction, na as AddressLike, ni as CodecByte32, nn as ClientIndexerSearchKey, nr as SignerCkbAlwaysSuccess, nt as CellInput, oa as bytesLenUnsafe, oi as CodecRaw, on as ClientIndexerSearchKeyTransaction, or as signMessageSecp256k1, ot as CellOutput, pa as bytesFrom, pi as CodecUint256, pn as ErrorClientMaxFeeRateExceeded, pr as messageHashBtcEcdsa, pt as OutPointLike, q as ErrorTransactionInsufficientCapacity, qi as numMax, qn as SignerDoge, qr as FixedPoint, qt as ClientBlock, ra as Hex, ri as CodecByte4, rn as ClientIndexerSearchKeyFilter, rr as SECP256K1_SIGNATURE_LENGTH, rt as CellInputLike, sa as hexFrom, si as CodecUint128, sn as ClientIndexerSearchKeyTransactionLike, sr as verifyMessageCkbSecp256k1, st as CellOutputLike, ta as Address, ti as CodecByte16, tn as ClientFindTransactionsResponse, tr as SignerCkbPublicKey, tt as CellDepVec, ua as bytesConcat, ui as CodecUint16, un as ErrorClientBase, ur as btcP2pkhAddressFromPublicKey, ut as DepTypeCodec, vi as CodecUint32LE, vn as OutputsValidator, vr as Signature, vt as TransactionLike, wi as CodecUint64LE, wr as Wallet, wt as depTypeFromBytes, xi as CodecUint512LE, xn as TransactionStatus, xr as SignerMultisigNotEnoughSignaturesError, xt as calcDaoClaimEpoch, yi as CodecUint512, yn as ScriptInfo, yr as SignerInfo, yt as WitnessArgs, zi as Num, zn as SignerEvm, zt as KnownScript } from "./advancedBarrel-DNdhwiU0.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, SignerCkbAlwaysSuccess, 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, reduce, reduceAsync, signMessageSecp256k1, signerFromSignature, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1 };
|
package/dist.commonjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./address.advanced-BqcYOpZn.js"),t=require("./barrel-BBOmj4RJ.js");exports.Address=t.$,exports.Bytes=e.Jr,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.at,exports.ClientBlock=e.rt,exports.ClientBlockHeader=e.it,exports.ClientBlockUncle=e.at,exports.ClientCache=t.st,exports.ClientCacheMemory=t.ot,exports.ClientIndexerSearchKey=e.ot,exports.ClientIndexerSearchKeyFilter=e.st,exports.ClientIndexerSearchKeyTransaction=e.ct,exports.ClientJsonRpc=t.rt,exports.ClientPublicMainnet=t.nt,exports.ClientPublicTestnet=t.tt,exports.ClientTransactionResponse=e.lt,exports.Codec=e.qr,exports.CodecBool=e.bn,exports.CodecByte=e.xn,exports.CodecByte16=e.Sn,exports.CodecByte32=e.Cn,exports.CodecByte4=e.wn,exports.CodecByte8=e.Tn,exports.CodecBytes=e.En,exports.CodecRaw=e.Dn,exports.CodecUint128=e.On,exports.CodecUint128BE=e.kn,exports.CodecUint128LE=e.An,exports.CodecUint16=e.jn,exports.CodecUint16BE=e.Mn,exports.CodecUint16LE=e.Nn,exports.CodecUint256=e.Pn,exports.CodecUint256BE=e.Fn,exports.CodecUint256LE=e.In,exports.CodecUint32=e.Ln,exports.CodecUint32BE=e.Rn,exports.CodecUint32LE=e.zn,exports.CodecUint512=e.Bn,exports.CodecUint512BE=e.Vn,exports.CodecUint512LE=e.Hn,exports.CodecUint64=e.Un,exports.CodecUint64BE=e.Wn,exports.CodecUint64LE=e.Gn,exports.CodecUint8=e.Kn,exports.DepTypeCodec=e.p,exports.Entity=e.ur,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.fr,exports.HASH_CKB_SHORT_LENGTH=e.pr,exports.HashTypeCodec=e.j,exports.HasherCkb=e.mr,exports.HasherKeecak256=t.lt,exports.InputToSign=t.Y,exports.KnownScript=e.J,Object.defineProperty(exports,"MultisigCkbWitness",{enumerable:!0,get:function(){return t.g}}),exports.One=e.or,Object.defineProperty(exports,"OutPoint",{enumerable:!0,get:function(){return e.m}}),exports.RawTransaction=e.h,exports.RequestorJsonRpc=t.it,exports.SECP256K1_SIGNATURE_LENGTH=t.L,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.X,exports.Signature=t.w,exports.Signer=t.n,exports.SignerAlwaysError=t.u,exports.SignerBtc=t.C,exports.SignerBtcPublicKeyReadonly=t.S,exports.SignerCkbAlwaysSuccess=t.x,exports.SignerCkbPrivateKey=t.y,exports.SignerCkbPublicKey=t.b,exports.SignerCkbScriptReadonly=t.v,exports.SignerDoge=t.m,exports.SignerDogeAddressReadonly=t.p,exports.SignerDogePrivateKey=t.f,exports.SignerDummy=t.d,exports.SignerEvm=t.c,exports.SignerEvmAddressReadonly=t.s,exports.SignerInfo=t.T,exports.SignerMultisig=t.E,exports.SignerMultisigCkbPrivateKey=t.h,exports.SignerMultisigCkbReadonly=t._,exports.SignerMultisigNotEnoughSignaturesError=t.D,exports.SignerNostr=t.o,exports.SignerNostrPrivateKey=t.i,exports.SignerNostrPublicKeyReadonly=t.a,exports.SignerOpenLink=t.l,exports.SignerSignType=t.O,exports.SignerType=t.k,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.sr,exports.apply=e.Et,exports.btcEcdsaPublicKeyHash=t.U,exports.btcP2pkhAddressFromPublicKey=t.W,exports.btcPublicKeyFromP2pkhAddress=t.G,exports.btcVarLengthBytesFrom=t.K,exports.buildNostrEventFromMessage=t.A,exports.bytesConcat=e.Yr,exports.bytesConcatTo=e.Xr,exports.bytesEq=e.Zr,exports.bytesFrom=e.Qr,exports.bytesLen=e.vr,exports.bytesLenUnsafe=e.yr,exports.bytesTo=e.$r,exports.calcDaoClaimEpoch=e.y,exports.calcDaoProfit=e.b,Object.defineProperty(exports,"ccc",{enumerable:!0,get:function(){return t.t}}),exports.codec=e.dr,exports.codecPadding=e.qn,exports.codecUint=e.Jn,exports.codecUintNumber=e.Yn,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.cr,exports.fixedPointToString=e.lr,exports.gcd=e.Dt,exports.hashCkb=e.hr,exports.hashCkbShort=e.gr,exports.hashTypeFrom=e.F,exports.hashTypeFromBytes=e.I,exports.hashTypeId=t.et,exports.hashTypeToBytes=e.L,exports.hexFrom=e.br,exports.isDaoOutputLimitExceeded=e.w,exports.isWebview=e.Ot,exports.keystoreDecrypt=t.Z,exports.keystoreEncrypt=t.Q,exports.messageHashBtcEcdsa=t.q,exports.messageHashCkbSecp256k1=t.R,exports.messageHashDogeEcdsa=t.P,Object.defineProperty(exports,"mol",{enumerable:!0,get:function(){return t.ct}}),exports.nostrEventHash=t.j,exports.numBeFromBytes=e.Xn,exports.numBeToBytes=e.Zn,exports.numFrom=e.Qn,exports.numFromBytes=e.$n,exports.numLeFromBytes=e.er,exports.numLeToBytes=e.tr,exports.numMax=e.nr,exports.numMin=e.rr,exports.numToBytes=e.ir,exports.numToHex=e.ar,exports.recoverMessageSecp256k1=t.z,exports.reduce=e.kt,exports.reduceAsync=e.At,exports.signMessageSecp256k1=t.B,exports.signerFromSignature=t.r,exports.sleep=e.jt,exports.stringify=e.Mt,exports.udtBalanceFrom=e.T,exports.verifyMessageBtcEcdsa=t.J,exports.verifyMessageCkbSecp256k1=t.V,exports.verifyMessageDogeEcdsa=t.F,exports.verifyMessageEvmPersonal=t.N,exports.verifyMessageJoyId=t.I,exports.verifyMessageNostrEvent=t.M,exports.verifyMessageSecp256k1=t.H;
|
package/package.json
CHANGED
package/src/ckb/epoch.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ClientBlockHeader } from "../client/clientTypes.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
codec,
|
|
4
|
+
codecPadding,
|
|
5
|
+
codecUint,
|
|
6
|
+
DecodedType,
|
|
7
|
+
Entity,
|
|
8
|
+
} from "../codec/index.js";
|
|
3
9
|
import { Zero } from "../fixedPoint/index.js";
|
|
4
10
|
import { type Hex, type HexLike } from "../hex/index.js";
|
|
5
11
|
import { mol } from "../molecule/index.js";
|
|
@@ -36,6 +42,13 @@ export type EpochLike =
|
|
|
36
42
|
| Num
|
|
37
43
|
| Hex;
|
|
38
44
|
|
|
45
|
+
const EpochCodec = mol.struct({
|
|
46
|
+
padding: codecPadding(1),
|
|
47
|
+
denominator: codecUint(2),
|
|
48
|
+
numerator: codecUint(2),
|
|
49
|
+
integer: codecUint(3),
|
|
50
|
+
});
|
|
51
|
+
|
|
39
52
|
/**
|
|
40
53
|
* Epoch
|
|
41
54
|
*
|
|
@@ -55,15 +68,12 @@ export type EpochLike =
|
|
|
55
68
|
* @remarks
|
|
56
69
|
* This class is primarily a thin value-object; operations return new Epoch instances.
|
|
57
70
|
*/
|
|
58
|
-
@codec(
|
|
59
|
-
mol.struct({
|
|
60
|
-
padding: codecPadding(1),
|
|
61
|
-
denominator: codecUint(2),
|
|
62
|
-
numerator: codecUint(2),
|
|
63
|
-
integer: codecUint(3),
|
|
64
|
-
}),
|
|
65
|
-
)
|
|
71
|
+
@codec(EpochCodec)
|
|
66
72
|
export class Epoch extends Entity.Base<EpochLike, Epoch>() {
|
|
73
|
+
public readonly integer: Num;
|
|
74
|
+
public readonly numerator: Num;
|
|
75
|
+
public readonly denominator: Num;
|
|
76
|
+
|
|
67
77
|
/**
|
|
68
78
|
* Construct a new Epoch instance.
|
|
69
79
|
*
|
|
@@ -71,12 +81,16 @@ export class Epoch extends Entity.Base<EpochLike, Epoch>() {
|
|
|
71
81
|
* @param numerator - Fractional numerator (Num).
|
|
72
82
|
* @param denominator - Fractional denominator (Num).
|
|
73
83
|
*/
|
|
74
|
-
public constructor(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
) {
|
|
84
|
+
public constructor({
|
|
85
|
+
integer,
|
|
86
|
+
numerator,
|
|
87
|
+
denominator,
|
|
88
|
+
}: Omit<DecodedType<typeof EpochCodec>, "padding">) {
|
|
79
89
|
super();
|
|
90
|
+
|
|
91
|
+
this.integer = integer;
|
|
92
|
+
this.numerator = numerator;
|
|
93
|
+
this.denominator = denominator;
|
|
80
94
|
}
|
|
81
95
|
|
|
82
96
|
/**
|
|
@@ -229,11 +243,11 @@ export class Epoch extends Entity.Base<EpochLike, Epoch>() {
|
|
|
229
243
|
static fromNum(v: NumLike): Epoch {
|
|
230
244
|
const num = numFrom(v);
|
|
231
245
|
|
|
232
|
-
return
|
|
233
|
-
num & numFrom("0xffffff"),
|
|
234
|
-
(num >> numFrom(24)) & numFrom("0xffff"),
|
|
235
|
-
(num >> numFrom(40)) & numFrom("0xffff"),
|
|
236
|
-
);
|
|
246
|
+
return Epoch.from({
|
|
247
|
+
integer: num & numFrom("0xffffff"),
|
|
248
|
+
numerator: (num >> numFrom(24)) & numFrom("0xffff"),
|
|
249
|
+
denominator: (num >> numFrom(40)) & numFrom("0xffff"),
|
|
250
|
+
});
|
|
237
251
|
}
|
|
238
252
|
|
|
239
253
|
/**
|
|
@@ -250,21 +264,25 @@ export class Epoch extends Entity.Base<EpochLike, Epoch>() {
|
|
|
250
264
|
* @param e - Value convertible to Epoch
|
|
251
265
|
* @returns Epoch instance
|
|
252
266
|
*/
|
|
253
|
-
static
|
|
267
|
+
static from(e: EpochLike): Epoch {
|
|
254
268
|
if (e instanceof Epoch) {
|
|
255
269
|
return e;
|
|
256
270
|
}
|
|
257
271
|
|
|
258
272
|
if (Array.isArray(e)) {
|
|
259
|
-
return new Epoch(
|
|
273
|
+
return new Epoch({
|
|
274
|
+
integer: numFrom(e[0]),
|
|
275
|
+
numerator: numFrom(e[1]),
|
|
276
|
+
denominator: numFrom(e[2]),
|
|
277
|
+
});
|
|
260
278
|
}
|
|
261
279
|
|
|
262
280
|
if (typeof e === "object") {
|
|
263
|
-
return new Epoch(
|
|
264
|
-
numFrom(e.integer),
|
|
265
|
-
numFrom(e.numerator),
|
|
266
|
-
numFrom(e.denominator),
|
|
267
|
-
);
|
|
281
|
+
return new Epoch({
|
|
282
|
+
integer: numFrom(e.integer),
|
|
283
|
+
numerator: numFrom(e.numerator),
|
|
284
|
+
denominator: numFrom(e.denominator),
|
|
285
|
+
});
|
|
268
286
|
}
|
|
269
287
|
|
|
270
288
|
return Epoch.fromNum(e);
|
package/src/ckb/script.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Bytes, BytesLike, bytesFrom } from "../bytes/index.js";
|
|
2
2
|
import type { Client } from "../client/index.js";
|
|
3
3
|
import { KnownScript } from "../client/knownScript.js";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Codec,
|
|
6
|
+
DecodedType,
|
|
7
|
+
EncodableType,
|
|
8
|
+
Entity,
|
|
9
|
+
codec,
|
|
10
|
+
} from "../codec/index.js";
|
|
5
11
|
import { Hex, HexLike, hexFrom } from "../hex/index.js";
|
|
6
12
|
import { mol } from "../molecule/index.js";
|
|
7
13
|
import {
|
|
@@ -98,25 +104,24 @@ export function hashTypeFromBytes(bytes: BytesLike): HashType {
|
|
|
98
104
|
return NUM_TO_HASH_TYPE[bytesFrom(bytes)[0]];
|
|
99
105
|
}
|
|
100
106
|
|
|
107
|
+
const ScriptCodec = mol.table({
|
|
108
|
+
codeHash: mol.Byte32,
|
|
109
|
+
hashType: HashTypeCodec,
|
|
110
|
+
args: mol.Bytes,
|
|
111
|
+
});
|
|
101
112
|
/**
|
|
102
113
|
* @public
|
|
103
114
|
*/
|
|
104
|
-
export type ScriptLike =
|
|
105
|
-
codeHash: BytesLike;
|
|
106
|
-
hashType: HashTypeLike;
|
|
107
|
-
args: BytesLike;
|
|
108
|
-
};
|
|
115
|
+
export type ScriptLike = EncodableType<typeof ScriptCodec>;
|
|
109
116
|
/**
|
|
110
117
|
* @public
|
|
111
118
|
*/
|
|
112
|
-
@codec(
|
|
113
|
-
mol.table({
|
|
114
|
-
codeHash: mol.Byte32,
|
|
115
|
-
hashType: HashTypeCodec,
|
|
116
|
-
args: mol.Bytes,
|
|
117
|
-
}),
|
|
118
|
-
)
|
|
119
|
+
@codec(ScriptCodec)
|
|
119
120
|
export class Script extends Entity.Base<ScriptLike, Script>() {
|
|
121
|
+
public codeHash: Hex;
|
|
122
|
+
public hashType: HashType;
|
|
123
|
+
public args: Hex;
|
|
124
|
+
|
|
120
125
|
/**
|
|
121
126
|
* Creates an instance of Script.
|
|
122
127
|
*
|
|
@@ -124,12 +129,12 @@ export class Script extends Entity.Base<ScriptLike, Script>() {
|
|
|
124
129
|
* @param hashType - The hash type of the script.
|
|
125
130
|
* @param args - The arguments for the script.
|
|
126
131
|
*/
|
|
127
|
-
constructor(
|
|
128
|
-
public codeHash: Hex,
|
|
129
|
-
public hashType: HashType,
|
|
130
|
-
public args: Hex,
|
|
131
|
-
) {
|
|
132
|
+
constructor({ codeHash, hashType, args }: DecodedType<typeof ScriptCodec>) {
|
|
132
133
|
super();
|
|
134
|
+
|
|
135
|
+
this.codeHash = codeHash;
|
|
136
|
+
this.hashType = hashType;
|
|
137
|
+
this.args = args;
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
get occupiedSize(): number {
|
|
@@ -174,34 +179,6 @@ export class Script extends Entity.Base<ScriptLike, Script>() {
|
|
|
174
179
|
);
|
|
175
180
|
}
|
|
176
181
|
|
|
177
|
-
/**
|
|
178
|
-
* Creates a Script instance from a ScriptLike object.
|
|
179
|
-
*
|
|
180
|
-
* @param script - A ScriptLike object or an instance of Script.
|
|
181
|
-
* @returns A Script instance.
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```typescript
|
|
185
|
-
* const script = Script.from({
|
|
186
|
-
* codeHash: "0x1234...",
|
|
187
|
-
* hashType: "type",
|
|
188
|
-
* args: "0xabcd..."
|
|
189
|
-
* });
|
|
190
|
-
* ```
|
|
191
|
-
*/
|
|
192
|
-
|
|
193
|
-
static from(script: ScriptLike): Script {
|
|
194
|
-
if (script instanceof Script) {
|
|
195
|
-
return script;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return new Script(
|
|
199
|
-
hexFrom(script.codeHash),
|
|
200
|
-
hashTypeFrom(script.hashType),
|
|
201
|
-
hexFrom(script.args),
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
182
|
/**
|
|
206
183
|
* Creates a Script instance from client and known script.
|
|
207
184
|
*
|