@northstake/northstakeapi 1.0.38 → 1.0.39
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 +66 -21
- package/.openapi-generator/VERSION +1 -1
- package/api/accountApi.ts +1 -1
- package/api/accountApiKeysApi.ts +1 -1
- package/api/apis.ts +11 -11
- package/api/{validatorMarketplaceSellersApi.ts → lidoReadApi.ts} +105 -91
- package/api/{smartContractsApi.ts → lidoRewardsApi.ts} +106 -88
- package/api/lidoStakingVaultsApi.ts +536 -0
- package/api/lidoWriteApi.ts +2473 -0
- package/api/linkedWalletsApi.ts +93 -1
- package/api/{validatorMarketplaceBuyersApi.ts → organizationApi.ts} +140 -62
- package/api/validatorsApi.ts +27 -110
- package/api.ts +81 -36
- package/dist/api/accountApi.d.ts +1 -1
- package/dist/api/accountApi.js +1 -1
- package/dist/api/accountApiKeysApi.d.ts +1 -1
- package/dist/api/accountApiKeysApi.js +1 -1
- package/dist/api/apis.d.ts +11 -11
- package/dist/api/apis.js +11 -11
- package/dist/api/lidoReadApi.d.ts +138 -0
- package/dist/api/{validatorMarketplaceSellersApi.js → lidoReadApi.js} +82 -82
- package/dist/api/lidoRewardsApi.d.ts +135 -0
- package/dist/api/{smartContractsApi.js → lidoRewardsApi.js} +83 -71
- package/dist/api/lidoStakingVaultsApi.d.ts +108 -0
- package/dist/api/{validatorMarketplaceFacilitatorApi.js → lidoStakingVaultsApi.js} +174 -40
- package/dist/api/lidoWriteApi.d.ts +404 -0
- package/dist/api/lidoWriteApi.js +1931 -0
- package/dist/api/linkedWalletsApi.d.ts +16 -1
- package/dist/api/linkedWalletsApi.js +73 -1
- package/dist/api/organizationApi.d.ts +107 -0
- package/dist/api/{validatorMarketplaceBuyersApi.js → organizationApi.js} +115 -57
- package/dist/api/validatorsApi.d.ts +11 -26
- package/dist/api/validatorsApi.js +25 -87
- package/dist/api.d.ts +71 -26
- package/dist/api.js +76 -31
- package/dist/model/acceptedQuote.d.ts +1 -1
- package/dist/model/acceptedQuote.js +1 -1
- package/dist/model/accountEntity.d.ts +11 -3
- package/dist/model/accountEntity.js +6 -6
- package/dist/model/addLinkedWalletRequest.d.ts +1 -1
- package/dist/model/addLinkedWalletRequest.js +1 -1
- package/dist/model/apiKey.d.ts +4 -4
- package/dist/model/apiKey.js +7 -7
- package/dist/model/approveStETH.d.ts +32 -0
- package/dist/model/approveStETH.js +33 -0
- package/dist/model/approveWstETH.d.ts +36 -0
- package/dist/model/approveWstETH.js +38 -0
- package/dist/model/asset.d.ts +1 -1
- package/dist/model/asset.js +1 -1
- package/dist/model/burnShares.d.ts +32 -0
- package/dist/model/burnShares.js +33 -0
- package/dist/model/burnStETH.d.ts +32 -0
- package/dist/model/burnStETH.js +33 -0
- package/dist/model/burnWstETH.d.ts +32 -0
- package/dist/model/burnWstETH.js +33 -0
- package/dist/model/collectERC20FromVault.d.ts +40 -0
- package/dist/model/collectERC20FromVault.js +43 -0
- package/dist/model/consolidateValidators.d.ts +36 -0
- package/dist/model/consolidateValidators.js +38 -0
- package/dist/model/consolidateValidatorsErrorResponse.d.ts +32 -0
- package/dist/model/consolidateValidatorsErrorResponse.js +33 -0
- package/dist/model/consolidateValidatorsResponse.d.ts +29 -0
- package/dist/model/consolidateValidatorsResponse.js +28 -0
- package/dist/model/createLidoStakingContractsRequest.d.ts +35 -0
- package/dist/model/createLidoStakingContractsRequest.js +36 -0
- package/dist/model/createVaultRequest.d.ts +39 -0
- package/dist/model/createVaultRequest.js +41 -0
- package/dist/model/dailyRewardSummaryStats.d.ts +55 -0
- package/dist/model/dailyRewardSummaryStats.js +61 -0
- package/dist/model/errorResponse.d.ts +1 -1
- package/dist/model/errorResponse.js +1 -1
- package/dist/model/errorWithTransactionResponse.d.ts +30 -0
- package/dist/model/errorWithTransactionResponse.js +36 -0
- package/dist/model/escrowPayment.d.ts +1 -1
- package/dist/model/escrowPayment.js +1 -1
- package/dist/model/escrowReleased.d.ts +1 -1
- package/dist/model/escrowReleased.js +1 -1
- package/dist/model/ethereumValidatorKey.d.ts +1 -1
- package/dist/model/ethereumValidatorKey.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystore.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystore.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCrypto.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCrypto.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoChecksum.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoChecksum.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoCipher.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoCipher.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoCipherParams.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoCipherParams.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoKdf.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoKdf.js +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoKdfParams.d.ts +1 -1
- package/dist/model/ethereumValidatorKeyKeystoreCryptoKdfParams.js +1 -1
- package/dist/model/exitEstimateBase.d.ts +1 -1
- package/dist/model/exitEstimateBase.js +1 -1
- package/dist/model/exitEstimateSeller.d.ts +1 -1
- package/dist/model/exitEstimateSeller.js +1 -1
- package/dist/model/exitProposal.d.ts +1 -1
- package/dist/model/exitProposal.js +1 -1
- package/dist/model/fundVault.d.ts +32 -0
- package/dist/model/fundVault.js +33 -0
- package/dist/model/generateApiKeyRequest.d.ts +1 -1
- package/dist/model/generateApiKeyRequest.js +1 -1
- package/dist/model/getLazyOracleReportCallData200Response.d.ts +28 -0
- package/dist/model/getLazyOracleReportCallData200Response.js +38 -0
- package/dist/model/getLazyOracleReportCallData200ResponseDestructuredCalldata.d.ts +31 -0
- package/dist/model/getLazyOracleReportCallData200ResponseDestructuredCalldata.js +58 -0
- package/dist/model/getLazyOracleReportData200Response.d.ts +27 -0
- package/dist/model/getLazyOracleReportData200Response.js +33 -0
- package/dist/model/getLazyOracleReportData200ResponseReportData.d.ts +27 -0
- package/dist/model/getLazyOracleReportData200ResponseReportData.js +38 -0
- package/dist/model/{getSmartContractTransactions200Response.d.ts → getLidoTransactions200Response.d.ts} +2 -2
- package/dist/model/{getSmartContractTransactions200Response.js → getLidoTransactions200Response.js} +7 -7
- package/dist/model/getQuarantineInfo200Response.d.ts +29 -0
- package/dist/model/getQuarantineInfo200Response.js +48 -0
- package/dist/model/{getMarketplaceMetadata200Response.d.ts → getStETHPerWstETHRate200Response.d.ts} +4 -12
- package/dist/model/getStETHPerWstETHRate200Response.js +28 -0
- package/dist/model/getWithdrawalsResponse.d.ts +1 -1
- package/dist/model/getWithdrawalsResponse.js +1 -1
- package/dist/model/grantRole.d.ts +36 -0
- package/dist/model/grantRole.js +38 -0
- package/dist/model/internalTransaction.d.ts +1 -1
- package/dist/model/internalTransaction.js +1 -1
- package/dist/model/inviteMemberRequest.d.ts +41 -0
- package/dist/model/inviteMemberRequest.js +36 -0
- package/dist/model/lidoContracts.d.ts +39 -0
- package/dist/model/lidoContracts.js +46 -0
- package/dist/model/{minedBlock.d.ts → lidoContractsDashboard.d.ts} +3 -10
- package/dist/model/lidoContractsDashboard.js +28 -0
- package/dist/model/{smartContract.d.ts → lidoContractsStakingVault.d.ts} +5 -13
- package/dist/model/lidoContractsStakingVault.js +28 -0
- package/dist/model/lidoStakingContracts.d.ts +33 -0
- package/dist/model/lidoStakingContracts.js +36 -0
- package/dist/model/lidoStakingContractsWithData.d.ts +39 -0
- package/dist/model/lidoStakingContractsWithData.js +46 -0
- package/dist/model/lidoStakingContractsWithDataVaultData.d.ts +112 -0
- package/dist/model/lidoStakingContractsWithDataVaultData.js +133 -0
- package/dist/model/mintShares.d.ts +36 -0
- package/dist/model/mintShares.js +38 -0
- package/dist/model/mintStETH.d.ts +36 -0
- package/dist/model/mintStETH.js +38 -0
- package/dist/model/mintWstETH.d.ts +36 -0
- package/dist/model/mintWstETH.js +38 -0
- package/dist/model/models.d.ts +61 -16
- package/dist/model/models.js +185 -48
- package/dist/model/organizationMember.d.ts +53 -0
- package/dist/model/organizationMember.js +51 -0
- package/dist/model/organizationNameResponse.d.ts +31 -0
- package/dist/model/organizationNameResponse.js +31 -0
- package/dist/model/partialTransaction.d.ts +31 -0
- package/dist/model/partialTransaction.js +46 -0
- package/dist/model/presignedExitKey.d.ts +1 -1
- package/dist/model/presignedExitKey.js +1 -1
- package/dist/model/presignedExitKeyMessage.d.ts +1 -1
- package/dist/model/presignedExitKeyMessage.js +1 -1
- package/dist/model/quote.d.ts +1 -1
- package/dist/model/quote.js +1 -1
- package/dist/model/rFQBidFacilitator.d.ts +1 -1
- package/dist/model/rFQBidFacilitator.js +1 -1
- package/dist/model/rFQBids.d.ts +1 -1
- package/dist/model/rFQBids.js +1 -1
- package/dist/model/rFQDocumentBase.d.ts +1 -1
- package/dist/model/rFQDocumentBase.js +1 -1
- package/dist/model/rFQDocumentBaseUniqueEscrowVault.d.ts +1 -1
- package/dist/model/rFQDocumentBaseUniqueEscrowVault.js +1 -1
- package/dist/model/rFQDocumentBuyer.d.ts +1 -1
- package/dist/model/rFQDocumentBuyer.js +1 -1
- package/dist/model/rFQDocumentBuyerAllOfValidators.d.ts +1 -1
- package/dist/model/rFQDocumentBuyerAllOfValidators.js +1 -1
- package/dist/model/rFQDocumentBuyerStatusFilter.d.ts +1 -1
- package/dist/model/rFQDocumentBuyerStatusFilter.js +1 -1
- package/dist/model/rFQDocumentFacilitator.d.ts +1 -1
- package/dist/model/rFQDocumentFacilitator.js +1 -1
- package/dist/model/rFQDocumentFacilitatorStatusFilter.d.ts +1 -1
- package/dist/model/rFQDocumentFacilitatorStatusFilter.js +1 -1
- package/dist/model/rFQDocumentFacilitatorValidatorsInner.d.ts +1 -1
- package/dist/model/rFQDocumentFacilitatorValidatorsInner.js +1 -1
- package/dist/model/rFQDocumentSeller.d.ts +1 -1
- package/dist/model/rFQDocumentSeller.js +1 -1
- package/dist/model/rFQDocumentSellerAllOfValidators.d.ts +1 -1
- package/dist/model/rFQDocumentSellerAllOfValidators.js +1 -1
- package/dist/model/rFQDocumentSellerStatusFilter.d.ts +1 -1
- package/dist/model/rFQDocumentSellerStatusFilter.js +1 -1
- package/dist/model/rFQDocumentStatus.d.ts +1 -1
- package/dist/model/rFQDocumentStatus.js +1 -1
- package/dist/model/rFQDocumentUpdate.d.ts +1 -1
- package/dist/model/rFQDocumentUpdate.js +1 -1
- package/dist/model/rFQUpdatePayload.d.ts +1 -1
- package/dist/model/rFQUpdatePayload.js +1 -1
- package/dist/model/rFQWebhookEventType.d.ts +1 -1
- package/dist/model/rFQWebhookEventType.js +1 -1
- package/dist/model/rebalanceVaultWithEther.d.ts +32 -0
- package/dist/model/rebalanceVaultWithEther.js +33 -0
- package/dist/model/rebalanceVaultWithShares.d.ts +32 -0
- package/dist/model/rebalanceVaultWithShares.js +33 -0
- package/dist/model/recoverERC20.d.ts +40 -0
- package/dist/model/recoverERC20.js +43 -0
- package/dist/model/{webhookPayloadData.d.ts → renameVaultRequest.d.ts} +5 -13
- package/dist/model/renameVaultRequest.js +31 -0
- package/dist/model/revokeRole.d.ts +36 -0
- package/dist/model/revokeRole.js +38 -0
- package/dist/model/settlementSteps.d.ts +1 -1
- package/dist/model/settlementSteps.js +1 -1
- package/dist/model/stakeEthRequest.d.ts +31 -0
- package/dist/model/stakeEthRequest.js +31 -0
- package/dist/model/stakeEthResponse.d.ts +32 -0
- package/dist/model/stakeEthResponse.js +43 -0
- package/dist/model/stakeEthResponseDestructuredCallDataInner.d.ts +40 -0
- package/dist/model/stakeEthResponseDestructuredCallDataInner.js +43 -0
- package/dist/model/stakingRequest.d.ts +34 -0
- package/dist/model/stakingRequest.js +38 -0
- package/dist/model/stakingRequestStatus.d.ts +15 -0
- package/dist/model/stakingRequestStatus.js +13 -0
- package/dist/model/transaction.d.ts +14 -2
- package/dist/model/transaction.js +16 -1
- package/dist/model/triggerValidatorWithdrawals.d.ts +40 -0
- package/dist/model/triggerValidatorWithdrawals.js +43 -0
- package/dist/model/unwrapWstETH.d.ts +32 -0
- package/dist/model/unwrapWstETH.js +33 -0
- package/dist/model/{getSmartContractMinedBlocks200Response.d.ts → updateLinkedWalletNameRequest.d.ts} +4 -14
- package/dist/model/updateLinkedWalletNameRequest.js +28 -0
- package/dist/model/updateMemberRoleRequest.d.ts +37 -0
- package/dist/model/updateMemberRoleRequest.js +31 -0
- package/dist/model/updateOrganizationNameRequest.d.ts +31 -0
- package/dist/model/updateOrganizationNameRequest.js +31 -0
- package/dist/model/validateConsolidationRequestsResponse.d.ts +33 -0
- package/dist/model/validateConsolidationRequestsResponse.js +33 -0
- package/dist/model/validateConsolidationRequestsResponseConsolidationDetailsInner.d.ts +48 -0
- package/dist/model/validateConsolidationRequestsResponseConsolidationDetailsInner.js +53 -0
- package/dist/model/validatorDailyReward.d.ts +63 -0
- package/dist/model/validatorDailyReward.js +71 -0
- package/dist/model/validatorInfo.d.ts +14 -11
- package/dist/model/validatorInfo.js +16 -21
- package/dist/model/validatorKeyHolder.d.ts +1 -1
- package/dist/model/validatorKeyHolder.js +1 -1
- package/dist/model/validatorProvider.d.ts +15 -0
- package/dist/model/validatorProvider.js +13 -0
- package/dist/model/validatorRewardRaw.d.ts +73 -0
- package/dist/model/validatorRewardRaw.js +76 -0
- package/dist/model/validatorRewardsDaily.d.ts +50 -0
- package/dist/model/validatorRewardsDaily.js +48 -0
- package/dist/model/{getSmartContractMEVRewards200Response.d.ts → validatorRewardsDailyResponse.d.ts} +4 -13
- package/dist/model/validatorRewardsDailyResponse.js +43 -0
- package/dist/model/validatorRewardsRaw.d.ts +44 -0
- package/dist/model/validatorRewardsRaw.js +46 -0
- package/dist/model/validatorType.d.ts +1 -1
- package/dist/model/validatorType.js +1 -1
- package/dist/model/validatorWithdrawal.d.ts +7 -7
- package/dist/model/validatorWithdrawal.js +13 -13
- package/dist/model/vaultCreationStartResponse.d.ts +26 -0
- package/dist/model/vaultCreationStartResponse.js +28 -0
- package/dist/model/wallet.d.ts +1 -1
- package/dist/model/wallet.js +1 -1
- package/dist/model/webHookLookupAnswer.d.ts +1 -1
- package/dist/model/webHookLookupAnswer.js +1 -1
- package/dist/model/webhookPayload.d.ts +3 -3
- package/dist/model/webhookPayload.js +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/webhookPayloadRFQBidReceivedDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQBidReceivedDetails.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 +1 -1
- package/dist/model/webhookPayloadRFQEscrowReleasedDetails.js +1 -1
- package/dist/model/webhookPayloadRFQTransferProposalReceived.d.ts +1 -1
- package/dist/model/webhookPayloadRFQTransferProposalReceived.js +1 -1
- package/dist/model/webhookPayloadRFQTransferProposalReceivedDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQTransferProposalReceivedDetails.js +1 -1
- package/dist/model/webhookPayloadRFQValidatorExited.d.ts +1 -1
- package/dist/model/webhookPayloadRFQValidatorExited.js +1 -1
- package/dist/model/webhookPayloadRFQValidatorExitedDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQValidatorExitedDetails.js +1 -1
- package/dist/model/webhookPayloadRFQValidatorWithdrawalChange.d.ts +1 -1
- package/dist/model/webhookPayloadRFQValidatorWithdrawalChange.js +1 -1
- package/dist/model/webhookPayloadRFQValidatorWithdrawalChangeDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQValidatorWithdrawalChangeDetails.js +1 -1
- package/dist/model/webhookPayloadRFQWithdrawalClaimable.d.ts +1 -1
- package/dist/model/webhookPayloadRFQWithdrawalClaimable.js +1 -1
- package/dist/model/webhookPayloadRFQWithdrawalClaimableDetails.d.ts +1 -1
- package/dist/model/webhookPayloadRFQWithdrawalClaimableDetails.js +1 -1
- package/dist/model/webhookRegistration.d.ts +1 -1
- package/dist/model/webhookRegistration.js +1 -1
- package/dist/model/webhookRegistrationDetails.d.ts +1 -1
- package/dist/model/webhookRegistrationDetails.js +1 -1
- package/dist/model/withdrawFromVault.d.ts +36 -0
- package/dist/model/withdrawFromVault.js +38 -0
- package/dist/model/withdrawalClaimable.d.ts +1 -1
- package/dist/model/withdrawalClaimable.js +1 -1
- package/dist/model/withdrawalRecipientSettlement.d.ts +1 -1
- package/dist/model/withdrawalRecipientSettlement.js +1 -1
- package/dist/model/wrapStETH.d.ts +32 -0
- package/dist/model/wrapStETH.js +33 -0
- package/model/acceptedQuote.ts +1 -1
- package/model/accountEntity.ts +24 -8
- package/model/addLinkedWalletRequest.ts +1 -1
- package/model/apiKey.ts +10 -10
- package/model/approveStETH.ts +43 -0
- package/model/approveWstETH.ts +52 -0
- package/model/asset.ts +1 -1
- package/model/burnShares.ts +43 -0
- package/model/burnStETH.ts +43 -0
- package/model/burnWstETH.ts +43 -0
- package/model/collectERC20FromVault.ts +61 -0
- package/model/consolidateValidators.ts +52 -0
- package/model/consolidateValidatorsErrorResponse.ts +43 -0
- package/model/consolidateValidatorsResponse.ts +35 -0
- package/model/createLidoStakingContractsRequest.ts +46 -0
- package/model/createVaultRequest.ts +55 -0
- package/model/dailyRewardSummaryStats.ts +91 -0
- package/model/errorResponse.ts +1 -1
- package/model/errorWithTransactionResponse.ts +41 -0
- package/model/escrowPayment.ts +1 -1
- package/model/escrowReleased.ts +1 -1
- package/model/ethereumValidatorKey.ts +1 -1
- package/model/ethereumValidatorKeyKeystore.ts +1 -1
- package/model/ethereumValidatorKeyKeystoreCrypto.ts +1 -1
- package/model/ethereumValidatorKeyKeystoreCryptoChecksum.ts +1 -1
- package/model/ethereumValidatorKeyKeystoreCryptoCipher.ts +1 -1
- package/model/ethereumValidatorKeyKeystoreCryptoCipherParams.ts +1 -1
- package/model/ethereumValidatorKeyKeystoreCryptoKdf.ts +1 -1
- package/model/ethereumValidatorKeyKeystoreCryptoKdfParams.ts +1 -1
- package/model/exitEstimateBase.ts +1 -1
- package/model/exitEstimateSeller.ts +1 -1
- package/model/exitProposal.ts +1 -1
- package/model/fundVault.ts +43 -0
- package/model/generateApiKeyRequest.ts +1 -1
- package/model/getLazyOracleReportCallData200Response.ts +44 -0
- package/model/getLazyOracleReportCallData200ResponseDestructuredCalldata.ts +67 -0
- package/model/getLazyOracleReportData200Response.ts +38 -0
- package/model/getLazyOracleReportData200ResponseReportData.ts +43 -0
- package/model/{getSmartContractTransactions200Response.ts → getLidoTransactions200Response.ts} +3 -3
- package/model/getQuarantineInfo200Response.ts +55 -0
- package/model/getStETHPerWstETHRate200Response.ts +34 -0
- package/model/getWithdrawalsResponse.ts +1 -1
- package/model/grantRole.ts +52 -0
- package/model/internalTransaction.ts +1 -1
- package/model/inviteMemberRequest.ts +54 -0
- package/model/lidoContracts.ts +60 -0
- package/model/{smartContractDetailedWhitelistedDepositorsInner.ts → lidoContractsDashboard.ts} +6 -15
- package/model/lidoContractsStakingVault.ts +34 -0
- package/model/lidoStakingContracts.ts +44 -0
- package/model/lidoStakingContractsWithData.ts +60 -0
- package/model/lidoStakingContractsWithDataVaultData.ts +223 -0
- package/model/mintShares.ts +52 -0
- package/model/mintStETH.ts +52 -0
- package/model/mintWstETH.ts +52 -0
- package/model/models.ts +281 -52
- package/model/organizationMember.ts +81 -0
- package/model/organizationNameResponse.ts +37 -0
- package/model/partialTransaction.ts +52 -0
- package/model/presignedExitKey.ts +1 -1
- package/model/presignedExitKeyMessage.ts +1 -1
- package/model/quote.ts +1 -1
- package/model/rFQBidFacilitator.ts +1 -1
- package/model/rFQBids.ts +1 -1
- package/model/rFQDocumentBase.ts +1 -1
- package/model/rFQDocumentBaseUniqueEscrowVault.ts +1 -1
- package/model/rFQDocumentBuyer.ts +1 -1
- package/model/rFQDocumentBuyerAllOfValidators.ts +1 -1
- package/model/rFQDocumentBuyerStatusFilter.ts +1 -1
- package/model/rFQDocumentFacilitator.ts +1 -1
- package/model/rFQDocumentFacilitatorStatusFilter.ts +1 -1
- package/model/rFQDocumentFacilitatorValidatorsInner.ts +1 -1
- package/model/rFQDocumentSeller.ts +1 -1
- package/model/rFQDocumentSellerAllOfValidators.ts +1 -1
- package/model/rFQDocumentSellerStatusFilter.ts +1 -1
- package/model/rFQDocumentStatus.ts +1 -1
- package/model/rFQDocumentUpdate.ts +1 -1
- package/model/rFQUpdatePayload.ts +1 -1
- package/model/rFQWebhookEventType.ts +1 -1
- package/model/rebalanceVaultWithEther.ts +43 -0
- package/model/rebalanceVaultWithShares.ts +43 -0
- package/model/recoverERC20.ts +61 -0
- package/model/renameVaultRequest.ts +37 -0
- package/model/revokeRole.ts +52 -0
- package/model/settlementSteps.ts +1 -1
- package/model/stakeEthRequest.ts +37 -0
- package/model/stakeEthResponse.ts +53 -0
- package/model/stakeEthResponseDestructuredCallDataInner.ts +61 -0
- package/model/stakingRequest.ts +50 -0
- package/model/stakingRequestStatus.ts +24 -0
- package/model/transaction.ts +29 -2
- package/model/triggerValidatorWithdrawals.ts +61 -0
- package/model/unwrapWstETH.ts +43 -0
- package/model/updateLinkedWalletNameRequest.ts +34 -0
- package/model/updateMemberRoleRequest.ts +45 -0
- package/model/updateOrganizationNameRequest.ts +37 -0
- package/model/validateConsolidationRequestsResponse.ts +44 -0
- package/model/validateConsolidationRequestsResponseConsolidationDetailsInner.ts +79 -0
- package/model/validatorDailyReward.ts +109 -0
- package/model/validatorInfo.ts +29 -31
- package/model/validatorKeyHolder.ts +1 -1
- package/model/validatorProvider.ts +22 -0
- package/model/validatorRewardRaw.ts +127 -0
- package/model/validatorRewardsDaily.ts +79 -0
- package/model/{getSmartContractMinedBlocks200Response.ts → validatorRewardsDailyResponse.ts} +8 -17
- package/model/{getSmartContractMEVRewards200Response.ts → validatorRewardsRaw.ts} +15 -9
- package/model/validatorType.ts +1 -1
- package/model/validatorWithdrawal.ts +19 -19
- package/model/vaultCreationStartResponse.ts +32 -0
- package/model/wallet.ts +1 -1
- package/model/webHookLookupAnswer.ts +1 -1
- package/model/webhookPayload.ts +4 -4
- package/model/webhookPayloadRFQAvailable.ts +1 -1
- package/model/webhookPayloadRFQBidAccepted.ts +1 -1
- package/model/webhookPayloadRFQBidAcceptedDetails.ts +1 -1
- package/model/webhookPayloadRFQBidReceived.ts +1 -1
- package/model/webhookPayloadRFQBidReceivedDetails.ts +1 -1
- package/model/webhookPayloadRFQEscrowEvent.ts +1 -1
- package/model/webhookPayloadRFQEscrowEventDetails.ts +1 -1
- package/model/webhookPayloadRFQEscrowReleased.ts +1 -1
- package/model/webhookPayloadRFQEscrowReleasedDetails.ts +1 -1
- package/model/webhookPayloadRFQTransferProposalReceived.ts +1 -1
- package/model/webhookPayloadRFQTransferProposalReceivedDetails.ts +1 -1
- package/model/webhookPayloadRFQValidatorExited.ts +1 -1
- package/model/webhookPayloadRFQValidatorExitedDetails.ts +1 -1
- package/model/webhookPayloadRFQValidatorWithdrawalChange.ts +1 -1
- package/model/webhookPayloadRFQValidatorWithdrawalChangeDetails.ts +1 -1
- package/model/webhookPayloadRFQWithdrawalClaimable.ts +1 -1
- package/model/webhookPayloadRFQWithdrawalClaimableDetails.ts +1 -1
- package/model/webhookRegistration.ts +1 -1
- package/model/webhookRegistrationDetails.ts +1 -1
- package/model/withdrawFromVault.ts +52 -0
- package/model/withdrawalClaimable.ts +1 -1
- package/model/withdrawalRecipientSettlement.ts +1 -1
- package/model/wrapStETH.ts +43 -0
- package/package.json +3 -3
- package/api/validatorMarketplaceFacilitatorApi.ts +0 -360
- package/api/validatorMarketplaceWebhooksApi.ts +0 -351
- package/dist/api/smartContractsApi.d.ts +0 -125
- package/dist/api/validatorMarketplaceBuyersApi.d.ts +0 -95
- package/dist/api/validatorMarketplaceFacilitatorApi.d.ts +0 -80
- package/dist/api/validatorMarketplaceSellersApi.d.ts +0 -122
- package/dist/api/validatorMarketplaceWebhooksApi.d.ts +0 -77
- package/dist/api/validatorMarketplaceWebhooksApi.js +0 -272
- package/dist/model/createRFQRequest.d.ts +0 -26
- package/dist/model/createRFQRequest.js +0 -33
- package/dist/model/getMarketplaceMetadata200Response.js +0 -38
- package/dist/model/getSmartContractMEVRewards200Response.js +0 -43
- package/dist/model/getSmartContractMinedBlocks200Response.js +0 -43
- package/dist/model/listAllRFQsForFacilitator200Response.d.ts +0 -38
- package/dist/model/listAllRFQsForFacilitator200Response.js +0 -43
- package/dist/model/mEVReward.d.ts +0 -45
- package/dist/model/mEVReward.js +0 -83
- package/dist/model/minedBlock.js +0 -48
- package/dist/model/provideEscrowHashForRFQDocumentRequest.d.ts +0 -25
- package/dist/model/provideEscrowHashForRFQDocumentRequest.js +0 -28
- package/dist/model/registerWithdrawalRecipientSettlementRequest.d.ts +0 -25
- package/dist/model/registerWithdrawalRecipientSettlementRequest.js +0 -28
- package/dist/model/smartContract.js +0 -56
- package/dist/model/smartContractDetailed.d.ts +0 -47
- package/dist/model/smartContractDetailed.js +0 -71
- package/dist/model/smartContractDetailedStats.d.ts +0 -72
- package/dist/model/smartContractDetailedStats.js +0 -83
- package/dist/model/smartContractDetailedWhitelistedDepositorsInner.d.ts +0 -27
- package/dist/model/smartContractDetailedWhitelistedDepositorsInner.js +0 -38
- package/dist/model/submittedQuote.d.ts +0 -26
- package/dist/model/submittedQuote.js +0 -33
- package/dist/model/webhookPayloadData.js +0 -41
- package/model/createRFQRequest.ts +0 -37
- package/model/getMarketplaceMetadata200Response.ts +0 -52
- package/model/listAllRFQsForFacilitator200Response.ts +0 -59
- package/model/mEVReward.ts +0 -106
- package/model/minedBlock.ts +0 -61
- package/model/provideEscrowHashForRFQDocumentRequest.ts +0 -31
- package/model/registerWithdrawalRecipientSettlementRequest.ts +0 -31
- package/model/smartContract.ts +0 -67
- package/model/smartContractDetailed.ts +0 -93
- package/model/smartContractDetailedStats.ts +0 -133
- package/model/submittedQuote.ts +0 -37
- package/model/webhookPayloadData.ts +0 -56
|
@@ -0,0 +1,1931 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Northstake
|
|
4
|
+
* Northstake api Operation-level extensions used by the API: - x-roleRequired (array of strings): roles required to call the operation. - x-mfaApiScope (array of strings): MFA API scopes required when the user has MFA enrolled. - x-isProSvmFeature (boolean): when true, the operation is restricted to users whose Cosmos user document has is_pro_svm_user set to true.
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 1.0
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.LidoWriteApi = exports.LidoWriteApiApiKeys = void 0;
|
|
18
|
+
const request_1 = __importDefault(require("request"));
|
|
19
|
+
const models_1 = require("../model/models");
|
|
20
|
+
const models_2 = require("../model/models");
|
|
21
|
+
let defaultBasePath = 'https://api.northstake.dk/v1';
|
|
22
|
+
// ===============================================
|
|
23
|
+
// This file is autogenerated - Please do not edit
|
|
24
|
+
// ===============================================
|
|
25
|
+
var LidoWriteApiApiKeys;
|
|
26
|
+
(function (LidoWriteApiApiKeys) {
|
|
27
|
+
LidoWriteApiApiKeys[LidoWriteApiApiKeys["ApiKeyAuth"] = 0] = "ApiKeyAuth";
|
|
28
|
+
})(LidoWriteApiApiKeys || (exports.LidoWriteApiApiKeys = LidoWriteApiApiKeys = {}));
|
|
29
|
+
class LidoWriteApi {
|
|
30
|
+
constructor(basePathOrUsername, password, basePath) {
|
|
31
|
+
this._basePath = defaultBasePath;
|
|
32
|
+
this._defaultHeaders = {};
|
|
33
|
+
this._useQuerystring = false;
|
|
34
|
+
this.authentications = {
|
|
35
|
+
'default': new models_2.JWTAuth('your_api_key', 'your_private_key'),
|
|
36
|
+
'bearerTokenAuth': new models_2.HttpBearerAuth(),
|
|
37
|
+
'ApiKeyAuth': new models_2.ApiKeyAuth('header', 'x-api-key'),
|
|
38
|
+
};
|
|
39
|
+
this.interceptors = [];
|
|
40
|
+
if (password) {
|
|
41
|
+
if (basePath) {
|
|
42
|
+
this.basePath = basePath;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
if (basePathOrUsername) {
|
|
47
|
+
this.basePath = basePathOrUsername;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
set useQuerystring(value) {
|
|
52
|
+
this._useQuerystring = value;
|
|
53
|
+
}
|
|
54
|
+
set basePath(basePath) {
|
|
55
|
+
this._basePath = basePath;
|
|
56
|
+
}
|
|
57
|
+
set defaultHeaders(defaultHeaders) {
|
|
58
|
+
this._defaultHeaders = defaultHeaders;
|
|
59
|
+
}
|
|
60
|
+
get defaultHeaders() {
|
|
61
|
+
return this._defaultHeaders;
|
|
62
|
+
}
|
|
63
|
+
get basePath() {
|
|
64
|
+
return this._basePath;
|
|
65
|
+
}
|
|
66
|
+
setDefaultAuthentication(auth) {
|
|
67
|
+
this.authentications.default = auth;
|
|
68
|
+
}
|
|
69
|
+
setApiKey(key, value) {
|
|
70
|
+
this.authentications[LidoWriteApiApiKeys[key]].apiKey = value;
|
|
71
|
+
}
|
|
72
|
+
set accessToken(accessToken) {
|
|
73
|
+
this.authentications.bearerTokenAuth.accessToken = accessToken;
|
|
74
|
+
}
|
|
75
|
+
addInterceptor(interceptor) {
|
|
76
|
+
this.interceptors.push(interceptor);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
81
|
+
* @param approveStETH
|
|
82
|
+
*/
|
|
83
|
+
async approveBurnStETH(contractsId, approveStETH, options = { headers: {} }) {
|
|
84
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/approve/burn/steth'
|
|
85
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
86
|
+
let localVarQueryParameters = {};
|
|
87
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
88
|
+
const produces = ['application/json'];
|
|
89
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
90
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
94
|
+
}
|
|
95
|
+
let localVarFormParams = {};
|
|
96
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
97
|
+
if (contractsId === null || contractsId === undefined) {
|
|
98
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling approveBurnStETH.');
|
|
99
|
+
}
|
|
100
|
+
// Verify required parameter 'approveStETH' is not null or undefined
|
|
101
|
+
if (approveStETH === null || approveStETH === undefined) {
|
|
102
|
+
throw new Error('Required parameter "approveStETH" was null or undefined when calling approveBurnStETH.');
|
|
103
|
+
}
|
|
104
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
105
|
+
let localVarUseFormData = false;
|
|
106
|
+
let localVarRequestOptions = {
|
|
107
|
+
method: 'POST',
|
|
108
|
+
qs: localVarQueryParameters,
|
|
109
|
+
headers: localVarHeaderParams,
|
|
110
|
+
uri: localVarPath,
|
|
111
|
+
useQuerystring: this._useQuerystring,
|
|
112
|
+
json: true,
|
|
113
|
+
body: models_1.ObjectSerializer.serialize(approveStETH, "ApproveStETH")
|
|
114
|
+
};
|
|
115
|
+
let authenticationPromise = Promise.resolve();
|
|
116
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
117
|
+
let interceptorPromise = authenticationPromise;
|
|
118
|
+
for (const interceptor of this.interceptors) {
|
|
119
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
120
|
+
}
|
|
121
|
+
return interceptorPromise.then(() => {
|
|
122
|
+
if (Object.keys(localVarFormParams).length) {
|
|
123
|
+
if (localVarUseFormData) {
|
|
124
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return new Promise((resolve, reject) => {
|
|
131
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
132
|
+
if (error) {
|
|
133
|
+
console.error('API call error:', error);
|
|
134
|
+
reject(error);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
138
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
139
|
+
resolve({ body: body, status: response.statusCode });
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
console.error('API response error:', response.statusCode);
|
|
143
|
+
resolve({ body: body, status: response.statusCode });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
*
|
|
152
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
153
|
+
* @param approveWstETH
|
|
154
|
+
*/
|
|
155
|
+
async approveBurnWstETH(contractsId, approveWstETH, options = { headers: {} }) {
|
|
156
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/approve/burn/wsteth'
|
|
157
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
158
|
+
let localVarQueryParameters = {};
|
|
159
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
160
|
+
const produces = ['application/json'];
|
|
161
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
162
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
166
|
+
}
|
|
167
|
+
let localVarFormParams = {};
|
|
168
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
169
|
+
if (contractsId === null || contractsId === undefined) {
|
|
170
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling approveBurnWstETH.');
|
|
171
|
+
}
|
|
172
|
+
// Verify required parameter 'approveWstETH' is not null or undefined
|
|
173
|
+
if (approveWstETH === null || approveWstETH === undefined) {
|
|
174
|
+
throw new Error('Required parameter "approveWstETH" was null or undefined when calling approveBurnWstETH.');
|
|
175
|
+
}
|
|
176
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
177
|
+
let localVarUseFormData = false;
|
|
178
|
+
let localVarRequestOptions = {
|
|
179
|
+
method: 'POST',
|
|
180
|
+
qs: localVarQueryParameters,
|
|
181
|
+
headers: localVarHeaderParams,
|
|
182
|
+
uri: localVarPath,
|
|
183
|
+
useQuerystring: this._useQuerystring,
|
|
184
|
+
json: true,
|
|
185
|
+
body: models_1.ObjectSerializer.serialize(approveWstETH, "ApproveWstETH")
|
|
186
|
+
};
|
|
187
|
+
let authenticationPromise = Promise.resolve();
|
|
188
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
189
|
+
let interceptorPromise = authenticationPromise;
|
|
190
|
+
for (const interceptor of this.interceptors) {
|
|
191
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
192
|
+
}
|
|
193
|
+
return interceptorPromise.then(() => {
|
|
194
|
+
if (Object.keys(localVarFormParams).length) {
|
|
195
|
+
if (localVarUseFormData) {
|
|
196
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return new Promise((resolve, reject) => {
|
|
203
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
204
|
+
if (error) {
|
|
205
|
+
console.error('API call error:', error);
|
|
206
|
+
reject(error);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
210
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
211
|
+
resolve({ body: body, status: response.statusCode });
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
console.error('API response error:', response.statusCode);
|
|
215
|
+
resolve({ body: body, status: response.statusCode });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
*
|
|
224
|
+
* @param approveStETH
|
|
225
|
+
*/
|
|
226
|
+
async approveWrapStETH(approveStETH, options = { headers: {} }) {
|
|
227
|
+
const localVarPath = this.basePath + '/lidov3/approve/wrap/steth';
|
|
228
|
+
let localVarQueryParameters = {};
|
|
229
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
230
|
+
const produces = ['application/json'];
|
|
231
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
232
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
236
|
+
}
|
|
237
|
+
let localVarFormParams = {};
|
|
238
|
+
// Verify required parameter 'approveStETH' is not null or undefined
|
|
239
|
+
if (approveStETH === null || approveStETH === undefined) {
|
|
240
|
+
throw new Error('Required parameter "approveStETH" was null or undefined when calling approveWrapStETH.');
|
|
241
|
+
}
|
|
242
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
243
|
+
let localVarUseFormData = false;
|
|
244
|
+
let localVarRequestOptions = {
|
|
245
|
+
method: 'POST',
|
|
246
|
+
qs: localVarQueryParameters,
|
|
247
|
+
headers: localVarHeaderParams,
|
|
248
|
+
uri: localVarPath,
|
|
249
|
+
useQuerystring: this._useQuerystring,
|
|
250
|
+
json: true,
|
|
251
|
+
body: models_1.ObjectSerializer.serialize(approveStETH, "ApproveStETH")
|
|
252
|
+
};
|
|
253
|
+
let authenticationPromise = Promise.resolve();
|
|
254
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
255
|
+
let interceptorPromise = authenticationPromise;
|
|
256
|
+
for (const interceptor of this.interceptors) {
|
|
257
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
258
|
+
}
|
|
259
|
+
return interceptorPromise.then(() => {
|
|
260
|
+
if (Object.keys(localVarFormParams).length) {
|
|
261
|
+
if (localVarUseFormData) {
|
|
262
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return new Promise((resolve, reject) => {
|
|
269
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
270
|
+
if (error) {
|
|
271
|
+
console.error('API call error:', error);
|
|
272
|
+
reject(error);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
276
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
277
|
+
resolve({ body: body, status: response.statusCode });
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
console.error('API response error:', response.statusCode);
|
|
281
|
+
resolve({ body: body, status: response.statusCode });
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
*
|
|
290
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
291
|
+
* @param burnShares
|
|
292
|
+
*/
|
|
293
|
+
async burnShares(contractsId, burnShares, options = { headers: {} }) {
|
|
294
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/burn/shares'
|
|
295
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
296
|
+
let localVarQueryParameters = {};
|
|
297
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
298
|
+
const produces = ['application/json'];
|
|
299
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
300
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
304
|
+
}
|
|
305
|
+
let localVarFormParams = {};
|
|
306
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
307
|
+
if (contractsId === null || contractsId === undefined) {
|
|
308
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling burnShares.');
|
|
309
|
+
}
|
|
310
|
+
// Verify required parameter 'burnShares' is not null or undefined
|
|
311
|
+
if (burnShares === null || burnShares === undefined) {
|
|
312
|
+
throw new Error('Required parameter "burnShares" was null or undefined when calling burnShares.');
|
|
313
|
+
}
|
|
314
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
315
|
+
let localVarUseFormData = false;
|
|
316
|
+
let localVarRequestOptions = {
|
|
317
|
+
method: 'POST',
|
|
318
|
+
qs: localVarQueryParameters,
|
|
319
|
+
headers: localVarHeaderParams,
|
|
320
|
+
uri: localVarPath,
|
|
321
|
+
useQuerystring: this._useQuerystring,
|
|
322
|
+
json: true,
|
|
323
|
+
body: models_1.ObjectSerializer.serialize(burnShares, "BurnShares")
|
|
324
|
+
};
|
|
325
|
+
let authenticationPromise = Promise.resolve();
|
|
326
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
327
|
+
let interceptorPromise = authenticationPromise;
|
|
328
|
+
for (const interceptor of this.interceptors) {
|
|
329
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
330
|
+
}
|
|
331
|
+
return interceptorPromise.then(() => {
|
|
332
|
+
if (Object.keys(localVarFormParams).length) {
|
|
333
|
+
if (localVarUseFormData) {
|
|
334
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return new Promise((resolve, reject) => {
|
|
341
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
342
|
+
if (error) {
|
|
343
|
+
console.error('API call error:', error);
|
|
344
|
+
reject(error);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
348
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
349
|
+
resolve({ body: body, status: response.statusCode });
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
console.error('API response error:', response.statusCode);
|
|
353
|
+
resolve({ body: body, status: response.statusCode });
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
*
|
|
362
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
363
|
+
* @param burnStETH
|
|
364
|
+
*/
|
|
365
|
+
async burnStETH(contractsId, burnStETH, options = { headers: {} }) {
|
|
366
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/burn/steth'
|
|
367
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
368
|
+
let localVarQueryParameters = {};
|
|
369
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
370
|
+
const produces = ['application/json'];
|
|
371
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
372
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
376
|
+
}
|
|
377
|
+
let localVarFormParams = {};
|
|
378
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
379
|
+
if (contractsId === null || contractsId === undefined) {
|
|
380
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling burnStETH.');
|
|
381
|
+
}
|
|
382
|
+
// Verify required parameter 'burnStETH' is not null or undefined
|
|
383
|
+
if (burnStETH === null || burnStETH === undefined) {
|
|
384
|
+
throw new Error('Required parameter "burnStETH" was null or undefined when calling burnStETH.');
|
|
385
|
+
}
|
|
386
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
387
|
+
let localVarUseFormData = false;
|
|
388
|
+
let localVarRequestOptions = {
|
|
389
|
+
method: 'POST',
|
|
390
|
+
qs: localVarQueryParameters,
|
|
391
|
+
headers: localVarHeaderParams,
|
|
392
|
+
uri: localVarPath,
|
|
393
|
+
useQuerystring: this._useQuerystring,
|
|
394
|
+
json: true,
|
|
395
|
+
body: models_1.ObjectSerializer.serialize(burnStETH, "BurnStETH")
|
|
396
|
+
};
|
|
397
|
+
let authenticationPromise = Promise.resolve();
|
|
398
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
399
|
+
let interceptorPromise = authenticationPromise;
|
|
400
|
+
for (const interceptor of this.interceptors) {
|
|
401
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
402
|
+
}
|
|
403
|
+
return interceptorPromise.then(() => {
|
|
404
|
+
if (Object.keys(localVarFormParams).length) {
|
|
405
|
+
if (localVarUseFormData) {
|
|
406
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return new Promise((resolve, reject) => {
|
|
413
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
414
|
+
if (error) {
|
|
415
|
+
console.error('API call error:', error);
|
|
416
|
+
reject(error);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
420
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
421
|
+
resolve({ body: body, status: response.statusCode });
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
console.error('API response error:', response.statusCode);
|
|
425
|
+
resolve({ body: body, status: response.statusCode });
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
*
|
|
434
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
435
|
+
* @param burnWstETH
|
|
436
|
+
*/
|
|
437
|
+
async burnWstETH(contractsId, burnWstETH, options = { headers: {} }) {
|
|
438
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/burn/wsteth'
|
|
439
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
440
|
+
let localVarQueryParameters = {};
|
|
441
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
442
|
+
const produces = ['application/json'];
|
|
443
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
444
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
448
|
+
}
|
|
449
|
+
let localVarFormParams = {};
|
|
450
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
451
|
+
if (contractsId === null || contractsId === undefined) {
|
|
452
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling burnWstETH.');
|
|
453
|
+
}
|
|
454
|
+
// Verify required parameter 'burnWstETH' is not null or undefined
|
|
455
|
+
if (burnWstETH === null || burnWstETH === undefined) {
|
|
456
|
+
throw new Error('Required parameter "burnWstETH" was null or undefined when calling burnWstETH.');
|
|
457
|
+
}
|
|
458
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
459
|
+
let localVarUseFormData = false;
|
|
460
|
+
let localVarRequestOptions = {
|
|
461
|
+
method: 'POST',
|
|
462
|
+
qs: localVarQueryParameters,
|
|
463
|
+
headers: localVarHeaderParams,
|
|
464
|
+
uri: localVarPath,
|
|
465
|
+
useQuerystring: this._useQuerystring,
|
|
466
|
+
json: true,
|
|
467
|
+
body: models_1.ObjectSerializer.serialize(burnWstETH, "BurnWstETH")
|
|
468
|
+
};
|
|
469
|
+
let authenticationPromise = Promise.resolve();
|
|
470
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
471
|
+
let interceptorPromise = authenticationPromise;
|
|
472
|
+
for (const interceptor of this.interceptors) {
|
|
473
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
474
|
+
}
|
|
475
|
+
return interceptorPromise.then(() => {
|
|
476
|
+
if (Object.keys(localVarFormParams).length) {
|
|
477
|
+
if (localVarUseFormData) {
|
|
478
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return new Promise((resolve, reject) => {
|
|
485
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
486
|
+
if (error) {
|
|
487
|
+
console.error('API call error:', error);
|
|
488
|
+
reject(error);
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
492
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
493
|
+
resolve({ body: body, status: response.statusCode });
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
console.error('API response error:', response.statusCode);
|
|
497
|
+
resolve({ body: body, status: response.statusCode });
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
*
|
|
506
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
507
|
+
* @param collectERC20FromVault
|
|
508
|
+
*/
|
|
509
|
+
async collectERC20FromVault(contractsId, collectERC20FromVault, options = { headers: {} }) {
|
|
510
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/collect-erc20'
|
|
511
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
512
|
+
let localVarQueryParameters = {};
|
|
513
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
514
|
+
const produces = ['application/json'];
|
|
515
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
516
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
520
|
+
}
|
|
521
|
+
let localVarFormParams = {};
|
|
522
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
523
|
+
if (contractsId === null || contractsId === undefined) {
|
|
524
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling collectERC20FromVault.');
|
|
525
|
+
}
|
|
526
|
+
// Verify required parameter 'collectERC20FromVault' is not null or undefined
|
|
527
|
+
if (collectERC20FromVault === null || collectERC20FromVault === undefined) {
|
|
528
|
+
throw new Error('Required parameter "collectERC20FromVault" was null or undefined when calling collectERC20FromVault.');
|
|
529
|
+
}
|
|
530
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
531
|
+
let localVarUseFormData = false;
|
|
532
|
+
let localVarRequestOptions = {
|
|
533
|
+
method: 'POST',
|
|
534
|
+
qs: localVarQueryParameters,
|
|
535
|
+
headers: localVarHeaderParams,
|
|
536
|
+
uri: localVarPath,
|
|
537
|
+
useQuerystring: this._useQuerystring,
|
|
538
|
+
json: true,
|
|
539
|
+
body: models_1.ObjectSerializer.serialize(collectERC20FromVault, "CollectERC20FromVault")
|
|
540
|
+
};
|
|
541
|
+
let authenticationPromise = Promise.resolve();
|
|
542
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
543
|
+
let interceptorPromise = authenticationPromise;
|
|
544
|
+
for (const interceptor of this.interceptors) {
|
|
545
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
546
|
+
}
|
|
547
|
+
return interceptorPromise.then(() => {
|
|
548
|
+
if (Object.keys(localVarFormParams).length) {
|
|
549
|
+
if (localVarUseFormData) {
|
|
550
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return new Promise((resolve, reject) => {
|
|
557
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
558
|
+
if (error) {
|
|
559
|
+
console.error('API call error:', error);
|
|
560
|
+
reject(error);
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
564
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
565
|
+
resolve({ body: body, status: response.statusCode });
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
console.error('API response error:', response.statusCode);
|
|
569
|
+
resolve({ body: body, status: response.statusCode });
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
*
|
|
578
|
+
* @summary Create EIP-7251 consolidation requests for validators
|
|
579
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
580
|
+
* @param consolidateValidators
|
|
581
|
+
*/
|
|
582
|
+
async consolidateValidators(contractsId, consolidateValidators, options = { headers: {} }) {
|
|
583
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/consolidate-validators'
|
|
584
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
585
|
+
let localVarQueryParameters = {};
|
|
586
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
587
|
+
const produces = ['application/json'];
|
|
588
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
589
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
593
|
+
}
|
|
594
|
+
let localVarFormParams = {};
|
|
595
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
596
|
+
if (contractsId === null || contractsId === undefined) {
|
|
597
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling consolidateValidators.');
|
|
598
|
+
}
|
|
599
|
+
// Verify required parameter 'consolidateValidators' is not null or undefined
|
|
600
|
+
if (consolidateValidators === null || consolidateValidators === undefined) {
|
|
601
|
+
throw new Error('Required parameter "consolidateValidators" was null or undefined when calling consolidateValidators.');
|
|
602
|
+
}
|
|
603
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
604
|
+
let localVarUseFormData = false;
|
|
605
|
+
let localVarRequestOptions = {
|
|
606
|
+
method: 'POST',
|
|
607
|
+
qs: localVarQueryParameters,
|
|
608
|
+
headers: localVarHeaderParams,
|
|
609
|
+
uri: localVarPath,
|
|
610
|
+
useQuerystring: this._useQuerystring,
|
|
611
|
+
json: true,
|
|
612
|
+
body: models_1.ObjectSerializer.serialize(consolidateValidators, "ConsolidateValidators")
|
|
613
|
+
};
|
|
614
|
+
let authenticationPromise = Promise.resolve();
|
|
615
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
616
|
+
let interceptorPromise = authenticationPromise;
|
|
617
|
+
for (const interceptor of this.interceptors) {
|
|
618
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
619
|
+
}
|
|
620
|
+
return interceptorPromise.then(() => {
|
|
621
|
+
if (Object.keys(localVarFormParams).length) {
|
|
622
|
+
if (localVarUseFormData) {
|
|
623
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
return new Promise((resolve, reject) => {
|
|
630
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
631
|
+
if (error) {
|
|
632
|
+
console.error('API call error:', error);
|
|
633
|
+
reject(error);
|
|
634
|
+
}
|
|
635
|
+
else {
|
|
636
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
637
|
+
body = models_1.ObjectSerializer.deserialize(body, "ConsolidateValidatorsResponse");
|
|
638
|
+
resolve({ body: body, status: response.statusCode });
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
console.error('API response error:', response.statusCode);
|
|
642
|
+
resolve({ body: body, status: response.statusCode });
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
*
|
|
651
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
652
|
+
* @param fundVault
|
|
653
|
+
*/
|
|
654
|
+
async fundVault(contractsId, fundVault, options = { headers: {} }) {
|
|
655
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/fund'
|
|
656
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
657
|
+
let localVarQueryParameters = {};
|
|
658
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
659
|
+
const produces = ['application/json'];
|
|
660
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
661
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
665
|
+
}
|
|
666
|
+
let localVarFormParams = {};
|
|
667
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
668
|
+
if (contractsId === null || contractsId === undefined) {
|
|
669
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling fundVault.');
|
|
670
|
+
}
|
|
671
|
+
// Verify required parameter 'fundVault' is not null or undefined
|
|
672
|
+
if (fundVault === null || fundVault === undefined) {
|
|
673
|
+
throw new Error('Required parameter "fundVault" was null or undefined when calling fundVault.');
|
|
674
|
+
}
|
|
675
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
676
|
+
let localVarUseFormData = false;
|
|
677
|
+
let localVarRequestOptions = {
|
|
678
|
+
method: 'POST',
|
|
679
|
+
qs: localVarQueryParameters,
|
|
680
|
+
headers: localVarHeaderParams,
|
|
681
|
+
uri: localVarPath,
|
|
682
|
+
useQuerystring: this._useQuerystring,
|
|
683
|
+
json: true,
|
|
684
|
+
body: models_1.ObjectSerializer.serialize(fundVault, "FundVault")
|
|
685
|
+
};
|
|
686
|
+
let authenticationPromise = Promise.resolve();
|
|
687
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
688
|
+
let interceptorPromise = authenticationPromise;
|
|
689
|
+
for (const interceptor of this.interceptors) {
|
|
690
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
691
|
+
}
|
|
692
|
+
return interceptorPromise.then(() => {
|
|
693
|
+
if (Object.keys(localVarFormParams).length) {
|
|
694
|
+
if (localVarUseFormData) {
|
|
695
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return new Promise((resolve, reject) => {
|
|
702
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
703
|
+
if (error) {
|
|
704
|
+
console.error('API call error:', error);
|
|
705
|
+
reject(error);
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
709
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
710
|
+
resolve({ body: body, status: response.statusCode });
|
|
711
|
+
}
|
|
712
|
+
else {
|
|
713
|
+
console.error('API response error:', response.statusCode);
|
|
714
|
+
resolve({ body: body, status: response.statusCode });
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
});
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
*
|
|
723
|
+
* @summary Update the lazy oracle report for a specific Lido staking contract set, returns the calldata needed to submit the updateVaultData transaction to the lazy oracle contract.
|
|
724
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
725
|
+
*/
|
|
726
|
+
async getLazyOracleReportCallData(contractsId, options = { headers: {} }) {
|
|
727
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/update-vault-report'
|
|
728
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
729
|
+
let localVarQueryParameters = {};
|
|
730
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
731
|
+
const produces = ['application/json'];
|
|
732
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
733
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
737
|
+
}
|
|
738
|
+
let localVarFormParams = {};
|
|
739
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
740
|
+
if (contractsId === null || contractsId === undefined) {
|
|
741
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling getLazyOracleReportCallData.');
|
|
742
|
+
}
|
|
743
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
744
|
+
let localVarUseFormData = false;
|
|
745
|
+
let localVarRequestOptions = {
|
|
746
|
+
method: 'POST',
|
|
747
|
+
qs: localVarQueryParameters,
|
|
748
|
+
headers: localVarHeaderParams,
|
|
749
|
+
uri: localVarPath,
|
|
750
|
+
useQuerystring: this._useQuerystring,
|
|
751
|
+
json: true,
|
|
752
|
+
};
|
|
753
|
+
let authenticationPromise = Promise.resolve();
|
|
754
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
755
|
+
let interceptorPromise = authenticationPromise;
|
|
756
|
+
for (const interceptor of this.interceptors) {
|
|
757
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
758
|
+
}
|
|
759
|
+
return interceptorPromise.then(() => {
|
|
760
|
+
if (Object.keys(localVarFormParams).length) {
|
|
761
|
+
if (localVarUseFormData) {
|
|
762
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
763
|
+
}
|
|
764
|
+
else {
|
|
765
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
return new Promise((resolve, reject) => {
|
|
769
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
770
|
+
if (error) {
|
|
771
|
+
console.error('API call error:', error);
|
|
772
|
+
reject(error);
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
776
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetLazyOracleReportCallData200Response");
|
|
777
|
+
resolve({ body: body, status: response.statusCode });
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
console.error('API response error:', response.statusCode);
|
|
781
|
+
resolve({ body: body, status: response.statusCode });
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
*
|
|
790
|
+
* @summary Get details for a specific staking request
|
|
791
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
792
|
+
* @param stakingRequestId The staking request ID
|
|
793
|
+
*/
|
|
794
|
+
async getStakingRequest(contractsId, stakingRequestId, options = { headers: {} }) {
|
|
795
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/staking-requests/{stakingRequestId}'
|
|
796
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)))
|
|
797
|
+
.replace('{' + 'stakingRequestId' + '}', encodeURIComponent(String(stakingRequestId)));
|
|
798
|
+
let localVarQueryParameters = {};
|
|
799
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
800
|
+
const produces = ['application/json'];
|
|
801
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
802
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
803
|
+
}
|
|
804
|
+
else {
|
|
805
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
806
|
+
}
|
|
807
|
+
let localVarFormParams = {};
|
|
808
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
809
|
+
if (contractsId === null || contractsId === undefined) {
|
|
810
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling getStakingRequest.');
|
|
811
|
+
}
|
|
812
|
+
// Verify required parameter 'stakingRequestId' is not null or undefined
|
|
813
|
+
if (stakingRequestId === null || stakingRequestId === undefined) {
|
|
814
|
+
throw new Error('Required parameter "stakingRequestId" was null or undefined when calling getStakingRequest.');
|
|
815
|
+
}
|
|
816
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
817
|
+
let localVarUseFormData = false;
|
|
818
|
+
let localVarRequestOptions = {
|
|
819
|
+
method: 'GET',
|
|
820
|
+
qs: localVarQueryParameters,
|
|
821
|
+
headers: localVarHeaderParams,
|
|
822
|
+
uri: localVarPath,
|
|
823
|
+
useQuerystring: this._useQuerystring,
|
|
824
|
+
json: true,
|
|
825
|
+
};
|
|
826
|
+
let authenticationPromise = Promise.resolve();
|
|
827
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
828
|
+
let interceptorPromise = authenticationPromise;
|
|
829
|
+
for (const interceptor of this.interceptors) {
|
|
830
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
831
|
+
}
|
|
832
|
+
return interceptorPromise.then(() => {
|
|
833
|
+
if (Object.keys(localVarFormParams).length) {
|
|
834
|
+
if (localVarUseFormData) {
|
|
835
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
836
|
+
}
|
|
837
|
+
else {
|
|
838
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
return new Promise((resolve, reject) => {
|
|
842
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
843
|
+
if (error) {
|
|
844
|
+
console.error('API call error:', error);
|
|
845
|
+
reject(error);
|
|
846
|
+
}
|
|
847
|
+
else {
|
|
848
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
849
|
+
body = models_1.ObjectSerializer.deserialize(body, "StakingRequest");
|
|
850
|
+
resolve({ body: body, status: response.statusCode });
|
|
851
|
+
}
|
|
852
|
+
else {
|
|
853
|
+
console.error('API response error:', response.statusCode);
|
|
854
|
+
resolve({ body: body, status: response.statusCode });
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
});
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
*
|
|
863
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
864
|
+
* @param grantRole
|
|
865
|
+
*/
|
|
866
|
+
async grantRole(contractsId, grantRole, options = { headers: {} }) {
|
|
867
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/grant-role'
|
|
868
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
869
|
+
let localVarQueryParameters = {};
|
|
870
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
871
|
+
const produces = ['application/json'];
|
|
872
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
873
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
874
|
+
}
|
|
875
|
+
else {
|
|
876
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
877
|
+
}
|
|
878
|
+
let localVarFormParams = {};
|
|
879
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
880
|
+
if (contractsId === null || contractsId === undefined) {
|
|
881
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling grantRole.');
|
|
882
|
+
}
|
|
883
|
+
// Verify required parameter 'grantRole' is not null or undefined
|
|
884
|
+
if (grantRole === null || grantRole === undefined) {
|
|
885
|
+
throw new Error('Required parameter "grantRole" was null or undefined when calling grantRole.');
|
|
886
|
+
}
|
|
887
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
888
|
+
let localVarUseFormData = false;
|
|
889
|
+
let localVarRequestOptions = {
|
|
890
|
+
method: 'POST',
|
|
891
|
+
qs: localVarQueryParameters,
|
|
892
|
+
headers: localVarHeaderParams,
|
|
893
|
+
uri: localVarPath,
|
|
894
|
+
useQuerystring: this._useQuerystring,
|
|
895
|
+
json: true,
|
|
896
|
+
body: models_1.ObjectSerializer.serialize(grantRole, "GrantRole")
|
|
897
|
+
};
|
|
898
|
+
let authenticationPromise = Promise.resolve();
|
|
899
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
900
|
+
let interceptorPromise = authenticationPromise;
|
|
901
|
+
for (const interceptor of this.interceptors) {
|
|
902
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
903
|
+
}
|
|
904
|
+
return interceptorPromise.then(() => {
|
|
905
|
+
if (Object.keys(localVarFormParams).length) {
|
|
906
|
+
if (localVarUseFormData) {
|
|
907
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
908
|
+
}
|
|
909
|
+
else {
|
|
910
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
return new Promise((resolve, reject) => {
|
|
914
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
915
|
+
if (error) {
|
|
916
|
+
console.error('API call error:', error);
|
|
917
|
+
reject(error);
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
921
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
922
|
+
resolve({ body: body, status: response.statusCode });
|
|
923
|
+
}
|
|
924
|
+
else {
|
|
925
|
+
console.error('API response error:', response.statusCode);
|
|
926
|
+
resolve({ body: body, status: response.statusCode });
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
});
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
*
|
|
935
|
+
* @summary List staking request IDs for a specific Lido staking contract set
|
|
936
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
937
|
+
* @param status
|
|
938
|
+
*/
|
|
939
|
+
async listStakingRequests(contractsId, status, options = { headers: {} }) {
|
|
940
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/staking-requests'
|
|
941
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
942
|
+
let localVarQueryParameters = {};
|
|
943
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
944
|
+
const produces = ['application/json'];
|
|
945
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
946
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
947
|
+
}
|
|
948
|
+
else {
|
|
949
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
950
|
+
}
|
|
951
|
+
let localVarFormParams = {};
|
|
952
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
953
|
+
if (contractsId === null || contractsId === undefined) {
|
|
954
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling listStakingRequests.');
|
|
955
|
+
}
|
|
956
|
+
if (status !== undefined) {
|
|
957
|
+
localVarQueryParameters['status'] = models_1.ObjectSerializer.serialize(status, "'pending' | 'completed' | 'failed'");
|
|
958
|
+
}
|
|
959
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
960
|
+
let localVarUseFormData = false;
|
|
961
|
+
let localVarRequestOptions = {
|
|
962
|
+
method: 'GET',
|
|
963
|
+
qs: localVarQueryParameters,
|
|
964
|
+
headers: localVarHeaderParams,
|
|
965
|
+
uri: localVarPath,
|
|
966
|
+
useQuerystring: this._useQuerystring,
|
|
967
|
+
json: true,
|
|
968
|
+
};
|
|
969
|
+
let authenticationPromise = Promise.resolve();
|
|
970
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
971
|
+
let interceptorPromise = authenticationPromise;
|
|
972
|
+
for (const interceptor of this.interceptors) {
|
|
973
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
974
|
+
}
|
|
975
|
+
return interceptorPromise.then(() => {
|
|
976
|
+
if (Object.keys(localVarFormParams).length) {
|
|
977
|
+
if (localVarUseFormData) {
|
|
978
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
return new Promise((resolve, reject) => {
|
|
985
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
986
|
+
if (error) {
|
|
987
|
+
console.error('API call error:', error);
|
|
988
|
+
reject(error);
|
|
989
|
+
}
|
|
990
|
+
else {
|
|
991
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
992
|
+
body = models_1.ObjectSerializer.deserialize(body, "Array<string>");
|
|
993
|
+
resolve({ body: body, status: response.statusCode });
|
|
994
|
+
}
|
|
995
|
+
else {
|
|
996
|
+
console.error('API response error:', response.statusCode);
|
|
997
|
+
resolve({ body: body, status: response.statusCode });
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
*
|
|
1006
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1007
|
+
* @param mintShares
|
|
1008
|
+
*/
|
|
1009
|
+
async mintShares(contractsId, mintShares, options = { headers: {} }) {
|
|
1010
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/mint/shares'
|
|
1011
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1012
|
+
let localVarQueryParameters = {};
|
|
1013
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1014
|
+
const produces = ['application/json'];
|
|
1015
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1016
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1020
|
+
}
|
|
1021
|
+
let localVarFormParams = {};
|
|
1022
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1023
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1024
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling mintShares.');
|
|
1025
|
+
}
|
|
1026
|
+
// Verify required parameter 'mintShares' is not null or undefined
|
|
1027
|
+
if (mintShares === null || mintShares === undefined) {
|
|
1028
|
+
throw new Error('Required parameter "mintShares" was null or undefined when calling mintShares.');
|
|
1029
|
+
}
|
|
1030
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1031
|
+
let localVarUseFormData = false;
|
|
1032
|
+
let localVarRequestOptions = {
|
|
1033
|
+
method: 'POST',
|
|
1034
|
+
qs: localVarQueryParameters,
|
|
1035
|
+
headers: localVarHeaderParams,
|
|
1036
|
+
uri: localVarPath,
|
|
1037
|
+
useQuerystring: this._useQuerystring,
|
|
1038
|
+
json: true,
|
|
1039
|
+
body: models_1.ObjectSerializer.serialize(mintShares, "MintShares")
|
|
1040
|
+
};
|
|
1041
|
+
let authenticationPromise = Promise.resolve();
|
|
1042
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1043
|
+
let interceptorPromise = authenticationPromise;
|
|
1044
|
+
for (const interceptor of this.interceptors) {
|
|
1045
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1046
|
+
}
|
|
1047
|
+
return interceptorPromise.then(() => {
|
|
1048
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1049
|
+
if (localVarUseFormData) {
|
|
1050
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1051
|
+
}
|
|
1052
|
+
else {
|
|
1053
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
return new Promise((resolve, reject) => {
|
|
1057
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1058
|
+
if (error) {
|
|
1059
|
+
console.error('API call error:', error);
|
|
1060
|
+
reject(error);
|
|
1061
|
+
}
|
|
1062
|
+
else {
|
|
1063
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1064
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1065
|
+
resolve({ body: body, status: response.statusCode });
|
|
1066
|
+
}
|
|
1067
|
+
else {
|
|
1068
|
+
console.error('API response error:', response.statusCode);
|
|
1069
|
+
resolve({ body: body, status: response.statusCode });
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
});
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
*
|
|
1078
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1079
|
+
* @param mintStETH
|
|
1080
|
+
*/
|
|
1081
|
+
async mintStETH(contractsId, mintStETH, options = { headers: {} }) {
|
|
1082
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/mint/steth'
|
|
1083
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1084
|
+
let localVarQueryParameters = {};
|
|
1085
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1086
|
+
const produces = ['application/json'];
|
|
1087
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1088
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1091
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1092
|
+
}
|
|
1093
|
+
let localVarFormParams = {};
|
|
1094
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1095
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1096
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling mintStETH.');
|
|
1097
|
+
}
|
|
1098
|
+
// Verify required parameter 'mintStETH' is not null or undefined
|
|
1099
|
+
if (mintStETH === null || mintStETH === undefined) {
|
|
1100
|
+
throw new Error('Required parameter "mintStETH" was null or undefined when calling mintStETH.');
|
|
1101
|
+
}
|
|
1102
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1103
|
+
let localVarUseFormData = false;
|
|
1104
|
+
let localVarRequestOptions = {
|
|
1105
|
+
method: 'POST',
|
|
1106
|
+
qs: localVarQueryParameters,
|
|
1107
|
+
headers: localVarHeaderParams,
|
|
1108
|
+
uri: localVarPath,
|
|
1109
|
+
useQuerystring: this._useQuerystring,
|
|
1110
|
+
json: true,
|
|
1111
|
+
body: models_1.ObjectSerializer.serialize(mintStETH, "MintStETH")
|
|
1112
|
+
};
|
|
1113
|
+
let authenticationPromise = Promise.resolve();
|
|
1114
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1115
|
+
let interceptorPromise = authenticationPromise;
|
|
1116
|
+
for (const interceptor of this.interceptors) {
|
|
1117
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1118
|
+
}
|
|
1119
|
+
return interceptorPromise.then(() => {
|
|
1120
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1121
|
+
if (localVarUseFormData) {
|
|
1122
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1123
|
+
}
|
|
1124
|
+
else {
|
|
1125
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
return new Promise((resolve, reject) => {
|
|
1129
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1130
|
+
if (error) {
|
|
1131
|
+
console.error('API call error:', error);
|
|
1132
|
+
reject(error);
|
|
1133
|
+
}
|
|
1134
|
+
else {
|
|
1135
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1136
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1137
|
+
resolve({ body: body, status: response.statusCode });
|
|
1138
|
+
}
|
|
1139
|
+
else {
|
|
1140
|
+
console.error('API response error:', response.statusCode);
|
|
1141
|
+
resolve({ body: body, status: response.statusCode });
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
*
|
|
1150
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1151
|
+
* @param mintWstETH
|
|
1152
|
+
*/
|
|
1153
|
+
async mintWstETH(contractsId, mintWstETH, options = { headers: {} }) {
|
|
1154
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/mint/wsteth'
|
|
1155
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1156
|
+
let localVarQueryParameters = {};
|
|
1157
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1158
|
+
const produces = ['application/json'];
|
|
1159
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1160
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1161
|
+
}
|
|
1162
|
+
else {
|
|
1163
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1164
|
+
}
|
|
1165
|
+
let localVarFormParams = {};
|
|
1166
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1167
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1168
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling mintWstETH.');
|
|
1169
|
+
}
|
|
1170
|
+
// Verify required parameter 'mintWstETH' is not null or undefined
|
|
1171
|
+
if (mintWstETH === null || mintWstETH === undefined) {
|
|
1172
|
+
throw new Error('Required parameter "mintWstETH" was null or undefined when calling mintWstETH.');
|
|
1173
|
+
}
|
|
1174
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1175
|
+
let localVarUseFormData = false;
|
|
1176
|
+
let localVarRequestOptions = {
|
|
1177
|
+
method: 'POST',
|
|
1178
|
+
qs: localVarQueryParameters,
|
|
1179
|
+
headers: localVarHeaderParams,
|
|
1180
|
+
uri: localVarPath,
|
|
1181
|
+
useQuerystring: this._useQuerystring,
|
|
1182
|
+
json: true,
|
|
1183
|
+
body: models_1.ObjectSerializer.serialize(mintWstETH, "MintWstETH")
|
|
1184
|
+
};
|
|
1185
|
+
let authenticationPromise = Promise.resolve();
|
|
1186
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1187
|
+
let interceptorPromise = authenticationPromise;
|
|
1188
|
+
for (const interceptor of this.interceptors) {
|
|
1189
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1190
|
+
}
|
|
1191
|
+
return interceptorPromise.then(() => {
|
|
1192
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1193
|
+
if (localVarUseFormData) {
|
|
1194
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1195
|
+
}
|
|
1196
|
+
else {
|
|
1197
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return new Promise((resolve, reject) => {
|
|
1201
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1202
|
+
if (error) {
|
|
1203
|
+
console.error('API call error:', error);
|
|
1204
|
+
reject(error);
|
|
1205
|
+
}
|
|
1206
|
+
else {
|
|
1207
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1208
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1209
|
+
resolve({ body: body, status: response.statusCode });
|
|
1210
|
+
}
|
|
1211
|
+
else {
|
|
1212
|
+
console.error('API response error:', response.statusCode);
|
|
1213
|
+
resolve({ body: body, status: response.statusCode });
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
});
|
|
1217
|
+
});
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
*
|
|
1222
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1223
|
+
* @param rebalanceVaultWithEther
|
|
1224
|
+
*/
|
|
1225
|
+
async rebalanceVaultWithEther(contractsId, rebalanceVaultWithEther, options = { headers: {} }) {
|
|
1226
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/rebalance/ether'
|
|
1227
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1228
|
+
let localVarQueryParameters = {};
|
|
1229
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1230
|
+
const produces = ['application/json'];
|
|
1231
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1232
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1233
|
+
}
|
|
1234
|
+
else {
|
|
1235
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1236
|
+
}
|
|
1237
|
+
let localVarFormParams = {};
|
|
1238
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1239
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1240
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling rebalanceVaultWithEther.');
|
|
1241
|
+
}
|
|
1242
|
+
// Verify required parameter 'rebalanceVaultWithEther' is not null or undefined
|
|
1243
|
+
if (rebalanceVaultWithEther === null || rebalanceVaultWithEther === undefined) {
|
|
1244
|
+
throw new Error('Required parameter "rebalanceVaultWithEther" was null or undefined when calling rebalanceVaultWithEther.');
|
|
1245
|
+
}
|
|
1246
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1247
|
+
let localVarUseFormData = false;
|
|
1248
|
+
let localVarRequestOptions = {
|
|
1249
|
+
method: 'POST',
|
|
1250
|
+
qs: localVarQueryParameters,
|
|
1251
|
+
headers: localVarHeaderParams,
|
|
1252
|
+
uri: localVarPath,
|
|
1253
|
+
useQuerystring: this._useQuerystring,
|
|
1254
|
+
json: true,
|
|
1255
|
+
body: models_1.ObjectSerializer.serialize(rebalanceVaultWithEther, "RebalanceVaultWithEther")
|
|
1256
|
+
};
|
|
1257
|
+
let authenticationPromise = Promise.resolve();
|
|
1258
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1259
|
+
let interceptorPromise = authenticationPromise;
|
|
1260
|
+
for (const interceptor of this.interceptors) {
|
|
1261
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1262
|
+
}
|
|
1263
|
+
return interceptorPromise.then(() => {
|
|
1264
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1265
|
+
if (localVarUseFormData) {
|
|
1266
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1267
|
+
}
|
|
1268
|
+
else {
|
|
1269
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
return new Promise((resolve, reject) => {
|
|
1273
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1274
|
+
if (error) {
|
|
1275
|
+
console.error('API call error:', error);
|
|
1276
|
+
reject(error);
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1280
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1281
|
+
resolve({ body: body, status: response.statusCode });
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
console.error('API response error:', response.statusCode);
|
|
1285
|
+
resolve({ body: body, status: response.statusCode });
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
});
|
|
1289
|
+
});
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
*
|
|
1294
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1295
|
+
* @param rebalanceVaultWithShares
|
|
1296
|
+
*/
|
|
1297
|
+
async rebalanceVaultWithShares(contractsId, rebalanceVaultWithShares, options = { headers: {} }) {
|
|
1298
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/rebalance/shares'
|
|
1299
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1300
|
+
let localVarQueryParameters = {};
|
|
1301
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1302
|
+
const produces = ['application/json'];
|
|
1303
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1304
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1305
|
+
}
|
|
1306
|
+
else {
|
|
1307
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1308
|
+
}
|
|
1309
|
+
let localVarFormParams = {};
|
|
1310
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1311
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1312
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling rebalanceVaultWithShares.');
|
|
1313
|
+
}
|
|
1314
|
+
// Verify required parameter 'rebalanceVaultWithShares' is not null or undefined
|
|
1315
|
+
if (rebalanceVaultWithShares === null || rebalanceVaultWithShares === undefined) {
|
|
1316
|
+
throw new Error('Required parameter "rebalanceVaultWithShares" was null or undefined when calling rebalanceVaultWithShares.');
|
|
1317
|
+
}
|
|
1318
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1319
|
+
let localVarUseFormData = false;
|
|
1320
|
+
let localVarRequestOptions = {
|
|
1321
|
+
method: 'POST',
|
|
1322
|
+
qs: localVarQueryParameters,
|
|
1323
|
+
headers: localVarHeaderParams,
|
|
1324
|
+
uri: localVarPath,
|
|
1325
|
+
useQuerystring: this._useQuerystring,
|
|
1326
|
+
json: true,
|
|
1327
|
+
body: models_1.ObjectSerializer.serialize(rebalanceVaultWithShares, "RebalanceVaultWithShares")
|
|
1328
|
+
};
|
|
1329
|
+
let authenticationPromise = Promise.resolve();
|
|
1330
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1331
|
+
let interceptorPromise = authenticationPromise;
|
|
1332
|
+
for (const interceptor of this.interceptors) {
|
|
1333
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1334
|
+
}
|
|
1335
|
+
return interceptorPromise.then(() => {
|
|
1336
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1337
|
+
if (localVarUseFormData) {
|
|
1338
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1339
|
+
}
|
|
1340
|
+
else {
|
|
1341
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
return new Promise((resolve, reject) => {
|
|
1345
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1346
|
+
if (error) {
|
|
1347
|
+
console.error('API call error:', error);
|
|
1348
|
+
reject(error);
|
|
1349
|
+
}
|
|
1350
|
+
else {
|
|
1351
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1352
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1353
|
+
resolve({ body: body, status: response.statusCode });
|
|
1354
|
+
}
|
|
1355
|
+
else {
|
|
1356
|
+
console.error('API response error:', response.statusCode);
|
|
1357
|
+
resolve({ body: body, status: response.statusCode });
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
});
|
|
1361
|
+
});
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
*
|
|
1366
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1367
|
+
* @param recoverERC20
|
|
1368
|
+
*/
|
|
1369
|
+
async recoverERC20(contractsId, recoverERC20, options = { headers: {} }) {
|
|
1370
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/recover-erc20'
|
|
1371
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1372
|
+
let localVarQueryParameters = {};
|
|
1373
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1374
|
+
const produces = ['application/json'];
|
|
1375
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1376
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1377
|
+
}
|
|
1378
|
+
else {
|
|
1379
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1380
|
+
}
|
|
1381
|
+
let localVarFormParams = {};
|
|
1382
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1383
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1384
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling recoverERC20.');
|
|
1385
|
+
}
|
|
1386
|
+
// Verify required parameter 'recoverERC20' is not null or undefined
|
|
1387
|
+
if (recoverERC20 === null || recoverERC20 === undefined) {
|
|
1388
|
+
throw new Error('Required parameter "recoverERC20" was null or undefined when calling recoverERC20.');
|
|
1389
|
+
}
|
|
1390
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1391
|
+
let localVarUseFormData = false;
|
|
1392
|
+
let localVarRequestOptions = {
|
|
1393
|
+
method: 'POST',
|
|
1394
|
+
qs: localVarQueryParameters,
|
|
1395
|
+
headers: localVarHeaderParams,
|
|
1396
|
+
uri: localVarPath,
|
|
1397
|
+
useQuerystring: this._useQuerystring,
|
|
1398
|
+
json: true,
|
|
1399
|
+
body: models_1.ObjectSerializer.serialize(recoverERC20, "RecoverERC20")
|
|
1400
|
+
};
|
|
1401
|
+
let authenticationPromise = Promise.resolve();
|
|
1402
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1403
|
+
let interceptorPromise = authenticationPromise;
|
|
1404
|
+
for (const interceptor of this.interceptors) {
|
|
1405
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1406
|
+
}
|
|
1407
|
+
return interceptorPromise.then(() => {
|
|
1408
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1409
|
+
if (localVarUseFormData) {
|
|
1410
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1411
|
+
}
|
|
1412
|
+
else {
|
|
1413
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
return new Promise((resolve, reject) => {
|
|
1417
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1418
|
+
if (error) {
|
|
1419
|
+
console.error('API call error:', error);
|
|
1420
|
+
reject(error);
|
|
1421
|
+
}
|
|
1422
|
+
else {
|
|
1423
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1424
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1425
|
+
resolve({ body: body, status: response.statusCode });
|
|
1426
|
+
}
|
|
1427
|
+
else {
|
|
1428
|
+
console.error('API response error:', response.statusCode);
|
|
1429
|
+
resolve({ body: body, status: response.statusCode });
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
});
|
|
1433
|
+
});
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
*
|
|
1438
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1439
|
+
* @param revokeRole
|
|
1440
|
+
*/
|
|
1441
|
+
async revokeRole(contractsId, revokeRole, options = { headers: {} }) {
|
|
1442
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/vault/revoke-role'
|
|
1443
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1444
|
+
let localVarQueryParameters = {};
|
|
1445
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1446
|
+
const produces = ['application/json'];
|
|
1447
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1448
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1449
|
+
}
|
|
1450
|
+
else {
|
|
1451
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1452
|
+
}
|
|
1453
|
+
let localVarFormParams = {};
|
|
1454
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1455
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1456
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling revokeRole.');
|
|
1457
|
+
}
|
|
1458
|
+
// Verify required parameter 'revokeRole' is not null or undefined
|
|
1459
|
+
if (revokeRole === null || revokeRole === undefined) {
|
|
1460
|
+
throw new Error('Required parameter "revokeRole" was null or undefined when calling revokeRole.');
|
|
1461
|
+
}
|
|
1462
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1463
|
+
let localVarUseFormData = false;
|
|
1464
|
+
let localVarRequestOptions = {
|
|
1465
|
+
method: 'POST',
|
|
1466
|
+
qs: localVarQueryParameters,
|
|
1467
|
+
headers: localVarHeaderParams,
|
|
1468
|
+
uri: localVarPath,
|
|
1469
|
+
useQuerystring: this._useQuerystring,
|
|
1470
|
+
json: true,
|
|
1471
|
+
body: models_1.ObjectSerializer.serialize(revokeRole, "RevokeRole")
|
|
1472
|
+
};
|
|
1473
|
+
let authenticationPromise = Promise.resolve();
|
|
1474
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1475
|
+
let interceptorPromise = authenticationPromise;
|
|
1476
|
+
for (const interceptor of this.interceptors) {
|
|
1477
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1478
|
+
}
|
|
1479
|
+
return interceptorPromise.then(() => {
|
|
1480
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1481
|
+
if (localVarUseFormData) {
|
|
1482
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1483
|
+
}
|
|
1484
|
+
else {
|
|
1485
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
return new Promise((resolve, reject) => {
|
|
1489
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1490
|
+
if (error) {
|
|
1491
|
+
console.error('API call error:', error);
|
|
1492
|
+
reject(error);
|
|
1493
|
+
}
|
|
1494
|
+
else {
|
|
1495
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1496
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1497
|
+
resolve({ body: body, status: response.statusCode });
|
|
1498
|
+
}
|
|
1499
|
+
else {
|
|
1500
|
+
console.error('API response error:', response.statusCode);
|
|
1501
|
+
resolve({ body: body, status: response.statusCode });
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
});
|
|
1505
|
+
});
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
*
|
|
1510
|
+
* @summary Stake ETH using a specific Lido staking contract set. Returns the call data needed to submit the unguaranteed deposit transaction to the dashboard contract.
|
|
1511
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1512
|
+
* @param stakeEthRequest
|
|
1513
|
+
*/
|
|
1514
|
+
async stakeEthWithLidoContracts(contractsId, stakeEthRequest, options = { headers: {} }) {
|
|
1515
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/create-validator'
|
|
1516
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1517
|
+
let localVarQueryParameters = {};
|
|
1518
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1519
|
+
const produces = ['application/json'];
|
|
1520
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1521
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1522
|
+
}
|
|
1523
|
+
else {
|
|
1524
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1525
|
+
}
|
|
1526
|
+
let localVarFormParams = {};
|
|
1527
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1528
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1529
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling stakeEthWithLidoContracts.');
|
|
1530
|
+
}
|
|
1531
|
+
// Verify required parameter 'stakeEthRequest' is not null or undefined
|
|
1532
|
+
if (stakeEthRequest === null || stakeEthRequest === undefined) {
|
|
1533
|
+
throw new Error('Required parameter "stakeEthRequest" was null or undefined when calling stakeEthWithLidoContracts.');
|
|
1534
|
+
}
|
|
1535
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1536
|
+
let localVarUseFormData = false;
|
|
1537
|
+
let localVarRequestOptions = {
|
|
1538
|
+
method: 'POST',
|
|
1539
|
+
qs: localVarQueryParameters,
|
|
1540
|
+
headers: localVarHeaderParams,
|
|
1541
|
+
uri: localVarPath,
|
|
1542
|
+
useQuerystring: this._useQuerystring,
|
|
1543
|
+
json: true,
|
|
1544
|
+
body: models_1.ObjectSerializer.serialize(stakeEthRequest, "StakeEthRequest")
|
|
1545
|
+
};
|
|
1546
|
+
let authenticationPromise = Promise.resolve();
|
|
1547
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1548
|
+
let interceptorPromise = authenticationPromise;
|
|
1549
|
+
for (const interceptor of this.interceptors) {
|
|
1550
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1551
|
+
}
|
|
1552
|
+
return interceptorPromise.then(() => {
|
|
1553
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1554
|
+
if (localVarUseFormData) {
|
|
1555
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1556
|
+
}
|
|
1557
|
+
else {
|
|
1558
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
return new Promise((resolve, reject) => {
|
|
1562
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1563
|
+
if (error) {
|
|
1564
|
+
console.error('API call error:', error);
|
|
1565
|
+
reject(error);
|
|
1566
|
+
}
|
|
1567
|
+
else {
|
|
1568
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1569
|
+
body = models_1.ObjectSerializer.deserialize(body, "StakeEthResponse");
|
|
1570
|
+
resolve({ body: body, status: response.statusCode });
|
|
1571
|
+
}
|
|
1572
|
+
else {
|
|
1573
|
+
console.error('API response error:', response.statusCode);
|
|
1574
|
+
resolve({ body: body, status: response.statusCode });
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
});
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
*
|
|
1583
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1584
|
+
* @param triggerValidatorWithdrawals
|
|
1585
|
+
*/
|
|
1586
|
+
async triggerValidatorWithdrawals(contractsId, triggerValidatorWithdrawals, options = { headers: {} }) {
|
|
1587
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/trigger-validator-withdrawals'
|
|
1588
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1589
|
+
let localVarQueryParameters = {};
|
|
1590
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1591
|
+
const produces = ['application/json'];
|
|
1592
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1593
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1594
|
+
}
|
|
1595
|
+
else {
|
|
1596
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1597
|
+
}
|
|
1598
|
+
let localVarFormParams = {};
|
|
1599
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1600
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1601
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling triggerValidatorWithdrawals.');
|
|
1602
|
+
}
|
|
1603
|
+
// Verify required parameter 'triggerValidatorWithdrawals' is not null or undefined
|
|
1604
|
+
if (triggerValidatorWithdrawals === null || triggerValidatorWithdrawals === undefined) {
|
|
1605
|
+
throw new Error('Required parameter "triggerValidatorWithdrawals" was null or undefined when calling triggerValidatorWithdrawals.');
|
|
1606
|
+
}
|
|
1607
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1608
|
+
let localVarUseFormData = false;
|
|
1609
|
+
let localVarRequestOptions = {
|
|
1610
|
+
method: 'POST',
|
|
1611
|
+
qs: localVarQueryParameters,
|
|
1612
|
+
headers: localVarHeaderParams,
|
|
1613
|
+
uri: localVarPath,
|
|
1614
|
+
useQuerystring: this._useQuerystring,
|
|
1615
|
+
json: true,
|
|
1616
|
+
body: models_1.ObjectSerializer.serialize(triggerValidatorWithdrawals, "TriggerValidatorWithdrawals")
|
|
1617
|
+
};
|
|
1618
|
+
let authenticationPromise = Promise.resolve();
|
|
1619
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1620
|
+
let interceptorPromise = authenticationPromise;
|
|
1621
|
+
for (const interceptor of this.interceptors) {
|
|
1622
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1623
|
+
}
|
|
1624
|
+
return interceptorPromise.then(() => {
|
|
1625
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1626
|
+
if (localVarUseFormData) {
|
|
1627
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1628
|
+
}
|
|
1629
|
+
else {
|
|
1630
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
return new Promise((resolve, reject) => {
|
|
1634
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1635
|
+
if (error) {
|
|
1636
|
+
console.error('API call error:', error);
|
|
1637
|
+
reject(error);
|
|
1638
|
+
}
|
|
1639
|
+
else {
|
|
1640
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1641
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1642
|
+
resolve({ body: body, status: response.statusCode });
|
|
1643
|
+
}
|
|
1644
|
+
else {
|
|
1645
|
+
console.error('API response error:', response.statusCode);
|
|
1646
|
+
resolve({ body: body, status: response.statusCode });
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
});
|
|
1650
|
+
});
|
|
1651
|
+
});
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
*
|
|
1655
|
+
* @param unwrapWstETH
|
|
1656
|
+
*/
|
|
1657
|
+
async unwrapWstETH(unwrapWstETH, options = { headers: {} }) {
|
|
1658
|
+
const localVarPath = this.basePath + '/lidov3/unwrap-wsteth';
|
|
1659
|
+
let localVarQueryParameters = {};
|
|
1660
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1661
|
+
const produces = ['application/json'];
|
|
1662
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1663
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1664
|
+
}
|
|
1665
|
+
else {
|
|
1666
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1667
|
+
}
|
|
1668
|
+
let localVarFormParams = {};
|
|
1669
|
+
// Verify required parameter 'unwrapWstETH' is not null or undefined
|
|
1670
|
+
if (unwrapWstETH === null || unwrapWstETH === undefined) {
|
|
1671
|
+
throw new Error('Required parameter "unwrapWstETH" was null or undefined when calling unwrapWstETH.');
|
|
1672
|
+
}
|
|
1673
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1674
|
+
let localVarUseFormData = false;
|
|
1675
|
+
let localVarRequestOptions = {
|
|
1676
|
+
method: 'POST',
|
|
1677
|
+
qs: localVarQueryParameters,
|
|
1678
|
+
headers: localVarHeaderParams,
|
|
1679
|
+
uri: localVarPath,
|
|
1680
|
+
useQuerystring: this._useQuerystring,
|
|
1681
|
+
json: true,
|
|
1682
|
+
body: models_1.ObjectSerializer.serialize(unwrapWstETH, "UnwrapWstETH")
|
|
1683
|
+
};
|
|
1684
|
+
let authenticationPromise = Promise.resolve();
|
|
1685
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1686
|
+
let interceptorPromise = authenticationPromise;
|
|
1687
|
+
for (const interceptor of this.interceptors) {
|
|
1688
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1689
|
+
}
|
|
1690
|
+
return interceptorPromise.then(() => {
|
|
1691
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1692
|
+
if (localVarUseFormData) {
|
|
1693
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1694
|
+
}
|
|
1695
|
+
else {
|
|
1696
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
return new Promise((resolve, reject) => {
|
|
1700
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1701
|
+
if (error) {
|
|
1702
|
+
console.error('API call error:', error);
|
|
1703
|
+
reject(error);
|
|
1704
|
+
}
|
|
1705
|
+
else {
|
|
1706
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1707
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1708
|
+
resolve({ body: body, status: response.statusCode });
|
|
1709
|
+
}
|
|
1710
|
+
else {
|
|
1711
|
+
console.error('API response error:', response.statusCode);
|
|
1712
|
+
resolve({ body: body, status: response.statusCode });
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
});
|
|
1716
|
+
});
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
/**
|
|
1720
|
+
*
|
|
1721
|
+
* @summary Validate consolidation requests and return validator balances and signing wallet information
|
|
1722
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1723
|
+
* @param consolidateValidators
|
|
1724
|
+
*/
|
|
1725
|
+
async validateConsolidationRequests(contractsId, consolidateValidators, options = { headers: {} }) {
|
|
1726
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/validate-consolidation-requests'
|
|
1727
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1728
|
+
let localVarQueryParameters = {};
|
|
1729
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1730
|
+
const produces = ['application/json'];
|
|
1731
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1732
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1733
|
+
}
|
|
1734
|
+
else {
|
|
1735
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1736
|
+
}
|
|
1737
|
+
let localVarFormParams = {};
|
|
1738
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1739
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1740
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling validateConsolidationRequests.');
|
|
1741
|
+
}
|
|
1742
|
+
// Verify required parameter 'consolidateValidators' is not null or undefined
|
|
1743
|
+
if (consolidateValidators === null || consolidateValidators === undefined) {
|
|
1744
|
+
throw new Error('Required parameter "consolidateValidators" was null or undefined when calling validateConsolidationRequests.');
|
|
1745
|
+
}
|
|
1746
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1747
|
+
let localVarUseFormData = false;
|
|
1748
|
+
let localVarRequestOptions = {
|
|
1749
|
+
method: 'POST',
|
|
1750
|
+
qs: localVarQueryParameters,
|
|
1751
|
+
headers: localVarHeaderParams,
|
|
1752
|
+
uri: localVarPath,
|
|
1753
|
+
useQuerystring: this._useQuerystring,
|
|
1754
|
+
json: true,
|
|
1755
|
+
body: models_1.ObjectSerializer.serialize(consolidateValidators, "ConsolidateValidators")
|
|
1756
|
+
};
|
|
1757
|
+
let authenticationPromise = Promise.resolve();
|
|
1758
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1759
|
+
let interceptorPromise = authenticationPromise;
|
|
1760
|
+
for (const interceptor of this.interceptors) {
|
|
1761
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1762
|
+
}
|
|
1763
|
+
return interceptorPromise.then(() => {
|
|
1764
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1765
|
+
if (localVarUseFormData) {
|
|
1766
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1767
|
+
}
|
|
1768
|
+
else {
|
|
1769
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
return new Promise((resolve, reject) => {
|
|
1773
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1774
|
+
if (error) {
|
|
1775
|
+
console.error('API call error:', error);
|
|
1776
|
+
reject(error);
|
|
1777
|
+
}
|
|
1778
|
+
else {
|
|
1779
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1780
|
+
body = models_1.ObjectSerializer.deserialize(body, "ValidateConsolidationRequestsResponse");
|
|
1781
|
+
resolve({ body: body, status: response.statusCode });
|
|
1782
|
+
}
|
|
1783
|
+
else {
|
|
1784
|
+
console.error('API response error:', response.statusCode);
|
|
1785
|
+
resolve({ body: body, status: response.statusCode });
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
});
|
|
1789
|
+
});
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
*
|
|
1794
|
+
* @param contractsId The unique identifier of the Lido staking contracts
|
|
1795
|
+
* @param withdrawFromVault
|
|
1796
|
+
*/
|
|
1797
|
+
async withdrawFromVault(contractsId, withdrawFromVault, options = { headers: {} }) {
|
|
1798
|
+
const localVarPath = this.basePath + '/lidov3/{contractsId}/withdraw'
|
|
1799
|
+
.replace('{' + 'contractsId' + '}', encodeURIComponent(String(contractsId)));
|
|
1800
|
+
let localVarQueryParameters = {};
|
|
1801
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1802
|
+
const produces = ['application/json'];
|
|
1803
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1804
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1805
|
+
}
|
|
1806
|
+
else {
|
|
1807
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1808
|
+
}
|
|
1809
|
+
let localVarFormParams = {};
|
|
1810
|
+
// Verify required parameter 'contractsId' is not null or undefined
|
|
1811
|
+
if (contractsId === null || contractsId === undefined) {
|
|
1812
|
+
throw new Error('Required parameter "contractsId" was null or undefined when calling withdrawFromVault.');
|
|
1813
|
+
}
|
|
1814
|
+
// Verify required parameter 'withdrawFromVault' is not null or undefined
|
|
1815
|
+
if (withdrawFromVault === null || withdrawFromVault === undefined) {
|
|
1816
|
+
throw new Error('Required parameter "withdrawFromVault" was null or undefined when calling withdrawFromVault.');
|
|
1817
|
+
}
|
|
1818
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1819
|
+
let localVarUseFormData = false;
|
|
1820
|
+
let localVarRequestOptions = {
|
|
1821
|
+
method: 'POST',
|
|
1822
|
+
qs: localVarQueryParameters,
|
|
1823
|
+
headers: localVarHeaderParams,
|
|
1824
|
+
uri: localVarPath,
|
|
1825
|
+
useQuerystring: this._useQuerystring,
|
|
1826
|
+
json: true,
|
|
1827
|
+
body: models_1.ObjectSerializer.serialize(withdrawFromVault, "WithdrawFromVault")
|
|
1828
|
+
};
|
|
1829
|
+
let authenticationPromise = Promise.resolve();
|
|
1830
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1831
|
+
let interceptorPromise = authenticationPromise;
|
|
1832
|
+
for (const interceptor of this.interceptors) {
|
|
1833
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1834
|
+
}
|
|
1835
|
+
return interceptorPromise.then(() => {
|
|
1836
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1837
|
+
if (localVarUseFormData) {
|
|
1838
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1839
|
+
}
|
|
1840
|
+
else {
|
|
1841
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
return new Promise((resolve, reject) => {
|
|
1845
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1846
|
+
if (error) {
|
|
1847
|
+
console.error('API call error:', error);
|
|
1848
|
+
reject(error);
|
|
1849
|
+
}
|
|
1850
|
+
else {
|
|
1851
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1852
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1853
|
+
resolve({ body: body, status: response.statusCode });
|
|
1854
|
+
}
|
|
1855
|
+
else {
|
|
1856
|
+
console.error('API response error:', response.statusCode);
|
|
1857
|
+
resolve({ body: body, status: response.statusCode });
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
});
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
*
|
|
1866
|
+
* @param wrapStETH
|
|
1867
|
+
*/
|
|
1868
|
+
async wrapStETH(wrapStETH, options = { headers: {} }) {
|
|
1869
|
+
const localVarPath = this.basePath + '/lidov3/wrap-steth';
|
|
1870
|
+
let localVarQueryParameters = {};
|
|
1871
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1872
|
+
const produces = ['application/json'];
|
|
1873
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1874
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1875
|
+
}
|
|
1876
|
+
else {
|
|
1877
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1878
|
+
}
|
|
1879
|
+
let localVarFormParams = {};
|
|
1880
|
+
// Verify required parameter 'wrapStETH' is not null or undefined
|
|
1881
|
+
if (wrapStETH === null || wrapStETH === undefined) {
|
|
1882
|
+
throw new Error('Required parameter "wrapStETH" was null or undefined when calling wrapStETH.');
|
|
1883
|
+
}
|
|
1884
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1885
|
+
let localVarUseFormData = false;
|
|
1886
|
+
let localVarRequestOptions = {
|
|
1887
|
+
method: 'POST',
|
|
1888
|
+
qs: localVarQueryParameters,
|
|
1889
|
+
headers: localVarHeaderParams,
|
|
1890
|
+
uri: localVarPath,
|
|
1891
|
+
useQuerystring: this._useQuerystring,
|
|
1892
|
+
json: true,
|
|
1893
|
+
body: models_1.ObjectSerializer.serialize(wrapStETH, "WrapStETH")
|
|
1894
|
+
};
|
|
1895
|
+
let authenticationPromise = Promise.resolve();
|
|
1896
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1897
|
+
let interceptorPromise = authenticationPromise;
|
|
1898
|
+
for (const interceptor of this.interceptors) {
|
|
1899
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1900
|
+
}
|
|
1901
|
+
return interceptorPromise.then(() => {
|
|
1902
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1903
|
+
if (localVarUseFormData) {
|
|
1904
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1905
|
+
}
|
|
1906
|
+
else {
|
|
1907
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
return new Promise((resolve, reject) => {
|
|
1911
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
1912
|
+
if (error) {
|
|
1913
|
+
console.error('API call error:', error);
|
|
1914
|
+
reject(error);
|
|
1915
|
+
}
|
|
1916
|
+
else {
|
|
1917
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1918
|
+
body = models_1.ObjectSerializer.deserialize(body, "PartialTransaction");
|
|
1919
|
+
resolve({ body: body, status: response.statusCode });
|
|
1920
|
+
}
|
|
1921
|
+
else {
|
|
1922
|
+
console.error('API response error:', response.statusCode);
|
|
1923
|
+
resolve({ body: body, status: response.statusCode });
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
});
|
|
1928
|
+
});
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
exports.LidoWriteApi = LidoWriteApi;
|