@engramx/idl 0.16.0-rc.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 +190 -0
- package/README.md +27 -0
- package/dist/engram.did +4045 -0
- package/dist/engram.idl.d.ts +3839 -0
- package/dist/engram.idl.js +1423 -0
- package/dist/market.did +1402 -0
- package/dist/market.idl.d.ts +1354 -0
- package/dist/market.idl.js +551 -0
- package/dist/registry.did +1671 -0
- package/dist/registry.idl.d.ts +1692 -0
- package/dist/registry.idl.js +522 -0
- package/package.json +50 -0
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
export const idlFactory = ({ IDL }) => {
|
|
2
|
+
const Error = IDL.Variant({
|
|
3
|
+
Invalid: IDL.Text,
|
|
4
|
+
NotFound: IDL.Text,
|
|
5
|
+
Refused: IDL.Text,
|
|
6
|
+
Other: IDL.Text,
|
|
7
|
+
Unavailable: IDL.Text,
|
|
8
|
+
Conflict: IDL.Text,
|
|
9
|
+
});
|
|
10
|
+
const Result_1 = IDL.Variant({ Ok: IDL.Null, Err: Error });
|
|
11
|
+
const EndpointStatus = IDL.Variant({
|
|
12
|
+
Enabled: IDL.Null,
|
|
13
|
+
Disabled: IDL.Null,
|
|
14
|
+
Deleted: IDL.Null,
|
|
15
|
+
});
|
|
16
|
+
const X402Endpoint = IDL.Record({
|
|
17
|
+
id: IDL.Text,
|
|
18
|
+
status: EndpointStatus,
|
|
19
|
+
contentId: IDL.Opt(IDL.Text),
|
|
20
|
+
enabledBy: IDL.Opt(IDL.Principal),
|
|
21
|
+
name: IDL.Text,
|
|
22
|
+
createdBy: IDL.Principal,
|
|
23
|
+
createdAtNs: IDL.Int,
|
|
24
|
+
description: IDL.Text,
|
|
25
|
+
totalPurchases: IDL.Nat,
|
|
26
|
+
totalRevenue: IDL.Nat,
|
|
27
|
+
price: IDL.Nat,
|
|
28
|
+
suggestedPrice: IDL.Nat,
|
|
29
|
+
enabledAtNs: IDL.Opt(IDL.Int),
|
|
30
|
+
});
|
|
31
|
+
const Result_18 = IDL.Variant({ Ok: X402Endpoint, Err: Error });
|
|
32
|
+
const Eip3009Authorization = IDL.Record({
|
|
33
|
+
r: IDL.Vec(IDL.Nat8),
|
|
34
|
+
s: IDL.Vec(IDL.Nat8),
|
|
35
|
+
v: IDL.Nat8,
|
|
36
|
+
to: IDL.Text,
|
|
37
|
+
value: IDL.Nat,
|
|
38
|
+
from: IDL.Text,
|
|
39
|
+
validAfter: IDL.Nat,
|
|
40
|
+
nonce: IDL.Vec(IDL.Nat8),
|
|
41
|
+
validBefore: IDL.Nat,
|
|
42
|
+
});
|
|
43
|
+
const PaymentSignature = IDL.Record({
|
|
44
|
+
signature: IDL.Vec(IDL.Nat8),
|
|
45
|
+
asset: IDL.Opt(IDL.Text),
|
|
46
|
+
publicKey: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
47
|
+
scheme: IDL.Text,
|
|
48
|
+
network: IDL.Text,
|
|
49
|
+
sender: IDL.Text,
|
|
50
|
+
nonce: IDL.Vec(IDL.Nat8),
|
|
51
|
+
authorization: IDL.Opt(Eip3009Authorization),
|
|
52
|
+
});
|
|
53
|
+
const PaymentRequirement = IDL.Record({
|
|
54
|
+
token: IDL.Text,
|
|
55
|
+
tokenVersion: IDL.Opt(IDL.Text),
|
|
56
|
+
scheme: IDL.Text,
|
|
57
|
+
recipient: IDL.Text,
|
|
58
|
+
network: IDL.Text,
|
|
59
|
+
nonce: IDL.Vec(IDL.Nat8),
|
|
60
|
+
tokenName: IDL.Opt(IDL.Text),
|
|
61
|
+
expiry: IDL.Int,
|
|
62
|
+
amount: IDL.Nat,
|
|
63
|
+
});
|
|
64
|
+
const ServiceRequestResponse = IDL.Variant({
|
|
65
|
+
Accepted: IDL.Record({ jobId: IDL.Text }),
|
|
66
|
+
PaymentRequired: IDL.Vec(PaymentRequirement),
|
|
67
|
+
});
|
|
68
|
+
const Result_17 = IDL.Variant({
|
|
69
|
+
Ok: ServiceRequestResponse,
|
|
70
|
+
Err: Error,
|
|
71
|
+
});
|
|
72
|
+
const RoleGrant = IDL.Record({
|
|
73
|
+
role: IDL.Variant({
|
|
74
|
+
Root: IDL.Null,
|
|
75
|
+
WasmAdmin: IDL.Null,
|
|
76
|
+
Admin: IDL.Null,
|
|
77
|
+
Other: IDL.Text,
|
|
78
|
+
}),
|
|
79
|
+
holder: IDL.Principal,
|
|
80
|
+
});
|
|
81
|
+
const AdminRoles = IDL.Record({ roles: IDL.Vec(RoleGrant) });
|
|
82
|
+
const AuditHead = IDL.Record({
|
|
83
|
+
headHash: IDL.Vec(IDL.Nat8),
|
|
84
|
+
size: IDL.Nat,
|
|
85
|
+
});
|
|
86
|
+
const CertifiedAuditHead = IDL.Record({
|
|
87
|
+
total: IDL.Nat,
|
|
88
|
+
certificate: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
89
|
+
headHash: IDL.Vec(IDL.Nat8),
|
|
90
|
+
size: IDL.Nat,
|
|
91
|
+
witness: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
92
|
+
});
|
|
93
|
+
const ContentRef = IDL.Record({
|
|
94
|
+
id: IDL.Text,
|
|
95
|
+
metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
|
|
96
|
+
mimeType: IDL.Opt(IDL.Text),
|
|
97
|
+
sizeBytes: IDL.Opt(IDL.Nat),
|
|
98
|
+
});
|
|
99
|
+
const AccessGrant = IDL.Record({
|
|
100
|
+
expiresAt: IDL.Int,
|
|
101
|
+
contentRef: ContentRef,
|
|
102
|
+
hmac: IDL.Vec(IDL.Nat8),
|
|
103
|
+
grantId: IDL.Text,
|
|
104
|
+
grantee: IDL.Principal,
|
|
105
|
+
receiptId: IDL.Text,
|
|
106
|
+
issuedAt: IDL.Int,
|
|
107
|
+
});
|
|
108
|
+
const DeliveryMethod = IDL.Variant({
|
|
109
|
+
httpUrl: IDL.Text,
|
|
110
|
+
inline: IDL.Vec(IDL.Nat8),
|
|
111
|
+
canisterQuery: IDL.Record({
|
|
112
|
+
method: IDL.Text,
|
|
113
|
+
chunkCount: IDL.Nat,
|
|
114
|
+
}),
|
|
115
|
+
assetCanister: IDL.Record({
|
|
116
|
+
path: IDL.Text,
|
|
117
|
+
canisterId: IDL.Principal,
|
|
118
|
+
}),
|
|
119
|
+
});
|
|
120
|
+
const ContentDelivery = IDL.Record({
|
|
121
|
+
settlementTxHash: IDL.Opt(IDL.Text),
|
|
122
|
+
grant: AccessGrant,
|
|
123
|
+
delivery: DeliveryMethod,
|
|
124
|
+
});
|
|
125
|
+
const ContentResponse = IDL.Variant({
|
|
126
|
+
Delivered: ContentDelivery,
|
|
127
|
+
PaymentRequired: IDL.Vec(PaymentRequirement),
|
|
128
|
+
});
|
|
129
|
+
const Result_16 = IDL.Variant({ Ok: ContentResponse, Err: Error });
|
|
130
|
+
const Result_13 = IDL.Variant({ Ok: IDL.Vec(IDL.Nat8), Err: Error });
|
|
131
|
+
const Result_15 = IDL.Variant({ Ok: IDL.Opt(IDL.Text), Err: Error });
|
|
132
|
+
const GenesisNote = IDL.Record({
|
|
133
|
+
predecessorSize: IDL.Opt(IDL.Nat),
|
|
134
|
+
predecessorHeadHash: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
135
|
+
note: IDL.Text,
|
|
136
|
+
version: IDL.Text,
|
|
137
|
+
genesisAtNs: IDL.Int,
|
|
138
|
+
});
|
|
139
|
+
const JobStatus = IDL.Variant({
|
|
140
|
+
Disputed: IDL.Null,
|
|
141
|
+
Refunded: IDL.Null,
|
|
142
|
+
Computing: IDL.Null,
|
|
143
|
+
other: IDL.Text,
|
|
144
|
+
Settling: IDL.Null,
|
|
145
|
+
Submitted: IDL.Null,
|
|
146
|
+
Assigned: IDL.Null,
|
|
147
|
+
Verified: IDL.Null,
|
|
148
|
+
Expired: IDL.Null,
|
|
149
|
+
Settled: IDL.Null,
|
|
150
|
+
Pending: IDL.Null,
|
|
151
|
+
});
|
|
152
|
+
const ParkedLeg = IDL.Variant({
|
|
153
|
+
UptoRemainder: IDL.Null,
|
|
154
|
+
Refund: IDL.Null,
|
|
155
|
+
Settle: IDL.Null,
|
|
156
|
+
});
|
|
157
|
+
const ParkedTx = IDL.Record({
|
|
158
|
+
leg: ParkedLeg,
|
|
159
|
+
token: IDL.Text,
|
|
160
|
+
parkedAt: IDL.Int,
|
|
161
|
+
txHash: IDL.Text,
|
|
162
|
+
chainId: IDL.Nat,
|
|
163
|
+
});
|
|
164
|
+
const Job = IDL.Record({
|
|
165
|
+
id: IDL.Text,
|
|
166
|
+
completedAtNs: IDL.Opt(IDL.Int),
|
|
167
|
+
expiresAtNs: IDL.Int,
|
|
168
|
+
status: JobStatus,
|
|
169
|
+
result: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
170
|
+
paymentReceiptId: IDL.Text,
|
|
171
|
+
deliveryCallback: IDL.Opt(IDL.Text),
|
|
172
|
+
parkedTx: IDL.Opt(ParkedTx),
|
|
173
|
+
operator: IDL.Opt(IDL.Principal),
|
|
174
|
+
createdAtNs: IDL.Int,
|
|
175
|
+
actualCost: IDL.Opt(IDL.Nat),
|
|
176
|
+
buyer: IDL.Text,
|
|
177
|
+
serviceId: IDL.Text,
|
|
178
|
+
proof: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
179
|
+
amount: IDL.Nat,
|
|
180
|
+
params: IDL.Vec(IDL.Nat8),
|
|
181
|
+
});
|
|
182
|
+
const Result_14 = IDL.Variant({ Ok: Job, Err: Error });
|
|
183
|
+
const JobCounts = IDL.Record({
|
|
184
|
+
total: IDL.Nat,
|
|
185
|
+
active: IDL.Nat,
|
|
186
|
+
expired: IDL.Nat,
|
|
187
|
+
settled: IDL.Nat,
|
|
188
|
+
refunded: IDL.Nat,
|
|
189
|
+
settling: IDL.Nat,
|
|
190
|
+
parked: IDL.Nat,
|
|
191
|
+
});
|
|
192
|
+
const Result_12 = IDL.Variant({ Ok: JobStatus, Err: Error });
|
|
193
|
+
const SpendingPolicy = IDL.Record({
|
|
194
|
+
maxSessionDeposit: IDL.Opt(IDL.Nat),
|
|
195
|
+
blockedCallers: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
196
|
+
maxPerDay: IDL.Opt(IDL.Nat),
|
|
197
|
+
maxSessionDuration: IDL.Opt(IDL.Int),
|
|
198
|
+
sessionIdleTimeout: IDL.Opt(IDL.Int),
|
|
199
|
+
rateLimitPerMinute: IDL.Opt(IDL.Nat),
|
|
200
|
+
maxPerTransaction: IDL.Opt(IDL.Nat),
|
|
201
|
+
allowedCallers: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
202
|
+
maxConcurrentSessions: IDL.Opt(IDL.Nat),
|
|
203
|
+
});
|
|
204
|
+
const RevenueSummary = IDL.Record({
|
|
205
|
+
serviceJobsSettled: IDL.Nat,
|
|
206
|
+
owedToYou: IDL.Nat,
|
|
207
|
+
endpointBreakdown: IDL.Vec(
|
|
208
|
+
IDL.Record({
|
|
209
|
+
revenue: IDL.Nat,
|
|
210
|
+
endpointId: IDL.Text,
|
|
211
|
+
name: IDL.Text,
|
|
212
|
+
purchases: IDL.Nat,
|
|
213
|
+
}),
|
|
214
|
+
),
|
|
215
|
+
contentRevenue: IDL.Nat,
|
|
216
|
+
serviceRevenue: IDL.Nat,
|
|
217
|
+
contentPurchases: IDL.Nat,
|
|
218
|
+
unresolvedWithdrawals: IDL.Nat,
|
|
219
|
+
});
|
|
220
|
+
const Result_11 = IDL.Variant({ Ok: RevenueSummary, Err: Error });
|
|
221
|
+
const SellerStatus = IDL.Record({
|
|
222
|
+
expiresAtNs: IDL.Int,
|
|
223
|
+
verifiedAtNs: IDL.Int,
|
|
224
|
+
bytesStored: IDL.Nat,
|
|
225
|
+
engramId: IDL.Principal,
|
|
226
|
+
byteQuota: IDL.Nat,
|
|
227
|
+
});
|
|
228
|
+
const Result_10 = IDL.Variant({ Ok: SellerStatus, Err: Error });
|
|
229
|
+
const SessionCounts = IDL.Record({
|
|
230
|
+
closed: IDL.Nat,
|
|
231
|
+
total: IDL.Nat,
|
|
232
|
+
expired: IDL.Nat,
|
|
233
|
+
open: IDL.Nat,
|
|
234
|
+
closing: IDL.Nat,
|
|
235
|
+
});
|
|
236
|
+
const HttpRequest = IDL.Record({
|
|
237
|
+
url: IDL.Text,
|
|
238
|
+
method: IDL.Text,
|
|
239
|
+
body: IDL.Vec(IDL.Nat8),
|
|
240
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
241
|
+
});
|
|
242
|
+
const HttpResponse = IDL.Record({
|
|
243
|
+
body: IDL.Vec(IDL.Nat8),
|
|
244
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
245
|
+
upgrade: IDL.Opt(IDL.Bool),
|
|
246
|
+
status_code: IDL.Nat16,
|
|
247
|
+
});
|
|
248
|
+
const Role = IDL.Variant({
|
|
249
|
+
Anonymous: IDL.Null,
|
|
250
|
+
Viewer: IDL.Null,
|
|
251
|
+
Engram: IDL.Null,
|
|
252
|
+
Root: IDL.Null,
|
|
253
|
+
Buyer: IDL.Null,
|
|
254
|
+
WasmAdmin: IDL.Null,
|
|
255
|
+
Guardian: IDL.Null,
|
|
256
|
+
Seller: IDL.Null,
|
|
257
|
+
Admin: IDL.Null,
|
|
258
|
+
Agent: IDL.Null,
|
|
259
|
+
Other: IDL.Null,
|
|
260
|
+
Owner: IDL.Null,
|
|
261
|
+
});
|
|
262
|
+
const AuditEntry = IDL.Record({
|
|
263
|
+
id: IDL.Nat,
|
|
264
|
+
entryHash: IDL.Vec(IDL.Nat8),
|
|
265
|
+
callerRole: Role,
|
|
266
|
+
operation: IDL.Text,
|
|
267
|
+
details: IDL.Text,
|
|
268
|
+
caller: IDL.Principal,
|
|
269
|
+
success: IDL.Bool,
|
|
270
|
+
timestampNs: IDL.Int,
|
|
271
|
+
});
|
|
272
|
+
const Page_5 = IDL.Record({
|
|
273
|
+
total: IDL.Nat,
|
|
274
|
+
withheld: IDL.Nat,
|
|
275
|
+
items: IDL.Vec(AuditEntry),
|
|
276
|
+
});
|
|
277
|
+
const Result_8 = IDL.Variant({ Ok: Page_5, Err: Error });
|
|
278
|
+
const Page_7 = IDL.Record({
|
|
279
|
+
total: IDL.Nat,
|
|
280
|
+
withheld: IDL.Nat,
|
|
281
|
+
items: IDL.Vec(IDL.Principal),
|
|
282
|
+
});
|
|
283
|
+
const Result_9 = IDL.Variant({ Ok: Page_7, Err: Error });
|
|
284
|
+
const ContentEntry = IDL.Record({
|
|
285
|
+
id: IDL.Text,
|
|
286
|
+
createdAt: IDL.Int,
|
|
287
|
+
mimeType: IDL.Text,
|
|
288
|
+
totalSize: IDL.Nat,
|
|
289
|
+
chunkCount: IDL.Nat,
|
|
290
|
+
});
|
|
291
|
+
const Page_6 = IDL.Record({
|
|
292
|
+
total: IDL.Nat,
|
|
293
|
+
withheld: IDL.Nat,
|
|
294
|
+
items: IDL.Vec(ContentEntry),
|
|
295
|
+
});
|
|
296
|
+
const Payer = IDL.Variant({ Evm: IDL.Text, Icp: IDL.Principal });
|
|
297
|
+
const PurchaseRecord = IDL.Record({
|
|
298
|
+
id: IDL.Text,
|
|
299
|
+
endpointId: IDL.Text,
|
|
300
|
+
network: IDL.Text,
|
|
301
|
+
txHash: IDL.Opt(IDL.Text),
|
|
302
|
+
receiptId: IDL.Text,
|
|
303
|
+
buyer: Payer,
|
|
304
|
+
amount: IDL.Nat,
|
|
305
|
+
timestampNs: IDL.Int,
|
|
306
|
+
});
|
|
307
|
+
const Page_4 = IDL.Record({
|
|
308
|
+
total: IDL.Nat,
|
|
309
|
+
withheld: IDL.Nat,
|
|
310
|
+
items: IDL.Vec(PurchaseRecord),
|
|
311
|
+
});
|
|
312
|
+
const Result_7 = IDL.Variant({ Ok: Page_4, Err: Error });
|
|
313
|
+
const Page_3 = IDL.Record({
|
|
314
|
+
total: IDL.Nat,
|
|
315
|
+
withheld: IDL.Nat,
|
|
316
|
+
items: IDL.Vec(X402Endpoint),
|
|
317
|
+
});
|
|
318
|
+
const Page_2 = IDL.Record({
|
|
319
|
+
total: IDL.Nat,
|
|
320
|
+
withheld: IDL.Nat,
|
|
321
|
+
items: IDL.Vec(Job),
|
|
322
|
+
});
|
|
323
|
+
const Result_6 = IDL.Variant({ Ok: Page_2, Err: Error });
|
|
324
|
+
const PendingWithdrawal = IDL.Record({
|
|
325
|
+
id: IDL.Nat,
|
|
326
|
+
parkedAtNs: IDL.Int,
|
|
327
|
+
createdAtTimeNs: IDL.Nat64,
|
|
328
|
+
seller: IDL.Principal,
|
|
329
|
+
amountE6s: IDL.Nat,
|
|
330
|
+
reason: IDL.Text,
|
|
331
|
+
});
|
|
332
|
+
const Page_1 = IDL.Record({
|
|
333
|
+
total: IDL.Nat,
|
|
334
|
+
withheld: IDL.Nat,
|
|
335
|
+
items: IDL.Vec(PendingWithdrawal),
|
|
336
|
+
});
|
|
337
|
+
const Result_5 = IDL.Variant({ Ok: Page_1, Err: Error });
|
|
338
|
+
const ServiceType = IDL.Variant({ Sync: IDL.Null, Async: IDL.Null });
|
|
339
|
+
const PricingScheme = IDL.Variant({
|
|
340
|
+
Exact: IDL.Nat,
|
|
341
|
+
Upto: IDL.Nat,
|
|
342
|
+
Session: IDL.Null,
|
|
343
|
+
});
|
|
344
|
+
const ServiceDeliveryMethod = IDL.Variant({
|
|
345
|
+
Both: IDL.Null,
|
|
346
|
+
Poll: IDL.Null,
|
|
347
|
+
Callback: IDL.Null,
|
|
348
|
+
});
|
|
349
|
+
const VerificationMethod = IDL.Variant({
|
|
350
|
+
BuyerConfirm: IDL.Record({ disputeWindowSeconds: IDL.Nat }),
|
|
351
|
+
ZkGroth16: IDL.Record({
|
|
352
|
+
bindResult: IDL.Bool,
|
|
353
|
+
verifierCanister: IDL.Principal,
|
|
354
|
+
verificationKey: IDL.Vec(IDL.Nat8),
|
|
355
|
+
}),
|
|
356
|
+
AutoSettle: IDL.Null,
|
|
357
|
+
HashMatch: IDL.Null,
|
|
358
|
+
});
|
|
359
|
+
const ServiceDefinition = IDL.Record({
|
|
360
|
+
id: IDL.Text,
|
|
361
|
+
serviceType: ServiceType,
|
|
362
|
+
name: IDL.Text,
|
|
363
|
+
createdAt: IDL.Int,
|
|
364
|
+
description: IDL.Text,
|
|
365
|
+
pricing: PricingScheme,
|
|
366
|
+
enabled: IDL.Bool,
|
|
367
|
+
operatorId: IDL.Principal,
|
|
368
|
+
delivery: ServiceDeliveryMethod,
|
|
369
|
+
timeout: IDL.Nat,
|
|
370
|
+
verification: VerificationMethod,
|
|
371
|
+
});
|
|
372
|
+
const Page = IDL.Record({
|
|
373
|
+
total: IDL.Nat,
|
|
374
|
+
withheld: IDL.Nat,
|
|
375
|
+
items: IDL.Vec(ServiceDefinition),
|
|
376
|
+
});
|
|
377
|
+
const SessionConfig = IDL.Record({
|
|
378
|
+
autoClose: IDL.Bool,
|
|
379
|
+
idleTimeout: IDL.Opt(IDL.Int),
|
|
380
|
+
maxDeposit: IDL.Nat,
|
|
381
|
+
});
|
|
382
|
+
const SessionStatus = IDL.Variant({
|
|
383
|
+
closed: IDL.Null,
|
|
384
|
+
expired: IDL.Null,
|
|
385
|
+
other: IDL.Text,
|
|
386
|
+
open: IDL.Null,
|
|
387
|
+
closing: IDL.Null,
|
|
388
|
+
});
|
|
389
|
+
const SessionState = IDL.Record({
|
|
390
|
+
id: IDL.Text,
|
|
391
|
+
status: SessionStatus,
|
|
392
|
+
deposited: IDL.Nat,
|
|
393
|
+
openedAtNs: IDL.Int,
|
|
394
|
+
lastActivityAtNs: IDL.Int,
|
|
395
|
+
consumed: IDL.Nat,
|
|
396
|
+
voucherCount: IDL.Nat,
|
|
397
|
+
remaining: IDL.Nat,
|
|
398
|
+
payer: Payer,
|
|
399
|
+
});
|
|
400
|
+
const Result_4 = IDL.Variant({ Ok: SessionState, Err: Error });
|
|
401
|
+
const SessionIntent = IDL.Record({
|
|
402
|
+
token: IDL.Text,
|
|
403
|
+
costPerCall: IDL.Opt(IDL.Nat),
|
|
404
|
+
minDeposit: IDL.Opt(IDL.Nat),
|
|
405
|
+
recipient: IDL.Text,
|
|
406
|
+
network: IDL.Text,
|
|
407
|
+
description: IDL.Opt(IDL.Text),
|
|
408
|
+
expiryNs: IDL.Int,
|
|
409
|
+
suggestedDeposit: IDL.Nat,
|
|
410
|
+
});
|
|
411
|
+
const QuotedRequirement = IDL.Record({
|
|
412
|
+
token: IDL.Text,
|
|
413
|
+
tokenVersion: IDL.Opt(IDL.Text),
|
|
414
|
+
scheme: IDL.Text,
|
|
415
|
+
recipient: IDL.Text,
|
|
416
|
+
network: IDL.Text,
|
|
417
|
+
expiryNs: IDL.Int,
|
|
418
|
+
tokenName: IDL.Opt(IDL.Text),
|
|
419
|
+
amount: IDL.Nat,
|
|
420
|
+
});
|
|
421
|
+
const PaymentQuote = IDL.Record({
|
|
422
|
+
amountE6: IDL.Nat,
|
|
423
|
+
requirements: IDL.Vec(QuotedRequirement),
|
|
424
|
+
});
|
|
425
|
+
const Result_3 = IDL.Variant({ Ok: PaymentQuote, Err: Error });
|
|
426
|
+
const Result_2 = IDL.Variant({ Ok: IDL.Text, Err: Error });
|
|
427
|
+
const Result = IDL.Variant({ Ok: IDL.Nat, Err: Error });
|
|
428
|
+
const TokenAmount = IDL.Variant({
|
|
429
|
+
Icp: IDL.Nat,
|
|
430
|
+
Ckusdc: IDL.Nat,
|
|
431
|
+
Ckusdt: IDL.Nat,
|
|
432
|
+
});
|
|
433
|
+
return IDL.Service({
|
|
434
|
+
addAuditViewer: IDL.Func([IDL.Principal], [Result_1], []),
|
|
435
|
+
anchorNow: IDL.Func([], [Result_1], []),
|
|
436
|
+
claimJob: IDL.Func([IDL.Text], [Result_1], []),
|
|
437
|
+
confirmJob: IDL.Func([IDL.Text, IDL.Opt(IDL.Vec(IDL.Nat8))], [Result_1], []),
|
|
438
|
+
createEndpoint: IDL.Func([IDL.Text, IDL.Text, IDL.Text, IDL.Nat], [Result_18], []),
|
|
439
|
+
createJob: IDL.Func([IDL.Text, IDL.Vec(IDL.Nat8), IDL.Opt(PaymentSignature)], [Result_17], []),
|
|
440
|
+
deleteContent: IDL.Func([IDL.Text], [Result_1], []),
|
|
441
|
+
deleteEndpoint: IDL.Func([IDL.Text], [Result_1], []),
|
|
442
|
+
disputeJob: IDL.Func([IDL.Text, IDL.Text, IDL.Opt(IDL.Vec(IDL.Nat8))], [Result_1], []),
|
|
443
|
+
endSession: IDL.Func([IDL.Text], [Result_1], []),
|
|
444
|
+
forceCloseSession: IDL.Func([IDL.Text], [Result_1], []),
|
|
445
|
+
forceResolveSession: IDL.Func([IDL.Text], [Result_1], []),
|
|
446
|
+
getAdminRoles: IDL.Func([], [AdminRoles], ['query']),
|
|
447
|
+
getAuditHead: IDL.Func([], [AuditHead], ['query']),
|
|
448
|
+
getBuyerActionMessage: IDL.Func([IDL.Text, IDL.Text], [IDL.Text], ['query']),
|
|
449
|
+
getCertifiedAuditHead: IDL.Func([], [CertifiedAuditHead], ['query']),
|
|
450
|
+
getContent: IDL.Func([IDL.Text, IDL.Opt(PaymentSignature)], [Result_16], []),
|
|
451
|
+
getContentChunk: IDL.Func([AccessGrant, IDL.Nat], [Result_13], ['query']),
|
|
452
|
+
getEvmSellerPayout: IDL.Func([IDL.Principal], [Result_15], ['query']),
|
|
453
|
+
getGenesisNote: IDL.Func([], [GenesisNote], ['query']),
|
|
454
|
+
getJob: IDL.Func([IDL.Text], [Result_14], ['query']),
|
|
455
|
+
getJobCounts: IDL.Func([], [JobCounts], ['query']),
|
|
456
|
+
getJobResult: IDL.Func([IDL.Text], [Result_13], ['query']),
|
|
457
|
+
getJobStatus: IDL.Func([IDL.Text], [Result_12], ['query']),
|
|
458
|
+
getPaymentPolicy: IDL.Func([], [SpendingPolicy], ['query']),
|
|
459
|
+
getRevenueSummary: IDL.Func([], [Result_11], ['query']),
|
|
460
|
+
getSellerStatus: IDL.Func([IDL.Principal], [Result_10], ['query']),
|
|
461
|
+
getSessionCounts: IDL.Func([], [SessionCounts], ['query']),
|
|
462
|
+
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
463
|
+
http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
|
|
464
|
+
icrc21_canister_call_consent_message: IDL.Func(
|
|
465
|
+
[
|
|
466
|
+
IDL.Record({
|
|
467
|
+
arg: IDL.Vec(IDL.Nat8),
|
|
468
|
+
method: IDL.Text,
|
|
469
|
+
user_preferences: IDL.Record({}),
|
|
470
|
+
}),
|
|
471
|
+
],
|
|
472
|
+
[
|
|
473
|
+
IDL.Variant({
|
|
474
|
+
Ok: IDL.Record({
|
|
475
|
+
metadata: IDL.Record({
|
|
476
|
+
utc_offset_minutes: IDL.Opt(IDL.Int16),
|
|
477
|
+
language: IDL.Text,
|
|
478
|
+
}),
|
|
479
|
+
consent_message: IDL.Variant({
|
|
480
|
+
GenericDisplayMessage: IDL.Text,
|
|
481
|
+
}),
|
|
482
|
+
}),
|
|
483
|
+
Err: IDL.Record({
|
|
484
|
+
description: IDL.Text,
|
|
485
|
+
error_code: IDL.Nat,
|
|
486
|
+
}),
|
|
487
|
+
}),
|
|
488
|
+
],
|
|
489
|
+
['query'],
|
|
490
|
+
),
|
|
491
|
+
isTradeFrozen: IDL.Func([], [IDL.Bool], ['query']),
|
|
492
|
+
listAuditEntries: IDL.Func([IDL.Nat, IDL.Nat], [Result_8], ['query']),
|
|
493
|
+
listAuditViewers: IDL.Func([], [Result_9], ['query']),
|
|
494
|
+
listContent: IDL.Func([IDL.Nat, IDL.Nat], [Page_6], ['query']),
|
|
495
|
+
listDenialEntries: IDL.Func([IDL.Nat, IDL.Nat], [Result_8], ['query']),
|
|
496
|
+
listEndpointPurchases: IDL.Func([IDL.Text, IDL.Nat, IDL.Nat], [Result_7], ['query']),
|
|
497
|
+
listEndpoints: IDL.Func([IDL.Opt(EndpointStatus), IDL.Nat, IDL.Nat], [Page_3], ['query']),
|
|
498
|
+
listJobs: IDL.Func([IDL.Text, IDL.Opt(JobStatus), IDL.Nat, IDL.Nat], [Result_6], ['query']),
|
|
499
|
+
listMyPendingWithdrawals: IDL.Func([IDL.Nat, IDL.Nat], [Result_5], ['query']),
|
|
500
|
+
listServices: IDL.Func([IDL.Bool, IDL.Nat, IDL.Nat], [Page], ['query']),
|
|
501
|
+
openSession: IDL.Func([SessionConfig, PaymentSignature], [Result_4], []),
|
|
502
|
+
previewOpenSession: IDL.Func([], [SessionIntent], ['query']),
|
|
503
|
+
quotePayment: IDL.Func([IDL.Nat], [Result_3], ['query']),
|
|
504
|
+
reconcileJob: IDL.Func([IDL.Text], [Result_2], []),
|
|
505
|
+
reconcileSession: IDL.Func([IDL.Text], [Result_2], []),
|
|
506
|
+
recoverContentWithdrawal: IDL.Func([IDL.Nat], [Result], []),
|
|
507
|
+
recoverEscrow: IDL.Func([IDL.Text, TokenAmount], [Result], []),
|
|
508
|
+
registerSeller: IDL.Func([IDL.Principal], [Result_1], []),
|
|
509
|
+
registerService: IDL.Func(
|
|
510
|
+
[
|
|
511
|
+
IDL.Text,
|
|
512
|
+
IDL.Text,
|
|
513
|
+
ServiceType,
|
|
514
|
+
PricingScheme,
|
|
515
|
+
IDL.Text,
|
|
516
|
+
IDL.Opt(IDL.Text),
|
|
517
|
+
IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
518
|
+
ServiceDeliveryMethod,
|
|
519
|
+
IDL.Nat,
|
|
520
|
+
IDL.Opt(IDL.Bool),
|
|
521
|
+
],
|
|
522
|
+
[Result_2],
|
|
523
|
+
[],
|
|
524
|
+
),
|
|
525
|
+
removeAuditViewer: IDL.Func([IDL.Principal], [Result_1], []),
|
|
526
|
+
removeCallerPolicy: IDL.Func([IDL.Principal], [Result_1], []),
|
|
527
|
+
resolveDispute: IDL.Func([IDL.Text, IDL.Bool], [Result_1], []),
|
|
528
|
+
resolveJob: IDL.Func([IDL.Text, JobStatus], [Result_1], []),
|
|
529
|
+
setAdmin: IDL.Func([IDL.Principal], [Result_1], []),
|
|
530
|
+
setCallerPolicy: IDL.Func([IDL.Principal, SpendingPolicy], [Result_1], []),
|
|
531
|
+
setEndpointEnabled: IDL.Func([IDL.Text, IDL.Bool], [Result_1], []),
|
|
532
|
+
setEndpointPrice: IDL.Func([IDL.Text, IDL.Nat], [Result_1], []),
|
|
533
|
+
setEvmSellerPayout: IDL.Func([IDL.Text], [Result_1], []),
|
|
534
|
+
setPaymentPolicy: IDL.Func([SpendingPolicy], [Result_1], []),
|
|
535
|
+
setRegistryId: IDL.Func([IDL.Principal], [Result_1], []),
|
|
536
|
+
setServiceEnabled: IDL.Func([IDL.Text, IDL.Bool], [Result_1], []),
|
|
537
|
+
submitJobResult: IDL.Func(
|
|
538
|
+
[IDL.Text, IDL.Vec(IDL.Nat8), IDL.Opt(IDL.Vec(IDL.Nat8)), IDL.Opt(IDL.Nat)],
|
|
539
|
+
[Result_1],
|
|
540
|
+
[],
|
|
541
|
+
),
|
|
542
|
+
uploadContent: IDL.Func([IDL.Text, IDL.Text, IDL.Vec(IDL.Nat8)], [Result_1], []),
|
|
543
|
+
uploadContentChunk: IDL.Func([IDL.Text, IDL.Nat, IDL.Vec(IDL.Nat8)], [Result_1], []),
|
|
544
|
+
uploadContentInit: IDL.Func([IDL.Text, IDL.Text, IDL.Nat, IDL.Nat], [Result_1], []),
|
|
545
|
+
verifyGrant: IDL.Func([AccessGrant], [Result_1], ['query']),
|
|
546
|
+
withdrawContentRevenue: IDL.Func([], [Result], []),
|
|
547
|
+
});
|
|
548
|
+
};
|
|
549
|
+
export const init = ({ IDL }) => {
|
|
550
|
+
return [];
|
|
551
|
+
};
|