@ckb-ccc/core 1.22.1 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/advanced.d.mts +1 -1
  3. package/dist/advanced.mjs +1 -1
  4. package/dist/{advancedBarrel-Daj_LJkz.d.mts → advancedBarrel-BBbQZ2OW.d.mts} +480 -379
  5. package/dist/advancedBarrel-BBbQZ2OW.d.mts.map +1 -0
  6. package/dist/advancedBarrel.d.mts +1 -1
  7. package/dist/advancedBarrel.mjs +1 -1
  8. package/dist/barrel-Dz1WLXRX.mjs +7 -0
  9. package/dist/barrel-Dz1WLXRX.mjs.map +1 -0
  10. package/dist/barrel.d.mts +2 -2
  11. package/dist/barrel.mjs +1 -1
  12. package/dist/index.d.mts +2 -2
  13. package/dist/index.mjs +1 -1
  14. package/dist/transformers-BHt442Nd.mjs +2 -0
  15. package/dist/transformers-BHt442Nd.mjs.map +1 -0
  16. package/dist.commonjs/advanced.d.ts +1 -1
  17. package/dist.commonjs/advanced.js +1 -1
  18. package/dist.commonjs/{advancedBarrel-CJL3rfuW.d.ts → advancedBarrel-BS4zFcFI.d.ts} +480 -379
  19. package/dist.commonjs/advancedBarrel-BS4zFcFI.d.ts.map +1 -0
  20. package/dist.commonjs/advancedBarrel.d.ts +1 -1
  21. package/dist.commonjs/advancedBarrel.js +1 -1
  22. package/dist.commonjs/{barrel--PaV2IZx.js → barrel-CZYID7jh.js} +10 -10
  23. package/dist.commonjs/barrel-CZYID7jh.js.map +1 -0
  24. package/dist.commonjs/barrel.d.ts +2 -2
  25. package/dist.commonjs/barrel.js +1 -1
  26. package/dist.commonjs/index.d.ts +2 -2
  27. package/dist.commonjs/index.js +1 -1
  28. package/dist.commonjs/transformers-CYUULrnt.js +2 -0
  29. package/dist.commonjs/transformers-CYUULrnt.js.map +1 -0
  30. package/package.json +1 -1
  31. package/src/address/index.ts +32 -4
  32. package/src/ckb/transaction.ts +59 -27
  33. package/src/client/cache/memory.advanced.ts +18 -3
  34. package/src/client/client.ts +41 -2
  35. package/src/client/clientPublicMainnet.ts +9 -2
  36. package/src/client/clientPublicTestnet.ts +9 -2
  37. package/src/client/jsonRpc/client.ts +7 -7
  38. package/src/codec/codec.ts +51 -27
  39. package/src/codec/entity.ts +26 -16
  40. package/src/molecule/codec.ts +437 -202
  41. package/dist/advancedBarrel-Daj_LJkz.d.mts.map +0 -1
  42. package/dist/barrel-pRBtHOAW.mjs +0 -7
  43. package/dist/barrel-pRBtHOAW.mjs.map +0 -1
  44. package/dist/transformers-lavDTtAW.mjs +0 -2
  45. package/dist/transformers-lavDTtAW.mjs.map +0 -1
  46. package/dist.commonjs/advancedBarrel-CJL3rfuW.d.ts.map +0 -1
  47. package/dist.commonjs/barrel--PaV2IZx.js.map +0 -1
  48. package/dist.commonjs/transformers-VBXQGQKe.js +0 -2
  49. package/dist.commonjs/transformers-VBXQGQKe.js.map +0 -1
@@ -216,13 +216,20 @@ declare class Address {
216
216
  /**
217
217
  * Creates an Address instance from an address string.
218
218
  *
219
- * @param address - The address string to parse.
220
- * @param clients - A Client instance or a record of Client instances keyed by prefix.
219
+ * @param address - The address string to parse. If it does not parse, a
220
+ * single Client's `addressResolver` may resolve it.
221
+ * @param client - The Client instance used to parse or resolve the address.
221
222
  * @returns A promise that resolves to an Address instance.
222
223
  *
223
- * @throws Will throw an error if the address prefix is unknown or mismatched.
224
+ * @throws Will throw an error if the address prefix is unknown or mismatched,
225
+ * or if the resolver handles the address but does not find it.
224
226
  */
225
- static fromString(address: string, clients: Client | Record<string, Client>): Promise<Address>;
227
+ static fromString(address: string, client: Client): Promise<Address>;
228
+ /**
229
+ * @deprecated Pass a single Client instead. Callers supporting multiple
230
+ * prefixes should try each Client themselves.
231
+ */
232
+ static fromString(address: string, clients: Record<string, Client>): Promise<Address>;
226
233
  /**
227
234
  * Creates an Address instance from a script and client.
228
235
  *
@@ -241,53 +248,66 @@ declare class Address {
241
248
  }
242
249
  //#endregion
243
250
  //#region src/codec/codec.d.ts
244
- type CodecLike<Encodable, Decoded = Encodable> = {
251
+ type CodecLike<Encodable, Decoded = Encodable, Context = any> = {
245
252
  readonly encode: (encodable: Encodable) => Bytes$1;
246
- readonly decode: (decodable: BytesLike, config?: {
247
- isExtraFieldIgnored?: boolean;
248
- }) => Decoded;
253
+ readonly decode: (decodable: BytesLike, context?: Context) => Decoded;
249
254
  readonly byteLength?: number;
250
255
  };
251
- declare class Codec<Encodable, Decoded = Encodable> {
256
+ declare class Codec<Encodable, Decoded = Encodable, Context = any> {
252
257
  readonly encode: (encodable: Encodable) => Bytes$1;
253
- readonly decode: (decodable: BytesLike, config?: {
254
- isExtraFieldIgnored?: boolean;
255
- }) => Decoded;
258
+ readonly decode: (decodable: BytesLike, context?: Context) => Decoded;
256
259
  readonly byteLength?: number | undefined;
257
- constructor(encode: (encodable: Encodable) => Bytes$1, decode: (decodable: BytesLike, config?: {
258
- isExtraFieldIgnored?: boolean;
259
- }) => Decoded, byteLength?: number | undefined);
260
+ constructor(encode: (encodable: Encodable) => Bytes$1, decode: (decodable: BytesLike, context?: Context) => Decoded, byteLength?: number | undefined);
260
261
  encodeOr<T>(encodable: Encodable, fallback: T): Bytes$1 | T;
261
- decodeOr<T>(decodable: BytesLike, fallback: T, config?: {
262
- isExtraFieldIgnored?: boolean;
263
- }): Decoded | T;
264
- static from<Encodable, Decoded = Encodable>({ encode, decode, byteLength }: CodecLike<Encodable, Decoded>): Codec<Encodable, Decoded>;
262
+ decodeOr<T>(decodable: BytesLike, fallback: T, context?: Context): Decoded | T;
263
+ static from<Encodable, Decoded = Encodable, Context = any>({ encode, decode, byteLength }: CodecLike<Encodable, Decoded, Context>): Codec<Encodable, Decoded, Context>;
265
264
  map<NewEncodable = Encodable, NewDecoded = Decoded>({ inMap, outMap }: {
266
265
  inMap?: (encodable: NewEncodable) => Encodable;
267
266
  outMap?: (decoded: Decoded) => NewDecoded;
268
- }): Codec<NewEncodable, NewDecoded>;
269
- mapIn<NewEncodable>(map: (encodable: NewEncodable) => Encodable): Codec<NewEncodable, Decoded>;
270
- mapOut<NewDecoded>(map: (decoded: Decoded) => NewDecoded): Codec<Encodable, NewDecoded>;
267
+ }): Codec<NewEncodable, NewDecoded, Context>;
268
+ mapIn<NewEncodable>(map: (encodable: NewEncodable) => Encodable): Codec<NewEncodable, Decoded, Context>;
269
+ mapOut<NewDecoded>(map: (decoded: Decoded) => NewDecoded): Codec<Encodable, NewDecoded, Context>;
271
270
  }
272
- type EncodableType<T extends CodecLike<any, any>> = T extends CodecLike<infer Encodable, unknown> ? Encodable : never;
273
- type DecodedType<T extends CodecLike<any, any>> = T extends CodecLike<any, infer Decoded> ? Decoded : never;
271
+ type EncodableType<T extends CodecLike<any, any, any>> = T extends CodecLike<infer Encodable, unknown, any> ? Encodable : never;
272
+ type DecodedType<T extends CodecLike<any, any, any>> = T extends CodecLike<any, infer Decoded, any> ? Decoded : never;
273
+ type IsAny<T> = 0 extends 1 & T ? true : false;
274
+ /**
275
+ * The context a codec specifically requires when composed with other codecs.
276
+ * Legacy `any` is normalized to `unknown`, while `Extract` preserves that the
277
+ * normalized type is assignable to the codec's original context.
278
+ */
279
+ type ContextType<T extends CodecLike<any, any, any>> = T extends {
280
+ readonly decode: (decodable: BytesLike, context?: infer Context) => unknown;
281
+ } ? Extract<IsAny<Context> extends true ? unknown : Context, Context> : unknown;
282
+ /**
283
+ * The combined context required by every codec in a record.
284
+ *
285
+ * Map each child context to a function parameter before forming the union so a
286
+ * legacy `any` (normalized to `unknown` by {@link ContextType}) cannot absorb
287
+ * the other contexts. Inferring from the resulting contravariant parameter
288
+ * position converts the function union into an intersection of its contexts.
289
+ */
290
+ type ChildContext<T extends Record<string, CodecLike<any, any, any>>> = { [K in keyof T]: (context: ContextType<T[K]>) => void; }[keyof T] extends ((context: infer Context) => void) ? Context : unknown;
274
291
  //#endregion
275
292
  //#region src/molecule/codec.d.ts
293
+ type TableDecodeContext = {
294
+ isExtraFieldIgnored?: boolean;
295
+ };
276
296
  /**
277
297
  * Vector with fixed size item codec
278
298
  * @param itemCodec fixed-size vector item codec
279
299
  */
280
- declare function fixedItemVec<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
300
+ declare function fixedItemVec<Encodable, Decoded, Context>(itemCodec: CodecLike<Encodable, Decoded, Context>): Codec<Array<Encodable>, Array<Decoded>, ContextType<typeof itemCodec>>;
281
301
  /**
282
302
  * Vector with dynamic size item codec, you can create a recursive vector with this function
283
303
  * @param itemCodec the vector item codec. It can be fixed-size or dynamic-size.
284
304
  */
285
- declare function dynItemVec<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
305
+ declare function dynItemVec<Encodable, Decoded, Context>(itemCodec: CodecLike<Encodable, Decoded, Context>): Codec<Array<Encodable>, Array<Decoded>, ContextType<typeof itemCodec>>;
286
306
  /**
287
307
  * General vector codec, if `itemCodec` is fixed size type, it will create a fixvec codec, otherwise a dynvec codec will be created.
288
308
  * @param itemCodec
289
309
  */
290
- declare function vector<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Decoded>): Codec<Array<Encodable>, Array<Decoded>>;
310
+ declare function vector<Encodable, Decoded, Context>(itemCodec: CodecLike<Encodable, Decoded, Context>): Codec<Array<Encodable>, Array<Decoded>, ContextType<typeof itemCodec>>;
291
311
  /**
292
312
  * Option is a dynamic-size type.
293
313
  * Serializing an option depends on whether it is empty or not:
@@ -295,40 +315,43 @@ declare function vector<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Deco
295
315
  * - if it's not empty, just serialize the inner item (the size is same as the inner item's size).
296
316
  * @param innerCodec
297
317
  */
298
- declare function option<Encodable, Decoded>(innerCodec: CodecLike<Encodable, Decoded>): Codec<Encodable | undefined | null, Decoded | undefined>;
318
+ declare function option<Encodable, Decoded, Context>(innerCodec: CodecLike<Encodable, Decoded, Context>): Codec<Encodable | undefined | null, Decoded | undefined, ContextType<typeof innerCodec>>;
299
319
  /**
300
320
  * Wrap the encoded value with a fixed-length buffer
301
321
  * @param codec
302
322
  */
303
- declare function byteVec<Encodable, Decoded>(codec: CodecLike<Encodable, Decoded>): Codec<Encodable, Decoded>;
304
- type EncodableRecordOptionalKeys<T extends Record<string, CodecLike<any, any>>> = { [K in keyof T]: Extract<EncodableType<T[K]>, undefined> extends never ? never : K; }[keyof T];
305
- type EncodableRecord<T extends Record<string, CodecLike<any, any>>> = { [key in keyof Pick<T, EncodableRecordOptionalKeys<T>>]+?: EncodableType<T[key]>; } & { [key in keyof Omit<T, EncodableRecordOptionalKeys<T>>]: EncodableType<T[key]>; };
306
- type DecodedRecordOptionalKeys<T extends Record<string, CodecLike<any, any>>> = { [K in keyof T]: Extract<DecodedType<T[K]>, undefined> extends never ? never : K; }[keyof T];
307
- type DecodedRecord<T extends Record<string, CodecLike<any, any>>> = { [key in keyof Pick<T, DecodedRecordOptionalKeys<T>>]+?: DecodedType<T[key]>; } & { [key in keyof Omit<T, DecodedRecordOptionalKeys<T>>]: DecodedType<T[key]>; };
323
+ declare function byteVec<Encodable, Decoded, Context>(codec: CodecLike<Encodable, Decoded, Context>): Codec<Encodable, Decoded, ContextType<typeof codec>>;
324
+ type EncodableRecordOptionalKeys<T extends Record<string, CodecLike<any, any, any>>> = { [K in keyof T]: Extract<EncodableType<T[K]>, undefined> extends never ? never : K; }[keyof T];
325
+ type EncodableRecord<T extends Record<string, CodecLike<any, any, any>>> = { [key in keyof Pick<T, EncodableRecordOptionalKeys<T>>]+?: EncodableType<T[key]>; } & { [key in keyof Omit<T, EncodableRecordOptionalKeys<T>>]: EncodableType<T[key]>; };
326
+ type DecodedRecordOptionalKeys<T extends Record<string, CodecLike<any, any, any>>> = { [K in keyof T]: Extract<DecodedType<T[K]>, undefined> extends never ? never : K; }[keyof T];
327
+ type DecodedRecord<T extends Record<string, CodecLike<any, any, any>>> = { [key in keyof Pick<T, DecodedRecordOptionalKeys<T>>]+?: DecodedType<T[key]>; } & { [key in keyof Omit<T, DecodedRecordOptionalKeys<T>>]: DecodedType<T[key]>; };
308
328
  /**
309
329
  * Table is a dynamic-size type. It can be considered as a dynvec but the length is fixed.
310
330
  * @param codecLayout
311
331
  */
312
- declare function table<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayout: T): Codec<Encodable, Decoded>;
313
- type UnionEncodable<T extends Record<string, CodecLike<any, any>>, K extends keyof T = keyof T> = K extends unknown ? {
332
+ declare function table<T extends Record<string, CodecLike<any, any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayout: T): Codec<Encodable, Decoded, ChildContext<T> & TableDecodeContext>;
333
+ type UnionEncodable<T extends Record<string, CodecLike<any, any, any>>, K extends keyof T = keyof T> = K extends unknown ? {
314
334
  type: K;
315
335
  value: EncodableType<T[K]>;
316
336
  } : never;
