@nirvana-labs/nirvana 1.10.0 → 1.12.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/CHANGELOG.md +17 -0
- package/package.json +1 -1
- package/resources/vektor/borrow/borrow.d.mts +8 -0
- package/resources/vektor/borrow/borrow.d.mts.map +1 -1
- package/resources/vektor/borrow/borrow.d.ts +8 -0
- package/resources/vektor/borrow/borrow.d.ts.map +1 -1
- package/resources/vektor/borrow/borrow.js +8 -0
- package/resources/vektor/borrow/borrow.js.map +1 -1
- package/resources/vektor/borrow/borrow.mjs +8 -0
- package/resources/vektor/borrow/borrow.mjs.map +1 -1
- package/resources/vektor/borrow/borrow_.d.mts +47 -0
- package/resources/vektor/borrow/borrow_.d.mts.map +1 -0
- package/resources/vektor/borrow/borrow_.d.ts +47 -0
- package/resources/vektor/borrow/borrow_.d.ts.map +1 -0
- package/resources/vektor/borrow/borrow_.js +26 -0
- package/resources/vektor/borrow/borrow_.js.map +1 -0
- package/resources/vektor/borrow/borrow_.mjs +22 -0
- package/resources/vektor/borrow/borrow_.mjs.map +1 -0
- package/resources/vektor/borrow/index.d.mts +2 -0
- package/resources/vektor/borrow/index.d.mts.map +1 -1
- package/resources/vektor/borrow/index.d.ts +2 -0
- package/resources/vektor/borrow/index.d.ts.map +1 -1
- package/resources/vektor/borrow/index.js +3 -1
- package/resources/vektor/borrow/index.js.map +1 -1
- package/resources/vektor/borrow/index.mjs +1 -0
- package/resources/vektor/borrow/index.mjs.map +1 -1
- package/resources/vektor/borrow/repay.d.mts +47 -0
- package/resources/vektor/borrow/repay.d.mts.map +1 -0
- package/resources/vektor/borrow/repay.d.ts +47 -0
- package/resources/vektor/borrow/repay.d.ts.map +1 -0
- package/resources/vektor/borrow/repay.js +25 -0
- package/resources/vektor/borrow/repay.js.map +1 -0
- package/resources/vektor/borrow/repay.mjs +21 -0
- package/resources/vektor/borrow/repay.mjs.map +1 -0
- package/resources/vektor/executions/steps.d.mts +220 -2
- package/resources/vektor/executions/steps.d.mts.map +1 -1
- package/resources/vektor/executions/steps.d.ts +220 -2
- package/resources/vektor/executions/steps.d.ts.map +1 -1
- package/resources/vektor/vektor.d.mts +307 -7
- package/resources/vektor/vektor.d.mts.map +1 -1
- package/resources/vektor/vektor.d.ts +307 -7
- package/resources/vektor/vektor.d.ts.map +1 -1
- package/resources/vektor/vektor.js.map +1 -1
- package/resources/vektor/vektor.mjs.map +1 -1
- package/src/resources/vektor/borrow/borrow.ts +12 -0
- package/src/resources/vektor/borrow/borrow_.ts +57 -0
- package/src/resources/vektor/borrow/index.ts +2 -0
- package/src/resources/vektor/borrow/repay.ts +57 -0
- package/src/resources/vektor/executions/steps.ts +268 -0
- package/src/resources/vektor/vektor.ts +373 -5
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as VektorAPI from '../vektor';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
|
|
8
|
+
export class Repay extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Repay to a borrow
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const execution = await client.vektor.borrow.repay.create({
|
|
15
|
+
* blockchain: 'blockchain_01jbz9nsy8egar70jg79dkwmaf',
|
|
16
|
+
* from: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
|
17
|
+
* market_id:
|
|
18
|
+
* 'lend_borrow_market_01h455vb4pex5vsknk084sn02q',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: RepayCreateParams, options?: RequestOptions): APIPromise<VektorAPI.Execution> {
|
|
23
|
+
return this._client.post('/v1/vektor/borrow/repay', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface RepayCreateParams {
|
|
28
|
+
/**
|
|
29
|
+
* A blockchain ID, represented as a TypeID with `blockchain` prefix
|
|
30
|
+
*/
|
|
31
|
+
blockchain: VektorAPI.BlockchainIDOrBlockchainSymbol;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* An EVM address
|
|
35
|
+
*/
|
|
36
|
+
from: VektorAPI.Account;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
|
|
40
|
+
* prefix
|
|
41
|
+
*/
|
|
42
|
+
market_id: VektorAPI.LendBorrowMarketID;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* An arbitrary precision decimal represented as a string
|
|
46
|
+
*/
|
|
47
|
+
amount?: string | null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* An asset ID, represented as a TypeID with `asset` prefix
|
|
51
|
+
*/
|
|
52
|
+
asset?: VektorAPI.AssetID;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export declare namespace Repay {
|
|
56
|
+
export { type RepayCreateParams as RepayCreateParams };
|
|
57
|
+
}
|
|
@@ -64,6 +64,8 @@ export interface StepGetResponse {
|
|
|
64
64
|
*/
|
|
65
65
|
definition:
|
|
66
66
|
| StepGetResponse.ExecutionEVMTransactionApprove
|
|
67
|
+
| StepGetResponse.ExecutionEVMTransactionBorrow
|
|
68
|
+
| StepGetResponse.ExecutionEVMTransactionBorrowRepay
|
|
67
69
|
| StepGetResponse.ExecutionEVMTransactionBuy
|
|
68
70
|
| StepGetResponse.ExecutionEVMTransactionLend
|
|
69
71
|
| StepGetResponse.ExecutionEVMTransactionLendSetCollateral
|
|
@@ -81,6 +83,8 @@ export interface StepGetResponse {
|
|
|
81
83
|
*/
|
|
82
84
|
type:
|
|
83
85
|
| 'evm_transaction_approve'
|
|
86
|
+
| 'evm_transaction_borrow'
|
|
87
|
+
| 'evm_transaction_borrow_repay'
|
|
84
88
|
| 'evm_transaction_buy'
|
|
85
89
|
| 'evm_transaction_lend'
|
|
86
90
|
| 'evm_transaction_lend_set_collateral'
|
|
@@ -191,6 +195,11 @@ export namespace StepGetResponse {
|
|
|
191
195
|
*/
|
|
192
196
|
to: string | null;
|
|
193
197
|
|
|
198
|
+
/**
|
|
199
|
+
* The type of approval
|
|
200
|
+
*/
|
|
201
|
+
type: 'spend_erc20' | 'borrow_erc20' | 'spend_erc721' | 'spend_erc721_collection';
|
|
202
|
+
|
|
194
203
|
/**
|
|
195
204
|
* ISO8601 Timestamp
|
|
196
205
|
*/
|
|
@@ -224,6 +233,265 @@ export namespace StepGetResponse {
|
|
|
224
233
|
}
|
|
225
234
|
}
|
|
226
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Borrowing an asset
|
|
238
|
+
*/
|
|
239
|
+
export interface ExecutionEVMTransactionBorrow {
|
|
240
|
+
/**
|
|
241
|
+
* An arbitrary precision decimal represented as a string
|
|
242
|
+
*/
|
|
243
|
+
amount: VektorAPI.Decimal;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* On-chain asset (aka token)
|
|
247
|
+
*/
|
|
248
|
+
asset: VektorAPI.Asset;
|
|
249
|
+
|
|
250
|
+
block_number: number | null;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* ISO8601 Timestamp
|
|
254
|
+
*/
|
|
255
|
+
broadcasted_at: string | null;
|
|
256
|
+
|
|
257
|
+
confirmation_target: number;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* ISO8601 Timestamp
|
|
261
|
+
*/
|
|
262
|
+
confirmed_at: string | null;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* ISO8601 Timestamp
|
|
266
|
+
*/
|
|
267
|
+
created_at: VektorAPI.Timestamp;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* A hex string starting with 0x
|
|
271
|
+
*/
|
|
272
|
+
data: string | null;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* An arbitrary precision decimal represented as a string
|
|
276
|
+
*/
|
|
277
|
+
effective_gas_price: string | null;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* An error
|
|
281
|
+
*/
|
|
282
|
+
error: ExecutionEVMTransactionBorrow.Error | null;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* ISO8601 Timestamp
|
|
286
|
+
*/
|
|
287
|
+
errored_at: string | null;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* An arbitrary precision decimal represented as a string
|
|
291
|
+
*/
|
|
292
|
+
gas_used: string | null;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* A transaction hash
|
|
296
|
+
*/
|
|
297
|
+
hash: string | null;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
|
|
301
|
+
* prefix
|
|
302
|
+
*/
|
|
303
|
+
lend_borrow_market_id: VektorAPI.LendBorrowMarketID;
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* The payload of an EIP-1559 transaction
|
|
307
|
+
*/
|
|
308
|
+
payload: VektorAPI.ExecutionEVMTransactionEIP1559Payload;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* ISO8601 Timestamp
|
|
312
|
+
*/
|
|
313
|
+
signed_at: string | null;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* The state of an EVM transaction
|
|
317
|
+
*/
|
|
318
|
+
state: VektorAPI.ExecutionEVMTransactionState;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The state of an EVM transaction
|
|
322
|
+
*/
|
|
323
|
+
target_state: VektorAPI.ExecutionEVMTransactionState;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* An EVM address
|
|
327
|
+
*/
|
|
328
|
+
to: string | null;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* ISO8601 Timestamp
|
|
332
|
+
*/
|
|
333
|
+
updated_at: VektorAPI.Timestamp;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* An arbitrary precision decimal represented as a string
|
|
337
|
+
*/
|
|
338
|
+
value: string | null;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* A venue symbol
|
|
342
|
+
*/
|
|
343
|
+
venue_symbol: VektorAPI.VenueSymbol;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export namespace ExecutionEVMTransactionBorrow {
|
|
347
|
+
/**
|
|
348
|
+
* An error
|
|
349
|
+
*/
|
|
350
|
+
export interface Error {
|
|
351
|
+
/**
|
|
352
|
+
* Error message
|
|
353
|
+
*/
|
|
354
|
+
message: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Error parameters
|
|
358
|
+
*/
|
|
359
|
+
params: { [key: string]: unknown };
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Error type
|
|
363
|
+
*/
|
|
364
|
+
type: string;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Repaying a borrowed asset
|
|
370
|
+
*/
|
|
371
|
+
export interface ExecutionEVMTransactionBorrowRepay {
|
|
372
|
+
/**
|
|
373
|
+
* An arbitrary precision decimal represented as a string
|
|
374
|
+
*/
|
|
375
|
+
amount: string | null;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* On-chain asset (aka token)
|
|
379
|
+
*/
|
|
380
|
+
asset: VektorAPI.Asset;
|
|
381
|
+
|
|
382
|
+
block_number: number | null;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* ISO8601 Timestamp
|
|
386
|
+
*/
|
|
387
|
+
broadcasted_at: string | null;
|
|
388
|
+
|
|
389
|
+
confirmation_target: number;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* ISO8601 Timestamp
|
|
393
|
+
*/
|
|
394
|
+
confirmed_at: string | null;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* ISO8601 Timestamp
|
|
398
|
+
*/
|
|
399
|
+
created_at: VektorAPI.Timestamp;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* A hex string starting with 0x
|
|
403
|
+
*/
|
|
404
|
+
data: string | null;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* An arbitrary precision decimal represented as a string
|
|
408
|
+
*/
|
|
409
|
+
effective_gas_price: string | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* An error
|
|
413
|
+
*/
|
|
414
|
+
error: ExecutionEVMTransactionBorrowRepay.Error | null;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* ISO8601 Timestamp
|
|
418
|
+
*/
|
|
419
|
+
errored_at: string | null;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* An arbitrary precision decimal represented as a string
|
|
423
|
+
*/
|
|
424
|
+
gas_used: string | null;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* A transaction hash
|
|
428
|
+
*/
|
|
429
|
+
hash: string | null;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* A lend/borrow market ID, represented as a TypeID with `lend_borrow_market`
|
|
433
|
+
* prefix
|
|
434
|
+
*/
|
|
435
|
+
lend_borrow_market_id: VektorAPI.LendBorrowMarketID;
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* The payload of an EIP-1559 transaction
|
|
439
|
+
*/
|
|
440
|
+
payload: VektorAPI.ExecutionEVMTransactionEIP1559Payload;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* ISO8601 Timestamp
|
|
444
|
+
*/
|
|
445
|
+
signed_at: string | null;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* The state of an EVM transaction
|
|
449
|
+
*/
|
|
450
|
+
state: VektorAPI.ExecutionEVMTransactionState;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* The state of an EVM transaction
|
|
454
|
+
*/
|
|
455
|
+
target_state: VektorAPI.ExecutionEVMTransactionState;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* An EVM address
|
|
459
|
+
*/
|
|
460
|
+
to: string | null;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* ISO8601 Timestamp
|
|
464
|
+
*/
|
|
465
|
+
updated_at: VektorAPI.Timestamp;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* An arbitrary precision decimal represented as a string
|
|
469
|
+
*/
|
|
470
|
+
value: string | null;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export namespace ExecutionEVMTransactionBorrowRepay {
|
|
474
|
+
/**
|
|
475
|
+
* An error
|
|
476
|
+
*/
|
|
477
|
+
export interface Error {
|
|
478
|
+
/**
|
|
479
|
+
* Error message
|
|
480
|
+
*/
|
|
481
|
+
message: string;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Error parameters
|
|
485
|
+
*/
|
|
486
|
+
params: { [key: string]: unknown };
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Error type
|
|
490
|
+
*/
|
|
491
|
+
type: string;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
227
495
|
/**
|
|
228
496
|
* Buying an asset with another asset
|
|
229
497
|
*/
|