@ckb-ccc/core 0.1.1 → 1.0.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.
- package/CHANGELOG.md +12 -0
- package/dist/barrel.d.ts +1 -1
- package/dist/barrel.d.ts.map +1 -1
- package/dist/barrel.js +1 -1
- package/dist/bytes/index.d.ts +14 -0
- package/dist/bytes/index.d.ts.map +1 -1
- package/dist/bytes/index.js +29 -0
- package/dist/ckb/advanced.d.ts +0 -1
- package/dist/ckb/advanced.d.ts.map +1 -1
- package/dist/ckb/advanced.js +0 -1
- package/dist/ckb/script.d.ts +17 -58
- package/dist/ckb/script.d.ts.map +1 -1
- package/dist/ckb/script.js +31 -78
- package/dist/ckb/transaction.d.ts +114 -260
- package/dist/ckb/transaction.d.ts.map +1 -1
- package/dist/ckb/transaction.js +162 -358
- package/dist/molecule/barrel.d.ts +4 -0
- package/dist/molecule/barrel.d.ts.map +1 -0
- package/dist/molecule/barrel.js +3 -0
- package/dist/molecule/codec.d.ts.map +1 -1
- package/dist/molecule/codec.js +6 -3
- package/dist/molecule/entity.d.ts +98 -0
- package/dist/molecule/entity.d.ts.map +1 -0
- package/dist/molecule/entity.js +113 -0
- package/dist/molecule/index.d.ts +1 -2
- package/dist/molecule/index.d.ts.map +1 -1
- package/dist/molecule/index.js +1 -2
- package/dist/molecule/predefined.d.ts +13 -20
- package/dist/molecule/predefined.d.ts.map +1 -1
- package/dist/molecule/predefined.js +14 -54
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist.commonjs/address/address.advanced.js +28 -23
- package/dist.commonjs/address/advanced.js +17 -1
- package/dist.commonjs/address/index.js +15 -11
- package/dist.commonjs/advanced.js +31 -2
- package/dist.commonjs/advancedBarrel.js +21 -5
- package/dist.commonjs/barrel.d.ts +1 -1
- package/dist.commonjs/barrel.d.ts.map +1 -1
- package/dist.commonjs/barrel.js +28 -12
- package/dist.commonjs/bytes/advanced.js +2 -1
- package/dist.commonjs/bytes/index.d.ts +14 -0
- package/dist.commonjs/bytes/index.d.ts.map +1 -1
- package/dist.commonjs/bytes/index.js +42 -7
- package/dist.commonjs/ckb/advanced.d.ts +0 -1
- package/dist.commonjs/ckb/advanced.d.ts.map +1 -1
- package/dist.commonjs/ckb/advanced.js +18 -3
- package/dist.commonjs/ckb/index.js +19 -3
- package/dist.commonjs/ckb/script.advanced.js +6 -3
- package/dist.commonjs/ckb/script.d.ts +17 -58
- package/dist.commonjs/ckb/script.d.ts.map +1 -1
- package/dist.commonjs/ckb/script.js +49 -90
- package/dist.commonjs/ckb/transaction.advanced.js +6 -3
- package/dist.commonjs/ckb/transaction.d.ts +114 -260
- package/dist.commonjs/ckb/transaction.d.ts.map +1 -1
- package/dist.commonjs/ckb/transaction.js +249 -434
- package/dist.commonjs/ckb/transactionLumos.js +2 -1
- package/dist.commonjs/client/advanced.js +22 -6
- package/dist.commonjs/client/cache/advanced.js +17 -1
- package/dist.commonjs/client/cache/cache.js +7 -3
- package/dist.commonjs/client/cache/index.js +18 -2
- package/dist.commonjs/client/cache/memory.advanced.js +28 -21
- package/dist.commonjs/client/cache/memory.js +23 -19
- package/dist.commonjs/client/client.js +25 -21
- package/dist.commonjs/client/clientPublicMainnet.advanced.js +25 -22
- package/dist.commonjs/client/clientPublicMainnet.js +15 -8
- package/dist.commonjs/client/clientPublicTestnet.advanced.js +25 -22
- package/dist.commonjs/client/clientPublicTestnet.js +15 -8
- package/dist.commonjs/client/clientTypes.advanced.js +6 -3
- package/dist.commonjs/client/clientTypes.js +43 -29
- package/dist.commonjs/client/index.js +22 -6
- package/dist.commonjs/client/jsonRpc/advanced.js +18 -2
- package/dist.commonjs/client/jsonRpc/index.js +41 -37
- package/dist.commonjs/client/jsonRpc/transformers.js +61 -57
- package/dist.commonjs/client/jsonRpc/types.js +2 -1
- package/dist.commonjs/client/transports/advanced.js +25 -8
- package/dist.commonjs/client/transports/http.js +5 -1
- package/dist.commonjs/client/transports/transport.js +2 -1
- package/dist.commonjs/client/transports/webSocket.js +10 -3
- package/dist.commonjs/fixedPoint/index.js +9 -4
- package/dist.commonjs/hasher/advanced.js +4 -1
- package/dist.commonjs/hasher/hasher.js +2 -1
- package/dist.commonjs/hasher/hasherCkb.js +20 -14
- package/dist.commonjs/hasher/hasherKeecak256.js +11 -7
- package/dist.commonjs/hasher/index.js +19 -3
- package/dist.commonjs/hex/index.js +6 -3
- package/dist.commonjs/index.js +31 -2
- package/dist.commonjs/keystore/index.js +25 -21
- package/dist.commonjs/molecule/barrel.d.ts +4 -0
- package/dist.commonjs/molecule/barrel.d.ts.map +1 -0
- package/dist.commonjs/molecule/barrel.js +19 -0
- package/dist.commonjs/molecule/codec.d.ts.map +1 -1
- package/dist.commonjs/molecule/codec.js +69 -51
- package/dist.commonjs/molecule/entity.d.ts +98 -0
- package/dist.commonjs/molecule/entity.d.ts.map +1 -0
- package/dist.commonjs/molecule/entity.js +118 -0
- package/dist.commonjs/molecule/index.d.ts +1 -2
- package/dist.commonjs/molecule/index.d.ts.map +1 -1
- package/dist.commonjs/molecule/index.js +27 -2
- package/dist.commonjs/molecule/predefined.d.ts +13 -20
- package/dist.commonjs/molecule/predefined.d.ts.map +1 -1
- package/dist.commonjs/molecule/predefined.js +54 -91
- package/dist.commonjs/num/index.js +29 -17
- package/dist.commonjs/signer/btc/index.js +19 -3
- package/dist.commonjs/signer/btc/signerBtc.js +24 -20
- package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.js +8 -4
- package/dist.commonjs/signer/btc/verify.js +26 -17
- package/dist.commonjs/signer/ckb/index.js +21 -5
- package/dist.commonjs/signer/ckb/signerCkbPrivateKey.js +20 -16
- package/dist.commonjs/signer/ckb/signerCkbPublicKey.js +24 -20
- package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.js +12 -8
- package/dist.commonjs/signer/ckb/verifyCkbSecp256k1.js +16 -12
- package/dist.commonjs/signer/ckb/verifyJoyId.js +8 -5
- package/dist.commonjs/signer/doge/index.js +20 -4
- package/dist.commonjs/signer/doge/signerDoge.js +26 -19
- package/dist.commonjs/signer/doge/signerDogeAddressReadonly.js +6 -2
- package/dist.commonjs/signer/doge/signerDogePrivateKey.js +17 -13
- package/dist.commonjs/signer/doge/verify.js +15 -12
- package/dist.commonjs/signer/dummy/alwaysError.js +6 -2
- package/dist.commonjs/signer/dummy/dummy.js +7 -3
- package/dist.commonjs/signer/dummy/index.js +19 -3
- package/dist.commonjs/signer/dummy/openLink.js +6 -2
- package/dist.commonjs/signer/evm/index.js +19 -3
- package/dist.commonjs/signer/evm/signerEvm.js +35 -31
- package/dist.commonjs/signer/evm/signerEvmAddressReadonly.js +8 -4
- package/dist.commonjs/signer/evm/verify.js +7 -4
- package/dist.commonjs/signer/index.js +23 -7
- package/dist.commonjs/signer/nostr/index.js +18 -2
- package/dist.commonjs/signer/nostr/signerNostr.js +25 -21
- package/dist.commonjs/signer/nostr/verify.js +16 -12
- package/dist.commonjs/signer/signer/index.js +25 -19
- package/dist.commonjs/utils/index.d.ts +3 -0
- package/dist.commonjs/utils/index.d.ts.map +1 -1
- package/dist.commonjs/utils/index.js +12 -6
- package/package.json +1 -2
- package/src/barrel.ts +1 -1
- package/src/bytes/index.ts +34 -0
- package/src/ckb/advanced.ts +0 -1
- package/src/ckb/script.ts +22 -85
- package/src/ckb/transaction.ts +134 -412
- package/src/molecule/barrel.ts +3 -0
- package/src/molecule/codec.ts +9 -5
- package/src/molecule/entity.ts +163 -0
- package/src/molecule/index.ts +1 -2
- package/src/molecule/predefined.ts +20 -69
- package/src/utils/index.ts +5 -0
- package/dist/ckb/molecule.advanced/generated.d.ts +0 -355
- package/dist/ckb/molecule.advanced/generated.d.ts.map +0 -1
- package/dist/ckb/molecule.advanced/generated.js +0 -1468
- package/dist/ckb/molecule.advanced/index.d.ts +0 -6
- package/dist/ckb/molecule.advanced/index.d.ts.map +0 -1
- package/dist/ckb/molecule.advanced/index.js +0 -7
- package/dist.commonjs/ckb/molecule.advanced/generated.d.ts +0 -355
- package/dist.commonjs/ckb/molecule.advanced/generated.d.ts.map +0 -1
- package/dist.commonjs/ckb/molecule.advanced/generated.js +0 -1468
- package/dist.commonjs/ckb/molecule.advanced/index.d.ts +0 -6
- package/dist.commonjs/ckb/molecule.advanced/index.d.ts.map +0 -1
- package/dist.commonjs/ckb/molecule.advanced/index.js +0 -7
- package/src/ckb/molecule.advanced/blockchain.mol +0 -118
- package/src/ckb/molecule.advanced/generated.d.ts +0 -444
- package/src/ckb/molecule.advanced/generated.js +0 -1804
- package/src/ckb/molecule.advanced/index.ts +0 -11
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ckb/molecule.advanced/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAE/B,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE;IAClC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC,CAAC;CAChB,GAAG,CAAC,GAAG,SAAS,CAKhB"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/* Basic Types */
|
|
2
|
-
|
|
3
|
-
// The `UintN` is used to store a `N` bits unsigned integer
|
|
4
|
-
// as a byte array in little endian.
|
|
5
|
-
array Uint32 [byte; 4];
|
|
6
|
-
array Uint64 [byte; 8];
|
|
7
|
-
array Uint128 [byte; 16];
|
|
8
|
-
array Byte32 [byte; 32];
|
|
9
|
-
array Uint256 [byte; 32];
|
|
10
|
-
|
|
11
|
-
vector Bytes <byte>;
|
|
12
|
-
option BytesOpt (Bytes);
|
|
13
|
-
vector BytesOptVec <BytesOpt>;
|
|
14
|
-
vector BytesVec <Bytes>;
|
|
15
|
-
vector Byte32Vec <Byte32>;
|
|
16
|
-
|
|
17
|
-
/* Types for Chain */
|
|
18
|
-
|
|
19
|
-
option ScriptOpt (Script);
|
|
20
|
-
|
|
21
|
-
array ProposalShortId [byte; 10];
|
|
22
|
-
|
|
23
|
-
vector UncleBlockVec <UncleBlock>;
|
|
24
|
-
vector TransactionVec <Transaction>;
|
|
25
|
-
vector ProposalShortIdVec <ProposalShortId>;
|
|
26
|
-
vector CellDepVec <CellDep>;
|
|
27
|
-
vector CellInputVec <CellInput>;
|
|
28
|
-
vector CellOutputVec <CellOutput>;
|
|
29
|
-
|
|
30
|
-
table Script {
|
|
31
|
-
codeHash: Byte32,
|
|
32
|
-
hashType: byte,
|
|
33
|
-
args: Bytes,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
struct OutPoint {
|
|
37
|
-
txHash: Byte32,
|
|
38
|
-
index: Uint32,
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
struct CellInput {
|
|
42
|
-
since: Uint64,
|
|
43
|
-
previousOutput: OutPoint,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
table CellOutput {
|
|
47
|
-
capacity: Uint64,
|
|
48
|
-
lock: Script,
|
|
49
|
-
type: ScriptOpt,
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
struct CellDep {
|
|
53
|
-
outPoint: OutPoint,
|
|
54
|
-
depType: byte,
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
table RawTransaction {
|
|
58
|
-
version: Uint32,
|
|
59
|
-
cellDeps: CellDepVec,
|
|
60
|
-
headerDeps: Byte32Vec,
|
|
61
|
-
inputs: CellInputVec,
|
|
62
|
-
outputs: CellOutputVec,
|
|
63
|
-
outputsData: BytesVec,
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
table Transaction {
|
|
67
|
-
raw: RawTransaction,
|
|
68
|
-
witnesses: BytesVec,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
struct RawHeader {
|
|
72
|
-
version: Uint32,
|
|
73
|
-
compactTarget: Uint32,
|
|
74
|
-
timestamp: Uint64,
|
|
75
|
-
number: Uint64,
|
|
76
|
-
epoch: Uint64,
|
|
77
|
-
parentHash: Byte32,
|
|
78
|
-
transactionsRoot: Byte32,
|
|
79
|
-
proposalsHash: Byte32,
|
|
80
|
-
extraHash: Byte32,
|
|
81
|
-
dao: Byte32,
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
struct Header {
|
|
85
|
-
raw: RawHeader,
|
|
86
|
-
nonce: Uint128,
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
table UncleBlock {
|
|
90
|
-
header: Header,
|
|
91
|
-
proposals: ProposalShortIdVec,
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
table Block {
|
|
95
|
-
header: Header,
|
|
96
|
-
uncles: UncleBlockVec,
|
|
97
|
-
transactions: TransactionVec,
|
|
98
|
-
proposals: ProposalShortIdVec,
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
table BlockV1 {
|
|
102
|
-
header: Header,
|
|
103
|
-
uncles: UncleBlockVec,
|
|
104
|
-
transactions: TransactionVec,
|
|
105
|
-
proposals: ProposalShortIdVec,
|
|
106
|
-
extension: Bytes,
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
table CellbaseWitness {
|
|
110
|
-
lock: Script,
|
|
111
|
-
message: Bytes,
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
table WitnessArgs {
|
|
115
|
-
lock: BytesOpt, // Lock args
|
|
116
|
-
inputType: BytesOpt, // Type args for input
|
|
117
|
-
outputType: BytesOpt, // Type args for output
|
|
118
|
-
}
|
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
export interface CastToArrayBuffer {
|
|
4
|
-
toArrayBuffer(): ArrayBuffer;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type CanCastToArrayBuffer = ArrayBuffer | CastToArrayBuffer;
|
|
8
|
-
|
|
9
|
-
export interface CreateOptions {
|
|
10
|
-
validate?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface UnionType {
|
|
14
|
-
type: string;
|
|
15
|
-
value: any;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type Uint32Type = CanCastToArrayBuffer;
|
|
19
|
-
|
|
20
|
-
export type Uint64Type = CanCastToArrayBuffer;
|
|
21
|
-
|
|
22
|
-
export type Uint128Type = CanCastToArrayBuffer;
|
|
23
|
-
|
|
24
|
-
export type Byte32Type = CanCastToArrayBuffer;
|
|
25
|
-
|
|
26
|
-
export type Uint256Type = CanCastToArrayBuffer;
|
|
27
|
-
|
|
28
|
-
export type BytesType = CanCastToArrayBuffer;
|
|
29
|
-
|
|
30
|
-
export type BytesOptType = BytesType | undefined;
|
|
31
|
-
|
|
32
|
-
export type BytesOptVecType = BytesOptType[];
|
|
33
|
-
|
|
34
|
-
export type BytesVecType = BytesType[];
|
|
35
|
-
|
|
36
|
-
export type Byte32VecType = Byte32Type[];
|
|
37
|
-
|
|
38
|
-
export type ScriptOptType = ScriptType | undefined;
|
|
39
|
-
|
|
40
|
-
export type ProposalShortIdType = CanCastToArrayBuffer;
|
|
41
|
-
|
|
42
|
-
export type UncleBlockVecType = UncleBlockType[];
|
|
43
|
-
|
|
44
|
-
export type TransactionVecType = TransactionType[];
|
|
45
|
-
|
|
46
|
-
export type ProposalShortIdVecType = ProposalShortIdType[];
|
|
47
|
-
|
|
48
|
-
export type CellDepVecType = CellDepType[];
|
|
49
|
-
|
|
50
|
-
export type CellInputVecType = CellInputType[];
|
|
51
|
-
|
|
52
|
-
export type CellOutputVecType = CellOutputType[];
|
|
53
|
-
|
|
54
|
-
export interface ScriptType {
|
|
55
|
-
codeHash: Byte32Type;
|
|
56
|
-
hashType: CanCastToArrayBuffer;
|
|
57
|
-
args: BytesType;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface OutPointType {
|
|
61
|
-
txHash: Byte32Type;
|
|
62
|
-
index: Uint32Type;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface CellInputType {
|
|
66
|
-
since: Uint64Type;
|
|
67
|
-
previousOutput: OutPointType;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface CellOutputType {
|
|
71
|
-
capacity: Uint64Type;
|
|
72
|
-
lock: ScriptType;
|
|
73
|
-
type?: ScriptType;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface CellDepType {
|
|
77
|
-
outPoint: OutPointType;
|
|
78
|
-
depType: CanCastToArrayBuffer;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface RawTransactionType {
|
|
82
|
-
version: Uint32Type;
|
|
83
|
-
cellDeps: CellDepVecType;
|
|
84
|
-
headerDeps: Byte32VecType;
|
|
85
|
-
inputs: CellInputVecType;
|
|
86
|
-
outputs: CellOutputVecType;
|
|
87
|
-
outputsData: BytesVecType;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface TransactionType {
|
|
91
|
-
raw: RawTransactionType;
|
|
92
|
-
witnesses: BytesVecType;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface RawHeaderType {
|
|
96
|
-
version: Uint32Type;
|
|
97
|
-
compactTarget: Uint32Type;
|
|
98
|
-
timestamp: Uint64Type;
|
|
99
|
-
number: Uint64Type;
|
|
100
|
-
epoch: Uint64Type;
|
|
101
|
-
parentHash: Byte32Type;
|
|
102
|
-
transactionsRoot: Byte32Type;
|
|
103
|
-
proposalsHash: Byte32Type;
|
|
104
|
-
extraHash: Byte32Type;
|
|
105
|
-
dao: Byte32Type;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface HeaderType {
|
|
109
|
-
raw: RawHeaderType;
|
|
110
|
-
nonce: Uint128Type;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface UncleBlockType {
|
|
114
|
-
header: HeaderType;
|
|
115
|
-
proposals: ProposalShortIdVecType;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface BlockType {
|
|
119
|
-
header: HeaderType;
|
|
120
|
-
uncles: UncleBlockVecType;
|
|
121
|
-
transactions: TransactionVecType;
|
|
122
|
-
proposals: ProposalShortIdVecType;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export interface BlockV1Type {
|
|
126
|
-
header: HeaderType;
|
|
127
|
-
uncles: UncleBlockVecType;
|
|
128
|
-
transactions: TransactionVecType;
|
|
129
|
-
proposals: ProposalShortIdVecType;
|
|
130
|
-
extension: BytesType;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export interface CellbaseWitnessType {
|
|
134
|
-
lock: ScriptType;
|
|
135
|
-
message: BytesType;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface WitnessArgsType {
|
|
139
|
-
lock?: BytesType;
|
|
140
|
-
inputType?: BytesType;
|
|
141
|
-
outputType?: BytesType;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export function SerializeUint32(value: CanCastToArrayBuffer): ArrayBuffer;
|
|
145
|
-
export class Uint32 {
|
|
146
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
147
|
-
validate(compatible?: boolean): void;
|
|
148
|
-
indexAt(i: number): number;
|
|
149
|
-
raw(): ArrayBuffer;
|
|
150
|
-
toBigEndianUint32(): number;
|
|
151
|
-
toLittleEndianUint32(): number;
|
|
152
|
-
static size(): Number;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function SerializeUint64(value: CanCastToArrayBuffer): ArrayBuffer;
|
|
156
|
-
export class Uint64 {
|
|
157
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
158
|
-
validate(compatible?: boolean): void;
|
|
159
|
-
indexAt(i: number): number;
|
|
160
|
-
raw(): ArrayBuffer;
|
|
161
|
-
static size(): Number;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function SerializeUint128(value: CanCastToArrayBuffer): ArrayBuffer;
|
|
165
|
-
export class Uint128 {
|
|
166
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
167
|
-
validate(compatible?: boolean): void;
|
|
168
|
-
indexAt(i: number): number;
|
|
169
|
-
raw(): ArrayBuffer;
|
|
170
|
-
static size(): Number;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export function SerializeByte32(value: CanCastToArrayBuffer): ArrayBuffer;
|
|
174
|
-
export class Byte32 {
|
|
175
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
176
|
-
validate(compatible?: boolean): void;
|
|
177
|
-
indexAt(i: number): number;
|
|
178
|
-
raw(): ArrayBuffer;
|
|
179
|
-
static size(): Number;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export function SerializeUint256(value: CanCastToArrayBuffer): ArrayBuffer;
|
|
183
|
-
export class Uint256 {
|
|
184
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
185
|
-
validate(compatible?: boolean): void;
|
|
186
|
-
indexAt(i: number): number;
|
|
187
|
-
raw(): ArrayBuffer;
|
|
188
|
-
static size(): Number;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function SerializeBytes(value: CanCastToArrayBuffer): ArrayBuffer;
|
|
192
|
-
export class Bytes {
|
|
193
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
194
|
-
validate(compatible?: boolean): void;
|
|
195
|
-
indexAt(i: number): number;
|
|
196
|
-
raw(): ArrayBuffer;
|
|
197
|
-
length(): number;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export function SerializeBytesOpt(value: BytesType | null): ArrayBuffer;
|
|
201
|
-
export class BytesOpt {
|
|
202
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
203
|
-
validate(compatible?: boolean): void;
|
|
204
|
-
value(): Bytes;
|
|
205
|
-
hasValue(): boolean;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export function SerializeBytesOptVec(value: Array<BytesOptType>): ArrayBuffer;
|
|
209
|
-
export class BytesOptVec {
|
|
210
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
211
|
-
validate(compatible?: boolean): void;
|
|
212
|
-
indexAt(i: number): BytesOpt;
|
|
213
|
-
length(): number;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export function SerializeBytesVec(value: Array<BytesType>): ArrayBuffer;
|
|
217
|
-
export class BytesVec {
|
|
218
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
219
|
-
validate(compatible?: boolean): void;
|
|
220
|
-
indexAt(i: number): Bytes;
|
|
221
|
-
length(): number;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export function SerializeByte32Vec(value: Array<Byte32Type>): ArrayBuffer;
|
|
225
|
-
export class Byte32Vec {
|
|
226
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
227
|
-
validate(compatible?: boolean): void;
|
|
228
|
-
indexAt(i: number): Byte32;
|
|
229
|
-
length(): number;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export function SerializeScriptOpt(value: ScriptType | null): ArrayBuffer;
|
|
233
|
-
export class ScriptOpt {
|
|
234
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
235
|
-
validate(compatible?: boolean): void;
|
|
236
|
-
value(): Script;
|
|
237
|
-
hasValue(): boolean;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export function SerializeProposalShortId(
|
|
241
|
-
value: CanCastToArrayBuffer,
|
|
242
|
-
): ArrayBuffer;
|
|
243
|
-
export class ProposalShortId {
|
|
244
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
245
|
-
validate(compatible?: boolean): void;
|
|
246
|
-
indexAt(i: number): number;
|
|
247
|
-
raw(): ArrayBuffer;
|
|
248
|
-
static size(): Number;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export function SerializeUncleBlockVec(
|
|
252
|
-
value: Array<UncleBlockType>,
|
|
253
|
-
): ArrayBuffer;
|
|
254
|
-
export class UncleBlockVec {
|
|
255
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
256
|
-
validate(compatible?: boolean): void;
|
|
257
|
-
indexAt(i: number): UncleBlock;
|
|
258
|
-
length(): number;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export function SerializeTransactionVec(
|
|
262
|
-
value: Array<TransactionType>,
|
|
263
|
-
): ArrayBuffer;
|
|
264
|
-
export class TransactionVec {
|
|
265
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
266
|
-
validate(compatible?: boolean): void;
|
|
267
|
-
indexAt(i: number): Transaction;
|
|
268
|
-
length(): number;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export function SerializeProposalShortIdVec(
|
|
272
|
-
value: Array<ProposalShortIdType>,
|
|
273
|
-
): ArrayBuffer;
|
|
274
|
-
export class ProposalShortIdVec {
|
|
275
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
276
|
-
validate(compatible?: boolean): void;
|
|
277
|
-
indexAt(i: number): ProposalShortId;
|
|
278
|
-
length(): number;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export function SerializeCellDepVec(value: Array<CellDepType>): ArrayBuffer;
|
|
282
|
-
export class CellDepVec {
|
|
283
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
284
|
-
validate(compatible?: boolean): void;
|
|
285
|
-
indexAt(i: number): CellDep;
|
|
286
|
-
length(): number;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export function SerializeCellInputVec(value: Array<CellInputType>): ArrayBuffer;
|
|
290
|
-
export class CellInputVec {
|
|
291
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
292
|
-
validate(compatible?: boolean): void;
|
|
293
|
-
indexAt(i: number): CellInput;
|
|
294
|
-
length(): number;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export function SerializeCellOutputVec(
|
|
298
|
-
value: Array<CellOutputType>,
|
|
299
|
-
): ArrayBuffer;
|
|
300
|
-
export class CellOutputVec {
|
|
301
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
302
|
-
validate(compatible?: boolean): void;
|
|
303
|
-
indexAt(i: number): CellOutput;
|
|
304
|
-
length(): number;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export function SerializeScript(value: ScriptType): ArrayBuffer;
|
|
308
|
-
export class Script {
|
|
309
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
310
|
-
validate(compatible?: boolean): void;
|
|
311
|
-
getCodeHash(): Byte32;
|
|
312
|
-
getHashType(): number;
|
|
313
|
-
getArgs(): Bytes;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export function SerializeOutPoint(value: OutPointType): ArrayBuffer;
|
|
317
|
-
export class OutPoint {
|
|
318
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
319
|
-
validate(compatible?: boolean): void;
|
|
320
|
-
static size(): Number;
|
|
321
|
-
getTxHash(): Byte32;
|
|
322
|
-
getIndex(): Uint32;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export function SerializeCellInput(value: CellInputType): ArrayBuffer;
|
|
326
|
-
export class CellInput {
|
|
327
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
328
|
-
validate(compatible?: boolean): void;
|
|
329
|
-
static size(): Number;
|
|
330
|
-
getSince(): Uint64;
|
|
331
|
-
getPreviousOutput(): OutPoint;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export function SerializeCellOutput(value: CellOutputType): ArrayBuffer;
|
|
335
|
-
export class CellOutput {
|
|
336
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
337
|
-
validate(compatible?: boolean): void;
|
|
338
|
-
getCapacity(): Uint64;
|
|
339
|
-
getLock(): Script;
|
|
340
|
-
getType(): ScriptOpt;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export function SerializeCellDep(value: CellDepType): ArrayBuffer;
|
|
344
|
-
export class CellDep {
|
|
345
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
346
|
-
validate(compatible?: boolean): void;
|
|
347
|
-
static size(): Number;
|
|
348
|
-
getOutPoint(): OutPoint;
|
|
349
|
-
getDepType(): number;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export function SerializeRawTransaction(value: RawTransactionType): ArrayBuffer;
|
|
353
|
-
export class RawTransaction {
|
|
354
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
355
|
-
validate(compatible?: boolean): void;
|
|
356
|
-
getVersion(): Uint32;
|
|
357
|
-
getCellDeps(): CellDepVec;
|
|
358
|
-
getHeaderDeps(): Byte32Vec;
|
|
359
|
-
getInputs(): CellInputVec;
|
|
360
|
-
getOutputs(): CellOutputVec;
|
|
361
|
-
getOutputsData(): BytesVec;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
export function SerializeTransaction(value: TransactionType): ArrayBuffer;
|
|
365
|
-
export class Transaction {
|
|
366
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
367
|
-
validate(compatible?: boolean): void;
|
|
368
|
-
getRaw(): RawTransaction;
|
|
369
|
-
getWitnesses(): BytesVec;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
export function SerializeRawHeader(value: RawHeaderType): ArrayBuffer;
|
|
373
|
-
export class RawHeader {
|
|
374
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
375
|
-
validate(compatible?: boolean): void;
|
|
376
|
-
static size(): Number;
|
|
377
|
-
getVersion(): Uint32;
|
|
378
|
-
getCompactTarget(): Uint32;
|
|
379
|
-
getTimestamp(): Uint64;
|
|
380
|
-
getNumber(): Uint64;
|
|
381
|
-
getEpoch(): Uint64;
|
|
382
|
-
getParentHash(): Byte32;
|
|
383
|
-
getTransactionsRoot(): Byte32;
|
|
384
|
-
getProposalsHash(): Byte32;
|
|
385
|
-
getExtraHash(): Byte32;
|
|
386
|
-
getDao(): Byte32;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
export function SerializeHeader(value: HeaderType): ArrayBuffer;
|
|
390
|
-
export class Header {
|
|
391
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
392
|
-
validate(compatible?: boolean): void;
|
|
393
|
-
static size(): Number;
|
|
394
|
-
getRaw(): RawHeader;
|
|
395
|
-
getNonce(): Uint128;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export function SerializeUncleBlock(value: UncleBlockType): ArrayBuffer;
|
|
399
|
-
export class UncleBlock {
|
|
400
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
401
|
-
validate(compatible?: boolean): void;
|
|
402
|
-
getHeader(): Header;
|
|
403
|
-
getProposals(): ProposalShortIdVec;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
export function SerializeBlock(value: BlockType): ArrayBuffer;
|
|
407
|
-
export class Block {
|
|
408
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
409
|
-
validate(compatible?: boolean): void;
|
|
410
|
-
getHeader(): Header;
|
|
411
|
-
getUncles(): UncleBlockVec;
|
|
412
|
-
getTransactions(): TransactionVec;
|
|
413
|
-
getProposals(): ProposalShortIdVec;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
export function SerializeBlockV1(value: BlockV1Type): ArrayBuffer;
|
|
417
|
-
export class BlockV1 {
|
|
418
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
419
|
-
validate(compatible?: boolean): void;
|
|
420
|
-
getHeader(): Header;
|
|
421
|
-
getUncles(): UncleBlockVec;
|
|
422
|
-
getTransactions(): TransactionVec;
|
|
423
|
-
getProposals(): ProposalShortIdVec;
|
|
424
|
-
getExtension(): Bytes;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
export function SerializeCellbaseWitness(
|
|
428
|
-
value: CellbaseWitnessType,
|
|
429
|
-
): ArrayBuffer;
|
|
430
|
-
export class CellbaseWitness {
|
|
431
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
432
|
-
validate(compatible?: boolean): void;
|
|
433
|
-
getLock(): Script;
|
|
434
|
-
getMessage(): Bytes;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
export function SerializeWitnessArgs(value: WitnessArgsType): ArrayBuffer;
|
|
438
|
-
export class WitnessArgs {
|
|
439
|
-
constructor(reader: CanCastToArrayBuffer, options?: CreateOptions);
|
|
440
|
-
validate(compatible?: boolean): void;
|
|
441
|
-
getLock(): BytesOpt;
|
|
442
|
-
getInputType(): BytesOpt;
|
|
443
|
-
getOutputType(): BytesOpt;
|
|
444
|
-
}
|