317
- type UnionDecoded<T extends Record<string, CodecLike<any, any>>, K extends keyof T = keyof T> = K extends unknown ? {
337
+ type UnionDecoded<T extends Record<string, CodecLike<any, any, any>>, K extends keyof T = keyof T> = K extends unknown ? {
318
338
  type: K;
319
339
  value: DecodedType<T[K]>;
320
340
  } : never;
321
- type UnionMatchHandlers<CodecType extends CodecLike<any, UnionDecoded<any, any>>, Result> = { [T in DecodedType<CodecType>["type"]]: (value: Extract<DecodedType<CodecType>, {
341
+ type UnionMatchHandlers<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, Result> = { [T in DecodedType<CodecType>["type"]]: (value: Extract<DecodedType<CodecType>, {
322
342
  type: T;
323
343
  }>["value"]) => Result; };
324
344
  /**
325
345
  * Constructs a union codec that can serialize and deserialize values tagged with a type identifier.
326
346
  *
327
- * If all variants have the same fixed size, the resulting union codec is fixed-size (header + payload).
328
- * Otherwise, it falls back to a dynamic-size codec.
347
+ * In accordance with the Molecule specification, `union` is always a dynamic-size type,
348
+ * regardless of whether its variants have identical fixed lengths.
349
+ *
350
+ * If you need a fixed-size union type compatible with fixed containers like `struct`,
351
+ * `array`, or `vector` (as FixVec), use {@link fixedUnion} instead.
329
352
  *
330
353
  * Serialization format:
331
- * 1. 4-byte little-endian unsigned integer for the variant index.
354
+ * 1. 4-byte little-endian unsigned integer for the variant ItemId (tag).
332
355
  * 2. Encoded bytes of the selected variant.
333
356
  *
334
357
  * @typeParam T
@@ -339,37 +362,57 @@ type UnionMatchHandlers<CodecType extends CodecLike<any, UnionDecoded<any, any>>
339
362
  * Optional mapping from variant names to custom numeric IDs. If omitted, the index
340
363
  * of each variant in `codecLayout` is used as its ID.
341
364
  *
342
- *
343
365
  * @example
344
- * // Dynamic union without custom numeric IDs
345
- * union({ cafe: Uint8, bee: Uint16 })
366
+ * // Union without custom numeric IDs
367
+ * union({ cafe: Uint8, bee: Uint16 });
368
+ *
369
+ * // Union with custom numeric IDs
370
+ * union({ cafe: Uint8, bee: Uint16 }, { cafe: 0xcafe, bee: 0xbee });
346
371
  *
347
- * // Dynamic union with custom numeric IDs
348
- * union({ cafe: Uint8, bee: Uint16 }, { cafe: 0xcafe, bee: 0xbee })
372
+ * // Fixed-size union (explicit extension):
373
+ * fixedUnion({ cafe: Uint16, bee: Uint16 });
374
+ */
375
+ declare function union<T extends Record<string, CodecLike<any, any, any>>>(codecLayout: T, fields?: Record<keyof T, number | undefined | null>): Codec<UnionEncodable<T> | {
376
+ inner: UnionEncodable<T>;
377
+ }, UnionDecoded<T>, ChildContext<T>>;
378
+ /**
379
+ * FixedUnion is a fixed-size union type where all variants must be fixed-size types of identical byte length.
380
+ * The total byteLength is `payloadByteLength + 4` (4-byte uint32 ItemId tag).
349
381
  *
350
- * // Fixed-size union without custom numeric IDs
351
- * const PaddedUint8 = struct({ data : u8, padding : u8 })
352
- * union({ cafe: PaddedUint8, bee: Uint16 });
382
+ * Compatibility note:
383
+ * `fixedUnion` is a CCC extension for scenarios requiring fixed memory layouts (such as embedding
384
+ * inside `mol.struct`, `mol.array`, or `mol.vector` as FixVec). While the standalone wire format
385
+ * (4-byte tag + variant payload) is binary-compatible with a union encoding, composing it into
386
+ * `struct`, `array`, or FixVec is not part of the standard upstream Molecule union schema specification.
353
387
  *
354
- * // Fixed-size union with custom numeric IDs
355
- * union({ cafe: PaddedUint8, bee: Uint16 }, { cafe: 0xcafe, bee: 0xbee })
388
+ * Migration guide:
389
+ * ```typescript
390
+ * // Preserve legacy equal-length union fixed container layout (FixVec):
391
+ * const Legacy = mol.vector(mol.fixedUnion(layout));
392
+ *
393
+ * // Use canonical Molecule union vector (DynVec):
394
+ * const Canonical = mol.vector(mol.union(layout));
395
+ * ```
396
+ *
397
+ * @param codecLayout an object mapping variant names to fixed-size codecs of identical byteLength
398
+ * @param fields optional mapping from variant names to custom numeric IDs
356
399
  */
357
- declare function union<T extends Record<string, CodecLike<any, any>>>(codecLayout: T, fields?: Record<keyof T, number | undefined | null>): Codec<UnionEncodable<T> | {
400
+ declare function fixedUnion<T extends Record<string, CodecLike<any, any, any>>>(codecLayout: T, fields?: Record<keyof T, number | undefined | null>): Codec<UnionEncodable<T> | {
358
401
  inner: UnionEncodable<T>;
359
- }, UnionDecoded<T>>;
402
+ }, UnionDecoded<T>, ChildContext<T>>;
360
403
  /**
361
404
  * Struct is a fixed-size type: all fields in struct are fixed-size and it has a fixed quantity of fields.
362
405
  * The size of a struct is the sum of all fields' size.
363
406
  * @param codecLayout a object contains all fields' codec
364
407
  */
365
- declare function struct<T extends Record<string, CodecLike<any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayout: T): Codec<Encodable, Decoded>;
408
+ declare function struct<T extends Record<string, CodecLike<any, any, any>>, Encodable extends EncodableRecord<T>, Decoded extends DecodedRecord<T>>(codecLayout: T): Codec<Encodable, Decoded, ChildContext<T>>;
366
409
  /**
367
410
  * The array is a fixed-size type: it has a fixed-size inner type and a fixed length.
368
411
  * The size of an array is the size of inner type times the length.
369
412
  * @param itemCodec the fixed-size array item codec
370
413
  * @param itemCount
371
414
  */
372
- declare function array<Encodable, Decoded>(itemCodec: CodecLike<Encodable, Decoded>, itemCount: number): Codec<Array<Encodable>, Array<Decoded>>;
415
+ declare function array<Encodable, Decoded, Context>(itemCodec: CodecLike<Encodable, Decoded, Context>, itemCount: number): Codec<Array<Encodable>, Array<Decoded>, ContextType<typeof itemCodec>>;
373
416
  //#endregion
374
417
  //#region src/num/index.d.ts
375
418
  /**
@@ -921,7 +964,7 @@ declare abstract class Entity {
921
964
  * This should be used with the {@link codec} decorator.
922
965
  * @public
923
966
  */
924
- static Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
967
+ static Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
925
968
  /**
926
969
  * Convert the entity to bytes
927
970
  * @public
@@ -974,19 +1017,21 @@ declare abstract class Entity {
974
1017
  * @public
975
1018
  * @static
976
1019
  * @param _ - The bytes to decode
1020
+ * @param _context - Optional context passed to the codec
977
1021
  * @returns The decoded entity
978
1022
  * @throws Will throw an error if the entity is not serializable
979
1023
  */
980
- decode(_: BytesLike): SubType;
1024
+ decode(_: BytesLike, _context?: Context): SubType;
981
1025
  /**
982
1026
  * Create an entity from bytes
983
1027
  * @public
984
1028
  * @static
985
1029
  * @param _ - The bytes to create the entity from
1030
+ * @param _context - Optional context passed to the codec
986
1031
  * @returns The created entity
987
1032
  * @throws Will throw an error if the entity is not serializable
988
1033
  */
989
- fromBytes(_bytes: BytesLike): SubType;
1034
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
990
1035
  /**
991
1036
  * Create an entity from a serializable object
992
1037
  * @public
@@ -996,13 +1041,13 @@ declare abstract class Entity {
996
1041
  * @throws Will throw an error if the entity is not serializable
997
1042
  */
998
1043
  from(_: SubTypeLike): SubType;
999
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
1044
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
1000
1045
  /**
1001
1046
  * Generate a base class of CCC to create a serializable Union instance.
1002
1047
  * This should be used with the {@link codec} decorator.
1003
1048
  * @public
1004
1049
  */
1005
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
1050
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
1006
1051
  readonly inner: DecodedType<CodecType>;
1007
1052
  /**
1008
1053
  * Match the union type with a set of handlers.
@@ -1074,19 +1119,21 @@ declare abstract class Entity {
1074
1119
  * @public
1075
1120
  * @static
1076
1121
  * @param _ - The bytes to decode
1122
+ * @param _context - Optional context passed to the codec
1077
1123
  * @returns The decoded entity
1078
1124
  * @throws Will throw an error if the entity is not serializable
1079
1125
  */
1080
- decode(_: BytesLike): SubType_1;
1126
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
1081
1127
  /**
1082
1128
  * Create an entity from bytes
1083
1129
  * @public
1084
1130
  * @static
1085
1131
  * @param _ - The bytes to create the entity from
1132
+ * @param _context - Optional context passed to the codec
1086
1133
  * @returns The created entity
1087
1134
  * @throws Will throw an error if the entity is not serializable
1088
1135
  */
1089
- fromBytes(_bytes: BytesLike): SubType_1;
1136
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
1090
1137
  /**
1091
1138
  * Create an entity from a serializable object
1092
1139
  * @public
@@ -1101,8 +1148,8 @@ declare abstract class Entity {
1101
1148
  * This should be used with the {@link codec} decorator.
1102
1149
  * @public
1103
1150
  */
1104
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
1105
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
1151
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
1152
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
1106
1153
  };
1107
1154
  };
1108
1155
  /**
@@ -1134,7 +1181,7 @@ declare abstract class Entity {
1134
1181
  * This should be used with the {@link codec} decorator.
1135
1182
  * @public
1136
1183
  */
1137
- static BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
1184
+ static BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
1138
1185
  readonly inner: DecodedType<CodecType>;
1139
1186
  /**
1140
1187
  * Match the union type with a set of handlers.
@@ -1206,19 +1253,21 @@ declare abstract class Entity {
1206
1253
  * @public
1207
1254
  * @static
1208
1255
  * @param _ - The bytes to decode
1256
+ * @param _context - Optional context passed to the codec
1209
1257
  * @returns The decoded entity
1210
1258
  * @throws Will throw an error if the entity is not serializable
1211
1259
  */
1212
- decode(_: BytesLike): SubType;
1260
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
1213
1261
  /**
1214
1262
  * Create an entity from bytes
1215
1263
  * @public
1216
1264
  * @static
1217
1265
  * @param _ - The bytes to create the entity from
1266
+ * @param _context - Optional context passed to the codec
1218
1267
  * @returns The created entity
1219
1268
  * @throws Will throw an error if the entity is not serializable
1220
1269
  */
1221
- fromBytes(_bytes: BytesLike): SubType;
1270
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
1222
1271
  /**
1223
1272
  * Create an entity from a serializable object
1224
1273
  * @public
@@ -1233,7 +1282,7 @@ declare abstract class Entity {
1233
1282
  * This should be used with the {@link codec} decorator.
1234
1283
  * @public
1235
1284
  */
1236
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
1285
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
1237
1286
  /**
1238
1287
  * Convert the entity to bytes
1239
1288
  * @public
@@ -1286,19 +1335,21 @@ declare abstract class Entity {
1286
1335
  * @public
1287
1336
  * @static
1288
1337
  * @param _ - The bytes to decode
1338
+ * @param _context - Optional context passed to the codec
1289
1339
  * @returns The decoded entity
1290
1340
  * @throws Will throw an error if the entity is not serializable
1291
1341
  */
1292
- decode(_: BytesLike): SubType_1;
1342
+ decode(_: BytesLike, _context?: Context): SubType_1;
1293
1343
  /**
1294
1344
  * Create an entity from bytes
1295
1345
  * @public
1296
1346
  * @static
1297
1347
  * @param _ - The bytes to create the entity from
1348
+ * @param _context - Optional context passed to the codec
1298
1349
  * @returns The created entity
1299
1350
  * @throws Will throw an error if the entity is not serializable
1300
1351
  */
1301
- fromBytes(_bytes: BytesLike): SubType_1;
1352
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
1302
1353
  /**
1303
1354
  * Create an entity from a serializable object
1304
1355
  * @public
@@ -1308,15 +1359,15 @@ declare abstract class Entity {
1308
1359
  * @throws Will throw an error if the entity is not serializable
1309
1360
  */
1310
1361
  from(_: SubTypeLike_1): SubType_1;
1311
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
1362
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
1312
1363
  /**
1313
1364
  * Generate a base class of CCC to create a serializable Union instance.
1314
1365
  * This should be used with the {@link codec} decorator.
1315
1366
  * @public
1316
1367
  */
1317
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
1368
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
1318
1369
  };
1319
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
1370
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
1320
1371
  };
1321
1372
  }
1322
1373
  /**
@@ -1335,18 +1386,16 @@ declare abstract class Entity {
1335
1386
  * }
1336
1387
  * ```
1337
1388
  */
