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