@bluefin-exchange/pro-sdk 0.2.13 → 0.2.16
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/cjs/src/api.js +156 -3
- package/dist/cjs/src/api.js.map +1 -1
- package/dist/esm/src/api.js +156 -3
- package/dist/esm/src/api.js.map +1 -1
- package/dist/types/src/api.d.ts +222 -2
- package/dist/types/src/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cjs/src/api.js
CHANGED
|
@@ -25,8 +25,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
29
|
-
exports.TradeApi = exports.TradeApiFactory = exports.TradeApiFp = exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRewardsEpochMetadataEpochEnum = exports.GetRewardsCampaignMetadataStatusEnum = exports.GetAffiliateOverviewSortOrderEnum = exports.GetAffiliateOverviewSortByEnum = exports.GetAffiliateLeaderDashboardSortOrderEnum = exports.GetAffiliateLeaderDashboardSortByEnum = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ExchangeApi = exports.ExchangeApiFactory = void 0;
|
|
28
|
+
exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.AccountDataApi = exports.AccountDataApiFactory = exports.AccountDataApiFp = exports.AccountDataApiAxiosParamCreator = exports.UserCampaignRewardsClaimStatusEnum = exports.UserCampaignRewardsStatusEnum = exports.TransactionType = exports.TradeType = exports.TradeSide = exports.SubscriptionType = exports.StatsInterval = exports.SelfTradePreventionType = exports.PositionSide = exports.OrderbookPartialDepthUpdateDepthLevelEnum = exports.OrderType = exports.OrderTimeInForce = exports.OrderStatus = exports.OrderSide = exports.OrderCancellationFailureReason = exports.OrderCancelReason = exports.OraclePriceUpdateSourceEnum = exports.MarketStatus = exports.MarketPriceUpdateSourceEnum = exports.MarketEventType = exports.MarketDataStreamName = exports.MarkPriceUpdateSourceEnum = exports.MarkAsClaimedResponseStatusEnum = exports.MarkAsClaimedRequestCampaignNameEnum = exports.MarginType = exports.KlineInterval = exports.IntervalRewardsStatusEnum = exports.IntervalMetadataStatusEnum = exports.FailedCommandType = exports.EpochMetadataStatusEnum = exports.ContractsConfigNetworkEnum = exports.CommandFailureReasonCode = exports.ClaimSignatureItemRewardTypeEnum = exports.CandlePriceType = exports.CampaignMetadataStatusEnum = exports.AffiliateOnboardResponseStatusEnum = exports.AffiliateMetadataTierEnum = exports.AffiliateMetadataStatusEnum = exports.AffiliateIntervalOverviewStatusEnum = exports.AdjustMarginOperation = exports.AccountEventType = exports.AccountEventReason = exports.AccountDataStream = exports.AccountInvestorCategoryEnum = void 0;
|
|
29
|
+
exports.TradeApi = exports.TradeApiFactory = exports.TradeApiFp = exports.TradeApiAxiosParamCreator = exports.WebSocketMarketDataSecWebSocketVersionEnum = exports.WebSocketMarketDataUpgradeEnum = exports.WebSocketAccountDataSecWebSocketVersionEnum = exports.WebSocketAccountDataUpgradeEnum = exports.StreamsApi = exports.StreamsApiFactory = exports.StreamsApiFp = exports.StreamsApiAxiosParamCreator = exports.GetRewardsEpochMetadataEpochEnum = exports.GetRewardsCampaignMetadataStatusEnum = exports.GetAffiliateOverviewSortOrderEnum = exports.GetAffiliateOverviewSortByEnum = exports.GetAffiliateLeaderDashboardSortOrderEnum = exports.GetAffiliateLeaderDashboardSortByEnum = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ExchangeApi = exports.ExchangeApiFactory = exports.ExchangeApiFp = exports.ExchangeApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = void 0;
|
|
30
30
|
const axios_1 = __importDefault(require("axios"));
|
|
31
31
|
// Some imports not used depending on template conditions
|
|
32
32
|
// @ts-ignore
|
|
@@ -129,6 +129,12 @@ exports.CandlePriceType = {
|
|
|
129
129
|
Oracle: 'Oracle',
|
|
130
130
|
Unspecified: 'UNSPECIFIED'
|
|
131
131
|
};
|
|
132
|
+
exports.ClaimSignatureItemRewardTypeEnum = {
|
|
133
|
+
Blue: 'Blue',
|
|
134
|
+
Sui: 'Sui',
|
|
135
|
+
Wal: 'Wal',
|
|
136
|
+
Cash: 'Cash'
|
|
137
|
+
};
|
|
132
138
|
/**
|
|
133
139
|
*
|
|
134
140
|
* @export
|
|
@@ -211,6 +217,15 @@ exports.MarginType = {
|
|
|
211
217
|
Isolated: 'ISOLATED',
|
|
212
218
|
Unspecified: 'UNSPECIFIED'
|
|
213
219
|
};
|
|
220
|
+
exports.MarkAsClaimedRequestCampaignNameEnum = {
|
|
221
|
+
TradeAndEarn: 'TRADE_AND_EARN',
|
|
222
|
+
WalTradeAndEarn: 'WAL_TRADE_AND_EARN',
|
|
223
|
+
Affiliate: 'AFFILIATE'
|
|
224
|
+
};
|
|
225
|
+
exports.MarkAsClaimedResponseStatusEnum = {
|
|
226
|
+
Claimed: 'CLAIMED',
|
|
227
|
+
Claimable: 'CLAIMABLE'
|
|
228
|
+
};
|
|
214
229
|
exports.MarkPriceUpdateSourceEnum = {
|
|
215
230
|
Mark: 'Mark'
|
|
216
231
|
};
|
|
@@ -357,7 +372,11 @@ exports.OrderCancelReason = {
|
|
|
357
372
|
OrderNotReducingPosition: 'ORDER_NOT_REDUCING_POSITION',
|
|
358
373
|
UserCancelledAllStandbyOnMarket: 'USER_CANCELLED_ALL_STANDBY_ON_MARKET',
|
|
359
374
|
PositionExceedsMaxOpenInterest: 'POSITION_EXCEEDS_MAX_OPEN_INTEREST',
|
|
360
|
-
AccountDeauthorized: 'ACCOUNT_DEAUTHORIZED'
|
|
375
|
+
AccountDeauthorized: 'ACCOUNT_DEAUTHORIZED',
|
|
376
|
+
TooManyMatches: 'TOO_MANY_MATCHES',
|
|
377
|
+
MarginCall: 'MARGIN_CALL',
|
|
378
|
+
InsufficientBalance: 'INSUFFICIENT_BALANCE',
|
|
379
|
+
TradeQuantityOutOfBound: 'TRADE_QUANTITY_OUT_OF_BOUND'
|
|
361
380
|
};
|
|
362
381
|
/**
|
|
363
382
|
* The reason for failure to cancel an order.
|
|
@@ -516,6 +535,11 @@ exports.UserCampaignRewardsStatusEnum = {
|
|
|
516
535
|
Finalized: 'FINALIZED',
|
|
517
536
|
Cooldown: 'COOLDOWN'
|
|
518
537
|
};
|
|
538
|
+
exports.UserCampaignRewardsClaimStatusEnum = {
|
|
539
|
+
Claimable: 'CLAIMABLE',
|
|
540
|
+
Claimed: 'CLAIMED',
|
|
541
|
+
NotYetClaimable: 'NOT_YET_CLAIMABLE'
|
|
542
|
+
};
|
|
519
543
|
/**
|
|
520
544
|
* AccountDataApi - axios parameter creator
|
|
521
545
|
* @export
|
|
@@ -2741,6 +2765,31 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2741
2765
|
options: localVarRequestOptions,
|
|
2742
2766
|
};
|
|
2743
2767
|
}),
|
|
2768
|
+
/**
|
|
2769
|
+
* Returns the contract configuration metadata
|
|
2770
|
+
* @summary Get contract configurations
|
|
2771
|
+
* @param {*} [options] Override http request option.
|
|
2772
|
+
* @throws {RequiredError}
|
|
2773
|
+
*/
|
|
2774
|
+
getContractConfig: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2775
|
+
const localVarPath = `/v1/rewards/contract/config`;
|
|
2776
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2777
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2778
|
+
let baseOptions;
|
|
2779
|
+
if (configuration) {
|
|
2780
|
+
baseOptions = configuration.baseOptions;
|
|
2781
|
+
}
|
|
2782
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2783
|
+
const localVarHeaderParameter = {};
|
|
2784
|
+
const localVarQueryParameter = {};
|
|
2785
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2786
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2787
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2788
|
+
return {
|
|
2789
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2790
|
+
options: localVarRequestOptions,
|
|
2791
|
+
};
|
|
2792
|
+
}),
|
|
2744
2793
|
/**
|
|
2745
2794
|
* Returns the rewards earned by users for the intervals.
|
|
2746
2795
|
* @summary /rewards
|
|
@@ -2925,6 +2974,39 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2925
2974
|
options: localVarRequestOptions,
|
|
2926
2975
|
};
|
|
2927
2976
|
}),
|
|
2977
|
+
/**
|
|
2978
|
+
* Mark user claims as claimed for the specified campaign name and interval number
|
|
2979
|
+
* @summary /v1/rewards/claims/mark-claimed
|
|
2980
|
+
* @param {MarkAsClaimedRequest} markAsClaimedRequest
|
|
2981
|
+
* @param {*} [options] Override http request option.
|
|
2982
|
+
* @throws {RequiredError}
|
|
2983
|
+
*/
|
|
2984
|
+
markAsClaimed: (markAsClaimedRequest_1, ...args_1) => __awaiter(this, [markAsClaimedRequest_1, ...args_1], void 0, function* (markAsClaimedRequest, options = {}) {
|
|
2985
|
+
// verify required parameter 'markAsClaimedRequest' is not null or undefined
|
|
2986
|
+
(0, common_1.assertParamExists)('markAsClaimed', 'markAsClaimedRequest', markAsClaimedRequest);
|
|
2987
|
+
const localVarPath = `/v1/rewards/claims/mark-claimed`;
|
|
2988
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2989
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2990
|
+
let baseOptions;
|
|
2991
|
+
if (configuration) {
|
|
2992
|
+
baseOptions = configuration.baseOptions;
|
|
2993
|
+
}
|
|
2994
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2995
|
+
const localVarHeaderParameter = {};
|
|
2996
|
+
const localVarQueryParameter = {};
|
|
2997
|
+
// authentication bearerAuth required
|
|
2998
|
+
// http bearer authentication required
|
|
2999
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
3000
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3001
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3002
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3003
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3004
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(markAsClaimedRequest, localVarRequestOptions, configuration);
|
|
3005
|
+
return {
|
|
3006
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3007
|
+
options: localVarRequestOptions,
|
|
3008
|
+
};
|
|
3009
|
+
}),
|
|
2928
3010
|
/**
|
|
2929
3011
|
* Submit an application to become an affiliate.
|
|
2930
3012
|
* @summary /rewards/affiliate/onboard
|
|
@@ -3177,6 +3259,21 @@ const RewardsApiFp = function (configuration) {
|
|
|
3177
3259
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3178
3260
|
});
|
|
3179
3261
|
},
|
|
3262
|
+
/**
|
|
3263
|
+
* Returns the contract configuration metadata
|
|
3264
|
+
* @summary Get contract configurations
|
|
3265
|
+
* @param {*} [options] Override http request option.
|
|
3266
|
+
* @throws {RequiredError}
|
|
3267
|
+
*/
|
|
3268
|
+
getContractConfig(options) {
|
|
3269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3270
|
+
var _a, _b, _c;
|
|
3271
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getContractConfig(options);
|
|
3272
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3273
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getContractConfig']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3274
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3275
|
+
});
|
|
3276
|
+
},
|
|
3180
3277
|
/**
|
|
3181
3278
|
* Returns the rewards earned by users for the intervals.
|
|
3182
3279
|
* @summary /rewards
|
|
@@ -3274,6 +3371,22 @@ const RewardsApiFp = function (configuration) {
|
|
|
3274
3371
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3275
3372
|
});
|
|
3276
3373
|
},
|
|
3374
|
+
/**
|
|
3375
|
+
* Mark user claims as claimed for the specified campaign name and interval number
|
|
3376
|
+
* @summary /v1/rewards/claims/mark-claimed
|
|
3377
|
+
* @param {MarkAsClaimedRequest} markAsClaimedRequest
|
|
3378
|
+
* @param {*} [options] Override http request option.
|
|
3379
|
+
* @throws {RequiredError}
|
|
3380
|
+
*/
|
|
3381
|
+
markAsClaimed(markAsClaimedRequest, options) {
|
|
3382
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3383
|
+
var _a, _b, _c;
|
|
3384
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.markAsClaimed(markAsClaimedRequest, options);
|
|
3385
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3386
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.markAsClaimed']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3387
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3388
|
+
});
|
|
3389
|
+
},
|
|
3277
3390
|
/**
|
|
3278
3391
|
* Submit an application to become an affiliate.
|
|
3279
3392
|
* @summary /rewards/affiliate/onboard
|
|
@@ -3422,6 +3535,15 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
3422
3535
|
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
3423
3536
|
return localVarFp.getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(axios, basePath));
|
|
3424
3537
|
},
|
|
3538
|
+
/**
|
|
3539
|
+
* Returns the contract configuration metadata
|
|
3540
|
+
* @summary Get contract configurations
|
|
3541
|
+
* @param {*} [options] Override http request option.
|
|
3542
|
+
* @throws {RequiredError}
|
|
3543
|
+
*/
|
|
3544
|
+
getContractConfig(options) {
|
|
3545
|
+
return localVarFp.getContractConfig(options).then((request) => request(axios, basePath));
|
|
3546
|
+
},
|
|
3425
3547
|
/**
|
|
3426
3548
|
* Returns the rewards earned by users for the intervals.
|
|
3427
3549
|
* @summary /rewards
|
|
@@ -3483,6 +3605,16 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
3483
3605
|
getRewardsSummary(options) {
|
|
3484
3606
|
return localVarFp.getRewardsSummary(options).then((request) => request(axios, basePath));
|
|
3485
3607
|
},
|
|
3608
|
+
/**
|
|
3609
|
+
* Mark user claims as claimed for the specified campaign name and interval number
|
|
3610
|
+
* @summary /v1/rewards/claims/mark-claimed
|
|
3611
|
+
* @param {MarkAsClaimedRequest} markAsClaimedRequest
|
|
3612
|
+
* @param {*} [options] Override http request option.
|
|
3613
|
+
* @throws {RequiredError}
|
|
3614
|
+
*/
|
|
3615
|
+
markAsClaimed(markAsClaimedRequest, options) {
|
|
3616
|
+
return localVarFp.markAsClaimed(markAsClaimedRequest, options).then((request) => request(axios, basePath));
|
|
3617
|
+
},
|
|
3486
3618
|
/**
|
|
3487
3619
|
* Submit an application to become an affiliate.
|
|
3488
3620
|
* @summary /rewards/affiliate/onboard
|
|
@@ -3613,6 +3745,16 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3613
3745
|
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
3614
3746
|
return (0, exports.RewardsApiFp)(this.configuration).getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
3615
3747
|
}
|
|
3748
|
+
/**
|
|
3749
|
+
* Returns the contract configuration metadata
|
|
3750
|
+
* @summary Get contract configurations
|
|
3751
|
+
* @param {*} [options] Override http request option.
|
|
3752
|
+
* @throws {RequiredError}
|
|
3753
|
+
* @memberof RewardsApi
|
|
3754
|
+
*/
|
|
3755
|
+
getContractConfig(options) {
|
|
3756
|
+
return (0, exports.RewardsApiFp)(this.configuration).getContractConfig(options).then((request) => request(this.axios, this.basePath));
|
|
3757
|
+
}
|
|
3616
3758
|
/**
|
|
3617
3759
|
* Returns the rewards earned by users for the intervals.
|
|
3618
3760
|
* @summary /rewards
|
|
@@ -3680,6 +3822,17 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
3680
3822
|
getRewardsSummary(options) {
|
|
3681
3823
|
return (0, exports.RewardsApiFp)(this.configuration).getRewardsSummary(options).then((request) => request(this.axios, this.basePath));
|
|
3682
3824
|
}
|
|
3825
|
+
/**
|
|
3826
|
+
* Mark user claims as claimed for the specified campaign name and interval number
|
|
3827
|
+
* @summary /v1/rewards/claims/mark-claimed
|
|
3828
|
+
* @param {MarkAsClaimedRequest} markAsClaimedRequest
|
|
3829
|
+
* @param {*} [options] Override http request option.
|
|
3830
|
+
* @throws {RequiredError}
|
|
3831
|
+
* @memberof RewardsApi
|
|
3832
|
+
*/
|
|
3833
|
+
markAsClaimed(markAsClaimedRequest, options) {
|
|
3834
|
+
return (0, exports.RewardsApiFp)(this.configuration).markAsClaimed(markAsClaimedRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3835
|
+
}
|
|
3683
3836
|
/**
|
|
3684
3837
|
* Submit an application to become an affiliate.
|
|
3685
3838
|
* @summary /rewards/affiliate/onboard
|