@nightlylabs/dex-sdk 0.0.86 → 0.0.87
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/dist/index.cjs +74 -32
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +74 -32
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ var import_uuid = require("uuid");
|
|
|
65
65
|
|
|
66
66
|
// generated_types/addApiKey.ts
|
|
67
67
|
var ABI = {
|
|
68
|
-
"address": "
|
|
68
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
69
69
|
"name": "add_api_key",
|
|
70
70
|
"friends": [],
|
|
71
71
|
"exposed_functions": [
|
|
@@ -90,7 +90,7 @@ var addApiKey_default = ABI;
|
|
|
90
90
|
|
|
91
91
|
// generated_types/cancelAllPerpOrders.ts
|
|
92
92
|
var ABI2 = {
|
|
93
|
-
"address": "
|
|
93
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
94
94
|
"name": "cancel_all_perp_orders",
|
|
95
95
|
"friends": [],
|
|
96
96
|
"exposed_functions": [
|
|
@@ -113,7 +113,7 @@ var cancelAllPerpOrders_default = ABI2;
|
|
|
113
113
|
|
|
114
114
|
// generated_types/cancelPerpOrders.ts
|
|
115
115
|
var ABI3 = {
|
|
116
|
-
"address": "
|
|
116
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
117
117
|
"name": "cancel_perp_orders",
|
|
118
118
|
"friends": [],
|
|
119
119
|
"exposed_functions": [
|
|
@@ -138,7 +138,7 @@ var cancelPerpOrders_default = ABI3;
|
|
|
138
138
|
|
|
139
139
|
// generated_types/createUser.ts
|
|
140
140
|
var ABI4 = {
|
|
141
|
-
"address": "
|
|
141
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
142
142
|
"name": "create_user",
|
|
143
143
|
"friends": [],
|
|
144
144
|
"exposed_functions": [
|
|
@@ -163,7 +163,7 @@ var createUser_default = ABI4;
|
|
|
163
163
|
|
|
164
164
|
// generated_types/depositToVault.ts
|
|
165
165
|
var ABI5 = {
|
|
166
|
-
"address": "
|
|
166
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
167
167
|
"name": "deposit_to_vault",
|
|
168
168
|
"friends": [],
|
|
169
169
|
"exposed_functions": [
|
|
@@ -188,7 +188,7 @@ var depositToVault_default = ABI5;
|
|
|
188
188
|
|
|
189
189
|
// generated_types/depositToken.ts
|
|
190
190
|
var ABI6 = {
|
|
191
|
-
"address": "
|
|
191
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
192
192
|
"name": "deposit_token",
|
|
193
193
|
"friends": [],
|
|
194
194
|
"exposed_functions": [
|
|
@@ -213,7 +213,7 @@ var depositToken_default = ABI6;
|
|
|
213
213
|
|
|
214
214
|
// generated_types/lendToken.ts
|
|
215
215
|
var ABI7 = {
|
|
216
|
-
"address": "
|
|
216
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
217
217
|
"name": "lend_token",
|
|
218
218
|
"friends": [],
|
|
219
219
|
"exposed_functions": [
|
|
@@ -239,7 +239,7 @@ var lendToken_default = ABI7;
|
|
|
239
239
|
|
|
240
240
|
// generated_types/placePerpLimitOrder.ts
|
|
241
241
|
var ABI8 = {
|
|
242
|
-
"address": "
|
|
242
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
243
243
|
"name": "place_perp_limit_order",
|
|
244
244
|
"friends": [],
|
|
245
245
|
"exposed_functions": [
|
|
@@ -268,7 +268,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
268
268
|
|
|
269
269
|
// generated_types/changePerpOrderPrice.ts
|
|
270
270
|
var ABI9 = {
|
|
271
|
-
"address": "
|
|
271
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
272
272
|
"name": "change_perp_order_price",
|
|
273
273
|
"friends": [],
|
|
274
274
|
"exposed_functions": [
|
|
@@ -295,7 +295,7 @@ var changePerpOrderPrice_default = ABI9;
|
|
|
295
295
|
|
|
296
296
|
// generated_types/placePerpMarketOrder.ts
|
|
297
297
|
var ABI10 = {
|
|
298
|
-
"address": "
|
|
298
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
299
299
|
"name": "place_perp_market_order",
|
|
300
300
|
"friends": [],
|
|
301
301
|
"exposed_functions": [
|
|
@@ -323,7 +323,7 @@ var placePerpMarketOrder_default = ABI10;
|
|
|
323
323
|
|
|
324
324
|
// generated_types/redeemToken.ts
|
|
325
325
|
var ABI11 = {
|
|
326
|
-
"address": "
|
|
326
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
327
327
|
"name": "redeem_token",
|
|
328
328
|
"friends": [],
|
|
329
329
|
"exposed_functions": [
|
|
@@ -349,7 +349,7 @@ var redeemToken_default = ABI11;
|
|
|
349
349
|
|
|
350
350
|
// generated_types/removeApiKey.ts
|
|
351
351
|
var ABI12 = {
|
|
352
|
-
"address": "
|
|
352
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
353
353
|
"name": "remove_api_key",
|
|
354
354
|
"friends": [],
|
|
355
355
|
"exposed_functions": [
|
|
@@ -373,7 +373,7 @@ var removeApiKey_default = ABI12;
|
|
|
373
373
|
|
|
374
374
|
// generated_types/setAliasName.ts
|
|
375
375
|
var ABI13 = {
|
|
376
|
-
"address": "
|
|
376
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
377
377
|
"name": "set_alias_name",
|
|
378
378
|
"friends": [],
|
|
379
379
|
"exposed_functions": [
|
|
@@ -397,7 +397,7 @@ var setAliasName_default = ABI13;
|
|
|
397
397
|
|
|
398
398
|
// generated_types/setAutolend.ts
|
|
399
399
|
var ABI14 = {
|
|
400
|
-
"address": "
|
|
400
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
401
401
|
"name": "set_autolend",
|
|
402
402
|
"friends": [],
|
|
403
403
|
"exposed_functions": [
|
|
@@ -421,7 +421,7 @@ var setAutolend_default = ABI14;
|
|
|
421
421
|
|
|
422
422
|
// generated_types/claimReferralFees.ts
|
|
423
423
|
var ABI15 = {
|
|
424
|
-
"address": "
|
|
424
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
425
425
|
"name": "claim_referral_fees",
|
|
426
426
|
"friends": [],
|
|
427
427
|
"exposed_functions": [
|
|
@@ -445,7 +445,7 @@ var claimReferralFees_default = ABI15;
|
|
|
445
445
|
|
|
446
446
|
// generated_types/transferToUser.ts
|
|
447
447
|
var ABI16 = {
|
|
448
|
-
"address": "
|
|
448
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
449
449
|
"name": "transfer_to_user",
|
|
450
450
|
"friends": [],
|
|
451
451
|
"exposed_functions": [
|
|
@@ -472,7 +472,7 @@ var transferToUser_default = ABI16;
|
|
|
472
472
|
|
|
473
473
|
// generated_types/placeMultiplePerpOrders.ts
|
|
474
474
|
var ABI17 = {
|
|
475
|
-
"address": "
|
|
475
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
476
476
|
"name": "place_multiple_perp_orders",
|
|
477
477
|
"friends": [],
|
|
478
478
|
"exposed_functions": [
|
|
@@ -501,7 +501,7 @@ var placeMultiplePerpOrders_default = ABI17;
|
|
|
501
501
|
|
|
502
502
|
// generated_types/claimKickbackFee.ts
|
|
503
503
|
var ABI18 = {
|
|
504
|
-
"address": "
|
|
504
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
505
505
|
"name": "claim_kickback_fee",
|
|
506
506
|
"friends": [],
|
|
507
507
|
"exposed_functions": [
|
|
@@ -524,7 +524,7 @@ var claimKickbackFee_default = ABI18;
|
|
|
524
524
|
|
|
525
525
|
// generated_types/replaceMultipleOrders.ts
|
|
526
526
|
var ABI19 = {
|
|
527
|
-
"address": "
|
|
527
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
528
528
|
"name": "replace_multiple_orders",
|
|
529
529
|
"friends": [],
|
|
530
530
|
"exposed_functions": [
|
|
@@ -552,7 +552,7 @@ var replaceMultipleOrders_default = ABI19;
|
|
|
552
552
|
|
|
553
553
|
// generated_types/claimDeposit.ts
|
|
554
554
|
var ABI20 = {
|
|
555
|
-
"address": "
|
|
555
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
556
556
|
"name": "claim_deposit",
|
|
557
557
|
"friends": [],
|
|
558
558
|
"exposed_functions": [
|
|
@@ -574,6 +574,30 @@ var ABI20 = {
|
|
|
574
574
|
};
|
|
575
575
|
var claimDeposit_default = ABI20;
|
|
576
576
|
|
|
577
|
+
// generated_types/removeApiKeySigner.ts
|
|
578
|
+
var ABI21 = {
|
|
579
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
580
|
+
"name": "remove_api_key_signer",
|
|
581
|
+
"friends": [],
|
|
582
|
+
"exposed_functions": [
|
|
583
|
+
{
|
|
584
|
+
"name": "remove_api_key_signer",
|
|
585
|
+
"visibility": "public",
|
|
586
|
+
"is_entry": true,
|
|
587
|
+
"is_view": false,
|
|
588
|
+
"generic_type_params": [],
|
|
589
|
+
"params": [
|
|
590
|
+
"&signer",
|
|
591
|
+
"vector<address>",
|
|
592
|
+
"u64"
|
|
593
|
+
],
|
|
594
|
+
"return": []
|
|
595
|
+
}
|
|
596
|
+
],
|
|
597
|
+
"structs": []
|
|
598
|
+
};
|
|
599
|
+
var removeApiKeySigner_default = ABI21;
|
|
600
|
+
|
|
577
601
|
// generated_types/typeshareTypes.ts
|
|
578
602
|
var ChartInterval = /* @__PURE__ */ ((ChartInterval2) => {
|
|
579
603
|
ChartInterval2["OneMinute"] = "OneMinute";
|
|
@@ -642,6 +666,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
642
666
|
EndpointsV12["GetUserAggregatedStats"] = "/v1/get_user_aggregated_stats";
|
|
643
667
|
EndpointsV12["GetUserReferralStats"] = "/v1/get_user_referral_stats";
|
|
644
668
|
EndpointsV12["GetUserTradeStats"] = "/v1/get_user_trade_stats";
|
|
669
|
+
EndpointsV12["SetUserReferralParams"] = "/v1/set_user_referral_params";
|
|
645
670
|
return EndpointsV12;
|
|
646
671
|
})(EndpointsV1 || {});
|
|
647
672
|
var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
|
|
@@ -658,8 +683,8 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
658
683
|
})(UserStatus || {});
|
|
659
684
|
|
|
660
685
|
// generated_types/withdrawFromVault.ts
|
|
661
|
-
var
|
|
662
|
-
"address": "
|
|
686
|
+
var ABI22 = {
|
|
687
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
663
688
|
"name": "withdraw_from_vault",
|
|
664
689
|
"friends": [],
|
|
665
690
|
"exposed_functions": [
|
|
@@ -681,7 +706,7 @@ var ABI21 = {
|
|
|
681
706
|
],
|
|
682
707
|
"structs": []
|
|
683
708
|
};
|
|
684
|
-
var withdrawFromVault_default =
|
|
709
|
+
var withdrawFromVault_default = ABI22;
|
|
685
710
|
|
|
686
711
|
// src/utils.ts
|
|
687
712
|
var import_ts_sdk = require("@aptos-labs/ts-sdk");
|
|
@@ -1002,6 +1027,9 @@ var Client = class _Client {
|
|
|
1002
1027
|
);
|
|
1003
1028
|
return response;
|
|
1004
1029
|
};
|
|
1030
|
+
this.setReferralParams = async (request) => {
|
|
1031
|
+
await this.sendPostJson(request, "/v1/set_user_referral_params" /* SetUserReferralParams */);
|
|
1032
|
+
};
|
|
1005
1033
|
//////////////////////////////////////// GETTERS
|
|
1006
1034
|
this.sendGetJson = async (endpoint, message) => {
|
|
1007
1035
|
let URL = this._serverUrl + endpoint;
|
|
@@ -1448,6 +1476,20 @@ var Client = class _Client {
|
|
|
1448
1476
|
functionArguments: [params.userId, params.amount, params.tokenAddress]
|
|
1449
1477
|
});
|
|
1450
1478
|
}
|
|
1479
|
+
async removeApiKeySigner(params) {
|
|
1480
|
+
return await (0, import_ts_sdk2.generateTransactionPayload)({
|
|
1481
|
+
aptosConfig: this._aptos.config,
|
|
1482
|
+
abi: parseEntryFunctionAbi({
|
|
1483
|
+
moduleAbi: removeApiKeySigner_default,
|
|
1484
|
+
functionName: removeApiKeySigner_default.name,
|
|
1485
|
+
moduleAddress: removeApiKeySigner_default.address,
|
|
1486
|
+
moduleName: removeApiKeySigner_default.name
|
|
1487
|
+
}),
|
|
1488
|
+
function: `${removeApiKeySigner_default.address}::${removeApiKeySigner_default.name}::remove_api_key_signer`,
|
|
1489
|
+
typeArguments: [],
|
|
1490
|
+
functionArguments: [params.apiKeys, params.userId]
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1451
1493
|
// Helper function to submit sponsored transaction
|
|
1452
1494
|
async createAndSubmitTransaction(aptosPayload) {
|
|
1453
1495
|
const sequenceNumber = await this.getApiKeySequenceNumber();
|
|
@@ -1831,8 +1873,8 @@ function parseEntryFunctionAbi(args) {
|
|
|
1831
1873
|
var import_surf2 = require("@thalalabs/surf");
|
|
1832
1874
|
|
|
1833
1875
|
// generated_types/faucetEntrypoints.ts
|
|
1834
|
-
var
|
|
1835
|
-
"address": "
|
|
1876
|
+
var ABI23 = {
|
|
1877
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
1836
1878
|
"name": "faucet_entrypoints",
|
|
1837
1879
|
"friends": [],
|
|
1838
1880
|
"exposed_functions": [
|
|
@@ -1863,11 +1905,11 @@ var ABI22 = {
|
|
|
1863
1905
|
],
|
|
1864
1906
|
"structs": []
|
|
1865
1907
|
};
|
|
1866
|
-
var faucetEntrypoints_default =
|
|
1908
|
+
var faucetEntrypoints_default = ABI23;
|
|
1867
1909
|
|
|
1868
1910
|
// generated_types/testFaucet.ts
|
|
1869
|
-
var
|
|
1870
|
-
"address": "
|
|
1911
|
+
var ABI24 = {
|
|
1912
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
1871
1913
|
"name": "test_faucet",
|
|
1872
1914
|
"friends": [],
|
|
1873
1915
|
"exposed_functions": [
|
|
@@ -1904,7 +1946,7 @@ var ABI23 = {
|
|
|
1904
1946
|
],
|
|
1905
1947
|
"return": [
|
|
1906
1948
|
"0x1::object::ConstructorRef",
|
|
1907
|
-
"0x1::object::Object<
|
|
1949
|
+
"0x1::object::Object<0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7::test_faucet::Token>"
|
|
1908
1950
|
]
|
|
1909
1951
|
},
|
|
1910
1952
|
{
|
|
@@ -2055,7 +2097,7 @@ var ABI23 = {
|
|
|
2055
2097
|
"0x1::object::Object<0x1::fungible_asset::Metadata>"
|
|
2056
2098
|
],
|
|
2057
2099
|
"return": [
|
|
2058
|
-
"
|
|
2100
|
+
"0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7::test_faucet::FaucetToken"
|
|
2059
2101
|
]
|
|
2060
2102
|
}
|
|
2061
2103
|
],
|
|
@@ -2087,7 +2129,7 @@ var ABI23 = {
|
|
|
2087
2129
|
"fields": [
|
|
2088
2130
|
{
|
|
2089
2131
|
"name": "tokens",
|
|
2090
|
-
"type": "0x1::smart_table::SmartTable<vector<u8>,
|
|
2132
|
+
"type": "0x1::smart_table::SmartTable<vector<u8>, 0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7::test_faucet::FaucetToken>"
|
|
2091
2133
|
}
|
|
2092
2134
|
]
|
|
2093
2135
|
},
|
|
@@ -2112,7 +2154,7 @@ var ABI23 = {
|
|
|
2112
2154
|
}
|
|
2113
2155
|
]
|
|
2114
2156
|
};
|
|
2115
|
-
var testFaucet_default =
|
|
2157
|
+
var testFaucet_default = ABI24;
|
|
2116
2158
|
|
|
2117
2159
|
// src/testFaucet.ts
|
|
2118
2160
|
var TestFaucet = class _TestFaucet extends client_default {
|
package/dist/index.d.cts
CHANGED
|
@@ -606,6 +606,9 @@ interface SetAutoLend {
|
|
|
606
606
|
userId: string;
|
|
607
607
|
enabled: boolean;
|
|
608
608
|
}
|
|
609
|
+
interface SetReferralParamsRequest {
|
|
610
|
+
userId: string;
|
|
611
|
+
}
|
|
609
612
|
interface StatusResponse {
|
|
610
613
|
status: string;
|
|
611
614
|
}
|
|
@@ -688,7 +691,8 @@ declare enum EndpointsV1 {
|
|
|
688
691
|
GetUserAggregatedReferral = "/v1/get_user_aggregated_referral",
|
|
689
692
|
GetUserAggregatedStats = "/v1/get_user_aggregated_stats",
|
|
690
693
|
GetUserReferralStats = "/v1/get_user_referral_stats",
|
|
691
|
-
GetUserTradeStats = "/v1/get_user_trade_stats"
|
|
694
|
+
GetUserTradeStats = "/v1/get_user_trade_stats",
|
|
695
|
+
SetUserReferralParams = "/v1/set_user_referral_params"
|
|
692
696
|
}
|
|
693
697
|
declare enum SpotMarketStatus {
|
|
694
698
|
Halted = "halted",
|
|
@@ -892,6 +896,10 @@ interface RemoveApiKeyParams {
|
|
|
892
896
|
apiKey: Address;
|
|
893
897
|
userId: string;
|
|
894
898
|
}
|
|
899
|
+
interface RemoveApiKeySignerParams {
|
|
900
|
+
apiKeys: Address[];
|
|
901
|
+
userId: string;
|
|
902
|
+
}
|
|
895
903
|
interface CreateUserParams {
|
|
896
904
|
sender: Address;
|
|
897
905
|
name: string;
|
|
@@ -1114,6 +1122,7 @@ declare class Client {
|
|
|
1114
1122
|
}>;
|
|
1115
1123
|
addApiKey(params: AddApiKeyParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1116
1124
|
depositTokenPayload(params: DepositTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1125
|
+
removeApiKeySigner(params: RemoveApiKeySignerParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1117
1126
|
submitSponsoredTransaction: (tx: SimpleTransaction, signature: AccountAuthenticator) => Promise<SubmitSponsoredTransactionResponse>;
|
|
1118
1127
|
createAndSubmitTransaction(aptosPayload: any): Promise<SubmitSponsoredTransactionResponse>;
|
|
1119
1128
|
removeApiKey(params: RemoveApiKeyParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1134,6 +1143,7 @@ declare class Client {
|
|
|
1134
1143
|
ReplaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1135
1144
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1136
1145
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1146
|
+
setReferralParams: (request: SetReferralParamsRequest) => Promise<void>;
|
|
1137
1147
|
sendGetJson: (endpoint: string, message?: {
|
|
1138
1148
|
[key: string]: any;
|
|
1139
1149
|
}) => Promise<any>;
|
|
@@ -1191,4 +1201,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1191
1201
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1192
1202
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1193
1203
|
|
|
1194
|
-
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTradeStats, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, SpotMarketStatus, Status, type StatusResponse, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenConfigEntry, type Topic, type Trade, TradeRole, type TradesUpdate, type TransferToUserParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultInvestment, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
1204
|
+
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTradeStats, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralParamsRequest, SpotMarketStatus, Status, type StatusResponse, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenConfigEntry, type Topic, type Trade, TradeRole, type TradesUpdate, type TransferToUserParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultInvestment, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -606,6 +606,9 @@ interface SetAutoLend {
|
|
|
606
606
|
userId: string;
|
|
607
607
|
enabled: boolean;
|
|
608
608
|
}
|
|
609
|
+
interface SetReferralParamsRequest {
|
|
610
|
+
userId: string;
|
|
611
|
+
}
|
|
609
612
|
interface StatusResponse {
|
|
610
613
|
status: string;
|
|
611
614
|
}
|
|
@@ -688,7 +691,8 @@ declare enum EndpointsV1 {
|
|
|
688
691
|
GetUserAggregatedReferral = "/v1/get_user_aggregated_referral",
|
|
689
692
|
GetUserAggregatedStats = "/v1/get_user_aggregated_stats",
|
|
690
693
|
GetUserReferralStats = "/v1/get_user_referral_stats",
|
|
691
|
-
GetUserTradeStats = "/v1/get_user_trade_stats"
|
|
694
|
+
GetUserTradeStats = "/v1/get_user_trade_stats",
|
|
695
|
+
SetUserReferralParams = "/v1/set_user_referral_params"
|
|
692
696
|
}
|
|
693
697
|
declare enum SpotMarketStatus {
|
|
694
698
|
Halted = "halted",
|
|
@@ -892,6 +896,10 @@ interface RemoveApiKeyParams {
|
|
|
892
896
|
apiKey: Address;
|
|
893
897
|
userId: string;
|
|
894
898
|
}
|
|
899
|
+
interface RemoveApiKeySignerParams {
|
|
900
|
+
apiKeys: Address[];
|
|
901
|
+
userId: string;
|
|
902
|
+
}
|
|
895
903
|
interface CreateUserParams {
|
|
896
904
|
sender: Address;
|
|
897
905
|
name: string;
|
|
@@ -1114,6 +1122,7 @@ declare class Client {
|
|
|
1114
1122
|
}>;
|
|
1115
1123
|
addApiKey(params: AddApiKeyParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1116
1124
|
depositTokenPayload(params: DepositTokenParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1125
|
+
removeApiKeySigner(params: RemoveApiKeySignerParams): Promise<_aptos_labs_ts_sdk.TransactionPayloadEntryFunction>;
|
|
1117
1126
|
submitSponsoredTransaction: (tx: SimpleTransaction, signature: AccountAuthenticator) => Promise<SubmitSponsoredTransactionResponse>;
|
|
1118
1127
|
createAndSubmitTransaction(aptosPayload: any): Promise<SubmitSponsoredTransactionResponse>;
|
|
1119
1128
|
removeApiKey(params: RemoveApiKeyParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1134,6 +1143,7 @@ declare class Client {
|
|
|
1134
1143
|
ReplaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1135
1144
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1136
1145
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1146
|
+
setReferralParams: (request: SetReferralParamsRequest) => Promise<void>;
|
|
1137
1147
|
sendGetJson: (endpoint: string, message?: {
|
|
1138
1148
|
[key: string]: any;
|
|
1139
1149
|
}) => Promise<any>;
|
|
@@ -1191,4 +1201,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1191
1201
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1192
1202
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1193
1203
|
|
|
1194
|
-
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTradeStats, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, SpotMarketStatus, Status, type StatusResponse, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenConfigEntry, type Topic, type Trade, TradeRole, type TradesUpdate, type TransferToUserParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultInvestment, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
1204
|
+
export { type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTradeStats, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralParamsRequest, SpotMarketStatus, Status, type StatusResponse, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenConfigEntry, type Topic, type Trade, TradeRole, type TradesUpdate, type TransferToUserParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultInvestment, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
16
16
|
|
|
17
17
|
// generated_types/addApiKey.ts
|
|
18
18
|
var ABI = {
|
|
19
|
-
"address": "
|
|
19
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
20
20
|
"name": "add_api_key",
|
|
21
21
|
"friends": [],
|
|
22
22
|
"exposed_functions": [
|
|
@@ -41,7 +41,7 @@ var addApiKey_default = ABI;
|
|
|
41
41
|
|
|
42
42
|
// generated_types/cancelAllPerpOrders.ts
|
|
43
43
|
var ABI2 = {
|
|
44
|
-
"address": "
|
|
44
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
45
45
|
"name": "cancel_all_perp_orders",
|
|
46
46
|
"friends": [],
|
|
47
47
|
"exposed_functions": [
|
|
@@ -64,7 +64,7 @@ var cancelAllPerpOrders_default = ABI2;
|
|
|
64
64
|
|
|
65
65
|
// generated_types/cancelPerpOrders.ts
|
|
66
66
|
var ABI3 = {
|
|
67
|
-
"address": "
|
|
67
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
68
68
|
"name": "cancel_perp_orders",
|
|
69
69
|
"friends": [],
|
|
70
70
|
"exposed_functions": [
|
|
@@ -89,7 +89,7 @@ var cancelPerpOrders_default = ABI3;
|
|
|
89
89
|
|
|
90
90
|
// generated_types/createUser.ts
|
|
91
91
|
var ABI4 = {
|
|
92
|
-
"address": "
|
|
92
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
93
93
|
"name": "create_user",
|
|
94
94
|
"friends": [],
|
|
95
95
|
"exposed_functions": [
|
|
@@ -114,7 +114,7 @@ var createUser_default = ABI4;
|
|
|
114
114
|
|
|
115
115
|
// generated_types/depositToVault.ts
|
|
116
116
|
var ABI5 = {
|
|
117
|
-
"address": "
|
|
117
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
118
118
|
"name": "deposit_to_vault",
|
|
119
119
|
"friends": [],
|
|
120
120
|
"exposed_functions": [
|
|
@@ -139,7 +139,7 @@ var depositToVault_default = ABI5;
|
|
|
139
139
|
|
|
140
140
|
// generated_types/depositToken.ts
|
|
141
141
|
var ABI6 = {
|
|
142
|
-
"address": "
|
|
142
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
143
143
|
"name": "deposit_token",
|
|
144
144
|
"friends": [],
|
|
145
145
|
"exposed_functions": [
|
|
@@ -164,7 +164,7 @@ var depositToken_default = ABI6;
|
|
|
164
164
|
|
|
165
165
|
// generated_types/lendToken.ts
|
|
166
166
|
var ABI7 = {
|
|
167
|
-
"address": "
|
|
167
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
168
168
|
"name": "lend_token",
|
|
169
169
|
"friends": [],
|
|
170
170
|
"exposed_functions": [
|
|
@@ -190,7 +190,7 @@ var lendToken_default = ABI7;
|
|
|
190
190
|
|
|
191
191
|
// generated_types/placePerpLimitOrder.ts
|
|
192
192
|
var ABI8 = {
|
|
193
|
-
"address": "
|
|
193
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
194
194
|
"name": "place_perp_limit_order",
|
|
195
195
|
"friends": [],
|
|
196
196
|
"exposed_functions": [
|
|
@@ -219,7 +219,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
219
219
|
|
|
220
220
|
// generated_types/changePerpOrderPrice.ts
|
|
221
221
|
var ABI9 = {
|
|
222
|
-
"address": "
|
|
222
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
223
223
|
"name": "change_perp_order_price",
|
|
224
224
|
"friends": [],
|
|
225
225
|
"exposed_functions": [
|
|
@@ -246,7 +246,7 @@ var changePerpOrderPrice_default = ABI9;
|
|
|
246
246
|
|
|
247
247
|
// generated_types/placePerpMarketOrder.ts
|
|
248
248
|
var ABI10 = {
|
|
249
|
-
"address": "
|
|
249
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
250
250
|
"name": "place_perp_market_order",
|
|
251
251
|
"friends": [],
|
|
252
252
|
"exposed_functions": [
|
|
@@ -274,7 +274,7 @@ var placePerpMarketOrder_default = ABI10;
|
|
|
274
274
|
|
|
275
275
|
// generated_types/redeemToken.ts
|
|
276
276
|
var ABI11 = {
|
|
277
|
-
"address": "
|
|
277
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
278
278
|
"name": "redeem_token",
|
|
279
279
|
"friends": [],
|
|
280
280
|
"exposed_functions": [
|
|
@@ -300,7 +300,7 @@ var redeemToken_default = ABI11;
|
|
|
300
300
|
|
|
301
301
|
// generated_types/removeApiKey.ts
|
|
302
302
|
var ABI12 = {
|
|
303
|
-
"address": "
|
|
303
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
304
304
|
"name": "remove_api_key",
|
|
305
305
|
"friends": [],
|
|
306
306
|
"exposed_functions": [
|
|
@@ -324,7 +324,7 @@ var removeApiKey_default = ABI12;
|
|
|
324
324
|
|
|
325
325
|
// generated_types/setAliasName.ts
|
|
326
326
|
var ABI13 = {
|
|
327
|
-
"address": "
|
|
327
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
328
328
|
"name": "set_alias_name",
|
|
329
329
|
"friends": [],
|
|
330
330
|
"exposed_functions": [
|
|
@@ -348,7 +348,7 @@ var setAliasName_default = ABI13;
|
|
|
348
348
|
|
|
349
349
|
// generated_types/setAutolend.ts
|
|
350
350
|
var ABI14 = {
|
|
351
|
-
"address": "
|
|
351
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
352
352
|
"name": "set_autolend",
|
|
353
353
|
"friends": [],
|
|
354
354
|
"exposed_functions": [
|
|
@@ -372,7 +372,7 @@ var setAutolend_default = ABI14;
|
|
|
372
372
|
|
|
373
373
|
// generated_types/claimReferralFees.ts
|
|
374
374
|
var ABI15 = {
|
|
375
|
-
"address": "
|
|
375
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
376
376
|
"name": "claim_referral_fees",
|
|
377
377
|
"friends": [],
|
|
378
378
|
"exposed_functions": [
|
|
@@ -396,7 +396,7 @@ var claimReferralFees_default = ABI15;
|
|
|
396
396
|
|
|
397
397
|
// generated_types/transferToUser.ts
|
|
398
398
|
var ABI16 = {
|
|
399
|
-
"address": "
|
|
399
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
400
400
|
"name": "transfer_to_user",
|
|
401
401
|
"friends": [],
|
|
402
402
|
"exposed_functions": [
|
|
@@ -423,7 +423,7 @@ var transferToUser_default = ABI16;
|
|
|
423
423
|
|
|
424
424
|
// generated_types/placeMultiplePerpOrders.ts
|
|
425
425
|
var ABI17 = {
|
|
426
|
-
"address": "
|
|
426
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
427
427
|
"name": "place_multiple_perp_orders",
|
|
428
428
|
"friends": [],
|
|
429
429
|
"exposed_functions": [
|
|
@@ -452,7 +452,7 @@ var placeMultiplePerpOrders_default = ABI17;
|
|
|
452
452
|
|
|
453
453
|
// generated_types/claimKickbackFee.ts
|
|
454
454
|
var ABI18 = {
|
|
455
|
-
"address": "
|
|
455
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
456
456
|
"name": "claim_kickback_fee",
|
|
457
457
|
"friends": [],
|
|
458
458
|
"exposed_functions": [
|
|
@@ -475,7 +475,7 @@ var claimKickbackFee_default = ABI18;
|
|
|
475
475
|
|
|
476
476
|
// generated_types/replaceMultipleOrders.ts
|
|
477
477
|
var ABI19 = {
|
|
478
|
-
"address": "
|
|
478
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
479
479
|
"name": "replace_multiple_orders",
|
|
480
480
|
"friends": [],
|
|
481
481
|
"exposed_functions": [
|
|
@@ -503,7 +503,7 @@ var replaceMultipleOrders_default = ABI19;
|
|
|
503
503
|
|
|
504
504
|
// generated_types/claimDeposit.ts
|
|
505
505
|
var ABI20 = {
|
|
506
|
-
"address": "
|
|
506
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
507
507
|
"name": "claim_deposit",
|
|
508
508
|
"friends": [],
|
|
509
509
|
"exposed_functions": [
|
|
@@ -525,6 +525,30 @@ var ABI20 = {
|
|
|
525
525
|
};
|
|
526
526
|
var claimDeposit_default = ABI20;
|
|
527
527
|
|
|
528
|
+
// generated_types/removeApiKeySigner.ts
|
|
529
|
+
var ABI21 = {
|
|
530
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
531
|
+
"name": "remove_api_key_signer",
|
|
532
|
+
"friends": [],
|
|
533
|
+
"exposed_functions": [
|
|
534
|
+
{
|
|
535
|
+
"name": "remove_api_key_signer",
|
|
536
|
+
"visibility": "public",
|
|
537
|
+
"is_entry": true,
|
|
538
|
+
"is_view": false,
|
|
539
|
+
"generic_type_params": [],
|
|
540
|
+
"params": [
|
|
541
|
+
"&signer",
|
|
542
|
+
"vector<address>",
|
|
543
|
+
"u64"
|
|
544
|
+
],
|
|
545
|
+
"return": []
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"structs": []
|
|
549
|
+
};
|
|
550
|
+
var removeApiKeySigner_default = ABI21;
|
|
551
|
+
|
|
528
552
|
// generated_types/typeshareTypes.ts
|
|
529
553
|
var ChartInterval = /* @__PURE__ */ ((ChartInterval2) => {
|
|
530
554
|
ChartInterval2["OneMinute"] = "OneMinute";
|
|
@@ -593,6 +617,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
593
617
|
EndpointsV12["GetUserAggregatedStats"] = "/v1/get_user_aggregated_stats";
|
|
594
618
|
EndpointsV12["GetUserReferralStats"] = "/v1/get_user_referral_stats";
|
|
595
619
|
EndpointsV12["GetUserTradeStats"] = "/v1/get_user_trade_stats";
|
|
620
|
+
EndpointsV12["SetUserReferralParams"] = "/v1/set_user_referral_params";
|
|
596
621
|
return EndpointsV12;
|
|
597
622
|
})(EndpointsV1 || {});
|
|
598
623
|
var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
|
|
@@ -609,8 +634,8 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
609
634
|
})(UserStatus || {});
|
|
610
635
|
|
|
611
636
|
// generated_types/withdrawFromVault.ts
|
|
612
|
-
var
|
|
613
|
-
"address": "
|
|
637
|
+
var ABI22 = {
|
|
638
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
614
639
|
"name": "withdraw_from_vault",
|
|
615
640
|
"friends": [],
|
|
616
641
|
"exposed_functions": [
|
|
@@ -632,7 +657,7 @@ var ABI21 = {
|
|
|
632
657
|
],
|
|
633
658
|
"structs": []
|
|
634
659
|
};
|
|
635
|
-
var withdrawFromVault_default =
|
|
660
|
+
var withdrawFromVault_default = ABI22;
|
|
636
661
|
|
|
637
662
|
// src/utils.ts
|
|
638
663
|
import { Account } from "@aptos-labs/ts-sdk";
|
|
@@ -953,6 +978,9 @@ var Client = class _Client {
|
|
|
953
978
|
);
|
|
954
979
|
return response;
|
|
955
980
|
};
|
|
981
|
+
this.setReferralParams = async (request) => {
|
|
982
|
+
await this.sendPostJson(request, "/v1/set_user_referral_params" /* SetUserReferralParams */);
|
|
983
|
+
};
|
|
956
984
|
//////////////////////////////////////// GETTERS
|
|
957
985
|
this.sendGetJson = async (endpoint, message) => {
|
|
958
986
|
let URL = this._serverUrl + endpoint;
|
|
@@ -1399,6 +1427,20 @@ var Client = class _Client {
|
|
|
1399
1427
|
functionArguments: [params.userId, params.amount, params.tokenAddress]
|
|
1400
1428
|
});
|
|
1401
1429
|
}
|
|
1430
|
+
async removeApiKeySigner(params) {
|
|
1431
|
+
return await generateTransactionPayload({
|
|
1432
|
+
aptosConfig: this._aptos.config,
|
|
1433
|
+
abi: parseEntryFunctionAbi({
|
|
1434
|
+
moduleAbi: removeApiKeySigner_default,
|
|
1435
|
+
functionName: removeApiKeySigner_default.name,
|
|
1436
|
+
moduleAddress: removeApiKeySigner_default.address,
|
|
1437
|
+
moduleName: removeApiKeySigner_default.name
|
|
1438
|
+
}),
|
|
1439
|
+
function: `${removeApiKeySigner_default.address}::${removeApiKeySigner_default.name}::remove_api_key_signer`,
|
|
1440
|
+
typeArguments: [],
|
|
1441
|
+
functionArguments: [params.apiKeys, params.userId]
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1402
1444
|
// Helper function to submit sponsored transaction
|
|
1403
1445
|
async createAndSubmitTransaction(aptosPayload) {
|
|
1404
1446
|
const sequenceNumber = await this.getApiKeySequenceNumber();
|
|
@@ -1782,8 +1824,8 @@ function parseEntryFunctionAbi(args) {
|
|
|
1782
1824
|
import { createEntryPayload } from "@thalalabs/surf";
|
|
1783
1825
|
|
|
1784
1826
|
// generated_types/faucetEntrypoints.ts
|
|
1785
|
-
var
|
|
1786
|
-
"address": "
|
|
1827
|
+
var ABI23 = {
|
|
1828
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
1787
1829
|
"name": "faucet_entrypoints",
|
|
1788
1830
|
"friends": [],
|
|
1789
1831
|
"exposed_functions": [
|
|
@@ -1814,11 +1856,11 @@ var ABI22 = {
|
|
|
1814
1856
|
],
|
|
1815
1857
|
"structs": []
|
|
1816
1858
|
};
|
|
1817
|
-
var faucetEntrypoints_default =
|
|
1859
|
+
var faucetEntrypoints_default = ABI23;
|
|
1818
1860
|
|
|
1819
1861
|
// generated_types/testFaucet.ts
|
|
1820
|
-
var
|
|
1821
|
-
"address": "
|
|
1862
|
+
var ABI24 = {
|
|
1863
|
+
"address": "0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7",
|
|
1822
1864
|
"name": "test_faucet",
|
|
1823
1865
|
"friends": [],
|
|
1824
1866
|
"exposed_functions": [
|
|
@@ -1855,7 +1897,7 @@ var ABI23 = {
|
|
|
1855
1897
|
],
|
|
1856
1898
|
"return": [
|
|
1857
1899
|
"0x1::object::ConstructorRef",
|
|
1858
|
-
"0x1::object::Object<
|
|
1900
|
+
"0x1::object::Object<0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7::test_faucet::Token>"
|
|
1859
1901
|
]
|
|
1860
1902
|
},
|
|
1861
1903
|
{
|
|
@@ -2006,7 +2048,7 @@ var ABI23 = {
|
|
|
2006
2048
|
"0x1::object::Object<0x1::fungible_asset::Metadata>"
|
|
2007
2049
|
],
|
|
2008
2050
|
"return": [
|
|
2009
|
-
"
|
|
2051
|
+
"0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7::test_faucet::FaucetToken"
|
|
2010
2052
|
]
|
|
2011
2053
|
}
|
|
2012
2054
|
],
|
|
@@ -2038,7 +2080,7 @@ var ABI23 = {
|
|
|
2038
2080
|
"fields": [
|
|
2039
2081
|
{
|
|
2040
2082
|
"name": "tokens",
|
|
2041
|
-
"type": "0x1::smart_table::SmartTable<vector<u8>,
|
|
2083
|
+
"type": "0x1::smart_table::SmartTable<vector<u8>, 0x6ea45d13b59d7e74e1a867fe0171c93f19508dd39495db2a7e655e29c7a6c9a7::test_faucet::FaucetToken>"
|
|
2042
2084
|
}
|
|
2043
2085
|
]
|
|
2044
2086
|
},
|
|
@@ -2063,7 +2105,7 @@ var ABI23 = {
|
|
|
2063
2105
|
}
|
|
2064
2106
|
]
|
|
2065
2107
|
};
|
|
2066
|
-
var testFaucet_default =
|
|
2108
|
+
var testFaucet_default = ABI24;
|
|
2067
2109
|
|
|
2068
2110
|
// src/testFaucet.ts
|
|
2069
2111
|
var TestFaucet = class _TestFaucet extends client_default {
|