cantonjs-splice-validator 0.3.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/README.md +143 -0
- package/dist/createAnsClient.d.ts +33 -0
- package/dist/createAnsClient.js +22 -0
- package/dist/createAnsClient.js.map +1 -0
- package/dist/createLegacyWalletClient.d.ts +51 -0
- package/dist/createLegacyWalletClient.js +81 -0
- package/dist/createLegacyWalletClient.js.map +1 -0
- package/dist/createScanProxyClient.d.ts +108 -0
- package/dist/createScanProxyClient.js +161 -0
- package/dist/createScanProxyClient.js.map +1 -0
- package/dist/experimental/createExperimentalScanProxyClient.d.ts +81 -0
- package/dist/experimental/createExperimentalScanProxyClient.js +135 -0
- package/dist/experimental/createExperimentalScanProxyClient.js.map +1 -0
- package/dist/experimental/createExperimentalValidatorInternalClient.d.ts +183 -0
- package/dist/experimental/createExperimentalValidatorInternalClient.js +327 -0
- package/dist/experimental/createExperimentalValidatorInternalClient.js.map +1 -0
- package/dist/experimental/index.d.ts +2 -0
- package/dist/experimental/index.js +3 -0
- package/dist/experimental/index.js.map +1 -0
- package/dist/generated/ans.types.d.ts +194 -0
- package/dist/generated/ans.types.js +6 -0
- package/dist/generated/ans.types.js.map +1 -0
- package/dist/generated/scanProxy.types.d.ts +836 -0
- package/dist/generated/scanProxy.types.js +6 -0
- package/dist/generated/scanProxy.types.js.map +1 -0
- package/dist/generated/validatorInternal.types.d.ts +1297 -0
- package/dist/generated/validatorInternal.types.js +6 -0
- package/dist/generated/validatorInternal.types.js.map +1 -0
- package/dist/generated/walletExternal.types.d.ts +544 -0
- package/dist/generated/walletExternal.types.js +6 -0
- package/dist/generated/walletExternal.types.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatorInternal.types.js","sourceRoot":"","sources":["../../src/generated/validatorInternal.types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/v0/wallet/transfer-offers": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/** @description List all open transfer offers where the user is either sender or receiver. */
|
|
14
|
+
get: operations["listTransferOffers"];
|
|
15
|
+
put?: never;
|
|
16
|
+
/**
|
|
17
|
+
* @description Create an offer to directly transfer a given amount of Amulet to another party.
|
|
18
|
+
* Direct transfers are a three-step process:
|
|
19
|
+
* 1. The sender creates a transfer offer
|
|
20
|
+
* 2. The receiver accepts the offer
|
|
21
|
+
* 3. The sender's wallet automation consumes the accepted offer and transfers the amount.
|
|
22
|
+
* Amulets are not locked for direct transfers.
|
|
23
|
+
* If the sender's wallet does not have enough Amulet to fulfill the offer at this point,
|
|
24
|
+
* the transfer will fail.
|
|
25
|
+
*/
|
|
26
|
+
post: operations["createTransferOffer"];
|
|
27
|
+
delete?: never;
|
|
28
|
+
options?: never;
|
|
29
|
+
head?: never;
|
|
30
|
+
patch?: never;
|
|
31
|
+
trace?: never;
|
|
32
|
+
};
|
|
33
|
+
"/v0/wallet/transfer-offers/{tracking_id}/status": {
|
|
34
|
+
parameters: {
|
|
35
|
+
query?: never;
|
|
36
|
+
header?: never;
|
|
37
|
+
path?: never;
|
|
38
|
+
cookie?: never;
|
|
39
|
+
};
|
|
40
|
+
get?: never;
|
|
41
|
+
put?: never;
|
|
42
|
+
/** @description Check the status of a transfer offer with a given tracking id. */
|
|
43
|
+
post: operations["getTransferOfferStatus"];
|
|
44
|
+
delete?: never;
|
|
45
|
+
options?: never;
|
|
46
|
+
head?: never;
|
|
47
|
+
patch?: never;
|
|
48
|
+
trace?: never;
|
|
49
|
+
};
|
|
50
|
+
"/v0/wallet/buy-traffic-requests": {
|
|
51
|
+
parameters: {
|
|
52
|
+
query?: never;
|
|
53
|
+
header?: never;
|
|
54
|
+
path?: never;
|
|
55
|
+
cookie?: never;
|
|
56
|
+
};
|
|
57
|
+
get?: never;
|
|
58
|
+
put?: never;
|
|
59
|
+
/** @description Create a request to buy traffic. Note that this only creates the request to do so. Refer to the status endpoint to check if the request succeeded. */
|
|
60
|
+
post: operations["createBuyTrafficRequest"];
|
|
61
|
+
delete?: never;
|
|
62
|
+
options?: never;
|
|
63
|
+
head?: never;
|
|
64
|
+
patch?: never;
|
|
65
|
+
trace?: never;
|
|
66
|
+
};
|
|
67
|
+
"/v0/wallet/buy-traffic-requests/{tracking_id}/status": {
|
|
68
|
+
parameters: {
|
|
69
|
+
query?: never;
|
|
70
|
+
header?: never;
|
|
71
|
+
path?: never;
|
|
72
|
+
cookie?: never;
|
|
73
|
+
};
|
|
74
|
+
get?: never;
|
|
75
|
+
put?: never;
|
|
76
|
+
/** @description Check the status of a buy traffic request with a given tracking id. */
|
|
77
|
+
post: operations["getBuyTrafficRequestStatus"];
|
|
78
|
+
delete?: never;
|
|
79
|
+
options?: never;
|
|
80
|
+
head?: never;
|
|
81
|
+
patch?: never;
|
|
82
|
+
trace?: never;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export type webhooks = Record<string, never>;
|
|
86
|
+
export interface components {
|
|
87
|
+
schemas: {
|
|
88
|
+
CreateTransferOfferRequest: {
|
|
89
|
+
/** @description The party id of the receiver. */
|
|
90
|
+
receiver_party_id: string;
|
|
91
|
+
/** @description The amount of Amulet to transfer. */
|
|
92
|
+
amount: string;
|
|
93
|
+
/**
|
|
94
|
+
* @description An arbitrary, user chosen text.
|
|
95
|
+
* This should be a human readable string that describes the purpose of the transfer.
|
|
96
|
+
* It will be shown to the receiver when they decide whether to accept the offer.
|
|
97
|
+
*/
|
|
98
|
+
description: string;
|
|
99
|
+
/**
|
|
100
|
+
* Format: int64
|
|
101
|
+
* @description Expiry time of the transfer offer as unix timestamp in microseconds. After this time, the offer can no longer be accepted
|
|
102
|
+
* and automation in the wallet will eventually expire the transfer offer.
|
|
103
|
+
* Note that this time is compared against the ledger effective time of the Daml transaction accepting or expiring an offer, and can skew from the wall clock
|
|
104
|
+
* time measured on the caller's machine. See https://docs.daml.com/concepts/time.html
|
|
105
|
+
* for how ledger effective time is bound to the record time of a transaction on a domain.
|
|
106
|
+
*/
|
|
107
|
+
expires_at: number;
|
|
108
|
+
/**
|
|
109
|
+
* @description Tracking id to support exactly once submission. Once submitted, all successive calls with the same tracking id
|
|
110
|
+
* will get rejected with a 409 or 429 status code unless the command fails and the offer did not get created.
|
|
111
|
+
* Clients should create a fresh tracking id when they try to create a new transfer offer. If that command submission fails
|
|
112
|
+
* with a retryable error or the application crashed and got restarted, successive command submissions must reuse the same
|
|
113
|
+
* tracking id to ensure they don't create the same offer multiple times.
|
|
114
|
+
*/
|
|
115
|
+
tracking_id: string;
|
|
116
|
+
};
|
|
117
|
+
BaseGetTransferOfferStatusResponse: {
|
|
118
|
+
/**
|
|
119
|
+
* @description The status of the transfer offer.
|
|
120
|
+
* created:
|
|
121
|
+
* The offer has been created and is waiting for the receiver to accept it.
|
|
122
|
+
* contract_id points to the contract_id of the offer and transaction_id to the transaction that created it.
|
|
123
|
+
* accepted:
|
|
124
|
+
* The offer has been accepted by the receiver and is waiting for the wallet automation
|
|
125
|
+
* to complete it by delivering the offered Amulet.
|
|
126
|
+
* contract_id points to the contract id of the accepted offer and transaction_id to the transaction that accepted it
|
|
127
|
+
* completed:
|
|
128
|
+
* The transfer has been completed and the CC amount has been transferred to the receiver.
|
|
129
|
+
* contract_id points to the contract id of the created amulet for the receiver and
|
|
130
|
+
* transaction_id to the transaction of the transfer.
|
|
131
|
+
* failed:
|
|
132
|
+
* The transfer has failed permanently and no CC has been transferred. Refer to
|
|
133
|
+
* failure_reason for details. A new transfer offer can be created with a different tracking_id.
|
|
134
|
+
*/
|
|
135
|
+
status: string;
|
|
136
|
+
};
|
|
137
|
+
TransferOfferCreatedResponse: components["schemas"]["BaseGetTransferOfferStatusResponse"] & {
|
|
138
|
+
/** @description Id of the transaction that created the transfer offer */
|
|
139
|
+
transaction_id: string;
|
|
140
|
+
/** @description Contract id of the created transfer offer */
|
|
141
|
+
contract_id: string;
|
|
142
|
+
} & {
|
|
143
|
+
/**
|
|
144
|
+
* @description discriminator enum property added by openapi-typescript
|
|
145
|
+
* @enum {string}
|
|
146
|
+
*/
|
|
147
|
+
status: "created";
|
|
148
|
+
};
|
|
149
|
+
TransferOfferAcceptedResponse: components["schemas"]["BaseGetTransferOfferStatusResponse"] & {
|
|
150
|
+
/** @description Id of the transaction that accepted the transfer offer */
|
|
151
|
+
transaction_id: string;
|
|
152
|
+
/** @description Contract id of the accepted transfer offer */
|
|
153
|
+
contract_id: string;
|
|
154
|
+
} & {
|
|
155
|
+
/**
|
|
156
|
+
* @description discriminator enum property added by openapi-typescript
|
|
157
|
+
* @enum {string}
|
|
158
|
+
*/
|
|
159
|
+
status: "accepted";
|
|
160
|
+
};
|
|
161
|
+
TransferOfferCompletedResponse: components["schemas"]["BaseGetTransferOfferStatusResponse"] & {
|
|
162
|
+
/** @description Id of the transaction of the transfer */
|
|
163
|
+
transaction_id: string;
|
|
164
|
+
/** @description Contract id of the created amulet for the receiver */
|
|
165
|
+
contract_id: string;
|
|
166
|
+
} & {
|
|
167
|
+
/**
|
|
168
|
+
* @description discriminator enum property added by openapi-typescript
|
|
169
|
+
* @enum {string}
|
|
170
|
+
*/
|
|
171
|
+
status: "completed";
|
|
172
|
+
};
|
|
173
|
+
TransferOfferFailedResponse: components["schemas"]["BaseGetTransferOfferStatusResponse"] & {
|
|
174
|
+
/**
|
|
175
|
+
* @description The reason for the failure of the transfer offer.
|
|
176
|
+
* expired:
|
|
177
|
+
* The transfer offer or the accepted transfer offer expired before it could be completed.
|
|
178
|
+
* rejected:
|
|
179
|
+
* The receiver rejected the transfer offer or withdrew their accepted offer.
|
|
180
|
+
* withdrawn:
|
|
181
|
+
* The sender withdraw their offer, e.g., due to insufficient funds or operational reasons.
|
|
182
|
+
* @enum {string}
|
|
183
|
+
*/
|
|
184
|
+
failure_kind: "expired" | "rejected" | "withdrawn";
|
|
185
|
+
/** @description Human readable description of the reason for the sender withdrawing their offer. */
|
|
186
|
+
withdrawn_reason?: string;
|
|
187
|
+
} & {
|
|
188
|
+
/**
|
|
189
|
+
* @description discriminator enum property added by openapi-typescript
|
|
190
|
+
* @enum {string}
|
|
191
|
+
*/
|
|
192
|
+
status: "failed";
|
|
193
|
+
};
|
|
194
|
+
GetTransferOfferStatusResponse: components["schemas"]["TransferOfferCreatedResponse"] | components["schemas"]["TransferOfferAcceptedResponse"] | components["schemas"]["TransferOfferCompletedResponse"] | components["schemas"]["TransferOfferFailedResponse"];
|
|
195
|
+
CreateTransferOfferResponse: {
|
|
196
|
+
offer_contract_id: string;
|
|
197
|
+
};
|
|
198
|
+
ListTransferOffersResponse: {
|
|
199
|
+
offers: components["schemas"]["Contract"][];
|
|
200
|
+
};
|
|
201
|
+
CreateBuyTrafficRequest: {
|
|
202
|
+
/**
|
|
203
|
+
* @description Traffic will be purchased for the validator hosting this party.
|
|
204
|
+
* If the party is hosted on multiple participants, the request will fail with 400 Bad Request.
|
|
205
|
+
*/
|
|
206
|
+
receiving_validator_party_id: string;
|
|
207
|
+
/** @description The domain to purchase traffic for. */
|
|
208
|
+
domain_id: string;
|
|
209
|
+
/**
|
|
210
|
+
* Format: int64
|
|
211
|
+
* @description traffic to purchase in bytes.
|
|
212
|
+
*/
|
|
213
|
+
traffic_amount: number;
|
|
214
|
+
/**
|
|
215
|
+
* @description Tracking id to support exactly once submission. Once submitted, all succeessive calls with the same tracking id
|
|
216
|
+
* will get rejected with a 409 or 429 status code unless the command fails and the traffic did not get purchased.
|
|
217
|
+
* Clients should create a fresh tracking id when they try to send a new request to buy traffic. If that command submission fails
|
|
218
|
+
* with a retryable error or the application crashed and got restarted, successive command submissions must reuse the same
|
|
219
|
+
* tracking id to ensure they don't purchase traffic multiple times.
|
|
220
|
+
*/
|
|
221
|
+
tracking_id: string;
|
|
222
|
+
/**
|
|
223
|
+
* Format: int64
|
|
224
|
+
* @description Expiry time of the request to buy traffic as unix timestamp in microseconds. If the request does not
|
|
225
|
+
* succeed before this time, the wallet automation will reject and expire it.
|
|
226
|
+
* Note that this time is compared against the ledger effective time of the Daml transaction accepting or expiring an offer, and can skew from the wall clock
|
|
227
|
+
* time measured on the caller's machine. See https://docs.daml.com/concepts/time.html
|
|
228
|
+
* for how ledger effective time is bound to the record time of a transaction on a domain.
|
|
229
|
+
*/
|
|
230
|
+
expires_at: number;
|
|
231
|
+
};
|
|
232
|
+
CreateBuyTrafficRequestResponse: {
|
|
233
|
+
request_contract_id: string;
|
|
234
|
+
};
|
|
235
|
+
BaseGetBuyTrafficRequestStatusResponse: {
|
|
236
|
+
/**
|
|
237
|
+
* @description The status of the traffic request
|
|
238
|
+
* created:
|
|
239
|
+
* The request to buy traffic has been created and is waiting for
|
|
240
|
+
* the wallet automation to pick it up.
|
|
241
|
+
* completed:
|
|
242
|
+
* The traffic has been purchased.
|
|
243
|
+
* transaction_id points to the transaction that purchased traffic.
|
|
244
|
+
* failed:
|
|
245
|
+
* The request to buy traffic has failed permanently and no CC has been transferred. Refer to
|
|
246
|
+
* failure_reason for details. Use a new tracking_id if you want to retry buying traffic.
|
|
247
|
+
*/
|
|
248
|
+
status: string;
|
|
249
|
+
};
|
|
250
|
+
BuyTrafficRequestCreatedResponse: components["schemas"]["BaseGetBuyTrafficRequestStatusResponse"] & {
|
|
251
|
+
/**
|
|
252
|
+
* @description discriminator enum property added by openapi-typescript
|
|
253
|
+
* @enum {string}
|
|
254
|
+
*/
|
|
255
|
+
status: "created";
|
|
256
|
+
};
|
|
257
|
+
BuyTrafficRequestCompletedResponse: components["schemas"]["BaseGetBuyTrafficRequestStatusResponse"] & {
|
|
258
|
+
/** @description Id of the transaction that purchased traffic. */
|
|
259
|
+
transaction_id: string;
|
|
260
|
+
} & {
|
|
261
|
+
/**
|
|
262
|
+
* @description discriminator enum property added by openapi-typescript
|
|
263
|
+
* @enum {string}
|
|
264
|
+
*/
|
|
265
|
+
status: "completed";
|
|
266
|
+
};
|
|
267
|
+
BuyTrafficRequestFailedResponse: components["schemas"]["BaseGetBuyTrafficRequestStatusResponse"] & {
|
|
268
|
+
/**
|
|
269
|
+
* @description The reason for the failure of the request to buy traffic.
|
|
270
|
+
* expired:
|
|
271
|
+
* The wallet automation did not process the request in time.
|
|
272
|
+
* rejected:
|
|
273
|
+
* The wallet automation rejected the request, e.g., due to insufficient funds or operational reasons.
|
|
274
|
+
* @enum {string}
|
|
275
|
+
*/
|
|
276
|
+
failure_reason: "expired" | "rejected";
|
|
277
|
+
/** @description Human readable description of the rejection reason. */
|
|
278
|
+
rejection_reason?: string;
|
|
279
|
+
} & {
|
|
280
|
+
/**
|
|
281
|
+
* @description discriminator enum property added by openapi-typescript
|
|
282
|
+
* @enum {string}
|
|
283
|
+
*/
|
|
284
|
+
status: "failed";
|
|
285
|
+
};
|
|
286
|
+
GetBuyTrafficRequestStatusResponse: components["schemas"]["BuyTrafficRequestCreatedResponse"] | components["schemas"]["BuyTrafficRequestCompletedResponse"] | components["schemas"]["BuyTrafficRequestFailedResponse"];
|
|
287
|
+
ContractId: string;
|
|
288
|
+
Contract: {
|
|
289
|
+
contract_id?: components["schemas"]["ContractId"];
|
|
290
|
+
template_id?: string;
|
|
291
|
+
package_name?: string;
|
|
292
|
+
payload?: {
|
|
293
|
+
[key: string]: unknown;
|
|
294
|
+
};
|
|
295
|
+
} & {
|
|
296
|
+
[key: string]: unknown;
|
|
297
|
+
};
|
|
298
|
+
ErrorResponse: {
|
|
299
|
+
error?: string;
|
|
300
|
+
message?: string;
|
|
301
|
+
details?: {
|
|
302
|
+
[key: string]: unknown;
|
|
303
|
+
};
|
|
304
|
+
} & {
|
|
305
|
+
[key: string]: unknown;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
responses: {
|
|
309
|
+
/** @description not found */
|
|
310
|
+
404: {
|
|
311
|
+
headers: {
|
|
312
|
+
[name: string]: unknown;
|
|
313
|
+
};
|
|
314
|
+
content: {
|
|
315
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
/** @description internal server error */
|
|
319
|
+
500: {
|
|
320
|
+
headers: {
|
|
321
|
+
[name: string]: unknown;
|
|
322
|
+
};
|
|
323
|
+
content: {
|
|
324
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
parameters: never;
|
|
329
|
+
requestBodies: never;
|
|
330
|
+
headers: never;
|
|
331
|
+
pathItems: never;
|
|
332
|
+
}
|
|
333
|
+
export type $defs = Record<string, never>;
|
|
334
|
+
export interface operations {
|
|
335
|
+
listTransferOffers: {
|
|
336
|
+
parameters: {
|
|
337
|
+
query?: never;
|
|
338
|
+
header?: never;
|
|
339
|
+
path?: never;
|
|
340
|
+
cookie?: never;
|
|
341
|
+
};
|
|
342
|
+
requestBody?: never;
|
|
343
|
+
responses: {
|
|
344
|
+
/** @description ok */
|
|
345
|
+
200: {
|
|
346
|
+
headers: {
|
|
347
|
+
[name: string]: unknown;
|
|
348
|
+
};
|
|
349
|
+
content: {
|
|
350
|
+
"application/json": components["schemas"]["ListTransferOffersResponse"];
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
404: components["responses"]["404"];
|
|
354
|
+
500: components["responses"]["500"];
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
createTransferOffer: {
|
|
358
|
+
parameters: {
|
|
359
|
+
query?: never;
|
|
360
|
+
header?: never;
|
|
361
|
+
path?: never;
|
|
362
|
+
cookie?: never;
|
|
363
|
+
};
|
|
364
|
+
requestBody: {
|
|
365
|
+
content: {
|
|
366
|
+
"application/json": components["schemas"]["CreateTransferOfferRequest"];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
responses: {
|
|
370
|
+
/** @description The transfer offer has been created. */
|
|
371
|
+
200: {
|
|
372
|
+
headers: {
|
|
373
|
+
[name: string]: unknown;
|
|
374
|
+
};
|
|
375
|
+
content: {
|
|
376
|
+
"application/json": components["schemas"]["CreateTransferOfferResponse"];
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
/** @description Invalid request, check the error response for details. */
|
|
380
|
+
400: {
|
|
381
|
+
headers: {
|
|
382
|
+
[name: string]: unknown;
|
|
383
|
+
};
|
|
384
|
+
content: {
|
|
385
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
/** @description The submitter’s wallet could not be found. */
|
|
389
|
+
404: {
|
|
390
|
+
headers: {
|
|
391
|
+
[name: string]: unknown;
|
|
392
|
+
};
|
|
393
|
+
content: {
|
|
394
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
/** @description A transfer offer with the same tracking id has been created. Check the status endpoint for the current status. */
|
|
398
|
+
409: {
|
|
399
|
+
headers: {
|
|
400
|
+
[name: string]: unknown;
|
|
401
|
+
};
|
|
402
|
+
content: {
|
|
403
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
/** @description A transfer offer with the same tracking id is currently being processed, which may or may not succeed. Retry submitting the request with exponential back-off. */
|
|
407
|
+
429: {
|
|
408
|
+
headers: {
|
|
409
|
+
[name: string]: unknown;
|
|
410
|
+
};
|
|
411
|
+
content: {
|
|
412
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
500: components["responses"]["500"];
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
getTransferOfferStatus: {
|
|
419
|
+
parameters: {
|
|
420
|
+
query?: never;
|
|
421
|
+
header?: never;
|
|
422
|
+
path: {
|
|
423
|
+
tracking_id: string;
|
|
424
|
+
};
|
|
425
|
+
cookie?: never;
|
|
426
|
+
};
|
|
427
|
+
requestBody?: never;
|
|
428
|
+
responses: {
|
|
429
|
+
/** @description An offer with this tracking id is known. Check the response for its status. */
|
|
430
|
+
200: {
|
|
431
|
+
headers: {
|
|
432
|
+
[name: string]: unknown;
|
|
433
|
+
};
|
|
434
|
+
content: {
|
|
435
|
+
"application/json": components["schemas"]["GetTransferOfferStatusResponse"];
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* @description No offer with this tracking id is known.
|
|
440
|
+
* Perhaps it has not yet been submitted or processed; or it has been submitted
|
|
441
|
+
* in the past before the current beginning of the wallet transaction log.
|
|
442
|
+
*/
|
|
443
|
+
404: {
|
|
444
|
+
headers: {
|
|
445
|
+
[name: string]: unknown;
|
|
446
|
+
};
|
|
447
|
+
content: {
|
|
448
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
createBuyTrafficRequest: {
|
|
454
|
+
parameters: {
|
|
455
|
+
query?: never;
|
|
456
|
+
header?: never;
|
|
457
|
+
path?: never;
|
|
458
|
+
cookie?: never;
|
|
459
|
+
};
|
|
460
|
+
requestBody: {
|
|
461
|
+
content: {
|
|
462
|
+
"application/json": components["schemas"]["CreateBuyTrafficRequest"];
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
responses: {
|
|
466
|
+
/** @description Request to buy traffic got created */
|
|
467
|
+
200: {
|
|
468
|
+
headers: {
|
|
469
|
+
[name: string]: unknown;
|
|
470
|
+
};
|
|
471
|
+
content: {
|
|
472
|
+
"application/json": components["schemas"]["CreateBuyTrafficRequestResponse"];
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
/** @description Request was invalid, adjust parameters */
|
|
476
|
+
400: {
|
|
477
|
+
headers: {
|
|
478
|
+
[name: string]: unknown;
|
|
479
|
+
};
|
|
480
|
+
content: {
|
|
481
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
/** @description A request to buy traffic with the same tracking id has been created. Check the status endpoint for the current status. */
|
|
485
|
+
409: {
|
|
486
|
+
headers: {
|
|
487
|
+
[name: string]: unknown;
|
|
488
|
+
};
|
|
489
|
+
content: {
|
|
490
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
/** @description A request to buy traffic with the same tracking id is currently being processed. Check the status endpoint and resubmit if it returns 404. */
|
|
494
|
+
429: {
|
|
495
|
+
headers: {
|
|
496
|
+
[name: string]: unknown;
|
|
497
|
+
};
|
|
498
|
+
content: {
|
|
499
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
/** @description Internal server error that requires operator investigation. Retrying for a small number of times with exponential back-off MAY work. */
|
|
503
|
+
500: {
|
|
504
|
+
headers: {
|
|
505
|
+
[name: string]: unknown;
|
|
506
|
+
};
|
|
507
|
+
content: {
|
|
508
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
getBuyTrafficRequestStatus: {
|
|
514
|
+
parameters: {
|
|
515
|
+
query?: never;
|
|
516
|
+
header?: never;
|
|
517
|
+
path: {
|
|
518
|
+
tracking_id: string;
|
|
519
|
+
};
|
|
520
|
+
cookie?: never;
|
|
521
|
+
};
|
|
522
|
+
requestBody?: never;
|
|
523
|
+
responses: {
|
|
524
|
+
/** @description A request to buy traffic with this tracking id has been submitted before, check the response for details. */
|
|
525
|
+
200: {
|
|
526
|
+
headers: {
|
|
527
|
+
[name: string]: unknown;
|
|
528
|
+
};
|
|
529
|
+
content: {
|
|
530
|
+
"application/json": components["schemas"]["GetBuyTrafficRequestStatusResponse"];
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
/** @description No request with this tracking id was found. */
|
|
534
|
+
404: {
|
|
535
|
+
headers: {
|
|
536
|
+
[name: string]: unknown;
|
|
537
|
+
};
|
|
538
|
+
content: {
|
|
539
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletExternal.types.js","sourceRoot":"","sources":["../../src/generated/walletExternal.types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createAnsClient, type AnsClient, type AnsClientConfig, type AnsRequestOptions, type AnsEntry, type AnsCreateEntryRequest, type AnsCreateEntryResponse, type AnsListEntriesResponse, } from './createAnsClient.js';
|
|
2
|
+
export { createScanProxyClient, type ScanProxyClient, type ScanProxyClientConfig, type ScanProxyRequestOptions, type ScanProxyAnsEntry, type ScanProxyDsoPartyIdResponse, type ScanProxyDsoInfoResponse, type ScanProxyOpenAndIssuingMiningRoundsResponse, type ScanProxyListAnsEntriesRequest, type ScanProxyListAnsEntriesResponse, type ScanProxyLookupAnsEntryByPartyRequest, type ScanProxyLookupAnsEntryByPartyResponse, type ScanProxyLookupAnsEntryByNameRequest, type ScanProxyLookupAnsEntryByNameResponse, type ScanProxyHoldingsSummaryRequest, type ScanProxyHoldingsSummaryResponse, type ScanProxyUnclaimedDevelopmentFundCouponsResponse, } from './createScanProxyClient.js';
|
|
3
|
+
export { createLegacyWalletClient, type LegacyWalletClient, type LegacyWalletClientConfig, type LegacyWalletRequestOptions, type LegacyWalletTransferOffer, type LegacyWalletCreateTransferOfferRequest, type LegacyWalletCreateTransferOfferResponse, type LegacyWalletListTransferOffersResponse, type LegacyWalletGetTransferOfferStatusRequest, type LegacyWalletTransferOfferStatusResponse, type LegacyWalletTransferOfferStatus, type LegacyWalletCreateBuyTrafficRequest, type LegacyWalletCreateBuyTrafficRequestResponse, type LegacyWalletGetBuyTrafficRequestStatusRequest, type LegacyWalletBuyTrafficRequestStatusResponse, type LegacyWalletBuyTrafficRequestStatus, } from './createLegacyWalletClient.js';
|
|
4
|
+
export { CantonjsError, AuthProviderError, ConnectionError, HttpError, TimeoutError, } from 'cantonjs';
|
|
5
|
+
export type { ErrorCode, CantonjsErrorOptions } from 'cantonjs';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createAnsClient, } from './createAnsClient.js';
|
|
2
|
+
export { createScanProxyClient, } from './createScanProxyClient.js';
|
|
3
|
+
export { createLegacyWalletClient, } from './createLegacyWalletClient.js';
|
|
4
|
+
export { CantonjsError, AuthProviderError, ConnectionError, HttpError, TimeoutError, } from 'cantonjs';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAQhB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,qBAAqB,GAiBtB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,wBAAwB,GAgBzB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,YAAY,GACb,MAAM,UAAU,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cantonjs-splice-validator",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Validator-facing Splice clients for ANS, filtered Scan Proxy, and legacy wallet compatibility",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./experimental": {
|
|
15
|
+
"types": "./dist/experimental/index.d.ts",
|
|
16
|
+
"import": "./dist/experimental/index.js",
|
|
17
|
+
"default": "./dist/experimental/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"typecheck": "tsc --noEmit",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:watch": "vitest",
|
|
26
|
+
"test:coverage": "node ../../scripts/verify-coverage-exclusions.mjs && vitest run --coverage",
|
|
27
|
+
"clean": "rm -rf dist",
|
|
28
|
+
"generate:types": "npm run generate:types:ans && npm run generate:types:scan-proxy && npm run generate:types:wallet",
|
|
29
|
+
"generate:types:ans": "SPLICE_TAG=\"$(find ../../vendor/splice -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sort -V | tail -n1)\" && mkdir -p ./src/generated && npx openapi-typescript \"../../vendor/splice/${SPLICE_TAG}/openapi/ans-external.yaml\" -o \"./src/generated/ans.types.ts\"",
|
|
30
|
+
"generate:types:scan-proxy": "SPLICE_TAG=\"$(find ../../vendor/splice -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sort -V | tail -n1)\" && mkdir -p ./src/generated ../../scan/src/main/openapi && ln -sf \"$PWD/../../vendor/splice/${SPLICE_TAG}/openapi/scan.yaml\" ../../scan/src/main/openapi/scan.yaml && npx openapi-typescript \"../../vendor/splice/${SPLICE_TAG}/openapi/scan-proxy.yaml\" -o \"./src/generated/scanProxy.types.ts\" && rm -f ../../scan/src/main/openapi/scan.yaml && rmdir ../../scan/src/main/openapi ../../scan/src/main ../../scan/src 2>/dev/null || true",
|
|
31
|
+
"generate:types:wallet": "SPLICE_TAG=\"$(find ../../vendor/splice -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sort -V | tail -n1)\" && mkdir -p ./src/generated && npx openapi-typescript \"../../vendor/splice/${SPLICE_TAG}/openapi/wallet-external.yaml\" -o \"./src/generated/walletExternal.types.ts\"",
|
|
32
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"keywords": [
|
|
38
|
+
"canton",
|
|
39
|
+
"splice",
|
|
40
|
+
"validator",
|
|
41
|
+
"ans",
|
|
42
|
+
"typescript",
|
|
43
|
+
"client"
|
|
44
|
+
],
|
|
45
|
+
"author": "Charles Dusek",
|
|
46
|
+
"license": "Apache-2.0",
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "git+https://github.com/merged-one/cantonjs.git",
|
|
50
|
+
"directory": "packages/cantonjs-splice-validator"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"cantonjs": "^0.3.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^24.5.2",
|
|
57
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
58
|
+
"cantonjs": "file:../..",
|
|
59
|
+
"openapi-typescript": "^7.13.0",
|
|
60
|
+
"typescript": "^5.5.0",
|
|
61
|
+
"vitest": "^3.0.0",
|
|
62
|
+
"yaml": "^2.8.1"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=18"
|
|
66
|
+
}
|
|
67
|
+
}
|