@dfinity/nns-proto 0.0.1
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/LICENSE +201 -0
- package/README.md +5 -0
- package/dist/cjs/index.cjs.js +14 -0
- package/dist/cjs/index.cjs.js.map +7 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/proto/base_types.proto +60 -0
- package/dist/proto/base_types_pb.d.ts +144 -0
- package/dist/proto/base_types_pb.js +1148 -0
- package/dist/proto/governance.proto +292 -0
- package/dist/proto/governance_pb.d.ts +1065 -0
- package/dist/proto/governance_pb.js +7864 -0
- package/dist/proto/ledger.proto +277 -0
- package/dist/proto/ledger_pb.d.ts +911 -0
- package/dist/proto/ledger_pb.js +7157 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package ic_ledger.pb.v1;
|
|
4
|
+
|
|
5
|
+
import "base_types.proto";
|
|
6
|
+
|
|
7
|
+
// Annotations related to the use of hardware wallets. The annotated messages are
|
|
8
|
+
// parsed on hardware wallets and marked fields are displayed in a trusted user
|
|
9
|
+
// interface (TUI). We must not, for instance, add fields that would change the
|
|
10
|
+
// semantics of the message such that old hardware wallets would not display
|
|
11
|
+
// appropriate information to users.
|
|
12
|
+
|
|
13
|
+
// ** LEDGER CANISTER ENDPOINTS
|
|
14
|
+
|
|
15
|
+
// Make a payment
|
|
16
|
+
message SendRequest {
|
|
17
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
18
|
+
Memo memo = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
19
|
+
Payment payment = 2 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
20
|
+
ICPTs max_fee = 3 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
21
|
+
Subaccount from_subaccount = 4 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
22
|
+
AccountIdentifier to = 5 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
23
|
+
BlockHeight created_at = 6;
|
|
24
|
+
TimeStamp created_at_time = 7;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message SendResponse {
|
|
28
|
+
BlockHeight resulting_height = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Notify a canister that it has recieved a payment
|
|
32
|
+
message NotifyRequest {
|
|
33
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
34
|
+
BlockHeight block_height = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
35
|
+
ICPTs max_fee = 2 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
36
|
+
Subaccount from_subaccount = 3 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
37
|
+
ic_base_types.pb.v1.PrincipalId to_canister = 4 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
38
|
+
Subaccount to_subaccount = 5 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message NotifyResponse {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message TransactionNotificationRequest {
|
|
45
|
+
ic_base_types.pb.v1.PrincipalId from = 1;
|
|
46
|
+
Subaccount from_subaccount = 2;
|
|
47
|
+
ic_base_types.pb.v1.PrincipalId to = 3;
|
|
48
|
+
Subaccount to_subaccount = 4;
|
|
49
|
+
BlockHeight block_height = 5;
|
|
50
|
+
ICPTs amount = 6;
|
|
51
|
+
Memo memo = 7;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message TransactionNotificationResponse {
|
|
55
|
+
bytes response = 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message CyclesNotificationResponse {
|
|
59
|
+
oneof response {
|
|
60
|
+
ic_base_types.pb.v1.PrincipalId created_canister_id = 1;
|
|
61
|
+
Refund refund = 2;
|
|
62
|
+
ToppedUp topped_up = 3;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Get the balance of an account
|
|
67
|
+
message AccountBalanceRequest {
|
|
68
|
+
AccountIdentifier account = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message AccountBalanceResponse {
|
|
72
|
+
ICPTs balance = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Get the length of the chain with a certification
|
|
76
|
+
message TipOfChainRequest {
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message TipOfChainResponse {
|
|
80
|
+
Certification certification = 1;
|
|
81
|
+
BlockHeight chain_length = 2;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// // How many ICPTs are there not in the minting account
|
|
85
|
+
// message TotalSupplyRequest {
|
|
86
|
+
// }
|
|
87
|
+
|
|
88
|
+
// message TotalSupplyResponse {
|
|
89
|
+
// ICPTs total_supply = 1;
|
|
90
|
+
// }
|
|
91
|
+
|
|
92
|
+
// // Archive any blocks older than this
|
|
93
|
+
// message LedgerArchiveRequest {
|
|
94
|
+
// TimeStamp timestamp = 1;
|
|
95
|
+
// }
|
|
96
|
+
|
|
97
|
+
// * Shared Endpoints *
|
|
98
|
+
|
|
99
|
+
// // Get a single block
|
|
100
|
+
// message BlockRequest {
|
|
101
|
+
// uint64 block_height = 1 [jstype = JS_STRING];
|
|
102
|
+
// }
|
|
103
|
+
|
|
104
|
+
message EncodedBlock {
|
|
105
|
+
bytes block = 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// message BlockResponse {
|
|
109
|
+
// oneof block_content {
|
|
110
|
+
// EncodedBlock block = 1;
|
|
111
|
+
// ic_base_types.pb.v1.PrincipalId canister_id = 2;
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
|
+
|
|
115
|
+
// Get a set of blocks
|
|
116
|
+
message GetBlocksRequest {
|
|
117
|
+
uint64 start = 1 [jstype = JS_STRING];
|
|
118
|
+
uint64 length = 2 [jstype = JS_STRING];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
message Refund {
|
|
122
|
+
BlockHeight refund = 2;
|
|
123
|
+
string error = 3;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
message ToppedUp {
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
message EncodedBlocks {
|
|
130
|
+
repeated EncodedBlock blocks = 1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
message GetBlocksResponse {
|
|
134
|
+
oneof get_blocks_content {
|
|
135
|
+
EncodedBlocks blocks = 1;
|
|
136
|
+
string error = 2;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// // Iterate through blocks
|
|
141
|
+
// message IterBlocksRequest {
|
|
142
|
+
// uint64 start = 1 [jstype = JS_STRING];
|
|
143
|
+
// uint64 length = 2 [jstype = JS_STRING];
|
|
144
|
+
// }
|
|
145
|
+
|
|
146
|
+
// message IterBlocksResponse {
|
|
147
|
+
// repeated EncodedBlock blocks = 1;
|
|
148
|
+
// }
|
|
149
|
+
|
|
150
|
+
// message ArchiveIndexEntry {
|
|
151
|
+
// uint64 height_from = 1 [jstype = JS_STRING];
|
|
152
|
+
// uint64 height_to = 2 [jstype = JS_STRING];
|
|
153
|
+
// ic_base_types.pb.v1.PrincipalId canister_id = 3;
|
|
154
|
+
// }
|
|
155
|
+
|
|
156
|
+
// message ArchiveIndexResponse {
|
|
157
|
+
// repeated ArchiveIndexEntry entries = 1;
|
|
158
|
+
// }
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
// ** ARCHIVE CANISTER ENDPOINTS **
|
|
162
|
+
//
|
|
163
|
+
// // * Archive canister *
|
|
164
|
+
// // Init the archive canister
|
|
165
|
+
// message ArchiveInit {
|
|
166
|
+
// uint32 node_max_memory_size_bytes = 1;
|
|
167
|
+
// uint32 max_message_size_bytes = 2;
|
|
168
|
+
// }
|
|
169
|
+
//
|
|
170
|
+
//
|
|
171
|
+
// // Add blocks to the archive canister
|
|
172
|
+
// message ArchiveAddRequest {
|
|
173
|
+
// repeated Block blocks = 1;
|
|
174
|
+
// }
|
|
175
|
+
//
|
|
176
|
+
// message ArchiveAddResponse {
|
|
177
|
+
// }
|
|
178
|
+
//
|
|
179
|
+
//
|
|
180
|
+
// // Fetch a list of all of the archive nodes
|
|
181
|
+
// message GetNodesRequest {
|
|
182
|
+
// }
|
|
183
|
+
//
|
|
184
|
+
// message GetNodesResponse {
|
|
185
|
+
// repeated ic_base_types.pb.v1.PrincipalId nodes = 1;
|
|
186
|
+
// }
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
// ** BASIC TYPES **
|
|
190
|
+
message ICPTs {
|
|
191
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
192
|
+
uint64 e8s = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true, jstype = JS_STRING];
|
|
193
|
+
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
message Payment {
|
|
197
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
198
|
+
ICPTs receiver_gets = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
message BlockHeight {
|
|
203
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
204
|
+
uint64 height = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true, jstype = JS_STRING];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
// This is the
|
|
209
|
+
message Block {
|
|
210
|
+
Hash parent_hash = 1;
|
|
211
|
+
TimeStamp timestamp = 2;
|
|
212
|
+
Transaction transaction = 3;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
message Hash {
|
|
216
|
+
bytes hash = 1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
message Account {
|
|
220
|
+
AccountIdentifier identifier = 1;
|
|
221
|
+
ICPTs balance = 2;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
message Transaction {
|
|
225
|
+
oneof transfer {
|
|
226
|
+
Burn burn = 1;
|
|
227
|
+
Mint mint = 2;
|
|
228
|
+
Send send = 3;
|
|
229
|
+
}
|
|
230
|
+
Memo memo = 4;
|
|
231
|
+
BlockHeight created_at = 5; // obsolete
|
|
232
|
+
TimeStamp created_at_time = 6;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
message Send {
|
|
236
|
+
AccountIdentifier from = 1;
|
|
237
|
+
AccountIdentifier to = 2;
|
|
238
|
+
ICPTs amount = 3;
|
|
239
|
+
ICPTs max_fee = 4;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
message Mint {
|
|
243
|
+
AccountIdentifier to = 2;
|
|
244
|
+
ICPTs amount = 3;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
message Burn {
|
|
248
|
+
AccountIdentifier from = 1;
|
|
249
|
+
ICPTs amount = 3;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
message AccountIdentifier {
|
|
254
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
255
|
+
bytes hash = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
256
|
+
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
message Subaccount {
|
|
260
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
261
|
+
bytes sub_account = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true];
|
|
262
|
+
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
message Memo {
|
|
266
|
+
option (ic_base_types.pb.v1.tui_signed_message) = true;
|
|
267
|
+
uint64 memo = 1 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true, jstype = JS_STRING];
|
|
268
|
+
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
message TimeStamp {
|
|
272
|
+
uint64 timestamp_nanos = 1 [jstype = JS_STRING];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
message Certification {
|
|
276
|
+
bytes certification = 1;
|
|
277
|
+
}
|