@coinbase-sample/prime-sdk-ts 0.6.4 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.js +1 -1
- package/dist/financing/index.js +9 -0
- package/dist/futures/index.js +18 -0
- package/dist/model/Candle.js +21 -0
- package/dist/model/CrossMarginOverview.js +21 -0
- package/dist/model/EditOrderRequest.js +21 -0
- package/dist/model/EditOrderResponse.js +21 -0
- package/dist/model/GetCandlesResponse.js +21 -0
- package/dist/model/GetCrossMarginOverviewResponse.js +21 -0
- package/dist/model/ListTransactionValidatorsRequest.js +21 -0
- package/dist/model/ListTransactionValidatorsResponse.js +21 -0
- package/dist/model/StakingClaimRewardsRequest.js +21 -0
- package/dist/model/StakingClaimRewardsResponse.js +21 -0
- package/dist/model/TransactionValidator.js +21 -0
- package/dist/model/WalletClaimRewardsInputs.js +21 -0
- package/dist/model/XMLoan.js +21 -0
- package/dist/model/XMMarginCall.js +21 -0
- package/dist/model/XMPosition.js +21 -0
- package/dist/model/XMRiskNettingInfo.js +21 -0
- package/dist/model/XMSummary.js +21 -0
- package/dist/model/enums/ActivityCategory.js +0 -1
- package/dist/model/enums/ActivityLevel.js +3 -3
- package/dist/model/enums/AddressBookType.js +3 -3
- package/dist/model/enums/AllocationStatus.js +5 -5
- package/dist/model/enums/CandlesGranularity.js +34 -0
- package/dist/model/enums/CustodyActivityType.js +29 -29
- package/dist/model/enums/DestinationType.js +4 -4
- package/dist/model/enums/FcmFuturesSweepStatus.js +5 -5
- package/dist/model/enums/FcmMarginCallState.js +5 -5
- package/dist/model/enums/FcmMarginCallType.js +3 -3
- package/dist/model/enums/HierarchyType.js +3 -3
- package/dist/model/enums/InvoiceState.js +5 -5
- package/dist/model/enums/InvoiceType.js +6 -6
- package/dist/model/enums/LoanType.js +1 -0
- package/dist/model/enums/NetworkFamily.js +3 -3
- package/dist/model/enums/NetworkType.js +3 -3
- package/dist/model/enums/PaymentMethodType.js +3 -3
- package/dist/model/enums/ProductPermissions.js +3 -3
- package/dist/model/enums/ValidatorStatus.js +31 -0
- package/dist/model/enums/WalletVisibility.js +3 -3
- package/dist/model/enums/XMCallStatus.js +33 -0
- package/dist/model/enums/XMCallType.js +31 -0
- package/dist/model/enums/XMControlStatus.js +32 -0
- package/dist/model/enums/XMEntityCallStatus.js +33 -0
- package/dist/model/enums/XMMarginLevel.js +34 -0
- package/dist/model/enums/XMParty.js +31 -0
- package/dist/model/enums/index.js +18 -1
- package/dist/orders/index.js +12 -0
- package/dist/products/index.js +16 -0
- package/dist/staking/index.js +37 -0
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/financing/index.d.ts +3 -1
- package/dist/types/financing/types.d.ts +5 -1
- package/dist/types/futures/index.d.ts +6 -1
- package/dist/types/futures/types.d.ts +9 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/model/Candle.d.ts +42 -0
- package/dist/types/model/CrossMarginOverview.d.ts +39 -0
- package/dist/types/model/EditOrderRequest.d.ts +61 -0
- package/dist/types/model/EditOrderResponse.d.ts +25 -0
- package/dist/types/model/GetCandlesResponse.d.ts +23 -0
- package/dist/types/model/GetCrossMarginOverviewResponse.d.ts +23 -0
- package/dist/types/model/ListTransactionValidatorsRequest.d.ts +35 -0
- package/dist/types/model/ListTransactionValidatorsResponse.d.ts +28 -0
- package/dist/types/model/RFQProductDetails.d.ts +21 -0
- package/dist/types/model/StakingClaimRewardsRequest.d.ts +27 -0
- package/dist/types/model/StakingClaimRewardsResponse.d.ts +33 -0
- package/dist/types/model/TransactionValidator.d.ts +31 -0
- package/dist/types/model/WalletClaimRewardsInputs.d.ts +28 -0
- package/dist/types/model/XMLoan.d.ts +51 -0
- package/dist/types/model/XMMarginCall.d.ts +57 -0
- package/dist/types/model/XMPosition.d.ts +121 -0
- package/dist/types/model/XMRiskNettingInfo.d.ts +76 -0
- package/dist/types/model/XMSummary.d.ts +55 -0
- package/dist/types/model/enums/ActivityCategory.d.ts +0 -1
- package/dist/types/model/enums/ActivityLevel.d.ts +3 -3
- package/dist/types/model/enums/AddressBookType.d.ts +3 -3
- package/dist/types/model/enums/AllocationStatus.d.ts +5 -5
- package/dist/types/model/enums/CandlesGranularity.d.ts +30 -0
- package/dist/types/model/enums/CustodyActivityType.d.ts +29 -29
- package/dist/types/model/enums/DestinationType.d.ts +4 -4
- package/dist/types/model/enums/FcmFuturesSweepStatus.d.ts +5 -5
- package/dist/types/model/enums/FcmMarginCallState.d.ts +5 -5
- package/dist/types/model/enums/FcmMarginCallType.d.ts +3 -3
- package/dist/types/model/enums/HierarchyType.d.ts +3 -3
- package/dist/types/model/enums/InvoiceState.d.ts +5 -5
- package/dist/types/model/enums/InvoiceType.d.ts +6 -6
- package/dist/types/model/enums/LoanType.d.ts +2 -1
- package/dist/types/model/enums/NetworkFamily.d.ts +3 -3
- package/dist/types/model/enums/NetworkType.d.ts +3 -3
- package/dist/types/model/enums/PaymentMethodType.d.ts +3 -3
- package/dist/types/model/enums/ProductPermissions.d.ts +3 -3
- package/dist/types/model/enums/ValidatorStatus.d.ts +27 -0
- package/dist/types/model/enums/WalletVisibility.d.ts +3 -3
- package/dist/types/model/enums/XMCallStatus.d.ts +29 -0
- package/dist/types/model/enums/XMCallType.d.ts +27 -0
- package/dist/types/model/enums/XMControlStatus.d.ts +28 -0
- package/dist/types/model/enums/XMEntityCallStatus.d.ts +29 -0
- package/dist/types/model/enums/XMMarginLevel.d.ts +30 -0
- package/dist/types/model/enums/XMParty.d.ts +27 -0
- package/dist/types/model/enums/index.d.ts +8 -0
- package/dist/types/model/index.d.ts +17 -3
- package/dist/types/orders/index.d.ts +3 -1
- package/dist/types/orders/types.d.ts +6 -1
- package/dist/types/products/index.d.ts +3 -1
- package/dist/types/products/types.d.ts +10 -1
- package/dist/types/staking/index.d.ts +5 -1
- package/dist/types/staking/types.d.ts +13 -1
- package/dist/types/wallets/types.d.ts +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* - CALL_TYPE_STANDARD: Evaluated at standard margin call evaluation time - CALL_TYPE_URGENT: Evaluated in realtime
|
|
22
|
+
*/
|
|
23
|
+
export declare enum XMCallType {
|
|
24
|
+
XmCallTypeUnspecified = "XM_CALL_TYPE_UNSPECIFIED",
|
|
25
|
+
CallTypeStandard = "CALL_TYPE_STANDARD",
|
|
26
|
+
CallTypeUrgent = "CALL_TYPE_URGENT"
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* - TRADES_AND_WITHDRAWALS: Allowed to trade and withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled. - TRADES_ONLY: Allowed to trade but not withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled. - SESSION_LOCKED: Not allowed to trade or withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum XMControlStatus {
|
|
24
|
+
XmControlStatusUnspecified = "XM_CONTROL_STATUS_UNSPECIFIED",
|
|
25
|
+
TradesAndWithdrawals = "TRADES_AND_WITHDRAWALS",
|
|
26
|
+
TradesOnly = "TRADES_ONLY",
|
|
27
|
+
SessionLocked = "SESSION_LOCKED"
|
|
28
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* - ENTITY_NO_CALL: There are no margin calls - ENTITY_OPEN_STANDARD_CALL: There is a standard margin call. There are no urgent margin calls, and no expired margin calls. - ENTITY_OPEN_URGENT_CALL: There is an urgent margin call. It is possible that there could also be a standard margin call, but there are no expired margin calls. - ENTITY_AGED_CALL: At least one open margin call is aged (standard or urgent). This may trigger the SESSION_LOCKED control status.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum XMEntityCallStatus {
|
|
24
|
+
XmEntityCallStatusUnspecified = "XM_ENTITY_CALL_STATUS_UNSPECIFIED",
|
|
25
|
+
EntityNoCall = "ENTITY_NO_CALL",
|
|
26
|
+
EntityOpenStandardCall = "ENTITY_OPEN_STANDARD_CALL",
|
|
27
|
+
EntityOpenUrgentCall = "ENTITY_OPEN_URGENT_CALL",
|
|
28
|
+
EntityAgedCall = "ENTITY_AGED_CALL"
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* - HEALTHY_THRESHOLD: Margin level is healthy - DEFICIT_THRESHOLD: Margin level is breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the margin methodology) - WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT is differentiated from DT in that it means margin health is approaching the UMCT - URGENT_MARGIN_CALL_THRESHOLD: Margin level is breaching the UMCT and, as defined in the margin methodology, this will trigger an urgent margin call - LIQUIDATION_THRESHOLD: Margin level is breaching the liquidation threshold (LT) and, as defined in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation may commence.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum XMMarginLevel {
|
|
24
|
+
XmMarginLevelUnspecified = "XM_MARGIN_LEVEL_UNSPECIFIED",
|
|
25
|
+
HealthyThreshold = "HEALTHY_THRESHOLD",
|
|
26
|
+
DeficitThreshold = "DEFICIT_THRESHOLD",
|
|
27
|
+
WarningThreshold = "WARNING_THRESHOLD",
|
|
28
|
+
UrgentMarginCallThreshold = "URGENT_MARGIN_CALL_THRESHOLD",
|
|
29
|
+
LiquidationThreshold = "LIQUIDATION_THRESHOLD"
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025-present Coinbase Global, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Do not edit the class manually.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* - CBE: Coinbase Exchange, trading venue that can receive the XM loan - FCM: Coinbase’s Futures Commission Merchant, trading venue that can receive the XM loan
|
|
22
|
+
*/
|
|
23
|
+
export declare enum XMParty {
|
|
24
|
+
XmPartyUnspecified = "XM_PARTY_UNSPECIFIED",
|
|
25
|
+
Cbe = "CBE",
|
|
26
|
+
Fcm = "FCM"
|
|
27
|
+
}
|
|
@@ -10,6 +10,7 @@ export { AllocationSizeType } from './AllocationSizeType';
|
|
|
10
10
|
export { AllocationStatus } from './AllocationStatus';
|
|
11
11
|
export { AssetChangeType } from './AssetChangeType';
|
|
12
12
|
export { Benchmark } from './Benchmark';
|
|
13
|
+
export { CandlesGranularity } from './CandlesGranularity';
|
|
13
14
|
export { DestinationType } from './DestinationType';
|
|
14
15
|
export { FcmFuturesSweepStatus } from './FcmFuturesSweepStatus';
|
|
15
16
|
export { FcmMarginCallState } from './FcmMarginCallState';
|
|
@@ -37,7 +38,14 @@ export { TransactionStatus } from './TransactionStatus';
|
|
|
37
38
|
export { TransactionType } from './TransactionType';
|
|
38
39
|
export { TransferLocationType } from './TransferLocationType';
|
|
39
40
|
export { UserRole } from './UserRole';
|
|
41
|
+
export { ValidatorStatus } from './ValidatorStatus';
|
|
40
42
|
export { VisibilityStatus } from './VisibilityStatus';
|
|
41
43
|
export { WalletDepositInstructionType } from './WalletDepositInstructionType';
|
|
42
44
|
export { WalletType } from './WalletType';
|
|
43
45
|
export { WalletVisibility } from './WalletVisibility';
|
|
46
|
+
export { XMCallStatus } from './XMCallStatus';
|
|
47
|
+
export { XMCallType } from './XMCallType';
|
|
48
|
+
export { XMControlStatus } from './XMControlStatus';
|
|
49
|
+
export { XMEntityCallStatus } from './XMEntityCallStatus';
|
|
50
|
+
export { XMMarginLevel } from './XMMarginLevel';
|
|
51
|
+
export { XMParty } from './XMParty';
|
|
@@ -22,12 +22,12 @@ export type { BlockchainAddress } from './BlockchainAddress';
|
|
|
22
22
|
export type { BuyingPower } from './BuyingPower';
|
|
23
23
|
export type { CancelFuturesSweepResponse } from './CancelFuturesSweepResponse';
|
|
24
24
|
export type { CancelOrderResponse } from './CancelOrderResponse';
|
|
25
|
+
export type { Candle } from './Candle';
|
|
25
26
|
export type { Commission } from './Commission';
|
|
26
27
|
export type { Conversion } from './Conversion';
|
|
27
28
|
export type { ConversionDetail } from './ConversionDetail';
|
|
28
29
|
export type { Counterparty } from './Counterparty';
|
|
29
30
|
export type { CounterpartyDestination } from './CounterpartyDestination';
|
|
30
|
-
export type { CreateAddressGroup } from './CreateAddressGroup';
|
|
31
31
|
export type { CreateAllocationRequest } from './CreateAllocationRequest';
|
|
32
32
|
export type { CreateAllocationResponse } from './CreateAllocationResponse';
|
|
33
33
|
export type { CreateAllocationResponseBody } from './CreateAllocationResponseBody';
|
|
@@ -42,8 +42,10 @@ export type { CreatePortfolioAddressBookEntryResponse } from './CreatePortfolioA
|
|
|
42
42
|
export type { CreateWalletResponse } from './CreateWalletResponse';
|
|
43
43
|
export type { CreateWalletTransferResponse } from './CreateWalletTransferResponse';
|
|
44
44
|
export type { CreateWalletWithdrawalResponse } from './CreateWalletWithdrawalResponse';
|
|
45
|
+
export type { CrossMarginOverview } from './CrossMarginOverview';
|
|
45
46
|
export type { DefiBalance } from './DefiBalance';
|
|
46
47
|
export type { DestinationAlloc } from './DestinationAlloc';
|
|
48
|
+
export type { EditOrderResponse } from './EditOrderResponse';
|
|
47
49
|
export type { EntityBalance } from './EntityBalance';
|
|
48
50
|
export type { EntityUser } from './EntityUser';
|
|
49
51
|
export type { EstimatedNetworkFees } from './EstimatedNetworkFees';
|
|
@@ -57,6 +59,8 @@ export type { GetActivityResponse } from './GetActivityResponse';
|
|
|
57
59
|
export type { GetAllocationResponse } from './GetAllocationResponse';
|
|
58
60
|
export type { GetAllocationsByClientNettingIdResponse } from './GetAllocationsByClientNettingIdResponse';
|
|
59
61
|
export type { GetBuyingPowerResponse } from './GetBuyingPowerResponse';
|
|
62
|
+
export type { GetCandlesResponse } from './GetCandlesResponse';
|
|
63
|
+
export type { GetCrossMarginOverviewResponse } from './GetCrossMarginOverviewResponse';
|
|
60
64
|
export type { GetEntityActivitiesResponse } from './GetEntityActivitiesResponse';
|
|
61
65
|
export type { GetEntityAssetsResponse } from './GetEntityAssetsResponse';
|
|
62
66
|
export type { GetEntityPaymentMethodDetailsResponse } from './GetEntityPaymentMethodDetailsResponse';
|
|
@@ -96,7 +100,6 @@ export type { GetPositionsResponse } from './GetPositionsResponse';
|
|
|
96
100
|
export type { GetPostTradeCreditResponse } from './GetPostTradeCreditResponse';
|
|
97
101
|
export type { GetTFTieredPricingFeesResponse } from './GetTFTieredPricingFeesResponse';
|
|
98
102
|
export type { GetTransactionResponse } from './GetTransactionResponse';
|
|
99
|
-
export type { GetWalletAddressesResponse } from './GetWalletAddressesResponse';
|
|
100
103
|
export type { GetWalletBalanceResponse } from './GetWalletBalanceResponse';
|
|
101
104
|
export type { GetWalletDepositInstructionsResponse } from './GetWalletDepositInstructionsResponse';
|
|
102
105
|
export type { GetWalletResponse } from './GetWalletResponse';
|
|
@@ -109,6 +112,7 @@ export type { ListAggregateEntityPositionsResponse } from './ListAggregateEntity
|
|
|
109
112
|
export type { ListEntityBalancesResponse } from './ListEntityBalancesResponse';
|
|
110
113
|
export type { ListEntityPositionsResponse } from './ListEntityPositionsResponse';
|
|
111
114
|
export type { ListOnchainAddressGroupsResponse } from './ListOnchainAddressGroupsResponse';
|
|
115
|
+
export type { ListTransactionValidatorsResponse } from './ListTransactionValidatorsResponse';
|
|
112
116
|
export type { ListWalletAddressesResponse } from './ListWalletAddressesResponse';
|
|
113
117
|
export type { ListWeb3WalletBalancesResponse } from './ListWeb3WalletBalancesResponse';
|
|
114
118
|
export type { LoanInfo } from './LoanInfo';
|
|
@@ -149,15 +153,17 @@ export type { RpcConfig } from './RpcConfig';
|
|
|
149
153
|
export type { ScheduleFuturesSweepResponse } from './ScheduleFuturesSweepResponse';
|
|
150
154
|
export type { SetAutoSweepResponse } from './SetAutoSweepResponse';
|
|
151
155
|
export type { ShortCollateral } from './ShortCollateral';
|
|
156
|
+
export type { StakingClaimRewardsResponse } from './StakingClaimRewardsResponse';
|
|
152
157
|
export type { StakingInitiateResponse } from './StakingInitiateResponse';
|
|
153
|
-
export type { StakingInputs } from './StakingInputs';
|
|
154
158
|
export type { StakingUnstakeResponse } from './StakingUnstakeResponse';
|
|
155
159
|
export type { TieredPricingFee } from './TieredPricingFee';
|
|
156
160
|
export type { Transaction } from './Transaction';
|
|
157
161
|
export type { TransactionMetadata } from './TransactionMetadata';
|
|
162
|
+
export type { TransactionValidator } from './TransactionValidator';
|
|
158
163
|
export type { TransferLocation } from './TransferLocation';
|
|
159
164
|
export type { UserAction } from './UserAction';
|
|
160
165
|
export type { Wallet } from './Wallet';
|
|
166
|
+
export type { WalletClaimRewardsInputs } from './WalletClaimRewardsInputs';
|
|
161
167
|
export type { WalletCryptoDepositInstructions } from './WalletCryptoDepositInstructions';
|
|
162
168
|
export type { WalletFiatDepositInstructions } from './WalletFiatDepositInstructions';
|
|
163
169
|
export type { WalletStakeInputs } from './WalletStakeInputs';
|
|
@@ -166,6 +172,11 @@ export type { Web3Asset } from './Web3Asset';
|
|
|
166
172
|
export type { Web3Balance } from './Web3Balance';
|
|
167
173
|
export type { Web3TransactionMetadata } from './Web3TransactionMetadata';
|
|
168
174
|
export type { WithdrawalPower } from './WithdrawalPower';
|
|
175
|
+
export type { XMLoan } from './XMLoan';
|
|
176
|
+
export type { XMMarginCall } from './XMMarginCall';
|
|
177
|
+
export type { XMPosition } from './XMPosition';
|
|
178
|
+
export type { XMRiskNettingInfo } from './XMRiskNettingInfo';
|
|
179
|
+
export type { XMSummary } from './XMSummary';
|
|
169
180
|
export type { CreateATransferBetweenTwoWallets } from './createATransferBetweenTwoWallets';
|
|
170
181
|
export type { AcceptQuoteRequest } from './AcceptQuoteRequest';
|
|
171
182
|
export type { CreateConversionRequest } from './CreateConversionRequest';
|
|
@@ -176,11 +187,14 @@ export type { CreatePortfolioAddressBookEntryRequest } from './CreatePortfolioAd
|
|
|
176
187
|
export type { CreateWalletDepositAddressRequest } from './CreateWalletDepositAddressRequest';
|
|
177
188
|
export type { CreateWalletRequest } from './CreateWalletRequest';
|
|
178
189
|
export type { CreateWalletWithdrawalRequest } from './CreateWalletWithdrawalRequest';
|
|
190
|
+
export type { EditOrderRequest } from './EditOrderRequest';
|
|
191
|
+
export type { ListTransactionValidatorsRequest } from './ListTransactionValidatorsRequest';
|
|
179
192
|
export type { OrderPreviewRequest } from './OrderPreviewRequest';
|
|
180
193
|
export type { PortfolioStakingInitiateRequest } from './PortfolioStakingInitiateRequest';
|
|
181
194
|
export type { PortfolioStakingUnstakeRequest } from './PortfolioStakingUnstakeRequest';
|
|
182
195
|
export type { ScheduleFuturesSweepRequest } from './ScheduleFuturesSweepRequest';
|
|
183
196
|
export type { SetAutoSweepRequest } from './SetAutoSweepRequest';
|
|
197
|
+
export type { StakingClaimRewardsRequest } from './StakingClaimRewardsRequest';
|
|
184
198
|
export type { StakingInitiateRequest } from './StakingInitiateRequest';
|
|
185
199
|
export type { StakingUnstakeRequest } from './StakingUnstakeRequest';
|
|
186
200
|
export type { CreateNetAllocationRequest } from './CreateNetAllocationRequest';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { CoinbaseCallOptions, IPrimeApiClient } from '../clients';
|
|
17
|
-
import { ListOpenOrdersResponse, ListOpenOrdersRequest, ListOrderFillsRequest, ListOrderFillsResponse, ListPortfolioOrdersResponse, ListPortfolioOrdersRequest, GetOrderResponse, GetOrderRequest, GetOrderEditHistoryRequest, GetOrderEditHistoryResponse, ListPortfolioFillsRequest, ListPortfolioFillsResponse, CreateOrderPreviewRequest, CreateOrderPreviewResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, CreateQuoteRequest, CreateQuoteResponse, AcceptQuoteRequest, AcceptQuoteResponse } from './types';
|
|
17
|
+
import { ListOpenOrdersResponse, ListOpenOrdersRequest, ListOrderFillsRequest, ListOrderFillsResponse, ListPortfolioOrdersResponse, ListPortfolioOrdersRequest, GetOrderResponse, GetOrderRequest, GetOrderEditHistoryRequest, GetOrderEditHistoryResponse, ListPortfolioFillsRequest, ListPortfolioFillsResponse, CreateOrderPreviewRequest, CreateOrderPreviewResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, CreateQuoteRequest, CreateQuoteResponse, AcceptQuoteRequest, AcceptQuoteResponse, EditOrderRequest, EditOrderResponse } from './types';
|
|
18
18
|
export interface IOrdersService {
|
|
19
19
|
getOrder(request: GetOrderRequest, options?: CoinbaseCallOptions): Promise<GetOrderResponse>;
|
|
20
20
|
getOrderEditHistory(request: GetOrderEditHistoryRequest, options?: CoinbaseCallOptions): Promise<GetOrderEditHistoryResponse>;
|
|
@@ -27,6 +27,7 @@ export interface IOrdersService {
|
|
|
27
27
|
createOrder(request: CreateOrderRequest, options?: CoinbaseCallOptions): Promise<CreateOrderResponse>;
|
|
28
28
|
createQuote(request: CreateQuoteRequest, options?: CoinbaseCallOptions): Promise<CreateQuoteResponse>;
|
|
29
29
|
acceptQuote(request: AcceptQuoteRequest, options?: CoinbaseCallOptions): Promise<AcceptQuoteResponse>;
|
|
30
|
+
editOrder(request: EditOrderRequest, options?: CoinbaseCallOptions): Promise<EditOrderResponse>;
|
|
30
31
|
}
|
|
31
32
|
export declare class OrdersService implements IOrdersService {
|
|
32
33
|
private client;
|
|
@@ -42,4 +43,5 @@ export declare class OrdersService implements IOrdersService {
|
|
|
42
43
|
createOrder(request: CreateOrderRequest, options?: CoinbaseCallOptions): Promise<CreateOrderResponse>;
|
|
43
44
|
createQuote(request: CreateQuoteRequest, options?: CoinbaseCallOptions): Promise<CreateQuoteResponse>;
|
|
44
45
|
acceptQuote(request: AcceptQuoteRequest, options?: CoinbaseCallOptions): Promise<AcceptQuoteResponse>;
|
|
46
|
+
editOrder(request: EditOrderRequest, options?: CoinbaseCallOptions): Promise<EditOrderResponse>;
|
|
45
47
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Brand } from '../shared/brand';
|
|
17
17
|
import { OrderSide, OrderStatus, OrderType } from '../model/enums/';
|
|
18
|
-
import { GetOpenOrdersResponse, GetOrderFillsResponse, GetOrderResponse as internalGet, GetOrdersResponse, GetPortfolioFillsResponse, GetOrderEditHistoryResponse as internalEditHistory, OrderPreviewRequest, PostOrderPreviewResponse, CancelOrderResponse as internalCancel, CreateOrderResponse as internalCreateResp, CreateOrderRequest as internalCreate, QuoteResponse, AcceptQuoteRequest as internalAcceptQuoteReq, AcceptQuoteResponse as internalAcceptQuoteResp } from '../model/';
|
|
18
|
+
import { GetOpenOrdersResponse, GetOrderFillsResponse, GetOrderResponse as internalGet, GetOrdersResponse, GetPortfolioFillsResponse, GetOrderEditHistoryResponse as internalEditHistory, OrderPreviewRequest, PostOrderPreviewResponse, CancelOrderResponse as internalCancel, CreateOrderResponse as internalCreateResp, CreateOrderRequest as internalCreate, QuoteResponse, AcceptQuoteRequest as internalAcceptQuoteReq, AcceptQuoteResponse as internalAcceptQuoteResp, EditOrderRequest as internalEditOrderRequest, EditOrderResponse as internalEditOrderResponse } from '../model/';
|
|
19
19
|
import { Pagination } from '../shared/pagination';
|
|
20
20
|
import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
|
|
21
21
|
export type GetOrderRequest = {
|
|
@@ -83,3 +83,8 @@ export type GetOrderEditHistoryRequest = {
|
|
|
83
83
|
orderId: string;
|
|
84
84
|
};
|
|
85
85
|
export type GetOrderEditHistoryResponse = Brand<Omit<internalEditHistory, 'orderEditHistory'>, 'GetOrderEditHistoryResponse'>;
|
|
86
|
+
export type EditOrderRequest = internalEditOrderRequest & {
|
|
87
|
+
portfolioId: string;
|
|
88
|
+
orderId: string;
|
|
89
|
+
};
|
|
90
|
+
export type EditOrderResponse = Brand<internalEditOrderResponse, 'EditOrderResponse'>;
|
|
@@ -14,12 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { IPrimeApiClient, CoinbaseCallOptions } from '../clients';
|
|
17
|
-
import { ListProductsRequest, ListProductsResponse } from './types';
|
|
17
|
+
import { ListProductsRequest, ListProductsResponse, ListProductCandlesRequest, ListProductCandlesResponse } from './types';
|
|
18
18
|
export interface IProductsService {
|
|
19
19
|
listProducts(request: ListProductsRequest, options?: CoinbaseCallOptions): Promise<ListProductsResponse>;
|
|
20
|
+
listProductCandles(request: ListProductCandlesRequest, options?: CoinbaseCallOptions): Promise<ListProductCandlesResponse>;
|
|
20
21
|
}
|
|
21
22
|
export declare class ProductsService implements IProductsService {
|
|
22
23
|
private client;
|
|
23
24
|
constructor(client: IPrimeApiClient);
|
|
24
25
|
listProducts(request: ListProductsRequest, options?: CoinbaseCallOptions): Promise<ListProductsResponse>;
|
|
26
|
+
listProductCandles(request: ListProductCandlesRequest, options?: CoinbaseCallOptions): Promise<ListProductCandlesResponse>;
|
|
25
27
|
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Brand } from '../shared/brand';
|
|
17
|
-
import { GetPortfolioProductsResponse } from '../model/';
|
|
17
|
+
import { GetPortfolioProductsResponse, GetCandlesResponse } from '../model/';
|
|
18
|
+
import { CandlesGranularity } from '../model/enums/';
|
|
18
19
|
import { Pagination } from '../shared/pagination';
|
|
19
20
|
import { PaginatedResponseMethods, BasePaginatedRequest } from '../shared/paginatedResponse';
|
|
20
21
|
export type ListProductsRequest = Pagination & {
|
|
@@ -22,3 +23,11 @@ export type ListProductsRequest = Pagination & {
|
|
|
22
23
|
};
|
|
23
24
|
export type BaseListProductsResponse = Brand<GetPortfolioProductsResponse, 'ListProductsResponse'>;
|
|
24
25
|
export type ListProductsResponse = BaseListProductsResponse & PaginatedResponseMethods<ListProductsRequest & BasePaginatedRequest, BaseListProductsResponse, any>;
|
|
26
|
+
export type ListProductCandlesRequest = {
|
|
27
|
+
portfolioId: string;
|
|
28
|
+
productId: string;
|
|
29
|
+
startTime: string;
|
|
30
|
+
endTime: string;
|
|
31
|
+
granularity: CandlesGranularity;
|
|
32
|
+
};
|
|
33
|
+
export type ListProductCandlesResponse = Brand<GetCandlesResponse, 'ListProductCandlesResponse'>;
|
|
@@ -14,12 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { IPrimeApiClient, CoinbaseCallOptions } from '../clients';
|
|
17
|
-
import { CreateStakeRequest, CreateStakeResponse, CreateUnstakeRequest, CreateUnstakeResponse, CreatePortfolioStakeRequest, CreatePortfolioStakeResponse, CreatePortfolioUnstakeRequest, CreatePortfolioUnstakeResponse } from './types';
|
|
17
|
+
import { CreateStakeRequest, CreateStakeResponse, CreateUnstakeRequest, CreateUnstakeResponse, CreatePortfolioStakeRequest, CreatePortfolioStakeResponse, CreatePortfolioUnstakeRequest, CreatePortfolioUnstakeResponse, QueryTransactionValidatorsRequest, QueryTransactionValidatorsResponse, ClaimRewardsRequest, ClaimRewardsResponse } from './types';
|
|
18
18
|
export interface IStakingService {
|
|
19
19
|
createStake(request: CreateStakeRequest, options?: CoinbaseCallOptions): Promise<CreateStakeResponse>;
|
|
20
20
|
createUnstake(request: CreateUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreateUnstakeResponse>;
|
|
21
21
|
createPortfolioStake(request: CreatePortfolioStakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioStakeResponse>;
|
|
22
22
|
createPortfolioUnstake(request: CreatePortfolioUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioUnstakeResponse>;
|
|
23
|
+
queryTransactionValidators(request: QueryTransactionValidatorsRequest, options?: CoinbaseCallOptions): Promise<QueryTransactionValidatorsResponse>;
|
|
24
|
+
claimRewards(request: ClaimRewardsRequest, options?: CoinbaseCallOptions): Promise<ClaimRewardsResponse>;
|
|
23
25
|
}
|
|
24
26
|
export declare class StakingService implements IStakingService {
|
|
25
27
|
private client;
|
|
@@ -28,4 +30,6 @@ export declare class StakingService implements IStakingService {
|
|
|
28
30
|
createUnstake(request: CreateUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreateUnstakeResponse>;
|
|
29
31
|
createPortfolioStake(request: CreatePortfolioStakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioStakeResponse>;
|
|
30
32
|
createPortfolioUnstake(request: CreatePortfolioUnstakeRequest, options?: CoinbaseCallOptions): Promise<CreatePortfolioUnstakeResponse>;
|
|
33
|
+
queryTransactionValidators(request: QueryTransactionValidatorsRequest, options?: CoinbaseCallOptions): Promise<QueryTransactionValidatorsResponse>;
|
|
34
|
+
claimRewards(request: ClaimRewardsRequest, options?: CoinbaseCallOptions): Promise<ClaimRewardsResponse>;
|
|
31
35
|
}
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Brand } from '../shared/brand';
|
|
17
|
-
import {
|
|
17
|
+
import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
|
|
18
|
+
import { StakingInitiateResponse, StakingInitiateRequest, StakingUnstakeResponse, PortfolioStakingInitiateRequest, PortfolioStakingInitiateResponse, PortfolioStakingUnstakeRequest, PortfolioStakingUnstakeResponse, ListTransactionValidatorsResponse as internalListTransactionValidatorsResponse, StakingClaimRewardsRequest as internalStakingClaimRewardsRequest, StakingClaimRewardsResponse as internalStakingClaimRewardsResponse } from 'src/model/';
|
|
18
19
|
export type CreateStakeRequest = StakingInitiateRequest & {
|
|
19
20
|
portfolioId: string;
|
|
20
21
|
walletId: string;
|
|
@@ -33,3 +34,14 @@ export type CreatePortfolioUnstakeRequest = PortfolioStakingUnstakeRequest & {
|
|
|
33
34
|
portfolioId: string;
|
|
34
35
|
};
|
|
35
36
|
export type CreatePortfolioUnstakeResponse = Brand<PortfolioStakingUnstakeResponse, 'CreatePortfolioUnstakeResponse'>;
|
|
37
|
+
export type QueryTransactionValidatorsRequest = BasePaginatedRequest & {
|
|
38
|
+
portfolioId: string;
|
|
39
|
+
transactionIds: string[];
|
|
40
|
+
};
|
|
41
|
+
export type BaseQueryTransactionValidatorsResponse = Brand<internalListTransactionValidatorsResponse, 'BaseQueryTransactionValidatorsResponse'>;
|
|
42
|
+
export type QueryTransactionValidatorsResponse = BaseQueryTransactionValidatorsResponse & PaginatedResponseMethods<QueryTransactionValidatorsRequest, BaseQueryTransactionValidatorsResponse, any>;
|
|
43
|
+
export type ClaimRewardsRequest = internalStakingClaimRewardsRequest & {
|
|
44
|
+
portfolioId: string;
|
|
45
|
+
walletId: string;
|
|
46
|
+
};
|
|
47
|
+
export type ClaimRewardsResponse = Brand<internalStakingClaimRewardsResponse, 'ClaimRewardsResponse'>;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Brand } from '../shared/brand';
|
|
17
17
|
import { WalletType, WalletDepositInstructionType } from '../model/enums/';
|
|
18
|
-
import { GetWalletsResponse, GetWalletResponse as internalGet,
|
|
18
|
+
import { GetWalletsResponse, GetWalletResponse as internalGet, ListWalletAddressesResponse as internalGetAddresses, GetWalletDepositInstructionsResponse as internalGetInstructs, CreateWalletRequest as internalCreate, CreateWalletResponse as internalCreateResp, BlockchainAddress } from '../model/';
|
|
19
19
|
import { Pagination } from '../shared/pagination';
|
|
20
20
|
import { BasePaginatedRequest, PaginatedResponseMethods } from '../shared/paginatedResponse';
|
|
21
21
|
export type ListWalletsRequest = Pagination & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase-sample/prime-sdk-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/types/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
"build": "tsc",
|
|
40
40
|
"lint": "eslint . --ext .js,.ts",
|
|
41
41
|
"format": "prettier --write \"**/*.{js,ts,tsx,json,css,md}\"",
|
|
42
|
-
"
|
|
42
|
+
"fetch-spec": "curl -o apiSpec/prime-public-api-spec.yaml https://api.prime.coinbase.com/v1/openapi.yaml",
|
|
43
|
+
"gen-types": "openapi-generator generate -i apiSpec/prime-public-api-spec.yaml -g typescript-node --global-property models -o apiSpec/types --additional-properties=supportsES6=true --additional-properties=snapshot=true && cd apiSpec && node generateTypes.js",
|
|
43
44
|
"replace-model": "rm -r src/model && cp -r apiSpec/types/processed src/model",
|
|
44
|
-
"update-spec": "npm run gen-types && npm run replace-model"
|
|
45
|
+
"update-spec": "npm run fetch-spec && npm run gen-types && npm run replace-model"
|
|
45
46
|
},
|
|
46
47
|
"files": [
|
|
47
48
|
"dist/"
|