@northstake/northstakeapi 1.0.12 → 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
|
@@ -30,17 +30,19 @@ let defaultBasePath = '/v1';
|
|
|
30
30
|
// This file is autogenerated - Please do not edit
|
|
31
31
|
// ===============================================
|
|
32
32
|
|
|
33
|
-
export enum
|
|
33
|
+
export enum ManagedUsersOrdersApiApiKeys {
|
|
34
34
|
ApiKeyAuth,
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export class ManagedUsersOrdersApi {
|
|
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,19 +82,19 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
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
|
-
|
|
88
|
-
(this.authentications as any)[
|
|
89
|
+
public setApiKey(key: ManagedUsersOrdersApiApiKeys, value: string) {
|
|
90
|
+
(this.authentications as any)[ManagedUsersOrdersApiApiKeys[key]].apiKey = value;
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
set accessToken(accessToken: string | (() => string)) {
|
|
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
|
|
|
@@ -102,14 +104,20 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
102
104
|
* @param userId
|
|
103
105
|
* @param orderId
|
|
104
106
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
public async cancelOrderForManagedUser (userId: string, orderId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: any, status: number }> {
|
|
113
|
+
|
|
114
|
+
const localVarPath = this.basePath + '/managedUsers/{userId}/orders/{orderId}'
|
|
107
115
|
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
|
108
116
|
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
|
117
|
+
|
|
109
118
|
let localVarQueryParameters: any = {};
|
|
110
119
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
111
120
|
const produces = ['application/json'];
|
|
112
|
-
// give precedence to 'application/json'
|
|
113
121
|
if (produces.indexOf('application/json') >= 0) {
|
|
114
122
|
localVarHeaderParams.Accept = 'application/json';
|
|
115
123
|
} else {
|
|
@@ -117,20 +125,28 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
117
125
|
}
|
|
118
126
|
let localVarFormParams: any = {};
|
|
119
127
|
|
|
120
|
-
|
|
128
|
+
|
|
129
|
+
// Verify required parameter 'userId' is not null or undefined
|
|
121
130
|
if (userId === null || userId === undefined) {
|
|
122
|
-
throw new Error('Required parameter userId was null or undefined when calling cancelOrderForManagedUser.');
|
|
131
|
+
throw new Error('Required parameter "userId" was null or undefined when calling cancelOrderForManagedUser.');
|
|
123
132
|
}
|
|
124
|
-
|
|
125
|
-
// verify required parameter 'orderId' is not null or undefined
|
|
133
|
+
// Verify required parameter 'orderId' is not null or undefined
|
|
126
134
|
if (orderId === null || orderId === undefined) {
|
|
127
|
-
throw new Error('Required parameter orderId was null or undefined when calling cancelOrderForManagedUser.');
|
|
135
|
+
throw new Error('Required parameter "orderId" was null or undefined when calling cancelOrderForManagedUser.');
|
|
128
136
|
}
|
|
129
137
|
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
130
144
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
131
145
|
|
|
132
146
|
let localVarUseFormData = false;
|
|
133
147
|
|
|
148
|
+
|
|
149
|
+
|
|
134
150
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
135
151
|
method: 'DELETE',
|
|
136
152
|
qs: localVarQueryParameters,
|
|
@@ -156,34 +172,42 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
156
172
|
localVarRequestOptions.form = localVarFormParams;
|
|
157
173
|
}
|
|
158
174
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
175
|
+
return new Promise<{ body: any, status: number }>((resolve, reject) => {
|
|
176
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
177
|
+
if (error) {
|
|
178
|
+
console.error('API call error:', error);
|
|
179
|
+
reject(error);
|
|
180
|
+
} else {
|
|
181
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
182
|
+
resolve({ body: body, status: response.statusCode });
|
|
163
183
|
} else {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
} else {
|
|
167
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
168
|
-
}
|
|
184
|
+
console.error('API response error:', response.statusCode);
|
|
185
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
169
186
|
}
|
|
170
|
-
}
|
|
187
|
+
}
|
|
171
188
|
});
|
|
172
189
|
});
|
|
173
|
-
}
|
|
190
|
+
} )
|
|
191
|
+
}
|
|
174
192
|
/**
|
|
175
|
-
*
|
|
193
|
+
* This endpoint allows the client to create a staking, unstaking, or withdrawal order on behalf of a managed user. One key feature of this endpoint is the ability to include an optional `validatorKey` field when creating a staking order. ### Including a Validator Key (Ethereum only) 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. The `validatorKey` object includes cryptographic details such as the keystore information, public key, and the cryptographic path. Including this key is beneficial for users who prefer to maintain a level of control over their staking operations and ensure that their specific validators are utilized. ### Without a Validator Key If no `validatorKey` is provided, Northstake handles the staking operation internally. This process requires that the managed user\'s account must have sufficient balance in their deposit account to cover the staking transaction and any associated fees. In this case, Northstake will generate the necessary validator keys, handle the cryptographic operations, and ensure the validator is registered correctly on the blockchain. ### Usage Scenarios - **With Validator Key**: Ensures that a specific, pre-approved validator key is used, providing transparency and control to the user. - **Without Validator Key**: Ideal for users who prefer a hands-off approach, allowing Northstake to manage the technical and operational complexities of staking on their behalf. Clients are advised to ensure that all provided validator keys are secure and generated according to best security practices. Improper handling or exposure of validator keys can lead to significant security risks, including loss of staked assets.
|
|
176
194
|
* @summary Create an order on behalf of a managed user
|
|
177
195
|
* @param userId
|
|
178
196
|
* @param createOrderForManagedUserRequest
|
|
179
197
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
public async createOrderForManagedUser (userId: string, createOrderForManagedUserRequest: CreateOrderForManagedUserRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: OrderDocument, status: number }> {
|
|
204
|
+
|
|
205
|
+
const localVarPath = this.basePath + '/managedUsers/{userId}/orders'
|
|
182
206
|
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
207
|
+
|
|
183
208
|
let localVarQueryParameters: any = {};
|
|
184
209
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
185
210
|
const produces = ['application/json'];
|
|
186
|
-
// give precedence to 'application/json'
|
|
187
211
|
if (produces.indexOf('application/json') >= 0) {
|
|
188
212
|
localVarHeaderParams.Accept = 'application/json';
|
|
189
213
|
} else {
|
|
@@ -191,20 +215,28 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
191
215
|
}
|
|
192
216
|
let localVarFormParams: any = {};
|
|
193
217
|
|
|
194
|
-
|
|
218
|
+
|
|
219
|
+
// Verify required parameter 'userId' is not null or undefined
|
|
195
220
|
if (userId === null || userId === undefined) {
|
|
196
|
-
throw new Error('Required parameter userId was null or undefined when calling createOrderForManagedUser.');
|
|
221
|
+
throw new Error('Required parameter "userId" was null or undefined when calling createOrderForManagedUser.');
|
|
197
222
|
}
|
|
198
|
-
|
|
199
|
-
// verify required parameter 'createOrderForManagedUserRequest' is not null or undefined
|
|
223
|
+
// Verify required parameter 'createOrderForManagedUserRequest' is not null or undefined
|
|
200
224
|
if (createOrderForManagedUserRequest === null || createOrderForManagedUserRequest === undefined) {
|
|
201
|
-
throw new Error('Required parameter createOrderForManagedUserRequest was null or undefined when calling createOrderForManagedUser.');
|
|
225
|
+
throw new Error('Required parameter "createOrderForManagedUserRequest" was null or undefined when calling createOrderForManagedUser.');
|
|
202
226
|
}
|
|
203
227
|
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
204
234
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
205
235
|
|
|
206
236
|
let localVarUseFormData = false;
|
|
207
237
|
|
|
238
|
+
|
|
239
|
+
|
|
208
240
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
209
241
|
method: 'POST',
|
|
210
242
|
qs: localVarQueryParameters,
|
|
@@ -231,34 +263,42 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
231
263
|
localVarRequestOptions.form = localVarFormParams;
|
|
232
264
|
}
|
|
233
265
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
266
|
+
return new Promise<{ body: OrderDocument, status: number }>((resolve, reject) => {
|
|
267
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
268
|
+
if (error) {
|
|
269
|
+
console.error('API call error:', error);
|
|
270
|
+
reject(error);
|
|
271
|
+
} else {
|
|
272
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
273
|
+
body = ObjectSerializer.deserialize(body, "OrderDocument");
|
|
274
|
+
resolve({ body: body, status: response.statusCode });
|
|
238
275
|
} else {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
resolve({ response: response, body: body });
|
|
242
|
-
} else {
|
|
243
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
244
|
-
}
|
|
276
|
+
console.error('API response error:', response.statusCode);
|
|
277
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
245
278
|
}
|
|
246
|
-
}
|
|
279
|
+
}
|
|
247
280
|
});
|
|
248
281
|
});
|
|
249
|
-
}
|
|
282
|
+
} )
|
|
283
|
+
}
|
|
250
284
|
/**
|
|
251
285
|
*
|
|
252
286
|
* @summary Get all orders for a particular managed user
|
|
253
287
|
* @param userId
|
|
254
288
|
*/
|
|
255
|
-
|
|
256
|
-
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
public async getAllOrdersForManagedUser (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<OrderDocument>, status: number }> {
|
|
295
|
+
|
|
296
|
+
const localVarPath = this.basePath + '/managedUsers/{userId}/orders'
|
|
257
297
|
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
298
|
+
|
|
258
299
|
let localVarQueryParameters: any = {};
|
|
259
300
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
260
301
|
const produces = ['application/json'];
|
|
261
|
-
// give precedence to 'application/json'
|
|
262
302
|
if (produces.indexOf('application/json') >= 0) {
|
|
263
303
|
localVarHeaderParams.Accept = 'application/json';
|
|
264
304
|
} else {
|
|
@@ -266,15 +306,24 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
266
306
|
}
|
|
267
307
|
let localVarFormParams: any = {};
|
|
268
308
|
|
|
269
|
-
|
|
309
|
+
|
|
310
|
+
// Verify required parameter 'userId' is not null or undefined
|
|
270
311
|
if (userId === null || userId === undefined) {
|
|
271
|
-
throw new Error('Required parameter userId was null or undefined when calling getAllOrdersForManagedUser.');
|
|
312
|
+
throw new Error('Required parameter "userId" was null or undefined when calling getAllOrdersForManagedUser.');
|
|
272
313
|
}
|
|
273
314
|
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
274
321
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
275
322
|
|
|
276
323
|
let localVarUseFormData = false;
|
|
277
324
|
|
|
325
|
+
|
|
326
|
+
|
|
278
327
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
279
328
|
method: 'GET',
|
|
280
329
|
qs: localVarQueryParameters,
|
|
@@ -300,36 +349,44 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
300
349
|
localVarRequestOptions.form = localVarFormParams;
|
|
301
350
|
}
|
|
302
351
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
352
|
+
return new Promise<{ body: Array<OrderDocument>, status: number }>((resolve, reject) => {
|
|
353
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
354
|
+
if (error) {
|
|
355
|
+
console.error('API call error:', error);
|
|
356
|
+
reject(error);
|
|
357
|
+
} else {
|
|
358
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
359
|
+
body = ObjectSerializer.deserialize(body, "Array<OrderDocument>");
|
|
360
|
+
resolve({ body: body, status: response.statusCode });
|
|
307
361
|
} else {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
resolve({ response: response, body: body });
|
|
311
|
-
} else {
|
|
312
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
313
|
-
}
|
|
362
|
+
console.error('API response error:', response.statusCode);
|
|
363
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
314
364
|
}
|
|
315
|
-
}
|
|
365
|
+
}
|
|
316
366
|
});
|
|
317
367
|
});
|
|
318
|
-
}
|
|
368
|
+
} )
|
|
369
|
+
}
|
|
319
370
|
/**
|
|
320
371
|
*
|
|
321
372
|
* @summary Get details of an order by ID for a particular managed user
|
|
322
373
|
* @param userId
|
|
323
374
|
* @param orderId
|
|
324
375
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
public async getOrderDetailsForManagedUser (userId: string, orderId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: OrderDocument, status: number }> {
|
|
382
|
+
|
|
383
|
+
const localVarPath = this.basePath + '/managedUsers/{userId}/orders/{orderId}'
|
|
327
384
|
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
|
|
328
385
|
.replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId)));
|
|
386
|
+
|
|
329
387
|
let localVarQueryParameters: any = {};
|
|
330
388
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
331
389
|
const produces = ['application/json'];
|
|
332
|
-
// give precedence to 'application/json'
|
|
333
390
|
if (produces.indexOf('application/json') >= 0) {
|
|
334
391
|
localVarHeaderParams.Accept = 'application/json';
|
|
335
392
|
} else {
|
|
@@ -337,20 +394,28 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
337
394
|
}
|
|
338
395
|
let localVarFormParams: any = {};
|
|
339
396
|
|
|
340
|
-
|
|
397
|
+
|
|
398
|
+
// Verify required parameter 'userId' is not null or undefined
|
|
341
399
|
if (userId === null || userId === undefined) {
|
|
342
|
-
throw new Error('Required parameter userId was null or undefined when calling getOrderDetailsForManagedUser.');
|
|
400
|
+
throw new Error('Required parameter "userId" was null or undefined when calling getOrderDetailsForManagedUser.');
|
|
343
401
|
}
|
|
344
|
-
|
|
345
|
-
// verify required parameter 'orderId' is not null or undefined
|
|
402
|
+
// Verify required parameter 'orderId' is not null or undefined
|
|
346
403
|
if (orderId === null || orderId === undefined) {
|
|
347
|
-
throw new Error('Required parameter orderId was null or undefined when calling getOrderDetailsForManagedUser.');
|
|
404
|
+
throw new Error('Required parameter "orderId" was null or undefined when calling getOrderDetailsForManagedUser.');
|
|
348
405
|
}
|
|
349
406
|
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
350
413
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
351
414
|
|
|
352
415
|
let localVarUseFormData = false;
|
|
353
416
|
|
|
417
|
+
|
|
418
|
+
|
|
354
419
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
355
420
|
method: 'GET',
|
|
356
421
|
qs: localVarQueryParameters,
|
|
@@ -376,20 +441,22 @@ export class StakingPartnerManagedUsersOrdersApi {
|
|
|
376
441
|
localVarRequestOptions.form = localVarFormParams;
|
|
377
442
|
}
|
|
378
443
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
444
|
+
return new Promise<{ body: OrderDocument, status: number }>((resolve, reject) => {
|
|
445
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
446
|
+
if (error) {
|
|
447
|
+
console.error('API call error:', error);
|
|
448
|
+
reject(error);
|
|
449
|
+
} else {
|
|
450
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
451
|
+
body = ObjectSerializer.deserialize(body, "OrderDocument");
|
|
452
|
+
resolve({ body: body, status: response.statusCode });
|
|
383
453
|
} else {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
resolve({ response: response, body: body });
|
|
387
|
-
} else {
|
|
388
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
389
|
-
}
|
|
454
|
+
console.error('API response error:', response.statusCode);
|
|
455
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
390
456
|
}
|
|
391
|
-
}
|
|
457
|
+
}
|
|
392
458
|
});
|
|
393
459
|
});
|
|
394
|
-
}
|
|
460
|
+
} )
|
|
461
|
+
}
|
|
395
462
|
}
|
|
@@ -29,17 +29,19 @@ let defaultBasePath = '/v1';
|
|
|
29
29
|
// This file is autogenerated - Please do not edit
|
|
30
30
|
// ===============================================
|
|
31
31
|
|
|
32
|
-
export enum
|
|
32
|
+
export enum ManagedUsersPortfolioApiApiKeys {
|
|
33
33
|
ApiKeyAuth,
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
export class ManagedUsersPortfolioApi {
|
|
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,34 +81,40 @@ export class StakingPartnerManagedUsersPortfolioApi {
|
|
|
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
|
-
|
|
87
|
-
(this.authentications as any)[
|
|
88
|
+
public setApiKey(key: ManagedUsersPortfolioApiApiKeys, value: string) {
|
|
89
|
+
(this.authentications as any)[ManagedUsersPortfolioApiApiKeys[key]].apiKey = value;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
set accessToken(accessToken: string | (() => string)) {
|
|
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
|
|
|
98
100
|
/**
|
|
99
101
|
*
|
|
100
|
-
* @summary Account portfolio overview for
|
|
102
|
+
* @summary Account portfolio overview for a managed user
|
|
101
103
|
* @param userId
|
|
102
104
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
public async getPortfolioForManagedUser (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ body: Array<PortfolioEntity>, status: number }> {
|
|
111
|
+
|
|
112
|
+
const localVarPath = this.basePath + '/managedUsers/{userId}/portfolio'
|
|
105
113
|
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
114
|
+
|
|
106
115
|
let localVarQueryParameters: any = {};
|
|
107
116
|
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
108
117
|
const produces = ['application/json'];
|
|
109
|
-
// give precedence to 'application/json'
|
|
110
118
|
if (produces.indexOf('application/json') >= 0) {
|
|
111
119
|
localVarHeaderParams.Accept = 'application/json';
|
|
112
120
|
} else {
|
|
@@ -114,15 +122,24 @@ export class StakingPartnerManagedUsersPortfolioApi {
|
|
|
114
122
|
}
|
|
115
123
|
let localVarFormParams: any = {};
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
|
|
126
|
+
// Verify required parameter 'userId' is not null or undefined
|
|
118
127
|
if (userId === null || userId === undefined) {
|
|
119
|
-
throw new Error('Required parameter userId was null or undefined when calling getPortfolioForManagedUser.');
|
|
128
|
+
throw new Error('Required parameter "userId" was null or undefined when calling getPortfolioForManagedUser.');
|
|
120
129
|
}
|
|
121
130
|
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
122
137
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
123
138
|
|
|
124
139
|
let localVarUseFormData = false;
|
|
125
140
|
|
|
141
|
+
|
|
142
|
+
|
|
126
143
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
127
144
|
method: 'GET',
|
|
128
145
|
qs: localVarQueryParameters,
|
|
@@ -148,20 +165,22 @@ export class StakingPartnerManagedUsersPortfolioApi {
|
|
|
148
165
|
localVarRequestOptions.form = localVarFormParams;
|
|
149
166
|
}
|
|
150
167
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
168
|
+
return new Promise<{ body: Array<PortfolioEntity>, status: number }>((resolve, reject) => {
|
|
169
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
170
|
+
if (error) {
|
|
171
|
+
console.error('API call error:', error);
|
|
172
|
+
reject(error);
|
|
173
|
+
} else {
|
|
174
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
175
|
+
body = ObjectSerializer.deserialize(body, "Array<PortfolioEntity>");
|
|
176
|
+
resolve({ body: body, status: response.statusCode });
|
|
155
177
|
} else {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
resolve({ response: response, body: body });
|
|
159
|
-
} else {
|
|
160
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
161
|
-
}
|
|
178
|
+
console.error('API response error:', response.statusCode);
|
|
179
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
162
180
|
}
|
|
163
|
-
}
|
|
181
|
+
}
|
|
164
182
|
});
|
|
165
183
|
});
|
|
166
|
-
}
|
|
184
|
+
} )
|
|
185
|
+
}
|
|
167
186
|
}
|