koilib 5.5.2 → 5.5.4
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/dist/koinos.js +34 -18
- package/dist/koinos.min.js +1 -1
- package/package.json +4 -3
- package/src/Contract.ts +614 -0
- package/src/Provider.ts +512 -0
- package/src/Serializer.ts +366 -0
- package/src/Signer.ts +827 -0
- package/src/Transaction.ts +241 -0
- package/src/index.ts +9 -0
- package/src/index2.ts +17 -0
- package/src/indexUtils.ts +2 -0
- package/src/interface.ts +767 -0
- package/src/jsonDescriptors/chain-proto.json +726 -0
- package/src/jsonDescriptors/pow-proto.json +68 -0
- package/src/jsonDescriptors/token-proto.json +255 -0
- package/src/jsonDescriptors/value-proto.json +161 -0
- package/src/protoModules/protocol-proto.js +8138 -0
- package/src/protoModules/value-proto.js +1736 -0
- package/src/utils.ts +533 -0
- package/src/utilsNode.ts +378 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nested": {
|
|
3
|
+
"koinos": {
|
|
4
|
+
"nested": {
|
|
5
|
+
"contracts": {
|
|
6
|
+
"nested": {
|
|
7
|
+
"pow": {
|
|
8
|
+
"options": {
|
|
9
|
+
"go_package": "github.com/koinos/koinos-proto-golang/koinos/contracts/pow"
|
|
10
|
+
},
|
|
11
|
+
"nested": {
|
|
12
|
+
"difficulty_metadata": {
|
|
13
|
+
"fields": {
|
|
14
|
+
"target": {
|
|
15
|
+
"type": "bytes",
|
|
16
|
+
"id": 1
|
|
17
|
+
},
|
|
18
|
+
"last_block_time": {
|
|
19
|
+
"type": "uint64",
|
|
20
|
+
"id": 2,
|
|
21
|
+
"options": {
|
|
22
|
+
"jstype": "JS_STRING"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"difficulty": {
|
|
26
|
+
"type": "bytes",
|
|
27
|
+
"id": 3
|
|
28
|
+
},
|
|
29
|
+
"target_block_interval": {
|
|
30
|
+
"type": "uint64",
|
|
31
|
+
"id": 4,
|
|
32
|
+
"options": {
|
|
33
|
+
"jstype": "JS_STRING"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"get_difficulty_metadata_arguments": {
|
|
39
|
+
"fields": {}
|
|
40
|
+
},
|
|
41
|
+
"get_difficulty_metadata_result": {
|
|
42
|
+
"fields": {
|
|
43
|
+
"value": {
|
|
44
|
+
"type": "difficulty_metadata",
|
|
45
|
+
"id": 1
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"pow_signature_data": {
|
|
50
|
+
"fields": {
|
|
51
|
+
"nonce": {
|
|
52
|
+
"type": "bytes",
|
|
53
|
+
"id": 1
|
|
54
|
+
},
|
|
55
|
+
"recoverable_signature": {
|
|
56
|
+
"type": "bytes",
|
|
57
|
+
"id": 2
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nested": {
|
|
3
|
+
"koinos": {
|
|
4
|
+
"nested": {
|
|
5
|
+
"contracts": {
|
|
6
|
+
"nested": {
|
|
7
|
+
"token": {
|
|
8
|
+
"options": {
|
|
9
|
+
"go_package": "github.com/koinos/koinos-proto-golang/koinos/contracts/token"
|
|
10
|
+
},
|
|
11
|
+
"nested": {
|
|
12
|
+
"name_arguments": {
|
|
13
|
+
"fields": {}
|
|
14
|
+
},
|
|
15
|
+
"name_result": {
|
|
16
|
+
"fields": {
|
|
17
|
+
"value": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"id": 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"symbol_arguments": {
|
|
24
|
+
"fields": {}
|
|
25
|
+
},
|
|
26
|
+
"symbol_result": {
|
|
27
|
+
"fields": {
|
|
28
|
+
"value": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"id": 1
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"decimals_arguments": {
|
|
35
|
+
"fields": {}
|
|
36
|
+
},
|
|
37
|
+
"decimals_result": {
|
|
38
|
+
"fields": {
|
|
39
|
+
"value": {
|
|
40
|
+
"type": "uint32",
|
|
41
|
+
"id": 1
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"total_supply_arguments": {
|
|
46
|
+
"fields": {}
|
|
47
|
+
},
|
|
48
|
+
"total_supply_result": {
|
|
49
|
+
"fields": {
|
|
50
|
+
"value": {
|
|
51
|
+
"type": "uint64",
|
|
52
|
+
"id": 1,
|
|
53
|
+
"options": {
|
|
54
|
+
"jstype": "JS_STRING"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"balance_of_arguments": {
|
|
60
|
+
"fields": {
|
|
61
|
+
"owner": {
|
|
62
|
+
"type": "bytes",
|
|
63
|
+
"id": 1,
|
|
64
|
+
"options": {
|
|
65
|
+
"(btype)": "ADDRESS"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"balance_of_result": {
|
|
71
|
+
"fields": {
|
|
72
|
+
"value": {
|
|
73
|
+
"type": "uint64",
|
|
74
|
+
"id": 1,
|
|
75
|
+
"options": {
|
|
76
|
+
"jstype": "JS_STRING"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"transfer_arguments": {
|
|
82
|
+
"fields": {
|
|
83
|
+
"from": {
|
|
84
|
+
"type": "bytes",
|
|
85
|
+
"id": 1,
|
|
86
|
+
"options": {
|
|
87
|
+
"(btype)": "ADDRESS"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"to": {
|
|
91
|
+
"type": "bytes",
|
|
92
|
+
"id": 2,
|
|
93
|
+
"options": {
|
|
94
|
+
"(btype)": "ADDRESS"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"value": {
|
|
98
|
+
"type": "uint64",
|
|
99
|
+
"id": 3,
|
|
100
|
+
"options": {
|
|
101
|
+
"jstype": "JS_STRING"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"transfer_result": {
|
|
107
|
+
"fields": {}
|
|
108
|
+
},
|
|
109
|
+
"mint_arguments": {
|
|
110
|
+
"fields": {
|
|
111
|
+
"to": {
|
|
112
|
+
"type": "bytes",
|
|
113
|
+
"id": 1,
|
|
114
|
+
"options": {
|
|
115
|
+
"(btype)": "ADDRESS"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"value": {
|
|
119
|
+
"type": "uint64",
|
|
120
|
+
"id": 2,
|
|
121
|
+
"options": {
|
|
122
|
+
"jstype": "JS_STRING"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"mint_result": {
|
|
128
|
+
"fields": {}
|
|
129
|
+
},
|
|
130
|
+
"burn_arguments": {
|
|
131
|
+
"fields": {
|
|
132
|
+
"from": {
|
|
133
|
+
"type": "bytes",
|
|
134
|
+
"id": 1,
|
|
135
|
+
"options": {
|
|
136
|
+
"(btype)": "ADDRESS"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"value": {
|
|
140
|
+
"type": "uint64",
|
|
141
|
+
"id": 2,
|
|
142
|
+
"options": {
|
|
143
|
+
"jstype": "JS_STRING"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"burn_result": {
|
|
149
|
+
"fields": {}
|
|
150
|
+
},
|
|
151
|
+
"balance_object": {
|
|
152
|
+
"fields": {
|
|
153
|
+
"value": {
|
|
154
|
+
"type": "uint64",
|
|
155
|
+
"id": 1,
|
|
156
|
+
"options": {
|
|
157
|
+
"jstype": "JS_STRING"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"mana_balance_object": {
|
|
163
|
+
"fields": {
|
|
164
|
+
"balance": {
|
|
165
|
+
"type": "uint64",
|
|
166
|
+
"id": 1,
|
|
167
|
+
"options": {
|
|
168
|
+
"jstype": "JS_STRING"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"mana": {
|
|
172
|
+
"type": "uint64",
|
|
173
|
+
"id": 2,
|
|
174
|
+
"options": {
|
|
175
|
+
"jstype": "JS_STRING"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"last_mana_update": {
|
|
179
|
+
"type": "uint64",
|
|
180
|
+
"id": 3,
|
|
181
|
+
"options": {
|
|
182
|
+
"jstype": "JS_STRING"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"burn_event": {
|
|
188
|
+
"fields": {
|
|
189
|
+
"from": {
|
|
190
|
+
"type": "bytes",
|
|
191
|
+
"id": 1,
|
|
192
|
+
"options": {
|
|
193
|
+
"(btype)": "ADDRESS"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"value": {
|
|
197
|
+
"type": "uint64",
|
|
198
|
+
"id": 2,
|
|
199
|
+
"options": {
|
|
200
|
+
"jstype": "JS_STRING"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"mint_event": {
|
|
206
|
+
"fields": {
|
|
207
|
+
"to": {
|
|
208
|
+
"type": "bytes",
|
|
209
|
+
"id": 1,
|
|
210
|
+
"options": {
|
|
211
|
+
"(btype)": "ADDRESS"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"value": {
|
|
215
|
+
"type": "uint64",
|
|
216
|
+
"id": 2,
|
|
217
|
+
"options": {
|
|
218
|
+
"jstype": "JS_STRING"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"transfer_event": {
|
|
224
|
+
"fields": {
|
|
225
|
+
"from": {
|
|
226
|
+
"type": "bytes",
|
|
227
|
+
"id": 1,
|
|
228
|
+
"options": {
|
|
229
|
+
"(btype)": "ADDRESS"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"to": {
|
|
233
|
+
"type": "bytes",
|
|
234
|
+
"id": 2,
|
|
235
|
+
"options": {
|
|
236
|
+
"(btype)": "ADDRESS"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"value": {
|
|
240
|
+
"type": "uint64",
|
|
241
|
+
"id": 3,
|
|
242
|
+
"options": {
|
|
243
|
+
"jstype": "JS_STRING"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nested": {
|
|
3
|
+
"koinos": {
|
|
4
|
+
"nested": {
|
|
5
|
+
"chain": {
|
|
6
|
+
"options": {
|
|
7
|
+
"go_package": "github.com/koinos/koinos-proto-golang/koinos/protocol"
|
|
8
|
+
},
|
|
9
|
+
"nested": {
|
|
10
|
+
"value_type": {
|
|
11
|
+
"oneofs": {
|
|
12
|
+
"kind": {
|
|
13
|
+
"oneof": [
|
|
14
|
+
"message_value",
|
|
15
|
+
"double_value",
|
|
16
|
+
"float_value",
|
|
17
|
+
"int32_value",
|
|
18
|
+
"int64_value",
|
|
19
|
+
"uint32_value",
|
|
20
|
+
"uint64_value",
|
|
21
|
+
"sint32_value",
|
|
22
|
+
"sint64_value",
|
|
23
|
+
"fixed32_value",
|
|
24
|
+
"fixed64_value",
|
|
25
|
+
"sfixed32_value",
|
|
26
|
+
"sfixed64_value",
|
|
27
|
+
"bool_value",
|
|
28
|
+
"string_value",
|
|
29
|
+
"bytes_value"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"fields": {
|
|
34
|
+
"message_value": {
|
|
35
|
+
"type": "google.protobuf.Any",
|
|
36
|
+
"id": 1
|
|
37
|
+
},
|
|
38
|
+
"double_value": {
|
|
39
|
+
"type": "double",
|
|
40
|
+
"id": 2
|
|
41
|
+
},
|
|
42
|
+
"float_value": {
|
|
43
|
+
"type": "float",
|
|
44
|
+
"id": 3
|
|
45
|
+
},
|
|
46
|
+
"int32_value": {
|
|
47
|
+
"type": "int32",
|
|
48
|
+
"id": 4
|
|
49
|
+
},
|
|
50
|
+
"int64_value": {
|
|
51
|
+
"type": "int64",
|
|
52
|
+
"id": 5,
|
|
53
|
+
"options": {
|
|
54
|
+
"jstype": "JS_STRING"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"uint32_value": {
|
|
58
|
+
"type": "uint32",
|
|
59
|
+
"id": 6
|
|
60
|
+
},
|
|
61
|
+
"uint64_value": {
|
|
62
|
+
"type": "uint64",
|
|
63
|
+
"id": 7,
|
|
64
|
+
"options": {
|
|
65
|
+
"jstype": "JS_STRING"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"sint32_value": {
|
|
69
|
+
"type": "sint32",
|
|
70
|
+
"id": 8
|
|
71
|
+
},
|
|
72
|
+
"sint64_value": {
|
|
73
|
+
"type": "sint64",
|
|
74
|
+
"id": 9,
|
|
75
|
+
"options": {
|
|
76
|
+
"jstype": "JS_STRING"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"fixed32_value": {
|
|
80
|
+
"type": "fixed32",
|
|
81
|
+
"id": 10
|
|
82
|
+
},
|
|
83
|
+
"fixed64_value": {
|
|
84
|
+
"type": "fixed64",
|
|
85
|
+
"id": 11,
|
|
86
|
+
"options": {
|
|
87
|
+
"jstype": "JS_STRING"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"sfixed32_value": {
|
|
91
|
+
"type": "sfixed32",
|
|
92
|
+
"id": 12
|
|
93
|
+
},
|
|
94
|
+
"sfixed64_value": {
|
|
95
|
+
"type": "sfixed64",
|
|
96
|
+
"id": 13,
|
|
97
|
+
"options": {
|
|
98
|
+
"jstype": "JS_STRING"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"bool_value": {
|
|
102
|
+
"type": "bool",
|
|
103
|
+
"id": 14
|
|
104
|
+
},
|
|
105
|
+
"string_value": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"id": 15
|
|
108
|
+
},
|
|
109
|
+
"bytes_value": {
|
|
110
|
+
"type": "bytes",
|
|
111
|
+
"id": 16
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"enum_type": {
|
|
116
|
+
"fields": {
|
|
117
|
+
"name": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"id": 1
|
|
120
|
+
},
|
|
121
|
+
"number": {
|
|
122
|
+
"type": "int32",
|
|
123
|
+
"id": 2
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"list_type": {
|
|
128
|
+
"fields": {
|
|
129
|
+
"values": {
|
|
130
|
+
"rule": "repeated",
|
|
131
|
+
"type": "value_type",
|
|
132
|
+
"id": 1
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"google": {
|
|
141
|
+
"nested": {
|
|
142
|
+
"protobuf": {
|
|
143
|
+
"nested": {
|
|
144
|
+
"Any": {
|
|
145
|
+
"fields": {
|
|
146
|
+
"type_url": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"id": 1
|
|
149
|
+
},
|
|
150
|
+
"value": {
|
|
151
|
+
"type": "bytes",
|
|
152
|
+
"id": 2
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|