@ckb-ccc/core 1.22.0 → 2.0.0-next.1
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 +61 -1
- package/dist/advanced.d.mts +1 -1
- package/dist/advanced.mjs +1 -1
- package/{dist.commonjs/advancedBarrel-CJL3rfuW.d.ts → dist/advancedBarrel-DfFMFhdl.d.mts} +934 -567
- package/dist/advancedBarrel-DfFMFhdl.d.mts.map +1 -0
- package/dist/advancedBarrel.d.mts +1 -1
- package/dist/advancedBarrel.mjs +1 -1
- package/dist/barrel-ONYEMVg5.mjs +7 -0
- package/dist/barrel-ONYEMVg5.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/transformers-CduZ1Js5.mjs +2 -0
- package/dist/transformers-CduZ1Js5.mjs.map +1 -0
- package/dist.commonjs/advanced.d.ts +1 -1
- package/dist.commonjs/advanced.js +1 -1
- package/{dist/advancedBarrel-Daj_LJkz.d.mts → dist.commonjs/advancedBarrel-Dl0mM9JO.d.ts} +935 -566
- package/dist.commonjs/advancedBarrel-Dl0mM9JO.d.ts.map +1 -0
- package/dist.commonjs/advancedBarrel.d.ts +1 -1
- package/dist.commonjs/advancedBarrel.js +1 -1
- package/dist.commonjs/{barrel-DZkApbAR.js → barrel-HfgYMxP_.js} +10 -10
- package/dist.commonjs/barrel-HfgYMxP_.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/dist.commonjs/transformers-BUlLwiyt.js +2 -0
- package/dist.commonjs/transformers-BUlLwiyt.js.map +1 -0
- 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/advancedBarrel-Daj_LJkz.d.mts.map +0 -1
- package/dist/barrel-CFOWSjcM.mjs +0 -7
- package/dist/barrel-CFOWSjcM.mjs.map +0 -1
- package/dist/transformers-DAMi6ZOq.mjs +0 -2
- package/dist/transformers-DAMi6ZOq.mjs.map +0 -1
- package/dist.commonjs/advancedBarrel-CJL3rfuW.d.ts.map +0 -1
- package/dist.commonjs/barrel-DZkApbAR.js.map +0 -1
- package/dist.commonjs/transformers-C6jbFO7W.js +0 -2
- package/dist.commonjs/transformers-C6jbFO7W.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#endregion
|
|
2
1
|
//#region src/bytes/advanced.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Represents the possible encoding formats for converting bytes.
|
|
@@ -242,29 +241,32 @@ declare class Address {
|
|
|
242
241
|
//#endregion
|
|
243
242
|
//#region src/codec/codec.d.ts
|
|
244
243
|
type CodecLike<Encodable, Decoded = Encodable> = {
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
encode: (encodable: Encodable) => BytesLike;
|
|
245
|
+
decode: (decodable: Bytes$1, config?: {
|
|
247
246
|
isExtraFieldIgnored?: boolean;
|
|
248
247
|
}) => Decoded;
|
|
249
|
-
|
|
248
|
+
from?: ((encoded: Encodable) => Decoded) | null;
|
|
249
|
+
byteLength?: number;
|
|
250
250
|
};
|
|
251
251
|
declare class Codec<Encodable, Decoded = Encodable> {
|
|
252
252
|
readonly encode: (encodable: Encodable) => Bytes$1;
|
|
253
253
|
readonly decode: (decodable: BytesLike, config?: {
|
|
254
254
|
isExtraFieldIgnored?: boolean;
|
|
255
255
|
}) => Decoded;
|
|
256
|
+
readonly from: (encodable: Encodable) => Decoded;
|
|
256
257
|
readonly byteLength?: number | undefined;
|
|
257
258
|
constructor(encode: (encodable: Encodable) => Bytes$1, decode: (decodable: BytesLike, config?: {
|
|
258
259
|
isExtraFieldIgnored?: boolean;
|
|
259
|
-
}) => Decoded, byteLength?: number | undefined);
|
|
260
|
+
}) => Decoded, from: (encodable: Encodable) => Decoded, byteLength?: number | undefined);
|
|
260
261
|
encodeOr<T>(encodable: Encodable, fallback: T): Bytes$1 | T;
|
|
261
262
|
decodeOr<T>(decodable: BytesLike, fallback: T, config?: {
|
|
262
263
|
isExtraFieldIgnored?: boolean;
|
|
263
264
|
}): Decoded | T;
|
|
264
|
-
static from<Encodable, Decoded = Encodable>(
|
|
265
|
-
map<NewEncodable = Encodable, NewDecoded = Decoded>({ inMap, outMap }: {
|
|
265
|
+
static from<Encodable, Decoded = Encodable>(codecLike: CodecLike<Encodable, Decoded>): Codec<Encodable, Decoded>;
|
|
266
|
+
map<NewEncodable = Encodable, NewDecoded = Decoded>({ inMap, outMap, from }: {
|
|
266
267
|
inMap?: (encodable: NewEncodable) => Encodable;
|
|
267
268
|
outMap?: (decoded: Decoded) => NewDecoded;
|
|
269
|
+
from?: (encodable: NewEncodable) => NewDecoded;
|
|
268
270
|
}): Codec<NewEncodable, NewDecoded>;
|
|
269
271
|
mapIn<NewEncodable>(map: (encodable: NewEncodable) => Encodable): Codec<NewEncodable, Decoded>;
|
|
270
272
|
mapOut<NewDecoded>(map: (decoded: Decoded) => NewDecoded): Codec<Encodable, NewDecoded>;
|
|
@@ -277,12 +279,12 @@ type DecodedType<T extends CodecLike<any, any>> = T extends CodecLike<any, infer
|
|
|
277
279
|
* Vector with fixed size item codec
|
|
278
280
|
* @param itemCodec fixed-size vector item codec
|
|
279
281
|
*/
|
|
280
|
-
declare function fixedItemVec<Encodable, Decoded>(
|
|
282
|
+
declare function fixedItemVec<Encodable, Decoded>(itemCodecLike: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
|
|
281
283
|
/**
|
|
282
284
|
* Vector with dynamic size item codec, you can create a recursive vector with this function
|
|
283
285
|
* @param itemCodec the vector item codec. It can be fixed-size or dynamic-size.
|
|
284
286
|
*/
|
|
285
|
-
declare function dynItemVec<Encodable, Decoded>(
|
|
287
|
+
declare function dynItemVec<Encodable, Decoded>(itemCodecLike: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
|
|
286
288
|
/**
|
|
287
289
|
* General vector codec, if `itemCodec` is fixed size type, it will create a fixvec codec, otherwise a dynvec codec will be created.
|
|
288
290
|
* @param itemCodec
|
|
@@ -295,12 +297,12 @@ declare function vector<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Deco
|
|
|
295
297
|
* - if it's not empty, just serialize the inner item (the size is same as the inner item's size).
|
|
296
298
|
* @param innerCodec
|
|
297
299
|
*/
|
|
298
|
-
declare function option<Encodable, Decoded>(
|
|
300
|
+
declare function option<Encodable, Decoded>(innerCodecLike: CodecLike<Encodable, Decoded>): Codec<Encodable | undefined | null, Decoded | undefined>;
|
|
299
301
|
/**
|
|
300
302
|
* Wrap the encoded value with a fixed-length buffer
|
|
301
303
|
* @param codec
|
|
302
304
|
*/
|
|
303
|
-
declare function byteVec<Encodable, Decoded>(
|
|
305
|
+
declare function byteVec<Encodable, Decoded>(codecLike: CodecLike<Encodable, Decoded>): Codec<Encodable, Decoded>;
|
|
304
306
|
type EncodableRecordOptionalKeys<T extends Record<string, CodecLike<any, any>>> = { [K in keyof T]: Extract<EncodableType<T[K]>, undefined> extends never ? never : K; }[keyof T];
|
|
305
307
|
type EncodableRecord<T extends Record<string, CodecLike<any, any>>> = { [key in keyof Pick<T, EncodableRecordOptionalKeys<T>>]+?: EncodableType<T[key]>; } & { [key in keyof Omit<T, EncodableRecordOptionalKeys<T>>]: EncodableType<T[key]>; };
|
|
306
308
|
type DecodedRecordOptionalKeys<T extends Record<string, CodecLike<any, any>>> = { [K in keyof T]: Extract<DecodedType<T[K]>, undefined> extends never ? never : K; }[keyof T];
|
|
@@ -309,7 +311,7 @@ type DecodedRecord<T extends Record<string, CodecLike<any, any>>> = { [key in ke
|
|
|
309
311
|
* Table is a dynamic-size type. It can be considered as a dynvec but the length is fixed.
|
|
310
312
|
* @param codecLayout
|
|
311
313
|
*/
|
|
312
|
-
declare function table<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(
|
|
314
|
+
declare function table<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayoutLike: T): Codec<Encodable, Decoded>;
|
|
313
315
|
type UnionEncodable<T extends Record<string, CodecLike<any, any>>, K extends keyof T = keyof T> = K extends unknown ? {
|
|
314
316
|
type: K;
|
|
315
317
|
value: EncodableType<T[K]>;
|
|
@@ -354,7 +356,7 @@ type UnionMatchHandlers<CodecType extends CodecLike<any, UnionDecoded<any, any>>
|
|
|
354
356
|
* // Fixed-size union with custom numeric IDs
|
|
355
357
|
* union({ cafe: PaddedUint8, bee: Uint16 }, { cafe: 0xcafe, bee: 0xbee })
|
|
356
358
|
*/
|
|
357
|
-
declare function union<T extends Record<string, CodecLike<any, any>>>(
|
|
359
|
+
declare function union<T extends Record<string, CodecLike<any, any>>>(codecLayoutLike: T, fields?: Record<keyof T, number | undefined | null>): Codec<UnionEncodable<T> | {
|
|
358
360
|
inner: UnionEncodable<T>;
|
|
359
361
|
}, UnionDecoded<T>>;
|
|
360
362
|
/**
|
|
@@ -362,14 +364,14 @@ declare function union<T extends Record<string, CodecLike<any, any>>>(codecLayou
|
|
|
362
364
|
* The size of a struct is the sum of all fields' size.
|
|
363
365
|
* @param codecLayout a object contains all fields' codec
|
|
364
366
|
*/
|
|
365
|
-
declare function struct<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(
|
|
367
|
+
declare function struct<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayoutLike: T): Codec<Encodable, Decoded>;
|
|
366
368
|
/**
|
|
367
369
|
* The array is a fixed-size type: it has a fixed-size inner type and a fixed length.
|
|
368
370
|
* The size of an array is the size of inner type times the length.
|
|
369
371
|
* @param itemCodec the fixed-size array item codec
|
|
370
372
|
* @param itemCount
|
|
371
373
|
*/
|
|
372
|
-
declare function array<Encodable, Decoded>(
|
|
374
|
+
declare function array<Encodable, Decoded>(itemCodecLike: CodecLike<Encodable, Decoded>, itemCount: number): Codec<Array<Encodable>, Array<Decoded>>;
|
|
373
375
|
//#endregion
|
|
374
376
|
//#region src/num/index.d.ts
|
|
375
377
|
/**
|
|
@@ -828,24 +830,43 @@ declare function apply<T, R>(transformer: (val: T) => R, value: undefined | null
|
|
|
828
830
|
*/
|
|
829
831
|
declare function apply<T, R>(transformer: (val: T) => R, value: T | undefined | null): R | undefined;
|
|
830
832
|
/**
|
|
831
|
-
* Similar to Array.reduce, but
|
|
833
|
+
* Similar to Array.reduce, but works on any iterable.
|
|
834
|
+
* @public
|
|
835
|
+
*
|
|
836
|
+
* @param values - The value or iterable to be reduced.
|
|
837
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
838
|
+
* @returns The accumulated result.
|
|
839
|
+
*/
|
|
840
|
+
declare function reduce<T>(values: T | Iterable<T>, accumulator: (a: T, b: T, i: number) => T | undefined | null | void): T;
|
|
841
|
+
/**
|
|
842
|
+
* Similar to Array.reduce, but works on any iterable.
|
|
843
|
+
* @public
|
|
844
|
+
*
|
|
845
|
+
* @param values - The value or iterable to be reduced.
|
|
846
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
847
|
+
* @param init - The initial value.
|
|
848
|
+
* @returns The accumulated result.
|
|
849
|
+
*/
|
|
850
|
+
declare function reduce<T, V>(values: V | Iterable<V>, accumulator: (a: T, b: V, i: number) => T | undefined | null | void, init: T): T;
|
|
851
|
+
/**
|
|
852
|
+
* Similar to Array.reduce, but works on async iterables and the accumulator can return a Promise.
|
|
832
853
|
* @public
|
|
833
854
|
*
|
|
834
|
-
* @param values - The
|
|
835
|
-
* @param accumulator - A callback to be called for each value. If it returns null, the previous result will be kept.
|
|
855
|
+
* @param values - The value, iterable, or async iterable to be reduced.
|
|
856
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
836
857
|
* @returns The accumulated result.
|
|
837
858
|
*/
|
|
838
|
-
declare function reduceAsync<T>(values: T
|
|
859
|
+
declare function reduceAsync<T>(values: T | Iterable<T> | AsyncIterable<T>, accumulator: (a: T, b: T, i: number) => Promise<T | undefined | null | void> | T | undefined | null | void): Promise<T>;
|
|
839
860
|
/**
|
|
840
|
-
* Similar to Array.reduce, but the accumulator can
|
|
861
|
+
* Similar to Array.reduce, but works on async iterables and the accumulator can return a Promise.
|
|
841
862
|
* @public
|
|
842
863
|
*
|
|
843
|
-
* @param values - The
|
|
844
|
-
* @param accumulator - A callback to be called for each value. If it returns null, the previous result will be kept.
|
|
864
|
+
* @param values - The value, iterable, or async iterable to be reduced.
|
|
865
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
845
866
|
* @param init - The initial value.
|
|
846
867
|
* @returns The accumulated result.
|
|
847
868
|
*/
|
|
848
|
-
declare function reduceAsync<T, V>(values: V
|
|
869
|
+
declare function reduceAsync<T, V>(values: V | Iterable<V> | AsyncIterable<V>, accumulator: (a: T, b: V, i: number) => Promise<T | undefined | null | void> | T | undefined | null | void, init: T | Promise<T>): Promise<T>;
|
|
849
870
|
/**
|
|
850
871
|
* Waits for the given duration, rejecting with the abort reason if cancelled.
|
|
851
872
|
* @public
|
|
@@ -968,25 +989,31 @@ declare abstract class Entity {
|
|
|
968
989
|
* @returns The encoded bytes
|
|
969
990
|
* @throws Will throw an error if the entity is not serializable
|
|
970
991
|
*/
|
|
971
|
-
encode(_: SubTypeLike)
|
|
992
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
972
993
|
/**
|
|
973
994
|
* Decode the entity from bytes
|
|
974
995
|
* @public
|
|
975
996
|
* @static
|
|
976
997
|
* @param _ - The bytes to decode
|
|
998
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
977
999
|
* @returns The decoded entity
|
|
978
1000
|
* @throws Will throw an error if the entity is not serializable
|
|
979
1001
|
*/
|
|
980
|
-
decode(_: BytesLike
|
|
1002
|
+
decode: (_: BytesLike, _config?: {
|
|
1003
|
+
isExtraFieldIgnored?: boolean;
|
|
1004
|
+
}) => SubType;
|
|
981
1005
|
/**
|
|
982
1006
|
* Create an entity from bytes
|
|
983
1007
|
* @public
|
|
984
1008
|
* @static
|
|
985
1009
|
* @param _ - The bytes to create the entity from
|
|
1010
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
986
1011
|
* @returns The created entity
|
|
987
1012
|
* @throws Will throw an error if the entity is not serializable
|
|
988
1013
|
*/
|
|
989
|
-
fromBytes(_bytes: BytesLike
|
|
1014
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1015
|
+
isExtraFieldIgnored?: boolean;
|
|
1016
|
+
}) => SubType;
|
|
990
1017
|
/**
|
|
991
1018
|
* Create an entity from a serializable object
|
|
992
1019
|
* @public
|
|
@@ -995,7 +1022,7 @@ declare abstract class Entity {
|
|
|
995
1022
|
* @returns The created entity
|
|
996
1023
|
* @throws Will throw an error if the entity is not serializable
|
|
997
1024
|
*/
|
|
998
|
-
from(_: SubTypeLike)
|
|
1025
|
+
from: (_: SubTypeLike) => SubType;
|
|
999
1026
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
1000
1027
|
/**
|
|
1001
1028
|
* Generate a base class of CCC to create a serializable Union instance.
|
|
@@ -1068,25 +1095,31 @@ declare abstract class Entity {
|
|
|
1068
1095
|
* @returns The encoded bytes
|
|
1069
1096
|
* @throws Will throw an error if the entity is not serializable
|
|
1070
1097
|
*/
|
|
1071
|
-
encode(_: SubTypeLike_1)
|
|
1098
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
1072
1099
|
/**
|
|
1073
1100
|
* Decode the entity from bytes
|
|
1074
1101
|
* @public
|
|
1075
1102
|
* @static
|
|
1076
1103
|
* @param _ - The bytes to decode
|
|
1104
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1077
1105
|
* @returns The decoded entity
|
|
1078
1106
|
* @throws Will throw an error if the entity is not serializable
|
|
1079
1107
|
*/
|
|
1080
|
-
decode(_: BytesLike
|
|
1108
|
+
decode: (_: BytesLike, _config?: {
|
|
1109
|
+
isExtraFieldIgnored?: boolean;
|
|
1110
|
+
} | undefined) => SubType_1;
|
|
1081
1111
|
/**
|
|
1082
1112
|
* Create an entity from bytes
|
|
1083
1113
|
* @public
|
|
1084
1114
|
* @static
|
|
1085
1115
|
* @param _ - The bytes to create the entity from
|
|
1116
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1086
1117
|
* @returns The created entity
|
|
1087
1118
|
* @throws Will throw an error if the entity is not serializable
|
|
1088
1119
|
*/
|
|
1089
|
-
fromBytes(_bytes: BytesLike
|
|
1120
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1121
|
+
isExtraFieldIgnored?: boolean;
|
|
1122
|
+
} | undefined) => SubType_1;
|
|
1090
1123
|
/**
|
|
1091
1124
|
* Create an entity from a serializable object
|
|
1092
1125
|
* @public
|
|
@@ -1095,7 +1128,7 @@ declare abstract class Entity {
|
|
|
1095
1128
|
* @returns The created entity
|
|
1096
1129
|
* @throws Will throw an error if the entity is not serializable
|
|
1097
1130
|
*/
|
|
1098
|
-
from(_: SubTypeLike_1)
|
|
1131
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
1099
1132
|
/**
|
|
1100
1133
|
* Generate a base class of CCC to create a serializable instance.
|
|
1101
1134
|
* This should be used with the {@link codec} decorator.
|
|
@@ -1200,25 +1233,31 @@ declare abstract class Entity {
|
|
|
1200
1233
|
* @returns The encoded bytes
|
|
1201
1234
|
* @throws Will throw an error if the entity is not serializable
|
|
1202
1235
|
*/
|
|
1203
|
-
encode(_: SubTypeLike)
|
|
1236
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
1204
1237
|
/**
|
|
1205
1238
|
* Decode the entity from bytes
|
|
1206
1239
|
* @public
|
|
1207
1240
|
* @static
|
|
1208
1241
|
* @param _ - The bytes to decode
|
|
1242
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1209
1243
|
* @returns The decoded entity
|
|
1210
1244
|
* @throws Will throw an error if the entity is not serializable
|
|
1211
1245
|
*/
|
|
1212
|
-
decode(_: BytesLike
|
|
1246
|
+
decode: (_: BytesLike, _config?: {
|
|
1247
|
+
isExtraFieldIgnored?: boolean;
|
|
1248
|
+
} | undefined) => SubType;
|
|
1213
1249
|
/**
|
|
1214
1250
|
* Create an entity from bytes
|
|
1215
1251
|
* @public
|
|
1216
1252
|
* @static
|
|
1217
1253
|
* @param _ - The bytes to create the entity from
|
|
1254
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1218
1255
|
* @returns The created entity
|
|
1219
1256
|
* @throws Will throw an error if the entity is not serializable
|
|
1220
1257
|
*/
|
|
1221
|
-
fromBytes(_bytes: BytesLike
|
|
1258
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1259
|
+
isExtraFieldIgnored?: boolean;
|
|
1260
|
+
} | undefined) => SubType;
|
|
1222
1261
|
/**
|
|
1223
1262
|
* Create an entity from a serializable object
|
|
1224
1263
|
* @public
|
|
@@ -1227,7 +1266,7 @@ declare abstract class Entity {
|
|
|
1227
1266
|
* @returns The created entity
|
|
1228
1267
|
* @throws Will throw an error if the entity is not serializable
|
|
1229
1268
|
*/
|
|
1230
|
-
from(_: SubTypeLike)
|
|
1269
|
+
from: (_: SubTypeLike) => SubType;
|
|
1231
1270
|
/**
|
|
1232
1271
|
* Generate a base class of CCC to create a serializable instance.
|
|
1233
1272
|
* This should be used with the {@link codec} decorator.
|
|
@@ -1280,25 +1319,31 @@ declare abstract class Entity {
|
|
|
1280
1319
|
* @returns The encoded bytes
|
|
1281
1320
|
* @throws Will throw an error if the entity is not serializable
|
|
1282
1321
|
*/
|
|
1283
|
-
encode(_: SubTypeLike_1)
|
|
1322
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
1284
1323
|
/**
|
|
1285
1324
|
* Decode the entity from bytes
|
|
1286
1325
|
* @public
|
|
1287
1326
|
* @static
|
|
1288
1327
|
* @param _ - The bytes to decode
|
|
1328
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1289
1329
|
* @returns The decoded entity
|
|
1290
1330
|
* @throws Will throw an error if the entity is not serializable
|
|
1291
1331
|
*/
|
|
1292
|
-
decode(_: BytesLike
|
|
1332
|
+
decode: (_: BytesLike, _config?: {
|
|
1333
|
+
isExtraFieldIgnored?: boolean;
|
|
1334
|
+
}) => SubType_1;
|
|
1293
1335
|
/**
|
|
1294
1336
|
* Create an entity from bytes
|
|
1295
1337
|
* @public
|
|
1296
1338
|
* @static
|
|
1297
1339
|
* @param _ - The bytes to create the entity from
|
|
1340
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1298
1341
|
* @returns The created entity
|
|
1299
1342
|
* @throws Will throw an error if the entity is not serializable
|
|
1300
1343
|
*/
|
|
1301
|
-
fromBytes(_bytes: BytesLike
|
|
1344
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1345
|
+
isExtraFieldIgnored?: boolean;
|
|
1346
|
+
}) => SubType_1;
|
|
1302
1347
|
/**
|
|
1303
1348
|
* Create an entity from a serializable object
|
|
1304
1349
|
* @public
|
|
@@ -1307,7 +1352,7 @@ declare abstract class Entity {
|
|
|
1307
1352
|
* @returns The created entity
|
|
1308
1353
|
* @throws Will throw an error if the entity is not serializable
|
|
1309
1354
|
*/
|
|
1310
|
-
from(_: SubTypeLike_1)
|
|
1355
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
1311
1356
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
1312
1357
|
/**
|
|
1313
1358
|
* Generate a base class of CCC to create a serializable Union instance.
|
|
@@ -1323,31 +1368,32 @@ declare abstract class Entity {
|
|
|
1323
1368
|
* A class decorator to add methods implementation on the {@link Entity.Base} class
|
|
1324
1369
|
* @example
|
|
1325
1370
|
* ```typescript
|
|
1326
|
-
*
|
|
1327
|
-
* mol.
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1332
|
-
* )
|
|
1371
|
+
* const ScriptCodec = mol.table({
|
|
1372
|
+
* codeHash: mol.Byte32,
|
|
1373
|
+
* hashType: HashTypeCodec,
|
|
1374
|
+
* args: mol.Bytes,
|
|
1375
|
+
* });
|
|
1376
|
+
* export type ScriptLike = EncodableType<typeof ScriptCodec>;
|
|
1377
|
+
* @codec(ScriptCodec)
|
|
1333
1378
|
* export class Script extends Entity.Base<ScriptLike, Script>() {
|
|
1334
|
-
*
|
|
1379
|
+
* public codeHash: Hex;
|
|
1380
|
+
* public hashType: HashType;
|
|
1381
|
+
* public args: Hex;
|
|
1382
|
+
*
|
|
1383
|
+
* constructor({ codeHash, hashType, args }: DecodedType<typeof ScriptCodec>) {
|
|
1384
|
+
* super();
|
|
1385
|
+
*
|
|
1386
|
+
* this.codeHash = codeHash;
|
|
1387
|
+
* this.hashType = hashType;
|
|
1388
|
+
* this.args = args;
|
|
1389
|
+
* }
|
|
1335
1390
|
* }
|
|
1336
1391
|
* ```
|
|
1337
1392
|
*/
|
|
1338
|
-
declare function codec<Encodable, TypeLike extends Encodable,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
}) => Decoded;
|
|
1343
|
-
byteLength?: number;
|
|
1344
|
-
}): <Type extends TypeLike, ConstructorType extends Constructor<Type> & {
|
|
1345
|
-
from(decoded: TypeLike): Type;
|
|
1346
|
-
byteLength?: number;
|
|
1347
|
-
encode(encodable: TypeLike): Bytes$1;
|
|
1348
|
-
decode(bytesLike: BytesLike): Type;
|
|
1349
|
-
fromBytes(bytes: BytesLike): Type;
|
|
1350
|
-
}>(Constructor: ConstructorType, ..._: unknown[]) => ConstructorType;
|
|
1393
|
+
declare function codec<Encodable, Decoded>(codecLike: CodecLike<Encodable, Decoded>): <TypeLike extends Encodable, Type extends TypeLike, ConstructorType extends Constructor<Type, [Decoded, ...any[]]>>(Constructor: ConstructorType & Omit<CodecLike<TypeLike, Type>, "from"> & {
|
|
1394
|
+
from: (encodable: TypeLike | Decoded) => Type;
|
|
1395
|
+
fromBytes: (bytes: BytesLike) => Type;
|
|
1396
|
+
}, ..._: unknown[]) => void;
|
|
1351
1397
|
//#endregion
|
|
1352
1398
|
//#region src/codec/predefined.d.ts
|
|
1353
1399
|
/**
|
|
@@ -1919,7 +1965,7 @@ declare class Signature {
|
|
|
1919
1965
|
* This class provides methods to connect, get addresses, and sign transactions.
|
|
1920
1966
|
* @public
|
|
1921
1967
|
*/
|
|
1922
|
-
declare abstract class Signer {
|
|
1968
|
+
declare abstract class Signer$1 {
|
|
1923
1969
|
protected client_: Client;
|
|
1924
1970
|
constructor(client_: Client);
|
|
1925
1971
|
abstract get type(): SignerType;
|
|
@@ -1930,6 +1976,7 @@ declare abstract class Signer {
|
|
|
1930
1976
|
*/
|
|
1931
1977
|
matchNetworkPreference(preferences: NetworkPreference[], currentNetwork: string | undefined): NetworkPreference | undefined;
|
|
1932
1978
|
static verifyMessage(message: string | BytesLike, signature: Signature): Promise<boolean>;
|
|
1979
|
+
static fromSignature(_client: Client, _signature: Signature, _message?: string | BytesLike | null, ..._addresses: (string | string[])[]): Promise<Signer$1 | undefined>;
|
|
1933
1980
|
/**
|
|
1934
1981
|
* Connects to the signer.
|
|
1935
1982
|
*
|
|
@@ -2101,7 +2148,7 @@ declare abstract class Signer {
|
|
|
2101
2148
|
* An abstract class representing a multisig signer.
|
|
2102
2149
|
* @public
|
|
2103
2150
|
*/
|
|
2104
|
-
declare abstract class SignerMultisig extends Signer {
|
|
2151
|
+
declare abstract class SignerMultisig extends Signer$1 {
|
|
2105
2152
|
/**
|
|
2106
2153
|
* Get the number of members in the multisig script.
|
|
2107
2154
|
* @returns The number of members.
|
|
@@ -2178,8 +2225,8 @@ declare class SignerMultisigNotEnoughSignaturesError extends Error {
|
|
|
2178
2225
|
*/
|
|
2179
2226
|
declare class SignerInfo {
|
|
2180
2227
|
name: string;
|
|
2181
|
-
signer: Signer;
|
|
2182
|
-
constructor(name: string, signer: Signer);
|
|
2228
|
+
signer: Signer$1;
|
|
2229
|
+
constructor(name: string, signer: Signer$1);
|
|
2183
2230
|
}
|
|
2184
2231
|
/**
|
|
2185
2232
|
* Represents a wallet with a name, icon, and an array of signer information.
|
|
@@ -2197,7 +2244,7 @@ type Wallet = {
|
|
|
2197
2244
|
* as well as signing transactions.
|
|
2198
2245
|
* @public
|
|
2199
2246
|
*/
|
|
2200
|
-
declare abstract class SignerBtc extends Signer {
|
|
2247
|
+
declare abstract class SignerBtc extends Signer$1 {
|
|
2201
2248
|
get type(): SignerType;
|
|
2202
2249
|
get signType(): SignerSignType;
|
|
2203
2250
|
/**
|
|
@@ -2411,7 +2458,7 @@ declare function verifyMessageCkbSecp256k1(message: string | BytesLike, signatur
|
|
|
2411
2458
|
*
|
|
2412
2459
|
* @public
|
|
2413
2460
|
*/
|
|
2414
|
-
declare class SignerCkbAlwaysSuccess extends Signer {
|
|
2461
|
+
declare class SignerCkbAlwaysSuccess extends Signer$1 {
|
|
2415
2462
|
get type(): SignerType;
|
|
2416
2463
|
get signType(): SignerSignType;
|
|
2417
2464
|
/**
|
|
@@ -2442,7 +2489,7 @@ declare class SignerCkbAlwaysSuccess extends Signer {
|
|
|
2442
2489
|
/**
|
|
2443
2490
|
* @public
|
|
2444
2491
|
*/
|
|
2445
|
-
declare class SignerCkbPublicKey extends Signer {
|
|
2492
|
+
declare class SignerCkbPublicKey extends Signer$1 {
|
|
2446
2493
|
get type(): SignerType;
|
|
2447
2494
|
get signType(): SignerSignType;
|
|
2448
2495
|
readonly publicKey: Hex;
|
|
@@ -2481,7 +2528,7 @@ declare class SignerCkbPrivateKey extends SignerCkbPublicKey {
|
|
|
2481
2528
|
*
|
|
2482
2529
|
* @public
|
|
2483
2530
|
*/
|
|
2484
|
-
declare class SignerCkbScriptReadonly extends Signer {
|
|
2531
|
+
declare class SignerCkbScriptReadonly extends Signer$1 {
|
|
2485
2532
|
/**
|
|
2486
2533
|
* The type of the signer.
|
|
2487
2534
|
*/
|
|
@@ -2550,6 +2597,12 @@ type MultisigCkbWitnessLike = ({
|
|
|
2550
2597
|
mustMatch?: NumLike | null;
|
|
2551
2598
|
signatures?: HexLike[] | null;
|
|
2552
2599
|
};
|
|
2600
|
+
declare const MultisigCkbWitnessCodec: Codec<MultisigCkbWitnessLike, {
|
|
2601
|
+
publicKeyHashes: `0x${string}`[];
|
|
2602
|
+
threshold: number;
|
|
2603
|
+
mustMatch: number;
|
|
2604
|
+
signatures: `0x${string}`[];
|
|
2605
|
+
}>;
|
|
2553
2606
|
declare const MultisigCkbWitness_base: (abstract new () => {
|
|
2554
2607
|
toBytes(): Bytes$1;
|
|
2555
2608
|
clone(): MultisigCkbWitness;
|
|
@@ -2558,10 +2611,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2558
2611
|
toHex(): Hex;
|
|
2559
2612
|
}) & {
|
|
2560
2613
|
byteLength?: number;
|
|
2561
|
-
encode(_: MultisigCkbWitnessLike)
|
|
2562
|
-
decode(_: BytesLike
|
|
2563
|
-
|
|
2564
|
-
|
|
2614
|
+
encode: (_: MultisigCkbWitnessLike) => Bytes$1;
|
|
2615
|
+
decode: (_: BytesLike, _config?: {
|
|
2616
|
+
isExtraFieldIgnored?: boolean;
|
|
2617
|
+
} | undefined) => MultisigCkbWitness;
|
|
2618
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2619
|
+
isExtraFieldIgnored?: boolean;
|
|
2620
|
+
} | undefined) => MultisigCkbWitness;
|
|
2621
|
+
from: (_: MultisigCkbWitnessLike) => MultisigCkbWitness;
|
|
2565
2622
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
2566
2623
|
toBytes(): Bytes$1;
|
|
2567
2624
|
clone(): SubType;
|
|
@@ -2570,10 +2627,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2570
2627
|
toHex(): Hex;
|
|
2571
2628
|
}) & {
|
|
2572
2629
|
byteLength?: number;
|
|
2573
|
-
encode(_: SubTypeLike)
|
|
2574
|
-
decode(_: BytesLike
|
|
2575
|
-
|
|
2576
|
-
|
|
2630
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
2631
|
+
decode: (_: BytesLike, _config?: {
|
|
2632
|
+
isExtraFieldIgnored?: boolean;
|
|
2633
|
+
}) => SubType;
|
|
2634
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2635
|
+
isExtraFieldIgnored?: boolean;
|
|
2636
|
+
}) => SubType;
|
|
2637
|
+
from: (_: SubTypeLike) => SubType;
|
|
2577
2638
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
2578
2639
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
2579
2640
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -2590,10 +2651,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2590
2651
|
toHex(): Hex;
|
|
2591
2652
|
}) & {
|
|
2592
2653
|
byteLength?: number;
|
|
2593
|
-
encode(_: SubTypeLike_1)
|
|
2594
|
-
decode(_: BytesLike
|
|
2595
|
-
|
|
2596
|
-
|
|
2654
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
2655
|
+
decode: (_: BytesLike, _config?: {
|
|
2656
|
+
isExtraFieldIgnored?: boolean;
|
|
2657
|
+
} | undefined) => SubType_1;
|
|
2658
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2659
|
+
isExtraFieldIgnored?: boolean;
|
|
2660
|
+
} | undefined) => SubType_1;
|
|
2661
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
2597
2662
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
2598
2663
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
2599
2664
|
};
|
|
@@ -2613,10 +2678,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2613
2678
|
toHex(): Hex;
|
|
2614
2679
|
}) & {
|
|
2615
2680
|
byteLength?: number;
|
|
2616
|
-
encode(_: SubTypeLike)
|
|
2617
|
-
decode(_: BytesLike
|
|
2618
|
-
|
|
2619
|
-
|
|
2681
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
2682
|
+
decode: (_: BytesLike, _config?: {
|
|
2683
|
+
isExtraFieldIgnored?: boolean;
|
|
2684
|
+
} | undefined) => SubType;
|
|
2685
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2686
|
+
isExtraFieldIgnored?: boolean;
|
|
2687
|
+
} | undefined) => SubType;
|
|
2688
|
+
from: (_: SubTypeLike) => SubType;
|
|
2620
2689
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
2621
2690
|
toBytes(): Bytes$1;
|
|
2622
2691
|
clone(): SubType_1;
|
|
@@ -2625,10 +2694,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2625
2694
|
toHex(): Hex;
|
|
2626
2695
|
}) & {
|
|
2627
2696
|
byteLength?: number;
|
|
2628
|
-
encode(_: SubTypeLike_1)
|
|
2629
|
-
decode(_: BytesLike
|
|
2630
|
-
|
|
2631
|
-
|
|
2697
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
2698
|
+
decode: (_: BytesLike, _config?: {
|
|
2699
|
+
isExtraFieldIgnored?: boolean;
|
|
2700
|
+
}) => SubType_1;
|
|
2701
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2702
|
+
isExtraFieldIgnored?: boolean;
|
|
2703
|
+
}) => SubType_1;
|
|
2704
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
2632
2705
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
2633
2706
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
2634
2707
|
};
|
|
@@ -2650,7 +2723,7 @@ declare class MultisigCkbWitness extends MultisigCkbWitness_base {
|
|
|
2650
2723
|
* @param mustMatch - The number of signatures that must match.
|
|
2651
2724
|
* @param signatures - The signatures.
|
|
2652
2725
|
*/
|
|
2653
|
-
constructor(publicKeyHashes
|
|
2726
|
+
constructor({ publicKeyHashes, threshold, mustMatch, signatures }: DecodedType<typeof MultisigCkbWitnessCodec>);
|
|
2654
2727
|
/**
|
|
2655
2728
|
* Create a MultisigCkbWitness from a MultisigCkbWitnessLike.
|
|
2656
2729
|
*
|
|
@@ -2873,7 +2946,7 @@ declare function verifyMessageJoyId(message: string | BytesLike, signature: stri
|
|
|
2873
2946
|
* as well as signing transactions.
|
|
2874
2947
|
* @public
|
|
2875
2948
|
*/
|
|
2876
|
-
declare abstract class SignerDoge extends Signer {
|
|
2949
|
+
declare abstract class SignerDoge extends Signer$1 {
|
|
2877
2950
|
get type(): SignerType;
|
|
2878
2951
|
get signType(): SignerSignType;
|
|
2879
2952
|
/**
|
|
@@ -3026,7 +3099,7 @@ declare function verifyMessageDogeEcdsa(message: string | BytesLike, signature:
|
|
|
3026
3099
|
/**
|
|
3027
3100
|
* @public
|
|
3028
3101
|
*/
|
|
3029
|
-
declare abstract class SignerDummy extends Signer {
|
|
3102
|
+
declare abstract class SignerDummy extends Signer$1 {
|
|
3030
3103
|
readonly type: SignerType;
|
|
3031
3104
|
get signType(): SignerSignType;
|
|
3032
3105
|
constructor(client: Client, type: SignerType);
|
|
@@ -3061,7 +3134,7 @@ declare class SignerOpenLink extends SignerDummy {
|
|
|
3061
3134
|
* This class provides methods to get EVM account, internal address, and signing transactions.
|
|
3062
3135
|
* @public
|
|
3063
3136
|
*/
|
|
3064
|
-
declare abstract class SignerEvm extends Signer {
|
|
3137
|
+
declare abstract class SignerEvm extends Signer$1 {
|
|
3065
3138
|
get type(): SignerType;
|
|
3066
3139
|
get signType(): SignerSignType;
|
|
3067
3140
|
/**
|
|
@@ -3223,10 +3296,10 @@ type SignerJsonRpcResultRecord = {
|
|
|
3223
3296
|
result: unknown;
|
|
3224
3297
|
};
|
|
3225
3298
|
type SignerJsonRpcProviderSessionConfig = {
|
|
3226
|
-
getSigner: () => Signer | undefined;
|
|
3299
|
+
getSigner: () => Signer$1 | undefined;
|
|
3227
3300
|
getSignerMetadata?: () => Pick<SignerJsonRpcInfo, "name" | "icon">;
|
|
3228
3301
|
/** Connects the requested network and returns its connected Signer. */
|
|
3229
|
-
connect: (networkId: string, options?: SignerJsonRpcProviderSessionOptions) => Promise<Signer>;
|
|
3302
|
+
connect: (networkId: string, options?: SignerJsonRpcProviderSessionOptions) => Promise<Signer$1>;
|
|
3230
3303
|
confirmRequest: (request: SignerJsonRpcConfirmation, options?: SignerJsonRpcProviderSessionOptions) => Promise<boolean>;
|
|
3231
3304
|
};
|
|
3232
3305
|
declare class SignerJsonRpcProviderSession {
|
|
@@ -3256,7 +3329,7 @@ type SignerJsonRpcConfig = Omit<Parameters<typeof RequestorJsonRpc.new>[0], "onE
|
|
|
3256
3329
|
/** Cleans up integration-owned resources before replacement is announced. */
|
|
3257
3330
|
disconnectHandler?: () => PromiseLike<void> | void;
|
|
3258
3331
|
};
|
|
3259
|
-
declare class SignerJsonRpc extends Signer {
|
|
3332
|
+
declare class SignerJsonRpc extends Signer$1 {
|
|
3260
3333
|
readonly requestor: RequestorJsonRpc;
|
|
3261
3334
|
private info;
|
|
3262
3335
|
private readonly disconnectHandler?;
|
|
@@ -3284,9 +3357,9 @@ declare class SignerJsonRpc extends Signer {
|
|
|
3284
3357
|
getAddressObjs(): Promise<Address[]>;
|
|
3285
3358
|
getInternalAddress(): Promise<string>;
|
|
3286
3359
|
getIdentity(): Promise<string>;
|
|
3287
|
-
signMessageRaw: Signer["signMessageRaw"];
|
|
3288
|
-
prepareTransaction: Signer["prepareTransaction"];
|
|
3289
|
-
signOnlyTransaction: Signer["signOnlyTransaction"];
|
|
3360
|
+
signMessageRaw: Signer$1["signMessageRaw"];
|
|
3361
|
+
prepareTransaction: Signer$1["prepareTransaction"];
|
|
3362
|
+
signOnlyTransaction: Signer$1["signOnlyTransaction"];
|
|
3290
3363
|
buildSender(rpcMethod: Parameters<RequestorJsonRpc["request"]>[0], inTransformers?: Parameters<RequestorJsonRpc["request"]>[2], outTransformer?: Parameters<RequestorJsonRpc["request"]>[3]): (...request: unknown[]) => Promise<unknown>;
|
|
3291
3364
|
private clearReadCache;
|
|
3292
3365
|
private request;
|
|
@@ -3309,7 +3382,7 @@ interface NostrEvent {
|
|
|
3309
3382
|
/**
|
|
3310
3383
|
* @public
|
|
3311
3384
|
*/
|
|
3312
|
-
declare abstract class SignerNostr extends Signer {
|
|
3385
|
+
declare abstract class SignerNostr extends Signer$1 {
|
|
3313
3386
|
static CKB_SIG_HASH_ALL_TAG: string;
|
|
3314
3387
|
static CKB_UNLOCK_EVENT_KIND: number;
|
|
3315
3388
|
static CKB_UNLOCK_EVENT_CONTENT: string;
|
|
@@ -3392,8 +3465,26 @@ declare class SignerNostrPrivateKey extends SignerNostrPublicKeyReadonly {
|
|
|
3392
3465
|
declare function buildNostrEventFromMessage(message: string | BytesLike): NostrEvent;
|
|
3393
3466
|
declare function nostrEventHash(event: NostrEvent): Bytes$1;
|
|
3394
3467
|
declare function verifyMessageNostrEvent(message: string | BytesLike, signature: string, address: string): boolean;
|
|
3468
|
+
//#endregion
|
|
3469
|
+
//#region src/signer/signerFromSignature.d.ts
|
|
3470
|
+
/**
|
|
3471
|
+
* Creates a signer from a signature.
|
|
3472
|
+
*
|
|
3473
|
+
* @param client - The client instance.
|
|
3474
|
+
* @param signature - The signature to create the signer from.
|
|
3475
|
+
* @param message - The message that was signed.
|
|
3476
|
+
* @param addresses - The addresses to check against the signer.
|
|
3477
|
+
* @returns The signer if the signature is valid and the addresses match, otherwise undefined.
|
|
3478
|
+
* @throws Error if the signature sign type is unknown.
|
|
3479
|
+
*/
|
|
3480
|
+
declare function signerFromSignature(client: Client, signature: Signature, message?: string | BytesLike | null, ...addresses: (string | string[])[]): Promise<Signer$1 | undefined>;
|
|
3481
|
+
//#endregion
|
|
3482
|
+
//#region src/signer/index.d.ts
|
|
3483
|
+
declare abstract class Signer extends Signer$1 {
|
|
3484
|
+
static fromSignature(client: Client, signature: Signature, message?: string | BytesLike | null, ...addresses: (string | string[])[]): Promise<Signer | undefined>;
|
|
3485
|
+
}
|
|
3395
3486
|
declare namespace barrel_d_exports {
|
|
3396
|
-
export { AbstractConstructor, Address, AddressLike, Bytes$1 as 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, ClientConfig, 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, JsonRpcError, JsonRpcErrorLike, JsonRpcId, JsonRpcPayload, JsonRpcResponse, JsonRpcTransport, JsonRpcTransportFallback, JsonRpcTransportHttp, JsonRpcTransportRequestOptions, JsonRpcTransportWebSocket, KnownScript, LumosTransactionSkeletonType, MultisigCkbWitness, MultisigCkbWitnessLike, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, Owner, OwnerAggregated, OwnerMoved, OwnerRefCount, OwnerUnique, Proxy, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, RetryOperationOptions, RetryOptions, RetryResult, 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, SignerJsonRpc, SignerJsonRpcConfig, SignerJsonRpcConfirmation, SignerJsonRpcErrorCode, SignerJsonRpcProviderSession, SignerJsonRpcProviderSessionConfig, SignerJsonRpcProviderSessionOptions, SignerJsonRpcResultRecord, SignerMultisig, SignerMultisigCkbPrivateKey, SignerMultisigCkbReadonly, SignerMultisigNotEnoughSignaturesError, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, abortSignalAny, abortSignalToPromise, 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$1 as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, recoverMessageSecp256k1, reduceAsync, retry, signMessageSecp256k1, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1, waitForAvailability };
|
|
3487
|
+
export { AbstractConstructor, Address, AddressLike, Bytes$1 as 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, ClientConfig, 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, JsonRpcError, JsonRpcErrorLike, JsonRpcId, JsonRpcPayload, JsonRpcResponse, JsonRpcTransport, JsonRpcTransportFallback, JsonRpcTransportHttp, JsonRpcTransportRequestOptions, JsonRpcTransportWebSocket, KnownScript, LumosTransactionSkeletonType, MultisigCkbWitness, MultisigCkbWitnessLike, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, Owner, OwnerAggregated, OwnerMoved, OwnerRefCount, OwnerUnique, Proxy, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, RetryOperationOptions, RetryOptions, RetryResult, 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, SignerJsonRpc, SignerJsonRpcConfig, SignerJsonRpcConfirmation, SignerJsonRpcErrorCode, SignerJsonRpcProviderSession, SignerJsonRpcProviderSessionConfig, SignerJsonRpcProviderSessionOptions, SignerJsonRpcResultRecord, SignerMultisig, SignerMultisigCkbPrivateKey, SignerMultisigCkbReadonly, SignerMultisigNotEnoughSignaturesError, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, abortSignalAny, abortSignalToPromise, 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$1 as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, recoverMessageSecp256k1, reduce, reduceAsync, retry, signMessageSecp256k1, signerFromSignature, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1, waitForAvailability };
|
|
3397
3488
|
}
|
|
3398
3489
|
//#endregion
|
|
3399
3490
|
//#region src/client/clientTypes.advanced.d.ts
|
|
@@ -3774,6 +3865,17 @@ type EpochLike = [NumLike, NumLike, NumLike] | {
|
|
|
3774
3865
|
numerator: NumLike;
|
|
3775
3866
|
denominator: NumLike;
|
|
3776
3867
|
} | Num | Hex;
|
|
3868
|
+
declare const EpochCodec: Codec<EncodableRecord<{
|
|
3869
|
+
padding: Codec<void | null | undefined, void>;
|
|
3870
|
+
denominator: Codec<NumLike, bigint>;
|
|
3871
|
+
numerator: Codec<NumLike, bigint>;
|
|
3872
|
+
integer: Codec<NumLike, bigint>;
|
|
3873
|
+
}>, DecodedRecord<{
|
|
3874
|
+
padding: Codec<void | null | undefined, void>;
|
|
3875
|
+
denominator: Codec<NumLike, bigint>;
|
|
3876
|
+
numerator: Codec<NumLike, bigint>;
|
|
3877
|
+
integer: Codec<NumLike, bigint>;
|
|
3878
|
+
}>>;
|
|
3777
3879
|
declare const Epoch_base: (abstract new () => {
|
|
3778
3880
|
toBytes(): Bytes$1;
|
|
3779
3881
|
clone(): Epoch;
|
|
@@ -3782,10 +3884,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3782
3884
|
toHex(): Hex;
|
|
3783
3885
|
}) & {
|
|
3784
3886
|
byteLength?: number;
|
|
3785
|
-
encode(_: EpochLike)
|
|
3786
|
-
decode(_: BytesLike
|
|
3787
|
-
|
|
3788
|
-
|
|
3887
|
+
encode: (_: EpochLike) => Bytes$1;
|
|
3888
|
+
decode: (_: BytesLike, _config?: {
|
|
3889
|
+
isExtraFieldIgnored?: boolean;
|
|
3890
|
+
} | undefined) => Epoch;
|
|
3891
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3892
|
+
isExtraFieldIgnored?: boolean;
|
|
3893
|
+
} | undefined) => Epoch;
|
|
3894
|
+
from: (_: EpochLike) => Epoch;
|
|
3789
3895
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
3790
3896
|
toBytes(): Bytes$1;
|
|
3791
3897
|
clone(): SubType;
|
|
@@ -3794,10 +3900,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3794
3900
|
toHex(): Hex;
|
|
3795
3901
|
}) & {
|
|
3796
3902
|
byteLength?: number;
|
|
3797
|
-
encode(_: SubTypeLike)
|
|
3798
|
-
decode(_: BytesLike
|
|
3799
|
-
|
|
3800
|
-
|
|
3903
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
3904
|
+
decode: (_: BytesLike, _config?: {
|
|
3905
|
+
isExtraFieldIgnored?: boolean;
|
|
3906
|
+
}) => SubType;
|
|
3907
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3908
|
+
isExtraFieldIgnored?: boolean;
|
|
3909
|
+
}) => SubType;
|
|
3910
|
+
from: (_: SubTypeLike) => SubType;
|
|
3801
3911
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
3802
3912
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
3803
3913
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -3814,10 +3924,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3814
3924
|
toHex(): Hex;
|
|
3815
3925
|
}) & {
|
|
3816
3926
|
byteLength?: number;
|
|
3817
|
-
encode(_: SubTypeLike_1)
|
|
3818
|
-
decode(_: BytesLike
|
|
3819
|
-
|
|
3820
|
-
|
|
3927
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
3928
|
+
decode: (_: BytesLike, _config?: {
|
|
3929
|
+
isExtraFieldIgnored?: boolean;
|
|
3930
|
+
} | undefined) => SubType_1;
|
|
3931
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3932
|
+
isExtraFieldIgnored?: boolean;
|
|
3933
|
+
} | undefined) => SubType_1;
|
|
3934
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
3821
3935
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
3822
3936
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
3823
3937
|
};
|
|
@@ -3837,10 +3951,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3837
3951
|
toHex(): Hex;
|
|
3838
3952
|
}) & {
|
|
3839
3953
|
byteLength?: number;
|
|
3840
|
-
encode(_: SubTypeLike)
|
|
3841
|
-
decode(_: BytesLike
|
|
3842
|
-
|
|
3843
|
-
|
|
3954
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
3955
|
+
decode: (_: BytesLike, _config?: {
|
|
3956
|
+
isExtraFieldIgnored?: boolean;
|
|
3957
|
+
} | undefined) => SubType;
|
|
3958
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3959
|
+
isExtraFieldIgnored?: boolean;
|
|
3960
|
+
} | undefined) => SubType;
|
|
3961
|
+
from: (_: SubTypeLike) => SubType;
|
|
3844
3962
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
3845
3963
|
toBytes(): Bytes$1;
|
|
3846
3964
|
clone(): SubType_1;
|
|
@@ -3849,10 +3967,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3849
3967
|
toHex(): Hex;
|
|
3850
3968
|
}) & {
|
|
3851
3969
|
byteLength?: number;
|
|
3852
|
-
encode(_: SubTypeLike_1)
|
|
3853
|
-
decode(_: BytesLike
|
|
3854
|
-
|
|
3855
|
-
|
|
3970
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
3971
|
+
decode: (_: BytesLike, _config?: {
|
|
3972
|
+
isExtraFieldIgnored?: boolean;
|
|
3973
|
+
}) => SubType_1;
|
|
3974
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3975
|
+
isExtraFieldIgnored?: boolean;
|
|
3976
|
+
}) => SubType_1;
|
|
3977
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
3856
3978
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
3857
3979
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
3858
3980
|
};
|
|
@@ -3889,7 +4011,7 @@ declare class Epoch extends Epoch_base {
|
|
|
3889
4011
|
* @param numerator - Fractional numerator (Num).
|
|
3890
4012
|
* @param denominator - Fractional denominator (Num).
|
|
3891
4013
|
*/
|
|
3892
|
-
constructor(integer
|
|
4014
|
+
constructor({ integer, numerator, denominator }: Omit<DecodedType<typeof EpochCodec>, "padding">);
|
|
3893
4015
|
/**
|
|
3894
4016
|
* Normalize simpler base invariants:
|
|
3895
4017
|
* - If denominator === 0, set denominator to 1 and numerator to 0 for arithmetic convenience.
|
|
@@ -4146,6 +4268,259 @@ declare enum KnownScript {
|
|
|
4146
4268
|
TimeLock = "TimeLock"
|
|
4147
4269
|
}
|
|
4148
4270
|
//#endregion
|
|
4271
|
+
//#region src/ckb/script.d.ts
|
|
4272
|
+
declare const HashTypeCodec: Codec<HashTypeLike, HashType>;
|
|
4273
|
+
/**
|
|
4274
|
+
* @public
|
|
4275
|
+
*/
|
|
4276
|
+
type HashTypeLike = string | number | bigint;
|
|
4277
|
+
/**
|
|
4278
|
+
* @public
|
|
4279
|
+
*/
|
|
4280
|
+
type HashType = "type" | "data" | "data1" | "data2";
|
|
4281
|
+
/**
|
|
4282
|
+
* Converts a HashTypeLike value to a HashType.
|
|
4283
|
+
* @public
|
|
4284
|
+
*
|
|
4285
|
+
* @param val - The value to convert, which can be a string, number, or bigint.
|
|
4286
|
+
* @returns The corresponding HashType.
|
|
4287
|
+
*
|
|
4288
|
+
* @throws Will throw an error if the input value is not a valid hash type.
|
|
4289
|
+
*
|
|
4290
|
+
* @example
|
|
4291
|
+
* ```typescript
|
|
4292
|
+
* const hashType = hashTypeFrom(1); // Outputs "data"
|
|
4293
|
+
* const hashType = hashTypeFrom("type"); // Outputs "type"
|
|
4294
|
+
* ```
|
|
4295
|
+
*/
|
|
4296
|
+
declare function hashTypeFrom(val: HashTypeLike): HashType;
|
|
4297
|
+
/**
|
|
4298
|
+
* Converts a HashTypeLike value to its corresponding byte representation.
|
|
4299
|
+
* @public
|
|
4300
|
+
*
|
|
4301
|
+
* @param hashType - The hash type value to convert.
|
|
4302
|
+
* @returns A Uint8Array containing the byte representation of the hash type.
|
|
4303
|
+
*
|
|
4304
|
+
* @example
|
|
4305
|
+
* ```typescript
|
|
4306
|
+
* const hashTypeBytes = hashTypeToBytes("type"); // Outputs Uint8Array [0]
|
|
4307
|
+
* ```
|
|
4308
|
+
*/
|
|
4309
|
+
declare function hashTypeToBytes(hashType: HashTypeLike): Bytes$1;
|
|
4310
|
+
/**
|
|
4311
|
+
* Converts a byte-like value to a HashType.
|
|
4312
|
+
* @public
|
|
4313
|
+
*
|
|
4314
|
+
* @param bytes - The byte-like value to convert.
|
|
4315
|
+
* @returns The corresponding HashType.
|
|
4316
|
+
*
|
|
4317
|
+
* @throws Will throw an error if the input bytes do not correspond to a valid hash type.
|
|
4318
|
+
*
|
|
4319
|
+
* @example
|
|
4320
|
+
* ```typescript
|
|
4321
|
+
* const hashType = hashTypeFromBytes(new Uint8Array([0])); // Outputs "type"
|
|
4322
|
+
* ```
|
|
4323
|
+
*/
|
|
4324
|
+
declare function hashTypeFromBytes(bytes: BytesLike): HashType;
|
|
4325
|
+
declare const ScriptCodec: Codec<EncodableRecord<{
|
|
4326
|
+
codeHash: Codec<BytesLike, `0x${string}`>;
|
|
4327
|
+
hashType: Codec<HashTypeLike, HashType>;
|
|
4328
|
+
args: Codec<BytesLike, `0x${string}`>;
|
|
4329
|
+
}>, DecodedRecord<{
|
|
4330
|
+
codeHash: Codec<BytesLike, `0x${string}`>;
|
|
4331
|
+
hashType: Codec<HashTypeLike, HashType>;
|
|
4332
|
+
args: Codec<BytesLike, `0x${string}`>;
|
|
4333
|
+
}>>;
|
|
4334
|
+
/**
|
|
4335
|
+
* @public
|
|
4336
|
+
*/
|
|
4337
|
+
type ScriptLike = EncodableType<typeof ScriptCodec>;
|
|
4338
|
+
declare const Script_base: (abstract new () => {
|
|
4339
|
+
toBytes(): Bytes$1;
|
|
4340
|
+
clone(): Script;
|
|
4341
|
+
eq(other: {} & {
|
|
4342
|
+
codeHash: BytesLike;
|
|
4343
|
+
hashType: HashTypeLike;
|
|
4344
|
+
args: BytesLike;
|
|
4345
|
+
}): boolean;
|
|
4346
|
+
hash(): Hex;
|
|
4347
|
+
toHex(): Hex;
|
|
4348
|
+
}) & {
|
|
4349
|
+
byteLength?: number;
|
|
4350
|
+
encode: (_: {} & {
|
|
4351
|
+
codeHash: BytesLike;
|
|
4352
|
+
hashType: HashTypeLike;
|
|
4353
|
+
args: BytesLike;
|
|
4354
|
+
}) => Bytes$1;
|
|
4355
|
+
decode: (_: BytesLike, _config?: {
|
|
4356
|
+
isExtraFieldIgnored?: boolean;
|
|
4357
|
+
} | undefined) => Script;
|
|
4358
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4359
|
+
isExtraFieldIgnored?: boolean;
|
|
4360
|
+
} | undefined) => Script;
|
|
4361
|
+
from: (_: {} & {
|
|
4362
|
+
codeHash: BytesLike;
|
|
4363
|
+
hashType: HashTypeLike;
|
|
4364
|
+
args: BytesLike;
|
|
4365
|
+
}) => Script;
|
|
4366
|
+
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
4367
|
+
toBytes(): Bytes$1;
|
|
4368
|
+
clone(): SubType;
|
|
4369
|
+
eq(other: SubTypeLike): boolean;
|
|
4370
|
+
hash(): Hex;
|
|
4371
|
+
toHex(): Hex;
|
|
4372
|
+
}) & {
|
|
4373
|
+
byteLength?: number;
|
|
4374
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
4375
|
+
decode: (_: BytesLike, _config?: {
|
|
4376
|
+
isExtraFieldIgnored?: boolean;
|
|
4377
|
+
}) => SubType;
|
|
4378
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4379
|
+
isExtraFieldIgnored?: boolean;
|
|
4380
|
+
}) => SubType;
|
|
4381
|
+
from: (_: SubTypeLike) => SubType;
|
|
4382
|
+
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4383
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4384
|
+
readonly inner: DecodedType<CodecType>;
|
|
4385
|
+
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4386
|
+
_?: undefined | null;
|
|
4387
|
+
}): Result;
|
|
4388
|
+
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4389
|
+
_: (inner: DecodedType<CodecType>) => Result;
|
|
4390
|
+
}): Result;
|
|
4391
|
+
toBytes(): Bytes$1;
|
|
4392
|
+
clone(): SubType_1;
|
|
4393
|
+
eq(other: SubTypeLike_1): boolean;
|
|
4394
|
+
hash(): Hex;
|
|
4395
|
+
toHex(): Hex;
|
|
4396
|
+
}) & {
|
|
4397
|
+
byteLength?: number;
|
|
4398
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
4399
|
+
decode: (_: BytesLike, _config?: {
|
|
4400
|
+
isExtraFieldIgnored?: boolean;
|
|
4401
|
+
} | undefined) => SubType_1;
|
|
4402
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4403
|
+
isExtraFieldIgnored?: boolean;
|
|
4404
|
+
} | undefined) => SubType_1;
|
|
4405
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
4406
|
+
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4407
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4408
|
+
};
|
|
4409
|
+
};
|
|
4410
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4411
|
+
readonly inner: DecodedType<CodecType>;
|
|
4412
|
+
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4413
|
+
_?: undefined | null;
|
|
4414
|
+
}): Result;
|
|
4415
|
+
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4416
|
+
_: (inner: DecodedType<CodecType>) => Result;
|
|
4417
|
+
}): Result;
|
|
4418
|
+
toBytes(): Bytes$1;
|
|
4419
|
+
clone(): SubType;
|
|
4420
|
+
eq(other: SubTypeLike): boolean;
|
|
4421
|
+
hash(): Hex;
|
|
4422
|
+
toHex(): Hex;
|
|
4423
|
+
}) & {
|
|
4424
|
+
byteLength?: number;
|
|
4425
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
4426
|
+
decode: (_: BytesLike, _config?: {
|
|
4427
|
+
isExtraFieldIgnored?: boolean;
|
|
4428
|
+
} | undefined) => SubType;
|
|
4429
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4430
|
+
isExtraFieldIgnored?: boolean;
|
|
4431
|
+
} | undefined) => SubType;
|
|
4432
|
+
from: (_: SubTypeLike) => SubType;
|
|
4433
|
+
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
4434
|
+
toBytes(): Bytes$1;
|
|
4435
|
+
clone(): SubType_1;
|
|
4436
|
+
eq(other: SubTypeLike_1): boolean;
|
|
4437
|
+
hash(): Hex;
|
|
4438
|
+
toHex(): Hex;
|
|
4439
|
+
}) & {
|
|
4440
|
+
byteLength?: number;
|
|
4441
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
4442
|
+
decode: (_: BytesLike, _config?: {
|
|
4443
|
+
isExtraFieldIgnored?: boolean;
|
|
4444
|
+
}) => SubType_1;
|
|
4445
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4446
|
+
isExtraFieldIgnored?: boolean;
|
|
4447
|
+
}) => SubType_1;
|
|
4448
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
4449
|
+
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4450
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4451
|
+
};
|
|
4452
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4453
|
+
};
|
|
4454
|
+
};
|
|
4455
|
+
/**
|
|
4456
|
+
* @public
|
|
4457
|
+
*/
|
|
4458
|
+
declare class Script extends Script_base {
|
|
4459
|
+
codeHash: Hex;
|
|
4460
|
+
hashType: HashType;
|
|
4461
|
+
args: Hex;
|
|
4462
|
+
/**
|
|
4463
|
+
* Creates an instance of Script.
|
|
4464
|
+
*
|
|
4465
|
+
* @param codeHash - The code hash of the script.
|
|
4466
|
+
* @param hashType - The hash type of the script.
|
|
4467
|
+
* @param args - The arguments for the script.
|
|
4468
|
+
*/
|
|
4469
|
+
constructor({ codeHash, hashType, args }: DecodedType<typeof ScriptCodec>);
|
|
4470
|
+
get occupiedSize(): number;
|
|
4471
|
+
/**
|
|
4472
|
+
* Clone a script.
|
|
4473
|
+
*
|
|
4474
|
+
* @returns A cloned Script instance.
|
|
4475
|
+
*
|
|
4476
|
+
* @example
|
|
4477
|
+
* ```typescript
|
|
4478
|
+
* const script1 = script0.clone();
|
|
4479
|
+
* ```
|
|
4480
|
+
*/
|
|
4481
|
+
clone(): Script;
|
|
4482
|
+
/**
|
|
4483
|
+
* Check if the script is equal to another script.
|
|
4484
|
+
* @public
|
|
4485
|
+
* @param other - The other script to compare with
|
|
4486
|
+
* @returns True if the scripts are equal, false otherwise
|
|
4487
|
+
*
|
|
4488
|
+
* @example
|
|
4489
|
+
* ```typescript
|
|
4490
|
+
* const isEqual = script0.eq(script1);
|
|
4491
|
+
* ```
|
|
4492
|
+
*/
|
|
4493
|
+
eq(other: ScriptLike): boolean;
|
|
4494
|
+
/**
|
|
4495
|
+
* Creates a Script instance from client and known script.
|
|
4496
|
+
*
|
|
4497
|
+
* @param knownScript - A KnownScript enum.
|
|
4498
|
+
* @param args - Args for the script.
|
|
4499
|
+
* @param client - A ScriptLike object or an instance of Script.
|
|
4500
|
+
* @returns A promise that resolves to the script instance.
|
|
4501
|
+
*
|
|
4502
|
+
* @example
|
|
4503
|
+
* ```typescript
|
|
4504
|
+
* const script = await Script.fromKnownScript(
|
|
4505
|
+
* client,
|
|
4506
|
+
* KnownScript.XUdt,
|
|
4507
|
+
* args: "0xabcd..."
|
|
4508
|
+
* );
|
|
4509
|
+
* ```
|
|
4510
|
+
*/
|
|
4511
|
+
static fromKnownScript(client: Client, knownScript: KnownScript, args: HexLike): Promise<Script>;
|
|
4512
|
+
}
|
|
4513
|
+
declare const ScriptOpt: Codec<({} & {
|
|
4514
|
+
codeHash: BytesLike;
|
|
4515
|
+
hashType: HashTypeLike;
|
|
4516
|
+
args: BytesLike;
|
|
4517
|
+
}) | null | undefined, Script | undefined>;
|
|
4518
|
+
declare const ScriptVec: Codec<({} & {
|
|
4519
|
+
codeHash: BytesLike;
|
|
4520
|
+
hashType: HashTypeLike;
|
|
4521
|
+
args: BytesLike;
|
|
4522
|
+
})[], Script[]>;
|
|
4523
|
+
//#endregion
|
|
4149
4524
|
//#region src/client/client.d.ts
|
|
4150
4525
|
type ClientConfig = {
|
|
4151
4526
|
cache?: ClientCache;
|
|
@@ -4195,8 +4570,8 @@ declare abstract class Client {
|
|
|
4195
4570
|
*/
|
|
4196
4571
|
getKnownScript(script: KnownScript): Promise<ScriptInfo>;
|
|
4197
4572
|
abstract getFeeRateStatistics(blockRange?: NumLike): Promise<{
|
|
4198
|
-
mean
|
|
4199
|
-
median
|
|
4573
|
+
mean?: Num;
|
|
4574
|
+
median?: Num;
|
|
4200
4575
|
}>;
|
|
4201
4576
|
/**
|
|
4202
4577
|
* Get the recommended transaction fee rate based on recent blocks.
|
|
@@ -4669,230 +5044,6 @@ declare abstract class Client {
|
|
|
4669
5044
|
waitTransaction(txHash: HexLike, confirmations?: number, timeout?: number, interval?: number): Promise<ClientTransactionResponse | undefined>;
|
|
4670
5045
|
}
|
|
4671
5046
|
//#endregion
|
|
4672
|
-
//#region src/ckb/script.d.ts
|
|
4673
|
-
declare const HashTypeCodec: Codec<HashTypeLike, HashType>;
|
|
4674
|
-
/**
|
|
4675
|
-
* @public
|
|
4676
|
-
*/
|
|
4677
|
-
type HashTypeLike = string | number | bigint;
|
|
4678
|
-
/**
|
|
4679
|
-
* @public
|
|
4680
|
-
*/
|
|
4681
|
-
type HashType = "type" | "data" | "data1" | "data2";
|
|
4682
|
-
/**
|
|
4683
|
-
* Converts a HashTypeLike value to a HashType.
|
|
4684
|
-
* @public
|
|
4685
|
-
*
|
|
4686
|
-
* @param val - The value to convert, which can be a string, number, or bigint.
|
|
4687
|
-
* @returns The corresponding HashType.
|
|
4688
|
-
*
|
|
4689
|
-
* @throws Will throw an error if the input value is not a valid hash type.
|
|
4690
|
-
*
|
|
4691
|
-
* @example
|
|
4692
|
-
* ```typescript
|
|
4693
|
-
* const hashType = hashTypeFrom(1); // Outputs "data"
|
|
4694
|
-
* const hashType = hashTypeFrom("type"); // Outputs "type"
|
|
4695
|
-
* ```
|
|
4696
|
-
*/
|
|
4697
|
-
declare function hashTypeFrom(val: HashTypeLike): HashType;
|
|
4698
|
-
/**
|
|
4699
|
-
* Converts a HashTypeLike value to its corresponding byte representation.
|
|
4700
|
-
* @public
|
|
4701
|
-
*
|
|
4702
|
-
* @param hashType - The hash type value to convert.
|
|
4703
|
-
* @returns A Uint8Array containing the byte representation of the hash type.
|
|
4704
|
-
*
|
|
4705
|
-
* @example
|
|
4706
|
-
* ```typescript
|
|
4707
|
-
* const hashTypeBytes = hashTypeToBytes("type"); // Outputs Uint8Array [0]
|
|
4708
|
-
* ```
|
|
4709
|
-
*/
|
|
4710
|
-
declare function hashTypeToBytes(hashType: HashTypeLike): Bytes$1;
|
|
4711
|
-
/**
|
|
4712
|
-
* Converts a byte-like value to a HashType.
|
|
4713
|
-
* @public
|
|
4714
|
-
*
|
|
4715
|
-
* @param bytes - The byte-like value to convert.
|
|
4716
|
-
* @returns The corresponding HashType.
|
|
4717
|
-
*
|
|
4718
|
-
* @throws Will throw an error if the input bytes do not correspond to a valid hash type.
|
|
4719
|
-
*
|
|
4720
|
-
* @example
|
|
4721
|
-
* ```typescript
|
|
4722
|
-
* const hashType = hashTypeFromBytes(new Uint8Array([0])); // Outputs "type"
|
|
4723
|
-
* ```
|
|
4724
|
-
*/
|
|
4725
|
-
declare function hashTypeFromBytes(bytes: BytesLike): HashType;
|
|
4726
|
-
/**
|
|
4727
|
-
* @public
|
|
4728
|
-
*/
|
|
4729
|
-
type ScriptLike = {
|
|
4730
|
-
codeHash: BytesLike;
|
|
4731
|
-
hashType: HashTypeLike;
|
|
4732
|
-
args: BytesLike;
|
|
4733
|
-
};
|
|
4734
|
-
declare const Script_base: (abstract new () => {
|
|
4735
|
-
toBytes(): Bytes$1;
|
|
4736
|
-
clone(): Script;
|
|
4737
|
-
eq(other: ScriptLike): boolean;
|
|
4738
|
-
hash(): Hex;
|
|
4739
|
-
toHex(): Hex;
|
|
4740
|
-
}) & {
|
|
4741
|
-
byteLength?: number;
|
|
4742
|
-
encode(_: ScriptLike): Bytes$1;
|
|
4743
|
-
decode(_: BytesLike): Script;
|
|
4744
|
-
fromBytes(_bytes: BytesLike): Script;
|
|
4745
|
-
from(_: ScriptLike): Script;
|
|
4746
|
-
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
4747
|
-
toBytes(): Bytes$1;
|
|
4748
|
-
clone(): SubType;
|
|
4749
|
-
eq(other: SubTypeLike): boolean;
|
|
4750
|
-
hash(): Hex;
|
|
4751
|
-
toHex(): Hex;
|
|
4752
|
-
}) & {
|
|
4753
|
-
byteLength?: number;
|
|
4754
|
-
encode(_: SubTypeLike): Bytes$1;
|
|
4755
|
-
decode(_: BytesLike): SubType;
|
|
4756
|
-
fromBytes(_bytes: BytesLike): SubType;
|
|
4757
|
-
from(_: SubTypeLike): SubType;
|
|
4758
|
-
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4759
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4760
|
-
readonly inner: DecodedType<CodecType>;
|
|
4761
|
-
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4762
|
-
_?: undefined | null;
|
|
4763
|
-
}): Result;
|
|
4764
|
-
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4765
|
-
_: (inner: DecodedType<CodecType>) => Result;
|
|
4766
|
-
}): Result;
|
|
4767
|
-
toBytes(): Bytes$1;
|
|
4768
|
-
clone(): SubType_1;
|
|
4769
|
-
eq(other: SubTypeLike_1): boolean;
|
|
4770
|
-
hash(): Hex;
|
|
4771
|
-
toHex(): Hex;
|
|
4772
|
-
}) & {
|
|
4773
|
-
byteLength?: number;
|
|
4774
|
-
encode(_: SubTypeLike_1): Bytes$1;
|
|
4775
|
-
decode(_: BytesLike): SubType_1;
|
|
4776
|
-
fromBytes(_bytes: BytesLike): SubType_1;
|
|
4777
|
-
from(_: SubTypeLike_1): SubType_1;
|
|
4778
|
-
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4779
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4780
|
-
};
|
|
4781
|
-
};
|
|
4782
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4783
|
-
readonly inner: DecodedType<CodecType>;
|
|
4784
|
-
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4785
|
-
_?: undefined | null;
|
|
4786
|
-
}): Result;
|
|
4787
|
-
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4788
|
-
_: (inner: DecodedType<CodecType>) => Result;
|
|
4789
|
-
}): Result;
|
|
4790
|
-
toBytes(): Bytes$1;
|
|
4791
|
-
clone(): SubType;
|
|
4792
|
-
eq(other: SubTypeLike): boolean;
|
|
4793
|
-
hash(): Hex;
|
|
4794
|
-
toHex(): Hex;
|
|
4795
|
-
}) & {
|
|
4796
|
-
byteLength?: number;
|
|
4797
|
-
encode(_: SubTypeLike): Bytes$1;
|
|
4798
|
-
decode(_: BytesLike): SubType;
|
|
4799
|
-
fromBytes(_bytes: BytesLike): SubType;
|
|
4800
|
-
from(_: SubTypeLike): SubType;
|
|
4801
|
-
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
4802
|
-
toBytes(): Bytes$1;
|
|
4803
|
-
clone(): SubType_1;
|
|
4804
|
-
eq(other: SubTypeLike_1): boolean;
|
|
4805
|
-
hash(): Hex;
|
|
4806
|
-
toHex(): Hex;
|
|
4807
|
-
}) & {
|
|
4808
|
-
byteLength?: number;
|
|
4809
|
-
encode(_: SubTypeLike_1): Bytes$1;
|
|
4810
|
-
decode(_: BytesLike): SubType_1;
|
|
4811
|
-
fromBytes(_bytes: BytesLike): SubType_1;
|
|
4812
|
-
from(_: SubTypeLike_1): SubType_1;
|
|
4813
|
-
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4814
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4815
|
-
};
|
|
4816
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4817
|
-
};
|
|
4818
|
-
};
|
|
4819
|
-
/**
|
|
4820
|
-
* @public
|
|
4821
|
-
*/
|
|
4822
|
-
declare class Script extends Script_base {
|
|
4823
|
-
codeHash: Hex;
|
|
4824
|
-
hashType: HashType;
|
|
4825
|
-
args: Hex;
|
|
4826
|
-
/**
|
|
4827
|
-
* Creates an instance of Script.
|
|
4828
|
-
*
|
|
4829
|
-
* @param codeHash - The code hash of the script.
|
|
4830
|
-
* @param hashType - The hash type of the script.
|
|
4831
|
-
* @param args - The arguments for the script.
|
|
4832
|
-
*/
|
|
4833
|
-
constructor(codeHash: Hex, hashType: HashType, args: Hex);
|
|
4834
|
-
get occupiedSize(): number;
|
|
4835
|
-
/**
|
|
4836
|
-
* Clone a script.
|
|
4837
|
-
*
|
|
4838
|
-
* @returns A cloned Script instance.
|
|
4839
|
-
*
|
|
4840
|
-
* @example
|
|
4841
|
-
* ```typescript
|
|
4842
|
-
* const script1 = script0.clone();
|
|
4843
|
-
* ```
|
|
4844
|
-
*/
|
|
4845
|
-
clone(): Script;
|
|
4846
|
-
/**
|
|
4847
|
-
* Check if the script is equal to another script.
|
|
4848
|
-
* @public
|
|
4849
|
-
* @param other - The other script to compare with
|
|
4850
|
-
* @returns True if the scripts are equal, false otherwise
|
|
4851
|
-
*
|
|
4852
|
-
* @example
|
|
4853
|
-
* ```typescript
|
|
4854
|
-
* const isEqual = script0.eq(script1);
|
|
4855
|
-
* ```
|
|
4856
|
-
*/
|
|
4857
|
-
eq(other: ScriptLike): boolean;
|
|
4858
|
-
/**
|
|
4859
|
-
* Creates a Script instance from a ScriptLike object.
|
|
4860
|
-
*
|
|
4861
|
-
* @param script - A ScriptLike object or an instance of Script.
|
|
4862
|
-
* @returns A Script instance.
|
|
4863
|
-
*
|
|
4864
|
-
* @example
|
|
4865
|
-
* ```typescript
|
|
4866
|
-
* const script = Script.from({
|
|
4867
|
-
* codeHash: "0x1234...",
|
|
4868
|
-
* hashType: "type",
|
|
4869
|
-
* args: "0xabcd..."
|
|
4870
|
-
* });
|
|
4871
|
-
* ```
|
|
4872
|
-
*/
|
|
4873
|
-
static from(script: ScriptLike): Script;
|
|
4874
|
-
/**
|
|
4875
|
-
* Creates a Script instance from client and known script.
|
|
4876
|
-
*
|
|
4877
|
-
* @param knownScript - A KnownScript enum.
|
|
4878
|
-
* @param args - Args for the script.
|
|
4879
|
-
* @param client - A ScriptLike object or an instance of Script.
|
|
4880
|
-
* @returns A promise that resolves to the script instance.
|
|
4881
|
-
*
|
|
4882
|
-
* @example
|
|
4883
|
-
* ```typescript
|
|
4884
|
-
* const script = await Script.fromKnownScript(
|
|
4885
|
-
* client,
|
|
4886
|
-
* KnownScript.XUdt,
|
|
4887
|
-
* args: "0xabcd..."
|
|
4888
|
-
* );
|
|
4889
|
-
* ```
|
|
4890
|
-
*/
|
|
4891
|
-
static fromKnownScript(client: Client, knownScript: KnownScript, args: HexLike): Promise<Script>;
|
|
4892
|
-
}
|
|
4893
|
-
declare const ScriptOpt: Codec<ScriptLike | null | undefined, Script | undefined>;
|
|
4894
|
-
declare const ScriptVec: Codec<ScriptLike[], Script[]>;
|
|
4895
|
-
//#endregion
|
|
4896
5047
|
//#region src/ckb/transactionLumos.d.ts
|
|
4897
5048
|
interface LumosTransactionSkeletonType {
|
|
4898
5049
|
cellDeps: {
|
|
@@ -4979,22 +5130,42 @@ declare function depTypeFromBytes(bytes: BytesLike): DepType;
|
|
|
4979
5130
|
/**
|
|
4980
5131
|
* @public
|
|
4981
5132
|
*/
|
|
4982
|
-
|
|
4983
|
-
txHash:
|
|
4984
|
-
index: NumLike
|
|
4985
|
-
}
|
|
5133
|
+
declare const OutPointCodec: Codec<EncodableRecord<{
|
|
5134
|
+
txHash: Codec<BytesLike, `0x${string}`>;
|
|
5135
|
+
index: Codec<NumLike, number>;
|
|
5136
|
+
}>, DecodedRecord<{
|
|
5137
|
+
txHash: Codec<BytesLike, `0x${string}`>;
|
|
5138
|
+
index: Codec<NumLike, number>;
|
|
5139
|
+
}>>;
|
|
5140
|
+
/**
|
|
5141
|
+
* @public
|
|
5142
|
+
*/
|
|
5143
|
+
type OutPointLike = EncodableType<typeof OutPointCodec>;
|
|
4986
5144
|
declare const OutPoint_base: (abstract new () => {
|
|
4987
5145
|
toBytes(): Bytes$1;
|
|
4988
5146
|
clone(): OutPoint;
|
|
4989
|
-
eq(other:
|
|
5147
|
+
eq(other: {} & {
|
|
5148
|
+
txHash: BytesLike;
|
|
5149
|
+
index: NumLike;
|
|
5150
|
+
}): boolean;
|
|
4990
5151
|
hash(): Hex;
|
|
4991
5152
|
toHex(): Hex;
|
|
4992
5153
|
}) & {
|
|
4993
5154
|
byteLength?: number;
|
|
4994
|
-
encode(_:
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
5155
|
+
encode: (_: {} & {
|
|
5156
|
+
txHash: BytesLike;
|
|
5157
|
+
index: NumLike;
|
|
5158
|
+
}) => Bytes$1;
|
|
5159
|
+
decode: (_: BytesLike, _config?: {
|
|
5160
|
+
isExtraFieldIgnored?: boolean;
|
|
5161
|
+
} | undefined) => OutPoint;
|
|
5162
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5163
|
+
isExtraFieldIgnored?: boolean;
|
|
5164
|
+
} | undefined) => OutPoint;
|
|
5165
|
+
from: (_: {} & {
|
|
5166
|
+
txHash: BytesLike;
|
|
5167
|
+
index: NumLike;
|
|
5168
|
+
}) => OutPoint;
|
|
4998
5169
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
4999
5170
|
toBytes(): Bytes$1;
|
|
5000
5171
|
clone(): SubType;
|
|
@@ -5003,10 +5174,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5003
5174
|
toHex(): Hex;
|
|
5004
5175
|
}) & {
|
|
5005
5176
|
byteLength?: number;
|
|
5006
|
-
encode(_: SubTypeLike)
|
|
5007
|
-
decode(_: BytesLike
|
|
5008
|
-
|
|
5009
|
-
|
|
5177
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5178
|
+
decode: (_: BytesLike, _config?: {
|
|
5179
|
+
isExtraFieldIgnored?: boolean;
|
|
5180
|
+
}) => SubType;
|
|
5181
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5182
|
+
isExtraFieldIgnored?: boolean;
|
|
5183
|
+
}) => SubType;
|
|
5184
|
+
from: (_: SubTypeLike) => SubType;
|
|
5010
5185
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5011
5186
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5012
5187
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5023,10 +5198,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5023
5198
|
toHex(): Hex;
|
|
5024
5199
|
}) & {
|
|
5025
5200
|
byteLength?: number;
|
|
5026
|
-
encode(_: SubTypeLike_1)
|
|
5027
|
-
decode(_: BytesLike
|
|
5028
|
-
|
|
5029
|
-
|
|
5201
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5202
|
+
decode: (_: BytesLike, _config?: {
|
|
5203
|
+
isExtraFieldIgnored?: boolean;
|
|
5204
|
+
} | undefined) => SubType_1;
|
|
5205
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5206
|
+
isExtraFieldIgnored?: boolean;
|
|
5207
|
+
} | undefined) => SubType_1;
|
|
5208
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5030
5209
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5031
5210
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5032
5211
|
};
|
|
@@ -5046,10 +5225,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5046
5225
|
toHex(): Hex;
|
|
5047
5226
|
}) & {
|
|
5048
5227
|
byteLength?: number;
|
|
5049
|
-
encode(_: SubTypeLike)
|
|
5050
|
-
decode(_: BytesLike
|
|
5051
|
-
|
|
5052
|
-
|
|
5228
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5229
|
+
decode: (_: BytesLike, _config?: {
|
|
5230
|
+
isExtraFieldIgnored?: boolean;
|
|
5231
|
+
} | undefined) => SubType;
|
|
5232
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5233
|
+
isExtraFieldIgnored?: boolean;
|
|
5234
|
+
} | undefined) => SubType;
|
|
5235
|
+
from: (_: SubTypeLike) => SubType;
|
|
5053
5236
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5054
5237
|
toBytes(): Bytes$1;
|
|
5055
5238
|
clone(): SubType_1;
|
|
@@ -5058,10 +5241,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5058
5241
|
toHex(): Hex;
|
|
5059
5242
|
}) & {
|
|
5060
5243
|
byteLength?: number;
|
|
5061
|
-
encode(_: SubTypeLike_1)
|
|
5062
|
-
decode(_: BytesLike
|
|
5063
|
-
|
|
5064
|
-
|
|
5244
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5245
|
+
decode: (_: BytesLike, _config?: {
|
|
5246
|
+
isExtraFieldIgnored?: boolean;
|
|
5247
|
+
}) => SubType_1;
|
|
5248
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5249
|
+
isExtraFieldIgnored?: boolean;
|
|
5250
|
+
}) => SubType_1;
|
|
5251
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5065
5252
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5066
5253
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5067
5254
|
};
|
|
@@ -5080,19 +5267,7 @@ declare class OutPoint extends OutPoint_base {
|
|
|
5080
5267
|
* @param txHash - The transaction hash.
|
|
5081
5268
|
* @param index - The index of the output in the transaction.
|
|
5082
5269
|
*/
|
|
5083
|
-
constructor(txHash
|
|
5084
|
-
/**
|
|
5085
|
-
* Creates an OutPoint instance from an OutPointLike object.
|
|
5086
|
-
*
|
|
5087
|
-
* @param outPoint - An OutPointLike object or an instance of OutPoint.
|
|
5088
|
-
* @returns An OutPoint instance.
|
|
5089
|
-
*
|
|
5090
|
-
* @example
|
|
5091
|
-
* ```typescript
|
|
5092
|
-
* const outPoint = OutPoint.from({ txHash: "0x...", index: 0 });
|
|
5093
|
-
* ```
|
|
5094
|
-
*/
|
|
5095
|
-
static from(outPoint: OutPointLike): OutPoint;
|
|
5270
|
+
constructor({ txHash, index }: DecodedType<typeof OutPointCodec>);
|
|
5096
5271
|
/**
|
|
5097
5272
|
* Clone a OutPoint.
|
|
5098
5273
|
*
|
|
@@ -5117,6 +5292,26 @@ declare class OutPoint extends OutPoint_base {
|
|
|
5117
5292
|
*/
|
|
5118
5293
|
eq(other: OutPointLike): boolean;
|
|
5119
5294
|
}
|
|
5295
|
+
/**
|
|
5296
|
+
* @public
|
|
5297
|
+
*/
|
|
5298
|
+
declare const CellOutputCodec: Codec<EncodableRecord<{
|
|
5299
|
+
capacity: Codec<NumLike, bigint>;
|
|
5300
|
+
lock: typeof Script;
|
|
5301
|
+
type: Codec<({} & {
|
|
5302
|
+
codeHash: BytesLike;
|
|
5303
|
+
hashType: HashTypeLike;
|
|
5304
|
+
args: BytesLike;
|
|
5305
|
+
}) | null | undefined, Script | undefined>;
|
|
5306
|
+
}>, DecodedRecord<{
|
|
5307
|
+
capacity: Codec<NumLike, bigint>;
|
|
5308
|
+
lock: typeof Script;
|
|
5309
|
+
type: Codec<({} & {
|
|
5310
|
+
codeHash: BytesLike;
|
|
5311
|
+
hashType: HashTypeLike;
|
|
5312
|
+
args: BytesLike;
|
|
5313
|
+
}) | null | undefined, Script | undefined>;
|
|
5314
|
+
}>>;
|
|
5120
5315
|
/**
|
|
5121
5316
|
* @public
|
|
5122
5317
|
*/
|
|
@@ -5133,10 +5328,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5133
5328
|
toHex(): Hex;
|
|
5134
5329
|
}) & {
|
|
5135
5330
|
byteLength?: number;
|
|
5136
|
-
encode(_: CellOutputLike)
|
|
5137
|
-
decode(_: BytesLike
|
|
5138
|
-
|
|
5139
|
-
|
|
5331
|
+
encode: (_: CellOutputLike) => Bytes$1;
|
|
5332
|
+
decode: (_: BytesLike, _config?: {
|
|
5333
|
+
isExtraFieldIgnored?: boolean;
|
|
5334
|
+
} | undefined) => CellOutput;
|
|
5335
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5336
|
+
isExtraFieldIgnored?: boolean;
|
|
5337
|
+
} | undefined) => CellOutput;
|
|
5338
|
+
from: (_: CellOutputLike) => CellOutput;
|
|
5140
5339
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5141
5340
|
toBytes(): Bytes$1;
|
|
5142
5341
|
clone(): SubType;
|
|
@@ -5145,10 +5344,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5145
5344
|
toHex(): Hex;
|
|
5146
5345
|
}) & {
|
|
5147
5346
|
byteLength?: number;
|
|
5148
|
-
encode(_: SubTypeLike)
|
|
5149
|
-
decode(_: BytesLike
|
|
5150
|
-
|
|
5151
|
-
|
|
5347
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5348
|
+
decode: (_: BytesLike, _config?: {
|
|
5349
|
+
isExtraFieldIgnored?: boolean;
|
|
5350
|
+
}) => SubType;
|
|
5351
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5352
|
+
isExtraFieldIgnored?: boolean;
|
|
5353
|
+
}) => SubType;
|
|
5354
|
+
from: (_: SubTypeLike) => SubType;
|
|
5152
5355
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5153
5356
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5154
5357
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5165,10 +5368,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5165
5368
|
toHex(): Hex;
|
|
5166
5369
|
}) & {
|
|
5167
5370
|
byteLength?: number;
|
|
5168
|
-
encode(_: SubTypeLike_1)
|
|
5169
|
-
decode(_: BytesLike
|
|
5170
|
-
|
|
5171
|
-
|
|
5371
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5372
|
+
decode: (_: BytesLike, _config?: {
|
|
5373
|
+
isExtraFieldIgnored?: boolean;
|
|
5374
|
+
} | undefined) => SubType_1;
|
|
5375
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5376
|
+
isExtraFieldIgnored?: boolean;
|
|
5377
|
+
} | undefined) => SubType_1;
|
|
5378
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5172
5379
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5173
5380
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5174
5381
|
};
|
|
@@ -5188,10 +5395,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5188
5395
|
toHex(): Hex;
|
|
5189
5396
|
}) & {
|
|
5190
5397
|
byteLength?: number;
|
|
5191
|
-
encode(_: SubTypeLike)
|
|
5192
|
-
decode(_: BytesLike
|
|
5193
|
-
|
|
5194
|
-
|
|
5398
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5399
|
+
decode: (_: BytesLike, _config?: {
|
|
5400
|
+
isExtraFieldIgnored?: boolean;
|
|
5401
|
+
} | undefined) => SubType;
|
|
5402
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5403
|
+
isExtraFieldIgnored?: boolean;
|
|
5404
|
+
} | undefined) => SubType;
|
|
5405
|
+
from: (_: SubTypeLike) => SubType;
|
|
5195
5406
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5196
5407
|
toBytes(): Bytes$1;
|
|
5197
5408
|
clone(): SubType_1;
|
|
@@ -5200,10 +5411,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5200
5411
|
toHex(): Hex;
|
|
5201
5412
|
}) & {
|
|
5202
5413
|
byteLength?: number;
|
|
5203
|
-
encode(_: SubTypeLike_1)
|
|
5204
|
-
decode(_: BytesLike
|
|
5205
|
-
|
|
5206
|
-
|
|
5414
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5415
|
+
decode: (_: BytesLike, _config?: {
|
|
5416
|
+
isExtraFieldIgnored?: boolean;
|
|
5417
|
+
}) => SubType_1;
|
|
5418
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5419
|
+
isExtraFieldIgnored?: boolean;
|
|
5420
|
+
}) => SubType_1;
|
|
5421
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5207
5422
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5208
5423
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5209
5424
|
};
|
|
@@ -5216,7 +5431,7 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5216
5431
|
declare class CellOutput extends CellOutput_base {
|
|
5217
5432
|
capacity: Num;
|
|
5218
5433
|
lock: Script;
|
|
5219
|
-
type?: Script
|
|
5434
|
+
type?: Script;
|
|
5220
5435
|
/**
|
|
5221
5436
|
* Creates an instance of CellOutput.
|
|
5222
5437
|
*
|
|
@@ -5224,7 +5439,7 @@ declare class CellOutput extends CellOutput_base {
|
|
|
5224
5439
|
* @param lock - The lock script of the cell.
|
|
5225
5440
|
* @param type - The optional type script of the cell.
|
|
5226
5441
|
*/
|
|
5227
|
-
constructor(capacity
|
|
5442
|
+
constructor({ capacity, lock, type }: DecodedType<typeof CellOutputCodec>);
|
|
5228
5443
|
get occupiedSize(): number;
|
|
5229
5444
|
/**
|
|
5230
5445
|
* Creates a CellOutput instance from a CellOutputLike object.
|
|
@@ -5481,6 +5696,7 @@ type SinceLike = {
|
|
|
5481
5696
|
metric: "blockNumber" | "epoch" | "timestamp";
|
|
5482
5697
|
value: NumLike;
|
|
5483
5698
|
} | NumLike;
|
|
5699
|
+
declare const SinceCodec: Codec<SinceLike, Pick<Since, "relative" | "metric" | "value">>;
|
|
5484
5700
|
declare const Since_base: (abstract new () => {
|
|
5485
5701
|
toBytes(): Bytes$1;
|
|
5486
5702
|
clone(): Since;
|
|
@@ -5489,10 +5705,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5489
5705
|
toHex(): Hex;
|
|
5490
5706
|
}) & {
|
|
5491
5707
|
byteLength?: number;
|
|
5492
|
-
encode(_: SinceLike)
|
|
5493
|
-
decode(_: BytesLike
|
|
5494
|
-
|
|
5495
|
-
|
|
5708
|
+
encode: (_: SinceLike) => Bytes$1;
|
|
5709
|
+
decode: (_: BytesLike, _config?: {
|
|
5710
|
+
isExtraFieldIgnored?: boolean;
|
|
5711
|
+
} | undefined) => Since;
|
|
5712
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5713
|
+
isExtraFieldIgnored?: boolean;
|
|
5714
|
+
} | undefined) => Since;
|
|
5715
|
+
from: (_: SinceLike) => Since;
|
|
5496
5716
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5497
5717
|
toBytes(): Bytes$1;
|
|
5498
5718
|
clone(): SubType;
|
|
@@ -5501,10 +5721,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5501
5721
|
toHex(): Hex;
|
|
5502
5722
|
}) & {
|
|
5503
5723
|
byteLength?: number;
|
|
5504
|
-
encode(_: SubTypeLike)
|
|
5505
|
-
decode(_: BytesLike
|
|
5506
|
-
|
|
5507
|
-
|
|
5724
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5725
|
+
decode: (_: BytesLike, _config?: {
|
|
5726
|
+
isExtraFieldIgnored?: boolean;
|
|
5727
|
+
}) => SubType;
|
|
5728
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5729
|
+
isExtraFieldIgnored?: boolean;
|
|
5730
|
+
}) => SubType;
|
|
5731
|
+
from: (_: SubTypeLike) => SubType;
|
|
5508
5732
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5509
5733
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5510
5734
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5521,10 +5745,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5521
5745
|
toHex(): Hex;
|
|
5522
5746
|
}) & {
|
|
5523
5747
|
byteLength?: number;
|
|
5524
|
-
encode(_: SubTypeLike_1)
|
|
5525
|
-
decode(_: BytesLike
|
|
5526
|
-
|
|
5527
|
-
|
|
5748
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5749
|
+
decode: (_: BytesLike, _config?: {
|
|
5750
|
+
isExtraFieldIgnored?: boolean;
|
|
5751
|
+
} | undefined) => SubType_1;
|
|
5752
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5753
|
+
isExtraFieldIgnored?: boolean;
|
|
5754
|
+
} | undefined) => SubType_1;
|
|
5755
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5528
5756
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5529
5757
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5530
5758
|
};
|
|
@@ -5544,10 +5772,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5544
5772
|
toHex(): Hex;
|
|
5545
5773
|
}) & {
|
|
5546
5774
|
byteLength?: number;
|
|
5547
|
-
encode(_: SubTypeLike)
|
|
5548
|
-
decode(_: BytesLike
|
|
5549
|
-
|
|
5550
|
-
|
|
5775
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5776
|
+
decode: (_: BytesLike, _config?: {
|
|
5777
|
+
isExtraFieldIgnored?: boolean;
|
|
5778
|
+
} | undefined) => SubType;
|
|
5779
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5780
|
+
isExtraFieldIgnored?: boolean;
|
|
5781
|
+
} | undefined) => SubType;
|
|
5782
|
+
from: (_: SubTypeLike) => SubType;
|
|
5551
5783
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5552
5784
|
toBytes(): Bytes$1;
|
|
5553
5785
|
clone(): SubType_1;
|
|
@@ -5556,10 +5788,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5556
5788
|
toHex(): Hex;
|
|
5557
5789
|
}) & {
|
|
5558
5790
|
byteLength?: number;
|
|
5559
|
-
encode(_: SubTypeLike_1)
|
|
5560
|
-
decode(_: BytesLike
|
|
5561
|
-
|
|
5562
|
-
|
|
5791
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5792
|
+
decode: (_: BytesLike, _config?: {
|
|
5793
|
+
isExtraFieldIgnored?: boolean;
|
|
5794
|
+
}) => SubType_1;
|
|
5795
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5796
|
+
isExtraFieldIgnored?: boolean;
|
|
5797
|
+
}) => SubType_1;
|
|
5798
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5563
5799
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5564
5800
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5565
5801
|
};
|
|
@@ -5576,11 +5812,9 @@ declare class Since extends Since_base {
|
|
|
5576
5812
|
/**
|
|
5577
5813
|
* Creates an instance of Since.
|
|
5578
5814
|
*
|
|
5579
|
-
* @param
|
|
5580
|
-
* @param metric - The metric of since
|
|
5581
|
-
* @param value - The value of since
|
|
5815
|
+
* @param num - The since representation value.
|
|
5582
5816
|
*/
|
|
5583
|
-
constructor(
|
|
5817
|
+
constructor({ relative, metric, value }: DecodedType<typeof SinceCodec>);
|
|
5584
5818
|
/**
|
|
5585
5819
|
* Clone a Since.
|
|
5586
5820
|
*
|
|
@@ -5628,6 +5862,16 @@ declare class Since extends Since_base {
|
|
|
5628
5862
|
*/
|
|
5629
5863
|
static fromNum(numLike: NumLike): Since;
|
|
5630
5864
|
}
|
|
5865
|
+
/**
|
|
5866
|
+
* @public
|
|
5867
|
+
*/
|
|
5868
|
+
declare const CellInputCodec: Codec<EncodableRecord<{
|
|
5869
|
+
since: typeof Since;
|
|
5870
|
+
previousOutput: typeof OutPoint;
|
|
5871
|
+
}>, DecodedRecord<{
|
|
5872
|
+
since: typeof Since;
|
|
5873
|
+
previousOutput: typeof OutPoint;
|
|
5874
|
+
}>>;
|
|
5631
5875
|
/**
|
|
5632
5876
|
* @public
|
|
5633
5877
|
*/
|
|
@@ -5648,10 +5892,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5648
5892
|
toHex(): Hex;
|
|
5649
5893
|
}) & {
|
|
5650
5894
|
byteLength?: number;
|
|
5651
|
-
encode(_: CellInputLike)
|
|
5652
|
-
decode(_: BytesLike
|
|
5653
|
-
|
|
5654
|
-
|
|
5895
|
+
encode: (_: CellInputLike) => Bytes$1;
|
|
5896
|
+
decode: (_: BytesLike, _config?: {
|
|
5897
|
+
isExtraFieldIgnored?: boolean;
|
|
5898
|
+
} | undefined) => CellInput;
|
|
5899
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5900
|
+
isExtraFieldIgnored?: boolean;
|
|
5901
|
+
} | undefined) => CellInput;
|
|
5902
|
+
from: (_: CellInputLike) => CellInput;
|
|
5655
5903
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5656
5904
|
toBytes(): Bytes$1;
|
|
5657
5905
|
clone(): SubType;
|
|
@@ -5660,10 +5908,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5660
5908
|
toHex(): Hex;
|
|
5661
5909
|
}) & {
|
|
5662
5910
|
byteLength?: number;
|
|
5663
|
-
encode(_: SubTypeLike)
|
|
5664
|
-
decode(_: BytesLike
|
|
5665
|
-
|
|
5666
|
-
|
|
5911
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5912
|
+
decode: (_: BytesLike, _config?: {
|
|
5913
|
+
isExtraFieldIgnored?: boolean;
|
|
5914
|
+
}) => SubType;
|
|
5915
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5916
|
+
isExtraFieldIgnored?: boolean;
|
|
5917
|
+
}) => SubType;
|
|
5918
|
+
from: (_: SubTypeLike) => SubType;
|
|
5667
5919
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5668
5920
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5669
5921
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5680,10 +5932,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5680
5932
|
toHex(): Hex;
|
|
5681
5933
|
}) & {
|
|
5682
5934
|
byteLength?: number;
|
|
5683
|
-
encode(_: SubTypeLike_1)
|
|
5684
|
-
decode(_: BytesLike
|
|
5685
|
-
|
|
5686
|
-
|
|
5935
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5936
|
+
decode: (_: BytesLike, _config?: {
|
|
5937
|
+
isExtraFieldIgnored?: boolean;
|
|
5938
|
+
} | undefined) => SubType_1;
|
|
5939
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5940
|
+
isExtraFieldIgnored?: boolean;
|
|
5941
|
+
} | undefined) => SubType_1;
|
|
5942
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5687
5943
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5688
5944
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5689
5945
|
};
|
|
@@ -5703,10 +5959,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5703
5959
|
toHex(): Hex;
|
|
5704
5960
|
}) & {
|
|
5705
5961
|
byteLength?: number;
|
|
5706
|
-
encode(_: SubTypeLike)
|
|
5707
|
-
decode(_: BytesLike
|
|
5708
|
-
|
|
5709
|
-
|
|
5962
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5963
|
+
decode: (_: BytesLike, _config?: {
|
|
5964
|
+
isExtraFieldIgnored?: boolean;
|
|
5965
|
+
} | undefined) => SubType;
|
|
5966
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5967
|
+
isExtraFieldIgnored?: boolean;
|
|
5968
|
+
} | undefined) => SubType;
|
|
5969
|
+
from: (_: SubTypeLike) => SubType;
|
|
5710
5970
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5711
5971
|
toBytes(): Bytes$1;
|
|
5712
5972
|
clone(): SubType_1;
|
|
@@ -5715,10 +5975,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5715
5975
|
toHex(): Hex;
|
|
5716
5976
|
}) & {
|
|
5717
5977
|
byteLength?: number;
|
|
5718
|
-
encode(_: SubTypeLike_1)
|
|
5719
|
-
decode(_: BytesLike
|
|
5720
|
-
|
|
5721
|
-
|
|
5978
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5979
|
+
decode: (_: BytesLike, _config?: {
|
|
5980
|
+
isExtraFieldIgnored?: boolean;
|
|
5981
|
+
}) => SubType_1;
|
|
5982
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5983
|
+
isExtraFieldIgnored?: boolean;
|
|
5984
|
+
}) => SubType_1;
|
|
5985
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5722
5986
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5723
5987
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5724
5988
|
};
|
|
@@ -5731,8 +5995,8 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5731
5995
|
declare class CellInput extends CellInput_base {
|
|
5732
5996
|
previousOutput: OutPoint;
|
|
5733
5997
|
since: Num;
|
|
5734
|
-
cellOutput?: CellOutput
|
|
5735
|
-
outputData?: Hex
|
|
5998
|
+
cellOutput?: CellOutput;
|
|
5999
|
+
outputData?: Hex;
|
|
5736
6000
|
/**
|
|
5737
6001
|
* Creates an instance of CellInput.
|
|
5738
6002
|
*
|
|
@@ -5741,7 +6005,10 @@ declare class CellInput extends CellInput_base {
|
|
|
5741
6005
|
* @param cellOutput - The optional cell output associated with the cell input.
|
|
5742
6006
|
* @param outputData - The optional output data associated with the cell input.
|
|
5743
6007
|
*/
|
|
5744
|
-
constructor(previousOutput
|
|
6008
|
+
constructor({ previousOutput, since, cellOutput, outputData }: DecodedType<typeof CellInputCodec> & {
|
|
6009
|
+
cellOutput?: CellOutput;
|
|
6010
|
+
outputData?: Hex;
|
|
6011
|
+
});
|
|
5745
6012
|
/**
|
|
5746
6013
|
* Creates a CellInput instance from a CellInputLike object.
|
|
5747
6014
|
*
|
|
@@ -5793,22 +6060,51 @@ declare const CellInputVec: Codec<CellInputLike[], CellInput[]>;
|
|
|
5793
6060
|
/**
|
|
5794
6061
|
* @public
|
|
5795
6062
|
*/
|
|
5796
|
-
|
|
5797
|
-
outPoint:
|
|
5798
|
-
depType: DepTypeLike
|
|
5799
|
-
}
|
|
6063
|
+
declare const CellDepCodec: Codec<EncodableRecord<{
|
|
6064
|
+
outPoint: typeof OutPoint;
|
|
6065
|
+
depType: Codec<DepTypeLike, DepType>;
|
|
6066
|
+
}>, DecodedRecord<{
|
|
6067
|
+
outPoint: typeof OutPoint;
|
|
6068
|
+
depType: Codec<DepTypeLike, DepType>;
|
|
6069
|
+
}>>;
|
|
6070
|
+
/**
|
|
6071
|
+
* @public
|
|
6072
|
+
*/
|
|
6073
|
+
type CellDepLike = EncodableType<typeof CellDepCodec>;
|
|
5800
6074
|
declare const CellDep_base: (abstract new () => {
|
|
5801
6075
|
toBytes(): Bytes$1;
|
|
5802
6076
|
clone(): CellDep;
|
|
5803
|
-
eq(other:
|
|
6077
|
+
eq(other: {} & {
|
|
6078
|
+
outPoint: {} & {
|
|
6079
|
+
txHash: BytesLike;
|
|
6080
|
+
index: NumLike;
|
|
6081
|
+
};
|
|
6082
|
+
depType: DepTypeLike;
|
|
6083
|
+
}): boolean;
|
|
5804
6084
|
hash(): Hex;
|
|
5805
6085
|
toHex(): Hex;
|
|
5806
6086
|
}) & {
|
|
5807
6087
|
byteLength?: number;
|
|
5808
|
-
encode(_:
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
6088
|
+
encode: (_: {} & {
|
|
6089
|
+
outPoint: {} & {
|
|
6090
|
+
txHash: BytesLike;
|
|
6091
|
+
index: NumLike;
|
|
6092
|
+
};
|
|
6093
|
+
depType: DepTypeLike;
|
|
6094
|
+
}) => Bytes$1;
|
|
6095
|
+
decode: (_: BytesLike, _config?: {
|
|
6096
|
+
isExtraFieldIgnored?: boolean;
|
|
6097
|
+
} | undefined) => CellDep;
|
|
6098
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6099
|
+
isExtraFieldIgnored?: boolean;
|
|
6100
|
+
} | undefined) => CellDep;
|
|
6101
|
+
from: (_: {} & {
|
|
6102
|
+
outPoint: {} & {
|
|
6103
|
+
txHash: BytesLike;
|
|
6104
|
+
index: NumLike;
|
|
6105
|
+
};
|
|
6106
|
+
depType: DepTypeLike;
|
|
6107
|
+
}) => CellDep;
|
|
5812
6108
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5813
6109
|
toBytes(): Bytes$1;
|
|
5814
6110
|
clone(): SubType;
|
|
@@ -5817,10 +6113,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5817
6113
|
toHex(): Hex;
|
|
5818
6114
|
}) & {
|
|
5819
6115
|
byteLength?: number;
|
|
5820
|
-
encode(_: SubTypeLike)
|
|
5821
|
-
decode(_: BytesLike
|
|
5822
|
-
|
|
5823
|
-
|
|
6116
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6117
|
+
decode: (_: BytesLike, _config?: {
|
|
6118
|
+
isExtraFieldIgnored?: boolean;
|
|
6119
|
+
}) => SubType;
|
|
6120
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6121
|
+
isExtraFieldIgnored?: boolean;
|
|
6122
|
+
}) => SubType;
|
|
6123
|
+
from: (_: SubTypeLike) => SubType;
|
|
5824
6124
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5825
6125
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5826
6126
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5837,10 +6137,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5837
6137
|
toHex(): Hex;
|
|
5838
6138
|
}) & {
|
|
5839
6139
|
byteLength?: number;
|
|
5840
|
-
encode(_: SubTypeLike_1)
|
|
5841
|
-
decode(_: BytesLike
|
|
5842
|
-
|
|
5843
|
-
|
|
6140
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6141
|
+
decode: (_: BytesLike, _config?: {
|
|
6142
|
+
isExtraFieldIgnored?: boolean;
|
|
6143
|
+
} | undefined) => SubType_1;
|
|
6144
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6145
|
+
isExtraFieldIgnored?: boolean;
|
|
6146
|
+
} | undefined) => SubType_1;
|
|
6147
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5844
6148
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5845
6149
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5846
6150
|
};
|
|
@@ -5860,10 +6164,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5860
6164
|
toHex(): Hex;
|
|
5861
6165
|
}) & {
|
|
5862
6166
|
byteLength?: number;
|
|
5863
|
-
encode(_: SubTypeLike)
|
|
5864
|
-
decode(_: BytesLike
|
|
5865
|
-
|
|
5866
|
-
|
|
6167
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6168
|
+
decode: (_: BytesLike, _config?: {
|
|
6169
|
+
isExtraFieldIgnored?: boolean;
|
|
6170
|
+
} | undefined) => SubType;
|
|
6171
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6172
|
+
isExtraFieldIgnored?: boolean;
|
|
6173
|
+
} | undefined) => SubType;
|
|
6174
|
+
from: (_: SubTypeLike) => SubType;
|
|
5867
6175
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5868
6176
|
toBytes(): Bytes$1;
|
|
5869
6177
|
clone(): SubType_1;
|
|
@@ -5872,10 +6180,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5872
6180
|
toHex(): Hex;
|
|
5873
6181
|
}) & {
|
|
5874
6182
|
byteLength?: number;
|
|
5875
|
-
encode(_: SubTypeLike_1)
|
|
5876
|
-
decode(_: BytesLike
|
|
5877
|
-
|
|
5878
|
-
|
|
6183
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6184
|
+
decode: (_: BytesLike, _config?: {
|
|
6185
|
+
isExtraFieldIgnored?: boolean;
|
|
6186
|
+
}) => SubType_1;
|
|
6187
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6188
|
+
isExtraFieldIgnored?: boolean;
|
|
6189
|
+
}) => SubType_1;
|
|
6190
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5879
6191
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5880
6192
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5881
6193
|
};
|
|
@@ -5894,22 +6206,7 @@ declare class CellDep extends CellDep_base {
|
|
|
5894
6206
|
* @param outPoint - The outpoint of the cell dependency.
|
|
5895
6207
|
* @param depType - The dependency type.
|
|
5896
6208
|
*/
|
|
5897
|
-
constructor(outPoint
|
|
5898
|
-
/**
|
|
5899
|
-
* Creates a CellDep instance from a CellDepLike object.
|
|
5900
|
-
*
|
|
5901
|
-
* @param cellDep - A CellDepLike object or an instance of CellDep.
|
|
5902
|
-
* @returns A CellDep instance.
|
|
5903
|
-
*
|
|
5904
|
-
* @example
|
|
5905
|
-
* ```typescript
|
|
5906
|
-
* const cellDep = CellDep.from({
|
|
5907
|
-
* outPoint: { txHash: "0x...", index: 0 },
|
|
5908
|
-
* depType: "depGroup"
|
|
5909
|
-
* });
|
|
5910
|
-
* ```
|
|
5911
|
-
*/
|
|
5912
|
-
static from(cellDep: CellDepLike): CellDep;
|
|
6209
|
+
constructor({ outPoint, depType }: DecodedType<typeof CellDepCodec>);
|
|
5913
6210
|
/**
|
|
5914
6211
|
* Clone a CellDep.
|
|
5915
6212
|
*
|
|
@@ -5922,27 +6219,57 @@ declare class CellDep extends CellDep_base {
|
|
|
5922
6219
|
*/
|
|
5923
6220
|
clone(): CellDep;
|
|
5924
6221
|
}
|
|
5925
|
-
declare const CellDepVec: Codec<
|
|
6222
|
+
declare const CellDepVec: Codec<({} & {
|
|
6223
|
+
outPoint: {} & {
|
|
6224
|
+
txHash: BytesLike;
|
|
6225
|
+
index: NumLike;
|
|
6226
|
+
};
|
|
6227
|
+
depType: DepTypeLike;
|
|
6228
|
+
})[], CellDep[]>;
|
|
5926
6229
|
/**
|
|
5927
6230
|
* @public
|
|
5928
6231
|
*/
|
|
5929
|
-
|
|
5930
|
-
lock
|
|
5931
|
-
inputType
|
|
5932
|
-
outputType
|
|
5933
|
-
}
|
|
6232
|
+
declare const WitnessArgsCodec: Codec<EncodableRecord<{
|
|
6233
|
+
lock: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6234
|
+
inputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6235
|
+
outputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6236
|
+
}>, DecodedRecord<{
|
|
6237
|
+
lock: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6238
|
+
inputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6239
|
+
outputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6240
|
+
}>>;
|
|
6241
|
+
/**
|
|
6242
|
+
* @public
|
|
6243
|
+
*/
|
|
6244
|
+
type WitnessArgsLike = EncodableType<typeof WitnessArgsCodec>;
|
|
5934
6245
|
declare const WitnessArgs_base: (abstract new () => {
|
|
5935
6246
|
toBytes(): Bytes$1;
|
|
5936
6247
|
clone(): WitnessArgs;
|
|
5937
|
-
eq(other:
|
|
6248
|
+
eq(other: {
|
|
6249
|
+
lock?: BytesLike | null | undefined;
|
|
6250
|
+
inputType?: BytesLike | null | undefined;
|
|
6251
|
+
outputType?: BytesLike | null | undefined;
|
|
6252
|
+
} & {}): boolean;
|
|
5938
6253
|
hash(): Hex;
|
|
5939
6254
|
toHex(): Hex;
|
|
5940
6255
|
}) & {
|
|
5941
6256
|
byteLength?: number;
|
|
5942
|
-
encode(_:
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
6257
|
+
encode: (_: {
|
|
6258
|
+
lock?: BytesLike | null | undefined;
|
|
6259
|
+
inputType?: BytesLike | null | undefined;
|
|
6260
|
+
outputType?: BytesLike | null | undefined;
|
|
6261
|
+
} & {}) => Bytes$1;
|
|
6262
|
+
decode: (_: BytesLike, _config?: {
|
|
6263
|
+
isExtraFieldIgnored?: boolean;
|
|
6264
|
+
} | undefined) => WitnessArgs;
|
|
6265
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6266
|
+
isExtraFieldIgnored?: boolean;
|
|
6267
|
+
} | undefined) => WitnessArgs;
|
|
6268
|
+
from: (_: {
|
|
6269
|
+
lock?: BytesLike | null | undefined;
|
|
6270
|
+
inputType?: BytesLike | null | undefined;
|
|
6271
|
+
outputType?: BytesLike | null | undefined;
|
|
6272
|
+
} & {}) => WitnessArgs;
|
|
5946
6273
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5947
6274
|
toBytes(): Bytes$1;
|
|
5948
6275
|
clone(): SubType;
|
|
@@ -5951,10 +6278,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
5951
6278
|
toHex(): Hex;
|
|
5952
6279
|
}) & {
|
|
5953
6280
|
byteLength?: number;
|
|
5954
|
-
encode(_: SubTypeLike)
|
|
5955
|
-
decode(_: BytesLike
|
|
5956
|
-
|
|
5957
|
-
|
|
6281
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6282
|
+
decode: (_: BytesLike, _config?: {
|
|
6283
|
+
isExtraFieldIgnored?: boolean;
|
|
6284
|
+
}) => SubType;
|
|
6285
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6286
|
+
isExtraFieldIgnored?: boolean;
|
|
6287
|
+
}) => SubType;
|
|
6288
|
+
from: (_: SubTypeLike) => SubType;
|
|
5958
6289
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5959
6290
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5960
6291
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5971,10 +6302,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
5971
6302
|
toHex(): Hex;
|
|
5972
6303
|
}) & {
|
|
5973
6304
|
byteLength?: number;
|
|
5974
|
-
encode(_: SubTypeLike_1)
|
|
5975
|
-
decode(_: BytesLike
|
|
5976
|
-
|
|
5977
|
-
|
|
6305
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6306
|
+
decode: (_: BytesLike, _config?: {
|
|
6307
|
+
isExtraFieldIgnored?: boolean;
|
|
6308
|
+
} | undefined) => SubType_1;
|
|
6309
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6310
|
+
isExtraFieldIgnored?: boolean;
|
|
6311
|
+
} | undefined) => SubType_1;
|
|
6312
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5978
6313
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5979
6314
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5980
6315
|
};
|
|
@@ -5994,10 +6329,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
5994
6329
|
toHex(): Hex;
|
|
5995
6330
|
}) & {
|
|
5996
6331
|
byteLength?: number;
|
|
5997
|
-
encode(_: SubTypeLike)
|
|
5998
|
-
decode(_: BytesLike
|
|
5999
|
-
|
|
6000
|
-
|
|
6332
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6333
|
+
decode: (_: BytesLike, _config?: {
|
|
6334
|
+
isExtraFieldIgnored?: boolean;
|
|
6335
|
+
} | undefined) => SubType;
|
|
6336
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6337
|
+
isExtraFieldIgnored?: boolean;
|
|
6338
|
+
} | undefined) => SubType;
|
|
6339
|
+
from: (_: SubTypeLike) => SubType;
|
|
6001
6340
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
6002
6341
|
toBytes(): Bytes$1;
|
|
6003
6342
|
clone(): SubType_1;
|
|
@@ -6006,10 +6345,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
6006
6345
|
toHex(): Hex;
|
|
6007
6346
|
}) & {
|
|
6008
6347
|
byteLength?: number;
|
|
6009
|
-
encode(_: SubTypeLike_1)
|
|
6010
|
-
decode(_: BytesLike
|
|
6011
|
-
|
|
6012
|
-
|
|
6348
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6349
|
+
decode: (_: BytesLike, _config?: {
|
|
6350
|
+
isExtraFieldIgnored?: boolean;
|
|
6351
|
+
}) => SubType_1;
|
|
6352
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6353
|
+
isExtraFieldIgnored?: boolean;
|
|
6354
|
+
}) => SubType_1;
|
|
6355
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
6013
6356
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
6014
6357
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6015
6358
|
};
|
|
@@ -6020,9 +6363,9 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
6020
6363
|
* @public
|
|
6021
6364
|
*/
|
|
6022
6365
|
declare class WitnessArgs extends WitnessArgs_base {
|
|
6023
|
-
lock?: Hex
|
|
6024
|
-
inputType?: Hex
|
|
6025
|
-
outputType?: Hex
|
|
6366
|
+
lock?: Hex;
|
|
6367
|
+
inputType?: Hex;
|
|
6368
|
+
outputType?: Hex;
|
|
6026
6369
|
/**
|
|
6027
6370
|
* Creates an instance of WitnessArgs.
|
|
6028
6371
|
*
|
|
@@ -6030,23 +6373,7 @@ declare class WitnessArgs extends WitnessArgs_base {
|
|
|
6030
6373
|
* @param inputType - The optional input type field of the witness.
|
|
6031
6374
|
* @param outputType - The optional output type field of the witness.
|
|
6032
6375
|
*/
|
|
6033
|
-
constructor(lock
|
|
6034
|
-
/**
|
|
6035
|
-
* Creates a WitnessArgs instance from a WitnessArgsLike object.
|
|
6036
|
-
*
|
|
6037
|
-
* @param witnessArgs - A WitnessArgsLike object or an instance of WitnessArgs.
|
|
6038
|
-
* @returns A WitnessArgs instance.
|
|
6039
|
-
*
|
|
6040
|
-
* @example
|
|
6041
|
-
* ```typescript
|
|
6042
|
-
* const witnessArgs = WitnessArgs.from({
|
|
6043
|
-
* lock: "0x...",
|
|
6044
|
-
* inputType: "0x...",
|
|
6045
|
-
* outputType: "0x..."
|
|
6046
|
-
* });
|
|
6047
|
-
* ```
|
|
6048
|
-
*/
|
|
6049
|
-
static from(witnessArgs: WitnessArgsLike): WitnessArgs;
|
|
6376
|
+
constructor({ lock, inputType, outputType }: DecodedType<typeof WitnessArgsCodec>);
|
|
6050
6377
|
}
|
|
6051
6378
|
/**
|
|
6052
6379
|
* Convert a bytes to a num.
|
|
@@ -6056,14 +6383,26 @@ declare class WitnessArgs extends WitnessArgs_base {
|
|
|
6056
6383
|
declare function udtBalanceFrom(dataLike: BytesLike): Num;
|
|
6057
6384
|
declare const RawTransaction: Codec<EncodableRecord<{
|
|
6058
6385
|
version: Codec<NumLike, number>;
|
|
6059
|
-
cellDeps: Codec<
|
|
6386
|
+
cellDeps: Codec<({} & {
|
|
6387
|
+
outPoint: {} & {
|
|
6388
|
+
txHash: BytesLike;
|
|
6389
|
+
index: NumLike;
|
|
6390
|
+
};
|
|
6391
|
+
depType: DepTypeLike;
|
|
6392
|
+
})[], CellDep[]>;
|
|
6060
6393
|
headerDeps: Codec<BytesLike[], `0x${string}`[]>;
|
|
6061
6394
|
inputs: Codec<CellInputLike[], CellInput[]>;
|
|
6062
6395
|
outputs: Codec<CellOutputLike[], CellOutput[]>;
|
|
6063
6396
|
outputsData: Codec<BytesLike[], `0x${string}`[]>;
|
|
6064
6397
|
}>, DecodedRecord<{
|
|
6065
6398
|
version: Codec<NumLike, number>;
|
|
6066
|
-
cellDeps: Codec<
|
|
6399
|
+
cellDeps: Codec<({} & {
|
|
6400
|
+
outPoint: {} & {
|
|
6401
|
+
txHash: BytesLike;
|
|
6402
|
+
index: NumLike;
|
|
6403
|
+
};
|
|
6404
|
+
depType: DepTypeLike;
|
|
6405
|
+
})[], CellDep[]>;
|
|
6067
6406
|
headerDeps: Codec<BytesLike[], `0x${string}`[]>;
|
|
6068
6407
|
inputs: Codec<CellInputLike[], CellInput[]>;
|
|
6069
6408
|
outputs: Codec<CellOutputLike[], CellOutput[]>;
|
|
@@ -6089,10 +6428,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6089
6428
|
toHex(): Hex;
|
|
6090
6429
|
}) & {
|
|
6091
6430
|
byteLength?: number;
|
|
6092
|
-
encode(_: TransactionLike)
|
|
6093
|
-
decode(_: BytesLike
|
|
6094
|
-
|
|
6095
|
-
|
|
6431
|
+
encode: (_: TransactionLike) => Bytes$1;
|
|
6432
|
+
decode: (_: BytesLike, _config?: {
|
|
6433
|
+
isExtraFieldIgnored?: boolean;
|
|
6434
|
+
} | undefined) => Transaction;
|
|
6435
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6436
|
+
isExtraFieldIgnored?: boolean;
|
|
6437
|
+
} | undefined) => Transaction;
|
|
6438
|
+
from: (_: TransactionLike) => Transaction;
|
|
6096
6439
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
6097
6440
|
toBytes(): Bytes$1;
|
|
6098
6441
|
clone(): SubType;
|
|
@@ -6101,10 +6444,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6101
6444
|
toHex(): Hex;
|
|
6102
6445
|
}) & {
|
|
6103
6446
|
byteLength?: number;
|
|
6104
|
-
encode(_: SubTypeLike)
|
|
6105
|
-
decode(_: BytesLike
|
|
6106
|
-
|
|
6107
|
-
|
|
6447
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6448
|
+
decode: (_: BytesLike, _config?: {
|
|
6449
|
+
isExtraFieldIgnored?: boolean;
|
|
6450
|
+
}) => SubType;
|
|
6451
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6452
|
+
isExtraFieldIgnored?: boolean;
|
|
6453
|
+
}) => SubType;
|
|
6454
|
+
from: (_: SubTypeLike) => SubType;
|
|
6108
6455
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6109
6456
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
6110
6457
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -6121,10 +6468,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6121
6468
|
toHex(): Hex;
|
|
6122
6469
|
}) & {
|
|
6123
6470
|
byteLength?: number;
|
|
6124
|
-
encode(_: SubTypeLike_1)
|
|
6125
|
-
decode(_: BytesLike
|
|
6126
|
-
|
|
6127
|
-
|
|
6471
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6472
|
+
decode: (_: BytesLike, _config?: {
|
|
6473
|
+
isExtraFieldIgnored?: boolean;
|
|
6474
|
+
} | undefined) => SubType_1;
|
|
6475
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6476
|
+
isExtraFieldIgnored?: boolean;
|
|
6477
|
+
} | undefined) => SubType_1;
|
|
6478
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
6128
6479
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6129
6480
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
6130
6481
|
};
|
|
@@ -6144,10 +6495,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6144
6495
|
toHex(): Hex;
|
|
6145
6496
|
}) & {
|
|
6146
6497
|
byteLength?: number;
|
|
6147
|
-
encode(_: SubTypeLike)
|
|
6148
|
-
decode(_: BytesLike
|
|
6149
|
-
|
|
6150
|
-
|
|
6498
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6499
|
+
decode: (_: BytesLike, _config?: {
|
|
6500
|
+
isExtraFieldIgnored?: boolean;
|
|
6501
|
+
} | undefined) => SubType;
|
|
6502
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6503
|
+
isExtraFieldIgnored?: boolean;
|
|
6504
|
+
} | undefined) => SubType;
|
|
6505
|
+
from: (_: SubTypeLike) => SubType;
|
|
6151
6506
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
6152
6507
|
toBytes(): Bytes$1;
|
|
6153
6508
|
clone(): SubType_1;
|
|
@@ -6156,10 +6511,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6156
6511
|
toHex(): Hex;
|
|
6157
6512
|
}) & {
|
|
6158
6513
|
byteLength?: number;
|
|
6159
|
-
encode(_: SubTypeLike_1)
|
|
6160
|
-
decode(_: BytesLike
|
|
6161
|
-
|
|
6162
|
-
|
|
6514
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6515
|
+
decode: (_: BytesLike, _config?: {
|
|
6516
|
+
isExtraFieldIgnored?: boolean;
|
|
6517
|
+
}) => SubType_1;
|
|
6518
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6519
|
+
isExtraFieldIgnored?: boolean;
|
|
6520
|
+
}) => SubType_1;
|
|
6521
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
6163
6522
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
6164
6523
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6165
6524
|
};
|
|
@@ -6188,7 +6547,15 @@ declare class Transaction extends Transaction_base {
|
|
|
6188
6547
|
* @param outputsData - The data associated with the outputs.
|
|
6189
6548
|
* @param witnesses - The witnesses of the transaction.
|
|
6190
6549
|
*/
|
|
6191
|
-
constructor(version
|
|
6550
|
+
constructor({ version, cellDeps, headerDeps, inputs, outputs, outputsData, witnesses }: {
|
|
6551
|
+
version: Num;
|
|
6552
|
+
cellDeps: CellDep[];
|
|
6553
|
+
headerDeps: Hex[];
|
|
6554
|
+
inputs: CellInput[];
|
|
6555
|
+
outputs: CellOutput[];
|
|
6556
|
+
outputsData: Hex[];
|
|
6557
|
+
witnesses: Hex[];
|
|
6558
|
+
});
|
|
6192
6559
|
/**
|
|
6193
6560
|
* Creates a default Transaction instance with empty fields.
|
|
6194
6561
|
*
|
|
@@ -7623,5 +7990,5 @@ declare namespace advancedBarrel_d_exports {
|
|
|
7623
7990
|
export { ADDRESS_BECH32_LIMIT, AddressFormat, BytesFromEncoding, CKB_BLAKE2B_PERSONAL, CellRecord, ClientCollectableSearchKeyFilterLike, ClientCollectableSearchKeyLike, DEFAULT_CONFIRMED_BLOCK_TIME, DEFAULT_MAX_FEE_RATE, DEFAULT_MIN_FEE_RATE, DEP_TYPES, DEP_TYPE_TO_NUM, HASH_TYPES, HASH_TYPE_TO_NUM, JsonRpcBlock, JsonRpcBlockHeader, JsonRpcBlockUncle, JsonRpcCellDep, JsonRpcCellInput, JsonRpcCellOutput, JsonRpcDepType, JsonRpcHashType, JsonRpcIndexerFindTransactionsGroupedResponse, JsonRpcIndexerFindTransactionsResponse, JsonRpcIndexerSearchKey, JsonRpcIndexerSearchKeyFilter, JsonRpcIndexerSearchKeyTransaction, JsonRpcOutPoint, JsonRpcScript, JsonRpcTransaction, JsonRpcTransformers, MAINNET_SCRIPTS, MapLru, NUM_TO_DEP_TYPE, NUM_TO_HASH_TYPE, SignerJsonRpcInfo, SignerJsonRpcInfoPayload, SignerJsonRpcMessageToSign, SignerJsonRpcTransformers, TESTNET_SCRIPTS, addressFromPayload, addressPayloadFromString, clientSearchKeyRangeFrom, filterCell, filterData, filterNumByRange, filterScript, filterScriptByLenRange, jsonRpcTransportFromUri };
|
|
7624
7991
|
}
|
|
7625
7992
|
//#endregion
|
|
7626
|
-
export { CellDep as $,
|
|
7627
|
-
//# sourceMappingURL=advancedBarrel-
|
|
7993
|
+
export { CellDep as $, gcd as $i, SignerEvm as $n, JsonRpcId as $r, ClientBlockUncle as $t, filterScriptByLenRange as A, CodecLike as Aa, CodecUint16LE as Ai, Signer as An, SignerBtc as Ar, ClientConfig as At, addressPayloadFromString as B, Bytes$1 as Ba, CodecUint64 as Bi, SignerJsonRpcConfig as Bn, InputToSignLike as Br, hashTypeToBytes as Bt, CellRecord as C, numLeFromBytes as Ca, CodecBytes as Ci, TransactionStatus as Cn, btcEcdsaPublicKeyHash as Cr, depTypeFrom as Ct, filterData as D, numToBytes as Da, CodecUint128LE as Di, DEFAULT_MIN_FEE_RATE as Dn, messageHashBtcEcdsa as Dr, udtBalanceFrom as Dt, filterCell as E, numMin as Ea, CodecUint128BE as Ei, DEFAULT_MAX_FEE_RATE as En, btcVarLengthBytesFrom as Er, isDaoOutputLimitExceeded as Et, HASH_TYPE_TO_NUM as F, Hex as Fa, CodecUint32BE as Fi, SignerNostrPrivateKey as Fn, SignerMultisigNotEnoughSignaturesError as Fr, ScriptLike as Ft, ClientCacheMemory as G, bytesFrom as Ga, codecUint as Gi, SignerJsonRpcProviderSessionOptions as Gn, keystoreEncrypt as Gr, epochFromHex as Gt, ClientPublicMainnet as H, bytesConcat as Ha, CodecUint64LE as Hi, SignerJsonRpcErrorCode as Hn, SignPsbtOptionsLike as Hr, Epoch as Ht, NUM_TO_HASH_TYPE as I, HexLike as Ia, CodecUint32LE as Ii, SignerNostrPublicKeyReadonly as In, SignerSignType as Ir, ScriptOpt as It, ErrorTransactionInsufficientCoin as J, codec as Ji, SignerJsonRpcInfoPayload as Jn, JsonRpcTransportWebSocket as Jr, CellDepInfoLike as Jt, ClientCache as K, bytesTo as Ka, codecUintNumber as Ki, SignerJsonRpcResultRecord as Kn, RequestorJsonRpc as Kr, epochToHex as Kt, ADDRESS_BECH32_LIMIT as L, bytesLen as La, CodecUint512 as Li, NostrEvent as Ln, SignerType as Lr, ScriptVec as Lt, DEP_TYPE_TO_NUM as M, EncodableType as Ma, CodecUint256BE as Mi, buildNostrEventFromMessage as Mn, Signature as Mr, HashTypeCodec as Mt, NUM_TO_DEP_TYPE as N, Address as Na, CodecUint256LE as Ni, nostrEventHash as Nn, SignerInfo as Nr, HashTypeLike as Nt, filterNumByRange as O, numToHex as Oa, CodecUint16 as Oi, clientSearchKeyRangeFrom as On, verifyMessageBtcEcdsa as Or, LumosTransactionSkeletonType as Ot, HASH_TYPES as P, AddressLike as Pa, CodecUint32 as Pi, verifyMessageNostrEvent as Pn, SignerMultisig as Pr, Script as Pt, CellAnyLike as Q, apply as Qi, SignerEvmAddressReadonly as Qn, JsonRpcErrorLike as Qr, ClientBlockLike as Qt, AddressFormat as R, bytesLenUnsafe as Ra, CodecUint512BE as Ri, SignerNostr as Rn, Wallet as Rr, hashTypeFrom as Rt, MAINNET_SCRIPTS as S, numFromBytes as Sa, CodecByte8 as Si, ScriptInfoLike as Sn, verifyMessageSecp256k1 as Sr, calcDaoProfit as St, MapLru as T, numMax as Ta, CodecUint128 as Ti, ClientCollectableSearchKeyLike as Tn, btcPublicKeyFromP2pkhAddress as Tr, depTypeToBytes as Tt, ClientJsonRpc as U, bytesConcatTo as Ua, CodecUint8 as Ui, SignerJsonRpcProviderSession as Un, barrel_d_exports$1 as Ur, EpochLike as Ut, ClientPublicTestnet as V, BytesLike as Va, CodecUint64BE as Vi, SignerJsonRpcConfirmation as Vn, SignPsbtOptions as Vr, KnownScript as Vt, ClientJsonRpcConfig as W, bytesEq as Wa, codecPadding as Wi, SignerJsonRpcProviderSessionConfig as Wn, keystoreDecrypt as Wr, epochFrom as Wt, Cell as X, RetryOptions as Xi, SignerJsonRpcTransformers as Xn, JsonRpcTransportFallback as Xr, ClientBlockHeader as Xt, hashTypeId as Y, RetryOperationOptions as Yi, SignerJsonRpcMessageToSign as Yn, JsonRpcTransportHttp as Yr, ClientBlock as Yt, CellAny as Z, RetryResult as Zi, verifyMessageEvmPersonal as Zn, JsonRpcError as Zr, ClientBlockHeaderLike as Zt, JsonRpcIndexerSearchKeyTransaction as _, Num as _a, CodecBool as _i, ErrorClientResolveUnknown as _n, SECP256K1_SIGNATURE_LENGTH as _r, Transaction as _t, JsonRpcBlock as a, stringify as aa, HASH_CKB_LENGTH as ai, ClientIndexerSearchKeyFilter as an, SignerDogePrivateKey as ar, CellLike as at, JsonRpcTransaction as b, numBeToBytes as ba, CodecByte32 as bi, OutputsValidator as bn, signMessageSecp256k1 as br, WitnessArgsLike as bt, JsonRpcCellDep as c, OwnerUnique as ca, hashCkb as ci, ClientIndexerSearchKeyTransaction as cn, verifyMessageJoyId as cr, CellOutputVec as ct, JsonRpcDepType as d, Owner as da, FixedPoint as di, ClientTransactionResponseLike as dn, MultisigCkbWitnessLike as dr, DepTypeLike as dt, isWebview as ea, JsonRpcPayload as ei, ClientBlockUncleLike as en, SignerOpenLink as er, CellDepLike as et, JsonRpcHashType as f, OwnerMoved as fa, FixedPointLike as fi, ErrorClientBase as fn, SignerMultisigCkbReadonly as fr, OutPoint as ft, JsonRpcIndexerSearchKeyFilter as g, abortSignalToPromise as ga, fixedPointToString as gi, ErrorClientRBFRejected as gn, SignerCkbAlwaysSuccess as gr, SinceLike as gt, JsonRpcIndexerSearchKey as h, abortSignalAny as ha, fixedPointFrom as hi, ErrorClientMaxFeeRateExceeded as hn, SignerCkbPublicKey as hr, Since as ht, JsonRpcTransformers as i, sleep as ia, HasherKeecak256 as ii, ClientIndexerSearchKey as in, verifyMessageDogeEcdsa as ir, CellInputVec as it, DEP_TYPES as j, DecodedType as ja, CodecUint256 as ji, signerFromSignature as jn, NetworkPreference as jr, HashType as jt, filterScript as k, Codec as ka, CodecUint16BE as ki, barrel_d_exports as kn, SignerBtcPublicKeyReadonly as kr, Client as kt, JsonRpcCellInput as l, OwnerRefCount as la, hashCkbShort as li, ClientIndexerSearchKeyTransactionLike as ln, SignerMultisigCkbPrivateKey as lr, DepType as lt, JsonRpcIndexerFindTransactionsResponse as m, Constructor as ma, Zero as mi, ErrorClientDuplicatedTransaction as mn, SignerCkbPrivateKey as mr, RawTransaction as mt, jsonRpcTransportFromUri as n, reduceAsync as na, JsonRpcTransport as ni, ClientFindTransactionsGroupedResponse as nn, SignerDummy as nr, CellInput as nt, JsonRpcBlockHeader as o, waitForAvailability as oa, HASH_CKB_SHORT_LENGTH as oi, ClientIndexerSearchKeyFilterLike as on, SignerDogeAddressReadonly as or, CellOutput as ot, JsonRpcIndexerFindTransactionsGroupedResponse as p, AbstractConstructor as pa, One as pi, ErrorClientBaseLike as pn, SignerCkbScriptReadonly as pr, OutPointLike as pt, ErrorTransactionInsufficientCapacity as q, BytesFromEncoding as qa, Entity as qi, SignerJsonRpcInfo as qn, RequestorJsonRpcConfig as qr, CellDepInfo as qt, CKB_BLAKE2B_PERSONAL as r, retry as ra, JsonRpcTransportRequestOptions as ri, ClientFindTransactionsResponse as rn, messageHashDogeEcdsa as rr, CellInputLike as rt, JsonRpcBlockUncle as s, Proxy as sa, HasherCkb as si, ClientIndexerSearchKeyLike as sn, SignerDoge as sr, CellOutputLike as st, advancedBarrel_d_exports as t, reduce as ta, JsonRpcResponse as ti, ClientFindCellsResponse as tn, SignerAlwaysError as tr, CellDepVec as tt, JsonRpcCellOutput as u, OwnerAggregated as ua, Hasher as ui, ClientTransactionResponse as un, MultisigCkbWitness as ur, DepTypeCodec as ut, JsonRpcOutPoint as v, NumLike as va, CodecByte as vi, ErrorClientVerification as vn, messageHashCkbSecp256k1 as vr, TransactionLike as vt, DEFAULT_CONFIRMED_BLOCK_TIME as w, numLeToBytes as wa, CodecRaw as wi, ClientCollectableSearchKeyFilterLike as wn, btcP2pkhAddressFromPublicKey as wr, depTypeFromBytes as wt, TESTNET_SCRIPTS as x, numFrom as xa, CodecByte4 as xi, ScriptInfo as xn, verifyMessageCkbSecp256k1 as xr, calcDaoClaimEpoch as xt, JsonRpcScript as y, numBeFromBytes as ya, CodecByte16 as yi, ErrorClientWaitTransactionTimeout as yn, recoverMessageSecp256k1 as yr, WitnessArgs as yt, addressFromPayload as z, hexFrom as za, CodecUint512LE as zi, SignerJsonRpc as zn, InputToSign as zr, hashTypeFromBytes as zt };
|
|
7994
|
+
//# sourceMappingURL=advancedBarrel-DfFMFhdl.d.mts.map
|