1338
- declare function codec<Encodable, TypeLike extends Encodable, Decoded extends TypeLike>(codec: {
1389
+ declare function codec$1<Encodable, TypeLike extends Encodable, Decoded extends TypeLike, Context = any>(codec: {
1339
1390
  encode: (encodable: Encodable) => Bytes$1;
1340
- decode: (decodable: Bytes$1, config?: {
1341
- isExtraFieldIgnored?: boolean;
1342
- }) => Decoded;
1391
+ decode: (decodable: Bytes$1, context?: Context) => Decoded;
1343
1392
  byteLength?: number;
1344
1393
  }): <Type extends TypeLike, ConstructorType extends Constructor<Type> & {
1345
1394
  from(decoded: TypeLike): Type;
1346
1395
  byteLength?: number;
1347
1396
  encode(encodable: TypeLike): Bytes$1;
1348
- decode(bytesLike: BytesLike): Type;
1349
- fromBytes(bytes: BytesLike): Type;
1397
+ decode(bytesLike: BytesLike, context?: Context): Type;
1398
+ fromBytes(bytes: BytesLike, context?: Context): Type;
1350
1399
  }>(Constructor: ConstructorType, ..._: unknown[]) => ConstructorType;
1351
1400
  //#endregion
1352
1401
  //#region src/codec/predefined.d.ts
@@ -1370,25 +1419,25 @@ declare function codecUintNumber(byteLength: number, littleEndian?: boolean): Co
1370
1419
  declare function codecPadding(byteLength: number): Codec<void | undefined | null, void>;
1371
1420
  declare const CodecRaw: Codec<BytesLike, Bytes$1>;
1372
1421
  declare const CodecBytes: Codec<HexLike, Hex>;
1373
- declare const CodecUint8: Codec<NumLike, number>;
1374
- declare const CodecUint16LE: Codec<NumLike, number>;
1375
- declare const CodecUint16BE: Codec<NumLike, number>;
1376
- declare const CodecUint16: Codec<NumLike, number>;
1377
- declare const CodecUint32LE: Codec<NumLike, number>;
1378
- declare const CodecUint32BE: Codec<NumLike, number>;
1379
- declare const CodecUint32: Codec<NumLike, number>;
1380
- declare const CodecUint64LE: Codec<NumLike, bigint>;
1381
- declare const CodecUint64BE: Codec<NumLike, bigint>;
1382
- declare const CodecUint64: Codec<NumLike, bigint>;
1383
- declare const CodecUint128LE: Codec<NumLike, bigint>;
1384
- declare const CodecUint128BE: Codec<NumLike, bigint>;
1385
- declare const CodecUint128: Codec<NumLike, bigint>;
1386
- declare const CodecUint256LE: Codec<NumLike, bigint>;
1387
- declare const CodecUint256BE: Codec<NumLike, bigint>;
1388
- declare const CodecUint256: Codec<NumLike, bigint>;
1389
- declare const CodecUint512LE: Codec<NumLike, bigint>;
1390
- declare const CodecUint512BE: Codec<NumLike, bigint>;
1391
- declare const CodecUint512: Codec<NumLike, bigint>;
1422
+ declare const CodecUint8: Codec<NumLike, number, any>;
1423
+ declare const CodecUint16LE: Codec<NumLike, number, any>;
1424
+ declare const CodecUint16BE: Codec<NumLike, number, any>;
1425
+ declare const CodecUint16: Codec<NumLike, number, any>;
1426
+ declare const CodecUint32LE: Codec<NumLike, number, any>;
1427
+ declare const CodecUint32BE: Codec<NumLike, number, any>;
1428
+ declare const CodecUint32: Codec<NumLike, number, any>;
1429
+ declare const CodecUint64LE: Codec<NumLike, bigint, any>;
1430
+ declare const CodecUint64BE: Codec<NumLike, bigint, any>;
1431
+ declare const CodecUint64: Codec<NumLike, bigint, any>;
1432
+ declare const CodecUint128LE: Codec<NumLike, bigint, any>;
1433
+ declare const CodecUint128BE: Codec<NumLike, bigint, any>;
1434
+ declare const CodecUint128: Codec<NumLike, bigint, any>;
1435
+ declare const CodecUint256LE: Codec<NumLike, bigint, any>;
1436
+ declare const CodecUint256BE: Codec<NumLike, bigint, any>;
1437
+ declare const CodecUint256: Codec<NumLike, bigint, any>;
1438
+ declare const CodecUint512LE: Codec<NumLike, bigint, any>;
1439
+ declare const CodecUint512BE: Codec<NumLike, bigint, any>;
1440
+ declare const CodecUint512: Codec<NumLike, bigint, any>;
1392
1441
  declare const CodecBool: Codec<boolean>;
1393
1442
  declare const CodecByte: Codec<HexLike, Hex>;
1394
1443
  declare const CodecByte4: Codec<HexLike, Hex>;
@@ -1766,40 +1815,40 @@ declare function keystoreDecrypt(keystore: unknown, password: string): Promise<{
1766
1815
  }>;
1767
1816
  //#endregion
1768
1817
  //#region src/molecule/predefined.d.ts
1769
- declare const Uint8Opt: Codec<NumLike | null | undefined, number | undefined>;
1770
- declare const Uint8Vec: Codec<NumLike[], number[]>;
1771
- declare const Uint16Opt: Codec<NumLike | null | undefined, number | undefined>;
1772
- declare const Uint16Vec: Codec<NumLike[], number[]>;
1773
- declare const Uint32Opt: Codec<NumLike | null | undefined, number | undefined>;
1774
- declare const Uint32Vec: Codec<NumLike[], number[]>;
1775
- declare const Uint64Opt: Codec<NumLike | null | undefined, bigint | undefined>;
1776
- declare const Uint64Vec: Codec<NumLike[], bigint[]>;
1777
- declare const Uint128Opt: Codec<NumLike | null | undefined, bigint | undefined>;
1778
- declare const Uint128Vec: Codec<NumLike[], bigint[]>;
1779
- declare const Uint256Opt: Codec<NumLike | null | undefined, bigint | undefined>;
1780
- declare const Uint256Vec: Codec<NumLike[], bigint[]>;
1781
- declare const Uint512Opt: Codec<NumLike | null | undefined, bigint | undefined>;
1782
- declare const Uint512Vec: Codec<NumLike[], bigint[]>;
1818
+ declare const Uint8Opt: Codec<NumLike | null | undefined, number | undefined, unknown>;
1819
+ declare const Uint8Vec: Codec<NumLike[], number[], unknown>;
1820
+ declare const Uint16Opt: Codec<NumLike | null | undefined, number | undefined, unknown>;
1821
+ declare const Uint16Vec: Codec<NumLike[], number[], unknown>;
1822
+ declare const Uint32Opt: Codec<NumLike | null | undefined, number | undefined, unknown>;
1823
+ declare const Uint32Vec: Codec<NumLike[], number[], unknown>;
1824
+ declare const Uint64Opt: Codec<NumLike | null | undefined, bigint | undefined, unknown>;
1825
+ declare const Uint64Vec: Codec<NumLike[], bigint[], unknown>;
1826
+ declare const Uint128Opt: Codec<NumLike | null | undefined, bigint | undefined, unknown>;
1827
+ declare const Uint128Vec: Codec<NumLike[], bigint[], unknown>;
1828
+ declare const Uint256Opt: Codec<NumLike | null | undefined, bigint | undefined, unknown>;
1829
+ declare const Uint256Vec: Codec<NumLike[], bigint[], unknown>;
1830
+ declare const Uint512Opt: Codec<NumLike | null | undefined, bigint | undefined, unknown>;
1831
+ declare const Uint512Vec: Codec<NumLike[], bigint[], unknown>;
1783
1832
  declare const Bytes: Codec<HexLike, Hex>;
1784
- declare const BytesOpt: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
1785
- declare const BytesVec: Codec<BytesLike[], `0x${string}`[]>;
1786
- declare const BoolOpt: Codec<boolean | null | undefined, boolean | undefined>;
1787
- declare const BoolVec: Codec<boolean[], boolean[]>;
1788
- declare const ByteOpt: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
1789
- declare const ByteVec: Codec<BytesLike[], `0x${string}`[]>;
1790
- declare const Byte4Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
1791
- declare const Byte4Vec: Codec<BytesLike[], `0x${string}`[]>;
1792
- declare const Byte8Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
1793
- declare const Byte8Vec: Codec<BytesLike[], `0x${string}`[]>;
1794
- declare const Byte16Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
1795
- declare const Byte16Vec: Codec<BytesLike[], `0x${string}`[]>;
1796
- declare const Byte32Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined>;
1797
- declare const Byte32Vec: Codec<BytesLike[], `0x${string}`[]>;
1798
- declare const String: Codec<string, string>;
1799
- declare const StringVec: Codec<string[], string[]>;
1800
- declare const StringOpt: Codec<string | null | undefined, string | undefined>;
1833
+ declare const BytesOpt: Codec<BytesLike | null | undefined, `0x${string}` | undefined, unknown>;
1834
+ declare const BytesVec: Codec<BytesLike[], `0x${string}`[], unknown>;
1835
+ declare const BoolOpt: Codec<boolean | null | undefined, boolean | undefined, unknown>;
1836
+ declare const BoolVec: Codec<boolean[], boolean[], unknown>;
1837
+ declare const ByteOpt: Codec<BytesLike | null | undefined, `0x${string}` | undefined, unknown>;
1838
+ declare const ByteVec: Codec<BytesLike[], `0x${string}`[], unknown>;
1839
+ declare const Byte4Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined, unknown>;
1840
+ declare const Byte4Vec: Codec<BytesLike[], `0x${string}`[], unknown>;
1841
+ declare const Byte8Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined, unknown>;
1842
+ declare const Byte8Vec: Codec<BytesLike[], `0x${string}`[], unknown>;
1843
+ declare const Byte16Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined, unknown>;
1844
+ declare const Byte16Vec: Codec<BytesLike[], `0x${string}`[], unknown>;
1845
+ declare const Byte32Opt: Codec<BytesLike | null | undefined, `0x${string}` | undefined, unknown>;
1846
+ declare const Byte32Vec: Codec<BytesLike[], `0x${string}`[], unknown>;
1847
+ declare const String: Codec<string, string, unknown>;
1848
+ declare const StringVec: Codec<string[], string[], unknown>;
1849
+ declare const StringOpt: Codec<string | null | undefined, string | undefined, unknown>;
1801
1850
  declare namespace barrel_d_exports$1 {
1802
- export { CodecBool as Bool, BoolOpt, BoolVec, CodecByte as Byte, CodecByte16 as Byte16, Byte16Opt, Byte16Vec, CodecByte32 as Byte32, Byte32Opt, Byte32Vec, CodecByte4 as Byte4, Byte4Opt, Byte4Vec, CodecByte8 as Byte8, Byte8Opt, Byte8Vec, ByteOpt, ByteVec, Bytes, BytesOpt, BytesVec, Codec, CodecLike, DecodedRecord, DecodedRecordOptionalKeys, DecodedType, EncodableRecord, EncodableRecordOptionalKeys, EncodableType, Entity, String, StringOpt, StringVec, CodecUint128 as Uint128, CodecUint128BE as Uint128BE, CodecUint128LE as Uint128LE, Uint128Opt, Uint128Vec, CodecUint16 as Uint16, CodecUint16BE as Uint16BE, CodecUint16LE as Uint16LE, Uint16Opt, Uint16Vec, CodecUint256 as Uint256, CodecUint256BE as Uint256BE, CodecUint256LE as Uint256LE, Uint256Opt, Uint256Vec, CodecUint32 as Uint32, CodecUint32BE as Uint32BE, CodecUint32LE as Uint32LE, Uint32Opt, Uint32Vec, CodecUint512 as Uint512, CodecUint512BE as Uint512BE, CodecUint512LE as Uint512LE, Uint512Opt, Uint512Vec, CodecUint64 as Uint64, CodecUint64BE as Uint64BE, CodecUint64LE as Uint64LE, Uint64Opt, Uint64Vec, CodecUint8 as Uint8, Uint8Opt, Uint8Vec, UnionDecoded, UnionEncodable, UnionMatchHandlers, array, byteVec, codec, dynItemVec, fixedItemVec, option, struct, table, codecUint as uint, codecUintNumber as uintNumber, union, vector };
1851
+ export { CodecBool as Bool, BoolOpt, BoolVec, CodecByte as Byte, CodecByte16 as Byte16, Byte16Opt, Byte16Vec, CodecByte32 as Byte32, Byte32Opt, Byte32Vec, CodecByte4 as Byte4, Byte4Opt, Byte4Vec, CodecByte8 as Byte8, Byte8Opt, Byte8Vec, ByteOpt, ByteVec, Bytes, BytesOpt, BytesVec, Codec, CodecLike, DecodedRecord, DecodedRecordOptionalKeys, DecodedType, EncodableRecord, EncodableRecordOptionalKeys, EncodableType, Entity, String, StringOpt, StringVec, TableDecodeContext, CodecUint128 as Uint128, CodecUint128BE as Uint128BE, CodecUint128LE as Uint128LE, Uint128Opt, Uint128Vec, CodecUint16 as Uint16, CodecUint16BE as Uint16BE, CodecUint16LE as Uint16LE, Uint16Opt, Uint16Vec, CodecUint256 as Uint256, CodecUint256BE as Uint256BE, CodecUint256LE as Uint256LE, Uint256Opt, Uint256Vec, CodecUint32 as Uint32, CodecUint32BE as Uint32BE, CodecUint32LE as Uint32LE, Uint32Opt, Uint32Vec, CodecUint512 as Uint512, CodecUint512BE as Uint512BE, CodecUint512LE as Uint512LE, Uint512Opt, Uint512Vec, CodecUint64 as Uint64, CodecUint64BE as Uint64BE, CodecUint64LE as Uint64LE, Uint64Opt, Uint64Vec, CodecUint8 as Uint8, Uint8Opt, Uint8Vec, UnionDecoded, UnionEncodable, UnionMatchHandlers, array, byteVec, codec$1 as codec, dynItemVec, fixedItemVec, fixedUnion, option, struct, table, codecUint as uint, codecUintNumber as uintNumber, union, vector };
1803
1852
  }
1804
1853
  //#endregion
1805
1854
  //#region src/signer/btc/psbt.d.ts
@@ -2559,10 +2608,10 @@ declare const MultisigCkbWitness_base: (abstract new () => {
2559
2608
  }) & {
2560
2609
  byteLength?: number;
2561
2610
  encode(_: MultisigCkbWitnessLike): Bytes$1;
2562
- decode(_: BytesLike): MultisigCkbWitness;
2563
- fromBytes(_bytes: BytesLike): MultisigCkbWitness;
2611
+ decode(_: BytesLike, _context?: any): MultisigCkbWitness;
2612
+ fromBytes(_bytes: BytesLike, _context?: any): MultisigCkbWitness;
2564
2613
  from(_: MultisigCkbWitnessLike): MultisigCkbWitness;
2565
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
2614
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
2566
2615
  toBytes(): Bytes$1;
2567
2616
  clone(): SubType;
2568
2617
  eq(other: SubTypeLike): boolean;
@@ -2571,11 +2620,11 @@ declare const MultisigCkbWitness_base: (abstract new () => {
2571
2620
  }) & {
2572
2621
  byteLength?: number;
2573
2622
  encode(_: SubTypeLike): Bytes$1;
2574
- decode(_: BytesLike): SubType;
2575
- fromBytes(_bytes: BytesLike): SubType;
2623
+ decode(_: BytesLike, _context?: Context): SubType;
2624
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
2576
2625
  from(_: SubTypeLike): SubType;
2577
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
2578
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
2626
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
2627
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
2579
2628
  readonly inner: DecodedType<CodecType>;
2580
2629
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
2581
2630
  _?: undefined | null;
@@ -2591,14 +2640,14 @@ declare const MultisigCkbWitness_base: (abstract new () => {
2591
2640
  }) & {
2592
2641
  byteLength?: number;
2593
2642
  encode(_: SubTypeLike_1): Bytes$1;
2594
- decode(_: BytesLike): SubType_1;
2595
- fromBytes(_bytes: BytesLike): SubType_1;
2643
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
2644
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
2596
2645
  from(_: SubTypeLike_1): SubType_1;
2597
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
2598
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
2646
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
2647
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
2599
2648
  };
2600
2649
  };
2601
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
2650
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
2602
2651
  readonly inner: DecodedType<CodecType>;
2603
2652
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
2604
2653
  _?: undefined | null;
@@ -2614,10 +2663,10 @@ declare const MultisigCkbWitness_base: (abstract new () => {
2614
2663
  }) & {
2615
2664
  byteLength?: number;
2616
2665
  encode(_: SubTypeLike): Bytes$1;
2617
- decode(_: BytesLike): SubType;
2618
- fromBytes(_bytes: BytesLike): SubType;
2666
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
2667
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
2619
2668
  from(_: SubTypeLike): SubType;
2620
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
2669
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
2621
2670
  toBytes(): Bytes$1;
2622
2671
  clone(): SubType_1;
2623
2672
  eq(other: SubTypeLike_1): boolean;
@@ -2626,13 +2675,13 @@ declare const MultisigCkbWitness_base: (abstract new () => {
2626
2675
  }) & {
2627
2676
  byteLength?: number;
2628
2677
  encode(_: SubTypeLike_1): Bytes$1;
2629
- decode(_: BytesLike): SubType_1;
2630
- fromBytes(_bytes: BytesLike): SubType_1;
2678
+ decode(_: BytesLike, _context?: Context): SubType_1;
2679
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
2631
2680
  from(_: SubTypeLike_1): SubType_1;
2632
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
2633
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
2681
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
2682
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
2634
2683
  };
2635
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
2684
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
2636
2685
  };
2637
2686
  };
2638
2687
  /**
@@ -3393,7 +3442,7 @@ declare function buildNostrEventFromMessage(message: string | BytesLike): NostrE
3393
3442
  declare function nostrEventHash(event: NostrEvent): Bytes$1;
3394
3443
  declare function verifyMessageNostrEvent(message: string | BytesLike, signature: string, address: string): boolean;
3395
3444
  declare namespace barrel_d_exports {
3396
- export { AbstractConstructor, Address, AddressLike, Bytes$1 as Bytes, BytesLike, Cell, CellAny, CellAnyLike, CellDep, CellDepInfo, CellDepInfoLike, CellDepLike, CellDepVec, CellInput, CellInputLike, CellInputVec, CellLike, CellOutput, CellOutputLike, CellOutputVec, Client, ClientBlock, ClientBlockHeader, ClientBlockHeaderLike, ClientBlockLike, ClientBlockUncle, ClientBlockUncleLike, ClientCache, ClientCacheMemory, ClientConfig, ClientFindCellsResponse, ClientFindTransactionsGroupedResponse, ClientFindTransactionsResponse, ClientIndexerSearchKey, ClientIndexerSearchKeyFilter, ClientIndexerSearchKeyFilterLike, ClientIndexerSearchKeyLike, ClientIndexerSearchKeyTransaction, ClientIndexerSearchKeyTransactionLike, ClientJsonRpc, ClientJsonRpcConfig, ClientPublicMainnet, ClientPublicTestnet, ClientTransactionResponse, ClientTransactionResponseLike, Codec, CodecBool, CodecByte, CodecByte16, CodecByte32, CodecByte4, CodecByte8, CodecBytes, CodecLike, CodecRaw, CodecUint128, CodecUint128BE, CodecUint128LE, CodecUint16, CodecUint16BE, CodecUint16LE, CodecUint256, CodecUint256BE, CodecUint256LE, CodecUint32, CodecUint32BE, CodecUint32LE, CodecUint512, CodecUint512BE, CodecUint512LE, CodecUint64, CodecUint64BE, CodecUint64LE, CodecUint8, Constructor, DecodedType, DepType, DepTypeCodec, DepTypeLike, EncodableType, Entity, Epoch, EpochLike, ErrorClientBase, ErrorClientBaseLike, ErrorClientDuplicatedTransaction, ErrorClientMaxFeeRateExceeded, ErrorClientRBFRejected, ErrorClientResolveUnknown, ErrorClientVerification, ErrorClientWaitTransactionTimeout, ErrorTransactionInsufficientCapacity, ErrorTransactionInsufficientCoin, FixedPoint, FixedPointLike, HASH_CKB_LENGTH, HASH_CKB_SHORT_LENGTH, HashType, HashTypeCodec, HashTypeLike, Hasher, HasherCkb, HasherKeecak256, Hex, HexLike, InputToSign, InputToSignLike, JsonRpcError, JsonRpcErrorLike, JsonRpcId, JsonRpcPayload, JsonRpcResponse, JsonRpcTransport, JsonRpcTransportFallback, JsonRpcTransportHttp, JsonRpcTransportRequestOptions, JsonRpcTransportWebSocket, KnownScript, LumosTransactionSkeletonType, MultisigCkbWitness, MultisigCkbWitnessLike, NetworkPreference, NostrEvent, Num, NumLike, One, OutPoint, OutPointLike, OutputsValidator, Owner, OwnerAggregated, OwnerMoved, OwnerRefCount, OwnerUnique, Proxy, RawTransaction, RequestorJsonRpc, RequestorJsonRpcConfig, RetryOperationOptions, RetryOptions, RetryResult, SECP256K1_SIGNATURE_LENGTH, Script, ScriptInfo, ScriptInfoLike, ScriptLike, ScriptOpt, ScriptVec, SignPsbtOptions, SignPsbtOptionsLike, Signature, Signer, SignerAlwaysError, SignerBtc, SignerBtcPublicKeyReadonly, SignerCkbAlwaysSuccess, SignerCkbPrivateKey, SignerCkbPublicKey, SignerCkbScriptReadonly, SignerDoge, SignerDogeAddressReadonly, SignerDogePrivateKey, SignerDummy, SignerEvm, SignerEvmAddressReadonly, SignerInfo, SignerJsonRpc, SignerJsonRpcConfig, SignerJsonRpcConfirmation, SignerJsonRpcErrorCode, SignerJsonRpcProviderSession, SignerJsonRpcProviderSessionConfig, SignerJsonRpcProviderSessionOptions, SignerJsonRpcResultRecord, SignerMultisig, SignerMultisigCkbPrivateKey, SignerMultisigCkbReadonly, SignerMultisigNotEnoughSignaturesError, SignerNostr, SignerNostrPrivateKey, SignerNostrPublicKeyReadonly, SignerOpenLink, SignerSignType, SignerType, Since, SinceLike, Transaction, TransactionLike, TransactionStatus, Wallet, WitnessArgs, WitnessArgsLike, Zero, abortSignalAny, abortSignalToPromise, apply, btcEcdsaPublicKeyHash, btcP2pkhAddressFromPublicKey, btcPublicKeyFromP2pkhAddress, btcVarLengthBytesFrom, buildNostrEventFromMessage, bytesConcat, bytesConcatTo, bytesEq, bytesFrom, bytesLen, bytesLenUnsafe, bytesTo, calcDaoClaimEpoch, calcDaoProfit, codec, codecPadding, codecUint, codecUintNumber, depTypeFrom, depTypeFromBytes, depTypeToBytes, epochFrom, epochFromHex, epochToHex, fixedPointFrom, fixedPointToString, gcd, hashCkb, hashCkbShort, hashTypeFrom, hashTypeFromBytes, hashTypeId, hashTypeToBytes, hexFrom, isDaoOutputLimitExceeded, isWebview, keystoreDecrypt, keystoreEncrypt, messageHashBtcEcdsa, messageHashCkbSecp256k1, messageHashDogeEcdsa, barrel_d_exports$1 as mol, nostrEventHash, numBeFromBytes, numBeToBytes, numFrom, numFromBytes, numLeFromBytes, numLeToBytes, numMax, numMin, numToBytes, numToHex, recoverMessageSecp256k1, reduceAsync, retry, signMessageSecp256k1, sleep, stringify, udtBalanceFrom, verifyMessageBtcEcdsa, verifyMessageCkbSecp256k1, verifyMessageDogeEcdsa, verifyMessageEvmPersonal, verifyMessageJoyId, verifyMessageNostrEvent, verifyMessageSecp256k1, waitForAvailability };
3445
+ export { AbstractConstructor, Address, AddressLike, AddressResolver, Bytes$1 as Bytes, BytesLike, Cell, CellAny, CellAnyLike, CellDep, CellDepInfo, CellDepInfoLike, CellDepLike, CellDepVec, CellInput, CellInputLike, CellInputVec, CellLike, CellOutput, CellOutputLike, CellOutputVec, ChildContext, 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, ContextType, 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$1 as 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 };
3397
3446
  }
3398
3447
  //#endregion
3399
3448
  //#region src/client/clientTypes.advanced.d.ts
@@ -3783,10 +3832,10 @@ declare const Epoch_base: (abstract new () => {
3783
3832
  }) & {
3784
3833
  byteLength?: number;
3785
3834
  encode(_: EpochLike): Bytes$1;
3786
- decode(_: BytesLike): Epoch;
3787
- fromBytes(_bytes: BytesLike): Epoch;
3835
+ decode(_: BytesLike, _context?: any): Epoch;
3836
+ fromBytes(_bytes: BytesLike, _context?: any): Epoch;
3788
3837
  from(_: EpochLike): Epoch;
3789
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
3838
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
3790
3839
  toBytes(): Bytes$1;
3791
3840
  clone(): SubType;
3792
3841
  eq(other: SubTypeLike): boolean;
@@ -3795,11 +3844,11 @@ declare const Epoch_base: (abstract new () => {
3795
3844
  }) & {
3796
3845
  byteLength?: number;
3797
3846
  encode(_: SubTypeLike): Bytes$1;
3798
- decode(_: BytesLike): SubType;
3799
- fromBytes(_bytes: BytesLike): SubType;
3847
+ decode(_: BytesLike, _context?: Context): SubType;
3848
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
3800
3849
  from(_: SubTypeLike): SubType;
3801
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
3802
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
3850
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
3851
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
3803
3852
  readonly inner: DecodedType<CodecType>;
3804
3853
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
3805
3854
  _?: undefined | null;
@@ -3815,14 +3864,14 @@ declare const Epoch_base: (abstract new () => {
3815
3864
  }) & {
3816
3865
  byteLength?: number;
3817
3866
  encode(_: SubTypeLike_1): Bytes$1;
3818
- decode(_: BytesLike): SubType_1;
3819
- fromBytes(_bytes: BytesLike): SubType_1;
3867
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
3868
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
3820
3869
  from(_: SubTypeLike_1): SubType_1;
3821
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
3822
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
3870
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
3871
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
3823
3872
  };
3824
3873
  };
3825
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
3874
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
3826
3875
  readonly inner: DecodedType<CodecType>;
3827
3876
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
3828
3877
  _?: undefined | null;
@@ -3838,10 +3887,10 @@ declare const Epoch_base: (abstract new () => {
3838
3887
  }) & {
3839
3888
  byteLength?: number;
3840
3889
  encode(_: SubTypeLike): Bytes$1;
3841
- decode(_: BytesLike): SubType;
3842
- fromBytes(_bytes: BytesLike): SubType;
3890
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
3891
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
3843
3892
  from(_: SubTypeLike): SubType;
3844
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
3893
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
3845
3894
  toBytes(): Bytes$1;
3846
3895
  clone(): SubType_1;
3847
3896
  eq(other: SubTypeLike_1): boolean;
@@ -3850,13 +3899,13 @@ declare const Epoch_base: (abstract new () => {
3850
3899
  }) & {
3851
3900
  byteLength?: number;
3852
3901
  encode(_: SubTypeLike_1): Bytes$1;
3853
- decode(_: BytesLike): SubType_1;
3854
- fromBytes(_bytes: BytesLike): SubType_1;
3902
+ decode(_: BytesLike, _context?: Context): SubType_1;
3903
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
3855
3904
  from(_: SubTypeLike_1): SubType_1;
3856
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
3857
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
3905
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
3906
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
3858
3907
  };
3859
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
3908
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
3860
3909
  };
3861
3910
  };
3862
3911
  /**
@@ -4147,9 +4196,22 @@ declare enum KnownScript {
4147
4196
  }
4148
4197
  //#endregion
4149
4198
  //#region src/client/client.d.ts
4199
+ /**
4200
+ * Resolves address representations that `Address.fromString` cannot parse,
4201
+ * such as human-readable names, to scripts.
4202
+ *
4203
+ * @public
4204
+ */
4205
+ interface AddressResolver {
4206
+ /** Whether this resolver handles the representation. */
4207
+ shouldResolve(address: string): boolean;
4208
+ /** The script it points to, or `undefined` if it is not found. */
4209
+ resolve(address: string, client: Client): Promise<ScriptLike | undefined>;
4210
+ }
4150
4211
  type ClientConfig = {
4151
4212
  cache?: ClientCache;
4152
4213
  scripts?: Partial<Record<KnownScript, ScriptInfoLike>>;
4214
+ addressResolver?: AddressResolver;
4153
4215
  };
4154
4216
  /**
4155
4217
  * @public
@@ -4157,6 +4219,7 @@ type ClientConfig = {
4157
4219
  declare abstract class Client {
4158
4220
  cache: ClientCache;
4159
4221
  private readonly scripts;
4222
+ readonly addressResolver?: AddressResolver;
4160
4223
  constructor(config?: ClientConfig);
4161
4224
  /**
4162
4225
  * The legacy primary URL associated with this Client.
@@ -4240,7 +4303,7 @@ declare abstract class Client {
4240
4303
  /**
4241
4304
  * Get the header of the latest block.
4242
4305
  *
4243
- * @param verbosity - Verbosity level (0 for hex, 1 for object).
4306
+ * @param verbosity - Deprecated; this parameter has no effect.
4244
4307
  * @returns The tip block header.
4245
4308
  *
4246
4309
  * @example
@@ -4254,15 +4317,49 @@ declare abstract class Client {
4254
4317
  * console.log(`Block #${header.number}, hash: ${header.hash}`);
4255
4318
  * ```
4256
4319
  */
4257
- abstract getTipHeader(verbosity?: number | null): Promise<ClientBlockHeader>;
4258
- abstract getBlockByNumberNoCache(blockNumber: NumLike, verbosity?: number | null, withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4259
- abstract getBlockByHashNoCache(blockHash: HexLike, verbosity?: number | null, withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4260
- abstract getHeaderByNumberNoCache(blockNumber: NumLike, verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4261
- abstract getHeaderByHashNoCache(blockHash: HexLike, verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4262
- getBlockByNumber(blockNumber: NumLike, verbosity?: number | null, withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4263
- getBlockByHash(blockHash: HexLike, verbosity?: number | null, withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4264
- getHeaderByNumber(blockNumber: NumLike, verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4265
- getHeaderByHash(blockHash: HexLike, verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4320
+ abstract getTipHeader(
4321
+ /** @deprecated This parameter has no effect and will be removed. */
4322
+ verbosity?: number | null): Promise<ClientBlockHeader>;
4323
+ abstract getBlockByNumberNoCache(blockNumber: NumLike,
4324
+ /** @deprecated This parameter has no effect and will be removed. */
4325
+ verbosity?: number | null,
4326
+ /**
4327
+ * @deprecated This parameter has no effect and will be removed.
4328
+ */
4329
+ withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4330
+ abstract getBlockByHashNoCache(blockHash: HexLike,
4331
+ /** @deprecated This parameter has no effect and will be removed. */
4332
+ verbosity?: number | null,
4333
+ /**
4334
+ * @deprecated This parameter has no effect and will be removed.
4335
+ */
4336
+ withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4337
+ abstract getHeaderByNumberNoCache(blockNumber: NumLike,
4338
+ /** @deprecated This parameter has no effect and will be removed. */
4339
+ verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4340
+ abstract getHeaderByHashNoCache(blockHash: HexLike,
4341
+ /** @deprecated This parameter has no effect and will be removed. */
4342
+ verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4343
+ getBlockByNumber(blockNumber: NumLike,
4344
+ /** @deprecated This parameter has no effect and will be removed. */
4345
+ verbosity?: number | null,
4346
+ /**
4347
+ * @deprecated This parameter has no effect and will be removed.
4348
+ */
4349
+ withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4350
+ getBlockByHash(blockHash: HexLike,
4351
+ /** @deprecated This parameter has no effect and will be removed. */
4352
+ verbosity?: number | null,
4353
+ /**
4354
+ * @deprecated This parameter has no effect and will be removed.
4355
+ */
4356
+ withCycles?: boolean | null): Promise<ClientBlock | undefined>;
4357
+ getHeaderByNumber(blockNumber: NumLike,
4358
+ /** @deprecated This parameter has no effect and will be removed. */
4359
+ verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4360
+ getHeaderByHash(blockHash: HexLike,
4361
+ /** @deprecated This parameter has no effect and will be removed. */
4362
+ verbosity?: number | null): Promise<ClientBlockHeader | undefined>;
4266
4363
  abstract estimateCycles(transaction: TransactionLike): Promise<Num>;
4267
4364
  abstract sendTransactionDry(transaction: TransactionLike, validator?: OutputsValidator): Promise<Num>;
4268
4365
  abstract sendTransactionNoCache(transaction: TransactionLike, validator?: OutputsValidator): Promise<Hex>;
@@ -4740,10 +4837,10 @@ declare const Script_base: (abstract new () => {
4740
4837
  }) & {
4741
4838
  byteLength?: number;
4742
4839
  encode(_: ScriptLike): Bytes$1;
4743
- decode(_: BytesLike): Script;
4744
- fromBytes(_bytes: BytesLike): Script;
4840
+ decode(_: BytesLike, _context?: any): Script;
4841
+ fromBytes(_bytes: BytesLike, _context?: any): Script;
4745
4842
  from(_: ScriptLike): Script;
4746
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
4843
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
4747
4844
  toBytes(): Bytes$1;
4748
4845
  clone(): SubType;
4749
4846
  eq(other: SubTypeLike): boolean;
@@ -4752,11 +4849,11 @@ declare const Script_base: (abstract new () => {
4752
4849
  }) & {
4753
4850
  byteLength?: number;
4754
4851
  encode(_: SubTypeLike): Bytes$1;
4755
- decode(_: BytesLike): SubType;
4756
- fromBytes(_bytes: BytesLike): SubType;
4852
+ decode(_: BytesLike, _context?: Context): SubType;
4853
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
4757
4854
  from(_: SubTypeLike): SubType;
4758
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
4759
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
4855
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
4856
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
4760
4857
  readonly inner: DecodedType<CodecType>;
4761
4858
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
4762
4859
  _?: undefined | null;
@@ -4772,14 +4869,14 @@ declare const Script_base: (abstract new () => {
4772
4869
  }) & {
4773
4870
  byteLength?: number;
4774
4871
  encode(_: SubTypeLike_1): Bytes$1;
4775
- decode(_: BytesLike): SubType_1;
4776
- fromBytes(_bytes: BytesLike): SubType_1;
4872
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
4873
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
4777
4874
  from(_: SubTypeLike_1): SubType_1;
4778
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
4779
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
4875
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
4876
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
4780
4877
  };
4781
4878
  };
4782
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
4879
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
4783
4880
  readonly inner: DecodedType<CodecType>;
4784
4881
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
4785
4882
  _?: undefined | null;
@@ -4795,10 +4892,10 @@ declare const Script_base: (abstract new () => {
4795
4892
  }) & {
4796
4893
  byteLength?: number;
4797
4894
  encode(_: SubTypeLike): Bytes$1;
4798
- decode(_: BytesLike): SubType;
4799
- fromBytes(_bytes: BytesLike): SubType;
4895
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
4896
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
4800
4897
  from(_: SubTypeLike): SubType;
4801
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
4898
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
4802
4899
  toBytes(): Bytes$1;
4803
4900
  clone(): SubType_1;
4804
4901
  eq(other: SubTypeLike_1): boolean;
@@ -4807,13 +4904,13 @@ declare const Script_base: (abstract new () => {
4807
4904
  }) & {
4808
4905
  byteLength?: number;
4809
4906
  encode(_: SubTypeLike_1): Bytes$1;
4810
- decode(_: BytesLike): SubType_1;
4811
- fromBytes(_bytes: BytesLike): SubType_1;
4907
+ decode(_: BytesLike, _context?: Context): SubType_1;
4908
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
4812
4909
  from(_: SubTypeLike_1): SubType_1;
4813
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
4814
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
4910
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
4911
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
4815
4912
  };
4816
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
4913
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
4817
4914
  };
4818
4915
  };
4819
4916
  /**
@@ -4890,8 +4987,8 @@ declare class Script extends Script_base {
4890
4987
  */
4891
4988
  static fromKnownScript(client: Client, knownScript: KnownScript, args: HexLike): Promise<Script>;
4892
4989
  }
4893
- declare const ScriptOpt: Codec<ScriptLike | null | undefined, Script | undefined>;
4894
- declare const ScriptVec: Codec<ScriptLike[], Script[]>;
4990
+ declare const ScriptOpt: Codec<ScriptLike | null | undefined, Script | undefined, unknown>;
4991
+ declare const ScriptVec: Codec<ScriptLike[], Script[], unknown>;
4895
4992
  //#endregion
4896
4993
  //#region src/ckb/transactionLumos.d.ts
4897
4994
  interface LumosTransactionSkeletonType {
@@ -4992,10 +5089,10 @@ declare const OutPoint_base: (abstract new () => {
4992
5089
  }) & {
4993
5090
  byteLength?: number;
4994
5091
  encode(_: OutPointLike): Bytes$1;
4995
- decode(_: BytesLike): OutPoint;
4996
- fromBytes(_bytes: BytesLike): OutPoint;
5092
+ decode(_: BytesLike, _context?: any): OutPoint;
5093
+ fromBytes(_bytes: BytesLike, _context?: any): OutPoint;
4997
5094
  from(_: OutPointLike): OutPoint;
4998
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
5095
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
4999
5096
  toBytes(): Bytes$1;
5000
5097
  clone(): SubType;
5001
5098
  eq(other: SubTypeLike): boolean;
@@ -5004,11 +5101,11 @@ declare const OutPoint_base: (abstract new () => {
5004
5101
  }) & {
5005
5102
  byteLength?: number;
5006
5103
  encode(_: SubTypeLike): Bytes$1;
5007
- decode(_: BytesLike): SubType;
5008
- fromBytes(_bytes: BytesLike): SubType;
5104
+ decode(_: BytesLike, _context?: Context): SubType;
5105
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
5009
5106
  from(_: SubTypeLike): SubType;
5010
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5011
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5107
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5108
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5012
5109
  readonly inner: DecodedType<CodecType>;
5013
5110
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5014
5111
  _?: undefined | null;
@@ -5024,14 +5121,14 @@ declare const OutPoint_base: (abstract new () => {
5024
5121
  }) & {
5025
5122
  byteLength?: number;
5026
5123
  encode(_: SubTypeLike_1): Bytes$1;
5027
- decode(_: BytesLike): SubType_1;
5028
- fromBytes(_bytes: BytesLike): SubType_1;
5124
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5125
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5029
5126
  from(_: SubTypeLike_1): SubType_1;
5030
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5031
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5127
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5128
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5032
5129
  };
5033
5130
  };
5034
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5131
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5035
5132
  readonly inner: DecodedType<CodecType>;
5036
5133
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5037
5134
  _?: undefined | null;
@@ -5047,10 +5144,10 @@ declare const OutPoint_base: (abstract new () => {
5047
5144
  }) & {
5048
5145
  byteLength?: number;
5049
5146
  encode(_: SubTypeLike): Bytes$1;
5050
- decode(_: BytesLike): SubType;
5051
- fromBytes(_bytes: BytesLike): SubType;
5147
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5148
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5052
5149
  from(_: SubTypeLike): SubType;
5053
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
5150
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
5054
5151
  toBytes(): Bytes$1;
5055
5152
  clone(): SubType_1;
5056
5153
  eq(other: SubTypeLike_1): boolean;
@@ -5059,13 +5156,13 @@ declare const OutPoint_base: (abstract new () => {
5059
5156
  }) & {
5060
5157
  byteLength?: number;
5061
5158
  encode(_: SubTypeLike_1): Bytes$1;
5062
- decode(_: BytesLike): SubType_1;
5063
- fromBytes(_bytes: BytesLike): SubType_1;
5159
+ decode(_: BytesLike, _context?: Context): SubType_1;
5160
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
5064
5161
  from(_: SubTypeLike_1): SubType_1;
5065
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5066
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5162
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
5163
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5067
5164
  };
5068
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5165
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5069
5166
  };
5070
5167
  };
5071
5168
  /**
@@ -5134,10 +5231,10 @@ declare const CellOutput_base: (abstract new () => {
5134
5231
  }) & {
5135
5232
  byteLength?: number;
5136
5233
  encode(_: CellOutputLike): Bytes$1;
5137
- decode(_: BytesLike): CellOutput;
5138
- fromBytes(_bytes: BytesLike): CellOutput;
5234
+ decode(_: BytesLike, _context?: any): CellOutput;
5235
+ fromBytes(_bytes: BytesLike, _context?: any): CellOutput;
5139
5236
  from(_: CellOutputLike): CellOutput;
5140
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
5237
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
5141
5238
  toBytes(): Bytes$1;
5142
5239
  clone(): SubType;
5143
5240
  eq(other: SubTypeLike): boolean;
@@ -5146,11 +5243,11 @@ declare const CellOutput_base: (abstract new () => {
5146
5243
  }) & {
5147
5244
  byteLength?: number;
5148
5245
  encode(_: SubTypeLike): Bytes$1;
5149
- decode(_: BytesLike): SubType;
5150
- fromBytes(_bytes: BytesLike): SubType;
5246
+ decode(_: BytesLike, _context?: Context): SubType;
5247
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
5151
5248
  from(_: SubTypeLike): SubType;
5152
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5153
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5249
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5250
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5154
5251
  readonly inner: DecodedType<CodecType>;
5155
5252
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5156
5253
  _?: undefined | null;
@@ -5166,14 +5263,14 @@ declare const CellOutput_base: (abstract new () => {
5166
5263
  }) & {
5167
5264
  byteLength?: number;
5168
5265
  encode(_: SubTypeLike_1): Bytes$1;
5169
- decode(_: BytesLike): SubType_1;
5170
- fromBytes(_bytes: BytesLike): SubType_1;
5266
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5267
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5171
5268
  from(_: SubTypeLike_1): SubType_1;
5172
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5173
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5269
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5270
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5174
5271
  };
5175
5272
  };
5176
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5273
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5177
5274
  readonly inner: DecodedType<CodecType>;
5178
5275
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5179
5276
  _?: undefined | null;
@@ -5189,10 +5286,10 @@ declare const CellOutput_base: (abstract new () => {
5189
5286
  }) & {
5190
5287
  byteLength?: number;
5191
5288
  encode(_: SubTypeLike): Bytes$1;
5192
- decode(_: BytesLike): SubType;
5193
- fromBytes(_bytes: BytesLike): SubType;
5289
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5290
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5194
5291
  from(_: SubTypeLike): SubType;
5195
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
5292
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
5196
5293
  toBytes(): Bytes$1;
5197
5294
  clone(): SubType_1;
5198
5295
  eq(other: SubTypeLike_1): boolean;
@@ -5201,13 +5298,13 @@ declare const CellOutput_base: (abstract new () => {
5201
5298
  }) & {
5202
5299
  byteLength?: number;
5203
5300
  encode(_: SubTypeLike_1): Bytes$1;
5204
- decode(_: BytesLike): SubType_1;
5205
- fromBytes(_bytes: BytesLike): SubType_1;
5301
+ decode(_: BytesLike, _context?: Context): SubType_1;
5302
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
5206
5303
  from(_: SubTypeLike_1): SubType_1;
5207
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5208
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5304
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
5305
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5209
5306
  };
5210
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5307
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5211
5308
  };
5212
5309
  };
5213
5310
  /**
@@ -5228,12 +5325,13 @@ declare class CellOutput extends CellOutput_base {
5228
5325
  get occupiedSize(): number;
5229
5326
  /**
5230
5327
  * Creates a CellOutput instance from a CellOutputLike object.
5231
- * This method supports automatic capacity calculation when outputData is provided and capacity is 0 or omitted.
5328
+ *
5329
+ * If `outputData` is provided, capacity is ensured to meet the occupied minimum.
5330
+ * Valid instances are returned as-is, while invalid instances are reconstructed
5331
+ * shallowly without mutating the original.
5232
5332
  *
5233
5333
  * @param cellOutput - A CellOutputLike object or an instance of CellOutput.
5234
- * @param outputData - Optional output data used for automatic capacity calculation.
5235
- * When provided and capacity is 0, the capacity will be calculated
5236
- * as occupiedSize + outputData.length.
5334
+ * @param outputData - Optional output data for capacity verification.
5237
5335
  * @returns A CellOutput instance.
5238
5336
  *
5239
5337
  * @example
@@ -5248,7 +5346,7 @@ declare class CellOutput extends CellOutput_base {
5248
5346
  * // Automatic capacity calculation
5249
5347
  * const cellOutput2 = CellOutput.from({
5250
5348
  * lock: { codeHash: "0x...", hashType: "type", args: "0x..." }
5251
- * }, "0x1234"); // Capacity will be calculated automatically
5349
+ * }, "0x1234");
5252
5350
  * ```
5253
5351
  */
5254
5352
  static from(cellOutput: CellOutputLike, outputData?: HexLike | null): CellOutput;
@@ -5264,7 +5362,7 @@ declare class CellOutput extends CellOutput_base {
5264
5362
  */
5265
5363
  clone(): CellOutput;
5266
5364
  }
5267
- declare const CellOutputVec: Codec<CellOutputLike[], CellOutput[]>;
5365
+ declare const CellOutputVec: Codec<CellOutputLike[], CellOutput[], unknown>;
5268
5366
  /**
5269
5367
  * @public
5270
5368
  * Represents a cell-like object that may or may not be on-chain.
@@ -5299,11 +5397,12 @@ declare class CellAny {
5299
5397
  constructor(cellOutput: CellOutput, outputData: Hex, outPoint?: OutPoint);
5300
5398
  /**
5301
5399
  * Creates a `CellAny` instance from a `CellAnyLike` object.
5302
- * This factory method provides a convenient way to create `CellAny` instances
5303
- * from plain objects, automatically handling the optional `outPoint` or `previousOutput`.
5400
+ *
5401
+ * Returns valid instances as-is. Reconstructs a corrected instance shallowly
5402
+ * without mutating the original if capacity is insufficient for the data.
5304
5403
  *
5305
5404
  * @param cell - A `CellAnyLike` object.
5306
- * @returns A new `CellAny` instance.
5405
+ * @returns A `CellAny` instance.
5307
5406
  *
5308
5407
  * @example
5309
5408
  * ```typescript
@@ -5388,13 +5487,13 @@ declare class Cell extends CellAny {
5388
5487
  constructor(outPoint: OutPoint, cellOutput: CellOutput, outputData: Hex);
5389
5488
  /**
5390
5489
  * Creates a Cell instance from a CellLike object.
5391
- * This method accepts either `outPoint` or `previousOutput` to specify the cell's location,
5392
- * and supports automatic capacity calculation for the cell output.
5490
+ *
5491
+ * Returns valid instances as-is. Reconstructs a corrected instance shallowly
5492
+ * without mutating the original if capacity is insufficient for the data.
5393
5493
  *
5394
5494
  * @param cell - A CellLike object or an instance of Cell. The object can use either:
5395
5495
  * - `outPoint`: For referencing a cell output
5396
5496
  * - `previousOutput`: For referencing a cell input (alternative name for outPoint)
5397
- * The cellOutput can omit capacity for automatic calculation.
5398
5497
  * @returns A Cell instance.
5399
5498
  *
5400
5499
  * @example
@@ -5414,7 +5513,6 @@ declare class Cell extends CellAny {
5414
5513
  * previousOutput: { txHash: "0x...", index: 0 },
5415
5514
  * cellOutput: {
5416
5515
  * lock: { codeHash: "0x...", hashType: "type", args: "0x..." }
5417
- * // capacity will be calculated automatically
5418
5516
  * },
5419
5517
  * outputData: "0x1234"
5420
5518
  * });
@@ -5490,10 +5588,10 @@ declare const Since_base: (abstract new () => {
5490
5588
  }) & {
5491
5589
  byteLength?: number;
5492
5590
  encode(_: SinceLike): Bytes$1;
5493
- decode(_: BytesLike): Since;
5494
- fromBytes(_bytes: BytesLike): Since;
5591
+ decode(_: BytesLike, _context?: any): Since;
5592
+ fromBytes(_bytes: BytesLike, _context?: any): Since;
5495
5593
  from(_: SinceLike): Since;
5496
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
5594
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
5497
5595
  toBytes(): Bytes$1;
5498
5596
  clone(): SubType;
5499
5597
  eq(other: SubTypeLike): boolean;
@@ -5502,11 +5600,11 @@ declare const Since_base: (abstract new () => {
5502
5600
  }) & {
5503
5601
  byteLength?: number;
5504
5602
  encode(_: SubTypeLike): Bytes$1;
5505
- decode(_: BytesLike): SubType;
5506
- fromBytes(_bytes: BytesLike): SubType;
5603
+ decode(_: BytesLike, _context?: Context): SubType;
5604
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
5507
5605
  from(_: SubTypeLike): SubType;
5508
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5509
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5606
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5607
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5510
5608
  readonly inner: DecodedType<CodecType>;
5511
5609
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5512
5610
  _?: undefined | null;
@@ -5522,14 +5620,14 @@ declare const Since_base: (abstract new () => {
5522
5620
  }) & {
5523
5621
  byteLength?: number;
5524
5622
  encode(_: SubTypeLike_1): Bytes$1;
5525
- decode(_: BytesLike): SubType_1;
5526
- fromBytes(_bytes: BytesLike): SubType_1;
5623
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5624
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5527
5625
  from(_: SubTypeLike_1): SubType_1;
5528
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5529
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5626
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5627
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5530
5628
  };
5531
5629
  };
5532
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5630
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5533
5631
  readonly inner: DecodedType<CodecType>;
5534
5632
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5535
5633
  _?: undefined | null;
@@ -5545,10 +5643,10 @@ declare const Since_base: (abstract new () => {
5545
5643
  }) & {
5546
5644
  byteLength?: number;
5547
5645
  encode(_: SubTypeLike): Bytes$1;
5548
- decode(_: BytesLike): SubType;
5549
- fromBytes(_bytes: BytesLike): SubType;
5646
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5647
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5550
5648
  from(_: SubTypeLike): SubType;
5551
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
5649
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
5552
5650
  toBytes(): Bytes$1;
5553
5651
  clone(): SubType_1;
5554
5652
  eq(other: SubTypeLike_1): boolean;
@@ -5557,13 +5655,13 @@ declare const Since_base: (abstract new () => {
5557
5655
  }) & {
5558
5656
  byteLength?: number;
5559
5657
  encode(_: SubTypeLike_1): Bytes$1;
5560
- decode(_: BytesLike): SubType_1;
5561
- fromBytes(_bytes: BytesLike): SubType_1;
5658
+ decode(_: BytesLike, _context?: Context): SubType_1;
5659
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
5562
5660
  from(_: SubTypeLike_1): SubType_1;
5563
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5564
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5661
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
5662
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5565
5663
  };
5566
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5664
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5567
5665
  };
5568
5666
  };
5569
5667
  /**
@@ -5649,10 +5747,10 @@ declare const CellInput_base: (abstract new () => {
5649
5747
  }) & {
5650
5748
  byteLength?: number;
5651
5749
  encode(_: CellInputLike): Bytes$1;
5652
- decode(_: BytesLike): CellInput;
5653
- fromBytes(_bytes: BytesLike): CellInput;
5750
+ decode(_: BytesLike, _context?: any): CellInput;
5751
+ fromBytes(_bytes: BytesLike, _context?: any): CellInput;
5654
5752
  from(_: CellInputLike): CellInput;
5655
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
5753
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
5656
5754
  toBytes(): Bytes$1;
5657
5755
  clone(): SubType;
5658
5756
  eq(other: SubTypeLike): boolean;
@@ -5661,11 +5759,11 @@ declare const CellInput_base: (abstract new () => {
5661
5759
  }) & {
5662
5760
  byteLength?: number;
5663
5761
  encode(_: SubTypeLike): Bytes$1;
5664
- decode(_: BytesLike): SubType;
5665
- fromBytes(_bytes: BytesLike): SubType;
5762
+ decode(_: BytesLike, _context?: Context): SubType;
5763
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
5666
5764
  from(_: SubTypeLike): SubType;
5667
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5668
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5765
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5766
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5669
5767
  readonly inner: DecodedType<CodecType>;
5670
5768
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5671
5769
  _?: undefined | null;
@@ -5681,14 +5779,14 @@ declare const CellInput_base: (abstract new () => {
5681
5779
  }) & {
5682
5780
  byteLength?: number;
5683
5781
  encode(_: SubTypeLike_1): Bytes$1;
5684
- decode(_: BytesLike): SubType_1;
5685
- fromBytes(_bytes: BytesLike): SubType_1;
5782
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5783
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5686
5784
  from(_: SubTypeLike_1): SubType_1;
5687
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5688
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5785
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5786
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5689
5787
  };
5690
5788
  };
5691
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5789
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5692
5790
  readonly inner: DecodedType<CodecType>;
5693
5791
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5694
5792
  _?: undefined | null;
@@ -5704,10 +5802,10 @@ declare const CellInput_base: (abstract new () => {
5704
5802
  }) & {
5705
5803
  byteLength?: number;
5706
5804
  encode(_: SubTypeLike): Bytes$1;
5707
- decode(_: BytesLike): SubType;
5708
- fromBytes(_bytes: BytesLike): SubType;
5805
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5806
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5709
5807
  from(_: SubTypeLike): SubType;
5710
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
5808
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
5711
5809
  toBytes(): Bytes$1;
5712
5810
  clone(): SubType_1;
5713
5811
  eq(other: SubTypeLike_1): boolean;
@@ -5716,13 +5814,13 @@ declare const CellInput_base: (abstract new () => {
5716
5814
  }) & {
5717
5815
  byteLength?: number;
5718
5816
  encode(_: SubTypeLike_1): Bytes$1;
5719
- decode(_: BytesLike): SubType_1;
5720
- fromBytes(_bytes: BytesLike): SubType_1;
5817
+ decode(_: BytesLike, _context?: Context): SubType_1;
5818
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
5721
5819
  from(_: SubTypeLike_1): SubType_1;
5722
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5723
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5820
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
5821
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5724
5822
  };
5725
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5823
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5726
5824
  };
5727
5825
  };
5728
5826
  /**
@@ -5789,7 +5887,7 @@ declare class CellInput extends CellInput_base {
5789
5887
  */
5790
5888
  clone(): CellInput;
5791
5889
  }
5792
- declare const CellInputVec: Codec<CellInputLike[], CellInput[]>;
5890
+ declare const CellInputVec: Codec<CellInputLike[], CellInput[], unknown>;
5793
5891
  /**
5794
5892
  * @public
5795
5893
  */
@@ -5806,10 +5904,10 @@ declare const CellDep_base: (abstract new () => {
5806
5904
  }) & {
5807
5905
  byteLength?: number;
5808
5906
  encode(_: CellDepLike): Bytes$1;
5809
- decode(_: BytesLike): CellDep;
5810
- fromBytes(_bytes: BytesLike): CellDep;
5907
+ decode(_: BytesLike, _context?: any): CellDep;
5908
+ fromBytes(_bytes: BytesLike, _context?: any): CellDep;
5811
5909
  from(_: CellDepLike): CellDep;
5812
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
5910
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
5813
5911
  toBytes(): Bytes$1;
5814
5912
  clone(): SubType;
5815
5913
  eq(other: SubTypeLike): boolean;
@@ -5818,11 +5916,11 @@ declare const CellDep_base: (abstract new () => {
5818
5916
  }) & {
5819
5917
  byteLength?: number;
5820
5918
  encode(_: SubTypeLike): Bytes$1;
5821
- decode(_: BytesLike): SubType;
5822
- fromBytes(_bytes: BytesLike): SubType;
5919
+ decode(_: BytesLike, _context?: Context): SubType;
5920
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
5823
5921
  from(_: SubTypeLike): SubType;
5824
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5825
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5922
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5923
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5826
5924
  readonly inner: DecodedType<CodecType>;
5827
5925
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5828
5926
  _?: undefined | null;
@@ -5838,14 +5936,14 @@ declare const CellDep_base: (abstract new () => {
5838
5936
  }) & {
5839
5937
  byteLength?: number;
5840
5938
  encode(_: SubTypeLike_1): Bytes$1;
5841
- decode(_: BytesLike): SubType_1;
5842
- fromBytes(_bytes: BytesLike): SubType_1;
5939
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5940
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5843
5941
  from(_: SubTypeLike_1): SubType_1;
5844
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5845
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5942
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
5943
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5846
5944
  };
5847
5945
  };
5848
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5946
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5849
5947
  readonly inner: DecodedType<CodecType>;
5850
5948
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5851
5949
  _?: undefined | null;
@@ -5861,10 +5959,10 @@ declare const CellDep_base: (abstract new () => {
5861
5959
  }) & {
5862
5960
  byteLength?: number;
5863
5961
  encode(_: SubTypeLike): Bytes$1;
5864
- decode(_: BytesLike): SubType;
5865
- fromBytes(_bytes: BytesLike): SubType;
5962
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5963
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
5866
5964
  from(_: SubTypeLike): SubType;
5867
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
5965
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
5868
5966
  toBytes(): Bytes$1;
5869
5967
  clone(): SubType_1;
5870
5968
  eq(other: SubTypeLike_1): boolean;
@@ -5873,13 +5971,13 @@ declare const CellDep_base: (abstract new () => {
5873
5971
  }) & {
5874
5972
  byteLength?: number;
5875
5973
  encode(_: SubTypeLike_1): Bytes$1;
5876
- decode(_: BytesLike): SubType_1;
5877
- fromBytes(_bytes: BytesLike): SubType_1;
5974
+ decode(_: BytesLike, _context?: Context): SubType_1;
5975
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
5878
5976
  from(_: SubTypeLike_1): SubType_1;
5879
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5880
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5977
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
5978
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5881
5979
  };
5882
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5980
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5883
5981
  };
5884
5982
  };
5885
5983
  /**
@@ -5922,7 +6020,7 @@ declare class CellDep extends CellDep_base {
5922
6020
  */
5923
6021
  clone(): CellDep;
5924
6022
  }
5925
- declare const CellDepVec: Codec<CellDepLike[], CellDep[]>;
6023
+ declare const CellDepVec: Codec<CellDepLike[], CellDep[], unknown>;
5926
6024
  /**
5927
6025
  * @public
5928
6026
  */
@@ -5940,10 +6038,10 @@ declare const WitnessArgs_base: (abstract new () => {
5940
6038
  }) & {
5941
6039
  byteLength?: number;
5942
6040
  encode(_: WitnessArgsLike): Bytes$1;
5943
- decode(_: BytesLike): WitnessArgs;
5944
- fromBytes(_bytes: BytesLike): WitnessArgs;
6041
+ decode(_: BytesLike, _context?: any): WitnessArgs;
6042
+ fromBytes(_bytes: BytesLike, _context?: any): WitnessArgs;
5945
6043
  from(_: WitnessArgsLike): WitnessArgs;
5946
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
6044
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
5947
6045
  toBytes(): Bytes$1;
5948
6046
  clone(): SubType;
5949
6047
  eq(other: SubTypeLike): boolean;
@@ -5952,11 +6050,11 @@ declare const WitnessArgs_base: (abstract new () => {
5952
6050
  }) & {
5953
6051
  byteLength?: number;
5954
6052
  encode(_: SubTypeLike): Bytes$1;
5955
- decode(_: BytesLike): SubType;
5956
- fromBytes(_bytes: BytesLike): SubType;
6053
+ decode(_: BytesLike, _context?: Context): SubType;
6054
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
5957
6055
  from(_: SubTypeLike): SubType;
5958
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5959
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
6056
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
6057
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
5960
6058
  readonly inner: DecodedType<CodecType>;
5961
6059
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5962
6060
  _?: undefined | null;
@@ -5972,14 +6070,14 @@ declare const WitnessArgs_base: (abstract new () => {
5972
6070
  }) & {
5973
6071
  byteLength?: number;
5974
6072
  encode(_: SubTypeLike_1): Bytes$1;
5975
- decode(_: BytesLike): SubType_1;
5976
- fromBytes(_bytes: BytesLike): SubType_1;
6073
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
6074
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
5977
6075
  from(_: SubTypeLike_1): SubType_1;
5978
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
5979
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
6076
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
6077
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
5980
6078
  };
5981
6079
  };
5982
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
6080
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
5983
6081
  readonly inner: DecodedType<CodecType>;
5984
6082
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
5985
6083
  _?: undefined | null;
@@ -5995,10 +6093,10 @@ declare const WitnessArgs_base: (abstract new () => {
5995
6093
  }) & {
5996
6094
  byteLength?: number;
5997
6095
  encode(_: SubTypeLike): Bytes$1;
5998
- decode(_: BytesLike): SubType;
5999
- fromBytes(_bytes: BytesLike): SubType;
6096
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
6097
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
6000
6098
  from(_: SubTypeLike): SubType;
6001
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
6099
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
6002
6100
  toBytes(): Bytes$1;
6003
6101
  clone(): SubType_1;
6004
6102
  eq(other: SubTypeLike_1): boolean;
@@ -6007,13 +6105,13 @@ declare const WitnessArgs_base: (abstract new () => {
6007
6105
  }) & {
6008
6106
  byteLength?: number;
6009
6107
  encode(_: SubTypeLike_1): Bytes$1;
6010
- decode(_: BytesLike): SubType_1;
6011
- fromBytes(_bytes: BytesLike): SubType_1;
6108
+ decode(_: BytesLike, _context?: Context): SubType_1;
6109
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
6012
6110
  from(_: SubTypeLike_1): SubType_1;
6013
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
6014
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6111
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
6112
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6015
6113
  };
6016
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6114
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6017
6115
  };
6018
6116
  };
6019
6117
  /**
@@ -6055,20 +6153,20 @@ declare class WitnessArgs extends WitnessArgs_base {
6055
6153
  */
6056
6154
  declare function udtBalanceFrom(dataLike: BytesLike): Num;
6057
6155
  declare const RawTransaction: Codec<EncodableRecord<{
6058
- version: Codec<NumLike, number>;
6059
- cellDeps: Codec<CellDepLike[], CellDep[]>;
6060
- headerDeps: Codec<BytesLike[], `0x${string}`[]>;
6061
- inputs: Codec<CellInputLike[], CellInput[]>;
6062
- outputs: Codec<CellOutputLike[], CellOutput[]>;
6063
- outputsData: Codec<BytesLike[], `0x${string}`[]>;
6156
+ version: Codec<NumLike, number, any>;
6157
+ cellDeps: Codec<CellDepLike[], CellDep[], unknown>;
6158
+ headerDeps: Codec<BytesLike[], `0x${string}`[], unknown>;
6159
+ inputs: Codec<CellInputLike[], CellInput[], unknown>;
6160
+ outputs: Codec<CellOutputLike[], CellOutput[], unknown>;
6161
+ outputsData: Codec<BytesLike[], `0x${string}`[], unknown>;
6064
6162
  }>, DecodedRecord<{
6065
- version: Codec<NumLike, number>;
6066
- cellDeps: Codec<CellDepLike[], CellDep[]>;
6067
- headerDeps: Codec<BytesLike[], `0x${string}`[]>;
6068
- inputs: Codec<CellInputLike[], CellInput[]>;
6069
- outputs: Codec<CellOutputLike[], CellOutput[]>;
6070
- outputsData: Codec<BytesLike[], `0x${string}`[]>;
6071
- }>>;
6163
+ version: Codec<NumLike, number, any>;
6164
+ cellDeps: Codec<CellDepLike[], CellDep[], unknown>;
6165
+ headerDeps: Codec<BytesLike[], `0x${string}`[], unknown>;
6166
+ inputs: Codec<CellInputLike[], CellInput[], unknown>;
6167
+ outputs: Codec<CellOutputLike[], CellOutput[], unknown>;
6168
+ outputsData: Codec<BytesLike[], `0x${string}`[], unknown>;
6169
+ }>, TableDecodeContext>;
6072
6170
  /**
6073
6171
  * @public
6074
6172
  */
@@ -6090,10 +6188,10 @@ declare const Transaction_base: (abstract new () => {
6090
6188
  }) & {
6091
6189
  byteLength?: number;
6092
6190
  encode(_: TransactionLike): Bytes$1;
6093
- decode(_: BytesLike): Transaction;
6094
- fromBytes(_bytes: BytesLike): Transaction;
6191
+ decode(_: BytesLike, _context?: any): Transaction;
6192
+ fromBytes(_bytes: BytesLike, _context?: any): Transaction;
6095
6193
  from(_: TransactionLike): Transaction;
6096
- Base<SubTypeLike, SubType = SubTypeLike>(): (abstract new () => {
6194
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): (abstract new () => {
6097
6195
  toBytes(): Bytes$1;
6098
6196
  clone(): SubType;
6099
6197
  eq(other: SubTypeLike): boolean;
@@ -6102,11 +6200,11 @@ declare const Transaction_base: (abstract new () => {
6102
6200
  }) & {
6103
6201
  byteLength?: number;
6104
6202
  encode(_: SubTypeLike): Bytes$1;
6105
- decode(_: BytesLike): SubType;
6106
- fromBytes(_bytes: BytesLike): SubType;
6203
+ decode(_: BytesLike, _context?: Context): SubType;
6204
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType;
6107
6205
  from(_: SubTypeLike): SubType;
6108
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6109
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
6206
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
6207
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new (inner: DecodedType<CodecType>) => {
6110
6208
  readonly inner: DecodedType<CodecType>;
6111
6209
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
6112
6210
  _?: undefined | null;
@@ -6122,14 +6220,14 @@ declare const Transaction_base: (abstract new () => {
6122
6220
  }) & {
6123
6221
  byteLength?: number;
6124
6222
  encode(_: SubTypeLike_1): Bytes$1;
6125
- decode(_: BytesLike): SubType_1;
6126
- fromBytes(_bytes: BytesLike): SubType_1;
6223
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
6224
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType_1;
6127
6225
  from(_: SubTypeLike_1): SubType_1;
6128
- Base<SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6129
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
6226
+ Base<SubTypeLike, SubType = SubTypeLike, Context = any>(): /*elided*/ any;
6227
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
6130
6228
  };
6131
6229
  };
6132
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
6230
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): (abstract new (inner: DecodedType<CodecType>) => {
6133
6231
  readonly inner: DecodedType<CodecType>;
6134
6232
  match<Result>(handlers: UnionMatchHandlers<CodecType, Result> & {
6135
6233
  _?: undefined | null;
@@ -6145,10 +6243,10 @@ declare const Transaction_base: (abstract new () => {
6145
6243
  }) & {
6146
6244
  byteLength?: number;
6147
6245
  encode(_: SubTypeLike): Bytes$1;
6148
- decode(_: BytesLike): SubType;
6149
- fromBytes(_bytes: BytesLike): SubType;
6246
+ decode(_: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
6247
+ fromBytes(_bytes: BytesLike, _context?: ContextType<CodecType> | undefined): SubType;
6150
6248
  from(_: SubTypeLike): SubType;
6151
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): (abstract new () => {
6249
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): (abstract new () => {
6152
6250
  toBytes(): Bytes$1;
6153
6251
  clone(): SubType_1;
6154
6252
  eq(other: SubTypeLike_1): boolean;
@@ -6157,13 +6255,13 @@ declare const Transaction_base: (abstract new () => {
6157
6255
  }) & {
6158
6256
  byteLength?: number;
6159
6257
  encode(_: SubTypeLike_1): Bytes$1;
6160
- decode(_: BytesLike): SubType_1;
6161
- fromBytes(_bytes: BytesLike): SubType_1;
6258
+ decode(_: BytesLike, _context?: Context): SubType_1;
6259
+ fromBytes(_bytes: BytesLike, _context?: Context): SubType_1;
6162
6260
  from(_: SubTypeLike_1): SubType_1;
6163
- Base<SubTypeLike_1, SubType_1 = SubTypeLike_1>(): /*elided*/ any;
6164
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6261
+ Base<SubTypeLike_1, SubType_1 = SubTypeLike_1, Context = any>(): /*elided*/ any;
6262
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6165
6263
  };
6166
- BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6264
+ BaseUnion<CodecType extends CodecLike<any, UnionDecoded<any, any>, any>, SubTypeLike, SubType = SubTypeLike>(): /*elided*/ any;
6167
6265
  };
6168
6266
  };
6169
6267
  /**
@@ -6253,6 +6351,9 @@ declare class Transaction extends Transaction_base {
6253
6351
  /**
6254
6352
  * Creates a Transaction instance from a TransactionLike object.
6255
6353
  *
6354
+ * Returns valid instances as-is. Reconstructs a corrected transaction shallowly
6355
+ * without mutating the original if any output capacity is insufficient.
6356
+ *
6256
6357
  * @param tx - A TransactionLike object or an instance of Transaction.
6257
6358
  * @returns A Transaction instance.
6258
6359
  *
@@ -7159,7 +7260,7 @@ declare abstract class ClientJsonRpc extends Client {
7159
7260
  /**
7160
7261
  * Get tip block header
7161
7262
  *
7162
- * @param verbosity - result format which allows 0 and 1. (Optional, the default is 1.)
7263
+ * @param verbosity - Deprecated; this parameter has no effect.
7163
7264
  * @returns BlockHeader
7164
7265
  */
7165
7266
  getTipHeader: Client["getTipHeader"];
@@ -7167,8 +7268,8 @@ declare abstract class ClientJsonRpc extends Client {
7167
7268
  * Get block by block number
7168
7269
  *
7169
7270
  * @param blockNumber - The block number.
7170
- * @param verbosity - result format which allows 0 and 2. (Optional, the default is 2.)
7171
- * @param withCycles - whether the return cycles of block transactions. (Optional, default false.)
7271
+ * @param verbosity - Deprecated; this parameter has no effect.
7272
+ * @param withCycles - Deprecated; this parameter has no effect.
7172
7273
  * @returns Block
7173
7274
  */
7174
7275
  getBlockByNumberNoCache: Client["getBlockByNumberNoCache"];
@@ -7176,8 +7277,8 @@ declare abstract class ClientJsonRpc extends Client {
7176
7277
  * Get block by block hash
7177
7278
  *
7178
7279
  * @param blockHash - The block hash.
7179
- * @param verbosity - result format which allows 0 and 2. (Optional, the default is 2.)
7180
- * @param withCycles - whether the return cycles of block transactions. (Optional, default false.)
7280
+ * @param verbosity - Deprecated; this parameter has no effect.
7281
+ * @param withCycles - Deprecated; this parameter has no effect.
7181
7282
  * @returns Block
7182
7283
  */
7183
7284
  getBlockByHashNoCache: Client["getBlockByHashNoCache"];
@@ -7185,7 +7286,7 @@ declare abstract class ClientJsonRpc extends Client {
7185
7286
  * Get header by block number
7186
7287
  *
7187
7288
  * @param blockNumber - The block number.
7188
- * @param verbosity - result format which allows 0 and 1. (Optional, the default is 1.)
7289
+ * @param verbosity - Deprecated; this parameter has no effect.
7189
7290
  * @returns BlockHeader
7190
7291
  */
7191
7292
  getHeaderByNumberNoCache: Client["getHeaderByNumberNoCache"];
@@ -7193,7 +7294,7 @@ declare abstract class ClientJsonRpc extends Client {
7193
7294
  * Get header by block hash
7194
7295
  *
7195
7296
  * @param blockHash - The block hash.
7196
- * @param verbosity - result format which allows 0 and 1. (Optional, the default is 1.)
7297
+ * @param verbosity - Deprecated; this parameter has no effect.
7197
7298
  * @returns BlockHeader
7198
7299
  */
7199
7300
  getHeaderByHashNoCache: Client["getHeaderByHashNoCache"];
@@ -7623,5 +7724,5 @@ declare namespace advancedBarrel_d_exports {
7623
7724
  export { ADDRESS_BECH32_LIMIT, AddressFormat, BytesFromEncoding, CKB_BLAKE2B_PERSONAL, CellRecord, ClientCollectableSearchKeyFilterLike, ClientCollectableSearchKeyLike, DEFAULT_CONFIRMED_BLOCK_TIME, DEFAULT_MAX_FEE_RATE, DEFAULT_MIN_FEE_RATE, DEP_TYPES, DEP_TYPE_TO_NUM, HASH_TYPES, HASH_TYPE_TO_NUM, JsonRpcBlock, JsonRpcBlockHeader, JsonRpcBlockUncle, JsonRpcCellDep, JsonRpcCellInput, JsonRpcCellOutput, JsonRpcDepType, JsonRpcHashType, JsonRpcIndexerFindTransactionsGroupedResponse, JsonRpcIndexerFindTransactionsResponse, JsonRpcIndexerSearchKey, JsonRpcIndexerSearchKeyFilter, JsonRpcIndexerSearchKeyTransaction, JsonRpcOutPoint, JsonRpcScript, JsonRpcTransaction, JsonRpcTransformers, MAINNET_SCRIPTS, MapLru, NUM_TO_DEP_TYPE, NUM_TO_HASH_TYPE, SignerJsonRpcInfo, SignerJsonRpcInfoPayload, SignerJsonRpcMessageToSign, SignerJsonRpcTransformers, TESTNET_SCRIPTS, addressFromPayload, addressPayloadFromString, clientSearchKeyRangeFrom, filterCell, filterData, filterNumByRange, filterScript, filterScriptByLenRange, jsonRpcTransportFromUri };
7624
7725
  }
7625
7726
  //#endregion
7626
- export { CellDep as $, isWebview as $i, SignerAlwaysError as $n, JsonRpcPayload as $r, ClientBlockUncle as $t, filterScriptByLenRange as A, EncodableType as Aa, CodecUint256 as Ai, buildNostrEventFromMessage as An, Signature as Ar, HashTypeCodec as At, addressPayloadFromString as B, bytesConcat as Ba, CodecUint64BE as Bi, SignerJsonRpcErrorCode as Bn, SignPsbtOptions as Br, ClientConfig as Bt, CellRecord as C, numMax as Ca, CodecRaw as Ci, TransactionStatus as Cn, btcPublicKeyFromP2pkhAddress as Cr, depTypeFrom as Ct, filterData as D, Codec as Da, CodecUint16 as Di, DEFAULT_MIN_FEE_RATE as Dn, SignerBtcPublicKeyReadonly as Dr, udtBalanceFrom as Dt, filterCell as E, numToHex as Ea, CodecUint128LE as Ei, DEFAULT_MAX_FEE_RATE as En, verifyMessageBtcEcdsa as Er, isDaoOutputLimitExceeded as Et, HASH_TYPE_TO_NUM as F, bytesLen as Fa, CodecUint32LE as Fi, NostrEvent as Fn, SignerSignType as Fr, ScriptVec as Ft, ClientCacheMemory as G, BytesFromEncoding as Ga, codecUintNumber as Gi, SignerJsonRpcInfo as Gn, RequestorJsonRpc as Gr, epochFromHex as Gt, ClientPublicMainnet as H, bytesEq as Ha, CodecUint8 as Hi, SignerJsonRpcProviderSessionConfig as Hn, barrel_d_exports$1 as Hr, Epoch as Ht, NUM_TO_HASH_TYPE as I, bytesLenUnsafe as Ia, CodecUint512 as Ii, SignerNostr as In, SignerType as Ir, hashTypeFrom as It, ErrorTransactionInsufficientCoin as J, RetryOperationOptions as Ji, SignerJsonRpcTransformers as Jn, JsonRpcTransportHttp as Jr, CellDepInfoLike as Jt, ClientCache as K, Entity as Ki, SignerJsonRpcInfoPayload as Kn, RequestorJsonRpcConfig as Kr, epochToHex as Kt, ADDRESS_BECH32_LIMIT as L, hexFrom as La, CodecUint512BE as Li, SignerJsonRpc as Ln, Wallet as Lr, hashTypeFromBytes as Lt, DEP_TYPE_TO_NUM as M, AddressLike as Ma, CodecUint256LE as Mi, verifyMessageNostrEvent as Mn, SignerInfo as Mr, Script as Mt, NUM_TO_DEP_TYPE as N, Hex as Na, CodecUint32 as Ni, SignerNostrPrivateKey as Nn, SignerMultisig as Nr, ScriptLike as Nt, filterNumByRange as O, CodecLike as Oa, CodecUint16BE as Oi, clientSearchKeyRangeFrom as On, SignerBtc as Or, LumosTransactionSkeletonType as Ot, HASH_TYPES as P, HexLike as Pa, CodecUint32BE as Pi, SignerNostrPublicKeyReadonly as Pn, SignerMultisigNotEnoughSignaturesError as Pr, ScriptOpt as Pt, CellAnyLike as Q, gcd as Qi, SignerOpenLink as Qn, JsonRpcId as Qr, ClientBlockLike as Qt, AddressFormat as R, Bytes$1 as Ra, CodecUint512LE as Ri, SignerJsonRpcConfig as Rn, InputToSign as Rr, hashTypeToBytes as Rt, MAINNET_SCRIPTS as S, numLeToBytes as Sa, CodecBytes as Si, ScriptInfoLike as Sn, btcP2pkhAddressFromPublicKey as Sr, calcDaoProfit as St, MapLru as T, numToBytes as Ta, CodecUint128BE as Ti, ClientCollectableSearchKeyLike as Tn, messageHashBtcEcdsa as Tr, depTypeToBytes as Tt, ClientJsonRpc as U, bytesFrom as Ua, codecPadding as Ui, SignerJsonRpcProviderSessionOptions as Un, keystoreDecrypt as Ur, EpochLike as Ut, ClientPublicTestnet as V, bytesConcatTo as Va, CodecUint64LE as Vi, SignerJsonRpcProviderSession as Vn, SignPsbtOptionsLike as Vr, KnownScript as Vt, ClientJsonRpcConfig as W, bytesTo as Wa, codecUint as Wi, SignerJsonRpcResultRecord as Wn, keystoreEncrypt as Wr, epochFrom as Wt, Cell as X, RetryResult as Xi, SignerEvmAddressReadonly as Xn, JsonRpcError as Xr, ClientBlockHeader as Xt, hashTypeId as Y, RetryOptions as Yi, verifyMessageEvmPersonal as Yn, JsonRpcTransportFallback as Yr, ClientBlock as Yt, CellAny as Z, apply as Zi, SignerEvm as Zn, JsonRpcErrorLike as Zr, ClientBlockHeaderLike as Zt, JsonRpcIndexerSearchKeyTransaction as _, numBeFromBytes as _a, CodecByte as _i, ErrorClientResolveUnknown as _n, recoverMessageSecp256k1 as _r, Transaction as _t, JsonRpcBlock as a, Proxy as aa, HASH_CKB_SHORT_LENGTH as ai, ClientIndexerSearchKeyFilter as an, SignerDoge as ar, CellLike as at, JsonRpcTransaction as b, numFromBytes as ba, CodecByte4 as bi, OutputsValidator as bn, verifyMessageSecp256k1 as br, WitnessArgsLike as bt, JsonRpcCellDep as c, OwnerAggregated as ca, hashCkbShort as ci, ClientIndexerSearchKeyTransaction as cn, MultisigCkbWitness as cr, CellOutputVec as ct, JsonRpcDepType as d, AbstractConstructor as da, FixedPointLike as di, ClientTransactionResponseLike as dn, SignerCkbScriptReadonly as dr, DepTypeLike as dt, reduceAsync as ea, JsonRpcResponse as ei, ClientBlockUncleLike as en, SignerDummy as er, CellDepLike as et, JsonRpcHashType as f, Constructor as fa, One as fi, ErrorClientBase as fn, SignerCkbPrivateKey as fr, OutPoint as ft, JsonRpcIndexerSearchKeyFilter as g, NumLike as ga, CodecBool as gi, ErrorClientRBFRejected as gn, messageHashCkbSecp256k1 as gr, SinceLike as gt, JsonRpcIndexerSearchKey as h, Num as ha, fixedPointToString as hi, ErrorClientMaxFeeRateExceeded as hn, SECP256K1_SIGNATURE_LENGTH as hr, Since as ht, JsonRpcTransformers as i, waitForAvailability as ia, HASH_CKB_LENGTH as ii, ClientIndexerSearchKey as in, SignerDogeAddressReadonly as ir, CellInputVec as it, DEP_TYPES as j, Address as ja, CodecUint256BE as ji, nostrEventHash as jn, Signer as jr, HashTypeLike as jt, filterScript as k, DecodedType as ka, CodecUint16LE as ki, barrel_d_exports as kn, NetworkPreference as kr, HashType as kt, JsonRpcCellInput as l, Owner as la, Hasher as li, ClientIndexerSearchKeyTransactionLike as ln, MultisigCkbWitnessLike as lr, DepType as lt, JsonRpcIndexerFindTransactionsResponse as m, abortSignalToPromise as ma, fixedPointFrom as mi, ErrorClientDuplicatedTransaction as mn, SignerCkbAlwaysSuccess as mr, RawTransaction as mt, jsonRpcTransportFromUri as n, sleep as na, JsonRpcTransportRequestOptions as ni, ClientFindTransactionsGroupedResponse as nn, verifyMessageDogeEcdsa as nr, CellInput as nt, JsonRpcBlockHeader as o, OwnerUnique as oa, HasherCkb as oi, ClientIndexerSearchKeyFilterLike as on, verifyMessageJoyId as or, CellOutput as ot, JsonRpcIndexerFindTransactionsGroupedResponse as p, abortSignalAny as pa, Zero as pi, ErrorClientBaseLike as pn, SignerCkbPublicKey as pr, OutPointLike as pt, ErrorTransactionInsufficientCapacity as q, codec as qi, SignerJsonRpcMessageToSign as qn, JsonRpcTransportWebSocket as qr, CellDepInfo as qt, CKB_BLAKE2B_PERSONAL as r, stringify as ra, HasherKeecak256 as ri, ClientFindTransactionsResponse as rn, SignerDogePrivateKey as rr, CellInputLike as rt, JsonRpcBlockUncle as s, OwnerRefCount as sa, hashCkb as si, ClientIndexerSearchKeyLike as sn, SignerMultisigCkbPrivateKey as sr, CellOutputLike as st, advancedBarrel_d_exports as t, retry as ta, JsonRpcTransport as ti, ClientFindCellsResponse as tn, messageHashDogeEcdsa as tr, CellDepVec as tt, JsonRpcCellOutput as u, OwnerMoved as ua, FixedPoint as ui, ClientTransactionResponse as un, SignerMultisigCkbReadonly as ur, DepTypeCodec as ut, JsonRpcOutPoint as v, numBeToBytes as va, CodecByte16 as vi, ErrorClientVerification as vn, signMessageSecp256k1 as vr, TransactionLike as vt, DEFAULT_CONFIRMED_BLOCK_TIME as w, numMin as wa, CodecUint128 as wi, ClientCollectableSearchKeyFilterLike as wn, btcVarLengthBytesFrom as wr, depTypeFromBytes as wt, TESTNET_SCRIPTS as x, numLeFromBytes as xa, CodecByte8 as xi, ScriptInfo as xn, btcEcdsaPublicKeyHash as xr, calcDaoClaimEpoch as xt, JsonRpcScript as y, numFrom as ya, CodecByte32 as yi, ErrorClientWaitTransactionTimeout as yn, verifyMessageCkbSecp256k1 as yr, WitnessArgs as yt, addressFromPayload as z, BytesLike as za, CodecUint64 as zi, SignerJsonRpcConfirmation as zn, InputToSignLike as zr, Client as zt };
7627
- //# sourceMappingURL=advancedBarrel-CJL3rfuW.d.ts.map
7727
+ export { CellDep as $, gcd as $i, SignerOpenLink as $n, JsonRpcId as $r, ClientBlockLike as $t, filterScriptByLenRange as A, CodecLike as Aa, CodecUint16LE as Ai, barrel_d_exports as An, NetworkPreference as Ar, HashTypeCodec as At, addressPayloadFromString as B, hexFrom as Ba, CodecUint64 as Bi, SignerJsonRpcConfirmation as Bn, InputToSignLike as Br, Client as Bt, CellRecord as C, numLeToBytes as Ca, CodecBytes as Ci, ScriptInfoLike as Cn, btcP2pkhAddressFromPublicKey as Cr, depTypeFrom as Ct, filterData as D, numToHex as Da, CodecUint128LE as Di, DEFAULT_MAX_FEE_RATE as Dn, verifyMessageBtcEcdsa as Dr, udtBalanceFrom as Dt, filterCell as E, numToBytes as Ea, CodecUint128BE as Ei, ClientCollectableSearchKeyLike as En, messageHashBtcEcdsa as Er, isDaoOutputLimitExceeded as Et, HASH_TYPE_TO_NUM as F, AddressLike as Fa, CodecUint32BE as Fi, SignerNostrPublicKeyReadonly as Fn, SignerMultisigNotEnoughSignaturesError as Fr, ScriptVec as Ft, ClientCacheMemory as G, bytesEq as Ga, codecUint as Gi, SignerJsonRpcResultRecord as Gn, keystoreEncrypt as Gr, epochFrom as Gt, ClientPublicMainnet as H, BytesLike as Ha, CodecUint64LE as Hi, SignerJsonRpcProviderSession as Hn, SignPsbtOptionsLike as Hr, KnownScript as Ht, NUM_TO_HASH_TYPE as I, Hex as Ia, CodecUint32LE as Ii, NostrEvent as In, SignerSignType as Ir, hashTypeFrom as It, ErrorTransactionInsufficientCoin as J, BytesFromEncoding as Ja, codec$1 as Ji, SignerJsonRpcMessageToSign as Jn, JsonRpcTransportWebSocket as Jr, CellDepInfo as Jt, ClientCache as K, bytesFrom as Ka, codecUintNumber as Ki, SignerJsonRpcInfo as Kn, RequestorJsonRpc as Kr, epochFromHex as Kt, ADDRESS_BECH32_LIMIT as L, HexLike as La, CodecUint512 as Li, SignerNostr as Ln, SignerType as Lr, hashTypeFromBytes as Lt, DEP_TYPE_TO_NUM as M, DecodedType as Ma, CodecUint256BE as Mi, nostrEventHash as Mn, Signer as Mr, Script as Mt, NUM_TO_DEP_TYPE as N, EncodableType as Na, CodecUint256LE as Ni, verifyMessageNostrEvent as Nn, SignerInfo as Nr, ScriptLike as Nt, filterNumByRange as O, ChildContext as Oa, CodecUint16 as Oi, DEFAULT_MIN_FEE_RATE as On, SignerBtcPublicKeyReadonly as Or, LumosTransactionSkeletonType as Ot, HASH_TYPES as P, Address as Pa, CodecUint32 as Pi, SignerNostrPrivateKey as Pn, SignerMultisig as Pr, ScriptOpt as Pt, CellAnyLike as Q, apply as Qi, SignerEvm as Qn, JsonRpcErrorLike as Qr, ClientBlockHeaderLike as Qt, AddressFormat as R, bytesLen as Ra, CodecUint512BE as Ri, SignerJsonRpc as Rn, Wallet as Rr, hashTypeToBytes as Rt, MAINNET_SCRIPTS as S, numLeFromBytes as Sa, CodecByte8 as Si, ScriptInfo as Sn, btcEcdsaPublicKeyHash as Sr, calcDaoProfit as St, MapLru as T, numMin as Ta, CodecUint128 as Ti, ClientCollectableSearchKeyFilterLike as Tn, btcVarLengthBytesFrom as Tr, depTypeToBytes as Tt, ClientJsonRpc as U, bytesConcat as Ua, CodecUint8 as Ui, SignerJsonRpcProviderSessionConfig as Un, barrel_d_exports$1 as Ur, Epoch as Ut, ClientPublicTestnet as V, Bytes$1 as Va, CodecUint64BE as Vi, SignerJsonRpcErrorCode as Vn, SignPsbtOptions as Vr, ClientConfig as Vt, ClientJsonRpcConfig as W, bytesConcatTo as Wa, codecPadding as Wi, SignerJsonRpcProviderSessionOptions as Wn, keystoreDecrypt as Wr, EpochLike as Wt, Cell as X, RetryOptions as Xi, verifyMessageEvmPersonal as Xn, JsonRpcTransportFallback as Xr, ClientBlock as Xt, hashTypeId as Y, RetryOperationOptions as Yi, SignerJsonRpcTransformers as Yn, JsonRpcTransportHttp as Yr, CellDepInfoLike as Yt, CellAny as Z, RetryResult as Zi, SignerEvmAddressReadonly as Zn, JsonRpcError as Zr, ClientBlockHeader as Zt, JsonRpcIndexerSearchKeyTransaction as _, NumLike as _a, CodecBool as _i, ErrorClientRBFRejected as _n, messageHashCkbSecp256k1 as _r, Transaction as _t, JsonRpcBlock as a, waitForAvailability as aa, HASH_CKB_LENGTH as ai, ClientIndexerSearchKey as an, SignerDogeAddressReadonly as ar, CellLike as at, JsonRpcTransaction as b, numFrom as ba, CodecByte32 as bi, ErrorClientWaitTransactionTimeout as bn, verifyMessageCkbSecp256k1 as br, WitnessArgsLike as bt, JsonRpcCellDep as c, OwnerRefCount as ca, hashCkb as ci, ClientIndexerSearchKeyLike as cn, SignerMultisigCkbPrivateKey as cr, CellOutputVec as ct, JsonRpcDepType as d, OwnerMoved as da, FixedPoint as di, ClientTransactionResponse as dn, SignerMultisigCkbReadonly as dr, DepTypeLike as dt, isWebview as ea, JsonRpcPayload as ei, ClientBlockUncle as en, SignerAlwaysError as er, CellDepLike as et, JsonRpcHashType as f, AbstractConstructor as fa, FixedPointLike as fi, ClientTransactionResponseLike as fn, SignerCkbScriptReadonly as fr, OutPoint as ft, JsonRpcIndexerSearchKeyFilter as g, Num as ga, fixedPointToString as gi, ErrorClientMaxFeeRateExceeded as gn, SECP256K1_SIGNATURE_LENGTH as gr, SinceLike as gt, JsonRpcIndexerSearchKey as h, abortSignalToPromise as ha, fixedPointFrom as hi, ErrorClientDuplicatedTransaction as hn, SignerCkbAlwaysSuccess as hr, Since as ht, JsonRpcTransformers as i, stringify as ia, HasherKeecak256 as ii, ClientFindTransactionsResponse as in, SignerDogePrivateKey as ir, CellInputVec as it, DEP_TYPES as j, ContextType as ja, CodecUint256 as ji, buildNostrEventFromMessage as jn, Signature as jr, HashTypeLike as jt, filterScript as k, Codec as ka, CodecUint16BE as ki, clientSearchKeyRangeFrom as kn, SignerBtc as kr, HashType as kt, JsonRpcCellInput as l, OwnerAggregated as la, hashCkbShort as li, ClientIndexerSearchKeyTransaction as ln, MultisigCkbWitness as lr, DepType as lt, JsonRpcIndexerFindTransactionsResponse as m, abortSignalAny as ma, Zero as mi, ErrorClientBaseLike as mn, SignerCkbPublicKey as mr, RawTransaction as mt, jsonRpcTransportFromUri as n, retry as na, JsonRpcTransport as ni, ClientFindCellsResponse as nn, messageHashDogeEcdsa as nr, CellInput as nt, JsonRpcBlockHeader as o, Proxy as oa, HASH_CKB_SHORT_LENGTH as oi, ClientIndexerSearchKeyFilter as on, SignerDoge as or, CellOutput as ot, JsonRpcIndexerFindTransactionsGroupedResponse as p, Constructor as pa, One as pi, ErrorClientBase as pn, SignerCkbPrivateKey as pr, OutPointLike as pt, ErrorTransactionInsufficientCapacity as q, bytesTo as qa, Entity as qi, SignerJsonRpcInfoPayload as qn, RequestorJsonRpcConfig as qr, epochToHex as qt, CKB_BLAKE2B_PERSONAL as r, sleep as ra, JsonRpcTransportRequestOptions as ri, ClientFindTransactionsGroupedResponse as rn, verifyMessageDogeEcdsa as rr, CellInputLike as rt, JsonRpcBlockUncle as s, OwnerUnique as sa, HasherCkb as si, ClientIndexerSearchKeyFilterLike as sn, verifyMessageJoyId as sr, CellOutputLike as st, advancedBarrel_d_exports as t, reduceAsync as ta, JsonRpcResponse as ti, ClientBlockUncleLike as tn, SignerDummy as tr, CellDepVec as tt, JsonRpcCellOutput as u, Owner as ua, Hasher as ui, ClientIndexerSearchKeyTransactionLike as un, MultisigCkbWitnessLike as ur, DepTypeCodec as ut, JsonRpcOutPoint as v, numBeFromBytes as va, CodecByte as vi, ErrorClientResolveUnknown as vn, recoverMessageSecp256k1 as vr, TransactionLike as vt, DEFAULT_CONFIRMED_BLOCK_TIME as w, numMax as wa, CodecRaw as wi, TransactionStatus as wn, btcPublicKeyFromP2pkhAddress as wr, depTypeFromBytes as wt, TESTNET_SCRIPTS as x, numFromBytes as xa, CodecByte4 as xi, OutputsValidator as xn, verifyMessageSecp256k1 as xr, calcDaoClaimEpoch as xt, JsonRpcScript as y, numBeToBytes as ya, CodecByte16 as yi, ErrorClientVerification as yn, signMessageSecp256k1 as yr, WitnessArgs as yt, addressFromPayload as z, bytesLenUnsafe as za, CodecUint512LE as zi, SignerJsonRpcConfig as zn, InputToSign as zr, AddressResolver as zt };
7728
+ //# sourceMappingURL=advancedBarrel-BS4zFcFI.d.ts.map