@northstake/northstakeapi 1.0.11 → 1.0.13
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/.openapi-generator/FILES +30 -27
- package/api/accountApi.ts +38 -18
- package/api/apis.ts +17 -17
- package/api/depositAddressesApi.ts +71 -34
- package/api/linkedWalletsApi.ts +104 -50
- package/api/liquidityProviderApi.ts +37 -17
- package/api/{stakingPartnerManagedUsersApi.ts → managedUsersApi.ts} +151 -82
- package/api/{stakingPartnerManagedUsersDepositAddressesApi.ts → managedUsersDepositAddressesApi.ts} +44 -25
- package/api/{stakingPartnerManagedUsersLinkedWalletsApi.ts → managedUsersLinkedWalletsApi.ts} +115 -65
- package/api/{stakingPartnerManagedUsersOrdersApi.ts → managedUsersOrdersApi.ts} +151 -84
- package/api/{stakingPartnerManagedUsersPortfolioApi.ts → managedUsersPortfolioApi.ts} +44 -25
- package/api/{stakingPartnerManagedUsersStatsApi.ts → managedUsersTransactionsApi.ts} +83 -28
- package/api/{stakingPartnerManagedUsersValidatorsApi.ts → managedUsersValidatorsApi.ts} +43 -24
- package/api/ordersApi.ts +141 -69
- package/api/portfolioApi.ts +38 -18
- package/api/{statsApi.ts → transactionsApi.ts} +73 -33
- package/api/validatorMarketplaceBuyersApi.ts +145 -77
- package/api/validatorMarketplaceSellersApi.ts +228 -128
- package/api/validatorMarketplaceWebhooksApi.ts +106 -52
- package/api/validatorsApi.ts +42 -24
- package/api.ts +174 -89
- package/dist/api/accountApi.d.ts +7 -9
- package/dist/api/accountApi.js +3 -2
- package/dist/api/apis.d.ts +17 -17
- package/dist/api/apis.js +17 -17
- package/dist/api/depositAddressesApi.d.ts +8 -10
- package/dist/api/depositAddressesApi.js +8 -6
- package/dist/api/linkedWalletsApi.d.ts +11 -13
- package/dist/api/linkedWalletsApi.js +15 -11
- package/dist/api/liquidityProviderApi.d.ts +8 -10
- package/dist/api/liquidityProviderApi.js +3 -2
- package/dist/api/{stakingPartnerManagedUsersApi.d.ts → managedUsersApi.d.ts} +18 -20
- package/dist/api/{stakingPartnerManagedUsersApi.js → managedUsersApi.js} +34 -30
- package/dist/api/{stakingPartnerManagedUsersDepositAddressesApi.d.ts → managedUsersDepositAddressesApi.d.ts} +11 -13
- package/dist/api/{stakingPartnerManagedUsersDepositAddressesApi.js → managedUsersDepositAddressesApi.js} +15 -14
- package/dist/api/{stakingPartnerManagedUsersLinkedWalletsApi.d.ts → managedUsersLinkedWalletsApi.d.ts} +13 -15
- package/dist/api/{stakingPartnerManagedUsersLinkedWalletsApi.js → managedUsersLinkedWalletsApi.js} +32 -29
- package/dist/api/managedUsersOrdersApi.d.ts +94 -0
- package/dist/api/{stakingPartnerManagedUsersOrdersApi.js → managedUsersOrdersApi.js} +39 -35
- package/dist/api/{stakingPartnerManagedUsersPortfolioApi.d.ts → managedUsersPortfolioApi.d.ts} +10 -12
- package/dist/api/{stakingPartnerManagedUsersPortfolioApi.js → managedUsersPortfolioApi.js} +15 -14
- package/dist/api/managedUsersTransactionsApi.d.ts +68 -0
- package/dist/api/{stakingPartnerManagedUsersStatsApi.js → managedUsersTransactionsApi.js} +43 -18
- package/dist/api/{stakingPartnerManagedUsersValidatorsApi.d.ts → managedUsersValidatorsApi.d.ts} +9 -11
- package/dist/api/{stakingPartnerManagedUsersValidatorsApi.js → managedUsersValidatorsApi.js} +14 -13
- package/dist/api/ordersApi.d.ts +15 -17
- package/dist/api/ordersApi.js +23 -18
- package/dist/api/portfolioApi.d.ts +7 -9
- package/dist/api/portfolioApi.js +3 -2
- package/dist/api/{statsApi.d.ts → transactionsApi.d.ts} +26 -15
- package/dist/api/{statsApi.js → transactionsApi.js} +33 -20
- package/dist/api/validatorMarketplaceBuyersApi.d.ts +15 -17
- package/dist/api/validatorMarketplaceBuyersApi.js +26 -22
- package/dist/api/validatorMarketplaceSellersApi.d.ts +29 -32
- package/dist/api/validatorMarketplaceSellersApi.js +58 -52
- package/dist/api/validatorMarketplaceWebhooksApi.d.ts +15 -17
- package/dist/api/validatorMarketplaceWebhooksApi.js +17 -14
- package/dist/api/validatorsApi.d.ts +7 -9
- package/dist/api/validatorsApi.js +3 -2
- package/dist/api.d.ts +130 -89
- package/dist/api.js +153 -90
- package/dist/model/accountEntity.d.ts +3 -1
- package/dist/model/accountEntity.js +3 -5
- package/dist/model/{getAllManagedUsers200Response.d.ts → allManagedUsersResponse.d.ts} +1 -1
- package/dist/model/{getAllManagedUsers200Response.js → allManagedUsersResponse.js} +6 -6
- package/dist/model/baseOrder.d.ts +6 -11
- package/dist/model/baseOrder.js +0 -13
- package/dist/model/createManagedUserRequest.d.ts +1 -1
- package/dist/model/createManagedUserRequest.js +1 -1
- package/dist/model/createOrderForManagedUserRequest.d.ts +8 -11
- package/dist/model/createOrderForManagedUserRequest.js +3 -11
- package/dist/model/{validatorKeyKeystoreCryptoChecksum.d.ts → createRFQRequest.d.ts} +3 -3
- package/dist/model/{createRFQDocumentRequest.js → createRFQRequest.js} +8 -8
- package/dist/model/depositAccount.d.ts +3 -0
- package/dist/model/depositAccount.js +3 -0
- package/dist/model/{getDepositAddressesForManagedUser200Response.d.ts → depositAddressesForManagedUserResponse.d.ts} +1 -1
- package/dist/model/{getDepositAddressesForManagedUser200Response.js → depositAddressesForManagedUserResponse.js} +6 -6
- package/dist/model/errorResponse.d.ts +3 -0
- package/dist/model/errorResponse.js +3 -0
- package/dist/model/{validatorKey.d.ts → ethereumValidatorKey.d.ts} +6 -14
- package/dist/model/{validatorKey.js → ethereumValidatorKey.js} +10 -17
- package/dist/model/ethereumValidatorKeyKeystore.d.ts +31 -0
- package/dist/model/{validatorKeyKeystore.js → ethereumValidatorKeyKeystore.js} +7 -7
- package/dist/model/ethereumValidatorKeyKeystoreCrypto.d.ts +30 -0
- package/dist/model/{validatorKeyKeystoreCrypto.js → ethereumValidatorKeyKeystoreCrypto.js} +9 -9
- package/dist/model/ethereumValidatorKeyKeystoreCryptoChecksum.d.ts +27 -0
- package/dist/model/{validatorKeyKeystoreCryptoCipher.js → ethereumValidatorKeyKeystoreCryptoChecksum.js} +8 -8
- package/dist/model/ethereumValidatorKeyKeystoreCryptoCipher.d.ts +28 -0
- package/dist/model/ethereumValidatorKeyKeystoreCryptoCipher.js +38 -0
- package/dist/model/{submitQuoteForRFQDocumentRequest.d.ts → ethereumValidatorKeyKeystoreCryptoCipherParams.d.ts} +2 -2
- package/dist/model/{validatorKeyKeystoreCryptoCipherParams.js → ethereumValidatorKeyKeystoreCryptoCipherParams.js} +6 -6
- package/dist/model/{getTransactionStatistics200ResponseInner.d.ts → ethereumValidatorKeyKeystoreCryptoKdf.d.ts} +5 -7
- package/dist/model/ethereumValidatorKeyKeystoreCryptoKdf.js +38 -0
- package/dist/model/ethereumValidatorKeyKeystoreCryptoKdfParams.d.ts +29 -0
- package/dist/model/{validatorKeyKeystoreCryptoKdfParams.js → ethereumValidatorKeyKeystoreCryptoKdfParams.js} +6 -6
- package/dist/model/exitEstimateBase.d.ts +1 -1
- package/dist/model/exitEstimateBase.js +1 -1
- package/dist/model/exitEstimateSeller.d.ts +2 -2
- package/dist/model/exitEstimateSeller.js +2 -2
- package/dist/model/getTransactionsResponse.d.ts +38 -0
- package/dist/model/getTransactionsResponse.js +43 -0
- package/dist/model/managedUser.d.ts +4 -1
- package/dist/model/managedUser.js +4 -1
- package/dist/model/models.d.ts +28 -25
- package/dist/model/models.js +99 -103
- package/dist/model/{createNewOrderRequest.d.ts → newOrderRequest.d.ts} +10 -13
- package/dist/model/{rewardStat.js → newOrderRequest.js} +18 -18
- package/dist/model/orderDocument.d.ts +17 -18
- package/dist/model/orderDocument.js +10 -20
- package/dist/model/portfolioEntity.d.ts +3 -0
- package/dist/model/portfolioEntity.js +3 -0
- package/dist/model/provideEscrowHashForRFQDocumentRequest.d.ts +1 -1
- package/dist/model/provideEscrowHashForRFQDocumentRequest.js +1 -1
- package/dist/model/quote.d.ts +1 -1
- package/dist/model/quote.js +1 -1
- package/dist/model/rFQBids.d.ts +3 -3
- package/dist/model/rFQBids.js +3 -3
- package/dist/model/rFQDocumentBase.d.ts +5 -5
- package/dist/model/rFQDocumentBase.js +5 -5
- package/dist/model/rFQDocumentBaseUniqueEscrowVault.d.ts +1 -1
- package/dist/model/rFQDocumentBaseUniqueEscrowVault.js +1 -1
- package/dist/model/rFQDocumentBuyer.d.ts +5 -5
- package/dist/model/rFQDocumentBuyer.js +5 -5
- package/dist/model/rFQDocumentBuyerAllOfValidators.d.ts +2 -2
- package/dist/model/rFQDocumentBuyerAllOfValidators.js +2 -2
- package/dist/model/rFQDocumentBuyerStatusFilterEnum.d.ts +1 -8
- package/dist/model/rFQDocumentBuyerStatusFilterEnum.js +0 -10
- package/dist/model/rFQDocumentSeller.d.ts +7 -7
- package/dist/model/rFQDocumentSeller.js +7 -7
- package/dist/model/rFQDocumentSellerAllOfValidators.d.ts +2 -2
- package/dist/model/rFQDocumentSellerAllOfValidators.js +2 -2
- package/dist/model/rFQDocumentSellerStatusFilterEnum.d.ts +1 -9
- package/dist/model/rFQDocumentSellerStatusFilterEnum.js +0 -11
- package/dist/model/rFQDocumentStatusEnum.d.ts +1 -6
- package/dist/model/rFQDocumentStatusEnum.js +0 -8
- package/dist/model/rFQDocumentUpdate.d.ts +5 -5
- package/dist/model/rFQDocumentUpdate.js +5 -5
- package/dist/model/rFQUpdatePayload.d.ts +2 -2
- package/dist/model/rFQWebhookEventType.d.ts +4 -8
- package/dist/model/rFQWebhookEventType.js +0 -10
- package/dist/model/{validatorKeyKeystoreCryptoCipherParams.d.ts → registerWithdrawalRecipientSettlementRequest.d.ts} +2 -2
- package/dist/model/registerWithdrawalRecipientSettlementRequest.js +28 -0
- package/dist/model/settlementStepAcceptedQuote.d.ts +1 -1
- package/dist/model/settlementStepAcceptedQuote.js +1 -1
- package/dist/model/settlementStepEscrowPayment.d.ts +1 -1
- package/dist/model/settlementStepEscrowPayment.js +1 -1
- package/dist/model/settlementStepEscrowReleased.d.ts +2 -2
- package/dist/model/settlementStepEscrowReleased.js +2 -2
- package/dist/model/settlementStepWithdrawalRecipientSettlement.d.ts +1 -1
- package/dist/model/settlementStepWithdrawalRecipientSettlement.js +1 -1
- package/dist/model/settlementSteps.d.ts +4 -4
- package/dist/model/settlementSteps.js +4 -4
- package/dist/model/stakeOrder.d.ts +11 -14
- package/dist/model/stakeOrder.js +6 -11
- package/dist/model/stepStatus.d.ts +1 -5
- package/dist/model/stepStatus.js +0 -10
- package/dist/model/{rejectQuoteForRFQDocumentRequest.d.ts → submittedQuote.d.ts} +2 -2
- package/dist/model/{submitQuoteForRFQDocumentRequest.js → submittedQuote.js} +7 -7
- package/dist/model/tokenEnum.d.ts +1 -11
- package/dist/model/tokenEnum.js +0 -16
- package/dist/model/{transactionStat.d.ts → transaction.d.ts} +16 -15
- package/dist/model/transaction.js +56 -0
- package/dist/model/transactionEventTypeEnum.d.ts +15 -0
- package/dist/model/{configSource.d.ts → transactionEventTypeEnum.js} +2 -4
- package/dist/model/transactionsForManagedUser.d.ts +38 -0
- package/dist/model/transactionsForManagedUser.js +43 -0
- package/dist/model/unstakeOrder.d.ts +6 -11
- package/dist/model/unstakeOrder.js +0 -13
- package/dist/model/unstakeStepType.d.ts +1 -16
- package/dist/model/unstakeStepType.js +0 -21
- package/dist/model/validatorContractTypeEnum.d.ts +1 -4
- package/dist/model/validatorContractTypeEnum.js +0 -6
- package/dist/model/validatorInfo.d.ts +20 -18
- package/dist/model/validatorInfo.js +10 -20
- package/dist/model/validatorInfoValidatorType.d.ts +1 -1
- package/dist/model/validatorInfoValidatorType.js +1 -1
- package/dist/model/validatorInfoValidatorTypeContract.d.ts +1 -1
- package/dist/model/validatorInfoValidatorTypeContract.js +1 -1
- package/dist/model/validatorKeyHolderEnum.d.ts +1 -4
- package/dist/model/validatorKeyHolderEnum.js +0 -6
- package/dist/model/wallet.d.ts +3 -0
- package/dist/model/wallet.js +3 -0
- package/dist/model/webhookPayload.d.ts +3 -0
- package/dist/model/webhookPayload.js +3 -0
- package/dist/model/webhookPayloadData.d.ts +2 -2
- package/dist/model/webhookPayloadRFQAvailable.d.ts +1 -1
- package/dist/model/webhookPayloadRFQAvailable.js +1 -1
- package/dist/model/webhookPayloadRFQBidAccepted.d.ts +1 -1
- package/dist/model/webhookPayloadRFQBidAccepted.js +1 -1
- package/dist/model/webhookPayloadRFQBidAcceptedDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQBidAcceptedDetails.js +1 -1
- package/dist/model/webhookPayloadRFQBidReceived.d.ts +1 -1
- package/dist/model/webhookPayloadRFQBidReceived.js +1 -1
- package/dist/model/webhookPayloadRFQEscrowEvent.d.ts +1 -1
- package/dist/model/webhookPayloadRFQEscrowEvent.js +1 -1
- package/dist/model/webhookPayloadRFQEscrowEventDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQEscrowEventDetails.js +1 -1
- package/dist/model/webhookPayloadRFQEscrowReleased.d.ts +1 -1
- package/dist/model/webhookPayloadRFQEscrowReleased.js +1 -1
- package/dist/model/webhookPayloadRFQEscrowReleasedDetails.d.ts +2 -2
- package/dist/model/webhookPayloadRFQEscrowReleasedDetails.js +2 -2
- package/dist/model/webhookPayloadRFQTransferProposalReceived.d.ts +31 -0
- package/dist/model/webhookPayloadRFQTransferProposalReceived.js +38 -0
- package/dist/model/{webhookPayloadRFQValidatorWithdrawalChangeDetails.d.ts → webhookPayloadRFQTransferProposalReceivedDetails.d.ts} +2 -2
- package/dist/model/{webhookPayloadRFQValidatorWithdrawalChangeDetails.js → webhookPayloadRFQTransferProposalReceivedDetails.js} +7 -7
- package/dist/model/webhookPayloadRFQValidatorExited.d.ts +31 -0
- package/dist/model/webhookPayloadRFQValidatorExited.js +38 -0
- package/dist/model/{createRFQDocumentRequest.d.ts → webhookPayloadRFQValidatorExitedDetails.d.ts} +3 -3
- package/dist/model/webhookPayloadRFQValidatorExitedDetails.js +33 -0
- package/dist/model/webhookPayloadRFQValidatorWithdrawalChange.d.ts +3 -3
- package/dist/model/webhookPayloadRFQValidatorWithdrawalChange.js +2 -2
- package/dist/model/withdrawalOrder.d.ts +6 -11
- package/dist/model/withdrawalOrder.js +0 -13
- package/dist/model/withdrawalStepType.d.ts +1 -8
- package/dist/model/withdrawalStepType.js +0 -13
- package/model/accountEntity.ts +8 -11
- package/model/addLinkedWalletForManagedUserRequest.ts +3 -3
- package/model/addLinkedWalletRequest.ts +4 -4
- package/model/{getAllManagedUsers200Response.ts → allManagedUsersResponse.ts} +7 -7
- package/model/baseOrder.ts +11 -18
- package/model/createManagedUserRequest.ts +3 -3
- package/model/createOrderForManagedUserRequest.ts +17 -17
- package/model/{createRFQDocumentRequest.ts → createRFQRequest.ts} +7 -7
- package/model/depositAccount.ts +6 -3
- package/model/{getDepositAddressesForManagedUser200Response.ts → depositAddressesForManagedUserResponse.ts} +5 -5
- package/model/errorResponse.ts +5 -2
- package/model/{validatorKey.ts → ethereumValidatorKey.ts} +11 -29
- package/model/{validatorKeyKeystore.ts → ethereumValidatorKeyKeystore.ts} +11 -11
- package/model/ethereumValidatorKeyKeystoreCrypto.ts +46 -0
- package/model/{validatorKeyKeystoreCryptoChecksum.ts → ethereumValidatorKeyKeystoreCryptoChecksum.ts} +12 -6
- package/model/{validatorKeyKeystoreCryptoKdf.ts → ethereumValidatorKeyKeystoreCryptoCipher.ts} +14 -8
- package/model/{validatorKeyKeystoreCryptoCipherParams.ts → ethereumValidatorKeyKeystoreCryptoCipherParams.ts} +4 -4
- package/model/{validatorKeyKeystoreCryptoCipher.ts → ethereumValidatorKeyKeystoreCryptoKdf.ts} +9 -9
- package/model/{validatorKeyKeystoreCryptoKdfParams.ts → ethereumValidatorKeyKeystoreCryptoKdfParams.ts} +8 -8
- package/model/exitEstimateBase.ts +4 -4
- package/model/exitEstimateSeller.ts +6 -6
- package/model/getTransactionsResponse.ts +59 -0
- package/model/managedUser.ts +7 -4
- package/model/models.ts +270 -93
- package/model/{createNewOrderRequest.ts → newOrderRequest.ts} +21 -21
- package/model/orderDocument.ts +39 -25
- package/model/orderDocumentSteps.ts +3 -3
- package/model/orderUpdatePayload.ts +4 -4
- package/model/portfolioEntity.ts +7 -4
- package/model/provideEscrowHashForRFQDocumentRequest.ts +3 -3
- package/model/quote.ts +5 -5
- package/model/rFQBids.ts +8 -8
- package/model/rFQDocumentBase.ts +13 -13
- package/model/rFQDocumentBaseUniqueEscrowVault.ts +3 -3
- package/model/rFQDocumentBuyer.ts +15 -15
- package/model/rFQDocumentBuyerAllOfValidators.ts +6 -6
- package/model/rFQDocumentBuyerStatusFilterEnum.ts +8 -9
- package/model/rFQDocumentSeller.ts +18 -18
- package/model/rFQDocumentSellerAllOfValidators.ts +6 -6
- package/model/rFQDocumentSellerStatusFilterEnum.ts +9 -10
- package/model/rFQDocumentStatusEnum.ts +6 -7
- package/model/rFQDocumentUpdate.ts +11 -11
- package/model/rFQUpdatePayload.ts +6 -6
- package/model/rFQWebhookEventType.ts +13 -9
- package/model/{rejectQuoteForRFQDocumentRequest.ts → registerWithdrawalRecipientSettlementRequest.ts} +6 -6
- package/model/settlementStepAcceptedQuote.ts +5 -5
- package/model/settlementStepEscrowPayment.ts +5 -5
- package/model/settlementStepEscrowReleased.ts +7 -7
- package/model/settlementStepWithdrawalRecipientSettlement.ts +4 -4
- package/model/settlementSteps.ts +9 -9
- package/model/stakeOrder.ts +19 -19
- package/model/stakeStep.ts +3 -3
- package/model/stakeStepElement.ts +3 -3
- package/model/stepStatus.ts +5 -6
- package/model/{submitQuoteForRFQDocumentRequest.ts → submittedQuote.ts} +5 -5
- package/model/tokenEnum.ts +11 -12
- package/model/transaction.ts +80 -0
- package/model/{configSource.ts → transactionEventTypeEnum.ts} +10 -5
- package/model/transactionsForManagedUser.ts +59 -0
- package/model/unstakeOrder.ts +11 -18
- package/model/unstakeStep.ts +3 -3
- package/model/unstakeStepElement.ts +3 -3
- package/model/unstakeStepType.ts +16 -17
- package/model/validatorContractTypeEnum.ts +4 -5
- package/model/validatorInfo.ts +34 -27
- package/model/validatorInfoValidatorType.ts +4 -4
- package/model/validatorInfoValidatorTypeContract.ts +4 -4
- package/model/validatorKeyHolderEnum.ts +4 -5
- package/model/wallet.ts +7 -4
- package/model/webHookLookupAnswer.ts +5 -5
- package/model/webhookPayload.ts +7 -4
- package/model/webhookPayloadData.ts +8 -8
- package/model/webhookPayloadRFQAvailable.ts +5 -5
- package/model/webhookPayloadRFQBidAccepted.ts +5 -5
- package/model/webhookPayloadRFQBidAcceptedDetails.ts +5 -5
- package/model/webhookPayloadRFQBidReceived.ts +5 -5
- package/model/webhookPayloadRFQEscrowEvent.ts +5 -5
- package/model/webhookPayloadRFQEscrowEventDetails.ts +5 -5
- package/model/webhookPayloadRFQEscrowReleased.ts +5 -5
- package/model/webhookPayloadRFQEscrowReleasedDetails.ts +7 -7
- package/model/webhookPayloadRFQTransferProposalReceived.ts +47 -0
- package/model/{webhookPayloadRFQValidatorWithdrawalChangeDetails.ts → webhookPayloadRFQTransferProposalReceivedDetails.ts} +6 -6
- package/model/webhookPayloadRFQValidatorExited.ts +47 -0
- package/model/webhookPayloadRFQValidatorExitedDetails.ts +37 -0
- package/model/webhookPayloadRFQValidatorWithdrawalChange.ts +7 -7
- package/model/webhookRegistration.ts +4 -4
- package/model/webhookRegistrationDetails.ts +4 -4
- package/model/withdrawalOrder.ts +12 -19
- package/model/withdrawalStep.ts +3 -3
- package/model/withdrawalStepElement.ts +3 -3
- package/model/withdrawalStepType.ts +8 -9
- package/package.json +1 -1
- package/api/northstake.ts +0 -116
- package/dist/api/northstake.d.ts +0 -39
- package/dist/api/northstake.js +0 -82
- package/dist/api/stakingPartnerManagedUsersOrdersApi.d.ts +0 -96
- package/dist/api/stakingPartnerManagedUsersStatsApi.d.ts +0 -53
- package/dist/model/configSource.js +0 -19
- package/dist/model/createNewOrderRequest.js +0 -56
- package/dist/model/getTransactionStatistics200ResponseInner.js +0 -53
- package/dist/model/rejectQuoteForRFQDocumentRequest.js +0 -28
- package/dist/model/rewardStat.d.ts +0 -44
- package/dist/model/transactionStat.js +0 -53
- package/dist/model/validatorKeyKeystore.d.ts +0 -31
- package/dist/model/validatorKeyKeystoreCrypto.d.ts +0 -30
- package/dist/model/validatorKeyKeystoreCryptoChecksum.js +0 -33
- package/dist/model/validatorKeyKeystoreCryptoCipher.d.ts +0 -28
- package/dist/model/validatorKeyKeystoreCryptoKdf.d.ts +0 -27
- package/dist/model/validatorKeyKeystoreCryptoKdf.js +0 -33
- package/dist/model/validatorKeyKeystoreCryptoKdfParams.d.ts +0 -29
- package/model/getTransactionStatistics200ResponseInner.ts +0 -61
- package/model/rewardStat.ts +0 -70
- package/model/transactionStat.ts +0 -79
- package/model/validatorKeyKeystoreCrypto.ts +0 -46
package/api/ordersApi.ts
CHANGED
|
@@ -15,8 +15,8 @@ import localVarRequest from 'request';
|
|
|
15
15
|
import http from 'http';
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
|
-
import { CreateNewOrderRequest } from '../model/createNewOrderRequest';
|
|
19
18
|
import { ErrorResponse } from '../model/errorResponse';
|
|
19
|
+
import { NewOrderRequest } from '../model/newOrderRequest';
|
|
20
20
|
import { OrderDocument } from '../model/orderDocument';
|
|
21
21
|
|
|
22
22
|
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
@@ -34,13 +34,15 @@ export enum OrdersApiApiKeys {
|
|
|
34
34
|
ApiKeyAuth,
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
|
|
38
|
+
|
|
37
39
|
export class OrdersApi {
|
|
38
40
|
protected _basePath = defaultBasePath;
|
|
39
41
|
protected _defaultHeaders : any = {};
|
|
40
42
|
protected _useQuerystring : boolean = false;
|
|
41
43
|
|
|
42
44
|
protected authentications = {
|
|
43
|
-
'default': new JWTAuth('your_api_key', 'your_private_key'),
|
|
45
|
+
'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
|
|
44
46
|
'bearerTokenAuth': new HttpBearerAuth(),
|
|
45
47
|
'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
|
|
46
48
|
}
|
|
@@ -80,11 +82,11 @@ export class OrdersApi {
|
|
|
80
82
|
return this._basePath;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
public setDefaultAuthentication(auth:
|
|
85
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
84
86
|
this.authentications.default = auth;
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
|
|
89
|
+
public setApiKey(key: OrdersApiApiKeys, value: string) {
|
|
88
90
|
(this.authentications as any)[OrdersApiApiKeys[key]].apiKey = value;
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -92,7 +94,7 @@ export class OrdersApi {
|
|
|
92
94
|
this.authentications.bearerTokenAuth.accessToken = accessToken;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
96
98
|
this.interceptors.push(interceptor);
|
|
97
99
|
}
|
|
98
100
|
|
|
@@ -101,22 +103,38 @@ export class OrdersApi {
|
|
|
101
103
|
* @summary Cancel a submitted order
|
|
102
104
|
* @param orderId Unique identifier for the order
|
|
103
105
|
*/
|
|
104
|
-
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
public async cancelOrderById (orderId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
|
|
112
|
+
|
|
105
113
|
const localVarPath = this.basePath + '/orders/{orderId}'
|
|
106
114
|
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
|
115
|
+
|
|
107
116
|
let localVarQueryParameters: any = {};
|
|
108
117
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
109
118
|
let localVarFormParams: any = {};
|
|
110
119
|
|
|
111
|
-
|
|
120
|
+
|
|
121
|
+
// Verify required parameter 'orderId' is not null or undefined
|
|
112
122
|
if (orderId === null || orderId === undefined) {
|
|
113
|
-
throw new Error('Required parameter orderId was null or undefined when calling cancelOrderById.');
|
|
123
|
+
throw new Error('Required parameter "orderId" was null or undefined when calling cancelOrderById.');
|
|
114
124
|
}
|
|
115
125
|
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
116
132
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
117
133
|
|
|
118
134
|
let localVarUseFormData = false;
|
|
119
135
|
|
|
136
|
+
|
|
137
|
+
|
|
120
138
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
121
139
|
method: 'DELETE',
|
|
122
140
|
qs: localVarQueryParameters,
|
|
@@ -142,32 +160,40 @@ export class OrdersApi {
|
|
|
142
160
|
localVarRequestOptions.form = localVarFormParams;
|
|
143
161
|
}
|
|
144
162
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
163
|
+
return new Promise<{ body: any, status: number }>((resolve, reject) => {
|
|
164
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
165
|
+
if (error) {
|
|
166
|
+
console.error('API call error:', error);
|
|
167
|
+
reject(error);
|
|
168
|
+
} else {
|
|
169
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
170
|
+
resolve({ body: body, status: response.statusCode });
|
|
149
171
|
} else {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} else {
|
|
153
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
154
|
-
}
|
|
172
|
+
console.error('API response error:', response.statusCode);
|
|
173
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
155
174
|
}
|
|
156
|
-
}
|
|
175
|
+
}
|
|
157
176
|
});
|
|
158
177
|
});
|
|
159
|
-
}
|
|
178
|
+
} )
|
|
179
|
+
}
|
|
160
180
|
/**
|
|
161
|
-
*
|
|
181
|
+
* This endpoint allows the client to create staking, unstaking, or withdrawal orders. One key feature of this endpoint is the ability to include an optional `validatorKey` field when creating a staking order. ### Including a Validator Key By including a `validatorKey` in the staking order, the client specifies a pre-generated and signed Ethereum validator key that should be used for the staking transaction. This key must meet all required security and operational standards, as it will be directly used for staking on the Ethereum blockchain. ### Without a Validator Key If no `validatorKey` is provided, the client must specify the amount to stake. Northstake handles the staking operation internally, requiring the managed user\'s account to have sufficient balance to cover the transaction and any associated fees.
|
|
162
182
|
* @summary Create a new order
|
|
163
|
-
* @param
|
|
183
|
+
* @param newOrderRequest
|
|
164
184
|
*/
|
|
165
|
-
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
public async createNewOrder (newOrderRequest: NewOrderRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: OrderDocument, status: number }> {
|
|
191
|
+
|
|
166
192
|
const localVarPath = this.basePath + '/orders';
|
|
193
|
+
|
|
167
194
|
let localVarQueryParameters: any = {};
|
|
168
195
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
169
196
|
const produces = ['application/json'];
|
|
170
|
-
// give precedence to 'application/json'
|
|
171
197
|
if (produces.indexOf('application/json') >= 0) {
|
|
172
198
|
localVarHeaderParams.Accept = 'application/json';
|
|
173
199
|
} else {
|
|
@@ -175,15 +201,24 @@ export class OrdersApi {
|
|
|
175
201
|
}
|
|
176
202
|
let localVarFormParams: any = {};
|
|
177
203
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
204
|
+
|
|
205
|
+
// Verify required parameter 'newOrderRequest' is not null or undefined
|
|
206
|
+
if (newOrderRequest === null || newOrderRequest === undefined) {
|
|
207
|
+
throw new Error('Required parameter "newOrderRequest" was null or undefined when calling createNewOrder.');
|
|
181
208
|
}
|
|
182
209
|
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
183
216
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
184
217
|
|
|
185
218
|
let localVarUseFormData = false;
|
|
186
219
|
|
|
220
|
+
|
|
221
|
+
|
|
187
222
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
188
223
|
method: 'POST',
|
|
189
224
|
qs: localVarQueryParameters,
|
|
@@ -191,7 +226,7 @@ export class OrdersApi {
|
|
|
191
226
|
uri: localVarPath,
|
|
192
227
|
useQuerystring: this._useQuerystring,
|
|
193
228
|
json: true,
|
|
194
|
-
body: ObjectSerializer.serialize(
|
|
229
|
+
body: ObjectSerializer.serialize(newOrderRequest, "NewOrderRequest")
|
|
195
230
|
};
|
|
196
231
|
|
|
197
232
|
let authenticationPromise = Promise.resolve();
|
|
@@ -210,34 +245,42 @@ export class OrdersApi {
|
|
|
210
245
|
localVarRequestOptions.form = localVarFormParams;
|
|
211
246
|
}
|
|
212
247
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
248
|
+
return new Promise<{ body: OrderDocument, status: number }>((resolve, reject) => {
|
|
249
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
250
|
+
if (error) {
|
|
251
|
+
console.error('API call error:', error);
|
|
252
|
+
reject(error);
|
|
253
|
+
} else {
|
|
254
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
255
|
+
body = ObjectSerializer.deserialize(body, "OrderDocument");
|
|
256
|
+
resolve({ body: body, status: response.statusCode });
|
|
217
257
|
} else {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
resolve({ response: response, body: body });
|
|
221
|
-
} else {
|
|
222
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
223
|
-
}
|
|
258
|
+
console.error('API response error:', response.statusCode);
|
|
259
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
224
260
|
}
|
|
225
|
-
}
|
|
261
|
+
}
|
|
226
262
|
});
|
|
227
263
|
});
|
|
228
|
-
}
|
|
264
|
+
} )
|
|
265
|
+
}
|
|
229
266
|
/**
|
|
230
267
|
*
|
|
231
268
|
* @summary Get order details by order ID
|
|
232
269
|
* @param orderId Unique identifier for the order
|
|
233
270
|
*/
|
|
234
|
-
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
public async getOrderDetailsById (orderId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: OrderDocument, status: number }> {
|
|
277
|
+
|
|
235
278
|
const localVarPath = this.basePath + '/orders/{orderId}'
|
|
236
279
|
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
|
280
|
+
|
|
237
281
|
let localVarQueryParameters: any = {};
|
|
238
282
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
239
283
|
const produces = ['application/json'];
|
|
240
|
-
// give precedence to 'application/json'
|
|
241
284
|
if (produces.indexOf('application/json') >= 0) {
|
|
242
285
|
localVarHeaderParams.Accept = 'application/json';
|
|
243
286
|
} else {
|
|
@@ -245,15 +288,24 @@ export class OrdersApi {
|
|
|
245
288
|
}
|
|
246
289
|
let localVarFormParams: any = {};
|
|
247
290
|
|
|
248
|
-
|
|
291
|
+
|
|
292
|
+
// Verify required parameter 'orderId' is not null or undefined
|
|
249
293
|
if (orderId === null || orderId === undefined) {
|
|
250
|
-
throw new Error('Required parameter orderId was null or undefined when calling getOrderDetailsById.');
|
|
294
|
+
throw new Error('Required parameter "orderId" was null or undefined when calling getOrderDetailsById.');
|
|
251
295
|
}
|
|
252
296
|
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
253
303
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
254
304
|
|
|
255
305
|
let localVarUseFormData = false;
|
|
256
306
|
|
|
307
|
+
|
|
308
|
+
|
|
257
309
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
258
310
|
method: 'GET',
|
|
259
311
|
qs: localVarQueryParameters,
|
|
@@ -279,32 +331,40 @@ export class OrdersApi {
|
|
|
279
331
|
localVarRequestOptions.form = localVarFormParams;
|
|
280
332
|
}
|
|
281
333
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
334
|
+
return new Promise<{ body: OrderDocument, status: number }>((resolve, reject) => {
|
|
335
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
336
|
+
if (error) {
|
|
337
|
+
console.error('API call error:', error);
|
|
338
|
+
reject(error);
|
|
339
|
+
} else {
|
|
340
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
341
|
+
body = ObjectSerializer.deserialize(body, "OrderDocument");
|
|
342
|
+
resolve({ body: body, status: response.statusCode });
|
|
286
343
|
} else {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
resolve({ response: response, body: body });
|
|
290
|
-
} else {
|
|
291
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
292
|
-
}
|
|
344
|
+
console.error('API response error:', response.statusCode);
|
|
345
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
293
346
|
}
|
|
294
|
-
}
|
|
347
|
+
}
|
|
295
348
|
});
|
|
296
349
|
});
|
|
297
|
-
}
|
|
350
|
+
} )
|
|
351
|
+
}
|
|
298
352
|
/**
|
|
299
353
|
*
|
|
300
354
|
* @summary Get a list of all orders
|
|
301
355
|
*/
|
|
302
|
-
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
public async listAllOrders (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<OrderDocument>, status: number }> {
|
|
362
|
+
|
|
303
363
|
const localVarPath = this.basePath + '/orders';
|
|
364
|
+
|
|
304
365
|
let localVarQueryParameters: any = {};
|
|
305
366
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
306
367
|
const produces = ['application/json'];
|
|
307
|
-
// give precedence to 'application/json'
|
|
308
368
|
if (produces.indexOf('application/json') >= 0) {
|
|
309
369
|
localVarHeaderParams.Accept = 'application/json';
|
|
310
370
|
} else {
|
|
@@ -312,10 +372,20 @@ export class OrdersApi {
|
|
|
312
372
|
}
|
|
313
373
|
let localVarFormParams: any = {};
|
|
314
374
|
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
315
383
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
316
384
|
|
|
317
385
|
let localVarUseFormData = false;
|
|
318
386
|
|
|
387
|
+
|
|
388
|
+
|
|
319
389
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
320
390
|
method: 'GET',
|
|
321
391
|
qs: localVarQueryParameters,
|
|
@@ -341,20 +411,22 @@ export class OrdersApi {
|
|
|
341
411
|
localVarRequestOptions.form = localVarFormParams;
|
|
342
412
|
}
|
|
343
413
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
414
|
+
return new Promise<{ body: Array<OrderDocument>, status: number }>((resolve, reject) => {
|
|
415
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
416
|
+
if (error) {
|
|
417
|
+
console.error('API call error:', error);
|
|
418
|
+
reject(error);
|
|
419
|
+
} else {
|
|
420
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
421
|
+
body = ObjectSerializer.deserialize(body, "Array<OrderDocument>");
|
|
422
|
+
resolve({ body: body, status: response.statusCode });
|
|
348
423
|
} else {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
resolve({ response: response, body: body });
|
|
352
|
-
} else {
|
|
353
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
354
|
-
}
|
|
424
|
+
console.error('API response error:', response.statusCode);
|
|
425
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
355
426
|
}
|
|
356
|
-
}
|
|
427
|
+
}
|
|
357
428
|
});
|
|
358
429
|
});
|
|
359
|
-
}
|
|
430
|
+
} )
|
|
431
|
+
}
|
|
360
432
|
}
|
package/api/portfolioApi.ts
CHANGED
|
@@ -33,13 +33,15 @@ export enum PortfolioApiApiKeys {
|
|
|
33
33
|
ApiKeyAuth,
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
|
|
37
|
+
|
|
36
38
|
export class PortfolioApi {
|
|
37
39
|
protected _basePath = defaultBasePath;
|
|
38
40
|
protected _defaultHeaders : any = {};
|
|
39
41
|
protected _useQuerystring : boolean = false;
|
|
40
42
|
|
|
41
43
|
protected authentications = {
|
|
42
|
-
'default': new JWTAuth('your_api_key', 'your_private_key'),
|
|
44
|
+
'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
|
|
43
45
|
'bearerTokenAuth': new HttpBearerAuth(),
|
|
44
46
|
'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
|
|
45
47
|
}
|
|
@@ -79,11 +81,11 @@ export class PortfolioApi {
|
|
|
79
81
|
return this._basePath;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
public setDefaultAuthentication(auth:
|
|
84
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
83
85
|
this.authentications.default = auth;
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
public setApiKey(key: PortfolioApiApiKeys, value: string) {
|
|
87
89
|
(this.authentications as any)[PortfolioApiApiKeys[key]].apiKey = value;
|
|
88
90
|
}
|
|
89
91
|
|
|
@@ -91,7 +93,7 @@ export class PortfolioApi {
|
|
|
91
93
|
this.authentications.bearerTokenAuth.accessToken = accessToken;
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
95
97
|
this.interceptors.push(interceptor);
|
|
96
98
|
}
|
|
97
99
|
|
|
@@ -99,12 +101,18 @@ export class PortfolioApi {
|
|
|
99
101
|
*
|
|
100
102
|
* @summary Account portfolio overview
|
|
101
103
|
*/
|
|
102
|
-
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
public async getPortfolio (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<PortfolioEntity>, status: number }> {
|
|
110
|
+
|
|
103
111
|
const localVarPath = this.basePath + '/portfolio';
|
|
112
|
+
|
|
104
113
|
let localVarQueryParameters: any = {};
|
|
105
114
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
106
115
|
const produces = ['application/json'];
|
|
107
|
-
// give precedence to 'application/json'
|
|
108
116
|
if (produces.indexOf('application/json') >= 0) {
|
|
109
117
|
localVarHeaderParams.Accept = 'application/json';
|
|
110
118
|
} else {
|
|
@@ -112,10 +120,20 @@ export class PortfolioApi {
|
|
|
112
120
|
}
|
|
113
121
|
let localVarFormParams: any = {};
|
|
114
122
|
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
115
131
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
116
132
|
|
|
117
133
|
let localVarUseFormData = false;
|
|
118
134
|
|
|
135
|
+
|
|
136
|
+
|
|
119
137
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
120
138
|
method: 'GET',
|
|
121
139
|
qs: localVarQueryParameters,
|
|
@@ -141,20 +159,22 @@ export class PortfolioApi {
|
|
|
141
159
|
localVarRequestOptions.form = localVarFormParams;
|
|
142
160
|
}
|
|
143
161
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
162
|
+
return new Promise<{ body: Array<PortfolioEntity>, status: number }>((resolve, reject) => {
|
|
163
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
164
|
+
if (error) {
|
|
165
|
+
console.error('API call error:', error);
|
|
166
|
+
reject(error);
|
|
167
|
+
} else {
|
|
168
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
169
|
+
body = ObjectSerializer.deserialize(body, "Array<PortfolioEntity>");
|
|
170
|
+
resolve({ body: body, status: response.statusCode });
|
|
148
171
|
} else {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
resolve({ response: response, body: body });
|
|
152
|
-
} else {
|
|
153
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
154
|
-
}
|
|
172
|
+
console.error('API response error:', response.statusCode);
|
|
173
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
155
174
|
}
|
|
156
|
-
}
|
|
175
|
+
}
|
|
157
176
|
});
|
|
158
177
|
});
|
|
159
|
-
}
|
|
178
|
+
} )
|
|
179
|
+
}
|
|
160
180
|
}
|
|
@@ -16,7 +16,9 @@ import http from 'http';
|
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
18
|
import { ErrorResponse } from '../model/errorResponse';
|
|
19
|
-
import {
|
|
19
|
+
import { GetTransactionsResponse } from '../model/getTransactionsResponse';
|
|
20
|
+
import { TokenEnum } from '../model/tokenEnum';
|
|
21
|
+
import { TransactionEventTypeEnum } from '../model/transactionEventTypeEnum';
|
|
20
22
|
|
|
21
23
|
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
22
24
|
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth, JWTAuth } from '../model/models';
|
|
@@ -29,17 +31,28 @@ let defaultBasePath = '/v1';
|
|
|
29
31
|
// This file is autogenerated - Please do not edit
|
|
30
32
|
// ===============================================
|
|
31
33
|
|
|
32
|
-
export enum
|
|
34
|
+
export enum TransactionsApiApiKeys {
|
|
33
35
|
ApiKeyAuth,
|
|
34
36
|
}
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
|
|
39
|
+
// If vendorExtensions.x-packageParams is true, use a single object to pass parameters
|
|
40
|
+
export interface TransactionsApiParams {
|
|
41
|
+
startDate?: string;
|
|
42
|
+
endDate?: string;
|
|
43
|
+
type?: TransactionEventTypeEnum;
|
|
44
|
+
asset?: TokenEnum;
|
|
45
|
+
page?: number;
|
|
46
|
+
limit?: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class TransactionsApi {
|
|
37
50
|
protected _basePath = defaultBasePath;
|
|
38
51
|
protected _defaultHeaders : any = {};
|
|
39
52
|
protected _useQuerystring : boolean = false;
|
|
40
53
|
|
|
41
54
|
protected authentications = {
|
|
42
|
-
'default': new JWTAuth('your_api_key', 'your_private_key'),
|
|
55
|
+
'default': <Authentication>new JWTAuth('your_api_key', 'your_private_key'),
|
|
43
56
|
'bearerTokenAuth': new HttpBearerAuth(),
|
|
44
57
|
'ApiKeyAuth': new ApiKeyAuth('header', 'x-api-key'),
|
|
45
58
|
}
|
|
@@ -79,35 +92,44 @@ export class StatsApi {
|
|
|
79
92
|
return this._basePath;
|
|
80
93
|
}
|
|
81
94
|
|
|
82
|
-
public setDefaultAuthentication(auth:
|
|
95
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
83
96
|
this.authentications.default = auth;
|
|
84
97
|
}
|
|
85
98
|
|
|
86
|
-
|
|
87
|
-
(this.authentications as any)[
|
|
99
|
+
public setApiKey(key: TransactionsApiApiKeys, value: string) {
|
|
100
|
+
(this.authentications as any)[TransactionsApiApiKeys[key]].apiKey = value;
|
|
88
101
|
}
|
|
89
102
|
|
|
90
103
|
set accessToken(accessToken: string | (() => string)) {
|
|
91
104
|
this.authentications.bearerTokenAuth.accessToken = accessToken;
|
|
92
105
|
}
|
|
93
106
|
|
|
94
|
-
|
|
107
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
95
108
|
this.interceptors.push(interceptor);
|
|
96
109
|
}
|
|
97
110
|
|
|
98
111
|
/**
|
|
99
112
|
*
|
|
100
|
-
* @summary Get
|
|
113
|
+
* @summary Get transactions
|
|
101
114
|
* @param startDate Start date for filtering transaction statistics
|
|
102
115
|
* @param endDate End date for filtering transaction statistics
|
|
103
116
|
* @param type Type of transaction (e.g., deposit, withdrawal)
|
|
117
|
+
* @param asset Asset type (e.g., ETH, SOL)
|
|
118
|
+
* @param page Transaction list page number
|
|
119
|
+
* @param limit Number of transactions to return per page
|
|
104
120
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
public async getTransactions(params?: TransactionsApiParams, options: { headers: { [name: string]: string } } = { headers: {} }): Promise<{ body: GetTransactionsResponse, status: number }> {
|
|
127
|
+
|
|
128
|
+
const localVarPath = this.basePath + '/transactions';
|
|
129
|
+
|
|
107
130
|
let localVarQueryParameters: any = {};
|
|
108
131
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
109
132
|
const produces = ['application/json'];
|
|
110
|
-
// give precedence to 'application/json'
|
|
111
133
|
if (produces.indexOf('application/json') >= 0) {
|
|
112
134
|
localVarHeaderParams.Accept = 'application/json';
|
|
113
135
|
} else {
|
|
@@ -115,22 +137,38 @@ export class StatsApi {
|
|
|
115
137
|
}
|
|
116
138
|
let localVarFormParams: any = {};
|
|
117
139
|
|
|
118
|
-
if (startDate !== undefined) {
|
|
119
|
-
localVarQueryParameters['startDate'] = ObjectSerializer.serialize(startDate, "string");
|
|
120
|
-
}
|
|
121
140
|
|
|
122
|
-
if (endDate !== undefined) {
|
|
123
|
-
localVarQueryParameters['endDate'] = ObjectSerializer.serialize(endDate, "string");
|
|
124
|
-
}
|
|
125
141
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
if (params?.startDate !== undefined) {
|
|
145
|
+
localVarQueryParameters['startDate'] = ObjectSerializer.serialize(params?.startDate, "string");
|
|
146
|
+
}
|
|
147
|
+
if (params?.endDate !== undefined) {
|
|
148
|
+
localVarQueryParameters['endDate'] = ObjectSerializer.serialize(params?.endDate, "string");
|
|
149
|
+
}
|
|
150
|
+
if (params?.type !== undefined) {
|
|
151
|
+
localVarQueryParameters['type'] = ObjectSerializer.serialize(params?.type, "TransactionEventTypeEnum");
|
|
152
|
+
}
|
|
153
|
+
if (params?.asset !== undefined) {
|
|
154
|
+
localVarQueryParameters['asset'] = ObjectSerializer.serialize(params?.asset, "TokenEnum");
|
|
155
|
+
}
|
|
156
|
+
if (params?.page !== undefined) {
|
|
157
|
+
localVarQueryParameters['page'] = ObjectSerializer.serialize(params?.page, "number");
|
|
158
|
+
}
|
|
159
|
+
if (params?.limit !== undefined) {
|
|
160
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(params?.limit, "number");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
129
165
|
|
|
130
166
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
131
167
|
|
|
132
168
|
let localVarUseFormData = false;
|
|
133
169
|
|
|
170
|
+
|
|
171
|
+
|
|
134
172
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
135
173
|
method: 'GET',
|
|
136
174
|
qs: localVarQueryParameters,
|
|
@@ -156,20 +194,22 @@ export class StatsApi {
|
|
|
156
194
|
localVarRequestOptions.form = localVarFormParams;
|
|
157
195
|
}
|
|
158
196
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
197
|
+
return new Promise<{ body: GetTransactionsResponse, status: number }>((resolve, reject) => {
|
|
198
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
199
|
+
if (error) {
|
|
200
|
+
console.error('API call error:', error);
|
|
201
|
+
reject(error);
|
|
202
|
+
} else {
|
|
203
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
204
|
+
body = ObjectSerializer.deserialize(body, "GetTransactionsResponse");
|
|
205
|
+
resolve({ body: body, status: response.statusCode });
|
|
163
206
|
} else {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
resolve({ response: response, body: body });
|
|
167
|
-
} else {
|
|
168
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
169
|
-
}
|
|
207
|
+
console.error('API response error:', response.statusCode);
|
|
208
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
170
209
|
}
|
|
171
|
-
}
|
|
210
|
+
}
|
|
172
211
|
});
|
|
173
212
|
});
|
|
174
|
-
}
|
|
213
|
+
} )
|
|
214
|
+
}
|
|
175
215
|
}
|