@inco/shield-js 0.0.0-bootstrap.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/LICENSE +201 -0
- package/README.md +359 -0
- package/dist/binary.d.ts +3 -0
- package/dist/binary.js +16 -0
- package/dist/contracts/abi.d.ts +6800 -0
- package/dist/contracts/abi.js +8836 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/utils.d.ts +25 -0
- package/dist/contracts/utils.js +28 -0
- package/dist/errors.d.ts +125 -0
- package/dist/errors.js +91 -0
- package/dist/generated/inco/shield/v2/conductor_connect.d.ts +137 -0
- package/dist/generated/inco/shield/v2/conductor_connect.js +141 -0
- package/dist/generated/inco/shield/v2/deposit_pb.d.ts +103 -0
- package/dist/generated/inco/shield/v2/deposit_pb.js +141 -0
- package/dist/generated/inco/shield/v2/drafting_pb.d.ts +279 -0
- package/dist/generated/inco/shield/v2/drafting_pb.js +372 -0
- package/dist/generated/inco/shield/v2/permission_pb.d.ts +443 -0
- package/dist/generated/inco/shield/v2/permission_pb.js +639 -0
- package/dist/generated/inco/shield/v2/query_pb.d.ts +103 -0
- package/dist/generated/inco/shield/v2/query_pb.js +141 -0
- package/dist/generated/inco/shield/v2/types_pb.d.ts +166 -0
- package/dist/generated/inco/shield/v2/types_pb.js +261 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +19 -0
- package/dist/shield/client.d.ts +72 -0
- package/dist/shield/client.js +136 -0
- package/dist/shield/convert.d.ts +18 -0
- package/dist/shield/convert.js +152 -0
- package/dist/shield/encryption.d.ts +86 -0
- package/dist/shield/encryption.js +180 -0
- package/dist/shield/envelope.d.ts +14 -0
- package/dist/shield/envelope.js +29 -0
- package/dist/shield/index.d.ts +13 -0
- package/dist/shield/index.js +11 -0
- package/dist/shield/intent.d.ts +977 -0
- package/dist/shield/intent.js +188 -0
- package/dist/shield/rpc.d.ts +72 -0
- package/dist/shield/rpc.js +423 -0
- package/dist/shield/shield.eip712.gen.d.ts +396 -0
- package/dist/shield/shield.eip712.gen.js +318 -0
- package/dist/shield/types.d.ts +119 -0
- package/dist/shield/types.js +4 -0
- package/dist/shield/userop/gas-estimation.d.ts +36 -0
- package/dist/shield/userop/gas-estimation.js +284 -0
- package/dist/shield/userop/index.d.ts +1 -0
- package/dist/shield/userop/index.js +1 -0
- package/dist/shield/userop/token-exchange.d.ts +54 -0
- package/dist/shield/userop/token-exchange.js +165 -0
- package/dist/shield/userop/types.d.ts +91 -0
- package/dist/shield/userop/types.js +4 -0
- package/dist/shield/userop/userOp.d.ts +26 -0
- package/dist/shield/userop/userOp.js +98 -0
- package/dist/shield/utils/chain.d.ts +2 -0
- package/dist/shield/utils/chain.js +8 -0
- package/dist/uniswap-adapter/config.d.ts +34 -0
- package/dist/uniswap-adapter/config.js +45 -0
- package/dist/uniswap-adapter/find-pools.d.ts +91 -0
- package/dist/uniswap-adapter/find-pools.js +108 -0
- package/dist/uniswap-adapter/index.d.ts +10 -0
- package/dist/uniswap-adapter/index.js +13 -0
- package/dist/uniswap-adapter/swap.d.ts +344 -0
- package/dist/uniswap-adapter/swap.js +309 -0
- package/package.json +72 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js"
|
|
2
|
+
// @generated from file inco/shield/v2/drafting.proto (package inco.shield.v2, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
|
|
6
|
+
import { Address, AssetId, Bytes32, Handle, Uint256 } from "./types_pb.js";
|
|
7
|
+
/**
|
|
8
|
+
* IntentKind is a union of all possible intent kinds.
|
|
9
|
+
*
|
|
10
|
+
* @generated from enum inco.shield.v2.IntentKind
|
|
11
|
+
*/
|
|
12
|
+
export var IntentKind;
|
|
13
|
+
(function (IntentKind) {
|
|
14
|
+
/**
|
|
15
|
+
* @generated from enum value: INTENT_KIND_TRANSFER = 0;
|
|
16
|
+
*/
|
|
17
|
+
IntentKind[IntentKind["TRANSFER"] = 0] = "TRANSFER";
|
|
18
|
+
/**
|
|
19
|
+
* @generated from enum value: INTENT_KIND_WITHDRAW = 1;
|
|
20
|
+
*/
|
|
21
|
+
IntentKind[IntentKind["WITHDRAW"] = 1] = "WITHDRAW";
|
|
22
|
+
/**
|
|
23
|
+
* @generated from enum value: INTENT_KIND_DEFI_INTERACTION = 2;
|
|
24
|
+
*/
|
|
25
|
+
IntentKind[IntentKind["DEFI_INTERACTION"] = 2] = "DEFI_INTERACTION";
|
|
26
|
+
/**
|
|
27
|
+
* @generated from enum value: INTENT_KIND_INDIVIDUAL_REVOCATION = 3;
|
|
28
|
+
*/
|
|
29
|
+
IntentKind[IntentKind["INDIVIDUAL_REVOCATION"] = 3] = "INDIVIDUAL_REVOCATION";
|
|
30
|
+
/**
|
|
31
|
+
* @generated from enum value: INTENT_KIND_USER_WIDE_REVOCATION = 4;
|
|
32
|
+
*/
|
|
33
|
+
IntentKind[IntentKind["USER_WIDE_REVOCATION"] = 4] = "USER_WIDE_REVOCATION";
|
|
34
|
+
/**
|
|
35
|
+
* @generated from enum value: INTENT_KIND_DELEGATED_TRANSFER = 5;
|
|
36
|
+
*/
|
|
37
|
+
IntentKind[IntentKind["DELEGATED_TRANSFER"] = 5] = "DELEGATED_TRANSFER";
|
|
38
|
+
/**
|
|
39
|
+
* @generated from enum value: INTENT_KIND_DELEGATED_WITHDRAW = 6;
|
|
40
|
+
*/
|
|
41
|
+
IntentKind[IntentKind["DELEGATED_WITHDRAW"] = 6] = "DELEGATED_WITHDRAW";
|
|
42
|
+
/**
|
|
43
|
+
* @generated from enum value: INTENT_KIND_DELEGATED_DEFI_INTERACTION = 7;
|
|
44
|
+
*/
|
|
45
|
+
IntentKind[IntentKind["DELEGATED_DEFI_INTERACTION"] = 7] = "DELEGATED_DEFI_INTERACTION";
|
|
46
|
+
})(IntentKind || (IntentKind = {}));
|
|
47
|
+
// Retrieve enum metadata with: proto3.getEnumType(IntentKind)
|
|
48
|
+
proto3.util.setEnumType(IntentKind, "inco.shield.v2.IntentKind", [
|
|
49
|
+
{ no: 0, name: "INTENT_KIND_TRANSFER" },
|
|
50
|
+
{ no: 1, name: "INTENT_KIND_WITHDRAW" },
|
|
51
|
+
{ no: 2, name: "INTENT_KIND_DEFI_INTERACTION" },
|
|
52
|
+
{ no: 3, name: "INTENT_KIND_INDIVIDUAL_REVOCATION" },
|
|
53
|
+
{ no: 4, name: "INTENT_KIND_USER_WIDE_REVOCATION" },
|
|
54
|
+
{ no: 5, name: "INTENT_KIND_DELEGATED_TRANSFER" },
|
|
55
|
+
{ no: 6, name: "INTENT_KIND_DELEGATED_WITHDRAW" },
|
|
56
|
+
{ no: 7, name: "INTENT_KIND_DELEGATED_DEFI_INTERACTION" },
|
|
57
|
+
]);
|
|
58
|
+
/**
|
|
59
|
+
* DraftRequest carries a user drafting intent.
|
|
60
|
+
*
|
|
61
|
+
* @generated from message inco.shield.v2.DraftRequest
|
|
62
|
+
*/
|
|
63
|
+
export class DraftRequest extends Message {
|
|
64
|
+
/**
|
|
65
|
+
* ABI-encoded intent struct. Can be any of the {*}Intent structs mapped to
|
|
66
|
+
* the `IntentKind` enum. See Shield.eip712.sol for the structs.
|
|
67
|
+
*
|
|
68
|
+
* @generated from field: bytes intent = 1;
|
|
69
|
+
*/
|
|
70
|
+
intent = new Uint8Array(0);
|
|
71
|
+
/**
|
|
72
|
+
* Kind of the intent, used to know into which struct to decode the `intent` field.
|
|
73
|
+
*
|
|
74
|
+
* @generated from field: inco.shield.v2.IntentKind intent_kind = 2;
|
|
75
|
+
*/
|
|
76
|
+
intentKind = IntentKind.TRANSFER;
|
|
77
|
+
/**
|
|
78
|
+
* Symmetric key for AEAD-encrypting the response.
|
|
79
|
+
*
|
|
80
|
+
* @generated from field: bytes response_key = 3;
|
|
81
|
+
*/
|
|
82
|
+
responseKey = new Uint8Array(0);
|
|
83
|
+
/**
|
|
84
|
+
* EIP-712 signature proving ownership of the queried address.
|
|
85
|
+
*
|
|
86
|
+
* @generated from field: bytes eip712_signature = 4;
|
|
87
|
+
*/
|
|
88
|
+
eip712Signature = new Uint8Array(0);
|
|
89
|
+
constructor(data) {
|
|
90
|
+
super();
|
|
91
|
+
proto3.util.initPartial(data, this);
|
|
92
|
+
}
|
|
93
|
+
static runtime = proto3;
|
|
94
|
+
static typeName = "inco.shield.v2.DraftRequest";
|
|
95
|
+
static fields = proto3.util.newFieldList(() => [
|
|
96
|
+
{ no: 1, name: "intent", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
97
|
+
{ no: 2, name: "intent_kind", kind: "enum", T: proto3.getEnumType(IntentKind) },
|
|
98
|
+
{ no: 3, name: "response_key", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
99
|
+
{ no: 4, name: "eip712_signature", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
100
|
+
]);
|
|
101
|
+
static fromBinary(bytes, options) {
|
|
102
|
+
return new DraftRequest().fromBinary(bytes, options);
|
|
103
|
+
}
|
|
104
|
+
static fromJson(jsonValue, options) {
|
|
105
|
+
return new DraftRequest().fromJson(jsonValue, options);
|
|
106
|
+
}
|
|
107
|
+
static fromJsonString(jsonString, options) {
|
|
108
|
+
return new DraftRequest().fromJsonString(jsonString, options);
|
|
109
|
+
}
|
|
110
|
+
static equals(a, b) {
|
|
111
|
+
return proto3.util.equals(DraftRequest, a, b);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* DraftResponse is the plaintext payload of the response to Draft.
|
|
116
|
+
*
|
|
117
|
+
* @generated from message inco.shield.v2.DraftResponse
|
|
118
|
+
*/
|
|
119
|
+
export class DraftResponse extends Message {
|
|
120
|
+
/**
|
|
121
|
+
* The ABI-encoded UserOp, ready to be submitted on-chain.
|
|
122
|
+
*
|
|
123
|
+
* @generated from field: inco.shield.v2.UserOp07 user_op = 1;
|
|
124
|
+
*/
|
|
125
|
+
userOp;
|
|
126
|
+
/**
|
|
127
|
+
* The cheque, not submitted on-chain, for information purposes. Populated only
|
|
128
|
+
* for spend drafts (Transfer / Withdrawal and their delegated variants);
|
|
129
|
+
* absent for revocations.
|
|
130
|
+
*
|
|
131
|
+
* @generated from field: inco.shield.v2.Cheque cheque = 2;
|
|
132
|
+
*/
|
|
133
|
+
cheque;
|
|
134
|
+
constructor(data) {
|
|
135
|
+
super();
|
|
136
|
+
proto3.util.initPartial(data, this);
|
|
137
|
+
}
|
|
138
|
+
static runtime = proto3;
|
|
139
|
+
static typeName = "inco.shield.v2.DraftResponse";
|
|
140
|
+
static fields = proto3.util.newFieldList(() => [
|
|
141
|
+
{ no: 1, name: "user_op", kind: "message", T: UserOp07 },
|
|
142
|
+
{ no: 2, name: "cheque", kind: "message", T: Cheque },
|
|
143
|
+
]);
|
|
144
|
+
static fromBinary(bytes, options) {
|
|
145
|
+
return new DraftResponse().fromBinary(bytes, options);
|
|
146
|
+
}
|
|
147
|
+
static fromJson(jsonValue, options) {
|
|
148
|
+
return new DraftResponse().fromJson(jsonValue, options);
|
|
149
|
+
}
|
|
150
|
+
static fromJsonString(jsonString, options) {
|
|
151
|
+
return new DraftResponse().fromJsonString(jsonString, options);
|
|
152
|
+
}
|
|
153
|
+
static equals(a, b) {
|
|
154
|
+
return proto3.util.equals(DraftResponse, a, b);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* UserOp07 is an ERC-4337 EntryPoint v0.7 UserOperation. It mirrors viem's
|
|
159
|
+
* `UserOperation<'0.7'>` exactly: the eight always-present fields plus the
|
|
160
|
+
* optional factory, paymaster.
|
|
161
|
+
*
|
|
162
|
+
* TODO: add EIP-7702 authorization fields if needed
|
|
163
|
+
*
|
|
164
|
+
* @generated from message inco.shield.v2.UserOp07
|
|
165
|
+
*/
|
|
166
|
+
export class UserOp07 extends Message {
|
|
167
|
+
/**
|
|
168
|
+
* The account making the operation.
|
|
169
|
+
*
|
|
170
|
+
* @generated from field: inco.shield.v2.Address sender = 1;
|
|
171
|
+
*/
|
|
172
|
+
sender;
|
|
173
|
+
/**
|
|
174
|
+
* Anti-replay parameter.
|
|
175
|
+
*
|
|
176
|
+
* @generated from field: inco.shield.v2.Uint256 nonce = 2;
|
|
177
|
+
*/
|
|
178
|
+
nonce;
|
|
179
|
+
/**
|
|
180
|
+
* The data to pass to the `sender` during the main execution call.
|
|
181
|
+
*
|
|
182
|
+
* @generated from field: bytes call_data = 3;
|
|
183
|
+
*/
|
|
184
|
+
callData = new Uint8Array(0);
|
|
185
|
+
/**
|
|
186
|
+
* The amount of gas to allocate the main execution call.
|
|
187
|
+
*
|
|
188
|
+
* @generated from field: inco.shield.v2.Uint256 call_gas_limit = 4;
|
|
189
|
+
*/
|
|
190
|
+
callGasLimit;
|
|
191
|
+
/**
|
|
192
|
+
* The amount of gas to allocate for the verification step.
|
|
193
|
+
*
|
|
194
|
+
* @generated from field: inco.shield.v2.Uint256 verification_gas_limit = 5;
|
|
195
|
+
*/
|
|
196
|
+
verificationGasLimit;
|
|
197
|
+
/**
|
|
198
|
+
* Extra gas to pay the Bundler.
|
|
199
|
+
*
|
|
200
|
+
* @generated from field: inco.shield.v2.Uint256 pre_verification_gas = 6;
|
|
201
|
+
*/
|
|
202
|
+
preVerificationGas;
|
|
203
|
+
/**
|
|
204
|
+
* Maximum fee per gas.
|
|
205
|
+
*
|
|
206
|
+
* @generated from field: inco.shield.v2.Uint256 max_fee_per_gas = 7;
|
|
207
|
+
*/
|
|
208
|
+
maxFeePerGas;
|
|
209
|
+
/**
|
|
210
|
+
* Maximum priority fee per gas.
|
|
211
|
+
*
|
|
212
|
+
* @generated from field: inco.shield.v2.Uint256 max_priority_fee_per_gas = 8;
|
|
213
|
+
*/
|
|
214
|
+
maxPriorityFeePerGas;
|
|
215
|
+
/**
|
|
216
|
+
* Data passed into the account to verify authorization.
|
|
217
|
+
*
|
|
218
|
+
* @generated from field: bytes signature = 9;
|
|
219
|
+
*/
|
|
220
|
+
signature = new Uint8Array(0);
|
|
221
|
+
/**
|
|
222
|
+
* Account factory. Only for new accounts. Optional.
|
|
223
|
+
*
|
|
224
|
+
* @generated from field: optional inco.shield.v2.Address factory = 10;
|
|
225
|
+
*/
|
|
226
|
+
factory;
|
|
227
|
+
/**
|
|
228
|
+
* Data for account factory. Optional.
|
|
229
|
+
*
|
|
230
|
+
* @generated from field: optional bytes factory_data = 11;
|
|
231
|
+
*/
|
|
232
|
+
factoryData;
|
|
233
|
+
/**
|
|
234
|
+
* Address of paymaster contract. Optional.
|
|
235
|
+
*
|
|
236
|
+
* @generated from field: optional inco.shield.v2.Address paymaster = 12;
|
|
237
|
+
*/
|
|
238
|
+
paymaster;
|
|
239
|
+
/**
|
|
240
|
+
* Data for paymaster. Optional.
|
|
241
|
+
*
|
|
242
|
+
* @generated from field: optional bytes paymaster_data = 13;
|
|
243
|
+
*/
|
|
244
|
+
paymasterData;
|
|
245
|
+
/**
|
|
246
|
+
* The amount of gas to allocate for the paymaster validation code. Optional.
|
|
247
|
+
*
|
|
248
|
+
* @generated from field: optional inco.shield.v2.Uint256 paymaster_verification_gas_limit = 14;
|
|
249
|
+
*/
|
|
250
|
+
paymasterVerificationGasLimit;
|
|
251
|
+
/**
|
|
252
|
+
* The amount of gas to allocate for the paymaster post-operation code. Optional.
|
|
253
|
+
*
|
|
254
|
+
* EIP-7702 authorization data is skipped for now, as we don't use it in our
|
|
255
|
+
* system.
|
|
256
|
+
*
|
|
257
|
+
* @generated from field: optional inco.shield.v2.Uint256 paymaster_post_op_gas_limit = 15;
|
|
258
|
+
*/
|
|
259
|
+
paymasterPostOpGasLimit;
|
|
260
|
+
constructor(data) {
|
|
261
|
+
super();
|
|
262
|
+
proto3.util.initPartial(data, this);
|
|
263
|
+
}
|
|
264
|
+
static runtime = proto3;
|
|
265
|
+
static typeName = "inco.shield.v2.UserOp07";
|
|
266
|
+
static fields = proto3.util.newFieldList(() => [
|
|
267
|
+
{ no: 1, name: "sender", kind: "message", T: Address },
|
|
268
|
+
{ no: 2, name: "nonce", kind: "message", T: Uint256 },
|
|
269
|
+
{ no: 3, name: "call_data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
270
|
+
{ no: 4, name: "call_gas_limit", kind: "message", T: Uint256 },
|
|
271
|
+
{ no: 5, name: "verification_gas_limit", kind: "message", T: Uint256 },
|
|
272
|
+
{ no: 6, name: "pre_verification_gas", kind: "message", T: Uint256 },
|
|
273
|
+
{ no: 7, name: "max_fee_per_gas", kind: "message", T: Uint256 },
|
|
274
|
+
{ no: 8, name: "max_priority_fee_per_gas", kind: "message", T: Uint256 },
|
|
275
|
+
{ no: 9, name: "signature", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
276
|
+
{ no: 10, name: "factory", kind: "message", T: Address, opt: true },
|
|
277
|
+
{ no: 11, name: "factory_data", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
278
|
+
{ no: 12, name: "paymaster", kind: "message", T: Address, opt: true },
|
|
279
|
+
{ no: 13, name: "paymaster_data", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
280
|
+
{ no: 14, name: "paymaster_verification_gas_limit", kind: "message", T: Uint256, opt: true },
|
|
281
|
+
{ no: 15, name: "paymaster_post_op_gas_limit", kind: "message", T: Uint256, opt: true },
|
|
282
|
+
]);
|
|
283
|
+
static fromBinary(bytes, options) {
|
|
284
|
+
return new UserOp07().fromBinary(bytes, options);
|
|
285
|
+
}
|
|
286
|
+
static fromJson(jsonValue, options) {
|
|
287
|
+
return new UserOp07().fromJson(jsonValue, options);
|
|
288
|
+
}
|
|
289
|
+
static fromJsonString(jsonString, options) {
|
|
290
|
+
return new UserOp07().fromJsonString(jsonString, options);
|
|
291
|
+
}
|
|
292
|
+
static equals(a, b) {
|
|
293
|
+
return proto3.util.equals(UserOp07, a, b);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Cheque is the output of the drafting process. It is not submitted on-chain,
|
|
298
|
+
* and is only returned to the user after drafting for information purposes.
|
|
299
|
+
*
|
|
300
|
+
* @generated from message inco.shield.v2.Cheque
|
|
301
|
+
*/
|
|
302
|
+
export class Cheque extends Message {
|
|
303
|
+
/**
|
|
304
|
+
* @generated from field: uint64 cheque_number = 1;
|
|
305
|
+
*/
|
|
306
|
+
chequeNumber = protoInt64.zero;
|
|
307
|
+
/**
|
|
308
|
+
* @generated from field: inco.shield.v2.Handle drafting_handle = 2;
|
|
309
|
+
*/
|
|
310
|
+
draftingHandle;
|
|
311
|
+
/**
|
|
312
|
+
* @generated from field: uint64 drafting_timestamp = 3;
|
|
313
|
+
*/
|
|
314
|
+
draftingTimestamp = protoInt64.zero;
|
|
315
|
+
/**
|
|
316
|
+
* @generated from field: inco.shield.v2.Bytes32 nullifier = 4;
|
|
317
|
+
*/
|
|
318
|
+
nullifier;
|
|
319
|
+
/**
|
|
320
|
+
* The (sender, receiver, amount, assetId) transfer tuple.
|
|
321
|
+
*
|
|
322
|
+
* @generated from field: inco.shield.v2.Address sender = 5;
|
|
323
|
+
*/
|
|
324
|
+
sender;
|
|
325
|
+
/**
|
|
326
|
+
* @generated from field: inco.shield.v2.Address receiver = 6;
|
|
327
|
+
*/
|
|
328
|
+
receiver;
|
|
329
|
+
/**
|
|
330
|
+
* @generated from field: inco.shield.v2.AssetId asset_id = 7;
|
|
331
|
+
*/
|
|
332
|
+
assetId;
|
|
333
|
+
/**
|
|
334
|
+
* @generated from field: inco.shield.v2.Uint256 amount = 8;
|
|
335
|
+
*/
|
|
336
|
+
amount;
|
|
337
|
+
/**
|
|
338
|
+
* Optional: set for delegated drafts, absent for plain drafts.
|
|
339
|
+
*
|
|
340
|
+
* @generated from field: inco.shield.v2.Bytes32 permission_id = 9;
|
|
341
|
+
*/
|
|
342
|
+
permissionId;
|
|
343
|
+
constructor(data) {
|
|
344
|
+
super();
|
|
345
|
+
proto3.util.initPartial(data, this);
|
|
346
|
+
}
|
|
347
|
+
static runtime = proto3;
|
|
348
|
+
static typeName = "inco.shield.v2.Cheque";
|
|
349
|
+
static fields = proto3.util.newFieldList(() => [
|
|
350
|
+
{ no: 1, name: "cheque_number", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
|
|
351
|
+
{ no: 2, name: "drafting_handle", kind: "message", T: Handle },
|
|
352
|
+
{ no: 3, name: "drafting_timestamp", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
|
|
353
|
+
{ no: 4, name: "nullifier", kind: "message", T: Bytes32 },
|
|
354
|
+
{ no: 5, name: "sender", kind: "message", T: Address },
|
|
355
|
+
{ no: 6, name: "receiver", kind: "message", T: Address },
|
|
356
|
+
{ no: 7, name: "asset_id", kind: "message", T: AssetId },
|
|
357
|
+
{ no: 8, name: "amount", kind: "message", T: Uint256 },
|
|
358
|
+
{ no: 9, name: "permission_id", kind: "message", T: Bytes32 },
|
|
359
|
+
]);
|
|
360
|
+
static fromBinary(bytes, options) {
|
|
361
|
+
return new Cheque().fromBinary(bytes, options);
|
|
362
|
+
}
|
|
363
|
+
static fromJson(jsonValue, options) {
|
|
364
|
+
return new Cheque().fromJson(jsonValue, options);
|
|
365
|
+
}
|
|
366
|
+
static fromJsonString(jsonString, options) {
|
|
367
|
+
return new Cheque().fromJsonString(jsonString, options);
|
|
368
|
+
}
|
|
369
|
+
static equals(a, b) {
|
|
370
|
+
return proto3.util.equals(Cheque, a, b);
|
|
371
|
+
}
|
|
372
|
+
}
|