@ckb-lumos/base
Advanced tools
Comparing version 0.0.0-ckb2023-fe6c0e5-20230925085931 to 0.0.0-experimental-joyid-0855d00-20240319125140
@@ -64,5 +64,7 @@ import { Hash, Hexadecimal, HexNumber, HexString, PackedSince } from "./primitive"; | ||
} | ||
type Status = "pending" | "proposed" | "committed" | "unknown" | "rejected"; | ||
export interface TxStatus { | ||
status: Status; | ||
blockHash?: Hash; | ||
status: string; | ||
reason?: string; | ||
} | ||
@@ -69,0 +71,0 @@ export interface TransactionWithStatus<Tx = Transaction> { |
@@ -1,5 +0,4 @@ | ||
import { AnyCodec, BytesLike, PackParam, UnpackResult } from "@ckb-lumos/codec"; | ||
import { AnyCodec, BytesLike, PackParam, UnpackResult, number, molecule } from "@ckb-lumos/codec"; | ||
import { BytesCodec, FixedBytesCodec } from "@ckb-lumos/codec/lib/base"; | ||
import type * as api from "./api"; | ||
import { BI } from "@ckb-lumos/bi"; | ||
type TransactionCodecType = PackParam<typeof BaseTransaction>; | ||
@@ -21,6 +20,7 @@ type TransactionUnpackResultType = UnpackResult<typeof BaseTransaction>; | ||
export declare const Bytes: BytesCodec<string, BytesLike>; | ||
export declare const BytesOpt: import("@ckb-lumos/codec/lib/molecule/layout").OptionCodec<BytesCodec<string, BytesLike>>; | ||
export declare const BytesVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<string, BytesLike>>; | ||
export declare const BytesOpt: molecule.OptionLayoutCodec<BytesCodec<string, BytesLike>>; | ||
export declare const BytesVec: molecule.ArrayLayoutCodec<BytesCodec<string, BytesLike>>; | ||
export declare const BytesOptVec: molecule.ArrayLayoutCodec<molecule.OptionLayoutCodec<BytesCodec<string, BytesLike>>>; | ||
export declare const Byte32: FixedBytesCodec<string, BytesLike>; | ||
export declare const Byte32Vec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
export declare const Byte32Vec: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
export declare function WitnessArgsOf<LockCodec extends AnyCodec, InputTypeCodec extends AnyCodec, OutputTypeCodec extends AnyCodec>(payload: { | ||
@@ -72,3 +72,3 @@ lock: LockCodec; | ||
export declare const DepType: FixedBytesCodec<api.DepType, api.DepType>; | ||
export declare const Script: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const Script: molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -78,3 +78,3 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>; | ||
export declare const ScriptOpt: import("@ckb-lumos/codec/lib/molecule/layout").OptionCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const ScriptOpt: molecule.OptionLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -84,23 +84,23 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>>; | ||
export declare const OutPoint: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const OutPoint: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
export declare const CellInput: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
since: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
previousOutput: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellInput: molecule.ObjectLayoutCodec<{ | ||
since: FixedBytesCodec<string, number.BIish>; | ||
previousOutput: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
export declare const CellInputVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
since: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
previousOutput: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellInputVec: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
since: FixedBytesCodec<string, number.BIish>; | ||
previousOutput: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed>; | ||
export declare const CellOutput: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
capacity: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
lock: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellOutput: molecule.ObjectLayoutCodec<{ | ||
capacity: FixedBytesCodec<string, number.BIish>; | ||
lock: molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -110,3 +110,3 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>; | ||
type: import("@ckb-lumos/codec/lib/molecule/layout").OptionCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
type: molecule.OptionLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -117,5 +117,5 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>; | ||
export declare const CellOutputVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
capacity: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
lock: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellOutputVec: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
capacity: FixedBytesCodec<string, number.BIish>; | ||
lock: molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -125,3 +125,3 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>; | ||
type: import("@ckb-lumos/codec/lib/molecule/layout").OptionCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
type: molecule.OptionLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -132,36 +132,36 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>>; | ||
export declare const CellDep: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
outPoint: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellDep: molecule.ObjectLayoutCodec<{ | ||
outPoint: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
depType: FixedBytesCodec<api.DepType, api.DepType>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
export declare const CellDepVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
outPoint: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellDepVec: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
outPoint: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
depType: FixedBytesCodec<api.DepType, api.DepType>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed>; | ||
export declare const RawTransaction: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
version: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
cellDeps: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
outPoint: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const RawTransaction: molecule.ObjectLayoutCodec<{ | ||
version: FixedBytesCodec<string, number.BIish>; | ||
cellDeps: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
outPoint: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
depType: FixedBytesCodec<api.DepType, api.DepType>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed>; | ||
headerDeps: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
inputs: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
since: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
previousOutput: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
headerDeps: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
inputs: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
since: FixedBytesCodec<string, number.BIish>; | ||
previousOutput: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed>; | ||
outputs: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
capacity: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
lock: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
outputs: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
capacity: FixedBytesCodec<string, number.BIish>; | ||
lock: molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -171,3 +171,3 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>; | ||
type: import("@ckb-lumos/codec/lib/molecule/layout").OptionCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
type: molecule.OptionLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -178,25 +178,25 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>>; | ||
outputsData: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<string, BytesLike>>; | ||
outputsData: molecule.ArrayLayoutCodec<BytesCodec<string, BytesLike>>; | ||
}>; | ||
declare const BaseTransaction: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
raw: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
version: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
cellDeps: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
outPoint: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
declare const BaseTransaction: molecule.ObjectLayoutCodec<{ | ||
raw: molecule.ObjectLayoutCodec<{ | ||
version: FixedBytesCodec<string, number.BIish>; | ||
cellDeps: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
outPoint: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
depType: FixedBytesCodec<api.DepType, api.DepType>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed>; | ||
headerDeps: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
inputs: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
since: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
previousOutput: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
headerDeps: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
inputs: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
since: FixedBytesCodec<string, number.BIish>; | ||
previousOutput: molecule.ObjectLayoutCodec<{ | ||
txHash: FixedBytesCodec<string, BytesLike>; | ||
index: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
index: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed>; | ||
outputs: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
capacity: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
lock: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
outputs: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
capacity: FixedBytesCodec<string, number.BIish>; | ||
lock: molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -206,3 +206,3 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>; | ||
type: import("@ckb-lumos/codec/lib/molecule/layout").OptionCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
type: molecule.OptionLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -213,15 +213,15 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
}>>; | ||
outputsData: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<string, BytesLike>>; | ||
outputsData: molecule.ArrayLayoutCodec<BytesCodec<string, BytesLike>>; | ||
}>; | ||
witnesses: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<string, BytesLike>>; | ||
witnesses: molecule.ArrayLayoutCodec<BytesCodec<string, BytesLike>>; | ||
}>; | ||
export declare const Transaction: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -232,6 +232,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -242,22 +242,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -282,3 +282,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -305,10 +305,10 @@ codeHash: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -319,6 +319,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -329,22 +329,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -369,3 +369,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -394,11 +394,11 @@ codeHash: string; | ||
}, api.Transaction>; | ||
export declare const TransactionVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<Partial<Pick<{ | ||
version: number; | ||
export declare const TransactionVec: molecule.ArrayLayoutCodec<BytesCodec<Partial<Pick<{ | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -409,6 +409,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -419,22 +419,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -459,3 +459,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -482,10 +482,10 @@ codeHash: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -496,6 +496,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -506,22 +506,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -546,3 +546,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -571,8 +571,8 @@ codeHash: string; | ||
}, api.Transaction>>; | ||
export declare const RawHeader: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
version: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
compactTarget: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
timestamp: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
number: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
epoch: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
export declare const RawHeader: molecule.ObjectLayoutCodec<{ | ||
version: FixedBytesCodec<string, number.BIish>; | ||
compactTarget: FixedBytesCodec<string, number.BIish>; | ||
timestamp: FixedBytesCodec<string, number.BIish>; | ||
number: FixedBytesCodec<string, number.BIish>; | ||
epoch: FixedBytesCodec<string, number.BIish>; | ||
parentHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -584,9 +584,9 @@ transactionsRoot: FixedBytesCodec<string, BytesLike>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
export declare const BaseHeader: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
raw: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
version: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
compactTarget: FixedBytesCodec<number, import("@ckb-lumos/bi").BIish>; | ||
timestamp: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
number: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
epoch: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
export declare const BaseHeader: molecule.ObjectLayoutCodec<{ | ||
raw: molecule.ObjectLayoutCodec<{ | ||
version: FixedBytesCodec<string, number.BIish>; | ||
compactTarget: FixedBytesCodec<string, number.BIish>; | ||
timestamp: FixedBytesCodec<string, number.BIish>; | ||
number: FixedBytesCodec<string, number.BIish>; | ||
epoch: FixedBytesCodec<string, number.BIish>; | ||
parentHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -598,10 +598,10 @@ transactionsRoot: FixedBytesCodec<string, BytesLike>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
nonce: FixedBytesCodec<BI, import("@ckb-lumos/bi").BIish>; | ||
nonce: FixedBytesCodec<string, number.BIish>; | ||
}> & import("@ckb-lumos/codec/lib/base").Fixed; | ||
export declare const Header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -613,7 +613,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -625,14 +625,14 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
export declare const ProposalShortId: FixedBytesCodec<string, BytesLike>; | ||
export declare const ProposalShortIdVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
export declare const UncleBlock: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const ProposalShortIdVec: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
export declare const UncleBlock: molecule.ObjectLayoutCodec<{ | ||
header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -644,7 +644,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -656,14 +656,14 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
proposals: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
proposals: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
}>; | ||
export declare const UncleBlockVec: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const UncleBlockVec: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -675,7 +675,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -687,14 +687,14 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
proposals: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
proposals: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
}>>; | ||
export declare const Block: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const Block: molecule.ObjectLayoutCodec<{ | ||
header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -706,7 +706,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -718,12 +718,12 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
uncles: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
uncles: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -735,7 +735,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -747,16 +747,16 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
proposals: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
proposals: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
}>>; | ||
transactions: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<Partial<Pick<{ | ||
version: number; | ||
transactions: molecule.ArrayLayoutCodec<BytesCodec<Partial<Pick<{ | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -767,6 +767,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -777,22 +777,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -817,3 +817,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -840,10 +840,10 @@ codeHash: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -854,6 +854,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -864,22 +864,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -904,3 +904,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -929,11 +929,11 @@ codeHash: string; | ||
}, api.Transaction>>; | ||
proposals: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
proposals: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
}>; | ||
export declare const BlockV1: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const BlockV1: molecule.ObjectLayoutCodec<{ | ||
header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -945,7 +945,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -957,12 +957,12 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
uncles: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
uncles: molecule.ArrayLayoutCodec<molecule.ObjectLayoutCodec<{ | ||
header: BytesCodec<Partial<Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -974,7 +974,7 @@ transactionsRoot: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
compactTarget: number; | ||
timestamp: BI; | ||
number: BI; | ||
epoch: BI; | ||
version: string; | ||
compactTarget: string; | ||
timestamp: string; | ||
number: string; | ||
epoch: string; | ||
parentHash: string; | ||
@@ -986,16 +986,16 @@ transactionsRoot: string; | ||
}, "number" | "version" | "compactTarget" | "timestamp" | "epoch" | "parentHash" | "transactionsRoot" | "proposalsHash" | "extraHash" | "dao"> & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
}, api.Header>; | ||
proposals: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
proposals: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
}>>; | ||
transactions: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<BytesCodec<Partial<Pick<{ | ||
version: number; | ||
transactions: molecule.ArrayLayoutCodec<BytesCodec<Partial<Pick<{ | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -1006,6 +1006,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -1016,22 +1016,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -1056,3 +1056,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -1079,10 +1079,10 @@ codeHash: string; | ||
}, never>> & Pick<{ | ||
version: number; | ||
version: string; | ||
cellDeps: (Partial<Pick<{ | ||
outPoint: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -1093,6 +1093,6 @@ depType: api.DepType; | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
@@ -1103,22 +1103,22 @@ depType: api.DepType; | ||
inputs: (Partial<Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, never>> & Pick<{ | ||
since: BI; | ||
since: string; | ||
previousOutput: Partial<Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, never>> & Pick<{ | ||
txHash: string; | ||
index: number; | ||
index: string; | ||
}, "index" | "txHash">; | ||
}, "since" | "previousOutput">)[]; | ||
outputs: (Partial<Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -1143,3 +1143,3 @@ codeHash: string; | ||
}, "type">> & Pick<{ | ||
capacity: BI; | ||
capacity: string; | ||
lock: Partial<Pick<{ | ||
@@ -1168,7 +1168,7 @@ codeHash: string; | ||
}, api.Transaction>>; | ||
proposals: import("@ckb-lumos/codec/lib/molecule/layout").ArrayCodec<FixedBytesCodec<string, BytesLike>>; | ||
proposals: molecule.ArrayLayoutCodec<FixedBytesCodec<string, BytesLike>>; | ||
extension: BytesCodec<string, BytesLike>; | ||
}>; | ||
export declare const CellbaseWitness: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
lock: import("@ckb-lumos/codec/lib/molecule/layout").ObjectCodec<{ | ||
export declare const CellbaseWitness: molecule.ObjectLayoutCodec<{ | ||
lock: molecule.ObjectLayoutCodec<{ | ||
codeHash: FixedBytesCodec<string, BytesLike>; | ||
@@ -1215,3 +1215,3 @@ hashType: FixedBytesCodec<api.HashType, api.HashType>; | ||
export declare function deTransformHeaderCodecType(data: HeaderUnpackResultType): RawHeaderUnpackResultType & { | ||
nonce: BI; | ||
nonce: string; | ||
hash: string; | ||
@@ -1218,0 +1218,0 @@ }; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.WitnessArgs = exports.UncleBlockVec = exports.UncleBlock = exports.TransactionVec = exports.Transaction = exports.ScriptOpt = exports.Script = exports.RawTransaction = exports.RawHeader = exports.ProposalShortIdVec = exports.ProposalShortId = exports.OutPoint = exports.Header = exports.HashType = exports.DepType = exports.CellbaseWitness = exports.CellOutputVec = exports.CellOutput = exports.CellInputVec = exports.CellInput = exports.CellDepVec = exports.CellDep = exports.BytesVec = exports.BytesOpt = exports.Bytes = exports.Byte32Vec = exports.Byte32 = exports.BlockV1 = exports.Block = exports.BaseHeader = void 0; | ||
exports.WitnessArgs = exports.UncleBlockVec = exports.UncleBlock = exports.TransactionVec = exports.Transaction = exports.ScriptOpt = exports.Script = exports.RawTransaction = exports.RawHeader = exports.ProposalShortIdVec = exports.ProposalShortId = exports.OutPoint = exports.Header = exports.HashType = exports.DepType = exports.CellbaseWitness = exports.CellOutputVec = exports.CellOutput = exports.CellInputVec = exports.CellInput = exports.CellDepVec = exports.CellDep = exports.BytesVec = exports.BytesOptVec = exports.BytesOpt = exports.Bytes = exports.Byte32Vec = exports.Byte32 = exports.BlockV1 = exports.Block = exports.BaseHeader = void 0; | ||
exports.WitnessArgsOf = WitnessArgsOf; | ||
@@ -15,9 +15,14 @@ exports.createFixedHexBytesCodec = createFixedHexBytesCodec; | ||
var _codec = require("@ckb-lumos/codec"); | ||
var _bi = require("@ckb-lumos/bi"); | ||
function asHexadecimal(codec) { | ||
return { | ||
...codec, | ||
unpack: value => _bi.BI.from(codec.unpack(value)).toHexString() | ||
}; | ||
} | ||
const Uint8 = asHexadecimal(_codec.number.Uint8); | ||
const Uint32LE = asHexadecimal(_codec.number.Uint32LE); | ||
const Uint64LE = asHexadecimal(_codec.number.Uint64LE); | ||
const Uint128LE = asHexadecimal(_codec.number.Uint128LE); | ||
const { | ||
Uint128LE, | ||
Uint8, | ||
Uint32LE, | ||
Uint64LE | ||
} = _codec.number; | ||
const { | ||
byteVecOf, | ||
@@ -61,2 +66,4 @@ option, | ||
exports.BytesVec = BytesVec; | ||
const BytesOptVec = vector(BytesOpt); | ||
exports.BytesOptVec = BytesOptVec; | ||
const Byte32 = createFixedHexBytesCodec(32); | ||
@@ -111,11 +118,11 @@ exports.Byte32 = Byte32; | ||
// prettier-ignore | ||
if (type === "type") return Uint8.pack(0b0000000_1); | ||
if (type === "type") return _codec.number.Uint8.pack(0b0000000_1); | ||
// prettier-ignore | ||
if (type === "data") return Uint8.pack(0b0000000_0); | ||
if (type === "data1") return Uint8.pack(0b0000001_0); | ||
if (type === "data2") return Uint8.pack(0b0000010_0); | ||
if (type === "data") return _codec.number.Uint8.pack(0b0000000_0); | ||
if (type === "data1") return _codec.number.Uint8.pack(0b0000001_0); | ||
if (type === "data2") return _codec.number.Uint8.pack(0b0000010_0); | ||
throw new Error(`Invalid hash type: ${type}`); | ||
}, | ||
unpack: buf => { | ||
const hashTypeBuf = Uint8.unpack(buf); | ||
const hashTypeBuf = _codec.number.Uint8.unpack(buf); | ||
if (hashTypeBuf === 0b0000000_1) return "type"; | ||
@@ -137,3 +144,3 @@ if (hashTypeBuf === 0b0000000_0) return "data"; | ||
unpack: buf => { | ||
const depTypeBuf = Uint8.unpack(buf); | ||
const depTypeBuf = _codec.number.Uint8.unpack(buf); | ||
if (depTypeBuf === 0) return "code"; | ||
@@ -140,0 +147,0 @@ if (depTypeBuf === 1) return "depGroup"; |
@@ -65,2 +65,7 @@ /// <reference types="node" /> | ||
declare function isDeepEqual(a: any, b: any): boolean; | ||
/** | ||
* Generate a type script for type id {@link https://xuejie.space/2020_02_03_introduction_to_ckb_script_programming_type_id/} | ||
* @param input | ||
* @param outputIndex | ||
*/ | ||
declare function generateTypeIdScript(input: Input, outputIndex?: string): Script; | ||
@@ -67,0 +72,0 @@ declare function deepCamel(data: any): any; |
@@ -187,2 +187,8 @@ "use strict"; | ||
} | ||
/** | ||
* Generate a type script for type id {@link https://xuejie.space/2020_02_03_introduction_to_ckb_script_programming_type_id/} | ||
* @param input | ||
* @param outputIndex | ||
*/ | ||
function generateTypeIdScript(input, outputIndex = "0x0") { | ||
@@ -189,0 +195,0 @@ blockchain.CellInput.pack(input); |
{ | ||
"name": "@ckb-lumos/base", | ||
"version": "0.0.0-ckb2023-fe6c0e5-20230925085931", | ||
"version": "0.0.0-experimental-joyid-0855d00-20240319125140", | ||
"description": "Base data structures and utilities used in lumos", | ||
@@ -38,5 +38,5 @@ "author": "Xuejie Xiao <xxuejie@gmail.com>", | ||
"dependencies": { | ||
"@ckb-lumos/bi": "0.0.0-ckb2023-fe6c0e5-20230925085931", | ||
"@ckb-lumos/codec": "0.0.0-ckb2023-fe6c0e5-20230925085931", | ||
"@ckb-lumos/toolkit": "0.0.0-ckb2023-fe6c0e5-20230925085931", | ||
"@ckb-lumos/bi": "0.0.0-experimental-joyid-0855d00-20240319125140", | ||
"@ckb-lumos/codec": "0.0.0-experimental-joyid-0855d00-20240319125140", | ||
"@ckb-lumos/toolkit": "0.0.0-experimental-joyid-0855d00-20240319125140", | ||
"@types/blake2b": "^2.1.0", | ||
@@ -43,0 +43,0 @@ "@types/lodash.isequal": "^4.5.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3095
228533
+ Added@ckb-lumos/bi@0.0.0-experimental-joyid-0855d00-20240319125140(transitive)
+ Added@ckb-lumos/codec@0.0.0-experimental-joyid-0855d00-20240319125140(transitive)
+ Added@ckb-lumos/toolkit@0.0.0-experimental-joyid-0855d00-20240319125140(transitive)
- Removed@ckb-lumos/bi@0.0.0-ckb2023-fe6c0e5-20230925085931(transitive)
- Removed@ckb-lumos/codec@0.0.0-ckb2023-fe6c0e5-20230925085931(transitive)
- Removed@ckb-lumos/toolkit@0.0.0-ckb2023-fe6c0e5-20230925085931(transitive)
- Removedcross-fetch@3.2.0(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updated@ckb-lumos/bi@0.0.0-experimental-joyid-0855d00-20240319125140
Updated@ckb-lumos/codec@0.0.0-experimental-joyid-0855d00-20240319125140
Updated@ckb-lumos/toolkit@0.0.0-experimental-joyid-0855d00-20240319125140