@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,3 +1,4 @@
|
|
|
1
|
+
//#endregion
|
|
1
2
|
//#region src/bytes/advanced.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Represents the possible encoding formats for converting bytes.
|
|
@@ -241,29 +242,32 @@ declare class Address {
|
|
|
241
242
|
//#endregion
|
|
242
243
|
//#region src/codec/codec.d.ts
|
|
243
244
|
type CodecLike<Encodable, Decoded = Encodable> = {
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
encode: (encodable: Encodable) => BytesLike;
|
|
246
|
+
decode: (decodable: Bytes$1, config?: {
|
|
246
247
|
isExtraFieldIgnored?: boolean;
|
|
247
248
|
}) => Decoded;
|
|
248
|
-
|
|
249
|
+
from?: ((encoded: Encodable) => Decoded) | null;
|
|
250
|
+
byteLength?: number;
|
|
249
251
|
};
|
|
250
252
|
declare class Codec<Encodable, Decoded = Encodable> {
|
|
251
253
|
readonly encode: (encodable: Encodable) => Bytes$1;
|
|
252
254
|
readonly decode: (decodable: BytesLike, config?: {
|
|
253
255
|
isExtraFieldIgnored?: boolean;
|
|
254
256
|
}) => Decoded;
|
|
257
|
+
readonly from: (encodable: Encodable) => Decoded;
|
|
255
258
|
readonly byteLength?: number | undefined;
|
|
256
259
|
constructor(encode: (encodable: Encodable) => Bytes$1, decode: (decodable: BytesLike, config?: {
|
|
257
260
|
isExtraFieldIgnored?: boolean;
|
|
258
|
-
}) => Decoded, byteLength?: number | undefined);
|
|
261
|
+
}) => Decoded, from: (encodable: Encodable) => Decoded, byteLength?: number | undefined);
|
|
259
262
|
encodeOr<T>(encodable: Encodable, fallback: T): Bytes$1 | T;
|
|
260
263
|
decodeOr<T>(decodable: BytesLike, fallback: T, config?: {
|
|
261
264
|
isExtraFieldIgnored?: boolean;
|
|
262
265
|
}): Decoded | T;
|
|
263
|
-
static from<Encodable, Decoded = Encodable>(
|
|
264
|
-
map<NewEncodable = Encodable, NewDecoded = Decoded>({ inMap, outMap }: {
|
|
266
|
+
static from<Encodable, Decoded = Encodable>(codecLike: CodecLike<Encodable, Decoded>): Codec<Encodable, Decoded>;
|
|
267
|
+
map<NewEncodable = Encodable, NewDecoded = Decoded>({ inMap, outMap, from }: {
|
|
265
268
|
inMap?: (encodable: NewEncodable) => Encodable;
|
|
266
269
|
outMap?: (decoded: Decoded) => NewDecoded;
|
|
270
|
+
from?: (encodable: NewEncodable) => NewDecoded;
|
|
267
271
|
}): Codec<NewEncodable, NewDecoded>;
|
|
268
272
|
mapIn<NewEncodable>(map: (encodable: NewEncodable) => Encodable): Codec<NewEncodable, Decoded>;
|
|
269
273
|
mapOut<NewDecoded>(map: (decoded: Decoded) => NewDecoded): Codec<Encodable, NewDecoded>;
|
|
@@ -276,12 +280,12 @@ type DecodedType<T extends CodecLike<any, any>> = T extends CodecLike<any, infer
|
|
|
276
280
|
* Vector with fixed size item codec
|
|
277
281
|
* @param itemCodec fixed-size vector item codec
|
|
278
282
|
*/
|
|
279
|
-
declare function fixedItemVec<Encodable, Decoded>(
|
|
283
|
+
declare function fixedItemVec<Encodable, Decoded>(itemCodecLike: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
|
|
280
284
|
/**
|
|
281
285
|
* Vector with dynamic size item codec, you can create a recursive vector with this function
|
|
282
286
|
* @param itemCodec the vector item codec. It can be fixed-size or dynamic-size.
|
|
283
287
|
*/
|
|
284
|
-
declare function dynItemVec<Encodable, Decoded>(
|
|
288
|
+
declare function dynItemVec<Encodable, Decoded>(itemCodecLike: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
|
|
285
289
|
/**
|
|
286
290
|
* General vector codec, if `itemCodec` is fixed size type, it will create a fixvec codec, otherwise a dynvec codec will be created.
|
|
287
291
|
* @param itemCodec
|
|
@@ -294,12 +298,12 @@ declare function vector<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Deco
|
|
|
294
298
|
* - if it's not empty, just serialize the inner item (the size is same as the inner item's size).
|
|
295
299
|
* @param innerCodec
|
|
296
300
|
*/
|
|
297
|
-
declare function option<Encodable, Decoded>(
|
|
301
|
+
declare function option<Encodable, Decoded>(innerCodecLike: CodecLike<Encodable, Decoded>): Codec<Encodable | undefined | null, Decoded | undefined>;
|
|
298
302
|
/**
|
|
299
303
|
* Wrap the encoded value with a fixed-length buffer
|
|
300
304
|
* @param codec
|
|
301
305
|
*/
|
|
302
|
-
declare function byteVec<Encodable, Decoded>(
|
|
306
|
+
declare function byteVec<Encodable, Decoded>(codecLike: CodecLike<Encodable, Decoded>): Codec<Encodable, Decoded>;
|
|
303
307
|
type EncodableRecordOptionalKeys<T extends Record<string, CodecLike<any, any>>> = { [K in keyof T]: Extract<EncodableType<T[K]>, undefined> extends never ? never : K; }[keyof T];
|
|
304
308
|
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]>; };
|
|
305
309
|
type DecodedRecordOptionalKeys<T extends Record<string, CodecLike<any, any>>> = { [K in keyof T]: Extract<DecodedType<T[K]>, undefined> extends never ? never : K; }[keyof T];
|
|
@@ -308,7 +312,7 @@ type DecodedRecord<T extends Record<string, CodecLike<any, any>>> = { [key in ke
|
|
|
308
312
|
* Table is a dynamic-size type. It can be considered as a dynvec but the length is fixed.
|
|
309
313
|
* @param codecLayout
|
|
310
314
|
*/
|
|
311
|
-
declare function table<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(
|
|
315
|
+
declare function table<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayoutLike: T): Codec<Encodable, Decoded>;
|
|
312
316
|
type UnionEncodable<T extends Record<string, CodecLike<any, any>>, K extends keyof T = keyof T> = K extends unknown ? {
|
|
313
317
|
type: K;
|
|
314
318
|
value: EncodableType<T[K]>;
|
|
@@ -353,7 +357,7 @@ type UnionMatchHandlers<CodecType extends CodecLike<any, UnionDecoded<any, any>>
|
|
|
353
357
|
* // Fixed-size union with custom numeric IDs
|
|
354
358
|
* union({ cafe: PaddedUint8, bee: Uint16 }, { cafe: 0xcafe, bee: 0xbee })
|
|
355
359
|
*/
|
|
356
|
-
declare function union<T extends Record<string, CodecLike<any, any>>>(
|
|
360
|
+
declare function union<T extends Record<string, CodecLike<any, any>>>(codecLayoutLike: T, fields?: Record<keyof T, number | undefined | null>): Codec<UnionEncodable<T> | {
|
|
357
361
|
inner: UnionEncodable<T>;
|
|
358
362
|
}, UnionDecoded<T>>;
|
|
359
363
|
/**
|
|
@@ -361,14 +365,14 @@ declare function union<T extends Record<string, CodecLike<any, any>>>(codecLayou
|
|
|
361
365
|
* The size of a struct is the sum of all fields' size.
|
|
362
366
|
* @param codecLayout a object contains all fields' codec
|
|
363
367
|
*/
|
|
364
|
-
declare function struct<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(
|
|
368
|
+
declare function struct<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayoutLike: T): Codec<Encodable, Decoded>;
|
|
365
369
|
/**
|
|
366
370
|
* The array is a fixed-size type: it has a fixed-size inner type and a fixed length.
|
|
367
371
|
* The size of an array is the size of inner type times the length.
|
|
368
372
|
* @param itemCodec the fixed-size array item codec
|
|
369
373
|
* @param itemCount
|
|
370
374
|
*/
|
|
371
|
-
declare function array<Encodable, Decoded>(
|
|
375
|
+
declare function array<Encodable, Decoded>(itemCodecLike: CodecLike<Encodable, Decoded>, itemCount: number): Codec<Array<Encodable>, Array<Decoded>>;
|
|
372
376
|
//#endregion
|
|
373
377
|
//#region src/num/index.d.ts
|
|
374
378
|
/**
|
|
@@ -827,24 +831,43 @@ declare function apply<T, R>(transformer: (val: T) => R, value: undefined | null
|
|
|
827
831
|
*/
|
|
828
832
|
declare function apply<T, R>(transformer: (val: T) => R, value: T | undefined | null): R | undefined;
|
|
829
833
|
/**
|
|
830
|
-
* Similar to Array.reduce, but
|
|
834
|
+
* Similar to Array.reduce, but works on any iterable.
|
|
835
|
+
* @public
|
|
836
|
+
*
|
|
837
|
+
* @param values - The value or iterable to be reduced.
|
|
838
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
839
|
+
* @returns The accumulated result.
|
|
840
|
+
*/
|
|
841
|
+
declare function reduce<T>(values: T | Iterable<T>, accumulator: (a: T, b: T, i: number) => T | undefined | null | void): T;
|
|
842
|
+
/**
|
|
843
|
+
* Similar to Array.reduce, but works on any iterable.
|
|
844
|
+
* @public
|
|
845
|
+
*
|
|
846
|
+
* @param values - The value or iterable to be reduced.
|
|
847
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
848
|
+
* @param init - The initial value.
|
|
849
|
+
* @returns The accumulated result.
|
|
850
|
+
*/
|
|
851
|
+
declare function reduce<T, V>(values: V | Iterable<V>, accumulator: (a: T, b: V, i: number) => T | undefined | null | void, init: T): T;
|
|
852
|
+
/**
|
|
853
|
+
* Similar to Array.reduce, but works on async iterables and the accumulator can return a Promise.
|
|
831
854
|
* @public
|
|
832
855
|
*
|
|
833
|
-
* @param values - The
|
|
834
|
-
* @param accumulator - A callback to be called for each value. If it returns null, the previous result will be kept.
|
|
856
|
+
* @param values - The value, iterable, or async iterable to be reduced.
|
|
857
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
835
858
|
* @returns The accumulated result.
|
|
836
859
|
*/
|
|
837
|
-
declare function reduceAsync<T>(values: T
|
|
860
|
+
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>;
|
|
838
861
|
/**
|
|
839
|
-
* Similar to Array.reduce, but the accumulator can
|
|
862
|
+
* Similar to Array.reduce, but works on async iterables and the accumulator can return a Promise.
|
|
840
863
|
* @public
|
|
841
864
|
*
|
|
842
|
-
* @param values - The
|
|
843
|
-
* @param accumulator - A callback to be called for each value. If it returns null, the previous result will be kept.
|
|
865
|
+
* @param values - The value, iterable, or async iterable to be reduced.
|
|
866
|
+
* @param accumulator - A callback to be called for each value. If it returns null or undefined, the previous result will be kept.
|
|
844
867
|
* @param init - The initial value.
|
|
845
868
|
* @returns The accumulated result.
|
|
846
869
|
*/
|
|
847
|
-
declare function reduceAsync<T, V>(values: V
|
|
870
|
+
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>;
|
|
848
871
|
/**
|
|
849
872
|
* Waits for the given duration, rejecting with the abort reason if cancelled.
|
|
850
873
|
* @public
|
|
@@ -967,25 +990,31 @@ declare abstract class Entity {
|
|
|
967
990
|
* @returns The encoded bytes
|
|
968
991
|
* @throws Will throw an error if the entity is not serializable
|
|
969
992
|
*/
|
|
970
|
-
encode(_: SubTypeLike)
|
|
993
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
971
994
|
/**
|
|
972
995
|
* Decode the entity from bytes
|
|
973
996
|
* @public
|
|
974
997
|
* @static
|
|
975
998
|
* @param _ - The bytes to decode
|
|
999
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
976
1000
|
* @returns The decoded entity
|
|
977
1001
|
* @throws Will throw an error if the entity is not serializable
|
|
978
1002
|
*/
|
|
979
|
-
decode(_: BytesLike
|
|
1003
|
+
decode: (_: BytesLike, _config?: {
|
|
1004
|
+
isExtraFieldIgnored?: boolean;
|
|
1005
|
+
}) => SubType;
|
|
980
1006
|
/**
|
|
981
1007
|
* Create an entity from bytes
|
|
982
1008
|
* @public
|
|
983
1009
|
* @static
|
|
984
1010
|
* @param _ - The bytes to create the entity from
|
|
1011
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
985
1012
|
* @returns The created entity
|
|
986
1013
|
* @throws Will throw an error if the entity is not serializable
|
|
987
1014
|
*/
|
|
988
|
-
fromBytes(_bytes: BytesLike
|
|
1015
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1016
|
+
isExtraFieldIgnored?: boolean;
|
|
1017
|
+
}) => SubType;
|
|
989
1018
|
/**
|
|
990
1019
|
* Create an entity from a serializable object
|
|
991
1020
|
* @public
|
|
@@ -994,7 +1023,7 @@ declare abstract class Entity {
|
|
|
994
1023
|
* @returns The created entity
|
|
995
1024
|
* @throws Will throw an error if the entity is not serializable
|
|
996
1025
|
*/
|
|
997
|
-
from(_: SubTypeLike)
|
|
1026
|
+
from: (_: SubTypeLike) => SubType;
|
|
998
1027
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
999
1028
|
/**
|
|
1000
1029
|
* Generate a base class of CCC to create a serializable Union instance.
|
|
@@ -1067,25 +1096,31 @@ declare abstract class Entity {
|
|
|
1067
1096
|
* @returns The encoded bytes
|
|
1068
1097
|
* @throws Will throw an error if the entity is not serializable
|
|
1069
1098
|
*/
|
|
1070
|
-
encode(_: SubTypeLike_1)
|
|
1099
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
1071
1100
|
/**
|
|
1072
1101
|
* Decode the entity from bytes
|
|
1073
1102
|
* @public
|
|
1074
1103
|
* @static
|
|
1075
1104
|
* @param _ - The bytes to decode
|
|
1105
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1076
1106
|
* @returns The decoded entity
|
|
1077
1107
|
* @throws Will throw an error if the entity is not serializable
|
|
1078
1108
|
*/
|
|
1079
|
-
decode(_: BytesLike
|
|
1109
|
+
decode: (_: BytesLike, _config?: {
|
|
1110
|
+
isExtraFieldIgnored?: boolean;
|
|
1111
|
+
} | undefined) => SubType_1;
|
|
1080
1112
|
/**
|
|
1081
1113
|
* Create an entity from bytes
|
|
1082
1114
|
* @public
|
|
1083
1115
|
* @static
|
|
1084
1116
|
* @param _ - The bytes to create the entity from
|
|
1117
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1085
1118
|
* @returns The created entity
|
|
1086
1119
|
* @throws Will throw an error if the entity is not serializable
|
|
1087
1120
|
*/
|
|
1088
|
-
fromBytes(_bytes: BytesLike
|
|
1121
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1122
|
+
isExtraFieldIgnored?: boolean;
|
|
1123
|
+
} | undefined) => SubType_1;
|
|
1089
1124
|
/**
|
|
1090
1125
|
* Create an entity from a serializable object
|
|
1091
1126
|
* @public
|
|
@@ -1094,7 +1129,7 @@ declare abstract class Entity {
|
|
|
1094
1129
|
* @returns The created entity
|
|
1095
1130
|
* @throws Will throw an error if the entity is not serializable
|
|
1096
1131
|
*/
|
|
1097
|
-
from(_: SubTypeLike_1)
|
|
1132
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
1098
1133
|
/**
|
|
1099
1134
|
* Generate a base class of CCC to create a serializable instance.
|
|
1100
1135
|
* This should be used with the {@link codec} decorator.
|
|
@@ -1199,25 +1234,31 @@ declare abstract class Entity {
|
|
|
1199
1234
|
* @returns The encoded bytes
|
|
1200
1235
|
* @throws Will throw an error if the entity is not serializable
|
|
1201
1236
|
*/
|
|
1202
|
-
encode(_: SubTypeLike)
|
|
1237
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
1203
1238
|
/**
|
|
1204
1239
|
* Decode the entity from bytes
|
|
1205
1240
|
* @public
|
|
1206
1241
|
* @static
|
|
1207
1242
|
* @param _ - The bytes to decode
|
|
1243
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1208
1244
|
* @returns The decoded entity
|
|
1209
1245
|
* @throws Will throw an error if the entity is not serializable
|
|
1210
1246
|
*/
|
|
1211
|
-
decode(_: BytesLike
|
|
1247
|
+
decode: (_: BytesLike, _config?: {
|
|
1248
|
+
isExtraFieldIgnored?: boolean;
|
|
1249
|
+
} | undefined) => SubType;
|
|
1212
1250
|
/**
|
|
1213
1251
|
* Create an entity from bytes
|
|
1214
1252
|
* @public
|
|
1215
1253
|
* @static
|
|
1216
1254
|
* @param _ - The bytes to create the entity from
|
|
1255
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1217
1256
|
* @returns The created entity
|
|
1218
1257
|
* @throws Will throw an error if the entity is not serializable
|
|
1219
1258
|
*/
|
|
1220
|
-
fromBytes(_bytes: BytesLike
|
|
1259
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1260
|
+
isExtraFieldIgnored?: boolean;
|
|
1261
|
+
} | undefined) => SubType;
|
|
1221
1262
|
/**
|
|
1222
1263
|
* Create an entity from a serializable object
|
|
1223
1264
|
* @public
|
|
@@ -1226,7 +1267,7 @@ declare abstract class Entity {
|
|
|
1226
1267
|
* @returns The created entity
|
|
1227
1268
|
* @throws Will throw an error if the entity is not serializable
|
|
1228
1269
|
*/
|
|
1229
|
-
from(_: SubTypeLike)
|
|
1270
|
+
from: (_: SubTypeLike) => SubType;
|
|
1230
1271
|
/**
|
|
1231
1272
|
* Generate a base class of CCC to create a serializable instance.
|
|
1232
1273
|
* This should be used with the {@link codec} decorator.
|
|
@@ -1279,25 +1320,31 @@ declare abstract class Entity {
|
|
|
1279
1320
|
* @returns The encoded bytes
|
|
1280
1321
|
* @throws Will throw an error if the entity is not serializable
|
|
1281
1322
|
*/
|
|
1282
|
-
encode(_: SubTypeLike_1)
|
|
1323
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
1283
1324
|
/**
|
|
1284
1325
|
* Decode the entity from bytes
|
|
1285
1326
|
* @public
|
|
1286
1327
|
* @static
|
|
1287
1328
|
* @param _ - The bytes to decode
|
|
1329
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1288
1330
|
* @returns The decoded entity
|
|
1289
1331
|
* @throws Will throw an error if the entity is not serializable
|
|
1290
1332
|
*/
|
|
1291
|
-
decode(_: BytesLike
|
|
1333
|
+
decode: (_: BytesLike, _config?: {
|
|
1334
|
+
isExtraFieldIgnored?: boolean;
|
|
1335
|
+
}) => SubType_1;
|
|
1292
1336
|
/**
|
|
1293
1337
|
* Create an entity from bytes
|
|
1294
1338
|
* @public
|
|
1295
1339
|
* @static
|
|
1296
1340
|
* @param _ - The bytes to create the entity from
|
|
1341
|
+
* @param _config - The configuration for decoding, including whether to ignore extra fields
|
|
1297
1342
|
* @returns The created entity
|
|
1298
1343
|
* @throws Will throw an error if the entity is not serializable
|
|
1299
1344
|
*/
|
|
1300
|
-
fromBytes(_bytes: BytesLike
|
|
1345
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
1346
|
+
isExtraFieldIgnored?: boolean;
|
|
1347
|
+
}) => SubType_1;
|
|
1301
1348
|
/**
|
|
1302
1349
|
* Create an entity from a serializable object
|
|
1303
1350
|
* @public
|
|
@@ -1306,7 +1353,7 @@ declare abstract class Entity {
|
|
|
1306
1353
|
* @returns The created entity
|
|
1307
1354
|
* @throws Will throw an error if the entity is not serializable
|
|
1308
1355
|
*/
|
|
1309
|
-
from(_: SubTypeLike_1)
|
|
1356
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
1310
1357
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
1311
1358
|
/**
|
|
1312
1359
|
* Generate a base class of CCC to create a serializable Union instance.
|
|
@@ -1322,31 +1369,32 @@ declare abstract class Entity {
|
|
|
1322
1369
|
* A class decorator to add methods implementation on the {@link Entity.Base} class
|
|
1323
1370
|
* @example
|
|
1324
1371
|
* ```typescript
|
|
1325
|
-
*
|
|
1326
|
-
* mol.
|
|
1327
|
-
*
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
* )
|
|
1372
|
+
* const ScriptCodec = mol.table({
|
|
1373
|
+
* codeHash: mol.Byte32,
|
|
1374
|
+
* hashType: HashTypeCodec,
|
|
1375
|
+
* args: mol.Bytes,
|
|
1376
|
+
* });
|
|
1377
|
+
* export type ScriptLike = EncodableType<typeof ScriptCodec>;
|
|
1378
|
+
* @codec(ScriptCodec)
|
|
1332
1379
|
* export class Script extends Entity.Base<ScriptLike, Script>() {
|
|
1333
|
-
*
|
|
1380
|
+
* public codeHash: Hex;
|
|
1381
|
+
* public hashType: HashType;
|
|
1382
|
+
* public args: Hex;
|
|
1383
|
+
*
|
|
1384
|
+
* constructor({ codeHash, hashType, args }: DecodedType<typeof ScriptCodec>) {
|
|
1385
|
+
* super();
|
|
1386
|
+
*
|
|
1387
|
+
* this.codeHash = codeHash;
|
|
1388
|
+
* this.hashType = hashType;
|
|
1389
|
+
* this.args = args;
|
|
1390
|
+
* }
|
|
1334
1391
|
* }
|
|
1335
1392
|
* ```
|
|
1336
1393
|
*/
|
|
1337
|
-
declare function codec<Encodable, TypeLike extends Encodable,
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
}) => Decoded;
|
|
1342
|
-
byteLength?: number;
|
|
1343
|
-
}): <Type extends TypeLike, ConstructorType extends Constructor<Type> & {
|
|
1344
|
-
from(decoded: TypeLike): Type;
|
|
1345
|
-
byteLength?: number;
|
|
1346
|
-
encode(encodable: TypeLike): Bytes$1;
|
|
1347
|
-
decode(bytesLike: BytesLike): Type;
|
|
1348
|
-
fromBytes(bytes: BytesLike): Type;
|
|
1349
|
-
}>(Constructor: ConstructorType, ..._: unknown[]) => ConstructorType;
|
|
1394
|
+
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"> & {
|
|
1395
|
+
from: (encodable: TypeLike | Decoded) => Type;
|
|
1396
|
+
fromBytes: (bytes: BytesLike) => Type;
|
|
1397
|
+
}, ..._: unknown[]) => void;
|
|
1350
1398
|
//#endregion
|
|
1351
1399
|
//#region src/codec/predefined.d.ts
|
|
1352
1400
|
/**
|
|
@@ -1918,7 +1966,7 @@ declare class Signature {
|
|
|
1918
1966
|
* This class provides methods to connect, get addresses, and sign transactions.
|
|
1919
1967
|
* @public
|
|
1920
1968
|
*/
|
|
1921
|
-
declare abstract class Signer {
|
|
1969
|
+
declare abstract class Signer$1 {
|
|
1922
1970
|
protected client_: Client;
|
|
1923
1971
|
constructor(client_: Client);
|
|
1924
1972
|
abstract get type(): SignerType;
|
|
@@ -1929,6 +1977,7 @@ declare abstract class Signer {
|
|
|
1929
1977
|
*/
|
|
1930
1978
|
matchNetworkPreference(preferences: NetworkPreference[], currentNetwork: string | undefined): NetworkPreference | undefined;
|
|
1931
1979
|
static verifyMessage(message: string | BytesLike, signature: Signature): Promise<boolean>;
|
|
1980
|
+
static fromSignature(_client: Client, _signature: Signature, _message?: string | BytesLike | null, ..._addresses: (string | string[])[]): Promise<Signer$1 | undefined>;
|
|
1932
1981
|
/**
|
|
1933
1982
|
* Connects to the signer.
|
|
1934
1983
|
*
|
|
@@ -2100,7 +2149,7 @@ declare abstract class Signer {
|
|
|
2100
2149
|
* An abstract class representing a multisig signer.
|
|
2101
2150
|
* @public
|
|
2102
2151
|
*/
|
|
2103
|
-
declare abstract class SignerMultisig extends Signer {
|
|
2152
|
+
declare abstract class SignerMultisig extends Signer$1 {
|
|
2104
2153
|
/**
|
|
2105
2154
|
* Get the number of members in the multisig script.
|
|
2106
2155
|
* @returns The number of members.
|
|
@@ -2177,8 +2226,8 @@ declare class SignerMultisigNotEnoughSignaturesError extends Error {
|
|
|
2177
2226
|
*/
|
|
2178
2227
|
declare class SignerInfo {
|
|
2179
2228
|
name: string;
|
|
2180
|
-
signer: Signer;
|
|
2181
|
-
constructor(name: string, signer: Signer);
|
|
2229
|
+
signer: Signer$1;
|
|
2230
|
+
constructor(name: string, signer: Signer$1);
|
|
2182
2231
|
}
|
|
2183
2232
|
/**
|
|
2184
2233
|
* Represents a wallet with a name, icon, and an array of signer information.
|
|
@@ -2196,7 +2245,7 @@ type Wallet = {
|
|
|
2196
2245
|
* as well as signing transactions.
|
|
2197
2246
|
* @public
|
|
2198
2247
|
*/
|
|
2199
|
-
declare abstract class SignerBtc extends Signer {
|
|
2248
|
+
declare abstract class SignerBtc extends Signer$1 {
|
|
2200
2249
|
get type(): SignerType;
|
|
2201
2250
|
get signType(): SignerSignType;
|
|
2202
2251
|
/**
|
|
@@ -2410,7 +2459,7 @@ declare function verifyMessageCkbSecp256k1(message: string | BytesLike, signatur
|
|
|
2410
2459
|
*
|
|
2411
2460
|
* @public
|
|
2412
2461
|
*/
|
|
2413
|
-
declare class SignerCkbAlwaysSuccess extends Signer {
|
|
2462
|
+
declare class SignerCkbAlwaysSuccess extends Signer$1 {
|
|
2414
2463
|
get type(): SignerType;
|
|
2415
2464
|
get signType(): SignerSignType;
|
|
2416
2465
|
/**
|
|
@@ -2441,7 +2490,7 @@ declare class SignerCkbAlwaysSuccess extends Signer {
|
|
|
2441
2490
|
/**
|
|
2442
2491
|
* @public
|
|
2443
2492
|
*/
|
|
2444
|
-
declare class SignerCkbPublicKey extends Signer {
|
|
2493
|
+
declare class SignerCkbPublicKey extends Signer$1 {
|
|
2445
2494
|
get type(): SignerType;
|
|
2446
2495
|
get signType(): SignerSignType;
|
|
2447
2496
|
readonly publicKey: Hex;
|
|
@@ -2480,7 +2529,7 @@ declare class SignerCkbPrivateKey extends SignerCkbPublicKey {
|
|
|
2480
2529
|
*
|
|
2481
2530
|
* @public
|
|
2482
2531
|
*/
|
|
2483
|
-
declare class SignerCkbScriptReadonly extends Signer {
|
|
2532
|
+
declare class SignerCkbScriptReadonly extends Signer$1 {
|
|
2484
2533
|
/**
|
|
2485
2534
|
* The type of the signer.
|
|
2486
2535
|
*/
|
|
@@ -2549,6 +2598,12 @@ type MultisigCkbWitnessLike = ({
|
|
|
2549
2598
|
mustMatch?: NumLike | null;
|
|
2550
2599
|
signatures?: HexLike[] | null;
|
|
2551
2600
|
};
|
|
2601
|
+
declare const MultisigCkbWitnessCodec: Codec<MultisigCkbWitnessLike, {
|
|
2602
|
+
publicKeyHashes: `0x${string}`[];
|
|
2603
|
+
threshold: number;
|
|
2604
|
+
mustMatch: number;
|
|
2605
|
+
signatures: `0x${string}`[];
|
|
2606
|
+
}>;
|
|
2552
2607
|
declare const MultisigCkbWitness_base: (abstract new () => {
|
|
2553
2608
|
toBytes(): Bytes$1;
|
|
2554
2609
|
clone(): MultisigCkbWitness;
|
|
@@ -2557,10 +2612,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2557
2612
|
toHex(): Hex;
|
|
2558
2613
|
}) & {
|
|
2559
2614
|
byteLength?: number;
|
|
2560
|
-
encode(_: MultisigCkbWitnessLike)
|
|
2561
|
-
decode(_: BytesLike
|
|
2562
|
-
|
|
2563
|
-
|
|
2615
|
+
encode: (_: MultisigCkbWitnessLike) => Bytes$1;
|
|
2616
|
+
decode: (_: BytesLike, _config?: {
|
|
2617
|
+
isExtraFieldIgnored?: boolean;
|
|
2618
|
+
} | undefined) => MultisigCkbWitness;
|
|
2619
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2620
|
+
isExtraFieldIgnored?: boolean;
|
|
2621
|
+
} | undefined) => MultisigCkbWitness;
|
|
2622
|
+
from: (_: MultisigCkbWitnessLike) => MultisigCkbWitness;
|
|
2564
2623
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
2565
2624
|
toBytes(): Bytes$1;
|
|
2566
2625
|
clone(): SubType;
|
|
@@ -2569,10 +2628,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2569
2628
|
toHex(): Hex;
|
|
2570
2629
|
}) & {
|
|
2571
2630
|
byteLength?: number;
|
|
2572
|
-
encode(_: SubTypeLike)
|
|
2573
|
-
decode(_: BytesLike
|
|
2574
|
-
|
|
2575
|
-
|
|
2631
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
2632
|
+
decode: (_: BytesLike, _config?: {
|
|
2633
|
+
isExtraFieldIgnored?: boolean;
|
|
2634
|
+
}) => SubType;
|
|
2635
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2636
|
+
isExtraFieldIgnored?: boolean;
|
|
2637
|
+
}) => SubType;
|
|
2638
|
+
from: (_: SubTypeLike) => SubType;
|
|
2576
2639
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
2577
2640
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
2578
2641
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -2589,10 +2652,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2589
2652
|
toHex(): Hex;
|
|
2590
2653
|
}) & {
|
|
2591
2654
|
byteLength?: number;
|
|
2592
|
-
encode(_: SubTypeLike_1)
|
|
2593
|
-
decode(_: BytesLike
|
|
2594
|
-
|
|
2595
|
-
|
|
2655
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
2656
|
+
decode: (_: BytesLike, _config?: {
|
|
2657
|
+
isExtraFieldIgnored?: boolean;
|
|
2658
|
+
} | undefined) => SubType_1;
|
|
2659
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2660
|
+
isExtraFieldIgnored?: boolean;
|
|
2661
|
+
} | undefined) => SubType_1;
|
|
2662
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
2596
2663
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
2597
2664
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
2598
2665
|
};
|
|
@@ -2612,10 +2679,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2612
2679
|
toHex(): Hex;
|
|
2613
2680
|
}) & {
|
|
2614
2681
|
byteLength?: number;
|
|
2615
|
-
encode(_: SubTypeLike)
|
|
2616
|
-
decode(_: BytesLike
|
|
2617
|
-
|
|
2618
|
-
|
|
2682
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
2683
|
+
decode: (_: BytesLike, _config?: {
|
|
2684
|
+
isExtraFieldIgnored?: boolean;
|
|
2685
|
+
} | undefined) => SubType;
|
|
2686
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2687
|
+
isExtraFieldIgnored?: boolean;
|
|
2688
|
+
} | undefined) => SubType;
|
|
2689
|
+
from: (_: SubTypeLike) => SubType;
|
|
2619
2690
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
2620
2691
|
toBytes(): Bytes$1;
|
|
2621
2692
|
clone(): SubType_1;
|
|
@@ -2624,10 +2695,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
|
|
|
2624
2695
|
toHex(): Hex;
|
|
2625
2696
|
}) & {
|
|
2626
2697
|
byteLength?: number;
|
|
2627
|
-
encode(_: SubTypeLike_1)
|
|
2628
|
-
decode(_: BytesLike
|
|
2629
|
-
|
|
2630
|
-
|
|
2698
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
2699
|
+
decode: (_: BytesLike, _config?: {
|
|
2700
|
+
isExtraFieldIgnored?: boolean;
|
|
2701
|
+
}) => SubType_1;
|
|
2702
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
2703
|
+
isExtraFieldIgnored?: boolean;
|
|
2704
|
+
}) => SubType_1;
|
|
2705
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
2631
2706
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
2632
2707
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
2633
2708
|
};
|
|
@@ -2649,7 +2724,7 @@ declare class MultisigCkbWitness extends MultisigCkbWitness_base {
|
|
|
2649
2724
|
* @param mustMatch - The number of signatures that must match.
|
|
2650
2725
|
* @param signatures - The signatures.
|
|
2651
2726
|
*/
|
|
2652
|
-
constructor(publicKeyHashes
|
|
2727
|
+
constructor({ publicKeyHashes, threshold, mustMatch, signatures }: DecodedType<typeof MultisigCkbWitnessCodec>);
|
|
2653
2728
|
/**
|
|
2654
2729
|
* Create a MultisigCkbWitness from a MultisigCkbWitnessLike.
|
|
2655
2730
|
*
|
|
@@ -2872,7 +2947,7 @@ declare function verifyMessageJoyId(message: string | BytesLike, signature: stri
|
|
|
2872
2947
|
* as well as signing transactions.
|
|
2873
2948
|
* @public
|
|
2874
2949
|
*/
|
|
2875
|
-
declare abstract class SignerDoge extends Signer {
|
|
2950
|
+
declare abstract class SignerDoge extends Signer$1 {
|
|
2876
2951
|
get type(): SignerType;
|
|
2877
2952
|
get signType(): SignerSignType;
|
|
2878
2953
|
/**
|
|
@@ -3025,7 +3100,7 @@ declare function verifyMessageDogeEcdsa(message: string | BytesLike, signature:
|
|
|
3025
3100
|
/**
|
|
3026
3101
|
* @public
|
|
3027
3102
|
*/
|
|
3028
|
-
declare abstract class SignerDummy extends Signer {
|
|
3103
|
+
declare abstract class SignerDummy extends Signer$1 {
|
|
3029
3104
|
readonly type: SignerType;
|
|
3030
3105
|
get signType(): SignerSignType;
|
|
3031
3106
|
constructor(client: Client, type: SignerType);
|
|
@@ -3060,7 +3135,7 @@ declare class SignerOpenLink extends SignerDummy {
|
|
|
3060
3135
|
* This class provides methods to get EVM account, internal address, and signing transactions.
|
|
3061
3136
|
* @public
|
|
3062
3137
|
*/
|
|
3063
|
-
declare abstract class SignerEvm extends Signer {
|
|
3138
|
+
declare abstract class SignerEvm extends Signer$1 {
|
|
3064
3139
|
get type(): SignerType;
|
|
3065
3140
|
get signType(): SignerSignType;
|
|
3066
3141
|
/**
|
|
@@ -3222,10 +3297,10 @@ type SignerJsonRpcResultRecord = {
|
|
|
3222
3297
|
result: unknown;
|
|
3223
3298
|
};
|
|
3224
3299
|
type SignerJsonRpcProviderSessionConfig = {
|
|
3225
|
-
getSigner: () => Signer | undefined;
|
|
3300
|
+
getSigner: () => Signer$1 | undefined;
|
|
3226
3301
|
getSignerMetadata?: () => Pick<SignerJsonRpcInfo, "name" | "icon">;
|
|
3227
3302
|
/** Connects the requested network and returns its connected Signer. */
|
|
3228
|
-
connect: (networkId: string, options?: SignerJsonRpcProviderSessionOptions) => Promise<Signer>;
|
|
3303
|
+
connect: (networkId: string, options?: SignerJsonRpcProviderSessionOptions) => Promise<Signer$1>;
|
|
3229
3304
|
confirmRequest: (request: SignerJsonRpcConfirmation, options?: SignerJsonRpcProviderSessionOptions) => Promise<boolean>;
|
|
3230
3305
|
};
|
|
3231
3306
|
declare class SignerJsonRpcProviderSession {
|
|
@@ -3255,7 +3330,7 @@ type SignerJsonRpcConfig = Omit<Parameters<typeof RequestorJsonRpc.new>[0], "onE
|
|
|
3255
3330
|
/** Cleans up integration-owned resources before replacement is announced. */
|
|
3256
3331
|
disconnectHandler?: () => PromiseLike<void> | void;
|
|
3257
3332
|
};
|
|
3258
|
-
declare class SignerJsonRpc extends Signer {
|
|
3333
|
+
declare class SignerJsonRpc extends Signer$1 {
|
|
3259
3334
|
readonly requestor: RequestorJsonRpc;
|
|
3260
3335
|
private info;
|
|
3261
3336
|
private readonly disconnectHandler?;
|
|
@@ -3283,9 +3358,9 @@ declare class SignerJsonRpc extends Signer {
|
|
|
3283
3358
|
getAddressObjs(): Promise<Address[]>;
|
|
3284
3359
|
getInternalAddress(): Promise<string>;
|
|
3285
3360
|
getIdentity(): Promise<string>;
|
|
3286
|
-
signMessageRaw: Signer["signMessageRaw"];
|
|
3287
|
-
prepareTransaction: Signer["prepareTransaction"];
|
|
3288
|
-
signOnlyTransaction: Signer["signOnlyTransaction"];
|
|
3361
|
+
signMessageRaw: Signer$1["signMessageRaw"];
|
|
3362
|
+
prepareTransaction: Signer$1["prepareTransaction"];
|
|
3363
|
+
signOnlyTransaction: Signer$1["signOnlyTransaction"];
|
|
3289
3364
|
buildSender(rpcMethod: Parameters<RequestorJsonRpc["request"]>[0], inTransformers?: Parameters<RequestorJsonRpc["request"]>[2], outTransformer?: Parameters<RequestorJsonRpc["request"]>[3]): (...request: unknown[]) => Promise<unknown>;
|
|
3290
3365
|
private clearReadCache;
|
|
3291
3366
|
private request;
|
|
@@ -3308,7 +3383,7 @@ interface NostrEvent {
|
|
|
3308
3383
|
/**
|
|
3309
3384
|
* @public
|
|
3310
3385
|
*/
|
|
3311
|
-
declare abstract class SignerNostr extends Signer {
|
|
3386
|
+
declare abstract class SignerNostr extends Signer$1 {
|
|
3312
3387
|
static CKB_SIG_HASH_ALL_TAG: string;
|
|
3313
3388
|
static CKB_UNLOCK_EVENT_KIND: number;
|
|
3314
3389
|
static CKB_UNLOCK_EVENT_CONTENT: string;
|
|
@@ -3391,8 +3466,26 @@ declare class SignerNostrPrivateKey extends SignerNostrPublicKeyReadonly {
|
|
|
3391
3466
|
declare function buildNostrEventFromMessage(message: string | BytesLike): NostrEvent;
|
|
3392
3467
|
declare function nostrEventHash(event: NostrEvent): Bytes$1;
|
|
3393
3468
|
declare function verifyMessageNostrEvent(message: string | BytesLike, signature: string, address: string): boolean;
|
|
3469
|
+
//#endregion
|
|
3470
|
+
//#region src/signer/signerFromSignature.d.ts
|
|
3471
|
+
/**
|
|
3472
|
+
* Creates a signer from a signature.
|
|
3473
|
+
*
|
|
3474
|
+
* @param client - The client instance.
|
|
3475
|
+
* @param signature - The signature to create the signer from.
|
|
3476
|
+
* @param message - The message that was signed.
|
|
3477
|
+
* @param addresses - The addresses to check against the signer.
|
|
3478
|
+
* @returns The signer if the signature is valid and the addresses match, otherwise undefined.
|
|
3479
|
+
* @throws Error if the signature sign type is unknown.
|
|
3480
|
+
*/
|
|
3481
|
+
declare function signerFromSignature(client: Client, signature: Signature, message?: string | BytesLike | null, ...addresses: (string | string[])[]): Promise<Signer$1 | undefined>;
|
|
3482
|
+
//#endregion
|
|
3483
|
+
//#region src/signer/index.d.ts
|
|
3484
|
+
declare abstract class Signer extends Signer$1 {
|
|
3485
|
+
static fromSignature(client: Client, signature: Signature, message?: string | BytesLike | null, ...addresses: (string | string[])[]): Promise<Signer | undefined>;
|
|
3486
|
+
}
|
|
3394
3487
|
declare namespace barrel_d_exports {
|
|
3395
|
-
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 };
|
|
3488
|
+
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 };
|
|
3396
3489
|
}
|
|
3397
3490
|
//#endregion
|
|
3398
3491
|
//#region src/client/clientTypes.advanced.d.ts
|
|
@@ -3773,6 +3866,17 @@ type EpochLike = [NumLike, NumLike, NumLike] | {
|
|
|
3773
3866
|
numerator: NumLike;
|
|
3774
3867
|
denominator: NumLike;
|
|
3775
3868
|
} | Num | Hex;
|
|
3869
|
+
declare const EpochCodec: Codec<EncodableRecord<{
|
|
3870
|
+
padding: Codec<void | null | undefined, void>;
|
|
3871
|
+
denominator: Codec<NumLike, bigint>;
|
|
3872
|
+
numerator: Codec<NumLike, bigint>;
|
|
3873
|
+
integer: Codec<NumLike, bigint>;
|
|
3874
|
+
}>, DecodedRecord<{
|
|
3875
|
+
padding: Codec<void | null | undefined, void>;
|
|
3876
|
+
denominator: Codec<NumLike, bigint>;
|
|
3877
|
+
numerator: Codec<NumLike, bigint>;
|
|
3878
|
+
integer: Codec<NumLike, bigint>;
|
|
3879
|
+
}>>;
|
|
3776
3880
|
declare const Epoch_base: (abstract new () => {
|
|
3777
3881
|
toBytes(): Bytes$1;
|
|
3778
3882
|
clone(): Epoch;
|
|
@@ -3781,10 +3885,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3781
3885
|
toHex(): Hex;
|
|
3782
3886
|
}) & {
|
|
3783
3887
|
byteLength?: number;
|
|
3784
|
-
encode(_: EpochLike)
|
|
3785
|
-
decode(_: BytesLike
|
|
3786
|
-
|
|
3787
|
-
|
|
3888
|
+
encode: (_: EpochLike) => Bytes$1;
|
|
3889
|
+
decode: (_: BytesLike, _config?: {
|
|
3890
|
+
isExtraFieldIgnored?: boolean;
|
|
3891
|
+
} | undefined) => Epoch;
|
|
3892
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3893
|
+
isExtraFieldIgnored?: boolean;
|
|
3894
|
+
} | undefined) => Epoch;
|
|
3895
|
+
from: (_: EpochLike) => Epoch;
|
|
3788
3896
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
3789
3897
|
toBytes(): Bytes$1;
|
|
3790
3898
|
clone(): SubType;
|
|
@@ -3793,10 +3901,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3793
3901
|
toHex(): Hex;
|
|
3794
3902
|
}) & {
|
|
3795
3903
|
byteLength?: number;
|
|
3796
|
-
encode(_: SubTypeLike)
|
|
3797
|
-
decode(_: BytesLike
|
|
3798
|
-
|
|
3799
|
-
|
|
3904
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
3905
|
+
decode: (_: BytesLike, _config?: {
|
|
3906
|
+
isExtraFieldIgnored?: boolean;
|
|
3907
|
+
}) => SubType;
|
|
3908
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3909
|
+
isExtraFieldIgnored?: boolean;
|
|
3910
|
+
}) => SubType;
|
|
3911
|
+
from: (_: SubTypeLike) => SubType;
|
|
3800
3912
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
3801
3913
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
3802
3914
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -3813,10 +3925,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3813
3925
|
toHex(): Hex;
|
|
3814
3926
|
}) & {
|
|
3815
3927
|
byteLength?: number;
|
|
3816
|
-
encode(_: SubTypeLike_1)
|
|
3817
|
-
decode(_: BytesLike
|
|
3818
|
-
|
|
3819
|
-
|
|
3928
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
3929
|
+
decode: (_: BytesLike, _config?: {
|
|
3930
|
+
isExtraFieldIgnored?: boolean;
|
|
3931
|
+
} | undefined) => SubType_1;
|
|
3932
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3933
|
+
isExtraFieldIgnored?: boolean;
|
|
3934
|
+
} | undefined) => SubType_1;
|
|
3935
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
3820
3936
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
3821
3937
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
3822
3938
|
};
|
|
@@ -3836,10 +3952,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3836
3952
|
toHex(): Hex;
|
|
3837
3953
|
}) & {
|
|
3838
3954
|
byteLength?: number;
|
|
3839
|
-
encode(_: SubTypeLike)
|
|
3840
|
-
decode(_: BytesLike
|
|
3841
|
-
|
|
3842
|
-
|
|
3955
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
3956
|
+
decode: (_: BytesLike, _config?: {
|
|
3957
|
+
isExtraFieldIgnored?: boolean;
|
|
3958
|
+
} | undefined) => SubType;
|
|
3959
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3960
|
+
isExtraFieldIgnored?: boolean;
|
|
3961
|
+
} | undefined) => SubType;
|
|
3962
|
+
from: (_: SubTypeLike) => SubType;
|
|
3843
3963
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
3844
3964
|
toBytes(): Bytes$1;
|
|
3845
3965
|
clone(): SubType_1;
|
|
@@ -3848,10 +3968,14 @@ declare const Epoch_base: (abstract new () => {
|
|
|
3848
3968
|
toHex(): Hex;
|
|
3849
3969
|
}) & {
|
|
3850
3970
|
byteLength?: number;
|
|
3851
|
-
encode(_: SubTypeLike_1)
|
|
3852
|
-
decode(_: BytesLike
|
|
3853
|
-
|
|
3854
|
-
|
|
3971
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
3972
|
+
decode: (_: BytesLike, _config?: {
|
|
3973
|
+
isExtraFieldIgnored?: boolean;
|
|
3974
|
+
}) => SubType_1;
|
|
3975
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
3976
|
+
isExtraFieldIgnored?: boolean;
|
|
3977
|
+
}) => SubType_1;
|
|
3978
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
3855
3979
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
3856
3980
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
3857
3981
|
};
|
|
@@ -3888,7 +4012,7 @@ declare class Epoch extends Epoch_base {
|
|
|
3888
4012
|
* @param numerator - Fractional numerator (Num).
|
|
3889
4013
|
* @param denominator - Fractional denominator (Num).
|
|
3890
4014
|
*/
|
|
3891
|
-
constructor(integer
|
|
4015
|
+
constructor({ integer, numerator, denominator }: Omit<DecodedType<typeof EpochCodec>, "padding">);
|
|
3892
4016
|
/**
|
|
3893
4017
|
* Normalize simpler base invariants:
|
|
3894
4018
|
* - If denominator === 0, set denominator to 1 and numerator to 0 for arithmetic convenience.
|
|
@@ -4145,6 +4269,259 @@ declare enum KnownScript {
|
|
|
4145
4269
|
TimeLock = "TimeLock"
|
|
4146
4270
|
}
|
|
4147
4271
|
//#endregion
|
|
4272
|
+
//#region src/ckb/script.d.ts
|
|
4273
|
+
declare const HashTypeCodec: Codec<HashTypeLike, HashType>;
|
|
4274
|
+
/**
|
|
4275
|
+
* @public
|
|
4276
|
+
*/
|
|
4277
|
+
type HashTypeLike = string | number | bigint;
|
|
4278
|
+
/**
|
|
4279
|
+
* @public
|
|
4280
|
+
*/
|
|
4281
|
+
type HashType = "type" | "data" | "data1" | "data2";
|
|
4282
|
+
/**
|
|
4283
|
+
* Converts a HashTypeLike value to a HashType.
|
|
4284
|
+
* @public
|
|
4285
|
+
*
|
|
4286
|
+
* @param val - The value to convert, which can be a string, number, or bigint.
|
|
4287
|
+
* @returns The corresponding HashType.
|
|
4288
|
+
*
|
|
4289
|
+
* @throws Will throw an error if the input value is not a valid hash type.
|
|
4290
|
+
*
|
|
4291
|
+
* @example
|
|
4292
|
+
* ```typescript
|
|
4293
|
+
* const hashType = hashTypeFrom(1); // Outputs "data"
|
|
4294
|
+
* const hashType = hashTypeFrom("type"); // Outputs "type"
|
|
4295
|
+
* ```
|
|
4296
|
+
*/
|
|
4297
|
+
declare function hashTypeFrom(val: HashTypeLike): HashType;
|
|
4298
|
+
/**
|
|
4299
|
+
* Converts a HashTypeLike value to its corresponding byte representation.
|
|
4300
|
+
* @public
|
|
4301
|
+
*
|
|
4302
|
+
* @param hashType - The hash type value to convert.
|
|
4303
|
+
* @returns A Uint8Array containing the byte representation of the hash type.
|
|
4304
|
+
*
|
|
4305
|
+
* @example
|
|
4306
|
+
* ```typescript
|
|
4307
|
+
* const hashTypeBytes = hashTypeToBytes("type"); // Outputs Uint8Array [0]
|
|
4308
|
+
* ```
|
|
4309
|
+
*/
|
|
4310
|
+
declare function hashTypeToBytes(hashType: HashTypeLike): Bytes$1;
|
|
4311
|
+
/**
|
|
4312
|
+
* Converts a byte-like value to a HashType.
|
|
4313
|
+
* @public
|
|
4314
|
+
*
|
|
4315
|
+
* @param bytes - The byte-like value to convert.
|
|
4316
|
+
* @returns The corresponding HashType.
|
|
4317
|
+
*
|
|
4318
|
+
* @throws Will throw an error if the input bytes do not correspond to a valid hash type.
|
|
4319
|
+
*
|
|
4320
|
+
* @example
|
|
4321
|
+
* ```typescript
|
|
4322
|
+
* const hashType = hashTypeFromBytes(new Uint8Array([0])); // Outputs "type"
|
|
4323
|
+
* ```
|
|
4324
|
+
*/
|
|
4325
|
+
declare function hashTypeFromBytes(bytes: BytesLike): HashType;
|
|
4326
|
+
declare const ScriptCodec: Codec<EncodableRecord<{
|
|
4327
|
+
codeHash: Codec<BytesLike, `0x${string}`>;
|
|
4328
|
+
hashType: Codec<HashTypeLike, HashType>;
|
|
4329
|
+
args: Codec<BytesLike, `0x${string}`>;
|
|
4330
|
+
}>, DecodedRecord<{
|
|
4331
|
+
codeHash: Codec<BytesLike, `0x${string}`>;
|
|
4332
|
+
hashType: Codec<HashTypeLike, HashType>;
|
|
4333
|
+
args: Codec<BytesLike, `0x${string}`>;
|
|
4334
|
+
}>>;
|
|
4335
|
+
/**
|
|
4336
|
+
* @public
|
|
4337
|
+
*/
|
|
4338
|
+
type ScriptLike = EncodableType<typeof ScriptCodec>;
|
|
4339
|
+
declare const Script_base: (abstract new () => {
|
|
4340
|
+
toBytes(): Bytes$1;
|
|
4341
|
+
clone(): Script;
|
|
4342
|
+
eq(other: {} & {
|
|
4343
|
+
codeHash: BytesLike;
|
|
4344
|
+
hashType: HashTypeLike;
|
|
4345
|
+
args: BytesLike;
|
|
4346
|
+
}): boolean;
|
|
4347
|
+
hash(): Hex;
|
|
4348
|
+
toHex(): Hex;
|
|
4349
|
+
}) & {
|
|
4350
|
+
byteLength?: number;
|
|
4351
|
+
encode: (_: {} & {
|
|
4352
|
+
codeHash: BytesLike;
|
|
4353
|
+
hashType: HashTypeLike;
|
|
4354
|
+
args: BytesLike;
|
|
4355
|
+
}) => Bytes$1;
|
|
4356
|
+
decode: (_: BytesLike, _config?: {
|
|
4357
|
+
isExtraFieldIgnored?: boolean;
|
|
4358
|
+
} | undefined) => Script;
|
|
4359
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4360
|
+
isExtraFieldIgnored?: boolean;
|
|
4361
|
+
} | undefined) => Script;
|
|
4362
|
+
from: (_: {} & {
|
|
4363
|
+
codeHash: BytesLike;
|
|
4364
|
+
hashType: HashTypeLike;
|
|
4365
|
+
args: BytesLike;
|
|
4366
|
+
}) => Script;
|
|
4367
|
+
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
4368
|
+
toBytes(): Bytes$1;
|
|
4369
|
+
clone(): SubType;
|
|
4370
|
+
eq(other: SubTypeLike): boolean;
|
|
4371
|
+
hash(): Hex;
|
|
4372
|
+
toHex(): Hex;
|
|
4373
|
+
}) & {
|
|
4374
|
+
byteLength?: number;
|
|
4375
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
4376
|
+
decode: (_: BytesLike, _config?: {
|
|
4377
|
+
isExtraFieldIgnored?: boolean;
|
|
4378
|
+
}) => SubType;
|
|
4379
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4380
|
+
isExtraFieldIgnored?: boolean;
|
|
4381
|
+
}) => SubType;
|
|
4382
|
+
from: (_: SubTypeLike) => SubType;
|
|
4383
|
+
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4384
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4385
|
+
readonly inner: DecodedType<CodecType>;
|
|
4386
|
+
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4387
|
+
_?: undefined | null;
|
|
4388
|
+
}): Result;
|
|
4389
|
+
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4390
|
+
_: (inner: DecodedType<CodecType>) => Result;
|
|
4391
|
+
}): Result;
|
|
4392
|
+
toBytes(): Bytes$1;
|
|
4393
|
+
clone(): SubType_1;
|
|
4394
|
+
eq(other: SubTypeLike_1): boolean;
|
|
4395
|
+
hash(): Hex;
|
|
4396
|
+
toHex(): Hex;
|
|
4397
|
+
}) & {
|
|
4398
|
+
byteLength?: number;
|
|
4399
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
4400
|
+
decode: (_: BytesLike, _config?: {
|
|
4401
|
+
isExtraFieldIgnored?: boolean;
|
|
4402
|
+
} | undefined) => SubType_1;
|
|
4403
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4404
|
+
isExtraFieldIgnored?: boolean;
|
|
4405
|
+
} | undefined) => SubType_1;
|
|
4406
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
4407
|
+
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4408
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4409
|
+
};
|
|
4410
|
+
};
|
|
4411
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4412
|
+
readonly inner: DecodedType<CodecType>;
|
|
4413
|
+
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4414
|
+
_?: undefined | null;
|
|
4415
|
+
}): Result;
|
|
4416
|
+
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4417
|
+
_: (inner: DecodedType<CodecType>) => Result;
|
|
4418
|
+
}): Result;
|
|
4419
|
+
toBytes(): Bytes$1;
|
|
4420
|
+
clone(): SubType;
|
|
4421
|
+
eq(other: SubTypeLike): boolean;
|
|
4422
|
+
hash(): Hex;
|
|
4423
|
+
toHex(): Hex;
|
|
4424
|
+
}) & {
|
|
4425
|
+
byteLength?: number;
|
|
4426
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
4427
|
+
decode: (_: BytesLike, _config?: {
|
|
4428
|
+
isExtraFieldIgnored?: boolean;
|
|
4429
|
+
} | undefined) => SubType;
|
|
4430
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4431
|
+
isExtraFieldIgnored?: boolean;
|
|
4432
|
+
} | undefined) => SubType;
|
|
4433
|
+
from: (_: SubTypeLike) => SubType;
|
|
4434
|
+
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
4435
|
+
toBytes(): Bytes$1;
|
|
4436
|
+
clone(): SubType_1;
|
|
4437
|
+
eq(other: SubTypeLike_1): boolean;
|
|
4438
|
+
hash(): Hex;
|
|
4439
|
+
toHex(): Hex;
|
|
4440
|
+
}) & {
|
|
4441
|
+
byteLength?: number;
|
|
4442
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
4443
|
+
decode: (_: BytesLike, _config?: {
|
|
4444
|
+
isExtraFieldIgnored?: boolean;
|
|
4445
|
+
}) => SubType_1;
|
|
4446
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
4447
|
+
isExtraFieldIgnored?: boolean;
|
|
4448
|
+
}) => SubType_1;
|
|
4449
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
4450
|
+
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4451
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4452
|
+
};
|
|
4453
|
+
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4454
|
+
};
|
|
4455
|
+
};
|
|
4456
|
+
/**
|
|
4457
|
+
* @public
|
|
4458
|
+
*/
|
|
4459
|
+
declare class Script extends Script_base {
|
|
4460
|
+
codeHash: Hex;
|
|
4461
|
+
hashType: HashType;
|
|
4462
|
+
args: Hex;
|
|
4463
|
+
/**
|
|
4464
|
+
* Creates an instance of Script.
|
|
4465
|
+
*
|
|
4466
|
+
* @param codeHash - The code hash of the script.
|
|
4467
|
+
* @param hashType - The hash type of the script.
|
|
4468
|
+
* @param args - The arguments for the script.
|
|
4469
|
+
*/
|
|
4470
|
+
constructor({ codeHash, hashType, args }: DecodedType<typeof ScriptCodec>);
|
|
4471
|
+
get occupiedSize(): number;
|
|
4472
|
+
/**
|
|
4473
|
+
* Clone a script.
|
|
4474
|
+
*
|
|
4475
|
+
* @returns A cloned Script instance.
|
|
4476
|
+
*
|
|
4477
|
+
* @example
|
|
4478
|
+
* ```typescript
|
|
4479
|
+
* const script1 = script0.clone();
|
|
4480
|
+
* ```
|
|
4481
|
+
*/
|
|
4482
|
+
clone(): Script;
|
|
4483
|
+
/**
|
|
4484
|
+
* Check if the script is equal to another script.
|
|
4485
|
+
* @public
|
|
4486
|
+
* @param other - The other script to compare with
|
|
4487
|
+
* @returns True if the scripts are equal, false otherwise
|
|
4488
|
+
*
|
|
4489
|
+
* @example
|
|
4490
|
+
* ```typescript
|
|
4491
|
+
* const isEqual = script0.eq(script1);
|
|
4492
|
+
* ```
|
|
4493
|
+
*/
|
|
4494
|
+
eq(other: ScriptLike): boolean;
|
|
4495
|
+
/**
|
|
4496
|
+
* Creates a Script instance from client and known script.
|
|
4497
|
+
*
|
|
4498
|
+
* @param knownScript - A KnownScript enum.
|
|
4499
|
+
* @param args - Args for the script.
|
|
4500
|
+
* @param client - A ScriptLike object or an instance of Script.
|
|
4501
|
+
* @returns A promise that resolves to the script instance.
|
|
4502
|
+
*
|
|
4503
|
+
* @example
|
|
4504
|
+
* ```typescript
|
|
4505
|
+
* const script = await Script.fromKnownScript(
|
|
4506
|
+
* client,
|
|
4507
|
+
* KnownScript.XUdt,
|
|
4508
|
+
* args: "0xabcd..."
|
|
4509
|
+
* );
|
|
4510
|
+
* ```
|
|
4511
|
+
*/
|
|
4512
|
+
static fromKnownScript(client: Client, knownScript: KnownScript, args: HexLike): Promise<Script>;
|
|
4513
|
+
}
|
|
4514
|
+
declare const ScriptOpt: Codec<({} & {
|
|
4515
|
+
codeHash: BytesLike;
|
|
4516
|
+
hashType: HashTypeLike;
|
|
4517
|
+
args: BytesLike;
|
|
4518
|
+
}) | null | undefined, Script | undefined>;
|
|
4519
|
+
declare const ScriptVec: Codec<({} & {
|
|
4520
|
+
codeHash: BytesLike;
|
|
4521
|
+
hashType: HashTypeLike;
|
|
4522
|
+
args: BytesLike;
|
|
4523
|
+
})[], Script[]>;
|
|
4524
|
+
//#endregion
|
|
4148
4525
|
//#region src/client/client.d.ts
|
|
4149
4526
|
type ClientConfig = {
|
|
4150
4527
|
cache?: ClientCache;
|
|
@@ -4194,8 +4571,8 @@ declare abstract class Client {
|
|
|
4194
4571
|
*/
|
|
4195
4572
|
getKnownScript(script: KnownScript): Promise<ScriptInfo>;
|
|
4196
4573
|
abstract getFeeRateStatistics(blockRange?: NumLike): Promise<{
|
|
4197
|
-
mean
|
|
4198
|
-
median
|
|
4574
|
+
mean?: Num;
|
|
4575
|
+
median?: Num;
|
|
4199
4576
|
}>;
|
|
4200
4577
|
/**
|
|
4201
4578
|
* Get the recommended transaction fee rate based on recent blocks.
|
|
@@ -4668,230 +5045,6 @@ declare abstract class Client {
|
|
|
4668
5045
|
waitTransaction(txHash: HexLike, confirmations?: number, timeout?: number, interval?: number): Promise<ClientTransactionResponse | undefined>;
|
|
4669
5046
|
}
|
|
4670
5047
|
//#endregion
|
|
4671
|
-
//#region src/ckb/script.d.ts
|
|
4672
|
-
declare const HashTypeCodec: Codec<HashTypeLike, HashType>;
|
|
4673
|
-
/**
|
|
4674
|
-
* @public
|
|
4675
|
-
*/
|
|
4676
|
-
type HashTypeLike = string | number | bigint;
|
|
4677
|
-
/**
|
|
4678
|
-
* @public
|
|
4679
|
-
*/
|
|
4680
|
-
type HashType = "type" | "data" | "data1" | "data2";
|
|
4681
|
-
/**
|
|
4682
|
-
* Converts a HashTypeLike value to a HashType.
|
|
4683
|
-
* @public
|
|
4684
|
-
*
|
|
4685
|
-
* @param val - The value to convert, which can be a string, number, or bigint.
|
|
4686
|
-
* @returns The corresponding HashType.
|
|
4687
|
-
*
|
|
4688
|
-
* @throws Will throw an error if the input value is not a valid hash type.
|
|
4689
|
-
*
|
|
4690
|
-
* @example
|
|
4691
|
-
* ```typescript
|
|
4692
|
-
* const hashType = hashTypeFrom(1); // Outputs "data"
|
|
4693
|
-
* const hashType = hashTypeFrom("type"); // Outputs "type"
|
|
4694
|
-
* ```
|
|
4695
|
-
*/
|
|
4696
|
-
declare function hashTypeFrom(val: HashTypeLike): HashType;
|
|
4697
|
-
/**
|
|
4698
|
-
* Converts a HashTypeLike value to its corresponding byte representation.
|
|
4699
|
-
* @public
|
|
4700
|
-
*
|
|
4701
|
-
* @param hashType - The hash type value to convert.
|
|
4702
|
-
* @returns A Uint8Array containing the byte representation of the hash type.
|
|
4703
|
-
*
|
|
4704
|
-
* @example
|
|
4705
|
-
* ```typescript
|
|
4706
|
-
* const hashTypeBytes = hashTypeToBytes("type"); // Outputs Uint8Array [0]
|
|
4707
|
-
* ```
|
|
4708
|
-
*/
|
|
4709
|
-
declare function hashTypeToBytes(hashType: HashTypeLike): Bytes$1;
|
|
4710
|
-
/**
|
|
4711
|
-
* Converts a byte-like value to a HashType.
|
|
4712
|
-
* @public
|
|
4713
|
-
*
|
|
4714
|
-
* @param bytes - The byte-like value to convert.
|
|
4715
|
-
* @returns The corresponding HashType.
|
|
4716
|
-
*
|
|
4717
|
-
* @throws Will throw an error if the input bytes do not correspond to a valid hash type.
|
|
4718
|
-
*
|
|
4719
|
-
* @example
|
|
4720
|
-
* ```typescript
|
|
4721
|
-
* const hashType = hashTypeFromBytes(new Uint8Array([0])); // Outputs "type"
|
|
4722
|
-
* ```
|
|
4723
|
-
*/
|
|
4724
|
-
declare function hashTypeFromBytes(bytes: BytesLike): HashType;
|
|
4725
|
-
/**
|
|
4726
|
-
* @public
|
|
4727
|
-
*/
|
|
4728
|
-
type ScriptLike = {
|
|
4729
|
-
codeHash: BytesLike;
|
|
4730
|
-
hashType: HashTypeLike;
|
|
4731
|
-
args: BytesLike;
|
|
4732
|
-
};
|
|
4733
|
-
declare const Script_base: (abstract new () => {
|
|
4734
|
-
toBytes(): Bytes$1;
|
|
4735
|
-
clone(): Script;
|
|
4736
|
-
eq(other: ScriptLike): boolean;
|
|
4737
|
-
hash(): Hex;
|
|
4738
|
-
toHex(): Hex;
|
|
4739
|
-
}) & {
|
|
4740
|
-
byteLength?: number;
|
|
4741
|
-
encode(_: ScriptLike): Bytes$1;
|
|
4742
|
-
decode(_: BytesLike): Script;
|
|
4743
|
-
fromBytes(_bytes: BytesLike): Script;
|
|
4744
|
-
from(_: ScriptLike): Script;
|
|
4745
|
-
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
4746
|
-
toBytes(): Bytes$1;
|
|
4747
|
-
clone(): SubType;
|
|
4748
|
-
eq(other: SubTypeLike): boolean;
|
|
4749
|
-
hash(): Hex;
|
|
4750
|
-
toHex(): Hex;
|
|
4751
|
-
}) & {
|
|
4752
|
-
byteLength?: number;
|
|
4753
|
-
encode(_: SubTypeLike): Bytes$1;
|
|
4754
|
-
decode(_: BytesLike): SubType;
|
|
4755
|
-
fromBytes(_bytes: BytesLike): SubType;
|
|
4756
|
-
from(_: SubTypeLike): SubType;
|
|
4757
|
-
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4758
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4759
|
-
readonly inner: DecodedType<CodecType>;
|
|
4760
|
-
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4761
|
-
_?: undefined | null;
|
|
4762
|
-
}): Result;
|
|
4763
|
-
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4764
|
-
_: (inner: DecodedType<CodecType>) => Result;
|
|
4765
|
-
}): Result;
|
|
4766
|
-
toBytes(): Bytes$1;
|
|
4767
|
-
clone(): SubType_1;
|
|
4768
|
-
eq(other: SubTypeLike_1): boolean;
|
|
4769
|
-
hash(): Hex;
|
|
4770
|
-
toHex(): Hex;
|
|
4771
|
-
}) & {
|
|
4772
|
-
byteLength?: number;
|
|
4773
|
-
encode(_: SubTypeLike_1): Bytes$1;
|
|
4774
|
-
decode(_: BytesLike): SubType_1;
|
|
4775
|
-
fromBytes(_bytes: BytesLike): SubType_1;
|
|
4776
|
-
from(_: SubTypeLike_1): SubType_1;
|
|
4777
|
-
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4778
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4779
|
-
};
|
|
4780
|
-
};
|
|
4781
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
4782
|
-
readonly inner: DecodedType<CodecType>;
|
|
4783
|
-
match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
|
|
4784
|
-
_?: undefined | null;
|
|
4785
|
-
}): Result;
|
|
4786
|
-
match<Result>(handlers: Partial<UnionMatchHandlers<CodecType, Result>> & {
|
|
4787
|
-
_: (inner: DecodedType<CodecType>) => Result;
|
|
4788
|
-
}): Result;
|
|
4789
|
-
toBytes(): Bytes$1;
|
|
4790
|
-
clone(): SubType;
|
|
4791
|
-
eq(other: SubTypeLike): boolean;
|
|
4792
|
-
hash(): Hex;
|
|
4793
|
-
toHex(): Hex;
|
|
4794
|
-
}) & {
|
|
4795
|
-
byteLength?: number;
|
|
4796
|
-
encode(_: SubTypeLike): Bytes$1;
|
|
4797
|
-
decode(_: BytesLike): SubType;
|
|
4798
|
-
fromBytes(_bytes: BytesLike): SubType;
|
|
4799
|
-
from(_: SubTypeLike): SubType;
|
|
4800
|
-
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
4801
|
-
toBytes(): Bytes$1;
|
|
4802
|
-
clone(): SubType_1;
|
|
4803
|
-
eq(other: SubTypeLike_1): boolean;
|
|
4804
|
-
hash(): Hex;
|
|
4805
|
-
toHex(): Hex;
|
|
4806
|
-
}) & {
|
|
4807
|
-
byteLength?: number;
|
|
4808
|
-
encode(_: SubTypeLike_1): Bytes$1;
|
|
4809
|
-
decode(_: BytesLike): SubType_1;
|
|
4810
|
-
fromBytes(_bytes: BytesLike): SubType_1;
|
|
4811
|
-
from(_: SubTypeLike_1): SubType_1;
|
|
4812
|
-
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
4813
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4814
|
-
};
|
|
4815
|
-
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
4816
|
-
};
|
|
4817
|
-
};
|
|
4818
|
-
/**
|
|
4819
|
-
* @public
|
|
4820
|
-
*/
|
|
4821
|
-
declare class Script extends Script_base {
|
|
4822
|
-
codeHash: Hex;
|
|
4823
|
-
hashType: HashType;
|
|
4824
|
-
args: Hex;
|
|
4825
|
-
/**
|
|
4826
|
-
* Creates an instance of Script.
|
|
4827
|
-
*
|
|
4828
|
-
* @param codeHash - The code hash of the script.
|
|
4829
|
-
* @param hashType - The hash type of the script.
|
|
4830
|
-
* @param args - The arguments for the script.
|
|
4831
|
-
*/
|
|
4832
|
-
constructor(codeHash: Hex, hashType: HashType, args: Hex);
|
|
4833
|
-
get occupiedSize(): number;
|
|
4834
|
-
/**
|
|
4835
|
-
* Clone a script.
|
|
4836
|
-
*
|
|
4837
|
-
* @returns A cloned Script instance.
|
|
4838
|
-
*
|
|
4839
|
-
* @example
|
|
4840
|
-
* ```typescript
|
|
4841
|
-
* const script1 = script0.clone();
|
|
4842
|
-
* ```
|
|
4843
|
-
*/
|
|
4844
|
-
clone(): Script;
|
|
4845
|
-
/**
|
|
4846
|
-
* Check if the script is equal to another script.
|
|
4847
|
-
* @public
|
|
4848
|
-
* @param other - The other script to compare with
|
|
4849
|
-
* @returns True if the scripts are equal, false otherwise
|
|
4850
|
-
*
|
|
4851
|
-
* @example
|
|
4852
|
-
* ```typescript
|
|
4853
|
-
* const isEqual = script0.eq(script1);
|
|
4854
|
-
* ```
|
|
4855
|
-
*/
|
|
4856
|
-
eq(other: ScriptLike): boolean;
|
|
4857
|
-
/**
|
|
4858
|
-
* Creates a Script instance from a ScriptLike object.
|
|
4859
|
-
*
|
|
4860
|
-
* @param script - A ScriptLike object or an instance of Script.
|
|
4861
|
-
* @returns A Script instance.
|
|
4862
|
-
*
|
|
4863
|
-
* @example
|
|
4864
|
-
* ```typescript
|
|
4865
|
-
* const script = Script.from({
|
|
4866
|
-
* codeHash: "0x1234...",
|
|
4867
|
-
* hashType: "type",
|
|
4868
|
-
* args: "0xabcd..."
|
|
4869
|
-
* });
|
|
4870
|
-
* ```
|
|
4871
|
-
*/
|
|
4872
|
-
static from(script: ScriptLike): Script;
|
|
4873
|
-
/**
|
|
4874
|
-
* Creates a Script instance from client and known script.
|
|
4875
|
-
*
|
|
4876
|
-
* @param knownScript - A KnownScript enum.
|
|
4877
|
-
* @param args - Args for the script.
|
|
4878
|
-
* @param client - A ScriptLike object or an instance of Script.
|
|
4879
|
-
* @returns A promise that resolves to the script instance.
|
|
4880
|
-
*
|
|
4881
|
-
* @example
|
|
4882
|
-
* ```typescript
|
|
4883
|
-
* const script = await Script.fromKnownScript(
|
|
4884
|
-
* client,
|
|
4885
|
-
* KnownScript.XUdt,
|
|
4886
|
-
* args: "0xabcd..."
|
|
4887
|
-
* );
|
|
4888
|
-
* ```
|
|
4889
|
-
*/
|
|
4890
|
-
static fromKnownScript(client: Client, knownScript: KnownScript, args: HexLike): Promise<Script>;
|
|
4891
|
-
}
|
|
4892
|
-
declare const ScriptOpt: Codec<ScriptLike | null | undefined, Script | undefined>;
|
|
4893
|
-
declare const ScriptVec: Codec<ScriptLike[], Script[]>;
|
|
4894
|
-
//#endregion
|
|
4895
5048
|
//#region src/ckb/transactionLumos.d.ts
|
|
4896
5049
|
interface LumosTransactionSkeletonType {
|
|
4897
5050
|
cellDeps: {
|
|
@@ -4978,22 +5131,42 @@ declare function depTypeFromBytes(bytes: BytesLike): DepType;
|
|
|
4978
5131
|
/**
|
|
4979
5132
|
* @public
|
|
4980
5133
|
*/
|
|
4981
|
-
|
|
4982
|
-
txHash:
|
|
4983
|
-
index: NumLike
|
|
4984
|
-
}
|
|
5134
|
+
declare const OutPointCodec: Codec<EncodableRecord<{
|
|
5135
|
+
txHash: Codec<BytesLike, `0x${string}`>;
|
|
5136
|
+
index: Codec<NumLike, number>;
|
|
5137
|
+
}>, DecodedRecord<{
|
|
5138
|
+
txHash: Codec<BytesLike, `0x${string}`>;
|
|
5139
|
+
index: Codec<NumLike, number>;
|
|
5140
|
+
}>>;
|
|
5141
|
+
/**
|
|
5142
|
+
* @public
|
|
5143
|
+
*/
|
|
5144
|
+
type OutPointLike = EncodableType<typeof OutPointCodec>;
|
|
4985
5145
|
declare const OutPoint_base: (abstract new () => {
|
|
4986
5146
|
toBytes(): Bytes$1;
|
|
4987
5147
|
clone(): OutPoint;
|
|
4988
|
-
eq(other:
|
|
5148
|
+
eq(other: {} & {
|
|
5149
|
+
txHash: BytesLike;
|
|
5150
|
+
index: NumLike;
|
|
5151
|
+
}): boolean;
|
|
4989
5152
|
hash(): Hex;
|
|
4990
5153
|
toHex(): Hex;
|
|
4991
5154
|
}) & {
|
|
4992
5155
|
byteLength?: number;
|
|
4993
|
-
encode(_:
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
5156
|
+
encode: (_: {} & {
|
|
5157
|
+
txHash: BytesLike;
|
|
5158
|
+
index: NumLike;
|
|
5159
|
+
}) => Bytes$1;
|
|
5160
|
+
decode: (_: BytesLike, _config?: {
|
|
5161
|
+
isExtraFieldIgnored?: boolean;
|
|
5162
|
+
} | undefined) => OutPoint;
|
|
5163
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5164
|
+
isExtraFieldIgnored?: boolean;
|
|
5165
|
+
} | undefined) => OutPoint;
|
|
5166
|
+
from: (_: {} & {
|
|
5167
|
+
txHash: BytesLike;
|
|
5168
|
+
index: NumLike;
|
|
5169
|
+
}) => OutPoint;
|
|
4997
5170
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
4998
5171
|
toBytes(): Bytes$1;
|
|
4999
5172
|
clone(): SubType;
|
|
@@ -5002,10 +5175,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5002
5175
|
toHex(): Hex;
|
|
5003
5176
|
}) & {
|
|
5004
5177
|
byteLength?: number;
|
|
5005
|
-
encode(_: SubTypeLike)
|
|
5006
|
-
decode(_: BytesLike
|
|
5007
|
-
|
|
5008
|
-
|
|
5178
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5179
|
+
decode: (_: BytesLike, _config?: {
|
|
5180
|
+
isExtraFieldIgnored?: boolean;
|
|
5181
|
+
}) => SubType;
|
|
5182
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5183
|
+
isExtraFieldIgnored?: boolean;
|
|
5184
|
+
}) => SubType;
|
|
5185
|
+
from: (_: SubTypeLike) => SubType;
|
|
5009
5186
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5010
5187
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5011
5188
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5022,10 +5199,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5022
5199
|
toHex(): Hex;
|
|
5023
5200
|
}) & {
|
|
5024
5201
|
byteLength?: number;
|
|
5025
|
-
encode(_: SubTypeLike_1)
|
|
5026
|
-
decode(_: BytesLike
|
|
5027
|
-
|
|
5028
|
-
|
|
5202
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5203
|
+
decode: (_: BytesLike, _config?: {
|
|
5204
|
+
isExtraFieldIgnored?: boolean;
|
|
5205
|
+
} | undefined) => SubType_1;
|
|
5206
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5207
|
+
isExtraFieldIgnored?: boolean;
|
|
5208
|
+
} | undefined) => SubType_1;
|
|
5209
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5029
5210
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5030
5211
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5031
5212
|
};
|
|
@@ -5045,10 +5226,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5045
5226
|
toHex(): Hex;
|
|
5046
5227
|
}) & {
|
|
5047
5228
|
byteLength?: number;
|
|
5048
|
-
encode(_: SubTypeLike)
|
|
5049
|
-
decode(_: BytesLike
|
|
5050
|
-
|
|
5051
|
-
|
|
5229
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5230
|
+
decode: (_: BytesLike, _config?: {
|
|
5231
|
+
isExtraFieldIgnored?: boolean;
|
|
5232
|
+
} | undefined) => SubType;
|
|
5233
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5234
|
+
isExtraFieldIgnored?: boolean;
|
|
5235
|
+
} | undefined) => SubType;
|
|
5236
|
+
from: (_: SubTypeLike) => SubType;
|
|
5052
5237
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5053
5238
|
toBytes(): Bytes$1;
|
|
5054
5239
|
clone(): SubType_1;
|
|
@@ -5057,10 +5242,14 @@ declare const OutPoint_base: (abstract new () => {
|
|
|
5057
5242
|
toHex(): Hex;
|
|
5058
5243
|
}) & {
|
|
5059
5244
|
byteLength?: number;
|
|
5060
|
-
encode(_: SubTypeLike_1)
|
|
5061
|
-
decode(_: BytesLike
|
|
5062
|
-
|
|
5063
|
-
|
|
5245
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5246
|
+
decode: (_: BytesLike, _config?: {
|
|
5247
|
+
isExtraFieldIgnored?: boolean;
|
|
5248
|
+
}) => SubType_1;
|
|
5249
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5250
|
+
isExtraFieldIgnored?: boolean;
|
|
5251
|
+
}) => SubType_1;
|
|
5252
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5064
5253
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5065
5254
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5066
5255
|
};
|
|
@@ -5079,19 +5268,7 @@ declare class OutPoint extends OutPoint_base {
|
|
|
5079
5268
|
* @param txHash - The transaction hash.
|
|
5080
5269
|
* @param index - The index of the output in the transaction.
|
|
5081
5270
|
*/
|
|
5082
|
-
constructor(txHash
|
|
5083
|
-
/**
|
|
5084
|
-
* Creates an OutPoint instance from an OutPointLike object.
|
|
5085
|
-
*
|
|
5086
|
-
* @param outPoint - An OutPointLike object or an instance of OutPoint.
|
|
5087
|
-
* @returns An OutPoint instance.
|
|
5088
|
-
*
|
|
5089
|
-
* @example
|
|
5090
|
-
* ```typescript
|
|
5091
|
-
* const outPoint = OutPoint.from({ txHash: "0x...", index: 0 });
|
|
5092
|
-
* ```
|
|
5093
|
-
*/
|
|
5094
|
-
static from(outPoint: OutPointLike): OutPoint;
|
|
5271
|
+
constructor({ txHash, index }: DecodedType<typeof OutPointCodec>);
|
|
5095
5272
|
/**
|
|
5096
5273
|
* Clone a OutPoint.
|
|
5097
5274
|
*
|
|
@@ -5116,6 +5293,26 @@ declare class OutPoint extends OutPoint_base {
|
|
|
5116
5293
|
*/
|
|
5117
5294
|
eq(other: OutPointLike): boolean;
|
|
5118
5295
|
}
|
|
5296
|
+
/**
|
|
5297
|
+
* @public
|
|
5298
|
+
*/
|
|
5299
|
+
declare const CellOutputCodec: Codec<EncodableRecord<{
|
|
5300
|
+
capacity: Codec<NumLike, bigint>;
|
|
5301
|
+
lock: typeof Script;
|
|
5302
|
+
type: Codec<({} & {
|
|
5303
|
+
codeHash: BytesLike;
|
|
5304
|
+
hashType: HashTypeLike;
|
|
5305
|
+
args: BytesLike;
|
|
5306
|
+
}) | null | undefined, Script | undefined>;
|
|
5307
|
+
}>, DecodedRecord<{
|
|
5308
|
+
capacity: Codec<NumLike, bigint>;
|
|
5309
|
+
lock: typeof Script;
|
|
5310
|
+
type: Codec<({} & {
|
|
5311
|
+
codeHash: BytesLike;
|
|
5312
|
+
hashType: HashTypeLike;
|
|
5313
|
+
args: BytesLike;
|
|
5314
|
+
}) | null | undefined, Script | undefined>;
|
|
5315
|
+
}>>;
|
|
5119
5316
|
/**
|
|
5120
5317
|
* @public
|
|
5121
5318
|
*/
|
|
@@ -5132,10 +5329,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5132
5329
|
toHex(): Hex;
|
|
5133
5330
|
}) & {
|
|
5134
5331
|
byteLength?: number;
|
|
5135
|
-
encode(_: CellOutputLike)
|
|
5136
|
-
decode(_: BytesLike
|
|
5137
|
-
|
|
5138
|
-
|
|
5332
|
+
encode: (_: CellOutputLike) => Bytes$1;
|
|
5333
|
+
decode: (_: BytesLike, _config?: {
|
|
5334
|
+
isExtraFieldIgnored?: boolean;
|
|
5335
|
+
} | undefined) => CellOutput;
|
|
5336
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5337
|
+
isExtraFieldIgnored?: boolean;
|
|
5338
|
+
} | undefined) => CellOutput;
|
|
5339
|
+
from: (_: CellOutputLike) => CellOutput;
|
|
5139
5340
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5140
5341
|
toBytes(): Bytes$1;
|
|
5141
5342
|
clone(): SubType;
|
|
@@ -5144,10 +5345,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5144
5345
|
toHex(): Hex;
|
|
5145
5346
|
}) & {
|
|
5146
5347
|
byteLength?: number;
|
|
5147
|
-
encode(_: SubTypeLike)
|
|
5148
|
-
decode(_: BytesLike
|
|
5149
|
-
|
|
5150
|
-
|
|
5348
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5349
|
+
decode: (_: BytesLike, _config?: {
|
|
5350
|
+
isExtraFieldIgnored?: boolean;
|
|
5351
|
+
}) => SubType;
|
|
5352
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5353
|
+
isExtraFieldIgnored?: boolean;
|
|
5354
|
+
}) => SubType;
|
|
5355
|
+
from: (_: SubTypeLike) => SubType;
|
|
5151
5356
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5152
5357
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5153
5358
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5164,10 +5369,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5164
5369
|
toHex(): Hex;
|
|
5165
5370
|
}) & {
|
|
5166
5371
|
byteLength?: number;
|
|
5167
|
-
encode(_: SubTypeLike_1)
|
|
5168
|
-
decode(_: BytesLike
|
|
5169
|
-
|
|
5170
|
-
|
|
5372
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5373
|
+
decode: (_: BytesLike, _config?: {
|
|
5374
|
+
isExtraFieldIgnored?: boolean;
|
|
5375
|
+
} | undefined) => SubType_1;
|
|
5376
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5377
|
+
isExtraFieldIgnored?: boolean;
|
|
5378
|
+
} | undefined) => SubType_1;
|
|
5379
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5171
5380
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5172
5381
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5173
5382
|
};
|
|
@@ -5187,10 +5396,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5187
5396
|
toHex(): Hex;
|
|
5188
5397
|
}) & {
|
|
5189
5398
|
byteLength?: number;
|
|
5190
|
-
encode(_: SubTypeLike)
|
|
5191
|
-
decode(_: BytesLike
|
|
5192
|
-
|
|
5193
|
-
|
|
5399
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5400
|
+
decode: (_: BytesLike, _config?: {
|
|
5401
|
+
isExtraFieldIgnored?: boolean;
|
|
5402
|
+
} | undefined) => SubType;
|
|
5403
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5404
|
+
isExtraFieldIgnored?: boolean;
|
|
5405
|
+
} | undefined) => SubType;
|
|
5406
|
+
from: (_: SubTypeLike) => SubType;
|
|
5194
5407
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5195
5408
|
toBytes(): Bytes$1;
|
|
5196
5409
|
clone(): SubType_1;
|
|
@@ -5199,10 +5412,14 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5199
5412
|
toHex(): Hex;
|
|
5200
5413
|
}) & {
|
|
5201
5414
|
byteLength?: number;
|
|
5202
|
-
encode(_: SubTypeLike_1)
|
|
5203
|
-
decode(_: BytesLike
|
|
5204
|
-
|
|
5205
|
-
|
|
5415
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5416
|
+
decode: (_: BytesLike, _config?: {
|
|
5417
|
+
isExtraFieldIgnored?: boolean;
|
|
5418
|
+
}) => SubType_1;
|
|
5419
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5420
|
+
isExtraFieldIgnored?: boolean;
|
|
5421
|
+
}) => SubType_1;
|
|
5422
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5206
5423
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5207
5424
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5208
5425
|
};
|
|
@@ -5215,7 +5432,7 @@ declare const CellOutput_base: (abstract new () => {
|
|
|
5215
5432
|
declare class CellOutput extends CellOutput_base {
|
|
5216
5433
|
capacity: Num;
|
|
5217
5434
|
lock: Script;
|
|
5218
|
-
type?: Script
|
|
5435
|
+
type?: Script;
|
|
5219
5436
|
/**
|
|
5220
5437
|
* Creates an instance of CellOutput.
|
|
5221
5438
|
*
|
|
@@ -5223,7 +5440,7 @@ declare class CellOutput extends CellOutput_base {
|
|
|
5223
5440
|
* @param lock - The lock script of the cell.
|
|
5224
5441
|
* @param type - The optional type script of the cell.
|
|
5225
5442
|
*/
|
|
5226
|
-
constructor(capacity
|
|
5443
|
+
constructor({ capacity, lock, type }: DecodedType<typeof CellOutputCodec>);
|
|
5227
5444
|
get occupiedSize(): number;
|
|
5228
5445
|
/**
|
|
5229
5446
|
* Creates a CellOutput instance from a CellOutputLike object.
|
|
@@ -5480,6 +5697,7 @@ type SinceLike = {
|
|
|
5480
5697
|
metric: "blockNumber" | "epoch" | "timestamp";
|
|
5481
5698
|
value: NumLike;
|
|
5482
5699
|
} | NumLike;
|
|
5700
|
+
declare const SinceCodec: Codec<SinceLike, Pick<Since, "relative" | "metric" | "value">>;
|
|
5483
5701
|
declare const Since_base: (abstract new () => {
|
|
5484
5702
|
toBytes(): Bytes$1;
|
|
5485
5703
|
clone(): Since;
|
|
@@ -5488,10 +5706,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5488
5706
|
toHex(): Hex;
|
|
5489
5707
|
}) & {
|
|
5490
5708
|
byteLength?: number;
|
|
5491
|
-
encode(_: SinceLike)
|
|
5492
|
-
decode(_: BytesLike
|
|
5493
|
-
|
|
5494
|
-
|
|
5709
|
+
encode: (_: SinceLike) => Bytes$1;
|
|
5710
|
+
decode: (_: BytesLike, _config?: {
|
|
5711
|
+
isExtraFieldIgnored?: boolean;
|
|
5712
|
+
} | undefined) => Since;
|
|
5713
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5714
|
+
isExtraFieldIgnored?: boolean;
|
|
5715
|
+
} | undefined) => Since;
|
|
5716
|
+
from: (_: SinceLike) => Since;
|
|
5495
5717
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5496
5718
|
toBytes(): Bytes$1;
|
|
5497
5719
|
clone(): SubType;
|
|
@@ -5500,10 +5722,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5500
5722
|
toHex(): Hex;
|
|
5501
5723
|
}) & {
|
|
5502
5724
|
byteLength?: number;
|
|
5503
|
-
encode(_: SubTypeLike)
|
|
5504
|
-
decode(_: BytesLike
|
|
5505
|
-
|
|
5506
|
-
|
|
5725
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5726
|
+
decode: (_: BytesLike, _config?: {
|
|
5727
|
+
isExtraFieldIgnored?: boolean;
|
|
5728
|
+
}) => SubType;
|
|
5729
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5730
|
+
isExtraFieldIgnored?: boolean;
|
|
5731
|
+
}) => SubType;
|
|
5732
|
+
from: (_: SubTypeLike) => SubType;
|
|
5507
5733
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5508
5734
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5509
5735
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5520,10 +5746,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5520
5746
|
toHex(): Hex;
|
|
5521
5747
|
}) & {
|
|
5522
5748
|
byteLength?: number;
|
|
5523
|
-
encode(_: SubTypeLike_1)
|
|
5524
|
-
decode(_: BytesLike
|
|
5525
|
-
|
|
5526
|
-
|
|
5749
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5750
|
+
decode: (_: BytesLike, _config?: {
|
|
5751
|
+
isExtraFieldIgnored?: boolean;
|
|
5752
|
+
} | undefined) => SubType_1;
|
|
5753
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5754
|
+
isExtraFieldIgnored?: boolean;
|
|
5755
|
+
} | undefined) => SubType_1;
|
|
5756
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5527
5757
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5528
5758
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5529
5759
|
};
|
|
@@ -5543,10 +5773,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5543
5773
|
toHex(): Hex;
|
|
5544
5774
|
}) & {
|
|
5545
5775
|
byteLength?: number;
|
|
5546
|
-
encode(_: SubTypeLike)
|
|
5547
|
-
decode(_: BytesLike
|
|
5548
|
-
|
|
5549
|
-
|
|
5776
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5777
|
+
decode: (_: BytesLike, _config?: {
|
|
5778
|
+
isExtraFieldIgnored?: boolean;
|
|
5779
|
+
} | undefined) => SubType;
|
|
5780
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5781
|
+
isExtraFieldIgnored?: boolean;
|
|
5782
|
+
} | undefined) => SubType;
|
|
5783
|
+
from: (_: SubTypeLike) => SubType;
|
|
5550
5784
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5551
5785
|
toBytes(): Bytes$1;
|
|
5552
5786
|
clone(): SubType_1;
|
|
@@ -5555,10 +5789,14 @@ declare const Since_base: (abstract new () => {
|
|
|
5555
5789
|
toHex(): Hex;
|
|
5556
5790
|
}) & {
|
|
5557
5791
|
byteLength?: number;
|
|
5558
|
-
encode(_: SubTypeLike_1)
|
|
5559
|
-
decode(_: BytesLike
|
|
5560
|
-
|
|
5561
|
-
|
|
5792
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5793
|
+
decode: (_: BytesLike, _config?: {
|
|
5794
|
+
isExtraFieldIgnored?: boolean;
|
|
5795
|
+
}) => SubType_1;
|
|
5796
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5797
|
+
isExtraFieldIgnored?: boolean;
|
|
5798
|
+
}) => SubType_1;
|
|
5799
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5562
5800
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5563
5801
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5564
5802
|
};
|
|
@@ -5575,11 +5813,9 @@ declare class Since extends Since_base {
|
|
|
5575
5813
|
/**
|
|
5576
5814
|
* Creates an instance of Since.
|
|
5577
5815
|
*
|
|
5578
|
-
* @param
|
|
5579
|
-
* @param metric - The metric of since
|
|
5580
|
-
* @param value - The value of since
|
|
5816
|
+
* @param num - The since representation value.
|
|
5581
5817
|
*/
|
|
5582
|
-
constructor(
|
|
5818
|
+
constructor({ relative, metric, value }: DecodedType<typeof SinceCodec>);
|
|
5583
5819
|
/**
|
|
5584
5820
|
* Clone a Since.
|
|
5585
5821
|
*
|
|
@@ -5627,6 +5863,16 @@ declare class Since extends Since_base {
|
|
|
5627
5863
|
*/
|
|
5628
5864
|
static fromNum(numLike: NumLike): Since;
|
|
5629
5865
|
}
|
|
5866
|
+
/**
|
|
5867
|
+
* @public
|
|
5868
|
+
*/
|
|
5869
|
+
declare const CellInputCodec: Codec<EncodableRecord<{
|
|
5870
|
+
since: typeof Since;
|
|
5871
|
+
previousOutput: typeof OutPoint;
|
|
5872
|
+
}>, DecodedRecord<{
|
|
5873
|
+
since: typeof Since;
|
|
5874
|
+
previousOutput: typeof OutPoint;
|
|
5875
|
+
}>>;
|
|
5630
5876
|
/**
|
|
5631
5877
|
* @public
|
|
5632
5878
|
*/
|
|
@@ -5647,10 +5893,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5647
5893
|
toHex(): Hex;
|
|
5648
5894
|
}) & {
|
|
5649
5895
|
byteLength?: number;
|
|
5650
|
-
encode(_: CellInputLike)
|
|
5651
|
-
decode(_: BytesLike
|
|
5652
|
-
|
|
5653
|
-
|
|
5896
|
+
encode: (_: CellInputLike) => Bytes$1;
|
|
5897
|
+
decode: (_: BytesLike, _config?: {
|
|
5898
|
+
isExtraFieldIgnored?: boolean;
|
|
5899
|
+
} | undefined) => CellInput;
|
|
5900
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5901
|
+
isExtraFieldIgnored?: boolean;
|
|
5902
|
+
} | undefined) => CellInput;
|
|
5903
|
+
from: (_: CellInputLike) => CellInput;
|
|
5654
5904
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5655
5905
|
toBytes(): Bytes$1;
|
|
5656
5906
|
clone(): SubType;
|
|
@@ -5659,10 +5909,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5659
5909
|
toHex(): Hex;
|
|
5660
5910
|
}) & {
|
|
5661
5911
|
byteLength?: number;
|
|
5662
|
-
encode(_: SubTypeLike)
|
|
5663
|
-
decode(_: BytesLike
|
|
5664
|
-
|
|
5665
|
-
|
|
5912
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5913
|
+
decode: (_: BytesLike, _config?: {
|
|
5914
|
+
isExtraFieldIgnored?: boolean;
|
|
5915
|
+
}) => SubType;
|
|
5916
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5917
|
+
isExtraFieldIgnored?: boolean;
|
|
5918
|
+
}) => SubType;
|
|
5919
|
+
from: (_: SubTypeLike) => SubType;
|
|
5666
5920
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5667
5921
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5668
5922
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5679,10 +5933,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5679
5933
|
toHex(): Hex;
|
|
5680
5934
|
}) & {
|
|
5681
5935
|
byteLength?: number;
|
|
5682
|
-
encode(_: SubTypeLike_1)
|
|
5683
|
-
decode(_: BytesLike
|
|
5684
|
-
|
|
5685
|
-
|
|
5936
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5937
|
+
decode: (_: BytesLike, _config?: {
|
|
5938
|
+
isExtraFieldIgnored?: boolean;
|
|
5939
|
+
} | undefined) => SubType_1;
|
|
5940
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5941
|
+
isExtraFieldIgnored?: boolean;
|
|
5942
|
+
} | undefined) => SubType_1;
|
|
5943
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5686
5944
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5687
5945
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5688
5946
|
};
|
|
@@ -5702,10 +5960,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5702
5960
|
toHex(): Hex;
|
|
5703
5961
|
}) & {
|
|
5704
5962
|
byteLength?: number;
|
|
5705
|
-
encode(_: SubTypeLike)
|
|
5706
|
-
decode(_: BytesLike
|
|
5707
|
-
|
|
5708
|
-
|
|
5963
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
5964
|
+
decode: (_: BytesLike, _config?: {
|
|
5965
|
+
isExtraFieldIgnored?: boolean;
|
|
5966
|
+
} | undefined) => SubType;
|
|
5967
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5968
|
+
isExtraFieldIgnored?: boolean;
|
|
5969
|
+
} | undefined) => SubType;
|
|
5970
|
+
from: (_: SubTypeLike) => SubType;
|
|
5709
5971
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5710
5972
|
toBytes(): Bytes$1;
|
|
5711
5973
|
clone(): SubType_1;
|
|
@@ -5714,10 +5976,14 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5714
5976
|
toHex(): Hex;
|
|
5715
5977
|
}) & {
|
|
5716
5978
|
byteLength?: number;
|
|
5717
|
-
encode(_: SubTypeLike_1)
|
|
5718
|
-
decode(_: BytesLike
|
|
5719
|
-
|
|
5720
|
-
|
|
5979
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
5980
|
+
decode: (_: BytesLike, _config?: {
|
|
5981
|
+
isExtraFieldIgnored?: boolean;
|
|
5982
|
+
}) => SubType_1;
|
|
5983
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
5984
|
+
isExtraFieldIgnored?: boolean;
|
|
5985
|
+
}) => SubType_1;
|
|
5986
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5721
5987
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5722
5988
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5723
5989
|
};
|
|
@@ -5730,8 +5996,8 @@ declare const CellInput_base: (abstract new () => {
|
|
|
5730
5996
|
declare class CellInput extends CellInput_base {
|
|
5731
5997
|
previousOutput: OutPoint;
|
|
5732
5998
|
since: Num;
|
|
5733
|
-
cellOutput?: CellOutput
|
|
5734
|
-
outputData?: Hex
|
|
5999
|
+
cellOutput?: CellOutput;
|
|
6000
|
+
outputData?: Hex;
|
|
5735
6001
|
/**
|
|
5736
6002
|
* Creates an instance of CellInput.
|
|
5737
6003
|
*
|
|
@@ -5740,7 +6006,10 @@ declare class CellInput extends CellInput_base {
|
|
|
5740
6006
|
* @param cellOutput - The optional cell output associated with the cell input.
|
|
5741
6007
|
* @param outputData - The optional output data associated with the cell input.
|
|
5742
6008
|
*/
|
|
5743
|
-
constructor(previousOutput
|
|
6009
|
+
constructor({ previousOutput, since, cellOutput, outputData }: DecodedType<typeof CellInputCodec> & {
|
|
6010
|
+
cellOutput?: CellOutput;
|
|
6011
|
+
outputData?: Hex;
|
|
6012
|
+
});
|
|
5744
6013
|
/**
|
|
5745
6014
|
* Creates a CellInput instance from a CellInputLike object.
|
|
5746
6015
|
*
|
|
@@ -5792,22 +6061,51 @@ declare const CellInputVec: Codec<CellInputLike[], CellInput[]>;
|
|
|
5792
6061
|
/**
|
|
5793
6062
|
* @public
|
|
5794
6063
|
*/
|
|
5795
|
-
|
|
5796
|
-
outPoint:
|
|
5797
|
-
depType: DepTypeLike
|
|
5798
|
-
}
|
|
6064
|
+
declare const CellDepCodec: Codec<EncodableRecord<{
|
|
6065
|
+
outPoint: typeof OutPoint;
|
|
6066
|
+
depType: Codec<DepTypeLike, DepType>;
|
|
6067
|
+
}>, DecodedRecord<{
|
|
6068
|
+
outPoint: typeof OutPoint;
|
|
6069
|
+
depType: Codec<DepTypeLike, DepType>;
|
|
6070
|
+
}>>;
|
|
6071
|
+
/**
|
|
6072
|
+
* @public
|
|
6073
|
+
*/
|
|
6074
|
+
type CellDepLike = EncodableType<typeof CellDepCodec>;
|
|
5799
6075
|
declare const CellDep_base: (abstract new () => {
|
|
5800
6076
|
toBytes(): Bytes$1;
|
|
5801
6077
|
clone(): CellDep;
|
|
5802
|
-
eq(other:
|
|
6078
|
+
eq(other: {} & {
|
|
6079
|
+
outPoint: {} & {
|
|
6080
|
+
txHash: BytesLike;
|
|
6081
|
+
index: NumLike;
|
|
6082
|
+
};
|
|
6083
|
+
depType: DepTypeLike;
|
|
6084
|
+
}): boolean;
|
|
5803
6085
|
hash(): Hex;
|
|
5804
6086
|
toHex(): Hex;
|
|
5805
6087
|
}) & {
|
|
5806
6088
|
byteLength?: number;
|
|
5807
|
-
encode(_:
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
6089
|
+
encode: (_: {} & {
|
|
6090
|
+
outPoint: {} & {
|
|
6091
|
+
txHash: BytesLike;
|
|
6092
|
+
index: NumLike;
|
|
6093
|
+
};
|
|
6094
|
+
depType: DepTypeLike;
|
|
6095
|
+
}) => Bytes$1;
|
|
6096
|
+
decode: (_: BytesLike, _config?: {
|
|
6097
|
+
isExtraFieldIgnored?: boolean;
|
|
6098
|
+
} | undefined) => CellDep;
|
|
6099
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6100
|
+
isExtraFieldIgnored?: boolean;
|
|
6101
|
+
} | undefined) => CellDep;
|
|
6102
|
+
from: (_: {} & {
|
|
6103
|
+
outPoint: {} & {
|
|
6104
|
+
txHash: BytesLike;
|
|
6105
|
+
index: NumLike;
|
|
6106
|
+
};
|
|
6107
|
+
depType: DepTypeLike;
|
|
6108
|
+
}) => CellDep;
|
|
5811
6109
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5812
6110
|
toBytes(): Bytes$1;
|
|
5813
6111
|
clone(): SubType;
|
|
@@ -5816,10 +6114,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5816
6114
|
toHex(): Hex;
|
|
5817
6115
|
}) & {
|
|
5818
6116
|
byteLength?: number;
|
|
5819
|
-
encode(_: SubTypeLike)
|
|
5820
|
-
decode(_: BytesLike
|
|
5821
|
-
|
|
5822
|
-
|
|
6117
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6118
|
+
decode: (_: BytesLike, _config?: {
|
|
6119
|
+
isExtraFieldIgnored?: boolean;
|
|
6120
|
+
}) => SubType;
|
|
6121
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6122
|
+
isExtraFieldIgnored?: boolean;
|
|
6123
|
+
}) => SubType;
|
|
6124
|
+
from: (_: SubTypeLike) => SubType;
|
|
5823
6125
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5824
6126
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5825
6127
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5836,10 +6138,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5836
6138
|
toHex(): Hex;
|
|
5837
6139
|
}) & {
|
|
5838
6140
|
byteLength?: number;
|
|
5839
|
-
encode(_: SubTypeLike_1)
|
|
5840
|
-
decode(_: BytesLike
|
|
5841
|
-
|
|
5842
|
-
|
|
6141
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6142
|
+
decode: (_: BytesLike, _config?: {
|
|
6143
|
+
isExtraFieldIgnored?: boolean;
|
|
6144
|
+
} | undefined) => SubType_1;
|
|
6145
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6146
|
+
isExtraFieldIgnored?: boolean;
|
|
6147
|
+
} | undefined) => SubType_1;
|
|
6148
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5843
6149
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5844
6150
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5845
6151
|
};
|
|
@@ -5859,10 +6165,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5859
6165
|
toHex(): Hex;
|
|
5860
6166
|
}) & {
|
|
5861
6167
|
byteLength?: number;
|
|
5862
|
-
encode(_: SubTypeLike)
|
|
5863
|
-
decode(_: BytesLike
|
|
5864
|
-
|
|
5865
|
-
|
|
6168
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6169
|
+
decode: (_: BytesLike, _config?: {
|
|
6170
|
+
isExtraFieldIgnored?: boolean;
|
|
6171
|
+
} | undefined) => SubType;
|
|
6172
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6173
|
+
isExtraFieldIgnored?: boolean;
|
|
6174
|
+
} | undefined) => SubType;
|
|
6175
|
+
from: (_: SubTypeLike) => SubType;
|
|
5866
6176
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
5867
6177
|
toBytes(): Bytes$1;
|
|
5868
6178
|
clone(): SubType_1;
|
|
@@ -5871,10 +6181,14 @@ declare const CellDep_base: (abstract new () => {
|
|
|
5871
6181
|
toHex(): Hex;
|
|
5872
6182
|
}) & {
|
|
5873
6183
|
byteLength?: number;
|
|
5874
|
-
encode(_: SubTypeLike_1)
|
|
5875
|
-
decode(_: BytesLike
|
|
5876
|
-
|
|
5877
|
-
|
|
6184
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6185
|
+
decode: (_: BytesLike, _config?: {
|
|
6186
|
+
isExtraFieldIgnored?: boolean;
|
|
6187
|
+
}) => SubType_1;
|
|
6188
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6189
|
+
isExtraFieldIgnored?: boolean;
|
|
6190
|
+
}) => SubType_1;
|
|
6191
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5878
6192
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5879
6193
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5880
6194
|
};
|
|
@@ -5893,22 +6207,7 @@ declare class CellDep extends CellDep_base {
|
|
|
5893
6207
|
* @param outPoint - The outpoint of the cell dependency.
|
|
5894
6208
|
* @param depType - The dependency type.
|
|
5895
6209
|
*/
|
|
5896
|
-
constructor(outPoint
|
|
5897
|
-
/**
|
|
5898
|
-
* Creates a CellDep instance from a CellDepLike object.
|
|
5899
|
-
*
|
|
5900
|
-
* @param cellDep - A CellDepLike object or an instance of CellDep.
|
|
5901
|
-
* @returns A CellDep instance.
|
|
5902
|
-
*
|
|
5903
|
-
* @example
|
|
5904
|
-
* ```typescript
|
|
5905
|
-
* const cellDep = CellDep.from({
|
|
5906
|
-
* outPoint: { txHash: "0x...", index: 0 },
|
|
5907
|
-
* depType: "depGroup"
|
|
5908
|
-
* });
|
|
5909
|
-
* ```
|
|
5910
|
-
*/
|
|
5911
|
-
static from(cellDep: CellDepLike): CellDep;
|
|
6210
|
+
constructor({ outPoint, depType }: DecodedType<typeof CellDepCodec>);
|
|
5912
6211
|
/**
|
|
5913
6212
|
* Clone a CellDep.
|
|
5914
6213
|
*
|
|
@@ -5921,27 +6220,57 @@ declare class CellDep extends CellDep_base {
|
|
|
5921
6220
|
*/
|
|
5922
6221
|
clone(): CellDep;
|
|
5923
6222
|
}
|
|
5924
|
-
declare const CellDepVec: Codec<
|
|
6223
|
+
declare const CellDepVec: Codec<({} & {
|
|
6224
|
+
outPoint: {} & {
|
|
6225
|
+
txHash: BytesLike;
|
|
6226
|
+
index: NumLike;
|
|
6227
|
+
};
|
|
6228
|
+
depType: DepTypeLike;
|
|
6229
|
+
})[], CellDep[]>;
|
|
5925
6230
|
/**
|
|
5926
6231
|
* @public
|
|
5927
6232
|
*/
|
|
5928
|
-
|
|
5929
|
-
lock
|
|
5930
|
-
inputType
|
|
5931
|
-
outputType
|
|
5932
|
-
}
|
|
6233
|
+
declare const WitnessArgsCodec: Codec<EncodableRecord<{
|
|
6234
|
+
lock: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6235
|
+
inputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6236
|
+
outputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6237
|
+
}>, DecodedRecord<{
|
|
6238
|
+
lock: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6239
|
+
inputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6240
|
+
outputType: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
|
|
6241
|
+
}>>;
|
|
6242
|
+
/**
|
|
6243
|
+
* @public
|
|
6244
|
+
*/
|
|
6245
|
+
type WitnessArgsLike = EncodableType<typeof WitnessArgsCodec>;
|
|
5933
6246
|
declare const WitnessArgs_base: (abstract new () => {
|
|
5934
6247
|
toBytes(): Bytes$1;
|
|
5935
6248
|
clone(): WitnessArgs;
|
|
5936
|
-
eq(other:
|
|
6249
|
+
eq(other: {
|
|
6250
|
+
lock?: BytesLike | null | undefined;
|
|
6251
|
+
inputType?: BytesLike | null | undefined;
|
|
6252
|
+
outputType?: BytesLike | null | undefined;
|
|
6253
|
+
} & {}): boolean;
|
|
5937
6254
|
hash(): Hex;
|
|
5938
6255
|
toHex(): Hex;
|
|
5939
6256
|
}) & {
|
|
5940
6257
|
byteLength?: number;
|
|
5941
|
-
encode(_:
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
6258
|
+
encode: (_: {
|
|
6259
|
+
lock?: BytesLike | null | undefined;
|
|
6260
|
+
inputType?: BytesLike | null | undefined;
|
|
6261
|
+
outputType?: BytesLike | null | undefined;
|
|
6262
|
+
} & {}) => Bytes$1;
|
|
6263
|
+
decode: (_: BytesLike, _config?: {
|
|
6264
|
+
isExtraFieldIgnored?: boolean;
|
|
6265
|
+
} | undefined) => WitnessArgs;
|
|
6266
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6267
|
+
isExtraFieldIgnored?: boolean;
|
|
6268
|
+
} | undefined) => WitnessArgs;
|
|
6269
|
+
from: (_: {
|
|
6270
|
+
lock?: BytesLike | null | undefined;
|
|
6271
|
+
inputType?: BytesLike | null | undefined;
|
|
6272
|
+
outputType?: BytesLike | null | undefined;
|
|
6273
|
+
} & {}) => WitnessArgs;
|
|
5945
6274
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
5946
6275
|
toBytes(): Bytes$1;
|
|
5947
6276
|
clone(): SubType;
|
|
@@ -5950,10 +6279,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
5950
6279
|
toHex(): Hex;
|
|
5951
6280
|
}) & {
|
|
5952
6281
|
byteLength?: number;
|
|
5953
|
-
encode(_: SubTypeLike)
|
|
5954
|
-
decode(_: BytesLike
|
|
5955
|
-
|
|
5956
|
-
|
|
6282
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6283
|
+
decode: (_: BytesLike, _config?: {
|
|
6284
|
+
isExtraFieldIgnored?: boolean;
|
|
6285
|
+
}) => SubType;
|
|
6286
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6287
|
+
isExtraFieldIgnored?: boolean;
|
|
6288
|
+
}) => SubType;
|
|
6289
|
+
from: (_: SubTypeLike) => SubType;
|
|
5957
6290
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5958
6291
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
5959
6292
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -5970,10 +6303,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
5970
6303
|
toHex(): Hex;
|
|
5971
6304
|
}) & {
|
|
5972
6305
|
byteLength?: number;
|
|
5973
|
-
encode(_: SubTypeLike_1)
|
|
5974
|
-
decode(_: BytesLike
|
|
5975
|
-
|
|
5976
|
-
|
|
6306
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6307
|
+
decode: (_: BytesLike, _config?: {
|
|
6308
|
+
isExtraFieldIgnored?: boolean;
|
|
6309
|
+
} | undefined) => SubType_1;
|
|
6310
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6311
|
+
isExtraFieldIgnored?: boolean;
|
|
6312
|
+
} | undefined) => SubType_1;
|
|
6313
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
5977
6314
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
5978
6315
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
5979
6316
|
};
|
|
@@ -5993,10 +6330,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
5993
6330
|
toHex(): Hex;
|
|
5994
6331
|
}) & {
|
|
5995
6332
|
byteLength?: number;
|
|
5996
|
-
encode(_: SubTypeLike)
|
|
5997
|
-
decode(_: BytesLike
|
|
5998
|
-
|
|
5999
|
-
|
|
6333
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6334
|
+
decode: (_: BytesLike, _config?: {
|
|
6335
|
+
isExtraFieldIgnored?: boolean;
|
|
6336
|
+
} | undefined) => SubType;
|
|
6337
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6338
|
+
isExtraFieldIgnored?: boolean;
|
|
6339
|
+
} | undefined) => SubType;
|
|
6340
|
+
from: (_: SubTypeLike) => SubType;
|
|
6000
6341
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
6001
6342
|
toBytes(): Bytes$1;
|
|
6002
6343
|
clone(): SubType_1;
|
|
@@ -6005,10 +6346,14 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
6005
6346
|
toHex(): Hex;
|
|
6006
6347
|
}) & {
|
|
6007
6348
|
byteLength?: number;
|
|
6008
|
-
encode(_: SubTypeLike_1)
|
|
6009
|
-
decode(_: BytesLike
|
|
6010
|
-
|
|
6011
|
-
|
|
6349
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6350
|
+
decode: (_: BytesLike, _config?: {
|
|
6351
|
+
isExtraFieldIgnored?: boolean;
|
|
6352
|
+
}) => SubType_1;
|
|
6353
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6354
|
+
isExtraFieldIgnored?: boolean;
|
|
6355
|
+
}) => SubType_1;
|
|
6356
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
6012
6357
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
6013
6358
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6014
6359
|
};
|
|
@@ -6019,9 +6364,9 @@ declare const WitnessArgs_base: (abstract new () => {
|
|
|
6019
6364
|
* @public
|
|
6020
6365
|
*/
|
|
6021
6366
|
declare class WitnessArgs extends WitnessArgs_base {
|
|
6022
|
-
lock?: Hex
|
|
6023
|
-
inputType?: Hex
|
|
6024
|
-
outputType?: Hex
|
|
6367
|
+
lock?: Hex;
|
|
6368
|
+
inputType?: Hex;
|
|
6369
|
+
outputType?: Hex;
|
|
6025
6370
|
/**
|
|
6026
6371
|
* Creates an instance of WitnessArgs.
|
|
6027
6372
|
*
|
|
@@ -6029,23 +6374,7 @@ declare class WitnessArgs extends WitnessArgs_base {
|
|
|
6029
6374
|
* @param inputType - The optional input type field of the witness.
|
|
6030
6375
|
* @param outputType - The optional output type field of the witness.
|
|
6031
6376
|
*/
|
|
6032
|
-
constructor(lock
|
|
6033
|
-
/**
|
|
6034
|
-
* Creates a WitnessArgs instance from a WitnessArgsLike object.
|
|
6035
|
-
*
|
|
6036
|
-
* @param witnessArgs - A WitnessArgsLike object or an instance of WitnessArgs.
|
|
6037
|
-
* @returns A WitnessArgs instance.
|
|
6038
|
-
*
|
|
6039
|
-
* @example
|
|
6040
|
-
* ```typescript
|
|
6041
|
-
* const witnessArgs = WitnessArgs.from({
|
|
6042
|
-
* lock: "0x...",
|
|
6043
|
-
* inputType: "0x...",
|
|
6044
|
-
* outputType: "0x..."
|
|
6045
|
-
* });
|
|
6046
|
-
* ```
|
|
6047
|
-
*/
|
|
6048
|
-
static from(witnessArgs: WitnessArgsLike): WitnessArgs;
|
|
6377
|
+
constructor({ lock, inputType, outputType }: DecodedType<typeof WitnessArgsCodec>);
|
|
6049
6378
|
}
|
|
6050
6379
|
/**
|
|
6051
6380
|
* Convert a bytes to a num.
|
|
@@ -6055,14 +6384,26 @@ declare class WitnessArgs extends WitnessArgs_base {
|
|
|
6055
6384
|
declare function udtBalanceFrom(dataLike: BytesLike): Num;
|
|
6056
6385
|
declare const RawTransaction: Codec<EncodableRecord<{
|
|
6057
6386
|
version: Codec<NumLike, number>;
|
|
6058
|
-
cellDeps: Codec<
|
|
6387
|
+
cellDeps: Codec<({} & {
|
|
6388
|
+
outPoint: {} & {
|
|
6389
|
+
txHash: BytesLike;
|
|
6390
|
+
index: NumLike;
|
|
6391
|
+
};
|
|
6392
|
+
depType: DepTypeLike;
|
|
6393
|
+
})[], CellDep[]>;
|
|
6059
6394
|
headerDeps: Codec<BytesLike[], `0x${string}`[]>;
|
|
6060
6395
|
inputs: Codec<CellInputLike[], CellInput[]>;
|
|
6061
6396
|
outputs: Codec<CellOutputLike[], CellOutput[]>;
|
|
6062
6397
|
outputsData: Codec<BytesLike[], `0x${string}`[]>;
|
|
6063
6398
|
}>, DecodedRecord<{
|
|
6064
6399
|
version: Codec<NumLike, number>;
|
|
6065
|
-
cellDeps: Codec<
|
|
6400
|
+
cellDeps: Codec<({} & {
|
|
6401
|
+
outPoint: {} & {
|
|
6402
|
+
txHash: BytesLike;
|
|
6403
|
+
index: NumLike;
|
|
6404
|
+
};
|
|
6405
|
+
depType: DepTypeLike;
|
|
6406
|
+
})[], CellDep[]>;
|
|
6066
6407
|
headerDeps: Codec<BytesLike[], `0x${string}`[]>;
|
|
6067
6408
|
inputs: Codec<CellInputLike[], CellInput[]>;
|
|
6068
6409
|
outputs: Codec<CellOutputLike[], CellOutput[]>;
|
|
@@ -6088,10 +6429,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6088
6429
|
toHex(): Hex;
|
|
6089
6430
|
}) & {
|
|
6090
6431
|
byteLength?: number;
|
|
6091
|
-
encode(_: TransactionLike)
|
|
6092
|
-
decode(_: BytesLike
|
|
6093
|
-
|
|
6094
|
-
|
|
6432
|
+
encode: (_: TransactionLike) => Bytes$1;
|
|
6433
|
+
decode: (_: BytesLike, _config?: {
|
|
6434
|
+
isExtraFieldIgnored?: boolean;
|
|
6435
|
+
} | undefined) => Transaction;
|
|
6436
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6437
|
+
isExtraFieldIgnored?: boolean;
|
|
6438
|
+
} | undefined) => Transaction;
|
|
6439
|
+
from: (_: TransactionLike) => Transaction;
|
|
6095
6440
|
Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
|
|
6096
6441
|
toBytes(): Bytes$1;
|
|
6097
6442
|
clone(): SubType;
|
|
@@ -6100,10 +6445,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6100
6445
|
toHex(): Hex;
|
|
6101
6446
|
}) & {
|
|
6102
6447
|
byteLength?: number;
|
|
6103
|
-
encode(_: SubTypeLike)
|
|
6104
|
-
decode(_: BytesLike
|
|
6105
|
-
|
|
6106
|
-
|
|
6448
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6449
|
+
decode: (_: BytesLike, _config?: {
|
|
6450
|
+
isExtraFieldIgnored?: boolean;
|
|
6451
|
+
}) => SubType;
|
|
6452
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6453
|
+
isExtraFieldIgnored?: boolean;
|
|
6454
|
+
}) => SubType;
|
|
6455
|
+
from: (_: SubTypeLike) => SubType;
|
|
6107
6456
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6108
6457
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
|
|
6109
6458
|
readonly inner: DecodedType<CodecType>;
|
|
@@ -6120,10 +6469,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6120
6469
|
toHex(): Hex;
|
|
6121
6470
|
}) & {
|
|
6122
6471
|
byteLength?: number;
|
|
6123
|
-
encode(_: SubTypeLike_1)
|
|
6124
|
-
decode(_: BytesLike
|
|
6125
|
-
|
|
6126
|
-
|
|
6472
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6473
|
+
decode: (_: BytesLike, _config?: {
|
|
6474
|
+
isExtraFieldIgnored?: boolean;
|
|
6475
|
+
} | undefined) => SubType_1;
|
|
6476
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6477
|
+
isExtraFieldIgnored?: boolean;
|
|
6478
|
+
} | undefined) => SubType_1;
|
|
6479
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
6127
6480
|
Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6128
6481
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
6129
6482
|
};
|
|
@@ -6143,10 +6496,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6143
6496
|
toHex(): Hex;
|
|
6144
6497
|
}) & {
|
|
6145
6498
|
byteLength?: number;
|
|
6146
|
-
encode(_: SubTypeLike)
|
|
6147
|
-
decode(_: BytesLike
|
|
6148
|
-
|
|
6149
|
-
|
|
6499
|
+
encode: (_: SubTypeLike) => Bytes$1;
|
|
6500
|
+
decode: (_: BytesLike, _config?: {
|
|
6501
|
+
isExtraFieldIgnored?: boolean;
|
|
6502
|
+
} | undefined) => SubType;
|
|
6503
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6504
|
+
isExtraFieldIgnored?: boolean;
|
|
6505
|
+
} | undefined) => SubType;
|
|
6506
|
+
from: (_: SubTypeLike) => SubType;
|
|
6150
6507
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
|
|
6151
6508
|
toBytes(): Bytes$1;
|
|
6152
6509
|
clone(): SubType_1;
|
|
@@ -6155,10 +6512,14 @@ declare const Transaction_base: (abstract new () => {
|
|
|
6155
6512
|
toHex(): Hex;
|
|
6156
6513
|
}) & {
|
|
6157
6514
|
byteLength?: number;
|
|
6158
|
-
encode(_: SubTypeLike_1)
|
|
6159
|
-
decode(_: BytesLike
|
|
6160
|
-
|
|
6161
|
-
|
|
6515
|
+
encode: (_: SubTypeLike_1) => Bytes$1;
|
|
6516
|
+
decode: (_: BytesLike, _config?: {
|
|
6517
|
+
isExtraFieldIgnored?: boolean;
|
|
6518
|
+
}) => SubType_1;
|
|
6519
|
+
fromBytes: (_bytes: BytesLike, _config?: {
|
|
6520
|
+
isExtraFieldIgnored?: boolean;
|
|
6521
|
+
}) => SubType_1;
|
|
6522
|
+
from: (_: SubTypeLike_1) => SubType_1;
|
|
6162
6523
|
Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
|
|
6163
6524
|
BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
|
|
6164
6525
|
};
|
|
@@ -6187,7 +6548,15 @@ declare class Transaction extends Transaction_base {
|
|
|
6187
6548
|
* @param outputsData - The data associated with the outputs.
|
|
6188
6549
|
* @param witnesses - The witnesses of the transaction.
|
|
6189
6550
|
*/
|
|
6190
|
-
constructor(version
|
|
6551
|
+
constructor({ version, cellDeps, headerDeps, inputs, outputs, outputsData, witnesses }: {
|
|
6552
|
+
version: Num;
|
|
6553
|
+
cellDeps: CellDep[];
|
|
6554
|
+
headerDeps: Hex[];
|
|
6555
|
+
inputs: CellInput[];
|
|
6556
|
+
outputs: CellOutput[];
|
|
6557
|
+
outputsData: Hex[];
|
|
6558
|
+
witnesses: Hex[];
|
|
6559
|
+
});
|
|
6191
6560
|
/**
|
|
6192
6561
|
* Creates a default Transaction instance with empty fields.
|
|
6193
6562
|
*
|
|
@@ -7622,5 +7991,5 @@ declare namespace advancedBarrel_d_exports {
|
|
|
7622
7991
|
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 };
|
|
7623
7992
|
}
|
|
7624
7993
|
//#endregion
|
|
7625
|
-
export { CellDep as $,
|
|
7626
|
-
//# sourceMappingURL=advancedBarrel-
|
|
7994
|
+
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 };
|
|
7995
|
+
//# sourceMappingURL=advancedBarrel-Dl0mM9JO.d.ts.map
|