diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a52fefff..7d95e595 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -16,7 +16,9 @@ docs/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf1.md docs/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2.md docs/AddCollateralRequestBody.md docs/AddContractAssetRequest.md -docs/AdditionalInfoDto.md +docs/AddCosignerRequest.md +docs/AddCosignerResponse.md +docs/AdditionalInfo.md docs/AmlRegistrationResult.md docs/AmlScreeningResult.md docs/AmountAggregationTimePeriodMethod.md @@ -28,17 +30,23 @@ docs/ApiUserApi.md docs/AssetAlreadyExistHttpError.md docs/AssetAmount.md docs/AssetBadRequestErrorResponse.md +docs/AssetClassBeta.md docs/AssetConflictErrorResponse.md docs/AssetForbiddenErrorResponse.md docs/AssetInternalServerErrorResponse.md +docs/AssetMedia.md +docs/AssetMediaAttributes.md +docs/AssetMetadata.md +docs/AssetMetadataBeta.md docs/AssetMetadataDto.md docs/AssetNotFoundErrorResponse.md +docs/AssetOnchain.md +docs/AssetOnchainBeta.md docs/AssetPriceForbiddenErrorResponse.md docs/AssetPriceNotFoundErrorResponse.md docs/AssetPriceResponse.md docs/AssetResponse.md -docs/AssetResponseMetadata.md -docs/AssetResponseOnchain.md +docs/AssetResponseBeta.md docs/AssetTypeResponse.md docs/AssetWallet.md docs/AssetsApi.md @@ -48,9 +56,20 @@ docs/AuditorData.md docs/AuthorizationGroups.md docs/AuthorizationInfo.md docs/BlockInfo.md +docs/BlockchainExplorer.md +docs/BlockchainMedia.md +docs/BlockchainMetadata.md +docs/BlockchainNotFoundErrorResponse.md +docs/BlockchainOnchain.md +docs/BlockchainResponse.md docs/BlockchainsAssetsApi.md +docs/BlockchainsAssetsBetaApi.md +docs/CallbackHandler.md +docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md -docs/ChainInfoResponseDto.md +docs/ChainDescriptor.md +docs/ChainInfoResponse.md +docs/ClaimRewardsRequest.md docs/CollectionBurnRequestDto.md docs/CollectionBurnResponseDto.md docs/CollectionDeployRequestDto.md @@ -134,11 +153,12 @@ docs/CreateVaultAccountConnectionRequest.md docs/CreateVaultAccountRequest.md docs/CreateVaultAssetResponse.md docs/CreateWalletRequest.md +docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md docs/DefaultNetworkRoutingDest.md -docs/DelegationDto.md -docs/DelegationSummaryDto.md +docs/Delegation.md +docs/DelegationSummary.md docs/DeleteNetworkConnectionResponse.md docs/DeleteNetworkIdResponse.md docs/DeployedContractResponseDto.md @@ -171,6 +191,7 @@ docs/DropTransactionRequest.md docs/DropTransactionResponse.md docs/EVMTokenCreateParamsDto.md docs/EditGasStationConfigurationResponse.md +docs/EmbeddedWalletsApi.md docs/ErrorResponse.md docs/ErrorResponseError.md docs/ErrorSchema.md @@ -184,8 +205,6 @@ docs/ExchangeAsset.md docs/ExchangeSettlementTransactionsResponse.md docs/ExchangeTradingAccount.md docs/ExchangeType.md -docs/ExecuteActionRequest.md -docs/ExecuteActionResponse.md docs/ExecutionConversionOperation.md docs/ExecutionDisbursementOperation.md docs/ExecutionOperationStatus.md @@ -194,6 +213,7 @@ docs/ExecutionTransferOperation.md docs/ExternalWalletAsset.md docs/ExternalWalletsApi.md docs/FeeInfo.md +docs/FeeLevel.md docs/FetchAbiRequestDto.md docs/FiatAccount.md docs/FiatAccountType.md @@ -214,6 +234,7 @@ docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md docs/GetLinkedCollectionsPaginatedResponse.md docs/GetMaxSpendableAmountResponse.md +docs/GetMpcKeysResponse.md docs/GetNFTsResponse.md docs/GetOtaStatusResponse.md docs/GetOwnershipTokensResponse.md @@ -230,15 +251,19 @@ docs/Job.md docs/JobCreated.md docs/JobManagementApi.md docs/KeyLinkBetaApi.md +docs/KeysBetaApi.md docs/LeanAbiFunction.md docs/LeanContractDto.md docs/LeanDeployedContractResponseDto.md +docs/ListAssetsResponse.md +docs/ListBlockchainsResponse.md docs/ListOwnedCollectionsResponse.md docs/ListOwnedTokensResponse.md docs/MediaEntityResponse.md docs/ModifySigningKeyAgentIdDto.md docs/ModifySigningKeyDto.md docs/ModifyValidationKeyDto.md +docs/MpcKey.md docs/NFTsApi.md docs/NetworkChannel.md docs/NetworkConnection.md @@ -253,6 +278,10 @@ docs/NetworkIdRoutingPolicyValue.md docs/NetworkRecord.md docs/NoneNetworkRoutingDest.md docs/NotFoundException.md +docs/Notification.md +docs/NotificationPaginatedResponse.md +docs/NotificationStatus.md +docs/NotificationWithData.md docs/OTABetaApi.md docs/OffExchangesApi.md docs/OneTimeAddress.md @@ -263,6 +292,8 @@ docs/PaginatedAddressResponsePaging.md docs/PaginatedAssetWalletResponse.md docs/PaginatedAssetWalletResponsePaging.md docs/Paging.md +docs/PairApiKeyRequest.md +docs/PairApiKeyResponse.md docs/Parameter.md docs/ParameterWithValue.md docs/PayeeAccount.md @@ -279,6 +310,7 @@ docs/PayoutInstructionState.md docs/PayoutResponse.md docs/PayoutState.md docs/PayoutStatus.md +docs/Players.md docs/PolicyAndValidationResponse.md docs/PolicyCheckResult.md docs/PolicyEditorBetaApi.md @@ -303,7 +335,7 @@ docs/PolicySrcOrDestType.md docs/PolicyStatus.md docs/PolicyValidation.md docs/PreScreening.md -docs/ProviderDto.md +docs/Provider.md docs/PublicKeyInformation.md docs/PublishDraftRequest.md docs/PublishResult.md @@ -311,8 +343,8 @@ docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md -docs/RelatedRequestDto.md -docs/RelatedTransactionDto.md +docs/RelatedRequest.md +docs/RelatedTransaction.md docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md @@ -386,15 +418,19 @@ docs/SmartTransferTicketTermResponse.md docs/SmartTransferUpdateTicketTerm.md docs/SmartTransferUserGroups.md docs/SmartTransferUserGroupsResponse.md -docs/SolanaBlockchainDataDto.md +docs/SolanaBlockchainData.md docs/SourceTransferPeerPath.md docs/SourceTransferPeerPathResponse.md docs/SpamOwnershipResponse.md docs/SpamTokenResponse.md +docs/SplitRequest.md +docs/SplitResponse.md docs/SrcOrDestAttributesInner.md -docs/StakeRequestDto.md -docs/StakeResponseDto.md -docs/StakingBetaApi.md +docs/StakeRequest.md +docs/StakeResponse.md +docs/StakingApi.md +docs/StakingProvider.md +docs/Status.md docs/StellarRippleCreateParamsDto.md docs/SystemMessageInfo.md docs/Task.md @@ -403,6 +439,7 @@ docs/ThirdPartyRouting.md docs/ToCollateralTransaction.md docs/ToExchangeTransaction.md docs/TokenCollectionResponse.md +docs/TokenInfoNotFoundErrorResponse.md docs/TokenLinkDto.md docs/TokenLinkDtoTokenMetadata.md docs/TokenLinkExistsHttpError.md @@ -464,10 +501,13 @@ docs/UnfreezeTransactionResponse.md docs/UnmanagedWallet.md docs/UnspentInput.md docs/UnspentInputsResponse.md -docs/UnstakeRequestDto.md +docs/UnstakeRequest.md +docs/UpdateCallbackHandlerRequest.md +docs/UpdateCallbackHandlerResponse.md docs/UpdateTokenOwnershipStatusDto.md docs/UpdateVaultAccountAssetAddressRequest.md docs/UpdateVaultAccountRequest.md +docs/UpdateWebhookRequest.md docs/UserGroupCreateRequest.md docs/UserGroupCreateResponse.md docs/UserGroupResponse.md @@ -481,7 +521,7 @@ docs/UsersApi.md docs/ValidateAddressResponse.md docs/ValidatedTransactionsForRescan.md docs/ValidationKeyDto.md -docs/ValidatorDto.md +docs/Validator.md docs/VaultAccount.md docs/VaultAccountsPagedResponse.md docs/VaultAccountsPagedResponsePaging.md @@ -490,12 +530,17 @@ docs/VaultAsset.md docs/VaultWalletAddress.md docs/VaultsApi.md docs/VendorDto.md +docs/Version.md docs/WalletAsset.md docs/WalletAssetAdditionalInfo.md docs/Web3ConnectionsApi.md +docs/Webhook.md +docs/WebhookEvent.md +docs/WebhookPaginatedResponse.md docs/WebhooksApi.md +docs/WebhooksV2BetaApi.md docs/WhitelistIpAddressesApi.md -docs/WithdrawRequestDto.md +docs/WithdrawRequest.md docs/WorkflowConfigStatus.md docs/WorkflowConfigurationId.md docs/WorkflowExecutionOperation.md @@ -510,6 +555,7 @@ fireblocks/api/api_user_api.py fireblocks/api/assets_api.py fireblocks/api/audit_logs_api.py fireblocks/api/blockchains_assets_api.py +fireblocks/api/blockchains_assets_beta_api.py fireblocks/api/compliance_api.py fireblocks/api/compliance_screening_configuration_api.py fireblocks/api/console_user_api.py @@ -518,6 +564,7 @@ fireblocks/api/contract_templates_api.py fireblocks/api/contracts_api.py fireblocks/api/cosigners_beta_api.py fireblocks/api/deployed_contracts_api.py +fireblocks/api/embedded_wallets_api.py fireblocks/api/exchange_accounts_api.py fireblocks/api/external_wallets_api.py fireblocks/api/fiat_accounts_api.py @@ -525,6 +572,7 @@ fireblocks/api/gas_stations_api.py fireblocks/api/internal_wallets_api.py fireblocks/api/job_management_api.py fireblocks/api/key_link_beta_api.py +fireblocks/api/keys_beta_api.py fireblocks/api/network_connections_api.py fireblocks/api/nfts_api.py fireblocks/api/off_exchanges_api.py @@ -533,7 +581,7 @@ fireblocks/api/payments_payout_api.py fireblocks/api/policy_editor_beta_api.py fireblocks/api/reset_device_api.py fireblocks/api/smart_transfer_api.py -fireblocks/api/staking_beta_api.py +fireblocks/api/staking_api.py fireblocks/api/tokenization_api.py fireblocks/api/transactions_api.py fireblocks/api/travel_rule_beta_api.py @@ -542,6 +590,7 @@ fireblocks/api/users_api.py fireblocks/api/vaults_api.py fireblocks/api/web3_connections_api.py fireblocks/api/webhooks_api.py +fireblocks/api/webhooks_v2_beta_api.py fireblocks/api/whitelist_ip_addresses_api.py fireblocks/api/workspace_status_beta_api.py fireblocks/api_client.py @@ -566,7 +615,9 @@ fireblocks/models/add_asset_to_external_wallet_request_one_of1_additional_info_o fireblocks/models/add_asset_to_external_wallet_request_one_of1_additional_info_one_of2.py fireblocks/models/add_collateral_request_body.py fireblocks/models/add_contract_asset_request.py -fireblocks/models/additional_info_dto.py +fireblocks/models/add_cosigner_request.py +fireblocks/models/add_cosigner_response.py +fireblocks/models/additional_info.py fireblocks/models/aml_registration_result.py fireblocks/models/aml_screening_result.py fireblocks/models/amount_aggregation_time_period_method.py @@ -578,17 +629,23 @@ fireblocks/models/api_user.py fireblocks/models/asset_already_exist_http_error.py fireblocks/models/asset_amount.py fireblocks/models/asset_bad_request_error_response.py +fireblocks/models/asset_class_beta.py fireblocks/models/asset_conflict_error_response.py fireblocks/models/asset_forbidden_error_response.py fireblocks/models/asset_internal_server_error_response.py +fireblocks/models/asset_media.py +fireblocks/models/asset_media_attributes.py +fireblocks/models/asset_metadata.py +fireblocks/models/asset_metadata_beta.py fireblocks/models/asset_metadata_dto.py fireblocks/models/asset_not_found_error_response.py +fireblocks/models/asset_onchain.py +fireblocks/models/asset_onchain_beta.py fireblocks/models/asset_price_forbidden_error_response.py fireblocks/models/asset_price_not_found_error_response.py fireblocks/models/asset_price_response.py fireblocks/models/asset_response.py -fireblocks/models/asset_response_metadata.py -fireblocks/models/asset_response_onchain.py +fireblocks/models/asset_response_beta.py fireblocks/models/asset_type_response.py fireblocks/models/asset_wallet.py fireblocks/models/audit_log_data.py @@ -596,8 +653,18 @@ fireblocks/models/auditor_data.py fireblocks/models/authorization_groups.py fireblocks/models/authorization_info.py fireblocks/models/block_info.py +fireblocks/models/blockchain_explorer.py +fireblocks/models/blockchain_media.py +fireblocks/models/blockchain_metadata.py +fireblocks/models/blockchain_not_found_error_response.py +fireblocks/models/blockchain_onchain.py +fireblocks/models/blockchain_response.py +fireblocks/models/callback_handler.py +fireblocks/models/callback_handler_request.py fireblocks/models/cancel_transaction_response.py -fireblocks/models/chain_info_response_dto.py +fireblocks/models/chain_descriptor.py +fireblocks/models/chain_info_response.py +fireblocks/models/claim_rewards_request.py fireblocks/models/collection_burn_request_dto.py fireblocks/models/collection_burn_response_dto.py fireblocks/models/collection_deploy_request_dto.py @@ -674,11 +741,12 @@ fireblocks/models/create_vault_account_connection_request.py fireblocks/models/create_vault_account_request.py fireblocks/models/create_vault_asset_response.py fireblocks/models/create_wallet_request.py +fireblocks/models/create_webhook_request.py fireblocks/models/create_workflow_execution_request_params_inner.py fireblocks/models/custom_routing_dest.py fireblocks/models/default_network_routing_dest.py -fireblocks/models/delegation_dto.py -fireblocks/models/delegation_summary_dto.py +fireblocks/models/delegation.py +fireblocks/models/delegation_summary.py fireblocks/models/delete_network_connection_response.py fireblocks/models/delete_network_id_response.py fireblocks/models/deployed_contract_response_dto.py @@ -722,8 +790,6 @@ fireblocks/models/exchange_asset.py fireblocks/models/exchange_settlement_transactions_response.py fireblocks/models/exchange_trading_account.py fireblocks/models/exchange_type.py -fireblocks/models/execute_action_request.py -fireblocks/models/execute_action_response.py fireblocks/models/execution_conversion_operation.py fireblocks/models/execution_disbursement_operation.py fireblocks/models/execution_operation_status.py @@ -731,6 +797,7 @@ fireblocks/models/execution_screening_operation.py fireblocks/models/execution_transfer_operation.py fireblocks/models/external_wallet_asset.py fireblocks/models/fee_info.py +fireblocks/models/fee_level.py fireblocks/models/fetch_abi_request_dto.py fireblocks/models/fiat_account.py fireblocks/models/fiat_account_type.py @@ -749,6 +816,7 @@ fireblocks/models/get_exchange_accounts_credentials_public_key_response.py fireblocks/models/get_filter_parameter.py fireblocks/models/get_linked_collections_paginated_response.py fireblocks/models/get_max_spendable_amount_response.py +fireblocks/models/get_mpc_keys_response.py fireblocks/models/get_nfts_response.py fireblocks/models/get_ota_status_response.py fireblocks/models/get_ownership_tokens_response.py @@ -765,12 +833,15 @@ fireblocks/models/job_created.py fireblocks/models/lean_abi_function.py fireblocks/models/lean_contract_dto.py fireblocks/models/lean_deployed_contract_response_dto.py +fireblocks/models/list_assets_response.py +fireblocks/models/list_blockchains_response.py fireblocks/models/list_owned_collections_response.py fireblocks/models/list_owned_tokens_response.py fireblocks/models/media_entity_response.py fireblocks/models/modify_signing_key_agent_id_dto.py fireblocks/models/modify_signing_key_dto.py fireblocks/models/modify_validation_key_dto.py +fireblocks/models/mpc_key.py fireblocks/models/network_channel.py fireblocks/models/network_connection.py fireblocks/models/network_connection_response.py @@ -783,6 +854,10 @@ fireblocks/models/network_id_routing_policy_value.py fireblocks/models/network_record.py fireblocks/models/none_network_routing_dest.py fireblocks/models/not_found_exception.py +fireblocks/models/notification.py +fireblocks/models/notification_paginated_response.py +fireblocks/models/notification_status.py +fireblocks/models/notification_with_data.py fireblocks/models/one_time_address.py fireblocks/models/one_time_address_account.py fireblocks/models/operation_execution_failure.py @@ -791,6 +866,8 @@ fireblocks/models/paginated_address_response_paging.py fireblocks/models/paginated_asset_wallet_response.py fireblocks/models/paginated_asset_wallet_response_paging.py fireblocks/models/paging.py +fireblocks/models/pair_api_key_request.py +fireblocks/models/pair_api_key_response.py fireblocks/models/parameter.py fireblocks/models/parameter_with_value.py fireblocks/models/payee_account.py @@ -806,6 +883,7 @@ fireblocks/models/payout_instruction_state.py fireblocks/models/payout_response.py fireblocks/models/payout_state.py fireblocks/models/payout_status.py +fireblocks/models/players.py fireblocks/models/policy_and_validation_response.py fireblocks/models/policy_check_result.py fireblocks/models/policy_metadata.py @@ -829,7 +907,7 @@ fireblocks/models/policy_src_or_dest_type.py fireblocks/models/policy_status.py fireblocks/models/policy_validation.py fireblocks/models/pre_screening.py -fireblocks/models/provider_dto.py +fireblocks/models/provider.py fireblocks/models/public_key_information.py fireblocks/models/publish_draft_request.py fireblocks/models/publish_result.py @@ -837,8 +915,8 @@ fireblocks/models/read_abi_function.py fireblocks/models/read_call_function_dto.py fireblocks/models/redeem_funds_to_linked_dda_response.py fireblocks/models/register_new_asset_request.py -fireblocks/models/related_request_dto.py -fireblocks/models/related_transaction_dto.py +fireblocks/models/related_request.py +fireblocks/models/related_transaction.py fireblocks/models/remove_collateral_request_body.py fireblocks/models/rename_cosigner.py fireblocks/models/rename_vault_account_response.py @@ -910,14 +988,18 @@ fireblocks/models/smart_transfer_ticket_term_response.py fireblocks/models/smart_transfer_update_ticket_term.py fireblocks/models/smart_transfer_user_groups.py fireblocks/models/smart_transfer_user_groups_response.py -fireblocks/models/solana_blockchain_data_dto.py +fireblocks/models/solana_blockchain_data.py fireblocks/models/source_transfer_peer_path.py fireblocks/models/source_transfer_peer_path_response.py fireblocks/models/spam_ownership_response.py fireblocks/models/spam_token_response.py +fireblocks/models/split_request.py +fireblocks/models/split_response.py fireblocks/models/src_or_dest_attributes_inner.py -fireblocks/models/stake_request_dto.py -fireblocks/models/stake_response_dto.py +fireblocks/models/stake_request.py +fireblocks/models/stake_response.py +fireblocks/models/staking_provider.py +fireblocks/models/status.py fireblocks/models/stellar_ripple_create_params_dto.py fireblocks/models/system_message_info.py fireblocks/models/task.py @@ -926,6 +1008,7 @@ fireblocks/models/third_party_routing.py fireblocks/models/to_collateral_transaction.py fireblocks/models/to_exchange_transaction.py fireblocks/models/token_collection_response.py +fireblocks/models/token_info_not_found_error_response.py fireblocks/models/token_link_dto.py fireblocks/models/token_link_dto_token_metadata.py fireblocks/models/token_link_exists_http_error.py @@ -984,10 +1067,13 @@ fireblocks/models/unfreeze_transaction_response.py fireblocks/models/unmanaged_wallet.py fireblocks/models/unspent_input.py fireblocks/models/unspent_inputs_response.py -fireblocks/models/unstake_request_dto.py +fireblocks/models/unstake_request.py +fireblocks/models/update_callback_handler_request.py +fireblocks/models/update_callback_handler_response.py fireblocks/models/update_token_ownership_status_dto.py fireblocks/models/update_vault_account_asset_address_request.py fireblocks/models/update_vault_account_request.py +fireblocks/models/update_webhook_request.py fireblocks/models/user_group_create_request.py fireblocks/models/user_group_create_response.py fireblocks/models/user_group_response.py @@ -999,7 +1085,7 @@ fireblocks/models/user_type.py fireblocks/models/validate_address_response.py fireblocks/models/validated_transactions_for_rescan.py fireblocks/models/validation_key_dto.py -fireblocks/models/validator_dto.py +fireblocks/models/validator.py fireblocks/models/vault_account.py fireblocks/models/vault_accounts_paged_response.py fireblocks/models/vault_accounts_paged_response_paging.py @@ -1007,9 +1093,13 @@ fireblocks/models/vault_action_status.py fireblocks/models/vault_asset.py fireblocks/models/vault_wallet_address.py fireblocks/models/vendor_dto.py +fireblocks/models/version.py fireblocks/models/wallet_asset.py fireblocks/models/wallet_asset_additional_info.py -fireblocks/models/withdraw_request_dto.py +fireblocks/models/webhook.py +fireblocks/models/webhook_event.py +fireblocks/models/webhook_paginated_response.py +fireblocks/models/withdraw_request.py fireblocks/models/workflow_config_status.py fireblocks/models/workflow_configuration_id.py fireblocks/models/workflow_execution_operation.py @@ -1052,7 +1142,9 @@ test/test_add_asset_to_external_wallet_request_one_of1_additional_info_one_of1.p test/test_add_asset_to_external_wallet_request_one_of1_additional_info_one_of2.py test/test_add_collateral_request_body.py test/test_add_contract_asset_request.py -test/test_additional_info_dto.py +test/test_add_cosigner_request.py +test/test_add_cosigner_response.py +test/test_additional_info.py test/test_aml_registration_result.py test/test_aml_screening_result.py test/test_amount_aggregation_time_period_method.py @@ -1065,17 +1157,23 @@ test/test_api_user_api.py test/test_asset_already_exist_http_error.py test/test_asset_amount.py test/test_asset_bad_request_error_response.py +test/test_asset_class_beta.py test/test_asset_conflict_error_response.py test/test_asset_forbidden_error_response.py test/test_asset_internal_server_error_response.py +test/test_asset_media.py +test/test_asset_media_attributes.py +test/test_asset_metadata.py +test/test_asset_metadata_beta.py test/test_asset_metadata_dto.py test/test_asset_not_found_error_response.py +test/test_asset_onchain.py +test/test_asset_onchain_beta.py test/test_asset_price_forbidden_error_response.py test/test_asset_price_not_found_error_response.py test/test_asset_price_response.py test/test_asset_response.py -test/test_asset_response_metadata.py -test/test_asset_response_onchain.py +test/test_asset_response_beta.py test/test_asset_type_response.py test/test_asset_wallet.py test/test_assets_api.py @@ -1085,9 +1183,20 @@ test/test_auditor_data.py test/test_authorization_groups.py test/test_authorization_info.py test/test_block_info.py +test/test_blockchain_explorer.py +test/test_blockchain_media.py +test/test_blockchain_metadata.py +test/test_blockchain_not_found_error_response.py +test/test_blockchain_onchain.py +test/test_blockchain_response.py test/test_blockchains_assets_api.py +test/test_blockchains_assets_beta_api.py +test/test_callback_handler.py +test/test_callback_handler_request.py test/test_cancel_transaction_response.py -test/test_chain_info_response_dto.py +test/test_chain_descriptor.py +test/test_chain_info_response.py +test/test_claim_rewards_request.py test/test_collection_burn_request_dto.py test/test_collection_burn_response_dto.py test/test_collection_deploy_request_dto.py @@ -1171,11 +1280,12 @@ test/test_create_vault_account_connection_request.py test/test_create_vault_account_request.py test/test_create_vault_asset_response.py test/test_create_wallet_request.py +test/test_create_webhook_request.py test/test_create_workflow_execution_request_params_inner.py test/test_custom_routing_dest.py test/test_default_network_routing_dest.py -test/test_delegation_dto.py -test/test_delegation_summary_dto.py +test/test_delegation.py +test/test_delegation_summary.py test/test_delete_network_connection_response.py test/test_delete_network_id_response.py test/test_deployed_contract_response_dto.py @@ -1207,6 +1317,7 @@ test/test_draft_review_and_validation_response.py test/test_drop_transaction_request.py test/test_drop_transaction_response.py test/test_edit_gas_station_configuration_response.py +test/test_embedded_wallets_api.py test/test_error_response.py test/test_error_response_error.py test/test_error_schema.py @@ -1221,8 +1332,6 @@ test/test_exchange_asset.py test/test_exchange_settlement_transactions_response.py test/test_exchange_trading_account.py test/test_exchange_type.py -test/test_execute_action_request.py -test/test_execute_action_response.py test/test_execution_conversion_operation.py test/test_execution_disbursement_operation.py test/test_execution_operation_status.py @@ -1231,6 +1340,7 @@ test/test_execution_transfer_operation.py test/test_external_wallet_asset.py test/test_external_wallets_api.py test/test_fee_info.py +test/test_fee_level.py test/test_fetch_abi_request_dto.py test/test_fiat_account.py test/test_fiat_account_type.py @@ -1251,6 +1361,7 @@ test/test_get_exchange_accounts_credentials_public_key_response.py test/test_get_filter_parameter.py test/test_get_linked_collections_paginated_response.py test/test_get_max_spendable_amount_response.py +test/test_get_mpc_keys_response.py test/test_get_nfts_response.py test/test_get_ota_status_response.py test/test_get_ownership_tokens_response.py @@ -1267,15 +1378,19 @@ test/test_job.py test/test_job_created.py test/test_job_management_api.py test/test_key_link_beta_api.py +test/test_keys_beta_api.py test/test_lean_abi_function.py test/test_lean_contract_dto.py test/test_lean_deployed_contract_response_dto.py +test/test_list_assets_response.py +test/test_list_blockchains_response.py test/test_list_owned_collections_response.py test/test_list_owned_tokens_response.py test/test_media_entity_response.py test/test_modify_signing_key_agent_id_dto.py test/test_modify_signing_key_dto.py test/test_modify_validation_key_dto.py +test/test_mpc_key.py test/test_network_channel.py test/test_network_connection.py test/test_network_connection_response.py @@ -1290,6 +1405,10 @@ test/test_network_record.py test/test_nfts_api.py test/test_none_network_routing_dest.py test/test_not_found_exception.py +test/test_notification.py +test/test_notification_paginated_response.py +test/test_notification_status.py +test/test_notification_with_data.py test/test_off_exchanges_api.py test/test_one_time_address.py test/test_one_time_address_account.py @@ -1300,6 +1419,8 @@ test/test_paginated_address_response_paging.py test/test_paginated_asset_wallet_response.py test/test_paginated_asset_wallet_response_paging.py test/test_paging.py +test/test_pair_api_key_request.py +test/test_pair_api_key_response.py test/test_parameter.py test/test_parameter_with_value.py test/test_payee_account.py @@ -1316,6 +1437,7 @@ test/test_payout_instruction_state.py test/test_payout_response.py test/test_payout_state.py test/test_payout_status.py +test/test_players.py test/test_policy_and_validation_response.py test/test_policy_check_result.py test/test_policy_editor_beta_api.py @@ -1340,7 +1462,7 @@ test/test_policy_src_or_dest_type.py test/test_policy_status.py test/test_policy_validation.py test/test_pre_screening.py -test/test_provider_dto.py +test/test_provider.py test/test_public_key_information.py test/test_publish_draft_request.py test/test_publish_result.py @@ -1348,8 +1470,8 @@ test/test_read_abi_function.py test/test_read_call_function_dto.py test/test_redeem_funds_to_linked_dda_response.py test/test_register_new_asset_request.py -test/test_related_request_dto.py -test/test_related_transaction_dto.py +test/test_related_request.py +test/test_related_transaction.py test/test_remove_collateral_request_body.py test/test_rename_cosigner.py test/test_rename_vault_account_response.py @@ -1423,15 +1545,19 @@ test/test_smart_transfer_ticket_term_response.py test/test_smart_transfer_update_ticket_term.py test/test_smart_transfer_user_groups.py test/test_smart_transfer_user_groups_response.py -test/test_solana_blockchain_data_dto.py +test/test_solana_blockchain_data.py test/test_source_transfer_peer_path.py test/test_source_transfer_peer_path_response.py test/test_spam_ownership_response.py test/test_spam_token_response.py +test/test_split_request.py +test/test_split_response.py test/test_src_or_dest_attributes_inner.py -test/test_stake_request_dto.py -test/test_stake_response_dto.py -test/test_staking_beta_api.py +test/test_stake_request.py +test/test_stake_response.py +test/test_staking_api.py +test/test_staking_provider.py +test/test_status.py test/test_stellar_ripple_create_params_dto.py test/test_system_message_info.py test/test_task.py @@ -1440,6 +1566,7 @@ test/test_third_party_routing.py test/test_to_collateral_transaction.py test/test_to_exchange_transaction.py test/test_token_collection_response.py +test/test_token_info_not_found_error_response.py test/test_token_link_dto.py test/test_token_link_dto_token_metadata.py test/test_token_link_exists_http_error.py @@ -1501,10 +1628,13 @@ test/test_unfreeze_transaction_response.py test/test_unmanaged_wallet.py test/test_unspent_input.py test/test_unspent_inputs_response.py -test/test_unstake_request_dto.py +test/test_unstake_request.py +test/test_update_callback_handler_request.py +test/test_update_callback_handler_response.py test/test_update_token_ownership_status_dto.py test/test_update_vault_account_asset_address_request.py test/test_update_vault_account_request.py +test/test_update_webhook_request.py test/test_user_group_create_request.py test/test_user_group_create_response.py test/test_user_group_response.py @@ -1518,7 +1648,7 @@ test/test_users_api.py test/test_validate_address_response.py test/test_validated_transactions_for_rescan.py test/test_validation_key_dto.py -test/test_validator_dto.py +test/test_validator.py test/test_vault_account.py test/test_vault_accounts_paged_response.py test/test_vault_accounts_paged_response_paging.py @@ -1527,12 +1657,17 @@ test/test_vault_asset.py test/test_vault_wallet_address.py test/test_vaults_api.py test/test_vendor_dto.py +test/test_version.py test/test_wallet_asset.py test/test_wallet_asset_additional_info.py test/test_web3_connections_api.py +test/test_webhook.py +test/test_webhook_event.py +test/test_webhook_paginated_response.py test/test_webhooks_api.py +test/test_webhooks_v2_beta_api.py test/test_whitelist_ip_addresses_api.py -test/test_withdraw_request_dto.py +test/test_withdraw_request.py test/test_workflow_config_status.py test/test_workflow_configuration_id.py test/test_workflow_execution_operation.py diff --git a/README.md b/README.md index 6552a5ec..eba2be26 100644 --- a/README.md +++ b/README.md @@ -240,10 +240,15 @@ Class | Method | HTTP request | Description *BlockchainsAssetsApi* | [**get_supported_assets**](docs/BlockchainsAssetsApi.md#get_supported_assets) | **GET** /supported_assets | List all asset types supported by Fireblocks *BlockchainsAssetsApi* | [**register_new_asset**](docs/BlockchainsAssetsApi.md#register_new_asset) | **POST** /assets | Register an asset *BlockchainsAssetsApi* | [**set_asset_price**](docs/BlockchainsAssetsApi.md#set_asset_price) | **POST** /assets/prices/{id} | Set asset price +*BlockchainsAssetsBetaApi* | [**get_asset_by_id**](docs/BlockchainsAssetsBetaApi.md#get_asset_by_id) | **GET** /assets/{id} | Get an asset +*BlockchainsAssetsBetaApi* | [**get_blockchain_by_id**](docs/BlockchainsAssetsBetaApi.md#get_blockchain_by_id) | **GET** /blockchains/{id} | Get an blockchain +*BlockchainsAssetsBetaApi* | [**list_assets**](docs/BlockchainsAssetsBetaApi.md#list_assets) | **GET** /assets | List assets +*BlockchainsAssetsBetaApi* | [**list_blockchains**](docs/BlockchainsAssetsBetaApi.md#list_blockchains) | **GET** /blockchains | List blockchains *ComplianceApi* | [**get_aml_post_screening_policy**](docs/ComplianceApi.md#get_aml_post_screening_policy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy *ComplianceApi* | [**get_aml_screening_policy**](docs/ComplianceApi.md#get_aml_screening_policy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy *ComplianceApi* | [**get_post_screening_policy**](docs/ComplianceApi.md#get_post_screening_policy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy *ComplianceApi* | [**get_screening_policy**](docs/ComplianceApi.md#get_screening_policy) | **GET** /screening/travel_rule/screening_policy | Travel Rule - View Screening Policy +*ComplianceApi* | [**retry_rejected_transaction_bypass_screening_checks**](docs/ComplianceApi.md#retry_rejected_transaction_bypass_screening_checks) | **POST** /screening/transaction/{txId}/bypass_screening_policy | Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check *ComplianceApi* | [**update_aml_screening_configuration**](docs/ComplianceApi.md#update_aml_screening_configuration) | **PUT** /screening/aml/policy_configuration | Update AML Configuration *ComplianceApi* | [**update_screening_configuration**](docs/ComplianceApi.md#update_screening_configuration) | **PUT** /screening/configurations | Tenant - Screening Configuration *ComplianceApi* | [**update_travel_rule_config**](docs/ComplianceApi.md#update_travel_rule_config) | **PUT** /screening/travel_rule/policy_configuration | Update Travel Rule Configuration @@ -268,16 +273,23 @@ Class | Method | HTTP request | Description *ContractsApi* | [**get_contract**](docs/ContractsApi.md#get_contract) | **GET** /contracts/{contractId} | Find a specific contract *ContractsApi* | [**get_contract_asset**](docs/ContractsApi.md#get_contract_asset) | **GET** /contracts/{contractId}/{assetId} | Find a contract asset *ContractsApi* | [**get_contracts**](docs/ContractsApi.md#get_contracts) | **GET** /contracts | List contracts +*CosignersBetaApi* | [**add_cosigner**](docs/CosignersBetaApi.md#add_cosigner) | **POST** /cosigners | Add cosigner *CosignersBetaApi* | [**get_api_key**](docs/CosignersBetaApi.md#get_api_key) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Get API key *CosignersBetaApi* | [**get_api_keys**](docs/CosignersBetaApi.md#get_api_keys) | **GET** /cosigners/{cosignerId}/api_keys | Get all API keys *CosignersBetaApi* | [**get_cosigner**](docs/CosignersBetaApi.md#get_cosigner) | **GET** /cosigners/{cosignerId} | Get cosigner *CosignersBetaApi* | [**get_cosigners**](docs/CosignersBetaApi.md#get_cosigners) | **GET** /cosigners | Get all cosigners +*CosignersBetaApi* | [**get_request_status**](docs/CosignersBetaApi.md#get_request_status) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId} | Get request status +*CosignersBetaApi* | [**pair_api_key**](docs/CosignersBetaApi.md#pair_api_key) | **PUT** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Pair API key *CosignersBetaApi* | [**rename_cosigner**](docs/CosignersBetaApi.md#rename_cosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner +*CosignersBetaApi* | [**unpair_api_key**](docs/CosignersBetaApi.md#unpair_api_key) | **DELETE** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Unpair API key +*CosignersBetaApi* | [**update_callback_handler**](docs/CosignersBetaApi.md#update_callback_handler) | **PATCH** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Update API key callback handler *DeployedContractsApi* | [**add_contract_abi**](docs/DeployedContractsApi.md#add_contract_abi) | **POST** /tokenization/contracts/abi | Save contract ABI *DeployedContractsApi* | [**fetch_contract_abi**](docs/DeployedContractsApi.md#fetch_contract_abi) | **POST** /tokenization/contracts/fetch_abi | Fetch the contract ABI *DeployedContractsApi* | [**get_deployed_contract_by_address**](docs/DeployedContractsApi.md#get_deployed_contract_by_address) | **GET** /tokenization/contracts/{assetId}/{contractAddress} | Return deployed contract data *DeployedContractsApi* | [**get_deployed_contract_by_id**](docs/DeployedContractsApi.md#get_deployed_contract_by_id) | **GET** /tokenization/contracts/{id} | Return deployed contract data by id *DeployedContractsApi* | [**get_deployed_contracts**](docs/DeployedContractsApi.md#get_deployed_contracts) | **GET** /tokenization/contracts | List deployed contracts data +*EmbeddedWalletsApi* | [**get_public_key_info_for_address_ncw**](docs/EmbeddedWalletsApi.md#get_public_key_info_for_address_ncw) | **GET** /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info | Get the public key of an asset +*EmbeddedWalletsApi* | [**get_public_key_info_ncw**](docs/EmbeddedWalletsApi.md#get_public_key_info_ncw) | **GET** /ncw/{walletId}/public_key_info | Get the public key for a derivation path *ExchangeAccountsApi* | [**convert_assets**](docs/ExchangeAccountsApi.md#convert_assets) | **POST** /exchange_accounts/{exchangeAccountId}/convert | Convert exchange account funds from the source asset to the destination asset. *ExchangeAccountsApi* | [**get_exchange_account**](docs/ExchangeAccountsApi.md#get_exchange_account) | **GET** /exchange_accounts/{exchangeAccountId} | Find a specific exchange account *ExchangeAccountsApi* | [**get_exchange_account_asset**](docs/ExchangeAccountsApi.md#get_exchange_account_asset) | **GET** /exchange_accounts/{exchangeAccountId}/{assetId} | Find an asset for an exchange account @@ -322,6 +334,8 @@ Class | Method | HTTP request | Description *KeyLinkBetaApi* | [**get_validation_keys_list**](docs/KeyLinkBetaApi.md#get_validation_keys_list) | **GET** /key_link/validation_keys | Get list of registered validation keys *KeyLinkBetaApi* | [**set_agent_id**](docs/KeyLinkBetaApi.md#set_agent_id) | **PATCH** /key_link/signing_keys/{keyId}/agent_user_id | Set agent user id that can sign with the signing key identified by the Fireblocks provided `keyId` *KeyLinkBetaApi* | [**update_signing_key**](docs/KeyLinkBetaApi.md#update_signing_key) | **PATCH** /key_link/signing_keys/{keyId} | Modify the signing by Fireblocks provided `keyId` +*KeysBetaApi* | [**get_mpc_keys_list**](docs/KeysBetaApi.md#get_mpc_keys_list) | **GET** /keys/mpc/list | Get list of mpc keys +*KeysBetaApi* | [**get_mpc_keys_list_by_user**](docs/KeysBetaApi.md#get_mpc_keys_list_by_user) | **GET** /keys/mpc/list/{userId} | Get list of mpc keys by `userId` *NFTsApi* | [**get_nft**](docs/NFTsApi.md#get_nft) | **GET** /nfts/tokens/{id} | List token data by ID *NFTsApi* | [**get_nfts**](docs/NFTsApi.md#get_nfts) | **GET** /nfts/tokens | List tokens by IDs *NFTsApi* | [**get_ownership_tokens**](docs/NFTsApi.md#get_ownership_tokens) | **GET** /nfts/ownership/tokens | List all owned tokens (paginated) @@ -382,15 +396,19 @@ Class | Method | HTTP request | Description *SmartTransferApi* | [**set_user_groups**](docs/SmartTransferApi.md#set_user_groups) | **POST** /smart-transfers/settings/user-groups | Set user group *SmartTransferApi* | [**submit_ticket**](docs/SmartTransferApi.md#submit_ticket) | **PUT** /smart-transfers/{ticketId}/submit | Submit ticket *SmartTransferApi* | [**update_ticket_term**](docs/SmartTransferApi.md#update_ticket_term) | **PUT** /smart-transfers/{ticketId}/terms/{termId} | Update ticket leg (term) -*StakingBetaApi* | [**approve_terms_of_service_by_provider_id**](docs/StakingBetaApi.md#approve_terms_of_service_by_provider_id) | **POST** /staking/providers/{providerId}/approveTermsOfService | -*StakingBetaApi* | [**execute_action**](docs/StakingBetaApi.md#execute_action) | **POST** /staking/chains/{chainDescriptor}/{actionId} | -*StakingBetaApi* | [**get_all_delegations**](docs/StakingBetaApi.md#get_all_delegations) | **GET** /staking/positions | -*StakingBetaApi* | [**get_chain_info**](docs/StakingBetaApi.md#get_chain_info) | **GET** /staking/chains/{chainDescriptor}/chainInfo | -*StakingBetaApi* | [**get_chains**](docs/StakingBetaApi.md#get_chains) | **GET** /staking/chains | -*StakingBetaApi* | [**get_delegation_by_id**](docs/StakingBetaApi.md#get_delegation_by_id) | **GET** /staking/positions/{id} | -*StakingBetaApi* | [**get_providers**](docs/StakingBetaApi.md#get_providers) | **GET** /staking/providers | -*StakingBetaApi* | [**get_summary**](docs/StakingBetaApi.md#get_summary) | **GET** /staking/positions/summary | -*StakingBetaApi* | [**get_summary_by_vault**](docs/StakingBetaApi.md#get_summary_by_vault) | **GET** /staking/positions/summary/vaults | +*StakingApi* | [**approve_terms_of_service_by_provider_id**](docs/StakingApi.md#approve_terms_of_service_by_provider_id) | **POST** /staking/providers/{providerId}/approveTermsOfService | Approve staking terms of service +*StakingApi* | [**claim_rewards**](docs/StakingApi.md#claim_rewards) | **POST** /staking/chains/{chainDescriptor}/claim_rewards | Execute a Claim Rewards operation +*StakingApi* | [**get_all_delegations**](docs/StakingApi.md#get_all_delegations) | **GET** /staking/positions | List staking positions details +*StakingApi* | [**get_chain_info**](docs/StakingApi.md#get_chain_info) | **GET** /staking/chains/{chainDescriptor}/chainInfo | Get chain-specific staking summary +*StakingApi* | [**get_chains**](docs/StakingApi.md#get_chains) | **GET** /staking/chains | List staking supported chains +*StakingApi* | [**get_delegation_by_id**](docs/StakingApi.md#get_delegation_by_id) | **GET** /staking/positions/{id} | Get staking position details +*StakingApi* | [**get_providers**](docs/StakingApi.md#get_providers) | **GET** /staking/providers | List staking providers details +*StakingApi* | [**get_summary**](docs/StakingApi.md#get_summary) | **GET** /staking/positions/summary | Get staking summary details +*StakingApi* | [**get_summary_by_vault**](docs/StakingApi.md#get_summary_by_vault) | **GET** /staking/positions/summary/vaults | Get staking summary details by vault +*StakingApi* | [**split**](docs/StakingApi.md#split) | **POST** /staking/chains/{chainDescriptor}/split | Execute a Split operation on SOL/SOL_TEST stake account +*StakingApi* | [**stake**](docs/StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation +*StakingApi* | [**unstake**](docs/StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation +*StakingApi* | [**withdraw**](docs/StakingApi.md#withdraw) | **POST** /staking/chains/{chainDescriptor}/withdraw | Execute a Withdraw operation *TokenizationApi* | [**burn_collection_token**](docs/TokenizationApi.md#burn_collection_token) | **POST** /tokenization/collections/{id}/tokens/burn | Burn tokens *TokenizationApi* | [**create_new_collection**](docs/TokenizationApi.md#create_new_collection) | **POST** /tokenization/collections | Create a new collection *TokenizationApi* | [**fetch_collection_token_details**](docs/TokenizationApi.md#fetch_collection_token_details) | **GET** /tokenization/collections/{id}/tokens/{tokenId} | Get collection token details @@ -461,6 +479,13 @@ Class | Method | HTTP request | Description *Web3ConnectionsApi* | [**submit**](docs/Web3ConnectionsApi.md#submit) | **PUT** /connections/wc/{id} | Respond to a pending Web3 connection request. *WebhooksApi* | [**resend_transaction_webhooks**](docs/WebhooksApi.md#resend_transaction_webhooks) | **POST** /webhooks/resend/{txId} | Resend failed webhooks for a transaction by ID *WebhooksApi* | [**resend_webhooks**](docs/WebhooksApi.md#resend_webhooks) | **POST** /webhooks/resend | Resend failed webhooks +*WebhooksV2BetaApi* | [**create_webhook**](docs/WebhooksV2BetaApi.md#create_webhook) | **POST** /webhooks | Create new webhook +*WebhooksV2BetaApi* | [**delete_webhook**](docs/WebhooksV2BetaApi.md#delete_webhook) | **DELETE** /webhooks/{webhookId} | Delete webhook +*WebhooksV2BetaApi* | [**get_notification**](docs/WebhooksV2BetaApi.md#get_notification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id +*WebhooksV2BetaApi* | [**get_notifications**](docs/WebhooksV2BetaApi.md#get_notifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id +*WebhooksV2BetaApi* | [**get_webhook**](docs/WebhooksV2BetaApi.md#get_webhook) | **GET** /webhooks/{webhookId} | Get webhook by id +*WebhooksV2BetaApi* | [**get_webhooks**](docs/WebhooksV2BetaApi.md#get_webhooks) | **GET** /webhooks | Get all webhooks +*WebhooksV2BetaApi* | [**update_webhook**](docs/WebhooksV2BetaApi.md#update_webhook) | **PATCH** /webhooks/{webhookId} | Update webhook *WorkspaceStatusBetaApi* | [**get_workspace_status**](docs/WorkspaceStatusBetaApi.md#get_workspace_status) | **GET** /management/workspace_status | Returns current workspace status *WhitelistIpAddressesApi* | [**get_whitelist_ip_addresses**](docs/WhitelistIpAddressesApi.md#get_whitelist_ip_addresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses @@ -481,7 +506,9 @@ Class | Method | HTTP request | Description - [AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2](docs/AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2.md) - [AddCollateralRequestBody](docs/AddCollateralRequestBody.md) - [AddContractAssetRequest](docs/AddContractAssetRequest.md) - - [AdditionalInfoDto](docs/AdditionalInfoDto.md) + - [AddCosignerRequest](docs/AddCosignerRequest.md) + - [AddCosignerResponse](docs/AddCosignerResponse.md) + - [AdditionalInfo](docs/AdditionalInfo.md) - [AmlRegistrationResult](docs/AmlRegistrationResult.md) - [AmlScreeningResult](docs/AmlScreeningResult.md) - [AmountAggregationTimePeriodMethod](docs/AmountAggregationTimePeriodMethod.md) @@ -492,17 +519,23 @@ Class | Method | HTTP request | Description - [AssetAlreadyExistHttpError](docs/AssetAlreadyExistHttpError.md) - [AssetAmount](docs/AssetAmount.md) - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) + - [AssetClassBeta](docs/AssetClassBeta.md) - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) - [AssetForbiddenErrorResponse](docs/AssetForbiddenErrorResponse.md) - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) + - [AssetMedia](docs/AssetMedia.md) + - [AssetMediaAttributes](docs/AssetMediaAttributes.md) + - [AssetMetadata](docs/AssetMetadata.md) + - [AssetMetadataBeta](docs/AssetMetadataBeta.md) - [AssetMetadataDto](docs/AssetMetadataDto.md) - [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md) + - [AssetOnchain](docs/AssetOnchain.md) + - [AssetOnchainBeta](docs/AssetOnchainBeta.md) - [AssetPriceForbiddenErrorResponse](docs/AssetPriceForbiddenErrorResponse.md) - [AssetPriceNotFoundErrorResponse](docs/AssetPriceNotFoundErrorResponse.md) - [AssetPriceResponse](docs/AssetPriceResponse.md) - [AssetResponse](docs/AssetResponse.md) - - [AssetResponseMetadata](docs/AssetResponseMetadata.md) - - [AssetResponseOnchain](docs/AssetResponseOnchain.md) + - [AssetResponseBeta](docs/AssetResponseBeta.md) - [AssetTypeResponse](docs/AssetTypeResponse.md) - [AssetWallet](docs/AssetWallet.md) - [AuditLogData](docs/AuditLogData.md) @@ -510,8 +543,18 @@ Class | Method | HTTP request | Description - [AuthorizationGroups](docs/AuthorizationGroups.md) - [AuthorizationInfo](docs/AuthorizationInfo.md) - [BlockInfo](docs/BlockInfo.md) + - [BlockchainExplorer](docs/BlockchainExplorer.md) + - [BlockchainMedia](docs/BlockchainMedia.md) + - [BlockchainMetadata](docs/BlockchainMetadata.md) + - [BlockchainNotFoundErrorResponse](docs/BlockchainNotFoundErrorResponse.md) + - [BlockchainOnchain](docs/BlockchainOnchain.md) + - [BlockchainResponse](docs/BlockchainResponse.md) + - [CallbackHandler](docs/CallbackHandler.md) + - [CallbackHandlerRequest](docs/CallbackHandlerRequest.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) - - [ChainInfoResponseDto](docs/ChainInfoResponseDto.md) + - [ChainDescriptor](docs/ChainDescriptor.md) + - [ChainInfoResponse](docs/ChainInfoResponse.md) + - [ClaimRewardsRequest](docs/ClaimRewardsRequest.md) - [CollectionBurnRequestDto](docs/CollectionBurnRequestDto.md) - [CollectionBurnResponseDto](docs/CollectionBurnResponseDto.md) - [CollectionDeployRequestDto](docs/CollectionDeployRequestDto.md) @@ -588,11 +631,12 @@ Class | Method | HTTP request | Description - [CreateVaultAccountRequest](docs/CreateVaultAccountRequest.md) - [CreateVaultAssetResponse](docs/CreateVaultAssetResponse.md) - [CreateWalletRequest](docs/CreateWalletRequest.md) + - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) - [DefaultNetworkRoutingDest](docs/DefaultNetworkRoutingDest.md) - - [DelegationDto](docs/DelegationDto.md) - - [DelegationSummaryDto](docs/DelegationSummaryDto.md) + - [Delegation](docs/Delegation.md) + - [DelegationSummary](docs/DelegationSummary.md) - [DeleteNetworkConnectionResponse](docs/DeleteNetworkConnectionResponse.md) - [DeleteNetworkIdResponse](docs/DeleteNetworkIdResponse.md) - [DeployedContractResponseDto](docs/DeployedContractResponseDto.md) @@ -636,8 +680,6 @@ Class | Method | HTTP request | Description - [ExchangeSettlementTransactionsResponse](docs/ExchangeSettlementTransactionsResponse.md) - [ExchangeTradingAccount](docs/ExchangeTradingAccount.md) - [ExchangeType](docs/ExchangeType.md) - - [ExecuteActionRequest](docs/ExecuteActionRequest.md) - - [ExecuteActionResponse](docs/ExecuteActionResponse.md) - [ExecutionConversionOperation](docs/ExecutionConversionOperation.md) - [ExecutionDisbursementOperation](docs/ExecutionDisbursementOperation.md) - [ExecutionOperationStatus](docs/ExecutionOperationStatus.md) @@ -645,6 +687,7 @@ Class | Method | HTTP request | Description - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) - [FeeInfo](docs/FeeInfo.md) + - [FeeLevel](docs/FeeLevel.md) - [FetchAbiRequestDto](docs/FetchAbiRequestDto.md) - [FiatAccount](docs/FiatAccount.md) - [FiatAccountType](docs/FiatAccountType.md) @@ -663,6 +706,7 @@ Class | Method | HTTP request | Description - [GetFilterParameter](docs/GetFilterParameter.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) + - [GetMpcKeysResponse](docs/GetMpcKeysResponse.md) - [GetNFTsResponse](docs/GetNFTsResponse.md) - [GetOtaStatusResponse](docs/GetOtaStatusResponse.md) - [GetOwnershipTokensResponse](docs/GetOwnershipTokensResponse.md) @@ -679,12 +723,15 @@ Class | Method | HTTP request | Description - [LeanAbiFunction](docs/LeanAbiFunction.md) - [LeanContractDto](docs/LeanContractDto.md) - [LeanDeployedContractResponseDto](docs/LeanDeployedContractResponseDto.md) + - [ListAssetsResponse](docs/ListAssetsResponse.md) + - [ListBlockchainsResponse](docs/ListBlockchainsResponse.md) - [ListOwnedCollectionsResponse](docs/ListOwnedCollectionsResponse.md) - [ListOwnedTokensResponse](docs/ListOwnedTokensResponse.md) - [MediaEntityResponse](docs/MediaEntityResponse.md) - [ModifySigningKeyAgentIdDto](docs/ModifySigningKeyAgentIdDto.md) - [ModifySigningKeyDto](docs/ModifySigningKeyDto.md) - [ModifyValidationKeyDto](docs/ModifyValidationKeyDto.md) + - [MpcKey](docs/MpcKey.md) - [NetworkChannel](docs/NetworkChannel.md) - [NetworkConnection](docs/NetworkConnection.md) - [NetworkConnectionResponse](docs/NetworkConnectionResponse.md) @@ -697,6 +744,10 @@ Class | Method | HTTP request | Description - [NetworkRecord](docs/NetworkRecord.md) - [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md) - [NotFoundException](docs/NotFoundException.md) + - [Notification](docs/Notification.md) + - [NotificationPaginatedResponse](docs/NotificationPaginatedResponse.md) + - [NotificationStatus](docs/NotificationStatus.md) + - [NotificationWithData](docs/NotificationWithData.md) - [OneTimeAddress](docs/OneTimeAddress.md) - [OneTimeAddressAccount](docs/OneTimeAddressAccount.md) - [OperationExecutionFailure](docs/OperationExecutionFailure.md) @@ -705,6 +756,8 @@ Class | Method | HTTP request | Description - [PaginatedAssetWalletResponse](docs/PaginatedAssetWalletResponse.md) - [PaginatedAssetWalletResponsePaging](docs/PaginatedAssetWalletResponsePaging.md) - [Paging](docs/Paging.md) + - [PairApiKeyRequest](docs/PairApiKeyRequest.md) + - [PairApiKeyResponse](docs/PairApiKeyResponse.md) - [Parameter](docs/Parameter.md) - [ParameterWithValue](docs/ParameterWithValue.md) - [PayeeAccount](docs/PayeeAccount.md) @@ -720,6 +773,7 @@ Class | Method | HTTP request | Description - [PayoutResponse](docs/PayoutResponse.md) - [PayoutState](docs/PayoutState.md) - [PayoutStatus](docs/PayoutStatus.md) + - [Players](docs/Players.md) - [PolicyAndValidationResponse](docs/PolicyAndValidationResponse.md) - [PolicyCheckResult](docs/PolicyCheckResult.md) - [PolicyMetadata](docs/PolicyMetadata.md) @@ -743,7 +797,7 @@ Class | Method | HTTP request | Description - [PolicyStatus](docs/PolicyStatus.md) - [PolicyValidation](docs/PolicyValidation.md) - [PreScreening](docs/PreScreening.md) - - [ProviderDto](docs/ProviderDto.md) + - [Provider](docs/Provider.md) - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) @@ -751,8 +805,8 @@ Class | Method | HTTP request | Description - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - - [RelatedRequestDto](docs/RelatedRequestDto.md) - - [RelatedTransactionDto](docs/RelatedTransactionDto.md) + - [RelatedRequest](docs/RelatedRequest.md) + - [RelatedTransaction](docs/RelatedTransaction.md) - [RemoveCollateralRequestBody](docs/RemoveCollateralRequestBody.md) - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) @@ -824,14 +878,18 @@ Class | Method | HTTP request | Description - [SmartTransferUpdateTicketTerm](docs/SmartTransferUpdateTicketTerm.md) - [SmartTransferUserGroups](docs/SmartTransferUserGroups.md) - [SmartTransferUserGroupsResponse](docs/SmartTransferUserGroupsResponse.md) - - [SolanaBlockchainDataDto](docs/SolanaBlockchainDataDto.md) + - [SolanaBlockchainData](docs/SolanaBlockchainData.md) - [SourceTransferPeerPath](docs/SourceTransferPeerPath.md) - [SourceTransferPeerPathResponse](docs/SourceTransferPeerPathResponse.md) - [SpamOwnershipResponse](docs/SpamOwnershipResponse.md) - [SpamTokenResponse](docs/SpamTokenResponse.md) + - [SplitRequest](docs/SplitRequest.md) + - [SplitResponse](docs/SplitResponse.md) - [SrcOrDestAttributesInner](docs/SrcOrDestAttributesInner.md) - - [StakeRequestDto](docs/StakeRequestDto.md) - - [StakeResponseDto](docs/StakeResponseDto.md) + - [StakeRequest](docs/StakeRequest.md) + - [StakeResponse](docs/StakeResponse.md) + - [StakingProvider](docs/StakingProvider.md) + - [Status](docs/Status.md) - [StellarRippleCreateParamsDto](docs/StellarRippleCreateParamsDto.md) - [SystemMessageInfo](docs/SystemMessageInfo.md) - [Task](docs/Task.md) @@ -840,6 +898,7 @@ Class | Method | HTTP request | Description - [ToCollateralTransaction](docs/ToCollateralTransaction.md) - [ToExchangeTransaction](docs/ToExchangeTransaction.md) - [TokenCollectionResponse](docs/TokenCollectionResponse.md) + - [TokenInfoNotFoundErrorResponse](docs/TokenInfoNotFoundErrorResponse.md) - [TokenLinkDto](docs/TokenLinkDto.md) - [TokenLinkDtoTokenMetadata](docs/TokenLinkDtoTokenMetadata.md) - [TokenLinkExistsHttpError](docs/TokenLinkExistsHttpError.md) @@ -898,10 +957,13 @@ Class | Method | HTTP request | Description - [UnmanagedWallet](docs/UnmanagedWallet.md) - [UnspentInput](docs/UnspentInput.md) - [UnspentInputsResponse](docs/UnspentInputsResponse.md) - - [UnstakeRequestDto](docs/UnstakeRequestDto.md) + - [UnstakeRequest](docs/UnstakeRequest.md) + - [UpdateCallbackHandlerRequest](docs/UpdateCallbackHandlerRequest.md) + - [UpdateCallbackHandlerResponse](docs/UpdateCallbackHandlerResponse.md) - [UpdateTokenOwnershipStatusDto](docs/UpdateTokenOwnershipStatusDto.md) - [UpdateVaultAccountAssetAddressRequest](docs/UpdateVaultAccountAssetAddressRequest.md) - [UpdateVaultAccountRequest](docs/UpdateVaultAccountRequest.md) + - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UserGroupCreateRequest](docs/UserGroupCreateRequest.md) - [UserGroupCreateResponse](docs/UserGroupCreateResponse.md) - [UserGroupResponse](docs/UserGroupResponse.md) @@ -913,7 +975,7 @@ Class | Method | HTTP request | Description - [ValidateAddressResponse](docs/ValidateAddressResponse.md) - [ValidatedTransactionsForRescan](docs/ValidatedTransactionsForRescan.md) - [ValidationKeyDto](docs/ValidationKeyDto.md) - - [ValidatorDto](docs/ValidatorDto.md) + - [Validator](docs/Validator.md) - [VaultAccount](docs/VaultAccount.md) - [VaultAccountsPagedResponse](docs/VaultAccountsPagedResponse.md) - [VaultAccountsPagedResponsePaging](docs/VaultAccountsPagedResponsePaging.md) @@ -921,9 +983,13 @@ Class | Method | HTTP request | Description - [VaultAsset](docs/VaultAsset.md) - [VaultWalletAddress](docs/VaultWalletAddress.md) - [VendorDto](docs/VendorDto.md) + - [Version](docs/Version.md) - [WalletAsset](docs/WalletAsset.md) - [WalletAssetAdditionalInfo](docs/WalletAssetAdditionalInfo.md) - - [WithdrawRequestDto](docs/WithdrawRequestDto.md) + - [Webhook](docs/Webhook.md) + - [WebhookEvent](docs/WebhookEvent.md) + - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) + - [WithdrawRequest](docs/WithdrawRequest.md) - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) - [WorkflowConfigurationId](docs/WorkflowConfigurationId.md) - [WorkflowExecutionOperation](docs/WorkflowExecutionOperation.md) diff --git a/docs/AddCosignerRequest.md b/docs/AddCosignerRequest.md new file mode 100644 index 00000000..52ea9c0b --- /dev/null +++ b/docs/AddCosignerRequest.md @@ -0,0 +1,31 @@ +# AddCosignerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_key_id** | **str** | The id of the API key to be paired with the cosigner | +**name** | **str** | The name of the cosigner | +**existing_cosigner** | **bool** | Whether the cosigner already exists in another workspace | [optional] [default to False] + +## Example + +```python +from fireblocks.models.add_cosigner_request import AddCosignerRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of AddCosignerRequest from a JSON string +add_cosigner_request_instance = AddCosignerRequest.from_json(json) +# print the JSON string representation of the object +print(AddCosignerRequest.to_json()) + +# convert the object into a dict +add_cosigner_request_dict = add_cosigner_request_instance.to_dict() +# create an instance of AddCosignerRequest from a dict +add_cosigner_request_from_dict = AddCosignerRequest.from_dict(add_cosigner_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddCosignerResponse.md b/docs/AddCosignerResponse.md new file mode 100644 index 00000000..32146293 --- /dev/null +++ b/docs/AddCosignerResponse.md @@ -0,0 +1,32 @@ +# AddCosignerResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_key_id** | **str** | The id of the API key to be paired with the cosigner | +**name** | **str** | The name of the cosigner | +**existing_cosigner** | **bool** | Whether the cosigner already exists in another workspace | [optional] [default to False] +**pending_cosigner_id** | **str** | The unique identifier of a pending cosigner | + +## Example + +```python +from fireblocks.models.add_cosigner_response import AddCosignerResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AddCosignerResponse from a JSON string +add_cosigner_response_instance = AddCosignerResponse.from_json(json) +# print the JSON string representation of the object +print(AddCosignerResponse.to_json()) + +# convert the object into a dict +add_cosigner_response_dict = add_cosigner_response_instance.to_dict() +# create an instance of AddCosignerResponse from a dict +add_cosigner_response_from_dict = AddCosignerResponse.from_dict(add_cosigner_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdditionalInfoDto.md b/docs/AdditionalInfo.md similarity index 62% rename from docs/AdditionalInfoDto.md rename to docs/AdditionalInfo.md index b6507433..38c7ab4c 100644 --- a/docs/AdditionalInfoDto.md +++ b/docs/AdditionalInfo.md @@ -1,5 +1,6 @@ -# AdditionalInfoDto +# AdditionalInfo +Additional information related to the blockchain. This may include extra details about the blockchain network. ## Properties @@ -12,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.additional_info_dto import AdditionalInfoDto +from fireblocks.models.additional_info import AdditionalInfo # TODO update the JSON string below json = "{}" -# create an instance of AdditionalInfoDto from a JSON string -additional_info_dto_instance = AdditionalInfoDto.from_json(json) +# create an instance of AdditionalInfo from a JSON string +additional_info_instance = AdditionalInfo.from_json(json) # print the JSON string representation of the object -print(AdditionalInfoDto.to_json()) +print(AdditionalInfo.to_json()) # convert the object into a dict -additional_info_dto_dict = additional_info_dto_instance.to_dict() -# create an instance of AdditionalInfoDto from a dict -additional_info_dto_from_dict = AdditionalInfoDto.from_dict(additional_info_dto_dict) +additional_info_dict = additional_info_instance.to_dict() +# create an instance of AdditionalInfo from a dict +additional_info_from_dict = AdditionalInfo.from_dict(additional_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKey.md b/docs/ApiKey.md index 3affdbee..2c96dd7f 100644 --- a/docs/ApiKey.md +++ b/docs/ApiKey.md @@ -6,7 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The unique identifier of the API key | -**last_seen** | **datetime** | The date the API key was last seen | +**last_seen** | **datetime** | The date the API key was last seen | [optional] +**callback_handler** | [**CallbackHandler**](CallbackHandler.md) | | [optional] ## Example diff --git a/docs/AssetBadRequestErrorResponse.md b/docs/AssetBadRequestErrorResponse.md index bbca1a0f..07103747 100644 --- a/docs/AssetBadRequestErrorResponse.md +++ b/docs/AssetBadRequestErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Bad request error code | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetClassBeta.md b/docs/AssetClassBeta.md new file mode 100644 index 00000000..8dd54ef1 --- /dev/null +++ b/docs/AssetClassBeta.md @@ -0,0 +1,11 @@ +# AssetClassBeta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetConflictErrorResponse.md b/docs/AssetConflictErrorResponse.md index 0fa6321a..f828bd77 100644 --- a/docs/AssetConflictErrorResponse.md +++ b/docs/AssetConflictErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Conflict error code | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetForbiddenErrorResponse.md b/docs/AssetForbiddenErrorResponse.md index c5259fb7..7813c5db 100644 --- a/docs/AssetForbiddenErrorResponse.md +++ b/docs/AssetForbiddenErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Forbidden error code | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetInternalServerErrorResponse.md b/docs/AssetInternalServerErrorResponse.md index 8ac5254d..c8f4e831 100644 --- a/docs/AssetInternalServerErrorResponse.md +++ b/docs/AssetInternalServerErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Internal server error code | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetMedia.md b/docs/AssetMedia.md new file mode 100644 index 00000000..73baa0dc --- /dev/null +++ b/docs/AssetMedia.md @@ -0,0 +1,31 @@ +# AssetMedia + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Media URL | +**type** | **str** | Media type | +**attributes** | [**AssetMediaAttributes**](AssetMediaAttributes.md) | | [optional] + +## Example + +```python +from fireblocks.models.asset_media import AssetMedia + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetMedia from a JSON string +asset_media_instance = AssetMedia.from_json(json) +# print the JSON string representation of the object +print(AssetMedia.to_json()) + +# convert the object into a dict +asset_media_dict = asset_media_instance.to_dict() +# create an instance of AssetMedia from a dict +asset_media_from_dict = AssetMedia.from_dict(asset_media_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetMediaAttributes.md b/docs/AssetMediaAttributes.md new file mode 100644 index 00000000..e70ef32f --- /dev/null +++ b/docs/AssetMediaAttributes.md @@ -0,0 +1,30 @@ +# AssetMediaAttributes + +Media attributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**monochrome** | **bool** | Monochrome flag | [optional] + +## Example + +```python +from fireblocks.models.asset_media_attributes import AssetMediaAttributes + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetMediaAttributes from a JSON string +asset_media_attributes_instance = AssetMediaAttributes.from_json(json) +# print the JSON string representation of the object +print(AssetMediaAttributes.to_json()) + +# convert the object into a dict +asset_media_attributes_dict = asset_media_attributes_instance.to_dict() +# create an instance of AssetMediaAttributes from a dict +asset_media_attributes_from_dict = AssetMediaAttributes.from_dict(asset_media_attributes_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetResponseMetadata.md b/docs/AssetMetadata.md similarity index 51% rename from docs/AssetResponseMetadata.md rename to docs/AssetMetadata.md index 45969752..fefab139 100644 --- a/docs/AssetResponseMetadata.md +++ b/docs/AssetMetadata.md @@ -1,4 +1,4 @@ -# AssetResponseMetadata +# AssetMetadata ## Properties @@ -11,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.asset_response_metadata import AssetResponseMetadata +from fireblocks.models.asset_metadata import AssetMetadata # TODO update the JSON string below json = "{}" -# create an instance of AssetResponseMetadata from a JSON string -asset_response_metadata_instance = AssetResponseMetadata.from_json(json) +# create an instance of AssetMetadata from a JSON string +asset_metadata_instance = AssetMetadata.from_json(json) # print the JSON string representation of the object -print(AssetResponseMetadata.to_json()) +print(AssetMetadata.to_json()) # convert the object into a dict -asset_response_metadata_dict = asset_response_metadata_instance.to_dict() -# create an instance of AssetResponseMetadata from a dict -asset_response_metadata_from_dict = AssetResponseMetadata.from_dict(asset_response_metadata_dict) +asset_metadata_dict = asset_metadata_instance.to_dict() +# create an instance of AssetMetadata from a dict +asset_metadata_from_dict = AssetMetadata.from_dict(asset_metadata_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetMetadataBeta.md b/docs/AssetMetadataBeta.md new file mode 100644 index 00000000..f78a5436 --- /dev/null +++ b/docs/AssetMetadataBeta.md @@ -0,0 +1,34 @@ +# AssetMetadataBeta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | The scope of the asset | +**deprecated** | **bool** | Is asset deprecated | +**deprecation_referral_id** | **str** | New asset ID replacement | [optional] +**verified** | **bool** | Is asset verified by Fireblocks | +**website** | **str** | Vendor’s website | [optional] +**media** | [**List[AssetMedia]**](AssetMedia.md) | Asset’s media | [optional] + +## Example + +```python +from fireblocks.models.asset_metadata_beta import AssetMetadataBeta + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetMetadataBeta from a JSON string +asset_metadata_beta_instance = AssetMetadataBeta.from_json(json) +# print the JSON string representation of the object +print(AssetMetadataBeta.to_json()) + +# convert the object into a dict +asset_metadata_beta_dict = asset_metadata_beta_instance.to_dict() +# create an instance of AssetMetadataBeta from a dict +asset_metadata_beta_from_dict = AssetMetadataBeta.from_dict(asset_metadata_beta_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetNotFoundErrorResponse.md b/docs/AssetNotFoundErrorResponse.md index 4abfbbc0..f022995d 100644 --- a/docs/AssetNotFoundErrorResponse.md +++ b/docs/AssetNotFoundErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Not found error code | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetResponseOnchain.md b/docs/AssetOnchain.md similarity index 58% rename from docs/AssetResponseOnchain.md rename to docs/AssetOnchain.md index 18f57536..64e3b664 100644 --- a/docs/AssetResponseOnchain.md +++ b/docs/AssetOnchain.md @@ -1,4 +1,4 @@ -# AssetResponseOnchain +# AssetOnchain ## Properties @@ -14,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.asset_response_onchain import AssetResponseOnchain +from fireblocks.models.asset_onchain import AssetOnchain # TODO update the JSON string below json = "{}" -# create an instance of AssetResponseOnchain from a JSON string -asset_response_onchain_instance = AssetResponseOnchain.from_json(json) +# create an instance of AssetOnchain from a JSON string +asset_onchain_instance = AssetOnchain.from_json(json) # print the JSON string representation of the object -print(AssetResponseOnchain.to_json()) +print(AssetOnchain.to_json()) # convert the object into a dict -asset_response_onchain_dict = asset_response_onchain_instance.to_dict() -# create an instance of AssetResponseOnchain from a dict -asset_response_onchain_from_dict = AssetResponseOnchain.from_dict(asset_response_onchain_dict) +asset_onchain_dict = asset_onchain_instance.to_dict() +# create an instance of AssetOnchain from a dict +asset_onchain_from_dict = AssetOnchain.from_dict(asset_onchain_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssetOnchainBeta.md b/docs/AssetOnchainBeta.md new file mode 100644 index 00000000..e25721c0 --- /dev/null +++ b/docs/AssetOnchainBeta.md @@ -0,0 +1,33 @@ +# AssetOnchainBeta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**symbol** | **str** | The asset symbol | +**name** | **str** | The asset name | +**address** | **str** | The asset address | [optional] +**decimals** | **float** | Number of decimals | +**standards** | **List[str]** | Supported standards | [optional] + +## Example + +```python +from fireblocks.models.asset_onchain_beta import AssetOnchainBeta + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetOnchainBeta from a JSON string +asset_onchain_beta_instance = AssetOnchainBeta.from_json(json) +# print the JSON string representation of the object +print(AssetOnchainBeta.to_json()) + +# convert the object into a dict +asset_onchain_beta_dict = asset_onchain_beta_instance.to_dict() +# create an instance of AssetOnchainBeta from a dict +asset_onchain_beta_from_dict = AssetOnchainBeta.from_dict(asset_onchain_beta_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AssetPriceForbiddenErrorResponse.md b/docs/AssetPriceForbiddenErrorResponse.md index 90458d35..8d6edf3a 100644 --- a/docs/AssetPriceForbiddenErrorResponse.md +++ b/docs/AssetPriceForbiddenErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Forbidden error message | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetPriceNotFoundErrorResponse.md b/docs/AssetPriceNotFoundErrorResponse.md index 602455ce..a035c55a 100644 --- a/docs/AssetPriceNotFoundErrorResponse.md +++ b/docs/AssetPriceNotFoundErrorResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | Not found error message | -**code** | **str** | Error code | +**code** | **float** | Error code | ## Example diff --git a/docs/AssetResponse.md b/docs/AssetResponse.md index b2e0825c..5d143b97 100644 --- a/docs/AssetResponse.md +++ b/docs/AssetResponse.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **legacy_id** | **str** | | **asset_class** | **str** | | -**onchain** | [**AssetResponseOnchain**](AssetResponseOnchain.md) | | -**metadata** | [**AssetResponseMetadata**](AssetResponseMetadata.md) | | +**onchain** | [**AssetOnchain**](AssetOnchain.md) | | +**metadata** | [**AssetMetadata**](AssetMetadata.md) | | ## Example diff --git a/docs/AssetResponseBeta.md b/docs/AssetResponseBeta.md new file mode 100644 index 00000000..498707c3 --- /dev/null +++ b/docs/AssetResponseBeta.md @@ -0,0 +1,36 @@ +# AssetResponseBeta + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the asset | +**legacy_id** | **str** | The Legacy ID of the asset | +**blockchain_id** | **str** | The ID of the asset's blockchain | [optional] +**display_name** | **str** | Asset's display name | [optional] +**display_symbol** | **str** | Asset's display symbol | [optional] +**asset_class** | [**AssetClassBeta**](AssetClassBeta.md) | | +**onchain** | [**AssetOnchainBeta**](AssetOnchainBeta.md) | | [optional] +**metadata** | [**AssetMetadataBeta**](AssetMetadataBeta.md) | | + +## Example + +```python +from fireblocks.models.asset_response_beta import AssetResponseBeta + +# TODO update the JSON string below +json = "{}" +# create an instance of AssetResponseBeta from a JSON string +asset_response_beta_instance = AssetResponseBeta.from_json(json) +# print the JSON string representation of the object +print(AssetResponseBeta.to_json()) + +# convert the object into a dict +asset_response_beta_dict = asset_response_beta_instance.to_dict() +# create an instance of AssetResponseBeta from a dict +asset_response_beta_from_dict = AssetResponseBeta.from_dict(asset_response_beta_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainExplorer.md b/docs/BlockchainExplorer.md new file mode 100644 index 00000000..c23d8c09 --- /dev/null +++ b/docs/BlockchainExplorer.md @@ -0,0 +1,32 @@ +# BlockchainExplorer + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base** | **str** | Explorer base url | +**address** | **str** | Explorer address url | [optional] +**tx** | **str** | Explorer transaction url | [optional] +**token** | **str** | Explorer token url | [optional] + +## Example + +```python +from fireblocks.models.blockchain_explorer import BlockchainExplorer + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockchainExplorer from a JSON string +blockchain_explorer_instance = BlockchainExplorer.from_json(json) +# print the JSON string representation of the object +print(BlockchainExplorer.to_json()) + +# convert the object into a dict +blockchain_explorer_dict = blockchain_explorer_instance.to_dict() +# create an instance of BlockchainExplorer from a dict +blockchain_explorer_from_dict = BlockchainExplorer.from_dict(blockchain_explorer_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainMedia.md b/docs/BlockchainMedia.md new file mode 100644 index 00000000..a18094f3 --- /dev/null +++ b/docs/BlockchainMedia.md @@ -0,0 +1,30 @@ +# BlockchainMedia + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Media URL | +**type** | **str** | Media type | + +## Example + +```python +from fireblocks.models.blockchain_media import BlockchainMedia + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockchainMedia from a JSON string +blockchain_media_instance = BlockchainMedia.from_json(json) +# print the JSON string representation of the object +print(BlockchainMedia.to_json()) + +# convert the object into a dict +blockchain_media_dict = blockchain_media_instance.to_dict() +# create an instance of BlockchainMedia from a dict +blockchain_media_from_dict = BlockchainMedia.from_dict(blockchain_media_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainMetadata.md b/docs/BlockchainMetadata.md new file mode 100644 index 00000000..750abf84 --- /dev/null +++ b/docs/BlockchainMetadata.md @@ -0,0 +1,32 @@ +# BlockchainMetadata + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | Is blockchain listed on all workspaces? Global or Local | +**deprecated** | **bool** | Is blockchain deprecated | +**media** | [**List[BlockchainMedia]**](BlockchainMedia.md) | Blockchain’s media | [optional] +**explorer** | [**BlockchainExplorer**](BlockchainExplorer.md) | | [optional] + +## Example + +```python +from fireblocks.models.blockchain_metadata import BlockchainMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockchainMetadata from a JSON string +blockchain_metadata_instance = BlockchainMetadata.from_json(json) +# print the JSON string representation of the object +print(BlockchainMetadata.to_json()) + +# convert the object into a dict +blockchain_metadata_dict = blockchain_metadata_instance.to_dict() +# create an instance of BlockchainMetadata from a dict +blockchain_metadata_from_dict = BlockchainMetadata.from_dict(blockchain_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainNotFoundErrorResponse.md b/docs/BlockchainNotFoundErrorResponse.md new file mode 100644 index 00000000..69ac1828 --- /dev/null +++ b/docs/BlockchainNotFoundErrorResponse.md @@ -0,0 +1,30 @@ +# BlockchainNotFoundErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Not found error code | +**code** | **float** | Error code | + +## Example + +```python +from fireblocks.models.blockchain_not_found_error_response import BlockchainNotFoundErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockchainNotFoundErrorResponse from a JSON string +blockchain_not_found_error_response_instance = BlockchainNotFoundErrorResponse.from_json(json) +# print the JSON string representation of the object +print(BlockchainNotFoundErrorResponse.to_json()) + +# convert the object into a dict +blockchain_not_found_error_response_dict = blockchain_not_found_error_response_instance.to_dict() +# create an instance of BlockchainNotFoundErrorResponse from a dict +blockchain_not_found_error_response_from_dict = BlockchainNotFoundErrorResponse.from_dict(blockchain_not_found_error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainOnchain.md b/docs/BlockchainOnchain.md new file mode 100644 index 00000000..ab939787 --- /dev/null +++ b/docs/BlockchainOnchain.md @@ -0,0 +1,32 @@ +# BlockchainOnchain + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**protocol** | **str** | The protocol of the blockchain | +**chain_id** | **str** | Network/chain ID | [optional] +**test** | **bool** | Is test blockchain | +**signing_algo** | **str** | Signing alghorithm | + +## Example + +```python +from fireblocks.models.blockchain_onchain import BlockchainOnchain + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockchainOnchain from a JSON string +blockchain_onchain_instance = BlockchainOnchain.from_json(json) +# print the JSON string representation of the object +print(BlockchainOnchain.to_json()) + +# convert the object into a dict +blockchain_onchain_dict = blockchain_onchain_instance.to_dict() +# create an instance of BlockchainOnchain from a dict +blockchain_onchain_from_dict = BlockchainOnchain.from_dict(blockchain_onchain_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainResponse.md b/docs/BlockchainResponse.md new file mode 100644 index 00000000..8ba901ea --- /dev/null +++ b/docs/BlockchainResponse.md @@ -0,0 +1,34 @@ +# BlockchainResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the blockchain | +**legacy_id** | **str** | The old blockchain ID representation of the blockchain | +**display_name** | **str** | The name of the blockchain | +**native_asset_id** | **str** | Native asset ID of this blockchain | +**onchain** | [**BlockchainOnchain**](BlockchainOnchain.md) | | +**metadata** | [**BlockchainMetadata**](BlockchainMetadata.md) | | + +## Example + +```python +from fireblocks.models.blockchain_response import BlockchainResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BlockchainResponse from a JSON string +blockchain_response_instance = BlockchainResponse.from_json(json) +# print the JSON string representation of the object +print(BlockchainResponse.to_json()) + +# convert the object into a dict +blockchain_response_dict = blockchain_response_instance.to_dict() +# create an instance of BlockchainResponse from a dict +blockchain_response_from_dict = BlockchainResponse.from_dict(blockchain_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index ea21516b..3db4ee69 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -157,6 +157,7 @@ No authorization required **404** | - Invalid address, could not get asset information. Error code 1003 | - | **409** | - The asset is already supported globally. Error code: 1001 - The asset has already been added to this workspace. Error code: 1002 | - | **500** | Failed to create asset | - | +**0** | Error Response | * X-Request-ID -
| [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/BlockchainsAssetsBetaApi.md b/docs/BlockchainsAssetsBetaApi.md new file mode 100644 index 00000000..c3bac9d7 --- /dev/null +++ b/docs/BlockchainsAssetsBetaApi.md @@ -0,0 +1,339 @@ +# fireblocks.BlockchainsAssetsBetaApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_asset_by_id**](BlockchainsAssetsBetaApi.md#get_asset_by_id) | **GET** /assets/{id} | Get an asset +[**get_blockchain_by_id**](BlockchainsAssetsBetaApi.md#get_blockchain_by_id) | **GET** /blockchains/{id} | Get an blockchain +[**list_assets**](BlockchainsAssetsBetaApi.md#list_assets) | **GET** /assets | List assets +[**list_blockchains**](BlockchainsAssetsBetaApi.md#list_blockchains) | **GET** /blockchains | List blockchains + + +# **get_asset_by_id** +> AssetResponseBeta get_asset_by_id(id, idempotency_key=idempotency_key) + +Get an asset + +Returns an asset by ID or legacyID.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + + +```python +from fireblocks.models.asset_response_beta import AssetResponseBeta +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + id = 'ETH' # str | The ID or legacyId of the asset + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Get an asset + api_response = fireblocks.blockchains_assets_beta.get_asset_by_id(id, idempotency_key=idempotency_key).result() + print("The response of BlockchainsAssetsBetaApi->get_asset_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BlockchainsAssetsBetaApi->get_asset_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID or legacyId of the asset | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**AssetResponseBeta**](AssetResponseBeta.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Asset with requested identification | * X-Request-ID -
| +**404** | - Asset with specified ID or legacy ID is not found. Error code 1504 | - | +**500** | Error occurred while getting an asset | - | +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_blockchain_by_id** +> BlockchainResponse get_blockchain_by_id(id) + +Get an blockchain + +Returns an blockchain by ID or legacyID.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + + +```python +from fireblocks.models.blockchain_response import BlockchainResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + id = 'ETH' # str | The ID or legacyId of the blockchain + + try: + # Get an blockchain + api_response = fireblocks.blockchains_assets_beta.get_blockchain_by_id(id).result() + print("The response of BlockchainsAssetsBetaApi->get_blockchain_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BlockchainsAssetsBetaApi->get_blockchain_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The ID or legacyId of the blockchain | + +### Return type + +[**BlockchainResponse**](BlockchainResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Blockchain with requested identification | * X-Request-ID -
| +**404** | - Blockchain with specified ID or legacy ID is not found. Error code 1505 | - | +**500** | Error occurred while getting an blockchain | - | +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_assets** +> ListAssetsResponse list_assets(blockchain_id=blockchain_id, asset_class=asset_class, symbol=symbol, scope=scope, deprecated=deprecated, page_cursor=page_cursor, page_size=page_size, idempotency_key=idempotency_key) + +List assets + +Returns all asset type supported by Fireblocks.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + + +```python +from fireblocks.models.asset_class_beta import AssetClassBeta +from fireblocks.models.list_assets_response import ListAssetsResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + blockchain_id = '0f672204-a28b-464a-b318-a387abd3d3c7' # str | Blockchain id of the assets (optional) + asset_class = fireblocks.AssetClassBeta() # AssetClassBeta | Assets class (optional) + symbol = 'ETH' # str | Assets onchain symbol (optional) + scope = 'Global' # str | Scope of the assets (optional) + deprecated = false # bool | Are assets deprecated (optional) + page_cursor = 'MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==' # str | Next page cursor to fetch (optional) + page_size = 500 # float | Items per page (optional) (default to 500) + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # List assets + api_response = fireblocks.blockchains_assets_beta.list_assets(blockchain_id=blockchain_id, asset_class=asset_class, symbol=symbol, scope=scope, deprecated=deprecated, page_cursor=page_cursor, page_size=page_size, idempotency_key=idempotency_key).result() + print("The response of BlockchainsAssetsBetaApi->list_assets:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BlockchainsAssetsBetaApi->list_assets: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **blockchain_id** | **str**| Blockchain id of the assets | [optional] + **asset_class** | [**AssetClassBeta**](.md)| Assets class | [optional] + **symbol** | **str**| Assets onchain symbol | [optional] + **scope** | **str**| Scope of the assets | [optional] + **deprecated** | **bool**| Are assets deprecated | [optional] + **page_cursor** | **str**| Next page cursor to fetch | [optional] + **page_size** | **float**| Items per page | [optional] [default to 500] + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**ListAssetsResponse**](ListAssetsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of assets | - | +**500** | Error occurred while listing assets | - | +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_blockchains** +> ListBlockchainsResponse list_blockchains(protocol=protocol, deprecated=deprecated, test=test, page_cursor=page_cursor, page_size=page_size) + +List blockchains + +Returns all blockchains supported by Fireblocks.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + +### Example + + +```python +from fireblocks.models.list_blockchains_response import ListBlockchainsResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + protocol = 'SOL' # str | Blockchain protocol (optional) + deprecated = false # bool | Is blockchain deprecated (optional) + test = false # bool | Is test blockchain (optional) + page_cursor = 'MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==' # str | Page cursor to fetch (optional) + page_size = 500 # float | Items per page (max 500) (optional) (default to 500) + + try: + # List blockchains + api_response = fireblocks.blockchains_assets_beta.list_blockchains(protocol=protocol, deprecated=deprecated, test=test, page_cursor=page_cursor, page_size=page_size).result() + print("The response of BlockchainsAssetsBetaApi->list_blockchains:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BlockchainsAssetsBetaApi->list_blockchains: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **protocol** | **str**| Blockchain protocol | [optional] + **deprecated** | **bool**| Is blockchain deprecated | [optional] + **test** | **bool**| Is test blockchain | [optional] + **page_cursor** | **str**| Page cursor to fetch | [optional] + **page_size** | **float**| Items per page (max 500) | [optional] [default to 500] + +### Return type + +[**ListBlockchainsResponse**](ListBlockchainsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of supported blockchains | - | +**500** | Error occurred while listing blockchains | - | +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CallbackHandler.md b/docs/CallbackHandler.md new file mode 100644 index 00000000..d413ce0e --- /dev/null +++ b/docs/CallbackHandler.md @@ -0,0 +1,31 @@ +# CallbackHandler + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The callback handler's URL | +**public_key** | **str** | The callback handler's public key | [optional] +**cert_public_key_hash** | **str** | A hashed representation of the public key of the callback handler's certificate | [optional] + +## Example + +```python +from fireblocks.models.callback_handler import CallbackHandler + +# TODO update the JSON string below +json = "{}" +# create an instance of CallbackHandler from a JSON string +callback_handler_instance = CallbackHandler.from_json(json) +# print the JSON string representation of the object +print(CallbackHandler.to_json()) + +# convert the object into a dict +callback_handler_dict = callback_handler_instance.to_dict() +# create an instance of CallbackHandler from a dict +callback_handler_from_dict = CallbackHandler.from_dict(callback_handler_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CallbackHandlerRequest.md b/docs/CallbackHandlerRequest.md new file mode 100644 index 00000000..0b145e62 --- /dev/null +++ b/docs/CallbackHandlerRequest.md @@ -0,0 +1,31 @@ +# CallbackHandlerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The callback handler's URL | +**public_key** | **str** | The callback handler's public key | [optional] +**cert** | **str** | The callback handler's certificate | [optional] + +## Example + +```python +from fireblocks.models.callback_handler_request import CallbackHandlerRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CallbackHandlerRequest from a JSON string +callback_handler_request_instance = CallbackHandlerRequest.from_json(json) +# print the JSON string representation of the object +print(CallbackHandlerRequest.to_json()) + +# convert the object into a dict +callback_handler_request_dict = callback_handler_request_instance.to_dict() +# create an instance of CallbackHandlerRequest from a dict +callback_handler_request_from_dict = CallbackHandlerRequest.from_dict(callback_handler_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChainDescriptor.md b/docs/ChainDescriptor.md new file mode 100644 index 00000000..4b22783c --- /dev/null +++ b/docs/ChainDescriptor.md @@ -0,0 +1,11 @@ +# ChainDescriptor + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChainInfoResponseDto.md b/docs/ChainInfoResponse.md similarity index 55% rename from docs/ChainInfoResponseDto.md rename to docs/ChainInfoResponse.md index 23dffe2a..4e2add7d 100644 --- a/docs/ChainInfoResponseDto.md +++ b/docs/ChainInfoResponse.md @@ -1,4 +1,4 @@ -# ChainInfoResponseDto +# ChainInfoResponse ## Properties @@ -9,24 +9,24 @@ Name | Type | Description | Notes **current_epoch** | **float** | The current epoch number of the blockchain network. | **epoch_elapsed** | **float** | The percentage of time that has elapsed within the current epoch, represented as a decimal value between 0 and 1. | **epoch_duration** | **float** | The total duration in milliseconds of a single epoch. | -**additional_info** | [**AdditionalInfoDto**](AdditionalInfoDto.md) | Additional information related to the blockchain. This may include extra details about the blockchain network. | +**additional_info** | [**AdditionalInfo**](AdditionalInfo.md) | | ## Example ```python -from fireblocks.models.chain_info_response_dto import ChainInfoResponseDto +from fireblocks.models.chain_info_response import ChainInfoResponse # TODO update the JSON string below json = "{}" -# create an instance of ChainInfoResponseDto from a JSON string -chain_info_response_dto_instance = ChainInfoResponseDto.from_json(json) +# create an instance of ChainInfoResponse from a JSON string +chain_info_response_instance = ChainInfoResponse.from_json(json) # print the JSON string representation of the object -print(ChainInfoResponseDto.to_json()) +print(ChainInfoResponse.to_json()) # convert the object into a dict -chain_info_response_dto_dict = chain_info_response_dto_instance.to_dict() -# create an instance of ChainInfoResponseDto from a dict -chain_info_response_dto_from_dict = ChainInfoResponseDto.from_dict(chain_info_response_dto_dict) +chain_info_response_dict = chain_info_response_instance.to_dict() +# create an instance of ChainInfoResponse from a dict +chain_info_response_from_dict = ChainInfoResponse.from_dict(chain_info_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ClaimRewardsRequest.md b/docs/ClaimRewardsRequest.md new file mode 100644 index 00000000..14fae2b8 --- /dev/null +++ b/docs/ClaimRewardsRequest.md @@ -0,0 +1,32 @@ +# ClaimRewardsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | id of position to withdraw rewards from | +**fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] +**fee_level** | [**FeeLevel**](FeeLevel.md) | | [optional] +**tx_note** | **str** | The note to associate with the transactions. | [optional] + +## Example + +```python +from fireblocks.models.claim_rewards_request import ClaimRewardsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ClaimRewardsRequest from a JSON string +claim_rewards_request_instance = ClaimRewardsRequest.from_json(json) +# print the JSON string representation of the object +print(ClaimRewardsRequest.to_json()) + +# convert the object into a dict +claim_rewards_request_dict = claim_rewards_request_instance.to_dict() +# create an instance of ClaimRewardsRequest from a dict +claim_rewards_request_from_dict = ClaimRewardsRequest.from_dict(claim_rewards_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index 369341af..d7905f3b 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**get_aml_screening_policy**](ComplianceApi.md#get_aml_screening_policy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy [**get_post_screening_policy**](ComplianceApi.md#get_post_screening_policy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy [**get_screening_policy**](ComplianceApi.md#get_screening_policy) | **GET** /screening/travel_rule/screening_policy | Travel Rule - View Screening Policy +[**retry_rejected_transaction_bypass_screening_checks**](ComplianceApi.md#retry_rejected_transaction_bypass_screening_checks) | **POST** /screening/transaction/{txId}/bypass_screening_policy | Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check [**update_aml_screening_configuration**](ComplianceApi.md#update_aml_screening_configuration) | **PUT** /screening/aml/policy_configuration | Update AML Configuration [**update_screening_configuration**](ComplianceApi.md#update_screening_configuration) | **PUT** /screening/configurations | Tenant - Screening Configuration [**update_travel_rule_config**](ComplianceApi.md#update_travel_rule_config) | **PUT** /screening/travel_rule/policy_configuration | Update Travel Rule Configuration @@ -289,6 +290,82 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **retry_rejected_transaction_bypass_screening_checks** +> CreateTransactionResponse retry_rejected_transaction_bypass_screening_checks(tx_id, idempotency_key=idempotency_key) + +Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check + +This endpoint is restricted to Admin API users and is only applicable to outgoing transactions. + +### Example + + +```python +from fireblocks.models.create_transaction_response import CreateTransactionResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + tx_id = '550e8400-e29b-41d4-a716-446655440000' # str | The transaction id that was rejected by screening checks + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check + api_response = fireblocks.compliance.retry_rejected_transaction_bypass_screening_checks(tx_id, idempotency_key=idempotency_key).result() + print("The response of ComplianceApi->retry_rejected_transaction_bypass_screening_checks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ComplianceApi->retry_rejected_transaction_bypass_screening_checks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tx_id** | **str**| The transaction id that was rejected by screening checks | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**CreateTransactionResponse**](CreateTransactionResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | A transaction object | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_aml_screening_configuration** > ScreeningConfigurationsRequest update_aml_screening_configuration(idempotency_key=idempotency_key) diff --git a/docs/Cosigner.md b/docs/Cosigner.md index f2aadbd3..a82716dd 100644 --- a/docs/Cosigner.md +++ b/docs/Cosigner.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **archived** | **bool** | Whether the cosigner is archived | **id** | **str** | The unique identifier of the cosigner | **name** | **str** | The name of the cosigner | [optional] +**type** | **str** | The type of the cosigner | [optional] +**version** | [**Version**](Version.md) | | [optional] ## Example diff --git a/docs/CosignersBetaApi.md b/docs/CosignersBetaApi.md index cab96e1d..12bccce6 100644 --- a/docs/CosignersBetaApi.md +++ b/docs/CosignersBetaApi.md @@ -4,13 +4,95 @@ All URIs are relative to *https://api.fireblocks.io/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**add_cosigner**](CosignersBetaApi.md#add_cosigner) | **POST** /cosigners | Add cosigner [**get_api_key**](CosignersBetaApi.md#get_api_key) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Get API key [**get_api_keys**](CosignersBetaApi.md#get_api_keys) | **GET** /cosigners/{cosignerId}/api_keys | Get all API keys [**get_cosigner**](CosignersBetaApi.md#get_cosigner) | **GET** /cosigners/{cosignerId} | Get cosigner [**get_cosigners**](CosignersBetaApi.md#get_cosigners) | **GET** /cosigners | Get all cosigners +[**get_request_status**](CosignersBetaApi.md#get_request_status) | **GET** /cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId} | Get request status +[**pair_api_key**](CosignersBetaApi.md#pair_api_key) | **PUT** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Pair API key [**rename_cosigner**](CosignersBetaApi.md#rename_cosigner) | **PATCH** /cosigners/{cosignerId} | Rename cosigner +[**unpair_api_key**](CosignersBetaApi.md#unpair_api_key) | **DELETE** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Unpair API key +[**update_callback_handler**](CosignersBetaApi.md#update_callback_handler) | **PATCH** /cosigners/{cosignerId}/api_keys/{apiKeyId} | Update API key callback handler +# **add_cosigner** +> AddCosignerResponse add_cosigner(add_cosigner_request, idempotency_key=idempotency_key) + +Add cosigner + +Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired + +### Example + + +```python +from fireblocks.models.add_cosigner_request import AddCosignerRequest +from fireblocks.models.add_cosigner_response import AddCosignerResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + add_cosigner_request = fireblocks.AddCosignerRequest() # AddCosignerRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Add cosigner + api_response = fireblocks.cosigners_beta.add_cosigner(add_cosigner_request, idempotency_key=idempotency_key).result() + print("The response of CosignersBetaApi->add_cosigner:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CosignersBetaApi->add_cosigner: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **add_cosigner_request** | [**AddCosignerRequest**](AddCosignerRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**AddCosignerResponse**](AddCosignerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Pending cosigner added | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_api_key** > ApiKey get_api_key(cosigner_id, api_key_id) @@ -92,7 +174,7 @@ No authorization required Get all API keys -Get all cosigner paired API keys (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. +Get all cosigner paired API keys (paginated) ### Example @@ -319,6 +401,165 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_request_status** +> Status get_request_status(cosigner_id, api_key_id, request_id) + +Get request status + +Get the status of an asynchronous request + +### Example + + +```python +from fireblocks.models.status import Status +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + cosigner_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the cosigner + api_key_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the API key + request_id = 'request_id_example' # str | + + try: + # Get request status + api_response = fireblocks.cosigners_beta.get_request_status(cosigner_id, api_key_id, request_id).result() + print("The response of CosignersBetaApi->get_request_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CosignersBetaApi->get_request_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cosigner_id** | **str**| The unique identifier of the cosigner | + **api_key_id** | **str**| The unique identifier of the API key | + **request_id** | **str**| | + +### Return type + +[**Status**](Status.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The status of the request | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **pair_api_key** +> PairApiKeyResponse pair_api_key(cosigner_id, api_key_id, pair_api_key_request, idempotency_key=idempotency_key) + +Pair API key + +Pair an API key to a cosigner + +### Example + + +```python +from fireblocks.models.pair_api_key_request import PairApiKeyRequest +from fireblocks.models.pair_api_key_response import PairApiKeyResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + cosigner_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the cosigner + api_key_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the API key + pair_api_key_request = fireblocks.PairApiKeyRequest() # PairApiKeyRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Pair API key + api_response = fireblocks.cosigners_beta.pair_api_key(cosigner_id, api_key_id, pair_api_key_request, idempotency_key=idempotency_key).result() + print("The response of CosignersBetaApi->pair_api_key:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CosignersBetaApi->pair_api_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cosigner_id** | **str**| The unique identifier of the cosigner | + **api_key_id** | **str**| The unique identifier of the API key | + **pair_api_key_request** | [**PairApiKeyRequest**](PairApiKeyRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**PairApiKeyResponse**](PairApiKeyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | The API key object to be paired | * X-Request-ID -
* Location -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **rename_cosigner** > Cosigner rename_cosigner(cosigner_id, rename_cosigner) @@ -396,3 +637,158 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **unpair_api_key** +> ApiKey unpair_api_key(cosigner_id, api_key_id) + +Unpair API key + +Unpair an API key from a cosigner + +### Example + + +```python +from fireblocks.models.api_key import ApiKey +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + cosigner_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the cosigner + api_key_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the API key + + try: + # Unpair API key + api_response = fireblocks.cosigners_beta.unpair_api_key(cosigner_id, api_key_id).result() + print("The response of CosignersBetaApi->unpair_api_key:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CosignersBetaApi->unpair_api_key: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cosigner_id** | **str**| The unique identifier of the cosigner | + **api_key_id** | **str**| The unique identifier of the API key | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | The API key object to be unpaired | * X-Request-ID -
* Location -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_callback_handler** +> UpdateCallbackHandlerResponse update_callback_handler(cosigner_id, api_key_id, update_callback_handler_request) + +Update API key callback handler + +Update the callback handler of an API key + +### Example + + +```python +from fireblocks.models.update_callback_handler_request import UpdateCallbackHandlerRequest +from fireblocks.models.update_callback_handler_response import UpdateCallbackHandlerResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + cosigner_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the cosigner + api_key_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the API key + update_callback_handler_request = fireblocks.UpdateCallbackHandlerRequest() # UpdateCallbackHandlerRequest | + + try: + # Update API key callback handler + api_response = fireblocks.cosigners_beta.update_callback_handler(cosigner_id, api_key_id, update_callback_handler_request).result() + print("The response of CosignersBetaApi->update_callback_handler:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CosignersBetaApi->update_callback_handler: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cosigner_id** | **str**| The unique identifier of the cosigner | + **api_key_id** | **str**| The unique identifier of the API key | + **update_callback_handler_request** | [**UpdateCallbackHandlerRequest**](UpdateCallbackHandlerRequest.md)| | + +### Return type + +[**UpdateCallbackHandlerResponse**](UpdateCallbackHandlerResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | The API key object with the new callback handler | * X-Request-ID -
* Location -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CreateWebhookRequest.md b/docs/CreateWebhookRequest.md new file mode 100644 index 00000000..ea2b71dc --- /dev/null +++ b/docs/CreateWebhookRequest.md @@ -0,0 +1,32 @@ +# CreateWebhookRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The url of the webhook where notifications will be sent. URL must be valid, unique and https. | +**description** | **str** | description of the webhook. should not contain special characters. | +**events** | [**List[WebhookEvent]**](WebhookEvent.md) | event types the webhook will subscribe to | +**enabled** | **bool** | The status of the webhook. If false, the webhook will not receive notifications. | [optional] [default to True] + +## Example + +```python +from fireblocks.models.create_webhook_request import CreateWebhookRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateWebhookRequest from a JSON string +create_webhook_request_instance = CreateWebhookRequest.from_json(json) +# print the JSON string representation of the object +print(CreateWebhookRequest.to_json()) + +# convert the object into a dict +create_webhook_request_dict = create_webhook_request_instance.to_dict() +# create an instance of CreateWebhookRequest from a dict +create_webhook_request_from_dict = CreateWebhookRequest.from_dict(create_webhook_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DelegationDto.md b/docs/Delegation.md similarity index 50% rename from docs/DelegationDto.md rename to docs/Delegation.md index 39755ad0..dea80f70 100644 --- a/docs/DelegationDto.md +++ b/docs/Delegation.md @@ -1,4 +1,4 @@ -# DelegationDto +# Delegation ## Properties @@ -13,33 +13,33 @@ Name | Type | Description | Notes **amount** | **str** | Amount of tokens to stake, measured in the staked asset unit. | **rewards_amount** | **str** | The amount staked in the position, measured in the staked asset unit. | **date_created** | **datetime** | When was the request made (ISO Date). | -**date_updated** | **datetime** | When has the position last changed (ISO Date). | [optional] +**date_updated** | **datetime** | When has the position last changed (ISO Date). | **status** | **str** | The current status. | -**related_transactions** | [**List[RelatedTransactionDto]**](RelatedTransactionDto.md) | An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed. | +**related_transactions** | [**List[RelatedTransaction]**](RelatedTransaction.md) | An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed. | **validator_address** | **str** | The destination address of the staking transaction. | -**provider_id** | **str** | The unique identifier of the staking provider | +**provider_id** | [**StakingProvider**](StakingProvider.md) | | **available_actions** | **List[str]** | An array of available actions that can be performed. for example, actions like \"unstake\" or \"withdraw\". | **in_progress** | **bool** | Indicates whether there is an ongoing action for this position (true if ongoing, false if not). | **in_progress_tx_id** | **str** | The transaction ID of the ongoing request | [optional] -**blockchain_position_info** | [**SolanaBlockchainDataDto**](SolanaBlockchainDataDto.md) | Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. | -**related_requests** | [**List[RelatedRequestDto]**](RelatedRequestDto.md) | An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers. | [optional] +**blockchain_position_info** | [**SolanaBlockchainData**](SolanaBlockchainData.md) | | +**related_requests** | [**List[RelatedRequest]**](RelatedRequest.md) | An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers. | [optional] ## Example ```python -from fireblocks.models.delegation_dto import DelegationDto +from fireblocks.models.delegation import Delegation # TODO update the JSON string below json = "{}" -# create an instance of DelegationDto from a JSON string -delegation_dto_instance = DelegationDto.from_json(json) +# create an instance of Delegation from a JSON string +delegation_instance = Delegation.from_json(json) # print the JSON string representation of the object -print(DelegationDto.to_json()) +print(Delegation.to_json()) # convert the object into a dict -delegation_dto_dict = delegation_dto_instance.to_dict() -# create an instance of DelegationDto from a dict -delegation_dto_from_dict = DelegationDto.from_dict(delegation_dto_dict) +delegation_dict = delegation_instance.to_dict() +# create an instance of Delegation from a dict +delegation_from_dict = Delegation.from_dict(delegation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DelegationSummaryDto.md b/docs/DelegationSummary.md similarity index 71% rename from docs/DelegationSummaryDto.md rename to docs/DelegationSummary.md index ce12433d..275470dd 100644 --- a/docs/DelegationSummaryDto.md +++ b/docs/DelegationSummary.md @@ -1,4 +1,4 @@ -# DelegationSummaryDto +# DelegationSummary ## Properties @@ -13,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto +from fireblocks.models.delegation_summary import DelegationSummary # TODO update the JSON string below json = "{}" -# create an instance of DelegationSummaryDto from a JSON string -delegation_summary_dto_instance = DelegationSummaryDto.from_json(json) +# create an instance of DelegationSummary from a JSON string +delegation_summary_instance = DelegationSummary.from_json(json) # print the JSON string representation of the object -print(DelegationSummaryDto.to_json()) +print(DelegationSummary.to_json()) # convert the object into a dict -delegation_summary_dto_dict = delegation_summary_dto_instance.to_dict() -# create an instance of DelegationSummaryDto from a dict -delegation_summary_dto_from_dict = DelegationSummaryDto.from_dict(delegation_summary_dto_dict) +delegation_summary_dict = delegation_summary_instance.to_dict() +# create an instance of DelegationSummary from a dict +delegation_summary_from_dict = DelegationSummary.from_dict(delegation_summary_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EmbeddedWalletsApi.md b/docs/EmbeddedWalletsApi.md new file mode 100644 index 00000000..68a2580e --- /dev/null +++ b/docs/EmbeddedWalletsApi.md @@ -0,0 +1,174 @@ +# fireblocks.EmbeddedWalletsApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_public_key_info_for_address_ncw**](EmbeddedWalletsApi.md#get_public_key_info_for_address_ncw) | **GET** /ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info | Get the public key of an asset +[**get_public_key_info_ncw**](EmbeddedWalletsApi.md#get_public_key_info_ncw) | **GET** /ncw/{walletId}/public_key_info | Get the public key for a derivation path + + +# **get_public_key_info_for_address_ncw** +> PublicKeyInformation get_public_key_info_for_address_ncw(wallet_id, account_id, asset_id, change, address_index, compressed=compressed) + +Get the public key of an asset + +Gets the public key of an asset associated with a specific account within a Non-Custodial Wallet + +### Example + + +```python +from fireblocks.models.public_key_information import PublicKeyInformation +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + wallet_id = '550e8400-e29b-41d4-a716-446655440000' # str | The ID of the Non-Custodial wallet + account_id = '0' # str | The ID of the account + asset_id = 'BTC' # str | The ID of the asset + change = 0 # float | BIP44 derivation path - change value + address_index = 0 # float | BIP44 derivation path - index value + compressed = True # bool | Compressed/Uncompressed public key format (optional) + + try: + # Get the public key of an asset + api_response = fireblocks.embedded_wallets.get_public_key_info_for_address_ncw(wallet_id, account_id, asset_id, change, address_index, compressed=compressed).result() + print("The response of EmbeddedWalletsApi->get_public_key_info_for_address_ncw:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EmbeddedWalletsApi->get_public_key_info_for_address_ncw: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wallet_id** | **str**| The ID of the Non-Custodial wallet | + **account_id** | **str**| The ID of the account | + **asset_id** | **str**| The ID of the asset | + **change** | **float**| BIP44 derivation path - change value | + **address_index** | **float**| BIP44 derivation path - index value | + **compressed** | **bool**| Compressed/Uncompressed public key format | [optional] + +### Return type + +[**PublicKeyInformation**](PublicKeyInformation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Public Key Information | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_public_key_info_ncw** +> PublicKeyInformation get_public_key_info_ncw(wallet_id, derivation_path, algorithm, compressed=compressed) + +Get the public key for a derivation path + +Gets the public key information based on derivation path and signing algorithm within a Non-Custodial Wallet + +### Example + + +```python +from fireblocks.models.public_key_information import PublicKeyInformation +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + wallet_id = '550e8400-e29b-41d4-a716-446655440000' # str | The ID of the Non-Custodial wallet + derivation_path = '[44,0,0,0,0]' # str | An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. + algorithm = 'algorithm_example' # str | Elliptic Curve + compressed = True # bool | (optional) + + try: + # Get the public key for a derivation path + api_response = fireblocks.embedded_wallets.get_public_key_info_ncw(wallet_id, derivation_path, algorithm, compressed=compressed).result() + print("The response of EmbeddedWalletsApi->get_public_key_info_ncw:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EmbeddedWalletsApi->get_public_key_info_ncw: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wallet_id** | **str**| The ID of the Non-Custodial wallet | + **derivation_path** | **str**| An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. | + **algorithm** | **str**| Elliptic Curve | + **compressed** | **bool**| | [optional] + +### Return type + +[**PublicKeyInformation**](PublicKeyInformation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Public key information | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ExecuteActionRequest.md b/docs/ExecuteActionRequest.md deleted file mode 100644 index fd0e3387..00000000 --- a/docs/ExecuteActionRequest.md +++ /dev/null @@ -1,36 +0,0 @@ -# ExecuteActionRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**vault_account_id** | **str** | The source vault account to stake from | -**provider_id** | **str** | The ID of the provider | -**stake_amount** | **str** | Amount of tokens to stake | -**tx_note** | **str** | The note to associate with the transactions. | [optional] -**fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] -**fee_level** | **str** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] -**id** | **str** | id of position to withdraw | -**amount** | **str** | The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default. | [optional] - -## Example - -```python -from fireblocks.models.execute_action_request import ExecuteActionRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ExecuteActionRequest from a JSON string -execute_action_request_instance = ExecuteActionRequest.from_json(json) -# print the JSON string representation of the object -print(ExecuteActionRequest.to_json()) - -# convert the object into a dict -execute_action_request_dict = execute_action_request_instance.to_dict() -# create an instance of ExecuteActionRequest from a dict -execute_action_request_from_dict = ExecuteActionRequest.from_dict(execute_action_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ExecuteActionResponse.md b/docs/ExecuteActionResponse.md deleted file mode 100644 index 222c69b5..00000000 --- a/docs/ExecuteActionResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# ExecuteActionResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The unique identifier of the staking position | - -## Example - -```python -from fireblocks.models.execute_action_response import ExecuteActionResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ExecuteActionResponse from a JSON string -execute_action_response_instance = ExecuteActionResponse.from_json(json) -# print the JSON string representation of the object -print(ExecuteActionResponse.to_json()) - -# convert the object into a dict -execute_action_response_dict = execute_action_response_instance.to_dict() -# create an instance of ExecuteActionResponse from a dict -execute_action_response_from_dict = ExecuteActionResponse.from_dict(execute_action_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FeeLevel.md b/docs/FeeLevel.md new file mode 100644 index 00000000..17911f78 --- /dev/null +++ b/docs/FeeLevel.md @@ -0,0 +1,12 @@ +# FeeLevel + +Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetMpcKeysResponse.md b/docs/GetMpcKeysResponse.md new file mode 100644 index 00000000..db220211 --- /dev/null +++ b/docs/GetMpcKeysResponse.md @@ -0,0 +1,30 @@ +# GetMpcKeysResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tenant_id** | **str** | The workspace id of the keys | +**keys** | [**List[MpcKey]**](MpcKey.md) | The keys that are associated with the workspace | + +## Example + +```python +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetMpcKeysResponse from a JSON string +get_mpc_keys_response_instance = GetMpcKeysResponse.from_json(json) +# print the JSON string representation of the object +print(GetMpcKeysResponse.to_json()) + +# convert the object into a dict +get_mpc_keys_response_dict = get_mpc_keys_response_instance.to_dict() +# create an instance of GetMpcKeysResponse from a dict +get_mpc_keys_response_from_dict = GetMpcKeysResponse.from_dict(get_mpc_keys_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeysBetaApi.md b/docs/KeysBetaApi.md new file mode 100644 index 00000000..c235d126 --- /dev/null +++ b/docs/KeysBetaApi.md @@ -0,0 +1,154 @@ +# fireblocks.KeysBetaApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_mpc_keys_list**](KeysBetaApi.md#get_mpc_keys_list) | **GET** /keys/mpc/list | Get list of mpc keys +[**get_mpc_keys_list_by_user**](KeysBetaApi.md#get_mpc_keys_list_by_user) | **GET** /keys/mpc/list/{userId} | Get list of mpc keys by `userId` + + +# **get_mpc_keys_list** +> GetMpcKeysResponse get_mpc_keys_list() + +Get list of mpc keys + +Returns a list of MPC signing keys of the workspace. For each key, the list of players associated with it is attached. **Note:** This endpoint is currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + + try: + # Get list of mpc keys + api_response = fireblocks.keys_beta.get_mpc_keys_list().result() + print("The response of KeysBetaApi->get_mpc_keys_list:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling KeysBetaApi->get_mpc_keys_list: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GetMpcKeysResponse**](GetMpcKeysResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of mpc keys | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_mpc_keys_list_by_user** +> GetMpcKeysResponse get_mpc_keys_list_by_user(user_id) + +Get list of mpc keys by `userId` + +Returns a list of MPC signing keys of a specific user. For each key, the list of players associated with it is attached. **Note:** This endpoint is currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + user_id = '46a92767-5f93-4a46-9eed-f012196bb4fc' # str | The id for the user + + try: + # Get list of mpc keys by `userId` + api_response = fireblocks.keys_beta.get_mpc_keys_list_by_user(user_id).result() + print("The response of KeysBetaApi->get_mpc_keys_list_by_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling KeysBetaApi->get_mpc_keys_list_by_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user_id** | **str**| The id for the user | + +### Return type + +[**GetMpcKeysResponse**](GetMpcKeysResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of mpc keys | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ListAssetsResponse.md b/docs/ListAssetsResponse.md new file mode 100644 index 00000000..bdc10132 --- /dev/null +++ b/docs/ListAssetsResponse.md @@ -0,0 +1,30 @@ +# ListAssetsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[AssetResponseBeta]**](AssetResponseBeta.md) | The data of the current page | +**next** | **str** | Cursor to the next page | + +## Example + +```python +from fireblocks.models.list_assets_response import ListAssetsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListAssetsResponse from a JSON string +list_assets_response_instance = ListAssetsResponse.from_json(json) +# print the JSON string representation of the object +print(ListAssetsResponse.to_json()) + +# convert the object into a dict +list_assets_response_dict = list_assets_response_instance.to_dict() +# create an instance of ListAssetsResponse from a dict +list_assets_response_from_dict = ListAssetsResponse.from_dict(list_assets_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListBlockchainsResponse.md b/docs/ListBlockchainsResponse.md new file mode 100644 index 00000000..317c98c3 --- /dev/null +++ b/docs/ListBlockchainsResponse.md @@ -0,0 +1,30 @@ +# ListBlockchainsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[BlockchainResponse]**](BlockchainResponse.md) | The data of the current page | +**next** | **str** | Cursor to the next page | + +## Example + +```python +from fireblocks.models.list_blockchains_response import ListBlockchainsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListBlockchainsResponse from a JSON string +list_blockchains_response_instance = ListBlockchainsResponse.from_json(json) +# print the JSON string representation of the object +print(ListBlockchainsResponse.to_json()) + +# convert the object into a dict +list_blockchains_response_dict = list_blockchains_response_instance.to_dict() +# create an instance of ListBlockchainsResponse from a dict +list_blockchains_response_from_dict = ListBlockchainsResponse.from_dict(list_blockchains_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MpcKey.md b/docs/MpcKey.md new file mode 100644 index 00000000..1ad0f0f6 --- /dev/null +++ b/docs/MpcKey.md @@ -0,0 +1,33 @@ +# MpcKey + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key_id** | **str** | | +**user_id** | **str** | The user id that owns the key | +**algorithm** | **float** | The algorithm of the key | +**players** | [**List[Players]**](Players.md) | The players that are associated with the key | +**last_preprocessed_index** | **float** | The last index used on this key | [optional] + +## Example + +```python +from fireblocks.models.mpc_key import MpcKey + +# TODO update the JSON string below +json = "{}" +# create an instance of MpcKey from a JSON string +mpc_key_instance = MpcKey.from_json(json) +# print the JSON string representation of the object +print(MpcKey.to_json()) + +# convert the object into a dict +mpc_key_dict = mpc_key_instance.to_dict() +# create an instance of MpcKey from a dict +mpc_key_from_dict = MpcKey.from_dict(mpc_key_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Notification.md b/docs/Notification.md new file mode 100644 index 00000000..76cdc7c7 --- /dev/null +++ b/docs/Notification.md @@ -0,0 +1,36 @@ +# Notification + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The id of the Notification | +**created_at** | **datetime** | The creation date of the notification | +**updated_at** | **datetime** | The date when the notification was updated | +**status** | [**NotificationStatus**](NotificationStatus.md) | | +**event_type** | [**WebhookEvent**](WebhookEvent.md) | | +**event_version** | **float** | The event version of the Notification | +**resource_id** | **str** | The resource id of the event which the Notification is listen to | [optional] +**attempts** | **List[str]** | The attempts related to Notification | [optional] [default to []] + +## Example + +```python +from fireblocks.models.notification import Notification + +# TODO update the JSON string below +json = "{}" +# create an instance of Notification from a JSON string +notification_instance = Notification.from_json(json) +# print the JSON string representation of the object +print(Notification.to_json()) + +# convert the object into a dict +notification_dict = notification_instance.to_dict() +# create an instance of Notification from a dict +notification_from_dict = Notification.from_dict(notification_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationPaginatedResponse.md b/docs/NotificationPaginatedResponse.md new file mode 100644 index 00000000..00000554 --- /dev/null +++ b/docs/NotificationPaginatedResponse.md @@ -0,0 +1,30 @@ +# NotificationPaginatedResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[Notification]**](Notification.md) | The data of the current page | +**next** | **str** | The ID of the next page | [optional] + +## Example + +```python +from fireblocks.models.notification_paginated_response import NotificationPaginatedResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationPaginatedResponse from a JSON string +notification_paginated_response_instance = NotificationPaginatedResponse.from_json(json) +# print the JSON string representation of the object +print(NotificationPaginatedResponse.to_json()) + +# convert the object into a dict +notification_paginated_response_dict = notification_paginated_response_instance.to_dict() +# create an instance of NotificationPaginatedResponse from a dict +notification_paginated_response_from_dict = NotificationPaginatedResponse.from_dict(notification_paginated_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationStatus.md b/docs/NotificationStatus.md new file mode 100644 index 00000000..c5b0d162 --- /dev/null +++ b/docs/NotificationStatus.md @@ -0,0 +1,12 @@ +# NotificationStatus + +The status of the Notification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationWithData.md b/docs/NotificationWithData.md new file mode 100644 index 00000000..af6b1083 --- /dev/null +++ b/docs/NotificationWithData.md @@ -0,0 +1,37 @@ +# NotificationWithData + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**created_at** | **datetime** | The creation date of the notification | +**updated_at** | **datetime** | The date when the notification was updated | +**status** | [**NotificationStatus**](NotificationStatus.md) | | +**event_type** | [**WebhookEvent**](WebhookEvent.md) | | +**event_version** | **float** | The event version which the Notification is listen to | +**resource_id** | **str** | The resource id of the event which the Notification is listen to | [optional] +**attempts** | **List[str]** | The attempts related to Notification | [default to []] +**data** | **object** | notification data | [optional] + +## Example + +```python +from fireblocks.models.notification_with_data import NotificationWithData + +# TODO update the JSON string below +json = "{}" +# create an instance of NotificationWithData from a JSON string +notification_with_data_instance = NotificationWithData.from_json(json) +# print the JSON string representation of the object +print(NotificationWithData.to_json()) + +# convert the object into a dict +notification_with_data_dict = notification_with_data_instance.to_dict() +# create an instance of NotificationWithData from a dict +notification_with_data_from_dict = NotificationWithData.from_dict(notification_with_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PairApiKeyRequest.md b/docs/PairApiKeyRequest.md new file mode 100644 index 00000000..881c598d --- /dev/null +++ b/docs/PairApiKeyRequest.md @@ -0,0 +1,29 @@ +# PairApiKeyRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_handler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] + +## Example + +```python +from fireblocks.models.pair_api_key_request import PairApiKeyRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of PairApiKeyRequest from a JSON string +pair_api_key_request_instance = PairApiKeyRequest.from_json(json) +# print the JSON string representation of the object +print(PairApiKeyRequest.to_json()) + +# convert the object into a dict +pair_api_key_request_dict = pair_api_key_request_instance.to_dict() +# create an instance of PairApiKeyRequest from a dict +pair_api_key_request_from_dict = PairApiKeyRequest.from_dict(pair_api_key_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PairApiKeyResponse.md b/docs/PairApiKeyResponse.md new file mode 100644 index 00000000..d01f84c9 --- /dev/null +++ b/docs/PairApiKeyResponse.md @@ -0,0 +1,30 @@ +# PairApiKeyResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the API key | +**callback_handler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] + +## Example + +```python +from fireblocks.models.pair_api_key_response import PairApiKeyResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PairApiKeyResponse from a JSON string +pair_api_key_response_instance = PairApiKeyResponse.from_json(json) +# print the JSON string representation of the object +print(PairApiKeyResponse.to_json()) + +# convert the object into a dict +pair_api_key_response_dict = pair_api_key_response_instance.to_dict() +# create an instance of PairApiKeyResponse from a dict +pair_api_key_response_from_dict = PairApiKeyResponse.from_dict(pair_api_key_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Players.md b/docs/Players.md new file mode 100644 index 00000000..13bf0f05 --- /dev/null +++ b/docs/Players.md @@ -0,0 +1,30 @@ +# Players + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | id of the player | +**type** | **str** | Type of the player | + +## Example + +```python +from fireblocks.models.players import Players + +# TODO update the JSON string below +json = "{}" +# create an instance of Players from a JSON string +players_instance = Players.from_json(json) +# print the JSON string representation of the object +print(Players.to_json()) + +# convert the object into a dict +players_dict = players_instance.to_dict() +# create an instance of Players from a dict +players_from_dict = Players.from_dict(players_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Provider.md b/docs/Provider.md new file mode 100644 index 00000000..a4034c07 --- /dev/null +++ b/docs/Provider.md @@ -0,0 +1,36 @@ +# Provider + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The ID of the provider | +**provider_name** | **str** | Name of the provider | +**validators** | [**List[Validator]**](Validator.md) | An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider | +**icon_url** | **str** | URL to the validator's icon | [optional] +**terms_of_service_url** | **str** | URL to the terms of service | [optional] +**is_terms_of_service_approved** | **bool** | Indicates whether the terms of service are approved | +**is_private** | **bool** | Is the provider private, i.e created by the user | [optional] +**is_liquid_staking** | **bool** | Is the provider a liquid staking provider | + +## Example + +```python +from fireblocks.models.provider import Provider + +# TODO update the JSON string below +json = "{}" +# create an instance of Provider from a JSON string +provider_instance = Provider.from_json(json) +# print the JSON string representation of the object +print(Provider.to_json()) + +# convert the object into a dict +provider_dict = provider_instance.to_dict() +# create an instance of Provider from a dict +provider_from_dict = Provider.from_dict(provider_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProviderDto.md b/docs/ProviderDto.md deleted file mode 100644 index f03ab662..00000000 --- a/docs/ProviderDto.md +++ /dev/null @@ -1,34 +0,0 @@ -# ProviderDto - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The ID of the provider | -**provider_name** | **str** | Name of the provider | -**validators** | [**List[ValidatorDto]**](ValidatorDto.md) | An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider | -**icon_url** | **str** | URL to the validator's icon | -**terms_of_service_url** | **str** | URL to the terms of service | -**is_terms_of_service_approved** | **bool** | Indicates whether the terms of service are approved | - -## Example - -```python -from fireblocks.models.provider_dto import ProviderDto - -# TODO update the JSON string below -json = "{}" -# create an instance of ProviderDto from a JSON string -provider_dto_instance = ProviderDto.from_json(json) -# print the JSON string representation of the object -print(ProviderDto.to_json()) - -# convert the object into a dict -provider_dto_dict = provider_dto_instance.to_dict() -# create an instance of ProviderDto from a dict -provider_dto_from_dict = ProviderDto.from_dict(provider_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PublicKeyInformation.md b/docs/PublicKeyInformation.md index 717246b4..54188078 100644 --- a/docs/PublicKeyInformation.md +++ b/docs/PublicKeyInformation.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**algorithm** | **str** | | [optional] -**derivation_path** | **List[float]** | | [optional] -**public_key** | **str** | | [optional] +**algorithm** | **str** | Elliptic Curve | [optional] +**derivation_path** | **List[int]** | BIP44 derivation path | [optional] +**public_key** | **str** | Compressed/Uncompressed public key value in hex representation | [optional] ## Example diff --git a/docs/RelatedRequestDto.md b/docs/RelatedRequest.md similarity index 61% rename from docs/RelatedRequestDto.md rename to docs/RelatedRequest.md index 6b6e97ac..bfeaf498 100644 --- a/docs/RelatedRequestDto.md +++ b/docs/RelatedRequest.md @@ -1,4 +1,4 @@ -# RelatedRequestDto +# RelatedRequest ## Properties @@ -13,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.related_request_dto import RelatedRequestDto +from fireblocks.models.related_request import RelatedRequest # TODO update the JSON string below json = "{}" -# create an instance of RelatedRequestDto from a JSON string -related_request_dto_instance = RelatedRequestDto.from_json(json) +# create an instance of RelatedRequest from a JSON string +related_request_instance = RelatedRequest.from_json(json) # print the JSON string representation of the object -print(RelatedRequestDto.to_json()) +print(RelatedRequest.to_json()) # convert the object into a dict -related_request_dto_dict = related_request_dto_instance.to_dict() -# create an instance of RelatedRequestDto from a dict -related_request_dto_from_dict = RelatedRequestDto.from_dict(related_request_dto_dict) +related_request_dict = related_request_instance.to_dict() +# create an instance of RelatedRequest from a dict +related_request_from_dict = RelatedRequest.from_dict(related_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RelatedTransactionDto.md b/docs/RelatedTransaction.md similarity index 51% rename from docs/RelatedTransactionDto.md rename to docs/RelatedTransaction.md index 57225853..dc070fad 100644 --- a/docs/RelatedTransactionDto.md +++ b/docs/RelatedTransaction.md @@ -1,4 +1,4 @@ -# RelatedTransactionDto +# RelatedTransaction ## Properties @@ -11,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.related_transaction_dto import RelatedTransactionDto +from fireblocks.models.related_transaction import RelatedTransaction # TODO update the JSON string below json = "{}" -# create an instance of RelatedTransactionDto from a JSON string -related_transaction_dto_instance = RelatedTransactionDto.from_json(json) +# create an instance of RelatedTransaction from a JSON string +related_transaction_instance = RelatedTransaction.from_json(json) # print the JSON string representation of the object -print(RelatedTransactionDto.to_json()) +print(RelatedTransaction.to_json()) # convert the object into a dict -related_transaction_dto_dict = related_transaction_dto_instance.to_dict() -# create an instance of RelatedTransactionDto from a dict -related_transaction_dto_from_dict = RelatedTransactionDto.from_dict(related_transaction_dto_dict) +related_transaction_dict = related_transaction_instance.to_dict() +# create an instance of RelatedTransaction from a dict +related_transaction_from_dict = RelatedTransaction.from_dict(related_transaction_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SolanaBlockchainData.md b/docs/SolanaBlockchainData.md new file mode 100644 index 00000000..3f7f9f26 --- /dev/null +++ b/docs/SolanaBlockchainData.md @@ -0,0 +1,31 @@ +# SolanaBlockchainData + +Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stake_account_address** | **str** | The stake account address matching the stakeAccountId. | +**stake_account_derivation_change_value** | **float** | The value of the change level in the BIP32 path which was used to derive the stake account address | + +## Example + +```python +from fireblocks.models.solana_blockchain_data import SolanaBlockchainData + +# TODO update the JSON string below +json = "{}" +# create an instance of SolanaBlockchainData from a JSON string +solana_blockchain_data_instance = SolanaBlockchainData.from_json(json) +# print the JSON string representation of the object +print(SolanaBlockchainData.to_json()) + +# convert the object into a dict +solana_blockchain_data_dict = solana_blockchain_data_instance.to_dict() +# create an instance of SolanaBlockchainData from a dict +solana_blockchain_data_from_dict = SolanaBlockchainData.from_dict(solana_blockchain_data_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SolanaBlockchainDataDto.md b/docs/SolanaBlockchainDataDto.md deleted file mode 100644 index 38bd04f0..00000000 --- a/docs/SolanaBlockchainDataDto.md +++ /dev/null @@ -1,29 +0,0 @@ -# SolanaBlockchainDataDto - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**stake_account_address** | **str** | The stake account address matching the stakeAccountId. | - -## Example - -```python -from fireblocks.models.solana_blockchain_data_dto import SolanaBlockchainDataDto - -# TODO update the JSON string below -json = "{}" -# create an instance of SolanaBlockchainDataDto from a JSON string -solana_blockchain_data_dto_instance = SolanaBlockchainDataDto.from_json(json) -# print the JSON string representation of the object -print(SolanaBlockchainDataDto.to_json()) - -# convert the object into a dict -solana_blockchain_data_dto_dict = solana_blockchain_data_dto_instance.to_dict() -# create an instance of SolanaBlockchainDataDto from a dict -solana_blockchain_data_dto_from_dict = SolanaBlockchainDataDto.from_dict(solana_blockchain_data_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SplitRequest.md b/docs/SplitRequest.md new file mode 100644 index 00000000..7418de60 --- /dev/null +++ b/docs/SplitRequest.md @@ -0,0 +1,33 @@ +# SplitRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | id of position to split | +**amount** | **str** | Amount of tokens to be transferred to the new stake account. | +**fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] +**fee_level** | [**FeeLevel**](FeeLevel.md) | | [optional] +**tx_note** | **str** | The note to associate with the transactions. | [optional] + +## Example + +```python +from fireblocks.models.split_request import SplitRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of SplitRequest from a JSON string +split_request_instance = SplitRequest.from_json(json) +# print the JSON string representation of the object +print(SplitRequest.to_json()) + +# convert the object into a dict +split_request_dict = split_request_instance.to_dict() +# create an instance of SplitRequest from a dict +split_request_from_dict = SplitRequest.from_dict(split_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SplitResponse.md b/docs/SplitResponse.md new file mode 100644 index 00000000..5686e9d6 --- /dev/null +++ b/docs/SplitResponse.md @@ -0,0 +1,29 @@ +# SplitResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the new staking position | + +## Example + +```python +from fireblocks.models.split_response import SplitResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SplitResponse from a JSON string +split_response_instance = SplitResponse.from_json(json) +# print the JSON string representation of the object +print(SplitResponse.to_json()) + +# convert the object into a dict +split_response_dict = split_response_instance.to_dict() +# create an instance of SplitResponse from a dict +split_response_from_dict = SplitResponse.from_dict(split_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StakeRequestDto.md b/docs/StakeRequest.md similarity index 55% rename from docs/StakeRequestDto.md rename to docs/StakeRequest.md index 1d102029..ff2bb71b 100644 --- a/docs/StakeRequestDto.md +++ b/docs/StakeRequest.md @@ -1,4 +1,4 @@ -# StakeRequestDto +# StakeRequest ## Properties @@ -6,28 +6,28 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **vault_account_id** | **str** | The source vault account to stake from | -**provider_id** | **str** | The ID of the provider | +**provider_id** | [**StakingProvider**](StakingProvider.md) | | **stake_amount** | **str** | Amount of tokens to stake | **tx_note** | **str** | The note to associate with the stake transactions. | [optional] **fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] -**fee_level** | **str** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] +**fee_level** | [**FeeLevel**](FeeLevel.md) | | [optional] ## Example ```python -from fireblocks.models.stake_request_dto import StakeRequestDto +from fireblocks.models.stake_request import StakeRequest # TODO update the JSON string below json = "{}" -# create an instance of StakeRequestDto from a JSON string -stake_request_dto_instance = StakeRequestDto.from_json(json) +# create an instance of StakeRequest from a JSON string +stake_request_instance = StakeRequest.from_json(json) # print the JSON string representation of the object -print(StakeRequestDto.to_json()) +print(StakeRequest.to_json()) # convert the object into a dict -stake_request_dto_dict = stake_request_dto_instance.to_dict() -# create an instance of StakeRequestDto from a dict -stake_request_dto_from_dict = StakeRequestDto.from_dict(stake_request_dto_dict) +stake_request_dict = stake_request_instance.to_dict() +# create an instance of StakeRequest from a dict +stake_request_from_dict = StakeRequest.from_dict(stake_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StakeResponseDto.md b/docs/StakeResponse.md similarity index 53% rename from docs/StakeResponseDto.md rename to docs/StakeResponse.md index 79b59fd8..486ac674 100644 --- a/docs/StakeResponseDto.md +++ b/docs/StakeResponse.md @@ -1,4 +1,4 @@ -# StakeResponseDto +# StakeResponse ## Properties @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from fireblocks.models.stake_response_dto import StakeResponseDto +from fireblocks.models.stake_response import StakeResponse # TODO update the JSON string below json = "{}" -# create an instance of StakeResponseDto from a JSON string -stake_response_dto_instance = StakeResponseDto.from_json(json) +# create an instance of StakeResponse from a JSON string +stake_response_instance = StakeResponse.from_json(json) # print the JSON string representation of the object -print(StakeResponseDto.to_json()) +print(StakeResponse.to_json()) # convert the object into a dict -stake_response_dto_dict = stake_response_dto_instance.to_dict() -# create an instance of StakeResponseDto from a dict -stake_response_dto_from_dict = StakeResponseDto.from_dict(stake_response_dto_dict) +stake_response_dict = stake_response_instance.to_dict() +# create an instance of StakeResponse from a dict +stake_response_from_dict = StakeResponse.from_dict(stake_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StakingApi.md b/docs/StakingApi.md new file mode 100644 index 00000000..ddb91ee0 --- /dev/null +++ b/docs/StakingApi.md @@ -0,0 +1,983 @@ +# fireblocks.StakingApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**approve_terms_of_service_by_provider_id**](StakingApi.md#approve_terms_of_service_by_provider_id) | **POST** /staking/providers/{providerId}/approveTermsOfService | Approve staking terms of service +[**claim_rewards**](StakingApi.md#claim_rewards) | **POST** /staking/chains/{chainDescriptor}/claim_rewards | Execute a Claim Rewards operation +[**get_all_delegations**](StakingApi.md#get_all_delegations) | **GET** /staking/positions | List staking positions details +[**get_chain_info**](StakingApi.md#get_chain_info) | **GET** /staking/chains/{chainDescriptor}/chainInfo | Get chain-specific staking summary +[**get_chains**](StakingApi.md#get_chains) | **GET** /staking/chains | List staking supported chains +[**get_delegation_by_id**](StakingApi.md#get_delegation_by_id) | **GET** /staking/positions/{id} | Get staking position details +[**get_providers**](StakingApi.md#get_providers) | **GET** /staking/providers | List staking providers details +[**get_summary**](StakingApi.md#get_summary) | **GET** /staking/positions/summary | Get staking summary details +[**get_summary_by_vault**](StakingApi.md#get_summary_by_vault) | **GET** /staking/positions/summary/vaults | Get staking summary details by vault +[**split**](StakingApi.md#split) | **POST** /staking/chains/{chainDescriptor}/split | Execute a Split operation on SOL/SOL_TEST stake account +[**stake**](StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation +[**unstake**](StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation +[**withdraw**](StakingApi.md#withdraw) | **POST** /staking/chains/{chainDescriptor}/withdraw | Execute a Withdraw operation + + +# **approve_terms_of_service_by_provider_id** +> approve_terms_of_service_by_provider_id(provider_id, idempotency_key=idempotency_key) + +Approve staking terms of service + +Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider. + +### Example + + +```python +from fireblocks.models.staking_provider import StakingProvider +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + provider_id = fireblocks.StakingProvider() # StakingProvider | The unique identifier of the staking provider + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Approve staking terms of service + fireblocks.staking.approve_terms_of_service_by_provider_id(provider_id, idempotency_key=idempotency_key).result() + except Exception as e: + print("Exception when calling StakingApi->approve_terms_of_service_by_provider_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **provider_id** | [**StakingProvider**](.md)| The unique identifier of the staking provider | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The terms of service have been successfully approved and is associated with 201 status code. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **claim_rewards** +> claim_rewards(chain_descriptor, claim_rewards_request, idempotency_key=idempotency_key) + +Execute a Claim Rewards operation + +Perform a chain-specific Claim Rewards. + +### Example + + +```python +from fireblocks.models.claim_rewards_request import ClaimRewardsRequest +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = 'MATIC' # str | The protocol identifier (e.g. \"MATIC\"/\"SOL\") to use + claim_rewards_request = fireblocks.ClaimRewardsRequest() # ClaimRewardsRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Execute a Claim Rewards operation + fireblocks.staking.claim_rewards(chain_descriptor, claim_rewards_request, idempotency_key=idempotency_key).result() + except Exception as e: + print("Exception when calling StakingApi->claim_rewards: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | **str**| The protocol identifier (e.g. \"MATIC\"/\"SOL\") to use | + **claim_rewards_request** | [**ClaimRewardsRequest**](ClaimRewardsRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Claim Rewards action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_all_delegations** +> List[Delegation] get_all_delegations(chain_descriptor=chain_descriptor) + +List staking positions details + +Return detailed information on all staking positions, including the staked amount, rewards, status and more. + +### Example + + +```python +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.delegation import Delegation +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = fireblocks.ChainDescriptor() # ChainDescriptor | Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. (optional) + + try: + # List staking positions details + api_response = fireblocks.staking.get_all_delegations(chain_descriptor=chain_descriptor).result() + print("The response of StakingApi->get_all_delegations:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_all_delegations: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | [**ChainDescriptor**](.md)| Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. | [optional] + +### Return type + +[**List[Delegation]**](Delegation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An array of position data was returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_chain_info** +> ChainInfoResponse get_chain_info(chain_descriptor) + +Get chain-specific staking summary + +Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.) + +### Example + + +```python +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.chain_info_response import ChainInfoResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = fireblocks.ChainDescriptor() # ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use + + try: + # Get chain-specific staking summary + api_response = fireblocks.staking.get_chain_info(chain_descriptor).result() + print("The response of StakingApi->get_chain_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_chain_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use | + +### Return type + +[**ChainInfoResponse**](ChainInfoResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Chain specific info summary was returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_chains** +> List[str] get_chains() + +List staking supported chains + +Return an alphabetical list of supported chains. + +### Example + + +```python +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + + try: + # List staking supported chains + api_response = fireblocks.staking.get_chains().result() + print("The response of StakingApi->get_chains:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_chains: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**List[str]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An array of supported chains was returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_delegation_by_id** +> Delegation get_delegation_by_id(id) + +Get staking position details + +Return detailed information on a staking position, including the staked amount, rewards, status and more. + +### Example + + +```python +from fireblocks.models.delegation import Delegation +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + id = '1fe3b61f-7e1f-4a19-aff0-4f0a524d44d7' # str | The unique identifier of the staking position + + try: + # Get staking position details + api_response = fireblocks.staking.get_delegation_by_id(id).result() + print("The response of StakingApi->get_delegation_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_delegation_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| The unique identifier of the staking position | + +### Return type + +[**Delegation**](Delegation.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Position data was returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_providers** +> List[Provider] get_providers() + +List staking providers details + +Return information on all the available staking providers. + +### Example + + +```python +from fireblocks.models.provider import Provider +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + + try: + # List staking providers details + api_response = fireblocks.staking.get_providers().result() + print("The response of StakingApi->get_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_providers: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**List[Provider]**](Provider.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An array of supported providers was returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_summary** +> DelegationSummary get_summary() + +Get staking summary details + +Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + +### Example + + +```python +from fireblocks.models.delegation_summary import DelegationSummary +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + + try: + # Get staking summary details + api_response = fireblocks.staking.get_summary().result() + print("The response of StakingApi->get_summary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_summary: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DelegationSummary**](DelegationSummary.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A summary for all vaults were returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_summary_by_vault** +> Dict[str, DelegationSummary] get_summary_by_vault() + +Get staking summary details by vault + +Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + +### Example + + +```python +from fireblocks.models.delegation_summary import DelegationSummary +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + + try: + # Get staking summary details by vault + api_response = fireblocks.staking.get_summary_by_vault().result() + print("The response of StakingApi->get_summary_by_vault:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->get_summary_by_vault: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Dict[str, DelegationSummary]**](DelegationSummary.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A summary for each vault were returned successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **split** +> SplitResponse split(chain_descriptor, split_request, idempotency_key=idempotency_key) + +Execute a Split operation on SOL/SOL_TEST stake account + +Perform a Solana Split stake account. + +### Example + + +```python +from fireblocks.models.split_request import SplitRequest +from fireblocks.models.split_response import SplitResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = 'SOL' # str | The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use + split_request = fireblocks.SplitRequest() # SplitRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Execute a Split operation on SOL/SOL_TEST stake account + api_response = fireblocks.staking.split(chain_descriptor, split_request, idempotency_key=idempotency_key).result() + print("The response of StakingApi->split:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->split: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | **str**| The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use | + **split_request** | [**SplitRequest**](SplitRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**SplitResponse**](SplitResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Split action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **stake** +> StakeResponse stake(chain_descriptor, stake_request, idempotency_key=idempotency_key) + +Initiate Stake Operation + +Perform a chain-specific Stake. + +### Example + + +```python +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.stake_request import StakeRequest +from fireblocks.models.stake_response import StakeResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = fireblocks.ChainDescriptor() # ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use + stake_request = fireblocks.StakeRequest() # StakeRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Initiate Stake Operation + api_response = fireblocks.staking.stake(chain_descriptor, stake_request, idempotency_key=idempotency_key).result() + print("The response of StakingApi->stake:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling StakingApi->stake: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | + **stake_request** | [**StakeRequest**](StakeRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**StakeResponse**](StakeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Stake action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **unstake** +> unstake(chain_descriptor, unstake_request, idempotency_key=idempotency_key) + +Execute an Unstake operation + +Execute an Unstake operation + +### Example + + +```python +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.unstake_request import UnstakeRequest +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = fireblocks.ChainDescriptor() # ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use + unstake_request = fireblocks.UnstakeRequest() # UnstakeRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Execute an Unstake operation + fireblocks.staking.unstake(chain_descriptor, unstake_request, idempotency_key=idempotency_key).result() + except Exception as e: + print("Exception when calling StakingApi->unstake: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | + **unstake_request** | [**UnstakeRequest**](UnstakeRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Unstake action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **withdraw** +> withdraw(chain_descriptor, withdraw_request, idempotency_key=idempotency_key) + +Execute a Withdraw operation + +Perform a chain-specific Withdraw. + +### Example + + +```python +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.withdraw_request import WithdrawRequest +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + chain_descriptor = fireblocks.ChainDescriptor() # ChainDescriptor | The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use + withdraw_request = fireblocks.WithdrawRequest() # WithdrawRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Execute a Withdraw operation + fireblocks.staking.withdraw(chain_descriptor, withdraw_request, idempotency_key=idempotency_key).result() + except Exception as e: + print("Exception when calling StakingApi->withdraw: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chain_descriptor** | [**ChainDescriptor**](.md)| The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use | + **withdraw_request** | [**WithdrawRequest**](WithdrawRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Withdraw action has been executed successfully on vault and is associated with 201 status code. | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/StakingBetaApi.md b/docs/StakingBetaApi.md deleted file mode 100644 index f43dba77..00000000 --- a/docs/StakingBetaApi.md +++ /dev/null @@ -1,665 +0,0 @@ -# fireblocks.StakingBetaApi - -All URIs are relative to *https://api.fireblocks.io/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**approve_terms_of_service_by_provider_id**](StakingBetaApi.md#approve_terms_of_service_by_provider_id) | **POST** /staking/providers/{providerId}/approveTermsOfService | -[**execute_action**](StakingBetaApi.md#execute_action) | **POST** /staking/chains/{chainDescriptor}/{actionId} | -[**get_all_delegations**](StakingBetaApi.md#get_all_delegations) | **GET** /staking/positions | -[**get_chain_info**](StakingBetaApi.md#get_chain_info) | **GET** /staking/chains/{chainDescriptor}/chainInfo | -[**get_chains**](StakingBetaApi.md#get_chains) | **GET** /staking/chains | -[**get_delegation_by_id**](StakingBetaApi.md#get_delegation_by_id) | **GET** /staking/positions/{id} | -[**get_providers**](StakingBetaApi.md#get_providers) | **GET** /staking/providers | -[**get_summary**](StakingBetaApi.md#get_summary) | **GET** /staking/positions/summary | -[**get_summary_by_vault**](StakingBetaApi.md#get_summary_by_vault) | **GET** /staking/positions/summary/vaults | - - -# **approve_terms_of_service_by_provider_id** -> object approve_terms_of_service_by_provider_id(provider_id, idempotency_key=idempotency_key) - - - -Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider. - -### Example - - -```python -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - provider_id = 'provider_id_example' # str | The unique identifier of the staking provider - idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) - - try: - # - api_response = fireblocks.staking_beta.approve_terms_of_service_by_provider_id(provider_id, idempotency_key=idempotency_key).result() - print("The response of StakingBetaApi->approve_terms_of_service_by_provider_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->approve_terms_of_service_by_provider_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **provider_id** | **str**| The unique identifier of the staking provider | - **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] - -### Return type - -**object** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | The terms of service have been successfully approved and is associated with 201 status code. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **execute_action** -> ExecuteActionResponse execute_action(chain_descriptor, action_id, execute_action_request, idempotency_key=idempotency_key) - - - -Perform a chain-specific staking action (e.g. stake, unstake, withdraw). - -### Example - - -```python -from fireblocks.models.execute_action_request import ExecuteActionRequest -from fireblocks.models.execute_action_response import ExecuteActionResponse -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - chain_descriptor = 'chain_descriptor_example' # str | The protocol identifier (e.g. \"ETH\"/\"SOL\") to use - action_id = 'action_id_example' # str | The operation that can be executed on a vault/position - execute_action_request = {"vaultAccountId":"22","providerId":"kiln","stakeAmount":"32","chainDescriptor":"ETH","txNote":"stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 of 32ETH created on 02.04.23","feeLevel":"MEDIUM"} # ExecuteActionRequest | - idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) - - try: - # - api_response = fireblocks.staking_beta.execute_action(chain_descriptor, action_id, execute_action_request, idempotency_key=idempotency_key).result() - print("The response of StakingBetaApi->execute_action:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->execute_action: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **chain_descriptor** | **str**| The protocol identifier (e.g. \"ETH\"/\"SOL\") to use | - **action_id** | **str**| The operation that can be executed on a vault/position | - **execute_action_request** | [**ExecuteActionRequest**](ExecuteActionRequest.md)| | - **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] - -### Return type - -[**ExecuteActionResponse**](ExecuteActionResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | A chain-specific action has been executed successfully on vault/position and is associated with 201 status code. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_all_delegations** -> List[DelegationDto] get_all_delegations(chain_descriptor=chain_descriptor) - - - -Return detailed information on all staking positions, including the staked amount, rewards, status and more. - -### Example - - -```python -from fireblocks.models.delegation_dto import DelegationDto -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - chain_descriptor = 'chain_descriptor_example' # str | Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. (optional) - - try: - # - api_response = fireblocks.staking_beta.get_all_delegations(chain_descriptor=chain_descriptor).result() - print("The response of StakingBetaApi->get_all_delegations:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_all_delegations: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **chain_descriptor** | **str**| Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. | [optional] - -### Return type - -[**List[DelegationDto]**](DelegationDto.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | An array of position data was returned successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_chain_info** -> ChainInfoResponseDto get_chain_info(chain_descriptor) - - - -Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.) - -### Example - - -```python -from fireblocks.models.chain_info_response_dto import ChainInfoResponseDto -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - chain_descriptor = 'chain_descriptor_example' # str | The protocol identifier (e.g. \"ETH\"/\"SOL\") to use - - try: - # - api_response = fireblocks.staking_beta.get_chain_info(chain_descriptor).result() - print("The response of StakingBetaApi->get_chain_info:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_chain_info: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **chain_descriptor** | **str**| The protocol identifier (e.g. \"ETH\"/\"SOL\") to use | - -### Return type - -[**ChainInfoResponseDto**](ChainInfoResponseDto.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Chain specific info summary was returned successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_chains** -> List[str] get_chains() - - - -Return an alphabetical list of supported chains. - -### Example - - -```python -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - - try: - # - api_response = fireblocks.staking_beta.get_chains().result() - print("The response of StakingBetaApi->get_chains:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_chains: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**List[str]** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_delegation_by_id** -> DelegationDto get_delegation_by_id(id) - - - -Return detailed information on a staking position, including the staked amount, rewards, status and more. - -### Example - - -```python -from fireblocks.models.delegation_dto import DelegationDto -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - id = 'id_example' # str | The unique identifier of the staking position - - try: - # - api_response = fireblocks.staking_beta.get_delegation_by_id(id).result() - print("The response of StakingBetaApi->get_delegation_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_delegation_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The unique identifier of the staking position | - -### Return type - -[**DelegationDto**](DelegationDto.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Position data was returned successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_providers** -> List[ProviderDto] get_providers() - - - -Return information on all the available staking providers. - -### Example - - -```python -from fireblocks.models.provider_dto import ProviderDto -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - - try: - # - api_response = fireblocks.staking_beta.get_providers().result() - print("The response of StakingBetaApi->get_providers:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_providers: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[ProviderDto]**](ProviderDto.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | An array of supported providers was returned successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_summary** -> DelegationSummaryDto get_summary() - - - -Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. - -### Example - - -```python -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - - try: - # - api_response = fireblocks.staking_beta.get_summary().result() - print("The response of StakingBetaApi->get_summary:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_summary: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DelegationSummaryDto**](DelegationSummaryDto.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A summary for all vaults were returned successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_summary_by_vault** -> Dict[str, DelegationSummaryDto] get_summary_by_vault() - - - -Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. - -### Example - - -```python -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto -from fireblocks.client import Fireblocks -from fireblocks.client_configuration import ClientConfiguration -from fireblocks.exceptions import ApiException -from fireblocks.base_path import BasePath -from pprint import pprint - -# load the secret key content from a file -with open('your_secret_key_file_path', 'r') as file: - secret_key_value = file.read() - -# build the configuration -configuration = ClientConfiguration( - api_key="your_api_key", - secret_key=secret_key_value, - base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" -) - - -# Enter a context with an instance of the API client -with Fireblocks(configuration) as fireblocks: - - try: - # - api_response = fireblocks.staking_beta.get_summary_by_vault().result() - print("The response of StakingBetaApi->get_summary_by_vault:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling StakingBetaApi->get_summary_by_vault: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Dict[str, DelegationSummaryDto]**](DelegationSummaryDto.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A summary for each vault were returned successfully | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/StakingProvider.md b/docs/StakingProvider.md new file mode 100644 index 00000000..f182f780 --- /dev/null +++ b/docs/StakingProvider.md @@ -0,0 +1,12 @@ +# StakingProvider + +The unique identifier of the staking provider + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Status.md b/docs/Status.md new file mode 100644 index 00000000..5427db0a --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,30 @@ +# Status + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | The status of the command | +**type** | **str** | The type of the command | + +## Example + +```python +from fireblocks.models.status import Status + +# TODO update the JSON string below +json = "{}" +# create an instance of Status from a JSON string +status_instance = Status.from_json(json) +# print the JSON string representation of the object +print(Status.to_json()) + +# convert the object into a dict +status_dict = status_instance.to_dict() +# create an instance of Status from a dict +status_from_dict = Status.from_dict(status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenInfoNotFoundErrorResponse.md b/docs/TokenInfoNotFoundErrorResponse.md new file mode 100644 index 00000000..9048ac22 --- /dev/null +++ b/docs/TokenInfoNotFoundErrorResponse.md @@ -0,0 +1,30 @@ +# TokenInfoNotFoundErrorResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | Not found error code | +**code** | **float** | Error code | + +## Example + +```python +from fireblocks.models.token_info_not_found_error_response import TokenInfoNotFoundErrorResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenInfoNotFoundErrorResponse from a JSON string +token_info_not_found_error_response_instance = TokenInfoNotFoundErrorResponse.from_json(json) +# print the JSON string representation of the object +print(TokenInfoNotFoundErrorResponse.to_json()) + +# convert the object into a dict +token_info_not_found_error_response_dict = token_info_not_found_error_response_instance.to_dict() +# create an instance of TokenInfoNotFoundErrorResponse from a dict +token_info_not_found_error_response_from_dict = TokenInfoNotFoundErrorResponse.from_dict(token_info_not_found_error_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransactionOperation.md b/docs/TransactionOperation.md index 13f8f807..75e4193c 100644 --- a/docs/TransactionOperation.md +++ b/docs/TransactionOperation.md @@ -1,6 +1,6 @@ # TransactionOperation -* `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) +* `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. Currently in beta and disabled * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) ## Properties diff --git a/docs/UnstakeRequestDto.md b/docs/UnstakeRequest.md similarity index 61% rename from docs/UnstakeRequestDto.md rename to docs/UnstakeRequest.md index 37250d34..7988a3d6 100644 --- a/docs/UnstakeRequestDto.md +++ b/docs/UnstakeRequest.md @@ -1,4 +1,4 @@ -# UnstakeRequestDto +# UnstakeRequest ## Properties @@ -7,26 +7,26 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | id of position to unstake | **fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] -**fee_level** | **str** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] +**fee_level** | [**FeeLevel**](FeeLevel.md) | | [optional] **tx_note** | **str** | The note to associate with the transactions. | [optional] **amount** | **str** | The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default. | [optional] ## Example ```python -from fireblocks.models.unstake_request_dto import UnstakeRequestDto +from fireblocks.models.unstake_request import UnstakeRequest # TODO update the JSON string below json = "{}" -# create an instance of UnstakeRequestDto from a JSON string -unstake_request_dto_instance = UnstakeRequestDto.from_json(json) +# create an instance of UnstakeRequest from a JSON string +unstake_request_instance = UnstakeRequest.from_json(json) # print the JSON string representation of the object -print(UnstakeRequestDto.to_json()) +print(UnstakeRequest.to_json()) # convert the object into a dict -unstake_request_dto_dict = unstake_request_dto_instance.to_dict() -# create an instance of UnstakeRequestDto from a dict -unstake_request_dto_from_dict = UnstakeRequestDto.from_dict(unstake_request_dto_dict) +unstake_request_dict = unstake_request_instance.to_dict() +# create an instance of UnstakeRequest from a dict +unstake_request_from_dict = UnstakeRequest.from_dict(unstake_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateCallbackHandlerRequest.md b/docs/UpdateCallbackHandlerRequest.md new file mode 100644 index 00000000..9833bda8 --- /dev/null +++ b/docs/UpdateCallbackHandlerRequest.md @@ -0,0 +1,29 @@ +# UpdateCallbackHandlerRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_handler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] + +## Example + +```python +from fireblocks.models.update_callback_handler_request import UpdateCallbackHandlerRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCallbackHandlerRequest from a JSON string +update_callback_handler_request_instance = UpdateCallbackHandlerRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateCallbackHandlerRequest.to_json()) + +# convert the object into a dict +update_callback_handler_request_dict = update_callback_handler_request_instance.to_dict() +# create an instance of UpdateCallbackHandlerRequest from a dict +update_callback_handler_request_from_dict = UpdateCallbackHandlerRequest.from_dict(update_callback_handler_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCallbackHandlerResponse.md b/docs/UpdateCallbackHandlerResponse.md new file mode 100644 index 00000000..bb0ede28 --- /dev/null +++ b/docs/UpdateCallbackHandlerResponse.md @@ -0,0 +1,30 @@ +# UpdateCallbackHandlerResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the API key | +**callback_handler** | [**CallbackHandlerRequest**](CallbackHandlerRequest.md) | | [optional] + +## Example + +```python +from fireblocks.models.update_callback_handler_response import UpdateCallbackHandlerResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateCallbackHandlerResponse from a JSON string +update_callback_handler_response_instance = UpdateCallbackHandlerResponse.from_json(json) +# print the JSON string representation of the object +print(UpdateCallbackHandlerResponse.to_json()) + +# convert the object into a dict +update_callback_handler_response_dict = update_callback_handler_response_instance.to_dict() +# create an instance of UpdateCallbackHandlerResponse from a dict +update_callback_handler_response_from_dict = UpdateCallbackHandlerResponse.from_dict(update_callback_handler_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateWebhookRequest.md b/docs/UpdateWebhookRequest.md new file mode 100644 index 00000000..dbf9587a --- /dev/null +++ b/docs/UpdateWebhookRequest.md @@ -0,0 +1,32 @@ +# UpdateWebhookRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The url of the webhook where notifications will be sent. URL must be valid, unique and https. | [optional] +**description** | **str** | description of the webhook of what it is used for.should not contain special characters. | [optional] +**events** | [**List[WebhookEvent]**](WebhookEvent.md) | The events that the webhook will be subscribed to | [optional] +**enabled** | **bool** | The status of the webhook | [optional] + +## Example + +```python +from fireblocks.models.update_webhook_request import UpdateWebhookRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateWebhookRequest from a JSON string +update_webhook_request_instance = UpdateWebhookRequest.from_json(json) +# print the JSON string representation of the object +print(UpdateWebhookRequest.to_json()) + +# convert the object into a dict +update_webhook_request_dict = update_webhook_request_instance.to_dict() +# create an instance of UpdateWebhookRequest from a dict +update_webhook_request_from_dict = UpdateWebhookRequest.from_dict(update_webhook_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ValidatorDto.md b/docs/Validator.md similarity index 60% rename from docs/ValidatorDto.md rename to docs/Validator.md index 8a2f8426..dd3044c3 100644 --- a/docs/ValidatorDto.md +++ b/docs/Validator.md @@ -1,4 +1,4 @@ -# ValidatorDto +# Validator ## Properties @@ -7,23 +7,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **chain_descriptor** | **str** | The protocol identifier (e.g. \"ETH\"/\"SOL\") of the validator | **fee_percent** | **float** | The service fee as a percentage out of the earned rewards | +**is_private** | **bool** | Is the validator private, i.e created by the user | [optional] ## Example ```python -from fireblocks.models.validator_dto import ValidatorDto +from fireblocks.models.validator import Validator # TODO update the JSON string below json = "{}" -# create an instance of ValidatorDto from a JSON string -validator_dto_instance = ValidatorDto.from_json(json) +# create an instance of Validator from a JSON string +validator_instance = Validator.from_json(json) # print the JSON string representation of the object -print(ValidatorDto.to_json()) +print(Validator.to_json()) # convert the object into a dict -validator_dto_dict = validator_dto_instance.to_dict() -# create an instance of ValidatorDto from a dict -validator_dto_from_dict = ValidatorDto.from_dict(validator_dto_dict) +validator_dict = validator_instance.to_dict() +# create an instance of Validator from a dict +validator_from_dict = Validator.from_dict(validator_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Version.md b/docs/Version.md new file mode 100644 index 00000000..ac419385 --- /dev/null +++ b/docs/Version.md @@ -0,0 +1,29 @@ +# Version + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hash** | **str** | The version hash of the cosigner | + +## Example + +```python +from fireblocks.models.version import Version + +# TODO update the JSON string below +json = "{}" +# create an instance of Version from a JSON string +version_instance = Version.from_json(json) +# print the JSON string representation of the object +print(Version.to_json()) + +# convert the object into a dict +version_dict = version_instance.to_dict() +# create an instance of Version from a dict +version_from_dict = Version.from_dict(version_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Webhook.md b/docs/Webhook.md new file mode 100644 index 00000000..a0d216ca --- /dev/null +++ b/docs/Webhook.md @@ -0,0 +1,35 @@ +# Webhook + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The id of the webhook | [optional] +**url** | **str** | The url of the webhook where notifications will be sent. Must be a valid URL and https. | [optional] +**description** | **str** | description of the webhook of what it is used for | [optional] +**events** | [**List[WebhookEvent]**](WebhookEvent.md) | The events that the webhook will be subscribed to | [optional] +**status** | **str** | The status of the webhook | [optional] +**created_at** | **datetime** | The date and time the webhook was created | [optional] +**updated_at** | **datetime** | The date and time the webhook was last updated | [optional] + +## Example + +```python +from fireblocks.models.webhook import Webhook + +# TODO update the JSON string below +json = "{}" +# create an instance of Webhook from a JSON string +webhook_instance = Webhook.from_json(json) +# print the JSON string representation of the object +print(Webhook.to_json()) + +# convert the object into a dict +webhook_dict = webhook_instance.to_dict() +# create an instance of Webhook from a dict +webhook_from_dict = Webhook.from_dict(webhook_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md new file mode 100644 index 00000000..38ca2375 --- /dev/null +++ b/docs/WebhookEvent.md @@ -0,0 +1,11 @@ +# WebhookEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhookPaginatedResponse.md b/docs/WebhookPaginatedResponse.md new file mode 100644 index 00000000..34151d99 --- /dev/null +++ b/docs/WebhookPaginatedResponse.md @@ -0,0 +1,30 @@ +# WebhookPaginatedResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[Webhook]**](Webhook.md) | The data of the current page | +**next** | **str** | The ID of the next page | [optional] + +## Example + +```python +from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of WebhookPaginatedResponse from a JSON string +webhook_paginated_response_instance = WebhookPaginatedResponse.from_json(json) +# print the JSON string representation of the object +print(WebhookPaginatedResponse.to_json()) + +# convert the object into a dict +webhook_paginated_response_dict = webhook_paginated_response_instance.to_dict() +# create an instance of WebhookPaginatedResponse from a dict +webhook_paginated_response_from_dict = WebhookPaginatedResponse.from_dict(webhook_paginated_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhooksV2BetaApi.md b/docs/WebhooksV2BetaApi.md new file mode 100644 index 00000000..f601bc79 --- /dev/null +++ b/docs/WebhooksV2BetaApi.md @@ -0,0 +1,563 @@ +# fireblocks.WebhooksV2BetaApi + +All URIs are relative to *https://api.fireblocks.io/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_webhook**](WebhooksV2BetaApi.md#create_webhook) | **POST** /webhooks | Create new webhook +[**delete_webhook**](WebhooksV2BetaApi.md#delete_webhook) | **DELETE** /webhooks/{webhookId} | Delete webhook +[**get_notification**](WebhooksV2BetaApi.md#get_notification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id +[**get_notifications**](WebhooksV2BetaApi.md#get_notifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id +[**get_webhook**](WebhooksV2BetaApi.md#get_webhook) | **GET** /webhooks/{webhookId} | Get webhook by id +[**get_webhooks**](WebhooksV2BetaApi.md#get_webhooks) | **GET** /webhooks | Get all webhooks +[**update_webhook**](WebhooksV2BetaApi.md#update_webhook) | **PATCH** /webhooks/{webhookId} | Update webhook + + +# **create_webhook** +> Webhook create_webhook(create_webhook_request, idempotency_key=idempotency_key) + +Create new webhook + +Creates a new webhook, which will be triggered on the specified events **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.create_webhook_request import CreateWebhookRequest +from fireblocks.models.webhook import Webhook +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + create_webhook_request = fireblocks.CreateWebhookRequest() # CreateWebhookRequest | + idempotency_key = 'idempotency_key_example' # str | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) + + try: + # Create new webhook + api_response = fireblocks.webhooks_v2_beta.create_webhook(create_webhook_request, idempotency_key=idempotency_key).result() + print("The response of WebhooksV2BetaApi->create_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->create_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_webhook_request** | [**CreateWebhookRequest**](CreateWebhookRequest.md)| | + **idempotency_key** | **str**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | created new webhook successfully | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_webhook** +> Webhook delete_webhook(webhook_id) + +Delete webhook + +Delete a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.webhook import Webhook +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + webhook_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the webhook + + try: + # Delete webhook + api_response = fireblocks.webhooks_v2_beta.delete_webhook(webhook_id).result() + print("The response of WebhooksV2BetaApi->delete_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->delete_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| The unique identifier of the webhook | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted webhook object | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_notification** +> NotificationWithData get_notification(webhook_id, notification_id, include_data=include_data) + +Get notification by id + +Get notification by id **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.notification_with_data import NotificationWithData +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + webhook_id = 'webhook_id_example' # str | The ID of the webhook to fetch + notification_id = 'notification_id_example' # str | The ID of the notification to fetch + include_data = True # bool | Include the data of the notification (optional) + + try: + # Get notification by id + api_response = fireblocks.webhooks_v2_beta.get_notification(webhook_id, notification_id, include_data=include_data).result() + print("The response of WebhooksV2BetaApi->get_notification:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->get_notification: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| The ID of the webhook to fetch | + **notification_id** | **str**| The ID of the notification to fetch | + **include_data** | **bool**| Include the data of the notification | [optional] + +### Return type + +[**NotificationWithData**](NotificationWithData.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_notifications** +> NotificationPaginatedResponse get_notifications(webhook_id, order=order, page_cursor=page_cursor, page_size=page_size, created_start_date=created_start_date, created_end_date=created_end_date, statuses=statuses, event_types=event_types, resource_id=resource_id) + +Get all notifications by webhook id + +Get all notifications by webhook id (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.notification_paginated_response import NotificationPaginatedResponse +from fireblocks.models.notification_status import NotificationStatus +from fireblocks.models.webhook_event import WebhookEvent +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + webhook_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | + order = 'DESC' # str | ASC / DESC ordering (default DESC) (optional) (default to 'DESC') + page_cursor = 'page_cursor_example' # str | Cursor of the required page (optional) + page_size = 100 # float | Maximum number of items in the page (optional) (default to 100) + created_start_date = '2024-09-24T09:14:38.356Z' # str | sort by start date (optional) + created_end_date = '2024-09-24T09:14:38.356Z' # str | sort by end date (optional) + statuses = [fireblocks.NotificationStatus()] # List[NotificationStatus] | Filter by Notification statues (optional) + event_types = [fireblocks.WebhookEvent()] # List[WebhookEvent] | Filter by Notification eventTypes (optional) + resource_id = 'resource_id_example' # str | Filter by resourceId (optional) + + try: + # Get all notifications by webhook id + api_response = fireblocks.webhooks_v2_beta.get_notifications(webhook_id, order=order, page_cursor=page_cursor, page_size=page_size, created_start_date=created_start_date, created_end_date=created_end_date, statuses=statuses, event_types=event_types, resource_id=resource_id).result() + print("The response of WebhooksV2BetaApi->get_notifications:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->get_notifications: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| | + **order** | **str**| ASC / DESC ordering (default DESC) | [optional] [default to 'DESC'] + **page_cursor** | **str**| Cursor of the required page | [optional] + **page_size** | **float**| Maximum number of items in the page | [optional] [default to 100] + **created_start_date** | **str**| sort by start date | [optional] + **created_end_date** | **str**| sort by end date | [optional] + **statuses** | [**List[NotificationStatus]**](NotificationStatus.md)| Filter by Notification statues | [optional] + **event_types** | [**List[WebhookEvent]**](WebhookEvent.md)| Filter by Notification eventTypes | [optional] + **resource_id** | **str**| Filter by resourceId | [optional] + +### Return type + +[**NotificationPaginatedResponse**](NotificationPaginatedResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A paginated response containing NotificationExternalDTO objects | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_webhook** +> Webhook get_webhook(webhook_id) + +Get webhook by id + +Retrieve a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.webhook import Webhook +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + webhook_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the webhook + + try: + # Get webhook by id + api_response = fireblocks.webhooks_v2_beta.get_webhook(webhook_id).result() + print("The response of WebhooksV2BetaApi->get_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->get_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| The unique identifier of the webhook | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A webhook object | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_webhooks** +> WebhookPaginatedResponse get_webhooks(order=order, page_cursor=page_cursor, page_size=page_size) + +Get all webhooks + +Get all webhooks (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + order = 'DESC' # str | ASC / DESC ordering (default DESC) (optional) (default to 'DESC') + page_cursor = 'page_cursor_example' # str | Cursor of the required page (optional) + page_size = 10 # float | Maximum number of items in the page (optional) (default to 10) + + try: + # Get all webhooks + api_response = fireblocks.webhooks_v2_beta.get_webhooks(order=order, page_cursor=page_cursor, page_size=page_size).result() + print("The response of WebhooksV2BetaApi->get_webhooks:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->get_webhooks: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | **str**| ASC / DESC ordering (default DESC) | [optional] [default to 'DESC'] + **page_cursor** | **str**| Cursor of the required page | [optional] + **page_size** | **float**| Maximum number of items in the page | [optional] [default to 10] + +### Return type + +[**WebhookPaginatedResponse**](WebhookPaginatedResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A paginated response containing WebhookDto objects | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_webhook** +> Webhook update_webhook(webhook_id, update_webhook_request) + +Update webhook + +Update a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. + +### Example + + +```python +from fireblocks.models.update_webhook_request import UpdateWebhookRequest +from fireblocks.models.webhook import Webhook +from fireblocks.client import Fireblocks +from fireblocks.client_configuration import ClientConfiguration +from fireblocks.exceptions import ApiException +from fireblocks.base_path import BasePath +from pprint import pprint + +# load the secret key content from a file +with open('your_secret_key_file_path', 'r') as file: + secret_key_value = file.read() + +# build the configuration +configuration = ClientConfiguration( + api_key="your_api_key", + secret_key=secret_key_value, + base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1" +) + + +# Enter a context with an instance of the API client +with Fireblocks(configuration) as fireblocks: + webhook_id = '44fcead0-7053-4831-a53a-df7fb90d440f' # str | The unique identifier of the webhook + update_webhook_request = fireblocks.UpdateWebhookRequest() # UpdateWebhookRequest | + + try: + # Update webhook + api_response = fireblocks.webhooks_v2_beta.update_webhook(webhook_id, update_webhook_request).result() + print("The response of WebhooksV2BetaApi->update_webhook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WebhooksV2BetaApi->update_webhook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | **str**| The unique identifier of the webhook | + **update_webhook_request** | [**UpdateWebhookRequest**](UpdateWebhookRequest.md)| | + +### Return type + +[**Webhook**](Webhook.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Updated webhook object | * X-Request-ID -
| +**0** | Error Response | * X-Request-ID -
| + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/WithdrawRequestDto.md b/docs/WithdrawRequest.md similarity index 53% rename from docs/WithdrawRequestDto.md rename to docs/WithdrawRequest.md index 130de9f3..057c677f 100644 --- a/docs/WithdrawRequestDto.md +++ b/docs/WithdrawRequest.md @@ -1,4 +1,4 @@ -# WithdrawRequestDto +# WithdrawRequest ## Properties @@ -7,25 +7,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | id of position to withdraw | **fee** | **str** | Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required. | [optional] -**fee_level** | **str** | Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. | [optional] +**fee_level** | [**FeeLevel**](FeeLevel.md) | | [optional] **tx_note** | **str** | The note to associate with the transactions. | [optional] ## Example ```python -from fireblocks.models.withdraw_request_dto import WithdrawRequestDto +from fireblocks.models.withdraw_request import WithdrawRequest # TODO update the JSON string below json = "{}" -# create an instance of WithdrawRequestDto from a JSON string -withdraw_request_dto_instance = WithdrawRequestDto.from_json(json) +# create an instance of WithdrawRequest from a JSON string +withdraw_request_instance = WithdrawRequest.from_json(json) # print the JSON string representation of the object -print(WithdrawRequestDto.to_json()) +print(WithdrawRequest.to_json()) # convert the object into a dict -withdraw_request_dto_dict = withdraw_request_dto_instance.to_dict() -# create an instance of WithdrawRequestDto from a dict -withdraw_request_dto_from_dict = WithdrawRequestDto.from_dict(withdraw_request_dto_dict) +withdraw_request_dict = withdraw_request_instance.to_dict() +# create an instance of WithdrawRequest from a dict +withdraw_request_from_dict = WithdrawRequest.from_dict(withdraw_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/fireblocks/__init__.py b/fireblocks/__init__.py index 0ffa966b..7cd812f7 100644 --- a/fireblocks/__init__.py +++ b/fireblocks/__init__.py @@ -15,13 +15,14 @@ """ # noqa: E501 -__version__ = "5.0.0" +__version__ = "0.0.0" # import apis into sdk package from fireblocks.api.api_user_api import ApiUserApi from fireblocks.api.assets_api import AssetsApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi +from fireblocks.api.blockchains_assets_beta_api import BlockchainsAssetsBetaApi from fireblocks.api.compliance_api import ComplianceApi from fireblocks.api.compliance_screening_configuration_api import ( ComplianceScreeningConfigurationApi, @@ -32,6 +33,7 @@ from fireblocks.api.contracts_api import ContractsApi from fireblocks.api.cosigners_beta_api import CosignersBetaApi from fireblocks.api.deployed_contracts_api import DeployedContractsApi +from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi from fireblocks.api.exchange_accounts_api import ExchangeAccountsApi from fireblocks.api.external_wallets_api import ExternalWalletsApi from fireblocks.api.fiat_accounts_api import FiatAccountsApi @@ -39,6 +41,7 @@ from fireblocks.api.internal_wallets_api import InternalWalletsApi from fireblocks.api.job_management_api import JobManagementApi from fireblocks.api.key_link_beta_api import KeyLinkBetaApi +from fireblocks.api.keys_beta_api import KeysBetaApi from fireblocks.api.nfts_api import NFTsApi from fireblocks.api.network_connections_api import NetworkConnectionsApi from fireblocks.api.ota_beta_api import OTABetaApi @@ -47,7 +50,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi from fireblocks.api.smart_transfer_api import SmartTransferApi -from fireblocks.api.staking_beta_api import StakingBetaApi +from fireblocks.api.staking_api import StakingApi from fireblocks.api.tokenization_api import TokenizationApi from fireblocks.api.transactions_api import TransactionsApi from fireblocks.api.travel_rule_beta_api import TravelRuleBetaApi @@ -56,6 +59,7 @@ from fireblocks.api.vaults_api import VaultsApi from fireblocks.api.web3_connections_api import Web3ConnectionsApi from fireblocks.api.webhooks_api import WebhooksApi +from fireblocks.api.webhooks_v2_beta_api import WebhooksV2BetaApi from fireblocks.api.workspace_status_beta_api import WorkspaceStatusBetaApi from fireblocks.api.whitelist_ip_addresses_api import WhitelistIpAddressesApi @@ -101,7 +105,9 @@ ) from fireblocks.models.add_collateral_request_body import AddCollateralRequestBody from fireblocks.models.add_contract_asset_request import AddContractAssetRequest -from fireblocks.models.additional_info_dto import AdditionalInfoDto +from fireblocks.models.add_cosigner_request import AddCosignerRequest +from fireblocks.models.add_cosigner_response import AddCosignerResponse +from fireblocks.models.additional_info import AdditionalInfo from fireblocks.models.aml_registration_result import AmlRegistrationResult from fireblocks.models.aml_screening_result import AmlScreeningResult from fireblocks.models.amount_aggregation_time_period_method import ( @@ -116,13 +122,20 @@ from fireblocks.models.asset_bad_request_error_response import ( AssetBadRequestErrorResponse, ) +from fireblocks.models.asset_class_beta import AssetClassBeta from fireblocks.models.asset_conflict_error_response import AssetConflictErrorResponse from fireblocks.models.asset_forbidden_error_response import AssetForbiddenErrorResponse from fireblocks.models.asset_internal_server_error_response import ( AssetInternalServerErrorResponse, ) +from fireblocks.models.asset_media import AssetMedia +from fireblocks.models.asset_media_attributes import AssetMediaAttributes +from fireblocks.models.asset_metadata import AssetMetadata +from fireblocks.models.asset_metadata_beta import AssetMetadataBeta from fireblocks.models.asset_metadata_dto import AssetMetadataDto from fireblocks.models.asset_not_found_error_response import AssetNotFoundErrorResponse +from fireblocks.models.asset_onchain import AssetOnchain +from fireblocks.models.asset_onchain_beta import AssetOnchainBeta from fireblocks.models.asset_price_forbidden_error_response import ( AssetPriceForbiddenErrorResponse, ) @@ -131,8 +144,7 @@ ) from fireblocks.models.asset_price_response import AssetPriceResponse from fireblocks.models.asset_response import AssetResponse -from fireblocks.models.asset_response_metadata import AssetResponseMetadata -from fireblocks.models.asset_response_onchain import AssetResponseOnchain +from fireblocks.models.asset_response_beta import AssetResponseBeta from fireblocks.models.asset_type_response import AssetTypeResponse from fireblocks.models.asset_wallet import AssetWallet from fireblocks.models.audit_log_data import AuditLogData @@ -140,8 +152,20 @@ from fireblocks.models.authorization_groups import AuthorizationGroups from fireblocks.models.authorization_info import AuthorizationInfo from fireblocks.models.block_info import BlockInfo +from fireblocks.models.blockchain_explorer import BlockchainExplorer +from fireblocks.models.blockchain_media import BlockchainMedia +from fireblocks.models.blockchain_metadata import BlockchainMetadata +from fireblocks.models.blockchain_not_found_error_response import ( + BlockchainNotFoundErrorResponse, +) +from fireblocks.models.blockchain_onchain import BlockchainOnchain +from fireblocks.models.blockchain_response import BlockchainResponse +from fireblocks.models.callback_handler import CallbackHandler +from fireblocks.models.callback_handler_request import CallbackHandlerRequest from fireblocks.models.cancel_transaction_response import CancelTransactionResponse -from fireblocks.models.chain_info_response_dto import ChainInfoResponseDto +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.chain_info_response import ChainInfoResponse +from fireblocks.models.claim_rewards_request import ClaimRewardsRequest from fireblocks.models.collection_burn_request_dto import CollectionBurnRequestDto from fireblocks.models.collection_burn_response_dto import CollectionBurnResponseDto from fireblocks.models.collection_deploy_request_dto import CollectionDeployRequestDto @@ -260,13 +284,14 @@ from fireblocks.models.create_vault_account_request import CreateVaultAccountRequest from fireblocks.models.create_vault_asset_response import CreateVaultAssetResponse from fireblocks.models.create_wallet_request import CreateWalletRequest +from fireblocks.models.create_webhook_request import CreateWebhookRequest from fireblocks.models.create_workflow_execution_request_params_inner import ( CreateWorkflowExecutionRequestParamsInner, ) from fireblocks.models.custom_routing_dest import CustomRoutingDest from fireblocks.models.default_network_routing_dest import DefaultNetworkRoutingDest -from fireblocks.models.delegation_dto import DelegationDto -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto +from fireblocks.models.delegation import Delegation +from fireblocks.models.delegation_summary import DelegationSummary from fireblocks.models.delete_network_connection_response import ( DeleteNetworkConnectionResponse, ) @@ -350,8 +375,6 @@ ) from fireblocks.models.exchange_trading_account import ExchangeTradingAccount from fireblocks.models.exchange_type import ExchangeType -from fireblocks.models.execute_action_request import ExecuteActionRequest -from fireblocks.models.execute_action_response import ExecuteActionResponse from fireblocks.models.execution_conversion_operation import ( ExecutionConversionOperation, ) @@ -363,6 +386,7 @@ from fireblocks.models.execution_transfer_operation import ExecutionTransferOperation from fireblocks.models.external_wallet_asset import ExternalWalletAsset from fireblocks.models.fee_info import FeeInfo +from fireblocks.models.fee_level import FeeLevel from fireblocks.models.fetch_abi_request_dto import FetchAbiRequestDto from fireblocks.models.fiat_account import FiatAccount from fireblocks.models.fiat_account_type import FiatAccountType @@ -391,6 +415,7 @@ from fireblocks.models.get_max_spendable_amount_response import ( GetMaxSpendableAmountResponse, ) +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse from fireblocks.models.get_nfts_response import GetNFTsResponse from fireblocks.models.get_ota_status_response import GetOtaStatusResponse from fireblocks.models.get_ownership_tokens_response import GetOwnershipTokensResponse @@ -415,6 +440,8 @@ from fireblocks.models.lean_deployed_contract_response_dto import ( LeanDeployedContractResponseDto, ) +from fireblocks.models.list_assets_response import ListAssetsResponse +from fireblocks.models.list_blockchains_response import ListBlockchainsResponse from fireblocks.models.list_owned_collections_response import ( ListOwnedCollectionsResponse, ) @@ -423,6 +450,7 @@ from fireblocks.models.modify_signing_key_agent_id_dto import ModifySigningKeyAgentIdDto from fireblocks.models.modify_signing_key_dto import ModifySigningKeyDto from fireblocks.models.modify_validation_key_dto import ModifyValidationKeyDto +from fireblocks.models.mpc_key import MpcKey from fireblocks.models.network_channel import NetworkChannel from fireblocks.models.network_connection import NetworkConnection from fireblocks.models.network_connection_response import NetworkConnectionResponse @@ -439,6 +467,12 @@ from fireblocks.models.network_record import NetworkRecord from fireblocks.models.none_network_routing_dest import NoneNetworkRoutingDest from fireblocks.models.not_found_exception import NotFoundException +from fireblocks.models.notification import Notification +from fireblocks.models.notification_paginated_response import ( + NotificationPaginatedResponse, +) +from fireblocks.models.notification_status import NotificationStatus +from fireblocks.models.notification_with_data import NotificationWithData from fireblocks.models.one_time_address import OneTimeAddress from fireblocks.models.one_time_address_account import OneTimeAddressAccount from fireblocks.models.operation_execution_failure import OperationExecutionFailure @@ -453,6 +487,8 @@ PaginatedAssetWalletResponsePaging, ) from fireblocks.models.paging import Paging +from fireblocks.models.pair_api_key_request import PairApiKeyRequest +from fireblocks.models.pair_api_key_response import PairApiKeyResponse from fireblocks.models.parameter import Parameter from fireblocks.models.parameter_with_value import ParameterWithValue from fireblocks.models.payee_account import PayeeAccount @@ -468,6 +504,7 @@ from fireblocks.models.payout_response import PayoutResponse from fireblocks.models.payout_state import PayoutState from fireblocks.models.payout_status import PayoutStatus +from fireblocks.models.players import Players from fireblocks.models.policy_and_validation_response import PolicyAndValidationResponse from fireblocks.models.policy_check_result import PolicyCheckResult from fireblocks.models.policy_metadata import PolicyMetadata @@ -499,7 +536,7 @@ from fireblocks.models.policy_status import PolicyStatus from fireblocks.models.policy_validation import PolicyValidation from fireblocks.models.pre_screening import PreScreening -from fireblocks.models.provider_dto import ProviderDto +from fireblocks.models.provider import Provider from fireblocks.models.public_key_information import PublicKeyInformation from fireblocks.models.publish_draft_request import PublishDraftRequest from fireblocks.models.publish_result import PublishResult @@ -509,8 +546,8 @@ RedeemFundsToLinkedDDAResponse, ) from fireblocks.models.register_new_asset_request import RegisterNewAssetRequest -from fireblocks.models.related_request_dto import RelatedRequestDto -from fireblocks.models.related_transaction_dto import RelatedTransactionDto +from fireblocks.models.related_request import RelatedRequest +from fireblocks.models.related_transaction import RelatedTransaction from fireblocks.models.remove_collateral_request_body import RemoveCollateralRequestBody from fireblocks.models.rename_cosigner import RenameCosigner from fireblocks.models.rename_vault_account_response import RenameVaultAccountResponse @@ -634,16 +671,20 @@ from fireblocks.models.smart_transfer_user_groups_response import ( SmartTransferUserGroupsResponse, ) -from fireblocks.models.solana_blockchain_data_dto import SolanaBlockchainDataDto +from fireblocks.models.solana_blockchain_data import SolanaBlockchainData from fireblocks.models.source_transfer_peer_path import SourceTransferPeerPath from fireblocks.models.source_transfer_peer_path_response import ( SourceTransferPeerPathResponse, ) from fireblocks.models.spam_ownership_response import SpamOwnershipResponse from fireblocks.models.spam_token_response import SpamTokenResponse +from fireblocks.models.split_request import SplitRequest +from fireblocks.models.split_response import SplitResponse from fireblocks.models.src_or_dest_attributes_inner import SrcOrDestAttributesInner -from fireblocks.models.stake_request_dto import StakeRequestDto -from fireblocks.models.stake_response_dto import StakeResponseDto +from fireblocks.models.stake_request import StakeRequest +from fireblocks.models.stake_response import StakeResponse +from fireblocks.models.staking_provider import StakingProvider +from fireblocks.models.status import Status from fireblocks.models.stellar_ripple_create_params_dto import ( StellarRippleCreateParamsDto, ) @@ -654,6 +695,9 @@ from fireblocks.models.to_collateral_transaction import ToCollateralTransaction from fireblocks.models.to_exchange_transaction import ToExchangeTransaction from fireblocks.models.token_collection_response import TokenCollectionResponse +from fireblocks.models.token_info_not_found_error_response import ( + TokenInfoNotFoundErrorResponse, +) from fireblocks.models.token_link_dto import TokenLinkDto from fireblocks.models.token_link_dto_token_metadata import TokenLinkDtoTokenMetadata from fireblocks.models.token_link_exists_http_error import TokenLinkExistsHttpError @@ -756,7 +800,13 @@ from fireblocks.models.unmanaged_wallet import UnmanagedWallet from fireblocks.models.unspent_input import UnspentInput from fireblocks.models.unspent_inputs_response import UnspentInputsResponse -from fireblocks.models.unstake_request_dto import UnstakeRequestDto +from fireblocks.models.unstake_request import UnstakeRequest +from fireblocks.models.update_callback_handler_request import ( + UpdateCallbackHandlerRequest, +) +from fireblocks.models.update_callback_handler_response import ( + UpdateCallbackHandlerResponse, +) from fireblocks.models.update_token_ownership_status_dto import ( UpdateTokenOwnershipStatusDto, ) @@ -764,6 +814,7 @@ UpdateVaultAccountAssetAddressRequest, ) from fireblocks.models.update_vault_account_request import UpdateVaultAccountRequest +from fireblocks.models.update_webhook_request import UpdateWebhookRequest from fireblocks.models.user_group_create_request import UserGroupCreateRequest from fireblocks.models.user_group_create_response import UserGroupCreateResponse from fireblocks.models.user_group_response import UserGroupResponse @@ -777,7 +828,7 @@ ValidatedTransactionsForRescan, ) from fireblocks.models.validation_key_dto import ValidationKeyDto -from fireblocks.models.validator_dto import ValidatorDto +from fireblocks.models.validator import Validator from fireblocks.models.vault_account import VaultAccount from fireblocks.models.vault_accounts_paged_response import VaultAccountsPagedResponse from fireblocks.models.vault_accounts_paged_response_paging import ( @@ -787,9 +838,13 @@ from fireblocks.models.vault_asset import VaultAsset from fireblocks.models.vault_wallet_address import VaultWalletAddress from fireblocks.models.vendor_dto import VendorDto +from fireblocks.models.version import Version from fireblocks.models.wallet_asset import WalletAsset from fireblocks.models.wallet_asset_additional_info import WalletAssetAdditionalInfo -from fireblocks.models.withdraw_request_dto import WithdrawRequestDto +from fireblocks.models.webhook import Webhook +from fireblocks.models.webhook_event import WebhookEvent +from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse +from fireblocks.models.withdraw_request import WithdrawRequest from fireblocks.models.workflow_config_status import WorkflowConfigStatus from fireblocks.models.workflow_configuration_id import WorkflowConfigurationId from fireblocks.models.workflow_execution_operation import WorkflowExecutionOperation diff --git a/fireblocks/api/__init__.py b/fireblocks/api/__init__.py index 14294f14..8fac4229 100644 --- a/fireblocks/api/__init__.py +++ b/fireblocks/api/__init__.py @@ -5,6 +5,7 @@ from fireblocks.api.assets_api import AssetsApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi +from fireblocks.api.blockchains_assets_beta_api import BlockchainsAssetsBetaApi from fireblocks.api.compliance_api import ComplianceApi from fireblocks.api.compliance_screening_configuration_api import ComplianceScreeningConfigurationApi from fireblocks.api.console_user_api import ConsoleUserApi @@ -13,6 +14,7 @@ from fireblocks.api.contracts_api import ContractsApi from fireblocks.api.cosigners_beta_api import CosignersBetaApi from fireblocks.api.deployed_contracts_api import DeployedContractsApi +from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi from fireblocks.api.exchange_accounts_api import ExchangeAccountsApi from fireblocks.api.external_wallets_api import ExternalWalletsApi from fireblocks.api.fiat_accounts_api import FiatAccountsApi @@ -20,6 +22,7 @@ from fireblocks.api.internal_wallets_api import InternalWalletsApi from fireblocks.api.job_management_api import JobManagementApi from fireblocks.api.key_link_beta_api import KeyLinkBetaApi +from fireblocks.api.keys_beta_api import KeysBetaApi from fireblocks.api.nfts_api import NFTsApi from fireblocks.api.network_connections_api import NetworkConnectionsApi from fireblocks.api.ota_beta_api import OTABetaApi @@ -28,7 +31,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi from fireblocks.api.smart_transfer_api import SmartTransferApi -from fireblocks.api.staking_beta_api import StakingBetaApi +from fireblocks.api.staking_api import StakingApi from fireblocks.api.tokenization_api import TokenizationApi from fireblocks.api.transactions_api import TransactionsApi from fireblocks.api.travel_rule_beta_api import TravelRuleBetaApi @@ -37,6 +40,7 @@ from fireblocks.api.vaults_api import VaultsApi from fireblocks.api.web3_connections_api import Web3ConnectionsApi from fireblocks.api.webhooks_api import WebhooksApi +from fireblocks.api.webhooks_v2_beta_api import WebhooksV2BetaApi from fireblocks.api.workspace_status_beta_api import WorkspaceStatusBetaApi from fireblocks.api.whitelist_ip_addresses_api import WhitelistIpAddressesApi diff --git a/fireblocks/api/blockchains_assets_api.py b/fireblocks/api/blockchains_assets_api.py index cede5a21..cc115494 100644 --- a/fireblocks/api/blockchains_assets_api.py +++ b/fireblocks/api/blockchains_assets_api.py @@ -226,9 +226,10 @@ def register_new_asset( '200': "AssetResponse", '400': "AssetBadRequestErrorResponse", '403': "AssetForbiddenErrorResponse", - '404': "AssetNotFoundErrorResponse", + '404': "TokenInfoNotFoundErrorResponse", '409': "AssetConflictErrorResponse", '500': "AssetInternalServerErrorResponse", + 'default': "ErrorSchema", } return self.api_client.call_api( diff --git a/fireblocks/api/blockchains_assets_beta_api.py b/fireblocks/api/blockchains_assets_beta_api.py new file mode 100644 index 00000000..9b4e2538 --- /dev/null +++ b/fireblocks/api/blockchains_assets_beta_api.py @@ -0,0 +1,662 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from concurrent.futures import Future +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from fireblocks.models.asset_class_beta import AssetClassBeta +from fireblocks.models.asset_response_beta import AssetResponseBeta +from fireblocks.models.blockchain_response import BlockchainResponse +from fireblocks.models.list_assets_response import ListAssetsResponse +from fireblocks.models.list_blockchains_response import ListBlockchainsResponse + +from fireblocks.api_client import ApiClient, RequestSerialized +from fireblocks.api_response import ApiResponse +from fireblocks.rest import RESTResponseType +from fireblocks.validation_utils import validate_not_empty_string + + +class BlockchainsAssetsBetaApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_asset_by_id( + self, + id: Annotated[StrictStr, Field(description="The ID or legacyId of the asset")], + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[AssetResponseBeta]]: + """Get an asset + + Returns an asset by ID or legacyID.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + + :param id: The ID or legacyId of the asset (required) + :type id: str + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="get_asset_by_id", param_name="id", param_value=id) + + _param = self._get_asset_by_id_serialize( + id=id, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AssetResponseBeta", + '404': "AssetNotFoundErrorResponse", + '500': "AssetInternalServerErrorResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_asset_by_id_serialize( + self, + id, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/assets/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_blockchain_by_id( + self, + id: Annotated[StrictStr, Field(description="The ID or legacyId of the blockchain")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[BlockchainResponse]]: + """Get an blockchain + + Returns an blockchain by ID or legacyID.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + + :param id: The ID or legacyId of the blockchain (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="get_blockchain_by_id", param_name="id", param_value=id) + + _param = self._get_blockchain_by_id_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BlockchainResponse", + '404': "BlockchainNotFoundErrorResponse", + '500': "AssetInternalServerErrorResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_blockchain_by_id_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/blockchains/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_assets( + self, + blockchain_id: Annotated[Optional[StrictStr], Field(description="Blockchain id of the assets")] = None, + asset_class: Annotated[Optional[AssetClassBeta], Field(description="Assets class")] = None, + symbol: Annotated[Optional[Annotated[str, Field(min_length=1, strict=True)]], Field(description="Assets onchain symbol")] = None, + scope: Annotated[Optional[StrictStr], Field(description="Scope of the assets")] = None, + deprecated: Annotated[Optional[StrictBool], Field(description="Are assets deprecated")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="Next page cursor to fetch")] = None, + page_size: Annotated[Optional[Union[Annotated[float, Field(le=1000, strict=True, ge=100)], Annotated[int, Field(le=1000, strict=True, ge=100)]]], Field(description="Items per page")] = None, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[ListAssetsResponse]]: + """List assets + + Returns all asset type supported by Fireblocks.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + + :param blockchain_id: Blockchain id of the assets + :type blockchain_id: str + :param asset_class: Assets class + :type asset_class: AssetClassBeta + :param symbol: Assets onchain symbol + :type symbol: str + :param scope: Scope of the assets + :type scope: str + :param deprecated: Are assets deprecated + :type deprecated: bool + :param page_cursor: Next page cursor to fetch + :type page_cursor: str + :param page_size: Items per page + :type page_size: float + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._list_assets_serialize( + blockchain_id=blockchain_id, + asset_class=asset_class, + symbol=symbol, + scope=scope, + deprecated=deprecated, + page_cursor=page_cursor, + page_size=page_size, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListAssetsResponse", + '500': "AssetInternalServerErrorResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _list_assets_serialize( + self, + blockchain_id, + asset_class, + symbol, + scope, + deprecated, + page_cursor, + page_size, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if blockchain_id is not None: + + _query_params.append(('blockchainId', blockchain_id)) + + if asset_class is not None: + + _query_params.append(('assetClass', asset_class.value)) + + if symbol is not None: + + _query_params.append(('symbol', symbol)) + + if scope is not None: + + _query_params.append(('scope', scope)) + + if deprecated is not None: + + _query_params.append(('deprecated', deprecated)) + + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/assets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_blockchains( + self, + protocol: Annotated[Optional[StrictStr], Field(description="Blockchain protocol")] = None, + deprecated: Annotated[Optional[StrictBool], Field(description="Is blockchain deprecated")] = None, + test: Annotated[Optional[StrictBool], Field(description="Is test blockchain")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="Page cursor to fetch")] = None, + page_size: Annotated[Optional[Union[Annotated[float, Field(le=500, strict=True, ge=1)], Annotated[int, Field(le=500, strict=True, ge=1)]]], Field(description="Items per page (max 500)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[ListBlockchainsResponse]]: + """List blockchains + + Returns all blockchains supported by Fireblocks.
**Note**: - This endpoint is now in Beta, disabled for general availability at this time. + + :param protocol: Blockchain protocol + :type protocol: str + :param deprecated: Is blockchain deprecated + :type deprecated: bool + :param test: Is test blockchain + :type test: bool + :param page_cursor: Page cursor to fetch + :type page_cursor: str + :param page_size: Items per page (max 500) + :type page_size: float + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._list_blockchains_serialize( + protocol=protocol, + deprecated=deprecated, + test=test, + page_cursor=page_cursor, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListBlockchainsResponse", + '500': "AssetInternalServerErrorResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _list_blockchains_serialize( + self, + protocol, + deprecated, + test, + page_cursor, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if protocol is not None: + + _query_params.append(('protocol', protocol)) + + if deprecated is not None: + + _query_params.append(('deprecated', deprecated)) + + if test is not None: + + _query_params.append(('test', test)) + + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/blockchains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/compliance_api.py b/fireblocks/api/compliance_api.py index 6d0d27d7..e8caa08e 100644 --- a/fireblocks/api/compliance_api.py +++ b/fireblocks/api/compliance_api.py @@ -21,6 +21,7 @@ from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated +from fireblocks.models.create_transaction_response import CreateTransactionResponse from fireblocks.models.screening_configurations_request import ScreeningConfigurationsRequest from fireblocks.models.screening_policy_response import ScreeningPolicyResponse from fireblocks.models.screening_provider_rules_configuration_response import ScreeningProviderRulesConfigurationResponse @@ -513,6 +514,139 @@ def _get_screening_policy_serialize( + @validate_call + def retry_rejected_transaction_bypass_screening_checks( + self, + tx_id: Annotated[StrictStr, Field(description="The transaction id that was rejected by screening checks")], + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[CreateTransactionResponse]]: + """Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check + + This endpoint is restricted to Admin API users and is only applicable to outgoing transactions. + + :param tx_id: The transaction id that was rejected by screening checks (required) + :type tx_id: str + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="retry_rejected_transaction_bypass_screening_checks", param_name="tx_id", param_value=tx_id) + + _param = self._retry_rejected_transaction_bypass_screening_checks_serialize( + tx_id=tx_id, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "CreateTransactionResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _retry_rejected_transaction_bypass_screening_checks_serialize( + self, + tx_id, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if tx_id is not None: + _path_params['txId'] = tx_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/screening/transaction/{txId}/bypass_screening_policy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_aml_screening_configuration( self, diff --git a/fireblocks/api/cosigners_beta_api.py b/fireblocks/api/cosigners_beta_api.py index 26ee4b05..d4ee21df 100644 --- a/fireblocks/api/cosigners_beta_api.py +++ b/fireblocks/api/cosigners_beta_api.py @@ -21,11 +21,18 @@ from pydantic import Field, StrictStr, field_validator from typing import Optional, Union from typing_extensions import Annotated +from fireblocks.models.add_cosigner_request import AddCosignerRequest +from fireblocks.models.add_cosigner_response import AddCosignerResponse from fireblocks.models.api_key import ApiKey from fireblocks.models.api_keys_paginated_response import ApiKeysPaginatedResponse from fireblocks.models.cosigner import Cosigner from fireblocks.models.cosigners_paginated_response import CosignersPaginatedResponse +from fireblocks.models.pair_api_key_request import PairApiKeyRequest +from fireblocks.models.pair_api_key_response import PairApiKeyResponse from fireblocks.models.rename_cosigner import RenameCosigner +from fireblocks.models.status import Status +from fireblocks.models.update_callback_handler_request import UpdateCallbackHandlerRequest +from fireblocks.models.update_callback_handler_response import UpdateCallbackHandlerResponse from fireblocks.api_client import ApiClient, RequestSerialized from fireblocks.api_response import ApiResponse @@ -46,6 +53,151 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def add_cosigner( + self, + add_cosigner_request: AddCosignerRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[AddCosignerResponse]]: + """Add cosigner + + Add a new cosigner. The cosigner will be pending pairing until the API key is manually paired + + :param add_cosigner_request: (required) + :type add_cosigner_request: AddCosignerRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._add_cosigner_serialize( + add_cosigner_request=add_cosigner_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AddCosignerResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _add_cosigner_serialize( + self, + add_cosigner_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if add_cosigner_request is not None: + _body_params = add_cosigner_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/cosigners', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def get_api_key( self, @@ -202,7 +354,7 @@ def get_api_keys( ) -> Future[ApiResponse[ApiKeysPaginatedResponse]]: """Get all API keys - Get all cosigner paired API keys (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + Get all cosigner paired API keys (paginated) :param cosigner_id: The unique identifier of the cosigner (required) :type cosigner_id: str @@ -605,10 +757,11 @@ def _get_cosigners_serialize( @validate_call - def rename_cosigner( + def get_request_status( self, cosigner_id: Annotated[StrictStr, Field(description="The unique identifier of the cosigner")], - rename_cosigner: RenameCosigner, + api_key_id: Annotated[StrictStr, Field(description="The unique identifier of the API key")], + request_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -621,15 +774,17 @@ def rename_cosigner( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[Cosigner]]: - """Rename cosigner + ) -> Future[ApiResponse[Status]]: + """Get request status - Rename a cosigner by ID **Note:** These endpoints are currently in beta and might be subject to changes. + Get the status of an asynchronous request :param cosigner_id: The unique identifier of the cosigner (required) :type cosigner_id: str - :param rename_cosigner: (required) - :type rename_cosigner: RenameCosigner + :param api_key_id: The unique identifier of the API key (required) + :type api_key_id: str + :param request_id: (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -652,11 +807,14 @@ def rename_cosigner( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="rename_cosigner", param_name="cosigner_id", param_value=cosigner_id) + validate_not_empty_string(function_name="get_request_status", param_name="cosigner_id", param_value=cosigner_id) + validate_not_empty_string(function_name="get_request_status", param_name="api_key_id", param_value=api_key_id) + validate_not_empty_string(function_name="get_request_status", param_name="request_id", param_value=request_id) - _param = self._rename_cosigner_serialize( + _param = self._get_request_status_serialize( cosigner_id=cosigner_id, - rename_cosigner=rename_cosigner, + api_key_id=api_key_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -664,7 +822,7 @@ def rename_cosigner( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Cosigner", + '200': "Status", 'default': "ErrorSchema", } @@ -674,10 +832,11 @@ def rename_cosigner( _response_types_map=_response_types_map, ) - def _rename_cosigner_serialize( + def _get_request_status_serialize( self, cosigner_id, - rename_cosigner, + api_key_id, + request_id, _request_auth, _content_type, _headers, @@ -699,12 +858,14 @@ def _rename_cosigner_serialize( # process the path parameters if cosigner_id is not None: _path_params['cosignerId'] = cosigner_id + if api_key_id is not None: + _path_params['apiKeyId'] = api_key_id + if request_id is not None: + _path_params['requestId'] = request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if rename_cosigner is not None: - _body_params = rename_cosigner # set the HTTP header `Accept` @@ -714,27 +875,609 @@ def _rename_cosigner_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/cosigners/{cosignerId}', + method='GET', + resource_path='/cosigners/{cosignerId}/api_keys/{apiKeyId}/{requestId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def pair_api_key( + self, + cosigner_id: Annotated[StrictStr, Field(description="The unique identifier of the cosigner")], + api_key_id: Annotated[StrictStr, Field(description="The unique identifier of the API key")], + pair_api_key_request: PairApiKeyRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[PairApiKeyResponse]]: + """Pair API key + + Pair an API key to a cosigner + + :param cosigner_id: The unique identifier of the cosigner (required) + :type cosigner_id: str + :param api_key_id: The unique identifier of the API key (required) + :type api_key_id: str + :param pair_api_key_request: (required) + :type pair_api_key_request: PairApiKeyRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="pair_api_key", param_name="cosigner_id", param_value=cosigner_id) + validate_not_empty_string(function_name="pair_api_key", param_name="api_key_id", param_value=api_key_id) + + _param = self._pair_api_key_serialize( + cosigner_id=cosigner_id, + api_key_id=api_key_id, + pair_api_key_request=pair_api_key_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "PairApiKeyResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _pair_api_key_serialize( + self, + cosigner_id, + api_key_id, + pair_api_key_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cosigner_id is not None: + _path_params['cosignerId'] = cosigner_id + if api_key_id is not None: + _path_params['apiKeyId'] = api_key_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if pair_api_key_request is not None: + _body_params = pair_api_key_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/cosigners/{cosignerId}/api_keys/{apiKeyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def rename_cosigner( + self, + cosigner_id: Annotated[StrictStr, Field(description="The unique identifier of the cosigner")], + rename_cosigner: RenameCosigner, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[Cosigner]]: + """Rename cosigner + + Rename a cosigner by ID **Note:** These endpoints are currently in beta and might be subject to changes. + + :param cosigner_id: The unique identifier of the cosigner (required) + :type cosigner_id: str + :param rename_cosigner: (required) + :type rename_cosigner: RenameCosigner + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="rename_cosigner", param_name="cosigner_id", param_value=cosigner_id) + + _param = self._rename_cosigner_serialize( + cosigner_id=cosigner_id, + rename_cosigner=rename_cosigner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Cosigner", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _rename_cosigner_serialize( + self, + cosigner_id, + rename_cosigner, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cosigner_id is not None: + _path_params['cosignerId'] = cosigner_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if rename_cosigner is not None: + _body_params = rename_cosigner + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/cosigners/{cosignerId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def unpair_api_key( + self, + cosigner_id: Annotated[StrictStr, Field(description="The unique identifier of the cosigner")], + api_key_id: Annotated[StrictStr, Field(description="The unique identifier of the API key")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[ApiKey]]: + """Unpair API key + + Unpair an API key from a cosigner + + :param cosigner_id: The unique identifier of the cosigner (required) + :type cosigner_id: str + :param api_key_id: The unique identifier of the API key (required) + :type api_key_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="unpair_api_key", param_name="cosigner_id", param_value=cosigner_id) + validate_not_empty_string(function_name="unpair_api_key", param_name="api_key_id", param_value=api_key_id) + + _param = self._unpair_api_key_serialize( + cosigner_id=cosigner_id, + api_key_id=api_key_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "ApiKey", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _unpair_api_key_serialize( + self, + cosigner_id, + api_key_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cosigner_id is not None: + _path_params['cosignerId'] = cosigner_id + if api_key_id is not None: + _path_params['apiKeyId'] = api_key_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/cosigners/{cosignerId}/api_keys/{apiKeyId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_callback_handler( + self, + cosigner_id: Annotated[StrictStr, Field(description="The unique identifier of the cosigner")], + api_key_id: Annotated[StrictStr, Field(description="The unique identifier of the API key")], + update_callback_handler_request: UpdateCallbackHandlerRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[UpdateCallbackHandlerResponse]]: + """Update API key callback handler + + Update the callback handler of an API key + + :param cosigner_id: The unique identifier of the cosigner (required) + :type cosigner_id: str + :param api_key_id: The unique identifier of the API key (required) + :type api_key_id: str + :param update_callback_handler_request: (required) + :type update_callback_handler_request: UpdateCallbackHandlerRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="update_callback_handler", param_name="cosigner_id", param_value=cosigner_id) + validate_not_empty_string(function_name="update_callback_handler", param_name="api_key_id", param_value=api_key_id) + + _param = self._update_callback_handler_serialize( + cosigner_id=cosigner_id, + api_key_id=api_key_id, + update_callback_handler_request=update_callback_handler_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '202': "UpdateCallbackHandlerResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _update_callback_handler_serialize( + self, + cosigner_id, + api_key_id, + update_callback_handler_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if cosigner_id is not None: + _path_params['cosignerId'] = cosigner_id + if api_key_id is not None: + _path_params['apiKeyId'] = api_key_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_callback_handler_request is not None: + _body_params = update_callback_handler_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/cosigners/{cosignerId}/api_keys/{apiKeyId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/fireblocks/api/embedded_wallets_api.py b/fireblocks/api/embedded_wallets_api.py new file mode 100644 index 00000000..ae13bcb7 --- /dev/null +++ b/fireblocks/api/embedded_wallets_api.py @@ -0,0 +1,362 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from concurrent.futures import Future +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Optional, Union +from typing_extensions import Annotated +from fireblocks.models.public_key_information import PublicKeyInformation + +from fireblocks.api_client import ApiClient, RequestSerialized +from fireblocks.api_response import ApiResponse +from fireblocks.rest import RESTResponseType +from fireblocks.validation_utils import validate_not_empty_string + + +class EmbeddedWalletsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_public_key_info_for_address_ncw( + self, + wallet_id: Annotated[StrictStr, Field(description="The ID of the Non-Custodial wallet")], + account_id: Annotated[StrictStr, Field(description="The ID of the account")], + asset_id: Annotated[StrictStr, Field(description="The ID of the asset")], + change: Annotated[Union[StrictFloat, StrictInt], Field(description="BIP44 derivation path - change value")], + address_index: Annotated[Union[StrictFloat, StrictInt], Field(description="BIP44 derivation path - index value")], + compressed: Annotated[Optional[StrictBool], Field(description="Compressed/Uncompressed public key format")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[PublicKeyInformation]]: + """Get the public key of an asset + + Gets the public key of an asset associated with a specific account within a Non-Custodial Wallet + + :param wallet_id: The ID of the Non-Custodial wallet (required) + :type wallet_id: str + :param account_id: The ID of the account (required) + :type account_id: str + :param asset_id: The ID of the asset (required) + :type asset_id: str + :param change: BIP44 derivation path - change value (required) + :type change: float + :param address_index: BIP44 derivation path - index value (required) + :type address_index: float + :param compressed: Compressed/Uncompressed public key format + :type compressed: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="get_public_key_info_for_address_ncw", param_name="wallet_id", param_value=wallet_id) + validate_not_empty_string(function_name="get_public_key_info_for_address_ncw", param_name="account_id", param_value=account_id) + validate_not_empty_string(function_name="get_public_key_info_for_address_ncw", param_name="asset_id", param_value=asset_id) + + _param = self._get_public_key_info_for_address_ncw_serialize( + wallet_id=wallet_id, + account_id=account_id, + asset_id=asset_id, + change=change, + address_index=address_index, + compressed=compressed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PublicKeyInformation", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_public_key_info_for_address_ncw_serialize( + self, + wallet_id, + account_id, + asset_id, + change, + address_index, + compressed, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if wallet_id is not None: + _path_params['walletId'] = wallet_id + if account_id is not None: + _path_params['accountId'] = account_id + if asset_id is not None: + _path_params['assetId'] = asset_id + if change is not None: + _path_params['change'] = change + if address_index is not None: + _path_params['addressIndex'] = address_index + # process the query parameters + if compressed is not None: + + _query_params.append(('compressed', compressed)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/ncw/{walletId}/accounts/{accountId}/{assetId}/{change}/{addressIndex}/public_key_info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_public_key_info_ncw( + self, + wallet_id: Annotated[StrictStr, Field(description="The ID of the Non-Custodial wallet")], + derivation_path: Annotated[StrictStr, Field(description="An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. ")], + algorithm: Annotated[StrictStr, Field(description="Elliptic Curve")], + compressed: Optional[StrictBool] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[PublicKeyInformation]]: + """Get the public key for a derivation path + + Gets the public key information based on derivation path and signing algorithm within a Non-Custodial Wallet + + :param wallet_id: The ID of the Non-Custodial wallet (required) + :type wallet_id: str + :param derivation_path: An array of integers (passed as JSON stringified array) representing the full BIP44 derivation path of the requested public key. The first element must always be 44. (required) + :type derivation_path: str + :param algorithm: Elliptic Curve (required) + :type algorithm: str + :param compressed: + :type compressed: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="get_public_key_info_ncw", param_name="wallet_id", param_value=wallet_id) + validate_not_empty_string(function_name="get_public_key_info_ncw", param_name="derivation_path", param_value=derivation_path) + validate_not_empty_string(function_name="get_public_key_info_ncw", param_name="algorithm", param_value=algorithm) + + _param = self._get_public_key_info_ncw_serialize( + wallet_id=wallet_id, + derivation_path=derivation_path, + algorithm=algorithm, + compressed=compressed, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PublicKeyInformation", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_public_key_info_ncw_serialize( + self, + wallet_id, + derivation_path, + algorithm, + compressed, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if wallet_id is not None: + _path_params['walletId'] = wallet_id + # process the query parameters + if derivation_path is not None: + + _query_params.append(('derivationPath', derivation_path)) + + if algorithm is not None: + + _query_params.append(('algorithm', algorithm)) + + if compressed is not None: + + _query_params.append(('compressed', compressed)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/ncw/{walletId}/public_key_info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/keys_beta_api.py b/fireblocks/api/keys_beta_api.py new file mode 100644 index 00000000..7e7b9a50 --- /dev/null +++ b/fireblocks/api/keys_beta_api.py @@ -0,0 +1,285 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from concurrent.futures import Future +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse + +from fireblocks.api_client import ApiClient, RequestSerialized +from fireblocks.api_response import ApiResponse +from fireblocks.rest import RESTResponseType +from fireblocks.validation_utils import validate_not_empty_string + + +class KeysBetaApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_mpc_keys_list( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[GetMpcKeysResponse]]: + """Get list of mpc keys + + Returns a list of MPC signing keys of the workspace. For each key, the list of players associated with it is attached. **Note:** This endpoint is currently in beta and might be subject to changes. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_mpc_keys_list_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetMpcKeysResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_mpc_keys_list_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/keys/mpc/list', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_mpc_keys_list_by_user( + self, + user_id: Annotated[StrictStr, Field(description="The id for the user")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[GetMpcKeysResponse]]: + """Get list of mpc keys by `userId` + + Returns a list of MPC signing keys of a specific user. For each key, the list of players associated with it is attached. **Note:** This endpoint is currently in beta and might be subject to changes. + + :param user_id: The id for the user (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="get_mpc_keys_list_by_user", param_name="user_id", param_value=user_id) + + _param = self._get_mpc_keys_list_by_user_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetMpcKeysResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_mpc_keys_list_by_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/keys/mpc/list/{userId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/staking_api.py b/fireblocks/api/staking_api.py new file mode 100644 index 00000000..426c30a0 --- /dev/null +++ b/fireblocks/api/staking_api.py @@ -0,0 +1,1798 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from concurrent.futures import Future +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Dict, List, Optional +from typing_extensions import Annotated +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.chain_info_response import ChainInfoResponse +from fireblocks.models.claim_rewards_request import ClaimRewardsRequest +from fireblocks.models.delegation import Delegation +from fireblocks.models.delegation_summary import DelegationSummary +from fireblocks.models.provider import Provider +from fireblocks.models.split_request import SplitRequest +from fireblocks.models.split_response import SplitResponse +from fireblocks.models.stake_request import StakeRequest +from fireblocks.models.stake_response import StakeResponse +from fireblocks.models.staking_provider import StakingProvider +from fireblocks.models.unstake_request import UnstakeRequest +from fireblocks.models.withdraw_request import WithdrawRequest + +from fireblocks.api_client import ApiClient, RequestSerialized +from fireblocks.api_response import ApiResponse +from fireblocks.rest import RESTResponseType +from fireblocks.validation_utils import validate_not_empty_string + + +class StakingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def approve_terms_of_service_by_provider_id( + self, + provider_id: Annotated[StakingProvider, Field(description="The unique identifier of the staking provider")], + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[None]]: + """Approve staking terms of service + + Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider. + + :param provider_id: The unique identifier of the staking provider (required) + :type provider_id: StakingProvider + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._approve_terms_of_service_by_provider_id_serialize( + provider_id=provider_id, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _approve_terms_of_service_by_provider_id_serialize( + self, + provider_id, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if provider_id is not None: + _path_params['providerId'] = provider_id.value + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/staking/providers/{providerId}/approveTermsOfService', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def claim_rewards( + self, + chain_descriptor: Annotated[StrictStr, Field(description="The protocol identifier (e.g. \"MATIC\"/\"SOL\") to use")], + claim_rewards_request: ClaimRewardsRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[None]]: + """Execute a Claim Rewards operation + + Perform a chain-specific Claim Rewards. + + :param chain_descriptor: The protocol identifier (e.g. \"MATIC\"/\"SOL\") to use (required) + :type chain_descriptor: str + :param claim_rewards_request: (required) + :type claim_rewards_request: ClaimRewardsRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="claim_rewards", param_name="chain_descriptor", param_value=chain_descriptor) + + _param = self._claim_rewards_serialize( + chain_descriptor=chain_descriptor, + claim_rewards_request=claim_rewards_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _claim_rewards_serialize( + self, + chain_descriptor, + claim_rewards_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chain_descriptor is not None: + _path_params['chainDescriptor'] = chain_descriptor + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if claim_rewards_request is not None: + _body_params = claim_rewards_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/staking/chains/{chainDescriptor}/claim_rewards', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_all_delegations( + self, + chain_descriptor: Annotated[Optional[ChainDescriptor], Field(description="Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[List[Delegation]]]: + """List staking positions details + + Return detailed information on all staking positions, including the staked amount, rewards, status and more. + + :param chain_descriptor: Use \"ETH\" / \"SOL\" / \"MATIC\" / \"STETH_ETH\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. + :type chain_descriptor: ChainDescriptor + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_all_delegations_serialize( + chain_descriptor=chain_descriptor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Delegation]", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_all_delegations_serialize( + self, + chain_descriptor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if chain_descriptor is not None: + + _query_params.append(('chainDescriptor', chain_descriptor.value)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/positions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_chain_info( + self, + chain_descriptor: Annotated[ChainDescriptor, Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[ChainInfoResponse]]: + """Get chain-specific staking summary + + Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.) + + :param chain_descriptor: The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\"/\"STETH_ETH\") to use (required) + :type chain_descriptor: ChainDescriptor + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_chain_info_serialize( + chain_descriptor=chain_descriptor, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChainInfoResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_chain_info_serialize( + self, + chain_descriptor, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chain_descriptor is not None: + _path_params['chainDescriptor'] = chain_descriptor.value + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/chains/{chainDescriptor}/chainInfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_chains( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[List[str]]]: + """List staking supported chains + + Return an alphabetical list of supported chains. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_chains_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_chains_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/chains', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_delegation_by_id( + self, + id: Annotated[StrictStr, Field(description="The unique identifier of the staking position")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[Delegation]]: + """Get staking position details + + Return detailed information on a staking position, including the staked amount, rewards, status and more. + + :param id: The unique identifier of the staking position (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="get_delegation_by_id", param_name="id", param_value=id) + + _param = self._get_delegation_by_id_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Delegation", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_delegation_by_id_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/positions/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_providers( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[List[Provider]]]: + """List staking providers details + + Return information on all the available staking providers. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_providers_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[Provider]", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_providers_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/providers', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_summary( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[DelegationSummary]]: + """Get staking summary details + + Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_summary_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DelegationSummary", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_summary_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/positions/summary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_summary_by_vault( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[Dict[str, DelegationSummary]]]: + """Get staking summary details by vault + + Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._get_summary_by_vault_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, DelegationSummary]", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _get_summary_by_vault_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/staking/positions/summary/vaults', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def split( + self, + chain_descriptor: Annotated[StrictStr, Field(description="The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use")], + split_request: SplitRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[SplitResponse]]: + """Execute a Split operation on SOL/SOL_TEST stake account + + Perform a Solana Split stake account. + + :param chain_descriptor: The protocol identifier (e.g. \"SOL\"/\"SOL_TEST\") to use (required) + :type chain_descriptor: str + :param split_request: (required) + :type split_request: SplitRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + validate_not_empty_string(function_name="split", param_name="chain_descriptor", param_value=chain_descriptor) + + _param = self._split_serialize( + chain_descriptor=chain_descriptor, + split_request=split_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "SplitResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _split_serialize( + self, + chain_descriptor, + split_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chain_descriptor is not None: + _path_params['chainDescriptor'] = chain_descriptor + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if split_request is not None: + _body_params = split_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/staking/chains/{chainDescriptor}/split', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def stake( + self, + chain_descriptor: Annotated[ChainDescriptor, Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use")], + stake_request: StakeRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[StakeResponse]]: + """Initiate Stake Operation + + Perform a chain-specific Stake. + + :param chain_descriptor: The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use (required) + :type chain_descriptor: ChainDescriptor + :param stake_request: (required) + :type stake_request: StakeRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._stake_serialize( + chain_descriptor=chain_descriptor, + stake_request=stake_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "StakeResponse", + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _stake_serialize( + self, + chain_descriptor, + stake_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chain_descriptor is not None: + _path_params['chainDescriptor'] = chain_descriptor.value + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if stake_request is not None: + _body_params = stake_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/staking/chains/{chainDescriptor}/stake', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def unstake( + self, + chain_descriptor: Annotated[ChainDescriptor, Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use")], + unstake_request: UnstakeRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[None]]: + """Execute an Unstake operation + + Execute an Unstake operation + + :param chain_descriptor: The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use (required) + :type chain_descriptor: ChainDescriptor + :param unstake_request: (required) + :type unstake_request: UnstakeRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._unstake_serialize( + chain_descriptor=chain_descriptor, + unstake_request=unstake_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _unstake_serialize( + self, + chain_descriptor, + unstake_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chain_descriptor is not None: + _path_params['chainDescriptor'] = chain_descriptor.value + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if unstake_request is not None: + _body_params = unstake_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/staking/chains/{chainDescriptor}/unstake', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def withdraw( + self, + chain_descriptor: Annotated[ChainDescriptor, Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use")], + withdraw_request: WithdrawRequest, + idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Future[ApiResponse[None]]: + """Execute a Withdraw operation + + Perform a chain-specific Withdraw. + + :param chain_descriptor: The protocol identifier (e.g. \"ETH\"/\"SOL\"/\"MATIC\") to use (required) + :type chain_descriptor: ChainDescriptor + :param withdraw_request: (required) + :type withdraw_request: WithdrawRequest + :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + :type idempotency_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + + _param = self._withdraw_serialize( + chain_descriptor=chain_descriptor, + withdraw_request=withdraw_request, + idempotency_key=idempotency_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': None, + 'default': "ErrorSchema", + } + + return self.api_client.call_api( + *_param, + _request_timeout=_request_timeout, + _response_types_map=_response_types_map, + ) + + def _withdraw_serialize( + self, + chain_descriptor, + withdraw_request, + idempotency_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chain_descriptor is not None: + _path_params['chainDescriptor'] = chain_descriptor.value + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + # process the form parameters + # process the body parameter + if withdraw_request is not None: + _body_params = withdraw_request + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/staking/chains/{chainDescriptor}/withdraw', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/fireblocks/api/staking_beta_api.py b/fireblocks/api/webhooks_v2_beta_api.py similarity index 63% rename from fireblocks/api/staking_beta_api.py rename to fireblocks/api/webhooks_v2_beta_api.py index aa9558fe..9dc38cd3 100644 --- a/fireblocks/api/staking_beta_api.py +++ b/fireblocks/api/webhooks_v2_beta_api.py @@ -18,15 +18,17 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr, field_validator -from typing import Any, Dict, List, Optional +from pydantic import Field, StrictBool, StrictStr, field_validator +from typing import List, Optional, Union from typing_extensions import Annotated -from fireblocks.models.chain_info_response_dto import ChainInfoResponseDto -from fireblocks.models.delegation_dto import DelegationDto -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto -from fireblocks.models.execute_action_request import ExecuteActionRequest -from fireblocks.models.execute_action_response import ExecuteActionResponse -from fireblocks.models.provider_dto import ProviderDto +from fireblocks.models.create_webhook_request import CreateWebhookRequest +from fireblocks.models.notification_paginated_response import NotificationPaginatedResponse +from fireblocks.models.notification_status import NotificationStatus +from fireblocks.models.notification_with_data import NotificationWithData +from fireblocks.models.update_webhook_request import UpdateWebhookRequest +from fireblocks.models.webhook import Webhook +from fireblocks.models.webhook_event import WebhookEvent +from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse from fireblocks.api_client import ApiClient, RequestSerialized from fireblocks.api_response import ApiResponse @@ -34,7 +36,7 @@ from fireblocks.validation_utils import validate_not_empty_string -class StakingBetaApi: +class WebhooksV2BetaApi: """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -48,9 +50,9 @@ def __init__(self, api_client=None) -> None: @validate_call - def approve_terms_of_service_by_provider_id( + def create_webhook( self, - provider_id: Annotated[StrictStr, Field(description="The unique identifier of the staking provider")], + create_webhook_request: CreateWebhookRequest, idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, _request_timeout: Union[ None, @@ -64,13 +66,13 @@ def approve_terms_of_service_by_provider_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[object]]: - """ + ) -> Future[ApiResponse[Webhook]]: + """Create new webhook - Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider. + Creates a new webhook, which will be triggered on the specified events **Note:** These endpoints are currently in beta and might be subject to changes. - :param provider_id: The unique identifier of the staking provider (required) - :type provider_id: str + :param create_webhook_request: (required) + :type create_webhook_request: CreateWebhookRequest :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. :type idempotency_key: str :param _request_timeout: timeout setting for this request. If one @@ -95,10 +97,9 @@ def approve_terms_of_service_by_provider_id( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="approve_terms_of_service_by_provider_id", param_name="provider_id", param_value=provider_id) - _param = self._approve_terms_of_service_by_provider_id_serialize( - provider_id=provider_id, + _param = self._create_webhook_serialize( + create_webhook_request=create_webhook_request, idempotency_key=idempotency_key, _request_auth=_request_auth, _content_type=_content_type, @@ -107,7 +108,8 @@ def approve_terms_of_service_by_provider_id( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "object", + '201': "Webhook", + 'default': "ErrorSchema", } return self.api_client.call_api( @@ -116,9 +118,9 @@ def approve_terms_of_service_by_provider_id( _response_types_map=_response_types_map, ) - def _approve_terms_of_service_by_provider_id_serialize( + def _create_webhook_serialize( self, - provider_id, + create_webhook_request, idempotency_key, _request_auth, _content_type, @@ -139,161 +141,14 @@ def _approve_terms_of_service_by_provider_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if provider_id is not None: - _path_params['providerId'] = provider_id # process the query parameters # process the header parameters if idempotency_key is not None: _header_params['Idempotency-Key'] = idempotency_key # process the form parameters # process the body parameter - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/staking/providers/{providerId}/approveTermsOfService', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def execute_action( - self, - chain_descriptor: Annotated[StrictStr, Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\") to use")], - action_id: Annotated[StrictStr, Field(description="The operation that can be executed on a vault/position")], - execute_action_request: ExecuteActionRequest, - idempotency_key: Annotated[Optional[StrictStr], Field(description="A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[ExecuteActionResponse]]: - """ - - Perform a chain-specific staking action (e.g. stake, unstake, withdraw). - - :param chain_descriptor: The protocol identifier (e.g. \"ETH\"/\"SOL\") to use (required) - :type chain_descriptor: str - :param action_id: The operation that can be executed on a vault/position (required) - :type action_id: str - :param execute_action_request: (required) - :type execute_action_request: ExecuteActionRequest - :param idempotency_key: A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. - :type idempotency_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - validate_not_empty_string(function_name="execute_action", param_name="chain_descriptor", param_value=chain_descriptor) - validate_not_empty_string(function_name="execute_action", param_name="action_id", param_value=action_id) - - _param = self._execute_action_serialize( - chain_descriptor=chain_descriptor, - action_id=action_id, - execute_action_request=execute_action_request, - idempotency_key=idempotency_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ExecuteActionResponse", - } - - return self.api_client.call_api( - *_param, - _request_timeout=_request_timeout, - _response_types_map=_response_types_map, - ) - - def _execute_action_serialize( - self, - chain_descriptor, - action_id, - execute_action_request, - idempotency_key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if chain_descriptor is not None: - _path_params['chainDescriptor'] = chain_descriptor - if action_id is not None: - _path_params['actionId'] = action_id - # process the query parameters - # process the header parameters - if idempotency_key is not None: - _header_params['Idempotency-Key'] = idempotency_key - # process the form parameters - # process the body parameter - if execute_action_request is not None: - _body_params = execute_action_request + if create_webhook_request is not None: + _body_params = create_webhook_request # set the HTTP header `Accept` @@ -323,7 +178,7 @@ def _execute_action_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/staking/chains/{chainDescriptor}/{actionId}', + resource_path='/webhooks', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -340,9 +195,9 @@ def _execute_action_serialize( @validate_call - def get_all_delegations( + def delete_webhook( self, - chain_descriptor: Annotated[Optional[StrictStr], Field(description="Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument.")] = None, + webhook_id: Annotated[StrictStr, Field(description="The unique identifier of the webhook")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -355,13 +210,13 @@ def get_all_delegations( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[List[DelegationDto]]]: - """ + ) -> Future[ApiResponse[Webhook]]: + """Delete webhook - Return detailed information on all staking positions, including the staked amount, rewards, status and more. + Delete a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. - :param chain_descriptor: Use \"ETH\" / \"SOL\" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument. - :type chain_descriptor: str + :param webhook_id: The unique identifier of the webhook (required) + :type webhook_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -384,9 +239,10 @@ def get_all_delegations( :return: Returns the result object. """ # noqa: E501 + validate_not_empty_string(function_name="delete_webhook", param_name="webhook_id", param_value=webhook_id) - _param = self._get_all_delegations_serialize( - chain_descriptor=chain_descriptor, + _param = self._delete_webhook_serialize( + webhook_id=webhook_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -394,7 +250,8 @@ def get_all_delegations( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[DelegationDto]", + '200': "Webhook", + 'default': "ErrorSchema", } return self.api_client.call_api( @@ -403,9 +260,9 @@ def get_all_delegations( _response_types_map=_response_types_map, ) - def _get_all_delegations_serialize( + def _delete_webhook_serialize( self, - chain_descriptor, + webhook_id, _request_auth, _content_type, _headers, @@ -425,11 +282,9 @@ def _get_all_delegations_serialize( _body_params: Optional[bytes] = None # process the path parameters + if webhook_id is not None: + _path_params['webhookId'] = webhook_id # process the query parameters - if chain_descriptor is not None: - - _query_params.append(('chainDescriptor', chain_descriptor)) - # process the header parameters # process the form parameters # process the body parameter @@ -448,8 +303,8 @@ def _get_all_delegations_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/staking/positions', + method='DELETE', + resource_path='/webhooks/{webhookId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -466,9 +321,11 @@ def _get_all_delegations_serialize( @validate_call - def get_chain_info( + def get_notification( self, - chain_descriptor: Annotated[StrictStr, Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\") to use")], + webhook_id: Annotated[StrictStr, Field(description="The ID of the webhook to fetch")], + notification_id: Annotated[StrictStr, Field(description="The ID of the notification to fetch")], + include_data: Annotated[Optional[StrictBool], Field(description="Include the data of the notification")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -481,13 +338,17 @@ def get_chain_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[ChainInfoResponseDto]]: - """ + ) -> Future[ApiResponse[NotificationWithData]]: + """Get notification by id - Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.) + Get notification by id **Note:** These endpoints are currently in beta and might be subject to changes. - :param chain_descriptor: The protocol identifier (e.g. \"ETH\"/\"SOL\") to use (required) - :type chain_descriptor: str + :param webhook_id: The ID of the webhook to fetch (required) + :type webhook_id: str + :param notification_id: The ID of the notification to fetch (required) + :type notification_id: str + :param include_data: Include the data of the notification + :type include_data: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -510,10 +371,13 @@ def get_chain_info( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="get_chain_info", param_name="chain_descriptor", param_value=chain_descriptor) + validate_not_empty_string(function_name="get_notification", param_name="webhook_id", param_value=webhook_id) + validate_not_empty_string(function_name="get_notification", param_name="notification_id", param_value=notification_id) - _param = self._get_chain_info_serialize( - chain_descriptor=chain_descriptor, + _param = self._get_notification_serialize( + webhook_id=webhook_id, + notification_id=notification_id, + include_data=include_data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -521,7 +385,7 @@ def get_chain_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ChainInfoResponseDto", + '200': "NotificationWithData", } return self.api_client.call_api( @@ -530,128 +394,11 @@ def get_chain_info( _response_types_map=_response_types_map, ) - def _get_chain_info_serialize( - self, - chain_descriptor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if chain_descriptor is not None: - _path_params['chainDescriptor'] = chain_descriptor - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/staking/chains/{chainDescriptor}/chainInfo', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_chains( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[List[str]]]: - """ - - Return an alphabetical list of supported chains. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - - _param = self._get_chains_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - - return self.api_client.call_api( - *_param, - _request_timeout=_request_timeout, - _response_types_map=_response_types_map, - ) - - def _get_chains_serialize( + def _get_notification_serialize( self, + webhook_id, + notification_id, + include_data, _request_auth, _content_type, _headers, @@ -671,7 +418,15 @@ def _get_chains_serialize( _body_params: Optional[bytes] = None # process the path parameters + if webhook_id is not None: + _path_params['webhookId'] = webhook_id + if notification_id is not None: + _path_params['notificationId'] = notification_id # process the query parameters + if include_data is not None: + + _query_params.append(('includeData', include_data)) + # process the header parameters # process the form parameters # process the body parameter @@ -691,7 +446,7 @@ def _get_chains_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/staking/chains', + resource_path='/webhooks/{webhookId}/notifications/{notificationId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -708,9 +463,17 @@ def _get_chains_serialize( @validate_call - def get_delegation_by_id( + def get_notifications( self, - id: Annotated[StrictStr, Field(description="The unique identifier of the staking position")], + webhook_id: StrictStr, + order: Annotated[Optional[StrictStr], Field(description="ASC / DESC ordering (default DESC)")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="Cursor of the required page")] = None, + page_size: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Maximum number of items in the page")] = None, + created_start_date: Annotated[Optional[StrictStr], Field(description="sort by start date")] = None, + created_end_date: Annotated[Optional[StrictStr], Field(description="sort by end date")] = None, + statuses: Annotated[Optional[List[NotificationStatus]], Field(description="Filter by Notification statues")] = None, + event_types: Annotated[Optional[List[WebhookEvent]], Field(description="Filter by Notification eventTypes")] = None, + resource_id: Annotated[Optional[StrictStr], Field(description="Filter by resourceId")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -723,13 +486,29 @@ def get_delegation_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[DelegationDto]]: - """ - - Return detailed information on a staking position, including the staked amount, rewards, status and more. - - :param id: The unique identifier of the staking position (required) - :type id: str + ) -> Future[ApiResponse[NotificationPaginatedResponse]]: + """Get all notifications by webhook id + + Get all notifications by webhook id (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + + :param webhook_id: (required) + :type webhook_id: str + :param order: ASC / DESC ordering (default DESC) + :type order: str + :param page_cursor: Cursor of the required page + :type page_cursor: str + :param page_size: Maximum number of items in the page + :type page_size: float + :param created_start_date: sort by start date + :type created_start_date: str + :param created_end_date: sort by end date + :type created_end_date: str + :param statuses: Filter by Notification statues + :type statuses: List[NotificationStatus] + :param event_types: Filter by Notification eventTypes + :type event_types: List[WebhookEvent] + :param resource_id: Filter by resourceId + :type resource_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -752,10 +531,18 @@ def get_delegation_by_id( :return: Returns the result object. """ # noqa: E501 - validate_not_empty_string(function_name="get_delegation_by_id", param_name="id", param_value=id) - - _param = self._get_delegation_by_id_serialize( - id=id, + validate_not_empty_string(function_name="get_notifications", param_name="webhook_id", param_value=webhook_id) + + _param = self._get_notifications_serialize( + webhook_id=webhook_id, + order=order, + page_cursor=page_cursor, + page_size=page_size, + created_start_date=created_start_date, + created_end_date=created_end_date, + statuses=statuses, + event_types=event_types, + resource_id=resource_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -763,7 +550,7 @@ def get_delegation_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DelegationDto", + '200': "NotificationPaginatedResponse", } return self.api_client.call_api( @@ -772,9 +559,17 @@ def get_delegation_by_id( _response_types_map=_response_types_map, ) - def _get_delegation_by_id_serialize( + def _get_notifications_serialize( self, - id, + webhook_id, + order, + page_cursor, + page_size, + created_start_date, + created_end_date, + statuses, + event_types, + resource_id, _request_auth, _content_type, _headers, @@ -784,6 +579,8 @@ def _get_delegation_by_id_serialize( _host = None _collection_formats: Dict[str, str] = { + 'statuses': 'multi', + 'eventTypes': 'multi', } _path_params: Dict[str, str] = {} @@ -794,9 +591,41 @@ def _get_delegation_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id + if webhook_id is not None: + _path_params['webhookId'] = webhook_id # process the query parameters + if order is not None: + + _query_params.append(('order', order)) + + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if created_start_date is not None: + + _query_params.append(('createdStartDate', created_start_date)) + + if created_end_date is not None: + + _query_params.append(('createdEndDate', created_end_date)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + + if event_types is not None: + + _query_params.append(('eventTypes', event_types)) + + if resource_id is not None: + + _query_params.append(('resourceId', resource_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -816,7 +645,7 @@ def _get_delegation_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/staking/positions/{id}', + resource_path='/webhooks/{webhookId}/notifications', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -833,8 +662,9 @@ def _get_delegation_by_id_serialize( @validate_call - def get_providers( + def get_webhook( self, + webhook_id: Annotated[StrictStr, Field(description="The unique identifier of the webhook")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -847,11 +677,13 @@ def get_providers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[List[ProviderDto]]]: - """ + ) -> Future[ApiResponse[Webhook]]: + """Get webhook by id - Return information on all the available staking providers. + Retrieve a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. + :param webhook_id: The unique identifier of the webhook (required) + :type webhook_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -874,8 +706,10 @@ def get_providers( :return: Returns the result object. """ # noqa: E501 + validate_not_empty_string(function_name="get_webhook", param_name="webhook_id", param_value=webhook_id) - _param = self._get_providers_serialize( + _param = self._get_webhook_serialize( + webhook_id=webhook_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -883,7 +717,8 @@ def get_providers( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ProviderDto]", + '200': "Webhook", + 'default': "ErrorSchema", } return self.api_client.call_api( @@ -892,8 +727,9 @@ def get_providers( _response_types_map=_response_types_map, ) - def _get_providers_serialize( + def _get_webhook_serialize( self, + webhook_id, _request_auth, _content_type, _headers, @@ -913,6 +749,8 @@ def _get_providers_serialize( _body_params: Optional[bytes] = None # process the path parameters + if webhook_id is not None: + _path_params['webhookId'] = webhook_id # process the query parameters # process the header parameters # process the form parameters @@ -933,7 +771,7 @@ def _get_providers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/staking/providers', + resource_path='/webhooks/{webhookId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -950,8 +788,11 @@ def _get_providers_serialize( @validate_call - def get_summary( + def get_webhooks( self, + order: Annotated[Optional[StrictStr], Field(description="ASC / DESC ordering (default DESC)")] = None, + page_cursor: Annotated[Optional[StrictStr], Field(description="Cursor of the required page")] = None, + page_size: Annotated[Optional[Union[Annotated[float, Field(le=100, strict=True, ge=1)], Annotated[int, Field(le=100, strict=True, ge=1)]]], Field(description="Maximum number of items in the page")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -964,11 +805,17 @@ def get_summary( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[DelegationSummaryDto]]: - """ + ) -> Future[ApiResponse[WebhookPaginatedResponse]]: + """Get all webhooks - Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + Get all webhooks (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. + :param order: ASC / DESC ordering (default DESC) + :type order: str + :param page_cursor: Cursor of the required page + :type page_cursor: str + :param page_size: Maximum number of items in the page + :type page_size: float :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -992,7 +839,10 @@ def get_summary( """ # noqa: E501 - _param = self._get_summary_serialize( + _param = self._get_webhooks_serialize( + order=order, + page_cursor=page_cursor, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1000,7 +850,8 @@ def get_summary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DelegationSummaryDto", + '200': "WebhookPaginatedResponse", + 'default': "ErrorSchema", } return self.api_client.call_api( @@ -1009,8 +860,11 @@ def get_summary( _response_types_map=_response_types_map, ) - def _get_summary_serialize( + def _get_webhooks_serialize( self, + order, + page_cursor, + page_size, _request_auth, _content_type, _headers, @@ -1031,6 +885,18 @@ def _get_summary_serialize( # process the path parameters # process the query parameters + if order is not None: + + _query_params.append(('order', order)) + + if page_cursor is not None: + + _query_params.append(('pageCursor', page_cursor)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + # process the header parameters # process the form parameters # process the body parameter @@ -1050,7 +916,7 @@ def _get_summary_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/staking/positions/summary', + resource_path='/webhooks', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1067,8 +933,10 @@ def _get_summary_serialize( @validate_call - def get_summary_by_vault( + def update_webhook( self, + webhook_id: Annotated[StrictStr, Field(description="The unique identifier of the webhook")], + update_webhook_request: UpdateWebhookRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1081,11 +949,15 @@ def get_summary_by_vault( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Future[ApiResponse[Dict[str, DelegationSummaryDto]]]: - """ + ) -> Future[ApiResponse[Webhook]]: + """Update webhook - Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain. + Update a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. + :param webhook_id: The unique identifier of the webhook (required) + :type webhook_id: str + :param update_webhook_request: (required) + :type update_webhook_request: UpdateWebhookRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1108,8 +980,11 @@ def get_summary_by_vault( :return: Returns the result object. """ # noqa: E501 + validate_not_empty_string(function_name="update_webhook", param_name="webhook_id", param_value=webhook_id) - _param = self._get_summary_by_vault_serialize( + _param = self._update_webhook_serialize( + webhook_id=webhook_id, + update_webhook_request=update_webhook_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1117,7 +992,8 @@ def get_summary_by_vault( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, DelegationSummaryDto]", + '200': "Webhook", + 'default': "ErrorSchema", } return self.api_client.call_api( @@ -1126,8 +1002,10 @@ def get_summary_by_vault( _response_types_map=_response_types_map, ) - def _get_summary_by_vault_serialize( + def _update_webhook_serialize( self, + webhook_id, + update_webhook_request, _request_auth, _content_type, _headers, @@ -1147,10 +1025,14 @@ def _get_summary_by_vault_serialize( _body_params: Optional[bytes] = None # process the path parameters + if webhook_id is not None: + _path_params['webhookId'] = webhook_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_webhook_request is not None: + _body_params = update_webhook_request # set the HTTP header `Accept` @@ -1160,14 +1042,27 @@ def _get_summary_by_vault_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', - resource_path='/staking/positions/summary/vaults', + method='PATCH', + resource_path='/webhooks/{webhookId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/fireblocks/client.py b/fireblocks/client.py index 6381c38b..aaba615f 100644 --- a/fireblocks/client.py +++ b/fireblocks/client.py @@ -18,6 +18,7 @@ from fireblocks.api.assets_api import AssetsApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi +from fireblocks.api.blockchains_assets_beta_api import BlockchainsAssetsBetaApi from fireblocks.api.compliance_api import ComplianceApi from fireblocks.api.compliance_screening_configuration_api import ( ComplianceScreeningConfigurationApi, @@ -28,6 +29,7 @@ from fireblocks.api.contracts_api import ContractsApi from fireblocks.api.cosigners_beta_api import CosignersBetaApi from fireblocks.api.deployed_contracts_api import DeployedContractsApi +from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi from fireblocks.api.exchange_accounts_api import ExchangeAccountsApi from fireblocks.api.external_wallets_api import ExternalWalletsApi from fireblocks.api.fiat_accounts_api import FiatAccountsApi @@ -35,6 +37,7 @@ from fireblocks.api.internal_wallets_api import InternalWalletsApi from fireblocks.api.job_management_api import JobManagementApi from fireblocks.api.key_link_beta_api import KeyLinkBetaApi +from fireblocks.api.keys_beta_api import KeysBetaApi from fireblocks.api.nfts_api import NFTsApi from fireblocks.api.network_connections_api import NetworkConnectionsApi from fireblocks.api.ota_beta_api import OTABetaApi @@ -43,7 +46,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi from fireblocks.api.smart_transfer_api import SmartTransferApi -from fireblocks.api.staking_beta_api import StakingBetaApi +from fireblocks.api.staking_api import StakingApi from fireblocks.api.tokenization_api import TokenizationApi from fireblocks.api.transactions_api import TransactionsApi from fireblocks.api.travel_rule_beta_api import TravelRuleBetaApi @@ -52,6 +55,7 @@ from fireblocks.api.vaults_api import VaultsApi from fireblocks.api.web3_connections_api import Web3ConnectionsApi from fireblocks.api.webhooks_api import WebhooksApi +from fireblocks.api.webhooks_v2_beta_api import WebhooksV2BetaApi from fireblocks.api.workspace_status_beta_api import WorkspaceStatusBetaApi from fireblocks.api.whitelist_ip_addresses_api import WhitelistIpAddressesApi @@ -69,6 +73,7 @@ def __init__(self, configuration: ClientConfiguration = None): self._assets = None self._audit_logs = None self._blockchains_assets = None + self._blockchains_assets_beta = None self._compliance = None self._compliance_screening_configuration = None self._console_user = None @@ -77,6 +82,7 @@ def __init__(self, configuration: ClientConfiguration = None): self._contracts = None self._cosigners_beta = None self._deployed_contracts = None + self._embedded_wallets = None self._exchange_accounts = None self._external_wallets = None self._fiat_accounts = None @@ -84,6 +90,7 @@ def __init__(self, configuration: ClientConfiguration = None): self._internal_wallets = None self._job_management = None self._key_link_beta = None + self._keys_beta = None self._nfts = None self._network_connections = None self._ota_beta = None @@ -92,7 +99,7 @@ def __init__(self, configuration: ClientConfiguration = None): self._policy_editor_beta = None self._reset_device = None self._smart_transfer = None - self._staking_beta = None + self._staking = None self._tokenization = None self._transactions = None self._travel_rule_beta = None @@ -101,6 +108,7 @@ def __init__(self, configuration: ClientConfiguration = None): self._vaults = None self._web3_connections = None self._webhooks = None + self._webhooks_v2_beta = None self._workspace_status_beta = None self._whitelist_ip_addresses = None @@ -137,6 +145,12 @@ def blockchains_assets(self) -> BlockchainsAssetsApi: self._blockchains_assets = BlockchainsAssetsApi(self._api_client) return self._blockchains_assets + @property + def blockchains_assets_beta(self) -> BlockchainsAssetsBetaApi: + if self._blockchains_assets_beta is None: + self._blockchains_assets_beta = BlockchainsAssetsBetaApi(self._api_client) + return self._blockchains_assets_beta + @property def compliance(self) -> ComplianceApi: if self._compliance is None: @@ -187,6 +201,12 @@ def deployed_contracts(self) -> DeployedContractsApi: self._deployed_contracts = DeployedContractsApi(self._api_client) return self._deployed_contracts + @property + def embedded_wallets(self) -> EmbeddedWalletsApi: + if self._embedded_wallets is None: + self._embedded_wallets = EmbeddedWalletsApi(self._api_client) + return self._embedded_wallets + @property def exchange_accounts(self) -> ExchangeAccountsApi: if self._exchange_accounts is None: @@ -229,6 +249,12 @@ def key_link_beta(self) -> KeyLinkBetaApi: self._key_link_beta = KeyLinkBetaApi(self._api_client) return self._key_link_beta + @property + def keys_beta(self) -> KeysBetaApi: + if self._keys_beta is None: + self._keys_beta = KeysBetaApi(self._api_client) + return self._keys_beta + @property def nfts(self) -> NFTsApi: if self._nfts is None: @@ -278,10 +304,10 @@ def smart_transfer(self) -> SmartTransferApi: return self._smart_transfer @property - def staking_beta(self) -> StakingBetaApi: - if self._staking_beta is None: - self._staking_beta = StakingBetaApi(self._api_client) - return self._staking_beta + def staking(self) -> StakingApi: + if self._staking is None: + self._staking = StakingApi(self._api_client) + return self._staking @property def tokenization(self) -> TokenizationApi: @@ -331,6 +357,12 @@ def webhooks(self) -> WebhooksApi: self._webhooks = WebhooksApi(self._api_client) return self._webhooks + @property + def webhooks_v2_beta(self) -> WebhooksV2BetaApi: + if self._webhooks_v2_beta is None: + self._webhooks_v2_beta = WebhooksV2BetaApi(self._api_client) + return self._webhooks_v2_beta + @property def workspace_status_beta(self) -> WorkspaceStatusBetaApi: if self._workspace_status_beta is None: diff --git a/fireblocks/configuration.py b/fireblocks/configuration.py index 52d61def..03f60c7b 100644 --- a/fireblocks/configuration.py +++ b/fireblocks/configuration.py @@ -424,7 +424,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.6.2\n" - "SDK Package Version: 5.0.0".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 0.0.0".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self): diff --git a/fireblocks/models/__init__.py b/fireblocks/models/__init__.py index 0867268c..20d103d4 100644 --- a/fireblocks/models/__init__.py +++ b/fireblocks/models/__init__.py @@ -29,7 +29,9 @@ from fireblocks.models.add_asset_to_external_wallet_request_one_of1_additional_info_one_of2 import AddAssetToExternalWalletRequestOneOf1AdditionalInfoOneOf2 from fireblocks.models.add_collateral_request_body import AddCollateralRequestBody from fireblocks.models.add_contract_asset_request import AddContractAssetRequest -from fireblocks.models.additional_info_dto import AdditionalInfoDto +from fireblocks.models.add_cosigner_request import AddCosignerRequest +from fireblocks.models.add_cosigner_response import AddCosignerResponse +from fireblocks.models.additional_info import AdditionalInfo from fireblocks.models.aml_registration_result import AmlRegistrationResult from fireblocks.models.aml_screening_result import AmlScreeningResult from fireblocks.models.amount_aggregation_time_period_method import AmountAggregationTimePeriodMethod @@ -40,17 +42,23 @@ from fireblocks.models.asset_already_exist_http_error import AssetAlreadyExistHttpError from fireblocks.models.asset_amount import AssetAmount from fireblocks.models.asset_bad_request_error_response import AssetBadRequestErrorResponse +from fireblocks.models.asset_class_beta import AssetClassBeta from fireblocks.models.asset_conflict_error_response import AssetConflictErrorResponse from fireblocks.models.asset_forbidden_error_response import AssetForbiddenErrorResponse from fireblocks.models.asset_internal_server_error_response import AssetInternalServerErrorResponse +from fireblocks.models.asset_media import AssetMedia +from fireblocks.models.asset_media_attributes import AssetMediaAttributes +from fireblocks.models.asset_metadata import AssetMetadata +from fireblocks.models.asset_metadata_beta import AssetMetadataBeta from fireblocks.models.asset_metadata_dto import AssetMetadataDto from fireblocks.models.asset_not_found_error_response import AssetNotFoundErrorResponse +from fireblocks.models.asset_onchain import AssetOnchain +from fireblocks.models.asset_onchain_beta import AssetOnchainBeta from fireblocks.models.asset_price_forbidden_error_response import AssetPriceForbiddenErrorResponse from fireblocks.models.asset_price_not_found_error_response import AssetPriceNotFoundErrorResponse from fireblocks.models.asset_price_response import AssetPriceResponse from fireblocks.models.asset_response import AssetResponse -from fireblocks.models.asset_response_metadata import AssetResponseMetadata -from fireblocks.models.asset_response_onchain import AssetResponseOnchain +from fireblocks.models.asset_response_beta import AssetResponseBeta from fireblocks.models.asset_type_response import AssetTypeResponse from fireblocks.models.asset_wallet import AssetWallet from fireblocks.models.audit_log_data import AuditLogData @@ -58,8 +66,18 @@ from fireblocks.models.authorization_groups import AuthorizationGroups from fireblocks.models.authorization_info import AuthorizationInfo from fireblocks.models.block_info import BlockInfo +from fireblocks.models.blockchain_explorer import BlockchainExplorer +from fireblocks.models.blockchain_media import BlockchainMedia +from fireblocks.models.blockchain_metadata import BlockchainMetadata +from fireblocks.models.blockchain_not_found_error_response import BlockchainNotFoundErrorResponse +from fireblocks.models.blockchain_onchain import BlockchainOnchain +from fireblocks.models.blockchain_response import BlockchainResponse +from fireblocks.models.callback_handler import CallbackHandler +from fireblocks.models.callback_handler_request import CallbackHandlerRequest from fireblocks.models.cancel_transaction_response import CancelTransactionResponse -from fireblocks.models.chain_info_response_dto import ChainInfoResponseDto +from fireblocks.models.chain_descriptor import ChainDescriptor +from fireblocks.models.chain_info_response import ChainInfoResponse +from fireblocks.models.claim_rewards_request import ClaimRewardsRequest from fireblocks.models.collection_burn_request_dto import CollectionBurnRequestDto from fireblocks.models.collection_burn_response_dto import CollectionBurnResponseDto from fireblocks.models.collection_deploy_request_dto import CollectionDeployRequestDto @@ -136,11 +154,12 @@ from fireblocks.models.create_vault_account_request import CreateVaultAccountRequest from fireblocks.models.create_vault_asset_response import CreateVaultAssetResponse from fireblocks.models.create_wallet_request import CreateWalletRequest +from fireblocks.models.create_webhook_request import CreateWebhookRequest from fireblocks.models.create_workflow_execution_request_params_inner import CreateWorkflowExecutionRequestParamsInner from fireblocks.models.custom_routing_dest import CustomRoutingDest from fireblocks.models.default_network_routing_dest import DefaultNetworkRoutingDest -from fireblocks.models.delegation_dto import DelegationDto -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto +from fireblocks.models.delegation import Delegation +from fireblocks.models.delegation_summary import DelegationSummary from fireblocks.models.delete_network_connection_response import DeleteNetworkConnectionResponse from fireblocks.models.delete_network_id_response import DeleteNetworkIdResponse from fireblocks.models.deployed_contract_response_dto import DeployedContractResponseDto @@ -184,8 +203,6 @@ from fireblocks.models.exchange_settlement_transactions_response import ExchangeSettlementTransactionsResponse from fireblocks.models.exchange_trading_account import ExchangeTradingAccount from fireblocks.models.exchange_type import ExchangeType -from fireblocks.models.execute_action_request import ExecuteActionRequest -from fireblocks.models.execute_action_response import ExecuteActionResponse from fireblocks.models.execution_conversion_operation import ExecutionConversionOperation from fireblocks.models.execution_disbursement_operation import ExecutionDisbursementOperation from fireblocks.models.execution_operation_status import ExecutionOperationStatus @@ -193,6 +210,7 @@ from fireblocks.models.execution_transfer_operation import ExecutionTransferOperation from fireblocks.models.external_wallet_asset import ExternalWalletAsset from fireblocks.models.fee_info import FeeInfo +from fireblocks.models.fee_level import FeeLevel from fireblocks.models.fetch_abi_request_dto import FetchAbiRequestDto from fireblocks.models.fiat_account import FiatAccount from fireblocks.models.fiat_account_type import FiatAccountType @@ -211,6 +229,7 @@ from fireblocks.models.get_filter_parameter import GetFilterParameter from fireblocks.models.get_linked_collections_paginated_response import GetLinkedCollectionsPaginatedResponse from fireblocks.models.get_max_spendable_amount_response import GetMaxSpendableAmountResponse +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse from fireblocks.models.get_nfts_response import GetNFTsResponse from fireblocks.models.get_ota_status_response import GetOtaStatusResponse from fireblocks.models.get_ownership_tokens_response import GetOwnershipTokensResponse @@ -227,12 +246,15 @@ from fireblocks.models.lean_abi_function import LeanAbiFunction from fireblocks.models.lean_contract_dto import LeanContractDto from fireblocks.models.lean_deployed_contract_response_dto import LeanDeployedContractResponseDto +from fireblocks.models.list_assets_response import ListAssetsResponse +from fireblocks.models.list_blockchains_response import ListBlockchainsResponse from fireblocks.models.list_owned_collections_response import ListOwnedCollectionsResponse from fireblocks.models.list_owned_tokens_response import ListOwnedTokensResponse from fireblocks.models.media_entity_response import MediaEntityResponse from fireblocks.models.modify_signing_key_agent_id_dto import ModifySigningKeyAgentIdDto from fireblocks.models.modify_signing_key_dto import ModifySigningKeyDto from fireblocks.models.modify_validation_key_dto import ModifyValidationKeyDto +from fireblocks.models.mpc_key import MpcKey from fireblocks.models.network_channel import NetworkChannel from fireblocks.models.network_connection import NetworkConnection from fireblocks.models.network_connection_response import NetworkConnectionResponse @@ -245,6 +267,10 @@ from fireblocks.models.network_record import NetworkRecord from fireblocks.models.none_network_routing_dest import NoneNetworkRoutingDest from fireblocks.models.not_found_exception import NotFoundException +from fireblocks.models.notification import Notification +from fireblocks.models.notification_paginated_response import NotificationPaginatedResponse +from fireblocks.models.notification_status import NotificationStatus +from fireblocks.models.notification_with_data import NotificationWithData from fireblocks.models.one_time_address import OneTimeAddress from fireblocks.models.one_time_address_account import OneTimeAddressAccount from fireblocks.models.operation_execution_failure import OperationExecutionFailure @@ -253,6 +279,8 @@ from fireblocks.models.paginated_asset_wallet_response import PaginatedAssetWalletResponse from fireblocks.models.paginated_asset_wallet_response_paging import PaginatedAssetWalletResponsePaging from fireblocks.models.paging import Paging +from fireblocks.models.pair_api_key_request import PairApiKeyRequest +from fireblocks.models.pair_api_key_response import PairApiKeyResponse from fireblocks.models.parameter import Parameter from fireblocks.models.parameter_with_value import ParameterWithValue from fireblocks.models.payee_account import PayeeAccount @@ -268,6 +296,7 @@ from fireblocks.models.payout_response import PayoutResponse from fireblocks.models.payout_state import PayoutState from fireblocks.models.payout_status import PayoutStatus +from fireblocks.models.players import Players from fireblocks.models.policy_and_validation_response import PolicyAndValidationResponse from fireblocks.models.policy_check_result import PolicyCheckResult from fireblocks.models.policy_metadata import PolicyMetadata @@ -291,7 +320,7 @@ from fireblocks.models.policy_status import PolicyStatus from fireblocks.models.policy_validation import PolicyValidation from fireblocks.models.pre_screening import PreScreening -from fireblocks.models.provider_dto import ProviderDto +from fireblocks.models.provider import Provider from fireblocks.models.public_key_information import PublicKeyInformation from fireblocks.models.publish_draft_request import PublishDraftRequest from fireblocks.models.publish_result import PublishResult @@ -299,8 +328,8 @@ from fireblocks.models.read_call_function_dto import ReadCallFunctionDto from fireblocks.models.redeem_funds_to_linked_dda_response import RedeemFundsToLinkedDDAResponse from fireblocks.models.register_new_asset_request import RegisterNewAssetRequest -from fireblocks.models.related_request_dto import RelatedRequestDto -from fireblocks.models.related_transaction_dto import RelatedTransactionDto +from fireblocks.models.related_request import RelatedRequest +from fireblocks.models.related_transaction import RelatedTransaction from fireblocks.models.remove_collateral_request_body import RemoveCollateralRequestBody from fireblocks.models.rename_cosigner import RenameCosigner from fireblocks.models.rename_vault_account_response import RenameVaultAccountResponse @@ -372,14 +401,18 @@ from fireblocks.models.smart_transfer_update_ticket_term import SmartTransferUpdateTicketTerm from fireblocks.models.smart_transfer_user_groups import SmartTransferUserGroups from fireblocks.models.smart_transfer_user_groups_response import SmartTransferUserGroupsResponse -from fireblocks.models.solana_blockchain_data_dto import SolanaBlockchainDataDto +from fireblocks.models.solana_blockchain_data import SolanaBlockchainData from fireblocks.models.source_transfer_peer_path import SourceTransferPeerPath from fireblocks.models.source_transfer_peer_path_response import SourceTransferPeerPathResponse from fireblocks.models.spam_ownership_response import SpamOwnershipResponse from fireblocks.models.spam_token_response import SpamTokenResponse +from fireblocks.models.split_request import SplitRequest +from fireblocks.models.split_response import SplitResponse from fireblocks.models.src_or_dest_attributes_inner import SrcOrDestAttributesInner -from fireblocks.models.stake_request_dto import StakeRequestDto -from fireblocks.models.stake_response_dto import StakeResponseDto +from fireblocks.models.stake_request import StakeRequest +from fireblocks.models.stake_response import StakeResponse +from fireblocks.models.staking_provider import StakingProvider +from fireblocks.models.status import Status from fireblocks.models.stellar_ripple_create_params_dto import StellarRippleCreateParamsDto from fireblocks.models.system_message_info import SystemMessageInfo from fireblocks.models.task import Task @@ -388,6 +421,7 @@ from fireblocks.models.to_collateral_transaction import ToCollateralTransaction from fireblocks.models.to_exchange_transaction import ToExchangeTransaction from fireblocks.models.token_collection_response import TokenCollectionResponse +from fireblocks.models.token_info_not_found_error_response import TokenInfoNotFoundErrorResponse from fireblocks.models.token_link_dto import TokenLinkDto from fireblocks.models.token_link_dto_token_metadata import TokenLinkDtoTokenMetadata from fireblocks.models.token_link_exists_http_error import TokenLinkExistsHttpError @@ -446,10 +480,13 @@ from fireblocks.models.unmanaged_wallet import UnmanagedWallet from fireblocks.models.unspent_input import UnspentInput from fireblocks.models.unspent_inputs_response import UnspentInputsResponse -from fireblocks.models.unstake_request_dto import UnstakeRequestDto +from fireblocks.models.unstake_request import UnstakeRequest +from fireblocks.models.update_callback_handler_request import UpdateCallbackHandlerRequest +from fireblocks.models.update_callback_handler_response import UpdateCallbackHandlerResponse from fireblocks.models.update_token_ownership_status_dto import UpdateTokenOwnershipStatusDto from fireblocks.models.update_vault_account_asset_address_request import UpdateVaultAccountAssetAddressRequest from fireblocks.models.update_vault_account_request import UpdateVaultAccountRequest +from fireblocks.models.update_webhook_request import UpdateWebhookRequest from fireblocks.models.user_group_create_request import UserGroupCreateRequest from fireblocks.models.user_group_create_response import UserGroupCreateResponse from fireblocks.models.user_group_response import UserGroupResponse @@ -461,7 +498,7 @@ from fireblocks.models.validate_address_response import ValidateAddressResponse from fireblocks.models.validated_transactions_for_rescan import ValidatedTransactionsForRescan from fireblocks.models.validation_key_dto import ValidationKeyDto -from fireblocks.models.validator_dto import ValidatorDto +from fireblocks.models.validator import Validator from fireblocks.models.vault_account import VaultAccount from fireblocks.models.vault_accounts_paged_response import VaultAccountsPagedResponse from fireblocks.models.vault_accounts_paged_response_paging import VaultAccountsPagedResponsePaging @@ -469,9 +506,13 @@ from fireblocks.models.vault_asset import VaultAsset from fireblocks.models.vault_wallet_address import VaultWalletAddress from fireblocks.models.vendor_dto import VendorDto +from fireblocks.models.version import Version from fireblocks.models.wallet_asset import WalletAsset from fireblocks.models.wallet_asset_additional_info import WalletAssetAdditionalInfo -from fireblocks.models.withdraw_request_dto import WithdrawRequestDto +from fireblocks.models.webhook import Webhook +from fireblocks.models.webhook_event import WebhookEvent +from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse +from fireblocks.models.withdraw_request import WithdrawRequest from fireblocks.models.workflow_config_status import WorkflowConfigStatus from fireblocks.models.workflow_configuration_id import WorkflowConfigurationId from fireblocks.models.workflow_execution_operation import WorkflowExecutionOperation diff --git a/fireblocks/models/add_cosigner_request.py b/fireblocks/models/add_cosigner_request.py new file mode 100644 index 00000000..0ea1efa4 --- /dev/null +++ b/fireblocks/models/add_cosigner_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AddCosignerRequest(BaseModel): + """ + AddCosignerRequest + """ # noqa: E501 + api_key_id: StrictStr = Field(description="The id of the API key to be paired with the cosigner", alias="apiKeyId") + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the cosigner") + existing_cosigner: Optional[StrictBool] = Field(default=False, description="Whether the cosigner already exists in another workspace", alias="existingCosigner") + __properties: ClassVar[List[str]] = ["apiKeyId", "name", "existingCosigner"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddCosignerRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddCosignerRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiKeyId": obj.get("apiKeyId"), + "name": obj.get("name"), + "existingCosigner": obj.get("existingCosigner") if obj.get("existingCosigner") is not None else False + }) + return _obj + + diff --git a/fireblocks/models/add_cosigner_response.py b/fireblocks/models/add_cosigner_response.py new file mode 100644 index 00000000..20f3a1b2 --- /dev/null +++ b/fireblocks/models/add_cosigner_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AddCosignerResponse(BaseModel): + """ + AddCosignerResponse + """ # noqa: E501 + api_key_id: StrictStr = Field(description="The id of the API key to be paired with the cosigner", alias="apiKeyId") + name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The name of the cosigner") + existing_cosigner: Optional[StrictBool] = Field(default=False, description="Whether the cosigner already exists in another workspace", alias="existingCosigner") + pending_cosigner_id: StrictStr = Field(description="The unique identifier of a pending cosigner", alias="pendingCosignerId") + __properties: ClassVar[List[str]] = ["apiKeyId", "name", "existingCosigner", "pendingCosignerId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddCosignerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddCosignerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiKeyId": obj.get("apiKeyId"), + "name": obj.get("name"), + "existingCosigner": obj.get("existingCosigner") if obj.get("existingCosigner") is not None else False, + "pendingCosignerId": obj.get("pendingCosignerId") + }) + return _obj + + diff --git a/fireblocks/models/additional_info_dto.py b/fireblocks/models/additional_info.py similarity index 91% rename from fireblocks/models/additional_info_dto.py rename to fireblocks/models/additional_info.py index 49e31b3f..0cd2bb44 100644 --- a/fireblocks/models/additional_info_dto.py +++ b/fireblocks/models/additional_info.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class AdditionalInfoDto(BaseModel): +class AdditionalInfo(BaseModel): """ - AdditionalInfoDto + Additional information related to the blockchain. This may include extra details about the blockchain network. """ # noqa: E501 estimated_annual_reward: Union[StrictFloat, StrictInt] = Field(description="The estimated annual reward rate for the blockchain, represented as a decimal percentage value.", alias="estimatedAnnualReward") lockup_period: Union[StrictFloat, StrictInt] = Field(description="The duration of the lockup period for certain actions on the blockchain, measured in milliseconds.", alias="lockupPeriod") @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AdditionalInfoDto from a JSON string""" + """Create an instance of AdditionalInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AdditionalInfoDto from a dict""" + """Create an instance of AdditionalInfo from a dict""" if obj is None: return None diff --git a/fireblocks/models/api_key.py b/fireblocks/models/api_key.py index 815b53ed..f439e753 100644 --- a/fireblocks/models/api_key.py +++ b/fireblocks/models/api_key.py @@ -20,7 +20,8 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.callback_handler import CallbackHandler from typing import Optional, Set from typing_extensions import Self @@ -29,8 +30,9 @@ class ApiKey(BaseModel): ApiKey """ # noqa: E501 id: StrictStr = Field(description="The unique identifier of the API key") - last_seen: datetime = Field(description="The date the API key was last seen", alias="lastSeen") - __properties: ClassVar[List[str]] = ["id", "lastSeen"] + last_seen: Optional[datetime] = Field(default=None, description="The date the API key was last seen", alias="lastSeen") + callback_handler: Optional[CallbackHandler] = Field(default=None, alias="callbackHandler") + __properties: ClassVar[List[str]] = ["id", "lastSeen", "callbackHandler"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +73,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of callback_handler + if self.callback_handler: + _dict['callbackHandler'] = self.callback_handler.to_dict() return _dict @classmethod @@ -84,7 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "lastSeen": obj.get("lastSeen") + "lastSeen": obj.get("lastSeen"), + "callbackHandler": CallbackHandler.from_dict(obj["callbackHandler"]) if obj.get("callbackHandler") is not None else None }) return _obj diff --git a/fireblocks/models/asset_bad_request_error_response.py b/fireblocks/models/asset_bad_request_error_response.py index 136ca791..df44391a 100644 --- a/fireblocks/models/asset_bad_request_error_response.py +++ b/fireblocks/models/asset_bad_request_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetBadRequestErrorResponse(BaseModel): AssetBadRequestErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Bad request error code") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_class_beta.py b/fireblocks/models/asset_class_beta.py new file mode 100644 index 00000000..43f6c241 --- /dev/null +++ b/fireblocks/models/asset_class_beta.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AssetClassBeta(str, Enum): + """ + AssetClassBeta + """ + + """ + allowed enum values + """ + NATIVE = 'NATIVE' + FT = 'FT' + FIAT = 'FIAT' + NFT = 'NFT' + SFT = 'SFT' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AssetClassBeta from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/asset_conflict_error_response.py b/fireblocks/models/asset_conflict_error_response.py index 376b8cb2..4235a051 100644 --- a/fireblocks/models/asset_conflict_error_response.py +++ b/fireblocks/models/asset_conflict_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetConflictErrorResponse(BaseModel): AssetConflictErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Conflict error code") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_forbidden_error_response.py b/fireblocks/models/asset_forbidden_error_response.py index 1f8d6727..3ffa5be3 100644 --- a/fireblocks/models/asset_forbidden_error_response.py +++ b/fireblocks/models/asset_forbidden_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetForbiddenErrorResponse(BaseModel): AssetForbiddenErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Forbidden error code") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_internal_server_error_response.py b/fireblocks/models/asset_internal_server_error_response.py index 45fdb953..46187d5d 100644 --- a/fireblocks/models/asset_internal_server_error_response.py +++ b/fireblocks/models/asset_internal_server_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetInternalServerErrorResponse(BaseModel): AssetInternalServerErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Internal server error code") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_media.py b/fireblocks/models/asset_media.py new file mode 100644 index 00000000..df231440 --- /dev/null +++ b/fireblocks/models/asset_media.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.asset_media_attributes import AssetMediaAttributes +from typing import Optional, Set +from typing_extensions import Self + +class AssetMedia(BaseModel): + """ + AssetMedia + """ # noqa: E501 + url: StrictStr = Field(description="Media URL") + type: StrictStr = Field(description="Media type") + attributes: Optional[AssetMediaAttributes] = None + __properties: ClassVar[List[str]] = ["url", "type", "attributes"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['image/svg+xml', 'image/png']): + raise ValueError("must be one of enum values ('image/svg+xml', 'image/png')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetMedia from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of attributes + if self.attributes: + _dict['attributes'] = self.attributes.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetMedia from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "type": obj.get("type"), + "attributes": AssetMediaAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/asset_media_attributes.py b/fireblocks/models/asset_media_attributes.py new file mode 100644 index 00000000..95483079 --- /dev/null +++ b/fireblocks/models/asset_media_attributes.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AssetMediaAttributes(BaseModel): + """ + Media attributes + """ # noqa: E501 + monochrome: Optional[StrictBool] = Field(default=None, description="Monochrome flag") + __properties: ClassVar[List[str]] = ["monochrome"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetMediaAttributes from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetMediaAttributes from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "monochrome": obj.get("monochrome") + }) + return _obj + + diff --git a/fireblocks/models/asset_response_metadata.py b/fireblocks/models/asset_metadata.py similarity index 92% rename from fireblocks/models/asset_response_metadata.py rename to fireblocks/models/asset_metadata.py index 9653c315..8b1e442e 100644 --- a/fireblocks/models/asset_response_metadata.py +++ b/fireblocks/models/asset_metadata.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class AssetResponseMetadata(BaseModel): +class AssetMetadata(BaseModel): """ - AssetResponseMetadata + AssetMetadata """ # noqa: E501 scope: StrictStr = Field(description="The scope of the asset") deprecated: StrictBool = Field(description="Is asset deprecated") @@ -56,7 +56,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssetResponseMetadata from a JSON string""" + """Create an instance of AssetMetadata from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssetResponseMetadata from a dict""" + """Create an instance of AssetMetadata from a dict""" if obj is None: return None diff --git a/fireblocks/models/asset_metadata_beta.py b/fireblocks/models/asset_metadata_beta.py new file mode 100644 index 00000000..7d779bb2 --- /dev/null +++ b/fireblocks/models/asset_metadata_beta.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.asset_media import AssetMedia +from typing import Optional, Set +from typing_extensions import Self + +class AssetMetadataBeta(BaseModel): + """ + AssetMetadataBeta + """ # noqa: E501 + scope: StrictStr = Field(description="The scope of the asset") + deprecated: StrictBool = Field(description="Is asset deprecated") + deprecation_referral_id: Optional[StrictStr] = Field(default=None, description="New asset ID replacement", alias="deprecationReferralId") + verified: StrictBool = Field(description="Is asset verified by Fireblocks") + website: Optional[StrictStr] = Field(default=None, description="Vendor’s website") + media: Optional[List[AssetMedia]] = Field(default=None, description="Asset’s media") + __properties: ClassVar[List[str]] = ["scope", "deprecated", "deprecationReferralId", "verified", "website", "media"] + + @field_validator('scope') + def scope_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Global', 'Local']): + raise ValueError("must be one of enum values ('Global', 'Local')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetMetadataBeta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in media (list) + _items = [] + if self.media: + for _item in self.media: + if _item: + _items.append(_item.to_dict()) + _dict['media'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetMetadataBeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope": obj.get("scope"), + "deprecated": obj.get("deprecated"), + "deprecationReferralId": obj.get("deprecationReferralId"), + "verified": obj.get("verified"), + "website": obj.get("website"), + "media": [AssetMedia.from_dict(_item) for _item in obj["media"]] if obj.get("media") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/asset_not_found_error_response.py b/fireblocks/models/asset_not_found_error_response.py index 8880240b..59ccf688 100644 --- a/fireblocks/models/asset_not_found_error_response.py +++ b/fireblocks/models/asset_not_found_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetNotFoundErrorResponse(BaseModel): AssetNotFoundErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Not found error code") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_response_onchain.py b/fireblocks/models/asset_onchain.py similarity index 93% rename from fireblocks/models/asset_response_onchain.py rename to fireblocks/models/asset_onchain.py index cd044030..a3ce1ecc 100644 --- a/fireblocks/models/asset_response_onchain.py +++ b/fireblocks/models/asset_onchain.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class AssetResponseOnchain(BaseModel): +class AssetOnchain(BaseModel): """ - AssetResponseOnchain + AssetOnchain """ # noqa: E501 symbol: StrictStr = Field(description="The asset symbol") name: StrictStr = Field(description="The asset name") @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssetResponseOnchain from a JSON string""" + """Create an instance of AssetOnchain from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssetResponseOnchain from a dict""" + """Create an instance of AssetOnchain from a dict""" if obj is None: return None diff --git a/fireblocks/models/asset_onchain_beta.py b/fireblocks/models/asset_onchain_beta.py new file mode 100644 index 00000000..111f99f6 --- /dev/null +++ b/fireblocks/models/asset_onchain_beta.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AssetOnchainBeta(BaseModel): + """ + AssetOnchainBeta + """ # noqa: E501 + symbol: StrictStr = Field(description="The asset symbol") + name: StrictStr = Field(description="The asset name") + address: Optional[StrictStr] = Field(default=None, description="The asset address") + decimals: Union[StrictFloat, StrictInt] = Field(description="Number of decimals") + standards: Optional[List[StrictStr]] = Field(default=None, description="Supported standards") + __properties: ClassVar[List[str]] = ["symbol", "name", "address", "decimals", "standards"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetOnchainBeta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetOnchainBeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "symbol": obj.get("symbol"), + "name": obj.get("name"), + "address": obj.get("address"), + "decimals": obj.get("decimals"), + "standards": obj.get("standards") + }) + return _obj + + diff --git a/fireblocks/models/asset_price_forbidden_error_response.py b/fireblocks/models/asset_price_forbidden_error_response.py index 496a1983..2b4db538 100644 --- a/fireblocks/models/asset_price_forbidden_error_response.py +++ b/fireblocks/models/asset_price_forbidden_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetPriceForbiddenErrorResponse(BaseModel): AssetPriceForbiddenErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Forbidden error message") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_price_not_found_error_response.py b/fireblocks/models/asset_price_not_found_error_response.py index 6daa061d..8d29ba89 100644 --- a/fireblocks/models/asset_price_not_found_error_response.py +++ b/fireblocks/models/asset_price_not_found_error_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class AssetPriceNotFoundErrorResponse(BaseModel): AssetPriceNotFoundErrorResponse """ # noqa: E501 message: StrictStr = Field(description="Not found error message") - code: StrictStr = Field(description="Error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") __properties: ClassVar[List[str]] = ["message", "code"] model_config = ConfigDict( diff --git a/fireblocks/models/asset_response.py b/fireblocks/models/asset_response.py index dd9b922d..da7fc58c 100644 --- a/fireblocks/models/asset_response.py +++ b/fireblocks/models/asset_response.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from fireblocks.models.asset_response_metadata import AssetResponseMetadata -from fireblocks.models.asset_response_onchain import AssetResponseOnchain +from fireblocks.models.asset_metadata import AssetMetadata +from fireblocks.models.asset_onchain import AssetOnchain from typing import Optional, Set from typing_extensions import Self @@ -31,8 +31,8 @@ class AssetResponse(BaseModel): """ # noqa: E501 legacy_id: StrictStr = Field(alias="legacyId") asset_class: StrictStr = Field(alias="assetClass") - onchain: AssetResponseOnchain - metadata: AssetResponseMetadata + onchain: AssetOnchain + metadata: AssetMetadata __properties: ClassVar[List[str]] = ["legacyId", "assetClass", "onchain", "metadata"] @field_validator('asset_class') @@ -101,8 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "legacyId": obj.get("legacyId"), "assetClass": obj.get("assetClass"), - "onchain": AssetResponseOnchain.from_dict(obj["onchain"]) if obj.get("onchain") is not None else None, - "metadata": AssetResponseMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + "onchain": AssetOnchain.from_dict(obj["onchain"]) if obj.get("onchain") is not None else None, + "metadata": AssetMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None }) return _obj diff --git a/fireblocks/models/asset_response_beta.py b/fireblocks/models/asset_response_beta.py new file mode 100644 index 00000000..10430ef1 --- /dev/null +++ b/fireblocks/models/asset_response_beta.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.asset_class_beta import AssetClassBeta +from fireblocks.models.asset_metadata_beta import AssetMetadataBeta +from fireblocks.models.asset_onchain_beta import AssetOnchainBeta +from typing import Optional, Set +from typing_extensions import Self + +class AssetResponseBeta(BaseModel): + """ + AssetResponseBeta + """ # noqa: E501 + id: StrictStr = Field(description="The ID of the asset") + legacy_id: StrictStr = Field(description="The Legacy ID of the asset", alias="legacyId") + blockchain_id: Optional[StrictStr] = Field(default=None, description="The ID of the asset's blockchain", alias="blockchainId") + display_name: Optional[StrictStr] = Field(default=None, description="Asset's display name", alias="displayName") + display_symbol: Optional[StrictStr] = Field(default=None, description="Asset's display symbol", alias="displaySymbol") + asset_class: AssetClassBeta = Field(alias="assetClass") + onchain: Optional[AssetOnchainBeta] = None + metadata: AssetMetadataBeta + __properties: ClassVar[List[str]] = ["id", "legacyId", "blockchainId", "displayName", "displaySymbol", "assetClass", "onchain", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssetResponseBeta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of onchain + if self.onchain: + _dict['onchain'] = self.onchain.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssetResponseBeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "legacyId": obj.get("legacyId"), + "blockchainId": obj.get("blockchainId"), + "displayName": obj.get("displayName"), + "displaySymbol": obj.get("displaySymbol"), + "assetClass": obj.get("assetClass"), + "onchain": AssetOnchainBeta.from_dict(obj["onchain"]) if obj.get("onchain") is not None else None, + "metadata": AssetMetadataBeta.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/blockchain_explorer.py b/fireblocks/models/blockchain_explorer.py new file mode 100644 index 00000000..3a67aab4 --- /dev/null +++ b/fireblocks/models/blockchain_explorer.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BlockchainExplorer(BaseModel): + """ + BlockchainExplorer + """ # noqa: E501 + base: StrictStr = Field(description="Explorer base url") + address: Optional[StrictStr] = Field(default=None, description="Explorer address url") + tx: Optional[StrictStr] = Field(default=None, description="Explorer transaction url") + token: Optional[StrictStr] = Field(default=None, description="Explorer token url") + __properties: ClassVar[List[str]] = ["base", "address", "tx", "token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockchainExplorer from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockchainExplorer from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "base": obj.get("base"), + "address": obj.get("address"), + "tx": obj.get("tx"), + "token": obj.get("token") + }) + return _obj + + diff --git a/fireblocks/models/blockchain_media.py b/fireblocks/models/blockchain_media.py new file mode 100644 index 00000000..0eece4c8 --- /dev/null +++ b/fireblocks/models/blockchain_media.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BlockchainMedia(BaseModel): + """ + BlockchainMedia + """ # noqa: E501 + url: StrictStr = Field(description="Media URL") + type: StrictStr = Field(description="Media type") + __properties: ClassVar[List[str]] = ["url", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['image/svg+xml', 'image/png']): + raise ValueError("must be one of enum values ('image/svg+xml', 'image/png')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockchainMedia from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockchainMedia from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "type": obj.get("type") + }) + return _obj + + diff --git a/fireblocks/models/blockchain_metadata.py b/fireblocks/models/blockchain_metadata.py new file mode 100644 index 00000000..dbbed748 --- /dev/null +++ b/fireblocks/models/blockchain_metadata.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.blockchain_explorer import BlockchainExplorer +from fireblocks.models.blockchain_media import BlockchainMedia +from typing import Optional, Set +from typing_extensions import Self + +class BlockchainMetadata(BaseModel): + """ + BlockchainMetadata + """ # noqa: E501 + scope: StrictStr = Field(description="Is blockchain listed on all workspaces? Global or Local") + deprecated: StrictBool = Field(description="Is blockchain deprecated") + media: Optional[List[BlockchainMedia]] = Field(default=None, description="Blockchain’s media") + explorer: Optional[BlockchainExplorer] = None + __properties: ClassVar[List[str]] = ["scope", "deprecated", "media", "explorer"] + + @field_validator('scope') + def scope_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Global', 'Local']): + raise ValueError("must be one of enum values ('Global', 'Local')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockchainMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in media (list) + _items = [] + if self.media: + for _item in self.media: + if _item: + _items.append(_item.to_dict()) + _dict['media'] = _items + # override the default output from pydantic by calling `to_dict()` of explorer + if self.explorer: + _dict['explorer'] = self.explorer.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockchainMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "scope": obj.get("scope"), + "deprecated": obj.get("deprecated"), + "media": [BlockchainMedia.from_dict(_item) for _item in obj["media"]] if obj.get("media") is not None else None, + "explorer": BlockchainExplorer.from_dict(obj["explorer"]) if obj.get("explorer") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/blockchain_not_found_error_response.py b/fireblocks/models/blockchain_not_found_error_response.py new file mode 100644 index 00000000..5a81179c --- /dev/null +++ b/fireblocks/models/blockchain_not_found_error_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class BlockchainNotFoundErrorResponse(BaseModel): + """ + BlockchainNotFoundErrorResponse + """ # noqa: E501 + message: StrictStr = Field(description="Not found error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") + __properties: ClassVar[List[str]] = ["message", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockchainNotFoundErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockchainNotFoundErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "code": obj.get("code") + }) + return _obj + + diff --git a/fireblocks/models/blockchain_onchain.py b/fireblocks/models/blockchain_onchain.py new file mode 100644 index 00000000..6112ef65 --- /dev/null +++ b/fireblocks/models/blockchain_onchain.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class BlockchainOnchain(BaseModel): + """ + BlockchainOnchain + """ # noqa: E501 + protocol: StrictStr = Field(description="The protocol of the blockchain") + chain_id: Optional[StrictStr] = Field(default=None, description="Network/chain ID", alias="chainId") + test: StrictBool = Field(description="Is test blockchain") + signing_algo: StrictStr = Field(description="Signing alghorithm", alias="signingAlgo") + __properties: ClassVar[List[str]] = ["protocol", "chainId", "test", "signingAlgo"] + + @field_validator('signing_algo') + def signing_algo_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ECDSA_SECP256K1', 'EDDSA_ED25519']): + raise ValueError("must be one of enum values ('ECDSA_SECP256K1', 'EDDSA_ED25519')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockchainOnchain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockchainOnchain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "protocol": obj.get("protocol"), + "chainId": obj.get("chainId"), + "test": obj.get("test"), + "signingAlgo": obj.get("signingAlgo") + }) + return _obj + + diff --git a/fireblocks/models/blockchain_response.py b/fireblocks/models/blockchain_response.py new file mode 100644 index 00000000..1e01bf35 --- /dev/null +++ b/fireblocks/models/blockchain_response.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from fireblocks.models.blockchain_metadata import BlockchainMetadata +from fireblocks.models.blockchain_onchain import BlockchainOnchain +from typing import Optional, Set +from typing_extensions import Self + +class BlockchainResponse(BaseModel): + """ + BlockchainResponse + """ # noqa: E501 + id: StrictStr = Field(description="The ID of the blockchain") + legacy_id: StrictStr = Field(description="The old blockchain ID representation of the blockchain", alias="legacyId") + display_name: StrictStr = Field(description="The name of the blockchain", alias="displayName") + native_asset_id: StrictStr = Field(description="Native asset ID of this blockchain", alias="nativeAssetId") + onchain: BlockchainOnchain + metadata: BlockchainMetadata + __properties: ClassVar[List[str]] = ["id", "legacyId", "displayName", "nativeAssetId", "onchain", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BlockchainResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of onchain + if self.onchain: + _dict['onchain'] = self.onchain.to_dict() + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BlockchainResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "legacyId": obj.get("legacyId"), + "displayName": obj.get("displayName"), + "nativeAssetId": obj.get("nativeAssetId"), + "onchain": BlockchainOnchain.from_dict(obj["onchain"]) if obj.get("onchain") is not None else None, + "metadata": BlockchainMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/callback_handler.py b/fireblocks/models/callback_handler.py new file mode 100644 index 00000000..aa611674 --- /dev/null +++ b/fireblocks/models/callback_handler.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CallbackHandler(BaseModel): + """ + CallbackHandler + """ # noqa: E501 + url: StrictStr = Field(description="The callback handler's URL") + public_key: Optional[StrictStr] = Field(default=None, description="The callback handler's public key", alias="publicKey") + cert_public_key_hash: Optional[StrictStr] = Field(default=None, description="A hashed representation of the public key of the callback handler's certificate", alias="certPublicKeyHash") + __properties: ClassVar[List[str]] = ["url", "publicKey", "certPublicKeyHash"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallbackHandler from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallbackHandler from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "publicKey": obj.get("publicKey"), + "certPublicKeyHash": obj.get("certPublicKeyHash") + }) + return _obj + + diff --git a/fireblocks/models/callback_handler_request.py b/fireblocks/models/callback_handler_request.py new file mode 100644 index 00000000..99e4eb95 --- /dev/null +++ b/fireblocks/models/callback_handler_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CallbackHandlerRequest(BaseModel): + """ + CallbackHandlerRequest + """ # noqa: E501 + url: StrictStr = Field(description="The callback handler's URL") + public_key: Optional[StrictStr] = Field(default=None, description="The callback handler's public key", alias="publicKey") + cert: Optional[StrictStr] = Field(default=None, description="The callback handler's certificate") + __properties: ClassVar[List[str]] = ["url", "publicKey", "cert"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CallbackHandlerRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CallbackHandlerRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "publicKey": obj.get("publicKey"), + "cert": obj.get("cert") + }) + return _obj + + diff --git a/fireblocks/models/chain_descriptor.py b/fireblocks/models/chain_descriptor.py new file mode 100644 index 00000000..db8ad2d9 --- /dev/null +++ b/fireblocks/models/chain_descriptor.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ChainDescriptor(str, Enum): + """ + ChainDescriptor + """ + + """ + allowed enum values + """ + ETH = 'ETH' + SOL = 'SOL' + MATIC = 'MATIC' + ETH_TEST6 = 'ETH_TEST6' + SOL_TEST = 'SOL_TEST' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ChainDescriptor from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/chain_info_response_dto.py b/fireblocks/models/chain_info_response.py similarity index 85% rename from fireblocks/models/chain_info_response_dto.py rename to fireblocks/models/chain_info_response.py index 1b6197f3..b1939f92 100644 --- a/fireblocks/models/chain_info_response_dto.py +++ b/fireblocks/models/chain_info_response.py @@ -20,19 +20,19 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Union -from fireblocks.models.additional_info_dto import AdditionalInfoDto +from fireblocks.models.additional_info import AdditionalInfo from typing import Optional, Set from typing_extensions import Self -class ChainInfoResponseDto(BaseModel): +class ChainInfoResponse(BaseModel): """ - ChainInfoResponseDto + ChainInfoResponse """ # noqa: E501 chain_descriptor: StrictStr = Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\").", alias="chainDescriptor") current_epoch: Union[StrictFloat, StrictInt] = Field(description="The current epoch number of the blockchain network.", alias="currentEpoch") epoch_elapsed: Union[StrictFloat, StrictInt] = Field(description="The percentage of time that has elapsed within the current epoch, represented as a decimal value between 0 and 1.", alias="epochElapsed") epoch_duration: Union[StrictFloat, StrictInt] = Field(description="The total duration in milliseconds of a single epoch.", alias="epochDuration") - additional_info: AdditionalInfoDto = Field(description="Additional information related to the blockchain. This may include extra details about the blockchain network.", alias="additionalInfo") + additional_info: AdditionalInfo = Field(alias="additionalInfo") __properties: ClassVar[List[str]] = ["chainDescriptor", "currentEpoch", "epochElapsed", "epochDuration", "additionalInfo"] model_config = ConfigDict( @@ -53,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ChainInfoResponseDto from a JSON string""" + """Create an instance of ChainInfoResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ChainInfoResponseDto from a dict""" + """Create an instance of ChainInfoResponse from a dict""" if obj is None: return None @@ -93,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "currentEpoch": obj.get("currentEpoch"), "epochElapsed": obj.get("epochElapsed"), "epochDuration": obj.get("epochDuration"), - "additionalInfo": AdditionalInfoDto.from_dict(obj["additionalInfo"]) if obj.get("additionalInfo") is not None else None + "additionalInfo": AdditionalInfo.from_dict(obj["additionalInfo"]) if obj.get("additionalInfo") is not None else None }) return _obj diff --git a/fireblocks/models/claim_rewards_request.py b/fireblocks/models/claim_rewards_request.py new file mode 100644 index 00000000..95670e23 --- /dev/null +++ b/fireblocks/models/claim_rewards_request.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.fee_level import FeeLevel +from typing import Optional, Set +from typing_extensions import Self + +class ClaimRewardsRequest(BaseModel): + """ + ClaimRewardsRequest + """ # noqa: E501 + id: StrictStr = Field(description="id of position to withdraw rewards from") + fee: Optional[StrictStr] = Field(default=None, description="Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required.") + fee_level: Optional[FeeLevel] = Field(default=None, alias="feeLevel") + tx_note: Optional[StrictStr] = Field(default=None, description="The note to associate with the transactions.", alias="txNote") + __properties: ClassVar[List[str]] = ["id", "fee", "feeLevel", "txNote"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClaimRewardsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClaimRewardsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "fee": obj.get("fee"), + "feeLevel": obj.get("feeLevel"), + "txNote": obj.get("txNote") + }) + return _obj + + diff --git a/fireblocks/models/cosigner.py b/fireblocks/models/cosigner.py index bf1ef435..c4510feb 100644 --- a/fireblocks/models/cosigner.py +++ b/fireblocks/models/cosigner.py @@ -18,8 +18,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.version import Version from typing import Optional, Set from typing_extensions import Self @@ -30,7 +31,19 @@ class Cosigner(BaseModel): archived: StrictBool = Field(description="Whether the cosigner is archived") id: StrictStr = Field(description="The unique identifier of the cosigner") name: Optional[StrictStr] = Field(default=None, description="The name of the cosigner") - __properties: ClassVar[List[str]] = ["archived", "id", "name"] + type: Optional[StrictStr] = Field(default=None, description="The type of the cosigner") + version: Optional[Version] = None + __properties: ClassVar[List[str]] = ["archived", "id", "name", "type", "version"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['SANDBOX', 'SGX', 'GCP-CONFSPACE', 'AWS-NITRO', 'PLAIN']): + raise ValueError("must be one of enum values ('SANDBOX', 'SGX', 'GCP-CONFSPACE', 'AWS-NITRO', 'PLAIN')") + return value model_config = ConfigDict( populate_by_name=True, @@ -71,11 +84,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - + # override the default output from pydantic by calling `to_dict()` of version + if self.version: + _dict['version'] = self.version.to_dict() return _dict @classmethod @@ -90,7 +101,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "archived": obj.get("archived"), "id": obj.get("id"), - "name": obj.get("name") + "name": obj.get("name"), + "type": obj.get("type"), + "version": Version.from_dict(obj["version"]) if obj.get("version") is not None else None }) return _obj diff --git a/fireblocks/models/create_webhook_request.py b/fireblocks/models/create_webhook_request.py new file mode 100644 index 00000000..27599e7c --- /dev/null +++ b/fireblocks/models/create_webhook_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from fireblocks.models.webhook_event import WebhookEvent +from typing import Optional, Set +from typing_extensions import Self + +class CreateWebhookRequest(BaseModel): + """ + CreateWebhookRequest + """ # noqa: E501 + url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The url of the webhook where notifications will be sent. URL must be valid, unique and https.") + description: Annotated[str, Field(min_length=1, strict=True)] = Field(description="description of the webhook. should not contain special characters.") + events: List[WebhookEvent] = Field(description="event types the webhook will subscribe to") + enabled: Optional[StrictBool] = Field(default=True, description="The status of the webhook. If false, the webhook will not receive notifications.") + __properties: ClassVar[List[str]] = ["url", "description", "events", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateWebhookRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateWebhookRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "description": obj.get("description"), + "events": obj.get("events"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True + }) + return _obj + + diff --git a/fireblocks/models/delegation_dto.py b/fireblocks/models/delegation.py similarity index 71% rename from fireblocks/models/delegation_dto.py rename to fireblocks/models/delegation.py index 204d6abd..e1856069 100644 --- a/fireblocks/models/delegation_dto.py +++ b/fireblocks/models/delegation.py @@ -21,15 +21,16 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from fireblocks.models.related_request_dto import RelatedRequestDto -from fireblocks.models.related_transaction_dto import RelatedTransactionDto -from fireblocks.models.solana_blockchain_data_dto import SolanaBlockchainDataDto +from fireblocks.models.related_request import RelatedRequest +from fireblocks.models.related_transaction import RelatedTransaction +from fireblocks.models.solana_blockchain_data import SolanaBlockchainData +from fireblocks.models.staking_provider import StakingProvider from typing import Optional, Set from typing_extensions import Self -class DelegationDto(BaseModel): +class Delegation(BaseModel): """ - DelegationDto + Delegation """ # noqa: E501 id: StrictStr = Field(description="The unique identifier of the staking position") vault_account_id: StrictStr = Field(description="The source vault account to stake from", alias="vaultAccountId") @@ -39,16 +40,16 @@ class DelegationDto(BaseModel): amount: StrictStr = Field(description="Amount of tokens to stake, measured in the staked asset unit.") rewards_amount: StrictStr = Field(description="The amount staked in the position, measured in the staked asset unit.", alias="rewardsAmount") date_created: datetime = Field(description="When was the request made (ISO Date).", alias="dateCreated") - date_updated: Optional[datetime] = Field(default=None, description="When has the position last changed (ISO Date).", alias="dateUpdated") + date_updated: datetime = Field(description="When has the position last changed (ISO Date).", alias="dateUpdated") status: StrictStr = Field(description="The current status.") - related_transactions: List[RelatedTransactionDto] = Field(description="An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed.", alias="relatedTransactions") + related_transactions: List[RelatedTransaction] = Field(description="An array of transaction objects related to this position. Each object includes a 'txId' representing the transaction ID and a 'completed' boolean indicating if the transaction was completed.", alias="relatedTransactions") validator_address: StrictStr = Field(description="The destination address of the staking transaction.", alias="validatorAddress") - provider_id: StrictStr = Field(description="The unique identifier of the staking provider", alias="providerId") + provider_id: StakingProvider = Field(alias="providerId") available_actions: List[StrictStr] = Field(description="An array of available actions that can be performed. for example, actions like \"unstake\" or \"withdraw\".", alias="availableActions") in_progress: StrictBool = Field(description="Indicates whether there is an ongoing action for this position (true if ongoing, false if not).", alias="inProgress") in_progress_tx_id: Optional[StrictStr] = Field(default=None, description="The transaction ID of the ongoing request", alias="inProgressTxId") - blockchain_position_info: SolanaBlockchainDataDto = Field(description="Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available.", alias="blockchainPositionInfo") - related_requests: Optional[List[RelatedRequestDto]] = Field(default=None, description="An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers.", alias="relatedRequests") + blockchain_position_info: SolanaBlockchainData = Field(alias="blockchainPositionInfo") + related_requests: Optional[List[RelatedRequest]] = Field(default=None, description="An array of partial unstake requests for this position, relevant only for the Lido provider. Each object includes the status of the unstake request, a boolean indicating whether the action is in progress, the amount of tokens to unstake, and the transaction ID of the request. With Lido, a position may have multiple partial unstake requests in different states. This field is optional and not applicable for other providers.", alias="relatedRequests") __properties: ClassVar[List[str]] = ["id", "vaultAccountId", "validatorName", "providerName", "chainDescriptor", "amount", "rewardsAmount", "dateCreated", "dateUpdated", "status", "relatedTransactions", "validatorAddress", "providerId", "availableActions", "inProgress", "inProgressTxId", "blockchainPositionInfo", "relatedRequests"] model_config = ConfigDict( @@ -69,7 +70,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DelegationDto from a JSON string""" + """Create an instance of Delegation from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -111,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DelegationDto from a dict""" + """Create an instance of Delegation from a dict""" if obj is None: return None @@ -129,14 +130,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dateCreated": obj.get("dateCreated"), "dateUpdated": obj.get("dateUpdated"), "status": obj.get("status"), - "relatedTransactions": [RelatedTransactionDto.from_dict(_item) for _item in obj["relatedTransactions"]] if obj.get("relatedTransactions") is not None else None, + "relatedTransactions": [RelatedTransaction.from_dict(_item) for _item in obj["relatedTransactions"]] if obj.get("relatedTransactions") is not None else None, "validatorAddress": obj.get("validatorAddress"), "providerId": obj.get("providerId"), "availableActions": obj.get("availableActions"), "inProgress": obj.get("inProgress"), "inProgressTxId": obj.get("inProgressTxId"), - "blockchainPositionInfo": SolanaBlockchainDataDto.from_dict(obj["blockchainPositionInfo"]) if obj.get("blockchainPositionInfo") is not None else None, - "relatedRequests": [RelatedRequestDto.from_dict(_item) for _item in obj["relatedRequests"]] if obj.get("relatedRequests") is not None else None + "blockchainPositionInfo": SolanaBlockchainData.from_dict(obj["blockchainPositionInfo"]) if obj.get("blockchainPositionInfo") is not None else None, + "relatedRequests": [RelatedRequest.from_dict(_item) for _item in obj["relatedRequests"]] if obj.get("relatedRequests") is not None else None }) return _obj diff --git a/fireblocks/models/delegation_summary_dto.py b/fireblocks/models/delegation_summary.py similarity index 96% rename from fireblocks/models/delegation_summary_dto.py rename to fireblocks/models/delegation_summary.py index beee3add..beb77268 100644 --- a/fireblocks/models/delegation_summary_dto.py +++ b/fireblocks/models/delegation_summary.py @@ -24,9 +24,9 @@ from typing import Optional, Set from typing_extensions import Self -class DelegationSummaryDto(BaseModel): +class DelegationSummary(BaseModel): """ - DelegationSummaryDto + DelegationSummary """ # noqa: E501 active: List[AmountAndChainDescriptor] = Field(description="An array of objects containing chain descriptors and associated amounts, representing active positions.") inactive: List[AmountAndChainDescriptor] = Field(description="An array of objects containing chain descriptors and associated amounts, representing inactive positions.") @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DelegationSummaryDto from a JSON string""" + """Create an instance of DelegationSummary from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -105,7 +105,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DelegationSummaryDto from a dict""" + """Create an instance of DelegationSummary from a dict""" if obj is None: return None diff --git a/fireblocks/models/execute_action_request.py b/fireblocks/models/execute_action_request.py deleted file mode 100644 index 5a74cecd..00000000 --- a/fireblocks/models/execute_action_request.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Fireblocks API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.6.2 - Contact: support@fireblocks.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from fireblocks.models.stake_request_dto import StakeRequestDto -from fireblocks.models.unstake_request_dto import UnstakeRequestDto -from fireblocks.models.withdraw_request_dto import WithdrawRequestDto -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -EXECUTEACTIONREQUEST_ONE_OF_SCHEMAS = ["StakeRequestDto", "UnstakeRequestDto", "WithdrawRequestDto"] - -class ExecuteActionRequest(BaseModel): - """ - ExecuteActionRequest - """ - # data type: StakeRequestDto - oneof_schema_1_validator: Optional[StakeRequestDto] = None - # data type: UnstakeRequestDto - oneof_schema_2_validator: Optional[UnstakeRequestDto] = None - # data type: WithdrawRequestDto - oneof_schema_3_validator: Optional[WithdrawRequestDto] = None - actual_instance: Optional[Union[StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto]] = None - one_of_schemas: Set[str] = { "StakeRequestDto", "UnstakeRequestDto", "WithdrawRequestDto" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = ExecuteActionRequest.model_construct() - error_messages = [] - match = 0 - # validate data type: StakeRequestDto - if not isinstance(v, StakeRequestDto): - error_messages.append(f"Error! Input type `{type(v)}` is not `StakeRequestDto`") - else: - match += 1 - # validate data type: UnstakeRequestDto - if not isinstance(v, UnstakeRequestDto): - error_messages.append(f"Error! Input type `{type(v)}` is not `UnstakeRequestDto`") - else: - match += 1 - # validate data type: WithdrawRequestDto - if not isinstance(v, WithdrawRequestDto): - error_messages.append(f"Error! Input type `{type(v)}` is not `WithdrawRequestDto`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ExecuteActionRequest with oneOf schemas: StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in ExecuteActionRequest with oneOf schemas: StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into StakeRequestDto - try: - instance.actual_instance = StakeRequestDto.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into UnstakeRequestDto - try: - instance.actual_instance = UnstakeRequestDto.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into WithdrawRequestDto - try: - instance.actual_instance = WithdrawRequestDto.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ExecuteActionRequest with oneOf schemas: StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into ExecuteActionRequest with oneOf schemas: StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], StakeRequestDto, UnstakeRequestDto, WithdrawRequestDto]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/fireblocks/models/execute_action_response.py b/fireblocks/models/execute_action_response.py deleted file mode 100644 index 512f1153..00000000 --- a/fireblocks/models/execute_action_response.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - Fireblocks API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.6.2 - Contact: support@fireblocks.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, Dict, List, Optional -from fireblocks.models.stake_response_dto import StakeResponseDto -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -EXECUTEACTIONRESPONSE_ONE_OF_SCHEMAS = ["StakeResponseDto", "object"] - -class ExecuteActionResponse(BaseModel): - """ - ExecuteActionResponse - """ - # data type: StakeResponseDto - oneof_schema_1_validator: Optional[StakeResponseDto] = None - # data type: object - oneof_schema_2_validator: Optional[Dict[str, Any]] = None - # data type: object - oneof_schema_3_validator: Optional[Dict[str, Any]] = None - actual_instance: Optional[Union[StakeResponseDto, object]] = None - one_of_schemas: Set[str] = { "StakeResponseDto", "object" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = ExecuteActionResponse.model_construct() - error_messages = [] - match = 0 - # validate data type: StakeResponseDto - if not isinstance(v, StakeResponseDto): - error_messages.append(f"Error! Input type `{type(v)}` is not `StakeResponseDto`") - else: - match += 1 - # validate data type: object - try: - instance.oneof_schema_2_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: object - try: - instance.oneof_schema_3_validator = v - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in ExecuteActionResponse with oneOf schemas: StakeResponseDto, object. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in ExecuteActionResponse with oneOf schemas: StakeResponseDto, object. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into StakeResponseDto - try: - instance.actual_instance = StakeResponseDto.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.oneof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_2_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into object - try: - # validation - instance.oneof_schema_3_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.oneof_schema_3_validator - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into ExecuteActionResponse with oneOf schemas: StakeResponseDto, object. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into ExecuteActionResponse with oneOf schemas: StakeResponseDto, object. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], StakeResponseDto, object]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/fireblocks/models/fee_level.py b/fireblocks/models/fee_level.py new file mode 100644 index 00000000..ed682386 --- /dev/null +++ b/fireblocks/models/fee_level.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class FeeLevel(str, Enum): + """ + Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required. + """ + + """ + allowed enum values + """ + LOW = 'LOW' + MEDIUM = 'MEDIUM' + HIGH = 'HIGH' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FeeLevel from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/get_mpc_keys_response.py b/fireblocks/models/get_mpc_keys_response.py new file mode 100644 index 00000000..18a4bb5f --- /dev/null +++ b/fireblocks/models/get_mpc_keys_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from fireblocks.models.mpc_key import MpcKey +from typing import Optional, Set +from typing_extensions import Self + +class GetMpcKeysResponse(BaseModel): + """ + GetMpcKeysResponse + """ # noqa: E501 + tenant_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(description="The workspace id of the keys", alias="tenantId") + keys: List[MpcKey] = Field(description="The keys that are associated with the workspace") + __properties: ClassVar[List[str]] = ["tenantId", "keys"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetMpcKeysResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in keys (list) + _items = [] + if self.keys: + for _item in self.keys: + if _item: + _items.append(_item.to_dict()) + _dict['keys'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetMpcKeysResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tenantId": obj.get("tenantId"), + "keys": [MpcKey.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/list_assets_response.py b/fireblocks/models/list_assets_response.py new file mode 100644 index 00000000..fb45b25d --- /dev/null +++ b/fireblocks/models/list_assets_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.asset_response_beta import AssetResponseBeta +from typing import Optional, Set +from typing_extensions import Self + +class ListAssetsResponse(BaseModel): + """ + ListAssetsResponse + """ # noqa: E501 + data: List[AssetResponseBeta] = Field(description="The data of the current page") + next: Optional[StrictStr] = Field(description="Cursor to the next page") + __properties: ClassVar[List[str]] = ["data", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListAssetsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict['next'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListAssetsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [AssetResponseBeta.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/list_blockchains_response.py b/fireblocks/models/list_blockchains_response.py new file mode 100644 index 00000000..bd6bf3e2 --- /dev/null +++ b/fireblocks/models/list_blockchains_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.blockchain_response import BlockchainResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListBlockchainsResponse(BaseModel): + """ + ListBlockchainsResponse + """ # noqa: E501 + data: List[BlockchainResponse] = Field(description="The data of the current page") + next: Optional[StrictStr] = Field(description="Cursor to the next page") + __properties: ClassVar[List[str]] = ["data", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ListBlockchainsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict['next'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListBlockchainsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [BlockchainResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/mpc_key.py b/fireblocks/models/mpc_key.py new file mode 100644 index 00000000..ee332f50 --- /dev/null +++ b/fireblocks/models/mpc_key.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from fireblocks.models.players import Players +from typing import Optional, Set +from typing_extensions import Self + +class MpcKey(BaseModel): + """ + MpcKey + """ # noqa: E501 + key_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(alias="keyId") + user_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(description="The user id that owns the key", alias="userId") + algorithm: Union[StrictFloat, StrictInt] = Field(description="The algorithm of the key") + players: List[Players] = Field(description="The players that are associated with the key") + last_preprocessed_index: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = Field(default=None, description="The last index used on this key", alias="lastPreprocessedIndex") + __properties: ClassVar[List[str]] = ["keyId", "userId", "algorithm", "players", "lastPreprocessedIndex"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MpcKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in players (list) + _items = [] + if self.players: + for _item in self.players: + if _item: + _items.append(_item.to_dict()) + _dict['players'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MpcKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keyId": obj.get("keyId"), + "userId": obj.get("userId"), + "algorithm": obj.get("algorithm"), + "players": [Players.from_dict(_item) for _item in obj["players"]] if obj.get("players") is not None else None, + "lastPreprocessedIndex": obj.get("lastPreprocessedIndex") + }) + return _obj + + diff --git a/fireblocks/models/notification.py b/fireblocks/models/notification.py new file mode 100644 index 00000000..b5af306e --- /dev/null +++ b/fireblocks/models/notification.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from fireblocks.models.notification_status import NotificationStatus +from fireblocks.models.webhook_event import WebhookEvent +from typing import Optional, Set +from typing_extensions import Self + +class Notification(BaseModel): + """ + Notification + """ # noqa: E501 + id: StrictStr = Field(description="The id of the Notification") + created_at: datetime = Field(description="The creation date of the notification", alias="createdAt") + updated_at: datetime = Field(description="The date when the notification was updated", alias="updatedAt") + status: NotificationStatus + event_type: WebhookEvent = Field(alias="eventType") + event_version: Union[StrictFloat, StrictInt] = Field(description="The event version of the Notification", alias="eventVersion") + resource_id: Optional[StrictStr] = Field(default=None, description="The resource id of the event which the Notification is listen to", alias="resourceId") + attempts: Optional[List[StrictStr]] = Field(default=None, description="The attempts related to Notification") + __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "status", "eventType", "eventVersion", "resourceId", "attempts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Notification from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if resource_id (nullable) is None + # and model_fields_set contains the field + if self.resource_id is None and "resource_id" in self.model_fields_set: + _dict['resourceId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Notification from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "status": obj.get("status"), + "eventType": obj.get("eventType"), + "eventVersion": obj.get("eventVersion"), + "resourceId": obj.get("resourceId"), + "attempts": obj.get("attempts") + }) + return _obj + + diff --git a/fireblocks/models/notification_paginated_response.py b/fireblocks/models/notification_paginated_response.py new file mode 100644 index 00000000..e99201ea --- /dev/null +++ b/fireblocks/models/notification_paginated_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.notification import Notification +from typing import Optional, Set +from typing_extensions import Self + +class NotificationPaginatedResponse(BaseModel): + """ + NotificationPaginatedResponse + """ # noqa: E501 + data: List[Notification] = Field(description="The data of the current page") + next: Optional[StrictStr] = Field(default=None, description="The ID of the next page") + __properties: ClassVar[List[str]] = ["data", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotificationPaginatedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict['next'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NotificationPaginatedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [Notification.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/notification_status.py b/fireblocks/models/notification_status.py new file mode 100644 index 00000000..aa56b8bb --- /dev/null +++ b/fireblocks/models/notification_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class NotificationStatus(str, Enum): + """ + The status of the Notification + """ + + """ + allowed enum values + """ + COMPLETED = 'COMPLETED' + FAILED = 'FAILED' + IN_PROGRESS = 'IN_PROGRESS' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of NotificationStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/notification_with_data.py b/fireblocks/models/notification_with_data.py new file mode 100644 index 00000000..7d2fb6fd --- /dev/null +++ b/fireblocks/models/notification_with_data.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from fireblocks.models.notification_status import NotificationStatus +from fireblocks.models.webhook_event import WebhookEvent +from typing import Optional, Set +from typing_extensions import Self + +class NotificationWithData(BaseModel): + """ + NotificationWithData + """ # noqa: E501 + id: StrictStr + created_at: datetime = Field(description="The creation date of the notification", alias="createdAt") + updated_at: datetime = Field(description="The date when the notification was updated", alias="updatedAt") + status: NotificationStatus + event_type: WebhookEvent = Field(alias="eventType") + event_version: Union[StrictFloat, StrictInt] = Field(description="The event version which the Notification is listen to", alias="eventVersion") + resource_id: Optional[StrictStr] = Field(default=None, description="The resource id of the event which the Notification is listen to", alias="resourceId") + attempts: List[StrictStr] = Field(description="The attempts related to Notification") + data: Optional[Dict[str, Any]] = Field(default=None, description="notification data") + __properties: ClassVar[List[str]] = ["id", "createdAt", "updatedAt", "status", "eventType", "eventVersion", "resourceId", "attempts", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NotificationWithData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if resource_id (nullable) is None + # and model_fields_set contains the field + if self.resource_id is None and "resource_id" in self.model_fields_set: + _dict['resourceId'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NotificationWithData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt"), + "status": obj.get("status"), + "eventType": obj.get("eventType"), + "eventVersion": obj.get("eventVersion"), + "resourceId": obj.get("resourceId"), + "attempts": obj.get("attempts"), + "data": obj.get("data") + }) + return _obj + + diff --git a/fireblocks/models/pair_api_key_request.py b/fireblocks/models/pair_api_key_request.py new file mode 100644 index 00000000..d9fe6be9 --- /dev/null +++ b/fireblocks/models/pair_api_key_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.callback_handler_request import CallbackHandlerRequest +from typing import Optional, Set +from typing_extensions import Self + +class PairApiKeyRequest(BaseModel): + """ + PairApiKeyRequest + """ # noqa: E501 + callback_handler: Optional[CallbackHandlerRequest] = Field(default=None, alias="callbackHandler") + __properties: ClassVar[List[str]] = ["callbackHandler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PairApiKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of callback_handler + if self.callback_handler: + _dict['callbackHandler'] = self.callback_handler.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PairApiKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callbackHandler": CallbackHandlerRequest.from_dict(obj["callbackHandler"]) if obj.get("callbackHandler") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/pair_api_key_response.py b/fireblocks/models/pair_api_key_response.py new file mode 100644 index 00000000..08ea4809 --- /dev/null +++ b/fireblocks/models/pair_api_key_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.callback_handler_request import CallbackHandlerRequest +from typing import Optional, Set +from typing_extensions import Self + +class PairApiKeyResponse(BaseModel): + """ + PairApiKeyResponse + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the API key") + callback_handler: Optional[CallbackHandlerRequest] = Field(default=None, alias="callbackHandler") + __properties: ClassVar[List[str]] = ["id", "callbackHandler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PairApiKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of callback_handler + if self.callback_handler: + _dict['callbackHandler'] = self.callback_handler.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PairApiKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "callbackHandler": CallbackHandlerRequest.from_dict(obj["callbackHandler"]) if obj.get("callbackHandler") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/players.py b/fireblocks/models/players.py new file mode 100644 index 00000000..9efb897c --- /dev/null +++ b/fireblocks/models/players.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Players(BaseModel): + """ + Players + """ # noqa: E501 + id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field(description="id of the player") + type: StrictStr = Field(description="Type of the player") + __properties: ClassVar[List[str]] = ["id", "type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['MOBILE', 'CLOUD']): + raise ValueError("must be one of enum values ('MOBILE', 'CLOUD')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Players from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Players from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/fireblocks/models/provider_dto.py b/fireblocks/models/provider.py similarity index 71% rename from fireblocks/models/provider_dto.py rename to fireblocks/models/provider.py index 43e7c144..725d56c3 100644 --- a/fireblocks/models/provider_dto.py +++ b/fireblocks/models/provider.py @@ -19,22 +19,24 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from fireblocks.models.validator_dto import ValidatorDto +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.validator import Validator from typing import Optional, Set from typing_extensions import Self -class ProviderDto(BaseModel): +class Provider(BaseModel): """ - ProviderDto + Provider """ # noqa: E501 id: StrictStr = Field(description="The ID of the provider") provider_name: StrictStr = Field(description="Name of the provider", alias="providerName") - validators: List[ValidatorDto] = Field(description="An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider") - icon_url: StrictStr = Field(description="URL to the validator's icon", alias="iconUrl") - terms_of_service_url: StrictStr = Field(description="URL to the terms of service", alias="termsOfServiceUrl") + validators: List[Validator] = Field(description="An array of objects that includes chain descriptors and the corresponding fee percentages for validators supported by the provider") + icon_url: Optional[StrictStr] = Field(default=None, description="URL to the validator's icon", alias="iconUrl") + terms_of_service_url: Optional[StrictStr] = Field(default=None, description="URL to the terms of service", alias="termsOfServiceUrl") is_terms_of_service_approved: StrictBool = Field(description="Indicates whether the terms of service are approved", alias="isTermsOfServiceApproved") - __properties: ClassVar[List[str]] = ["id", "providerName", "validators", "iconUrl", "termsOfServiceUrl", "isTermsOfServiceApproved"] + is_private: Optional[StrictBool] = Field(default=None, description="Is the provider private, i.e created by the user", alias="isPrivate") + is_liquid_staking: StrictBool = Field(description="Is the provider a liquid staking provider", alias="isLiquidStaking") + __properties: ClassVar[List[str]] = ["id", "providerName", "validators", "iconUrl", "termsOfServiceUrl", "isTermsOfServiceApproved", "isPrivate", "isLiquidStaking"] model_config = ConfigDict( populate_by_name=True, @@ -54,7 +56,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ProviderDto from a JSON string""" + """Create an instance of Provider from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ProviderDto from a dict""" + """Create an instance of Provider from a dict""" if obj is None: return None @@ -96,10 +98,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "providerName": obj.get("providerName"), - "validators": [ValidatorDto.from_dict(_item) for _item in obj["validators"]] if obj.get("validators") is not None else None, + "validators": [Validator.from_dict(_item) for _item in obj["validators"]] if obj.get("validators") is not None else None, "iconUrl": obj.get("iconUrl"), "termsOfServiceUrl": obj.get("termsOfServiceUrl"), - "isTermsOfServiceApproved": obj.get("isTermsOfServiceApproved") + "isTermsOfServiceApproved": obj.get("isTermsOfServiceApproved"), + "isPrivate": obj.get("isPrivate"), + "isLiquidStaking": obj.get("isLiquidStaking") }) return _obj diff --git a/fireblocks/models/public_key_information.py b/fireblocks/models/public_key_information.py index 9b28e66c..67a6f2da 100644 --- a/fireblocks/models/public_key_information.py +++ b/fireblocks/models/public_key_information.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,21 @@ class PublicKeyInformation(BaseModel): """ PublicKeyInformation """ # noqa: E501 - algorithm: Optional[StrictStr] = None - derivation_path: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, alias="derivationPath") - public_key: Optional[StrictStr] = Field(default=None, alias="publicKey") + algorithm: Optional[StrictStr] = Field(default=None, description="Elliptic Curve") + derivation_path: Optional[List[StrictInt]] = Field(default=None, description="BIP44 derivation path", alias="derivationPath") + public_key: Optional[StrictStr] = Field(default=None, description="Compressed/Uncompressed public key value in hex representation", alias="publicKey") __properties: ClassVar[List[str]] = ["algorithm", "derivationPath", "publicKey"] + @field_validator('algorithm') + def algorithm_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['MPC_ECDSA_SECP256K1', 'MPC_ECDSA_SECP256R1', 'MPC_EDDSA_ED25519']): + raise ValueError("must be one of enum values ('MPC_ECDSA_SECP256K1', 'MPC_ECDSA_SECP256R1', 'MPC_EDDSA_ED25519')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/fireblocks/models/related_request_dto.py b/fireblocks/models/related_request.py similarity index 94% rename from fireblocks/models/related_request_dto.py rename to fireblocks/models/related_request.py index 3aa54961..cfb200e6 100644 --- a/fireblocks/models/related_request_dto.py +++ b/fireblocks/models/related_request.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class RelatedRequestDto(BaseModel): +class RelatedRequest(BaseModel): """ - RelatedRequestDto + RelatedRequest """ # noqa: E501 status: StrictStr = Field(description="The status of the request") in_progress: StrictBool = Field(description="Indicates whether there is an ongoing action for this position related to this request", alias="inProgress") @@ -58,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RelatedRequestDto from a JSON string""" + """Create an instance of RelatedRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -83,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RelatedRequestDto from a dict""" + """Create an instance of RelatedRequest from a dict""" if obj is None: return None diff --git a/fireblocks/models/related_transaction_dto.py b/fireblocks/models/related_transaction.py similarity index 92% rename from fireblocks/models/related_transaction_dto.py rename to fireblocks/models/related_transaction.py index b5726fea..48cfa242 100644 --- a/fireblocks/models/related_transaction_dto.py +++ b/fireblocks/models/related_transaction.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class RelatedTransactionDto(BaseModel): +class RelatedTransaction(BaseModel): """ - RelatedTransactionDto + RelatedTransaction """ # noqa: E501 tx_id: StrictStr = Field(description="The transaction ID", alias="txId") completed: StrictBool = Field(description="Is the transaction completed or not") @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RelatedTransactionDto from a JSON string""" + """Create an instance of RelatedTransaction from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RelatedTransactionDto from a dict""" + """Create an instance of RelatedTransaction from a dict""" if obj is None: return None diff --git a/fireblocks/models/rename_cosigner.py b/fireblocks/models/rename_cosigner.py index 96b016a0..3a3bb88f 100644 --- a/fireblocks/models/rename_cosigner.py +++ b/fireblocks/models/rename_cosigner.py @@ -69,11 +69,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if name (nullable) is None - # and model_fields_set contains the field - if self.name is None and "name" in self.model_fields_set: - _dict['name'] = None - return _dict @classmethod diff --git a/fireblocks/models/solana_blockchain_data.py b/fireblocks/models/solana_blockchain_data.py new file mode 100644 index 00000000..5448ca51 --- /dev/null +++ b/fireblocks/models/solana_blockchain_data.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class SolanaBlockchainData(BaseModel): + """ + Additional fields per blockchain - can be empty or missing if not initialized or no additional info exists. The type depends on the chainDescriptor value. For Solana (SOL), stake account address. For Ethereum (ETH), an empty object is returned as no specific data is available. + """ # noqa: E501 + stake_account_address: StrictStr = Field(description="The stake account address matching the stakeAccountId.", alias="stakeAccountAddress") + stake_account_derivation_change_value: Union[StrictFloat, StrictInt] = Field(description="The value of the change level in the BIP32 path which was used to derive the stake account address", alias="stakeAccountDerivationChangeValue") + __properties: ClassVar[List[str]] = ["stakeAccountAddress", "stakeAccountDerivationChangeValue"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SolanaBlockchainData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SolanaBlockchainData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stakeAccountAddress": obj.get("stakeAccountAddress"), + "stakeAccountDerivationChangeValue": obj.get("stakeAccountDerivationChangeValue") + }) + return _obj + + diff --git a/fireblocks/models/split_request.py b/fireblocks/models/split_request.py new file mode 100644 index 00000000..46fb3910 --- /dev/null +++ b/fireblocks/models/split_request.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.fee_level import FeeLevel +from typing import Optional, Set +from typing_extensions import Self + +class SplitRequest(BaseModel): + """ + SplitRequest + """ # noqa: E501 + id: StrictStr = Field(description="id of position to split") + amount: StrictStr = Field(description="Amount of tokens to be transferred to the new stake account.") + fee: Optional[StrictStr] = Field(default=None, description="Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required.") + fee_level: Optional[FeeLevel] = Field(default=None, alias="feeLevel") + tx_note: Optional[StrictStr] = Field(default=None, description="The note to associate with the transactions.", alias="txNote") + __properties: ClassVar[List[str]] = ["id", "amount", "fee", "feeLevel", "txNote"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SplitRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SplitRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "amount": obj.get("amount"), + "fee": obj.get("fee"), + "feeLevel": obj.get("feeLevel"), + "txNote": obj.get("txNote") + }) + return _obj + + diff --git a/fireblocks/models/solana_blockchain_data_dto.py b/fireblocks/models/split_response.py similarity index 81% rename from fireblocks/models/solana_blockchain_data_dto.py rename to fireblocks/models/split_response.py index e1e33465..34f7d5e9 100644 --- a/fireblocks/models/solana_blockchain_data_dto.py +++ b/fireblocks/models/split_response.py @@ -23,12 +23,12 @@ from typing import Optional, Set from typing_extensions import Self -class SolanaBlockchainDataDto(BaseModel): +class SplitResponse(BaseModel): """ - SolanaBlockchainDataDto + SplitResponse """ # noqa: E501 - stake_account_address: StrictStr = Field(description="The stake account address matching the stakeAccountId.", alias="stakeAccountAddress") - __properties: ClassVar[List[str]] = ["stakeAccountAddress"] + id: StrictStr = Field(description="The unique identifier of the new staking position") + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SolanaBlockchainDataDto from a JSON string""" + """Create an instance of SplitResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SolanaBlockchainDataDto from a dict""" + """Create an instance of SplitResponse from a dict""" if obj is None: return None @@ -81,7 +81,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "stakeAccountAddress": obj.get("stakeAccountAddress") + "id": obj.get("id") }) return _obj diff --git a/fireblocks/models/stake_request_dto.py b/fireblocks/models/stake_request.py similarity index 86% rename from fireblocks/models/stake_request_dto.py rename to fireblocks/models/stake_request.py index 961f4851..ffcd895a 100644 --- a/fireblocks/models/stake_request_dto.py +++ b/fireblocks/models/stake_request.py @@ -20,19 +20,21 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.fee_level import FeeLevel +from fireblocks.models.staking_provider import StakingProvider from typing import Optional, Set from typing_extensions import Self -class StakeRequestDto(BaseModel): +class StakeRequest(BaseModel): """ - StakeRequestDto + StakeRequest """ # noqa: E501 vault_account_id: StrictStr = Field(description="The source vault account to stake from", alias="vaultAccountId") - provider_id: StrictStr = Field(description="The ID of the provider", alias="providerId") + provider_id: StakingProvider = Field(alias="providerId") stake_amount: StrictStr = Field(description="Amount of tokens to stake", alias="stakeAmount") tx_note: Optional[StrictStr] = Field(default=None, description="The note to associate with the stake transactions.", alias="txNote") fee: Optional[StrictStr] = Field(default=None, description="Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required.") - fee_level: Optional[StrictStr] = Field(default=None, description="Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required.", alias="feeLevel") + fee_level: Optional[FeeLevel] = Field(default=None, alias="feeLevel") __properties: ClassVar[List[str]] = ["vaultAccountId", "providerId", "stakeAmount", "txNote", "fee", "feeLevel"] model_config = ConfigDict( @@ -53,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StakeRequestDto from a JSON string""" + """Create an instance of StakeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StakeRequestDto from a dict""" + """Create an instance of StakeRequest from a dict""" if obj is None: return None diff --git a/fireblocks/models/stake_response_dto.py b/fireblocks/models/stake_response.py similarity index 92% rename from fireblocks/models/stake_response_dto.py rename to fireblocks/models/stake_response.py index edfbdbb1..a5269e92 100644 --- a/fireblocks/models/stake_response_dto.py +++ b/fireblocks/models/stake_response.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class StakeResponseDto(BaseModel): +class StakeResponse(BaseModel): """ - StakeResponseDto + StakeResponse """ # noqa: E501 id: StrictStr = Field(description="The unique identifier of the staking position") __properties: ClassVar[List[str]] = ["id"] @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StakeResponseDto from a JSON string""" + """Create an instance of StakeResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StakeResponseDto from a dict""" + """Create an instance of StakeResponse from a dict""" if obj is None: return None diff --git a/fireblocks/models/staking_provider.py b/fireblocks/models/staking_provider.py new file mode 100644 index 00000000..62ba3205 --- /dev/null +++ b/fireblocks/models/staking_provider.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class StakingProvider(str, Enum): + """ + The unique identifier of the staking provider + """ + + """ + allowed enum values + """ + KILN = 'kiln' + FIGMENT = 'figment' + LIDO = 'lido' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of StakingProvider from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/status.py b/fireblocks/models/status.py new file mode 100644 index 00000000..f2056be4 --- /dev/null +++ b/fireblocks/models/status.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Status(BaseModel): + """ + Status + """ # noqa: E501 + status: StrictStr = Field(description="The status of the command") + type: StrictStr = Field(description="The type of the command") + __properties: ClassVar[List[str]] = ["status", "type"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['WAITING_FOR_APPROVAL', 'APPROVED', 'CANCELLED', 'REJECTED', 'COMPLETED']): + raise ValueError("must be one of enum values ('WAITING_FOR_APPROVAL', 'APPROVED', 'CANCELLED', 'REJECTED', 'COMPLETED')") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PAIR_API_KEY', 'UPDATE_CALLBACK_HANDLER', 'UNPAIR_API_KEY']): + raise ValueError("must be one of enum values ('PAIR_API_KEY', 'UPDATE_CALLBACK_HANDLER', 'UNPAIR_API_KEY')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Status from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Status from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "type": obj.get("type") + }) + return _obj + + diff --git a/fireblocks/models/token_info_not_found_error_response.py b/fireblocks/models/token_info_not_found_error_response.py new file mode 100644 index 00000000..27570a89 --- /dev/null +++ b/fireblocks/models/token_info_not_found_error_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing import Optional, Set +from typing_extensions import Self + +class TokenInfoNotFoundErrorResponse(BaseModel): + """ + TokenInfoNotFoundErrorResponse + """ # noqa: E501 + message: StrictStr = Field(description="Not found error code") + code: Union[StrictFloat, StrictInt] = Field(description="Error code") + __properties: ClassVar[List[str]] = ["message", "code"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenInfoNotFoundErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenInfoNotFoundErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "code": obj.get("code") + }) + return _obj + + diff --git a/fireblocks/models/transaction_operation.py b/fireblocks/models/transaction_operation.py index 94123399..4e717535 100644 --- a/fireblocks/models/transaction_operation.py +++ b/fireblocks/models/transaction_operation.py @@ -21,7 +21,7 @@ class TransactionOperation(str, Enum): """ - * `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) + * `TRANSFER` - The default value for an operation. Transfers funds from one account to another. UTXO blockchains allow multi-input and multi-output transfers. All other blockchains allow transfers with one source address and one destination address. * `MINT` - Mints new tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `BURN` - Burns tokens. Supported for Stellar, Ripple and EVM-based blockchains. * `CONTRACT_CALL` - Calls a smart contract method for web3 operations on any EVM blockchain. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. * `PROGRAM_CALL` - Execute multiple instructions on Solana blockchain. The @solana/web3.js library is recommended for building program call transactions. Currently in beta and disabled * `TYPED_MESSAGE` - An off-chain message in either Ethereum Personal Message or EIP712 format. Use it to sign specific readable messages that are not actual transactions. [Learn more about typed messages](https://developers.fireblocks.com/docs/typed-message-signing). * `RAW` - An off-chain message with no predefined format. Use it to sign any message with your private key, including protocols such as blockchains and custom transaction types that are not natively supported by Fireblocks. [Learn more about raw signing transactions.](https://developers.fireblocks.com/docs/raw-message-signing) """ """ @@ -30,6 +30,7 @@ class TransactionOperation(str, Enum): TRANSFER = 'TRANSFER' BURN = 'BURN' CONTRACT_CALL = 'CONTRACT_CALL' + PROGRAM_CALL = 'PROGRAM_CALL' MINT = 'MINT' RAW = 'RAW' TYPED_MESSAGE = 'TYPED_MESSAGE' diff --git a/fireblocks/models/transfer_peer_path_type.py b/fireblocks/models/transfer_peer_path_type.py index 59701816..371ed1e1 100644 --- a/fireblocks/models/transfer_peer_path_type.py +++ b/fireblocks/models/transfer_peer_path_type.py @@ -39,6 +39,7 @@ class TransferPeerPathType(str, Enum): ONE_TIME_ADDRESS = 'ONE_TIME_ADDRESS' UNKNOWN = 'UNKNOWN' END_USER_WALLET = 'END_USER_WALLET' + PROGRAM_CALL = 'PROGRAM_CALL' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/fireblocks/models/unstake_request_dto.py b/fireblocks/models/unstake_request.py similarity index 88% rename from fireblocks/models/unstake_request_dto.py rename to fireblocks/models/unstake_request.py index b18beb11..eab74b80 100644 --- a/fireblocks/models/unstake_request_dto.py +++ b/fireblocks/models/unstake_request.py @@ -20,16 +20,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.fee_level import FeeLevel from typing import Optional, Set from typing_extensions import Self -class UnstakeRequestDto(BaseModel): +class UnstakeRequest(BaseModel): """ - UnstakeRequestDto + UnstakeRequest """ # noqa: E501 id: StrictStr = Field(description="id of position to unstake") fee: Optional[StrictStr] = Field(default=None, description="Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required.") - fee_level: Optional[StrictStr] = Field(default=None, description="Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required.", alias="feeLevel") + fee_level: Optional[FeeLevel] = Field(default=None, alias="feeLevel") tx_note: Optional[StrictStr] = Field(default=None, description="The note to associate with the transactions.", alias="txNote") amount: Optional[StrictStr] = Field(default=None, description="The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default.") __properties: ClassVar[List[str]] = ["id", "fee", "feeLevel", "txNote", "amount"] @@ -52,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UnstakeRequestDto from a JSON string""" + """Create an instance of UnstakeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UnstakeRequestDto from a dict""" + """Create an instance of UnstakeRequest from a dict""" if obj is None: return None diff --git a/fireblocks/models/update_callback_handler_request.py b/fireblocks/models/update_callback_handler_request.py new file mode 100644 index 00000000..f1e19343 --- /dev/null +++ b/fireblocks/models/update_callback_handler_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.callback_handler_request import CallbackHandlerRequest +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCallbackHandlerRequest(BaseModel): + """ + UpdateCallbackHandlerRequest + """ # noqa: E501 + callback_handler: Optional[CallbackHandlerRequest] = Field(default=None, alias="callbackHandler") + __properties: ClassVar[List[str]] = ["callbackHandler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCallbackHandlerRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of callback_handler + if self.callback_handler: + _dict['callbackHandler'] = self.callback_handler.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCallbackHandlerRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "callbackHandler": CallbackHandlerRequest.from_dict(obj["callbackHandler"]) if obj.get("callbackHandler") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/update_callback_handler_response.py b/fireblocks/models/update_callback_handler_response.py new file mode 100644 index 00000000..e7c24789 --- /dev/null +++ b/fireblocks/models/update_callback_handler_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.callback_handler_request import CallbackHandlerRequest +from typing import Optional, Set +from typing_extensions import Self + +class UpdateCallbackHandlerResponse(BaseModel): + """ + UpdateCallbackHandlerResponse + """ # noqa: E501 + id: StrictStr = Field(description="The unique identifier of the API key") + callback_handler: Optional[CallbackHandlerRequest] = Field(default=None, alias="callbackHandler") + __properties: ClassVar[List[str]] = ["id", "callbackHandler"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateCallbackHandlerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of callback_handler + if self.callback_handler: + _dict['callbackHandler'] = self.callback_handler.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateCallbackHandlerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "callbackHandler": CallbackHandlerRequest.from_dict(obj["callbackHandler"]) if obj.get("callbackHandler") is not None else None + }) + return _obj + + diff --git a/fireblocks/models/update_webhook_request.py b/fireblocks/models/update_webhook_request.py new file mode 100644 index 00000000..f4fb078f --- /dev/null +++ b/fireblocks/models/update_webhook_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from fireblocks.models.webhook_event import WebhookEvent +from typing import Optional, Set +from typing_extensions import Self + +class UpdateWebhookRequest(BaseModel): + """ + UpdateWebhookRequest + """ # noqa: E501 + url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The url of the webhook where notifications will be sent. URL must be valid, unique and https.") + description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="description of the webhook of what it is used for.should not contain special characters.") + events: Optional[List[WebhookEvent]] = Field(default=None, description="The events that the webhook will be subscribed to") + enabled: Optional[StrictBool] = Field(default=None, description="The status of the webhook") + __properties: ClassVar[List[str]] = ["url", "description", "events", "enabled"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateWebhookRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateWebhookRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "description": obj.get("description"), + "events": obj.get("events"), + "enabled": obj.get("enabled") + }) + return _obj + + diff --git a/fireblocks/models/validator_dto.py b/fireblocks/models/validator.py similarity index 81% rename from fireblocks/models/validator_dto.py rename to fireblocks/models/validator.py index 713d3b69..35ceabba 100644 --- a/fireblocks/models/validator_dto.py +++ b/fireblocks/models/validator.py @@ -18,18 +18,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self -class ValidatorDto(BaseModel): +class Validator(BaseModel): """ - ValidatorDto + Validator """ # noqa: E501 chain_descriptor: StrictStr = Field(description="The protocol identifier (e.g. \"ETH\"/\"SOL\") of the validator", alias="chainDescriptor") fee_percent: Union[StrictFloat, StrictInt] = Field(description="The service fee as a percentage out of the earned rewards", alias="feePercent") - __properties: ClassVar[List[str]] = ["chainDescriptor", "feePercent"] + is_private: Optional[StrictBool] = Field(default=None, description="Is the validator private, i.e created by the user", alias="isPrivate") + __properties: ClassVar[List[str]] = ["chainDescriptor", "feePercent", "isPrivate"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidatorDto from a JSON string""" + """Create an instance of Validator from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidatorDto from a dict""" + """Create an instance of Validator from a dict""" if obj is None: return None @@ -83,7 +84,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "chainDescriptor": obj.get("chainDescriptor"), - "feePercent": obj.get("feePercent") + "feePercent": obj.get("feePercent"), + "isPrivate": obj.get("isPrivate") }) return _obj diff --git a/fireblocks/models/version.py b/fireblocks/models/version.py new file mode 100644 index 00000000..fda5a0a3 --- /dev/null +++ b/fireblocks/models/version.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Version(BaseModel): + """ + Version + """ # noqa: E501 + hash: StrictStr = Field(description="The version hash of the cosigner") + __properties: ClassVar[List[str]] = ["hash"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Version from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Version from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "hash": obj.get("hash") + }) + return _obj + + diff --git a/fireblocks/models/webhook.py b/fireblocks/models/webhook.py new file mode 100644 index 00000000..712687fc --- /dev/null +++ b/fireblocks/models/webhook.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from fireblocks.models.webhook_event import WebhookEvent +from typing import Optional, Set +from typing_extensions import Self + +class Webhook(BaseModel): + """ + Webhook + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The id of the webhook") + url: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The url of the webhook where notifications will be sent. Must be a valid URL and https.") + description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="description of the webhook of what it is used for") + events: Optional[List[WebhookEvent]] = Field(default=None, description="The events that the webhook will be subscribed to") + status: Optional[StrictStr] = Field(default=None, description="The status of the webhook") + created_at: Optional[datetime] = Field(default=None, description="The date and time the webhook was created", alias="createdAt") + updated_at: Optional[datetime] = Field(default=None, description="The date and time the webhook was last updated", alias="updatedAt") + __properties: ClassVar[List[str]] = ["id", "url", "description", "events", "status", "createdAt", "updatedAt"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['DISABLED', 'ENABLED']): + raise ValueError("must be one of enum values ('DISABLED', 'ENABLED')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Webhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Webhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "url": obj.get("url"), + "description": obj.get("description"), + "events": obj.get("events"), + "status": obj.get("status"), + "createdAt": obj.get("createdAt"), + "updatedAt": obj.get("updatedAt") + }) + return _obj + + diff --git a/fireblocks/models/webhook_event.py b/fireblocks/models/webhook_event.py new file mode 100644 index 00000000..be21c8a5 --- /dev/null +++ b/fireblocks/models/webhook_event.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebhookEvent(str, Enum): + """ + WebhookEvent + """ + + """ + allowed enum values + """ + TRANSACTION_DOT_CREATED = 'transaction.created' + TRANSACTION_DOT_STATUS_DOT_UPDATED = 'transaction.status.updated' + TRANSACTION_DOT_APPROVAL_STATUS_DOT_UPDATED = 'transaction.approval_status.updated' + EXTERNAL_WALLET_DOT_ASSET_DOT_ADDED = 'external_wallet.asset.added' + INTERNAL_WALLET_DOT_ASSET_DOT_ADDED = 'internal_wallet.asset.added' + INTERNAL_WALLET_DOT_ASSET_DOT_REMOVED = 'internal_wallet.asset.removed' + CONTRACT_WALLET_DOT_ASSET_DOT_ADDED = 'contract_wallet.asset.added' + CONTRACT_WALLET_DOT_ASSET_DOT_REMOVED = 'contract_wallet.asset.removed' + VAULT_ACCOUNT_DOT_CREATED = 'vault_account.created' + VAULT_ACCOUNT_DOT_ASSET_DOT_ADDED = 'vault_account.asset.added' + VAULT_ACCOUNT_DOT_ASSET_DOT_BALANCE_UPDATED = 'vault_account.asset.balance_updated' + VAULT_ACCOUNT_DOT_NFT_DOT_BALANCE_UPDATED = 'vault_account.nft.balance_updated' + EMBEDDED_WALLET_DOT_ASSET_DOT_ADDED = 'embedded_wallet.asset.added' + EMBEDDED_WALLET_DOT_ASSET_DOT_BALANCE_UPDATED = 'embedded_wallet.asset.balance_updated' + EXCHANGE_ACCOUNT_DOT_ADDED = 'exchange_account.added' + FIAT_ACCOUNT_DOT_ADDED = 'fiat_account.added' + TICKET_DOT_CREATED = 'ticket.created' + TICKET_DOT_SUBMITTED = 'ticket.submitted' + TICKET_DOT_EXPIRED = 'ticket.expired' + TICKET_DOT_CANCELED = 'ticket.canceled' + TICKET_DOT_FULFILLED = 'ticket.fulfilled' + TICKET_DOT_COUNTERPARTY_DOT_ADDED = 'ticket.counterparty.added' + TICKET_DOT_COUNTERPARTY_EXTERNAL_ID_DOT_SET = 'ticket.counterparty_external_id.set' + TICKET_DOT_NOTE_DOT_ADDED = 'ticket.note.added' + TICKET_DOT_EXPIRED_IN_DOT_SET = 'ticket.expired_in.set' + TICKET_DOT_EXPIRED_AT_DOT_SET = 'ticket.expired_at.set' + TICKET_DOT_TERM_DOT_ADDED = 'ticket.term.added' + TICKET_DOT_TERM_DOT_UPDATED = 'ticket.term.updated' + TICKET_DOT_TERM_DOT_DELETED = 'ticket.term.deleted' + TICKET_DOT_TERM_DOT_FUNDED = 'ticket.term.funded' + TICKET_DOT_TERM_DOT_MANUALLY_FUNDED = 'ticket.term.manually_funded' + TICKET_DOT_TERM_DOT_FUNDING_CANCELED = 'ticket.term.funding_canceled' + TICKET_DOT_TERM_DOT_FUNDING_FAILED = 'ticket.term.funding_failed' + TICKET_DOT_TERM_DOT_FUNDING_COMPLETED = 'ticket.term.funding_completed' + TICKET_DOT_TERM_DOT_TRANSACTION_STATUS_CHANGED = 'ticket.term.transaction_status_changed' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebhookEvent from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/fireblocks/models/webhook_paginated_response.py b/fireblocks/models/webhook_paginated_response.py new file mode 100644 index 00000000..7537b725 --- /dev/null +++ b/fireblocks/models/webhook_paginated_response.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.webhook import Webhook +from typing import Optional, Set +from typing_extensions import Self + +class WebhookPaginatedResponse(BaseModel): + """ + WebhookPaginatedResponse + """ # noqa: E501 + data: List[Webhook] = Field(description="The data of the current page") + next: Optional[StrictStr] = Field(default=None, description="The ID of the next page") + __properties: ClassVar[List[str]] = ["data", "next"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookPaginatedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # set to None if next (nullable) is None + # and model_fields_set contains the field + if self.next is None and "next" in self.model_fields_set: + _dict['next'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookPaginatedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [Webhook.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "next": obj.get("next") + }) + return _obj + + diff --git a/fireblocks/models/withdraw_request_dto.py b/fireblocks/models/withdraw_request.py similarity index 87% rename from fireblocks/models/withdraw_request_dto.py rename to fireblocks/models/withdraw_request.py index 871abaf7..f47bb93a 100644 --- a/fireblocks/models/withdraw_request_dto.py +++ b/fireblocks/models/withdraw_request.py @@ -20,16 +20,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from fireblocks.models.fee_level import FeeLevel from typing import Optional, Set from typing_extensions import Self -class WithdrawRequestDto(BaseModel): +class WithdrawRequest(BaseModel): """ - WithdrawRequestDto + WithdrawRequest """ # noqa: E501 id: StrictStr = Field(description="id of position to withdraw") fee: Optional[StrictStr] = Field(default=None, description="Represents the fee for a transaction, which can be specified as a percentage value. Only one of fee/feeLevel is required.") - fee_level: Optional[StrictStr] = Field(default=None, description="Represents the fee level for a transaction, which can be set as slow, medium, or fast. Only one of fee/feeLevel is required.", alias="feeLevel") + fee_level: Optional[FeeLevel] = Field(default=None, alias="feeLevel") tx_note: Optional[StrictStr] = Field(default=None, description="The note to associate with the transactions.", alias="txNote") __properties: ClassVar[List[str]] = ["id", "fee", "feeLevel", "txNote"] @@ -51,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WithdrawRequestDto from a JSON string""" + """Create an instance of WithdrawRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WithdrawRequestDto from a dict""" + """Create an instance of WithdrawRequest from a dict""" if obj is None: return None diff --git a/pyproject.toml b/pyproject.toml index ea245e91..176ccaff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fireblocks" -version = "5.0.0" +version = "0.0.0" description = "Fireblocks API" authors = ["Fireblocks "] license = "MIT License" diff --git a/setup.py b/setup.py index 1d88a2e5..f0a9f52b 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "fireblocks" -VERSION = "5.0.0" +VERSION = "0.0.0" PYTHON_REQUIRES = ">=3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test/fireblocks/test_client.py b/test/fireblocks/test_client.py index d013d505..2874953b 100644 --- a/test/fireblocks/test_client.py +++ b/test/fireblocks/test_client.py @@ -20,6 +20,7 @@ from fireblocks.api.assets_api import AssetsApi from fireblocks.api.audit_logs_api import AuditLogsApi from fireblocks.api.blockchains_assets_api import BlockchainsAssetsApi +from fireblocks.api.blockchains_assets_beta_api import BlockchainsAssetsBetaApi from fireblocks.api.compliance_api import ComplianceApi from fireblocks.api.compliance_screening_configuration_api import ComplianceScreeningConfigurationApi from fireblocks.api.console_user_api import ConsoleUserApi @@ -28,6 +29,7 @@ from fireblocks.api.contracts_api import ContractsApi from fireblocks.api.cosigners_beta_api import CosignersBetaApi from fireblocks.api.deployed_contracts_api import DeployedContractsApi +from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi from fireblocks.api.exchange_accounts_api import ExchangeAccountsApi from fireblocks.api.external_wallets_api import ExternalWalletsApi from fireblocks.api.fiat_accounts_api import FiatAccountsApi @@ -35,6 +37,7 @@ from fireblocks.api.internal_wallets_api import InternalWalletsApi from fireblocks.api.job_management_api import JobManagementApi from fireblocks.api.key_link_beta_api import KeyLinkBetaApi +from fireblocks.api.keys_beta_api import KeysBetaApi from fireblocks.api.nfts_api import NFTsApi from fireblocks.api.network_connections_api import NetworkConnectionsApi from fireblocks.api.ota_beta_api import OTABetaApi @@ -43,7 +46,7 @@ from fireblocks.api.policy_editor_beta_api import PolicyEditorBetaApi from fireblocks.api.reset_device_api import ResetDeviceApi from fireblocks.api.smart_transfer_api import SmartTransferApi -from fireblocks.api.staking_beta_api import StakingBetaApi +from fireblocks.api.staking_api import StakingApi from fireblocks.api.tokenization_api import TokenizationApi from fireblocks.api.transactions_api import TransactionsApi from fireblocks.api.travel_rule_beta_api import TravelRuleBetaApi @@ -52,6 +55,7 @@ from fireblocks.api.vaults_api import VaultsApi from fireblocks.api.web3_connections_api import Web3ConnectionsApi from fireblocks.api.webhooks_api import WebhooksApi +from fireblocks.api.webhooks_v2_beta_api import WebhooksV2BetaApi from fireblocks.api.workspace_status_beta_api import WorkspaceStatusBetaApi from fireblocks.api.whitelist_ip_addresses_api import WhitelistIpAddressesApi @@ -80,6 +84,9 @@ def test_get_audit_logs(fireblocks_instance): def test_get_blockchains_assets(fireblocks_instance): assert isinstance(fireblocks_instance.blockchains_assets, BlockchainsAssetsApi) +def test_get_blockchains_assets_beta(fireblocks_instance): + assert isinstance(fireblocks_instance.blockchains_assets_beta, BlockchainsAssetsBetaApi) + def test_get_compliance(fireblocks_instance): assert isinstance(fireblocks_instance.compliance, ComplianceApi) @@ -104,6 +111,9 @@ def test_get_cosigners_beta(fireblocks_instance): def test_get_deployed_contracts(fireblocks_instance): assert isinstance(fireblocks_instance.deployed_contracts, DeployedContractsApi) +def test_get_embedded_wallets(fireblocks_instance): + assert isinstance(fireblocks_instance.embedded_wallets, EmbeddedWalletsApi) + def test_get_exchange_accounts(fireblocks_instance): assert isinstance(fireblocks_instance.exchange_accounts, ExchangeAccountsApi) @@ -125,6 +135,9 @@ def test_get_job_management(fireblocks_instance): def test_get_key_link_beta(fireblocks_instance): assert isinstance(fireblocks_instance.key_link_beta, KeyLinkBetaApi) +def test_get_keys_beta(fireblocks_instance): + assert isinstance(fireblocks_instance.keys_beta, KeysBetaApi) + def test_get_nfts(fireblocks_instance): assert isinstance(fireblocks_instance.nfts, NFTsApi) @@ -149,8 +162,8 @@ def test_get_reset_device(fireblocks_instance): def test_get_smart_transfer(fireblocks_instance): assert isinstance(fireblocks_instance.smart_transfer, SmartTransferApi) -def test_get_staking_beta(fireblocks_instance): - assert isinstance(fireblocks_instance.staking_beta, StakingBetaApi) +def test_get_staking(fireblocks_instance): + assert isinstance(fireblocks_instance.staking, StakingApi) def test_get_tokenization(fireblocks_instance): assert isinstance(fireblocks_instance.tokenization, TokenizationApi) @@ -176,6 +189,9 @@ def test_get_web3_connections(fireblocks_instance): def test_get_webhooks(fireblocks_instance): assert isinstance(fireblocks_instance.webhooks, WebhooksApi) +def test_get_webhooks_v2_beta(fireblocks_instance): + assert isinstance(fireblocks_instance.webhooks_v2_beta, WebhooksV2BetaApi) + def test_get_workspace_status_beta(fireblocks_instance): assert isinstance(fireblocks_instance.workspace_status_beta, WorkspaceStatusBetaApi) diff --git a/test/test_add_cosigner_request.py b/test/test_add_cosigner_request.py new file mode 100644 index 00000000..93382013 --- /dev/null +++ b/test/test_add_cosigner_request.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.add_cosigner_request import AddCosignerRequest + + +class TestAddCosignerRequest(unittest.TestCase): + """AddCosignerRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddCosignerRequest: + """Test AddCosignerRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AddCosignerRequest` + """ + model = AddCosignerRequest() + if include_optional: + return AddCosignerRequest( + api_key_id = '123e4567-e89b-12d3-a456-426614174000', + name = 'My Cosigner 1', + existing_cosigner = False + ) + else: + return AddCosignerRequest( + api_key_id = '123e4567-e89b-12d3-a456-426614174000', + name = 'My Cosigner 1', + ) + """ + + def testAddCosignerRequest(self): + """Test AddCosignerRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_add_cosigner_response.py b/test/test_add_cosigner_response.py new file mode 100644 index 00000000..a299ff92 --- /dev/null +++ b/test/test_add_cosigner_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.add_cosigner_response import AddCosignerResponse + + +class TestAddCosignerResponse(unittest.TestCase): + """AddCosignerResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddCosignerResponse: + """Test AddCosignerResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AddCosignerResponse` + """ + model = AddCosignerResponse() + if include_optional: + return AddCosignerResponse( + api_key_id = '123e4567-e89b-12d3-a456-426614174000', + name = 'My Cosigner 1', + existing_cosigner = False, + pending_cosigner_id = '44fcead0-7053-4831-a53a-df7fb90d440f' + ) + else: + return AddCosignerResponse( + api_key_id = '123e4567-e89b-12d3-a456-426614174000', + name = 'My Cosigner 1', + pending_cosigner_id = '44fcead0-7053-4831-a53a-df7fb90d440f', + ) + """ + + def testAddCosignerResponse(self): + """Test AddCosignerResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_additional_info_dto.py b/test/test_additional_info.py similarity index 73% rename from test/test_additional_info_dto.py rename to test/test_additional_info.py index aea3d413..35380227 100644 --- a/test/test_additional_info_dto.py +++ b/test/test_additional_info.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.additional_info_dto import AdditionalInfoDto +from fireblocks.models.additional_info import AdditionalInfo -class TestAdditionalInfoDto(unittest.TestCase): - """AdditionalInfoDto unit test stubs""" +class TestAdditionalInfo(unittest.TestCase): + """AdditionalInfo unit test stubs""" def setUp(self): pass @@ -27,30 +27,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> AdditionalInfoDto: - """Test AdditionalInfoDto + def make_instance(self, include_optional) -> AdditionalInfo: + """Test AdditionalInfo include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `AdditionalInfoDto` + # uncomment below to create an instance of `AdditionalInfo` """ - model = AdditionalInfoDto() + model = AdditionalInfo() if include_optional: - return AdditionalInfoDto( + return AdditionalInfo( estimated_annual_reward = 6.48, lockup_period = 172800000, activation_period = 172800000 ) else: - return AdditionalInfoDto( + return AdditionalInfo( estimated_annual_reward = 6.48, lockup_period = 172800000, activation_period = 172800000, ) """ - def testAdditionalInfoDto(self): - """Test AdditionalInfoDto""" + def testAdditionalInfo(self): + """Test AdditionalInfo""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_api_key.py b/test/test_api_key.py index f84d04a9..4e59af3e 100644 --- a/test/test_api_key.py +++ b/test/test_api_key.py @@ -38,12 +38,17 @@ def make_instance(self, include_optional) -> ApiKey: if include_optional: return ApiKey( id = '44fcead0-7053-4831-a53a-df7fb90d440f', - last_seen = '2021-07-01T00:00Z' + last_seen = '2021-07-01T00:00Z', + callback_handler = fireblocks.models.callback_handler.CallbackHandler( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ... +-----END PUBLIC KEY-----', + cert_public_key_hash = '', ) ) else: return ApiKey( id = '44fcead0-7053-4831-a53a-df7fb90d440f', - last_seen = '2021-07-01T00:00Z', ) """ diff --git a/test/test_api_keys_paginated_response.py b/test/test_api_keys_paginated_response.py index 4c845523..6633a76b 100644 --- a/test/test_api_keys_paginated_response.py +++ b/test/test_api_keys_paginated_response.py @@ -40,7 +40,13 @@ def make_instance(self, include_optional) -> ApiKeysPaginatedResponse: data = [ fireblocks.models.api_key.ApiKey( id = '44fcead0-7053-4831-a53a-df7fb90d440f', - last_seen = '2021-07-01T00:00Z', ) + last_seen = '2021-07-01T00:00Z', + callback_handler = fireblocks.models.callback_handler.CallbackHandler( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ... +-----END PUBLIC KEY-----', + cert_public_key_hash = '', ), ) ], next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' ) @@ -49,7 +55,13 @@ def make_instance(self, include_optional) -> ApiKeysPaginatedResponse: data = [ fireblocks.models.api_key.ApiKey( id = '44fcead0-7053-4831-a53a-df7fb90d440f', - last_seen = '2021-07-01T00:00Z', ) + last_seen = '2021-07-01T00:00Z', + callback_handler = fireblocks.models.callback_handler.CallbackHandler( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ... +-----END PUBLIC KEY-----', + cert_public_key_hash = '', ), ) ], ) """ diff --git a/test/test_asset_bad_request_error_response.py b/test/test_asset_bad_request_error_response.py index 1b94d4f0..1cbb8561 100644 --- a/test/test_asset_bad_request_error_response.py +++ b/test/test_asset_bad_request_error_response.py @@ -40,12 +40,12 @@ def make_instance(self, include_optional) -> AssetBadRequestErrorResponse: if include_optional: return AssetBadRequestErrorResponse( message = 'Listing an asset on the requested blockchain is not supported', - code = '3001' + code = 3001 ) else: return AssetBadRequestErrorResponse( message = 'Listing an asset on the requested blockchain is not supported', - code = '3001', + code = 3001, ) """ diff --git a/test/test_asset_class_beta.py b/test/test_asset_class_beta.py new file mode 100644 index 00000000..5d24fc5c --- /dev/null +++ b/test/test_asset_class_beta.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.asset_class_beta import AssetClassBeta + + +class TestAssetClassBeta(unittest.TestCase): + """AssetClassBeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAssetClassBeta(self): + """Test AssetClassBeta""" + # inst = AssetClassBeta() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_asset_conflict_error_response.py b/test/test_asset_conflict_error_response.py index 07b4085d..de97e7b2 100644 --- a/test/test_asset_conflict_error_response.py +++ b/test/test_asset_conflict_error_response.py @@ -38,12 +38,12 @@ def make_instance(self, include_optional) -> AssetConflictErrorResponse: if include_optional: return AssetConflictErrorResponse( message = 'Asset already listed', - code = '3002' + code = 3002 ) else: return AssetConflictErrorResponse( message = 'Asset already listed', - code = '3002', + code = 3002, ) """ diff --git a/test/test_asset_forbidden_error_response.py b/test/test_asset_forbidden_error_response.py index 4d40d240..9c022e00 100644 --- a/test/test_asset_forbidden_error_response.py +++ b/test/test_asset_forbidden_error_response.py @@ -38,12 +38,12 @@ def make_instance(self, include_optional) -> AssetForbiddenErrorResponse: if include_optional: return AssetForbiddenErrorResponse( message = 'Asset creation quota reached', - code = '3006' + code = 3006 ) else: return AssetForbiddenErrorResponse( message = 'Asset creation quota reached', - code = '3006', + code = 3006, ) """ diff --git a/test/test_asset_internal_server_error_response.py b/test/test_asset_internal_server_error_response.py index 7ea3ed94..866fafcc 100644 --- a/test/test_asset_internal_server_error_response.py +++ b/test/test_asset_internal_server_error_response.py @@ -40,12 +40,12 @@ def make_instance(self, include_optional) -> AssetInternalServerErrorResponse: if include_optional: return AssetInternalServerErrorResponse( message = 'Internal server error', - code = '3005' + code = 3005 ) else: return AssetInternalServerErrorResponse( message = 'Internal server error', - code = '3005', + code = 3005, ) """ diff --git a/test/test_asset_media.py b/test/test_asset_media.py new file mode 100644 index 00000000..4dd43f68 --- /dev/null +++ b/test/test_asset_media.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.asset_media import AssetMedia + + +class TestAssetMedia(unittest.TestCase): + """AssetMedia unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetMedia: + """Test AssetMedia + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AssetMedia` + """ + model = AssetMedia() + if include_optional: + return AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + attributes = fireblocks.models.asset_media_attributes.AssetMedia_attributes( + monochrome = True, ) + ) + else: + return AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + ) + """ + + def testAssetMedia(self): + """Test AssetMedia""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_execute_action_response.py b/test/test_asset_media_attributes.py similarity index 56% rename from test/test_execute_action_response.py rename to test/test_asset_media_attributes.py index b3c77ce2..6ab13dbf 100644 --- a/test/test_execute_action_response.py +++ b/test/test_asset_media_attributes.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.execute_action_response import ExecuteActionResponse +from fireblocks.models.asset_media_attributes import AssetMediaAttributes -class TestExecuteActionResponse(unittest.TestCase): - """ExecuteActionResponse unit test stubs""" +class TestAssetMediaAttributes(unittest.TestCase): + """AssetMediaAttributes unit test stubs""" def setUp(self): pass @@ -27,26 +27,25 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ExecuteActionResponse: - """Test ExecuteActionResponse + def make_instance(self, include_optional) -> AssetMediaAttributes: + """Test AssetMediaAttributes include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ExecuteActionResponse` + # uncomment below to create an instance of `AssetMediaAttributes` """ - model = ExecuteActionResponse() + model = AssetMediaAttributes() if include_optional: - return ExecuteActionResponse( - id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d' + return AssetMediaAttributes( + monochrome = True ) else: - return ExecuteActionResponse( - id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d', + return AssetMediaAttributes( ) """ - def testExecuteActionResponse(self): - """Test ExecuteActionResponse""" + def testAssetMediaAttributes(self): + """Test AssetMediaAttributes""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_asset_response_metadata.py b/test/test_asset_metadata.py similarity index 64% rename from test/test_asset_response_metadata.py rename to test/test_asset_metadata.py index ad841b63..718f1377 100644 --- a/test/test_asset_response_metadata.py +++ b/test/test_asset_metadata.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.asset_response_metadata import AssetResponseMetadata +from fireblocks.models.asset_metadata import AssetMetadata -class TestAssetResponseMetadata(unittest.TestCase): - """AssetResponseMetadata unit test stubs""" +class TestAssetMetadata(unittest.TestCase): + """AssetMetadata unit test stubs""" def setUp(self): pass @@ -27,28 +27,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> AssetResponseMetadata: - """Test AssetResponseMetadata + def make_instance(self, include_optional) -> AssetMetadata: + """Test AssetMetadata include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `AssetResponseMetadata` + # uncomment below to create an instance of `AssetMetadata` """ - model = AssetResponseMetadata() + model = AssetMetadata() if include_optional: - return AssetResponseMetadata( + return AssetMetadata( scope = 'Global', deprecated = False ) else: - return AssetResponseMetadata( + return AssetMetadata( scope = 'Global', deprecated = False, ) """ - def testAssetResponseMetadata(self): - """Test AssetResponseMetadata""" + def testAssetMetadata(self): + """Test AssetMetadata""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_asset_metadata_beta.py b/test/test_asset_metadata_beta.py new file mode 100644 index 00000000..7a55770a --- /dev/null +++ b/test/test_asset_metadata_beta.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.asset_metadata_beta import AssetMetadataBeta + + +class TestAssetMetadataBeta(unittest.TestCase): + """AssetMetadataBeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetMetadataBeta: + """Test AssetMetadataBeta + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AssetMetadataBeta` + """ + model = AssetMetadataBeta() + if include_optional: + return AssetMetadataBeta( + scope = 'Global', + deprecated = False, + deprecation_referral_id = '056776ab-9efa-4219-9820-9ece0cc4d90d', + verified = True, + website = 'https://example.org', + media = [ + fireblocks.models.asset_media.AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + attributes = fireblocks.models.asset_media_attributes.AssetMedia_attributes( + monochrome = True, ), ) + ] + ) + else: + return AssetMetadataBeta( + scope = 'Global', + deprecated = False, + verified = True, + ) + """ + + def testAssetMetadataBeta(self): + """Test AssetMetadataBeta""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_asset_not_found_error_response.py b/test/test_asset_not_found_error_response.py index a60dd6e4..0ce37c15 100644 --- a/test/test_asset_not_found_error_response.py +++ b/test/test_asset_not_found_error_response.py @@ -37,13 +37,13 @@ def make_instance(self, include_optional) -> AssetNotFoundErrorResponse: model = AssetNotFoundErrorResponse() if include_optional: return AssetNotFoundErrorResponse( - message = 'Invalid address, could not get asset information', - code = '3009' + message = 'Asset with specified ID not found', + code = 1504 ) else: return AssetNotFoundErrorResponse( - message = 'Invalid address, could not get asset information', - code = '3009', + message = 'Asset with specified ID not found', + code = 1504, ) """ diff --git a/test/test_asset_response_onchain.py b/test/test_asset_onchain.py similarity index 68% rename from test/test_asset_response_onchain.py rename to test/test_asset_onchain.py index 066ef957..14100311 100644 --- a/test/test_asset_response_onchain.py +++ b/test/test_asset_onchain.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.asset_response_onchain import AssetResponseOnchain +from fireblocks.models.asset_onchain import AssetOnchain -class TestAssetResponseOnchain(unittest.TestCase): - """AssetResponseOnchain unit test stubs""" +class TestAssetOnchain(unittest.TestCase): + """AssetOnchain unit test stubs""" def setUp(self): pass @@ -27,16 +27,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> AssetResponseOnchain: - """Test AssetResponseOnchain + def make_instance(self, include_optional) -> AssetOnchain: + """Test AssetOnchain include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `AssetResponseOnchain` + # uncomment below to create an instance of `AssetOnchain` """ - model = AssetResponseOnchain() + model = AssetOnchain() if include_optional: - return AssetResponseOnchain( + return AssetOnchain( symbol = 'TST3', name = 'Test 3', address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', @@ -44,15 +44,15 @@ def make_instance(self, include_optional) -> AssetResponseOnchain: standard = 'ERC20' ) else: - return AssetResponseOnchain( + return AssetOnchain( symbol = 'TST3', name = 'Test 3', decimals = 18, ) """ - def testAssetResponseOnchain(self): - """Test AssetResponseOnchain""" + def testAssetOnchain(self): + """Test AssetOnchain""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_asset_onchain_beta.py b/test/test_asset_onchain_beta.py new file mode 100644 index 00000000..314bbfa2 --- /dev/null +++ b/test/test_asset_onchain_beta.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.asset_onchain_beta import AssetOnchainBeta + + +class TestAssetOnchainBeta(unittest.TestCase): + """AssetOnchainBeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetOnchainBeta: + """Test AssetOnchainBeta + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AssetOnchainBeta` + """ + model = AssetOnchainBeta() + if include_optional: + return AssetOnchainBeta( + symbol = 'TST3', + name = 'Test 3', + address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', + decimals = 18, + standards = ["ERC20"] + ) + else: + return AssetOnchainBeta( + symbol = 'TST3', + name = 'Test 3', + decimals = 18, + ) + """ + + def testAssetOnchainBeta(self): + """Test AssetOnchainBeta""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_asset_price_forbidden_error_response.py b/test/test_asset_price_forbidden_error_response.py index f7f4e4e5..4968fbaf 100644 --- a/test/test_asset_price_forbidden_error_response.py +++ b/test/test_asset_price_forbidden_error_response.py @@ -40,12 +40,12 @@ def make_instance(self, include_optional) -> AssetPriceForbiddenErrorResponse: if include_optional: return AssetPriceForbiddenErrorResponse( message = 'Tenant is not allowed to update asset', - code = '3002' + code = 3002 ) else: return AssetPriceForbiddenErrorResponse( message = 'Tenant is not allowed to update asset', - code = '3002', + code = 3002, ) """ diff --git a/test/test_asset_price_not_found_error_response.py b/test/test_asset_price_not_found_error_response.py index bbcc442e..dbf92b95 100644 --- a/test/test_asset_price_not_found_error_response.py +++ b/test/test_asset_price_not_found_error_response.py @@ -40,12 +40,12 @@ def make_instance(self, include_optional) -> AssetPriceNotFoundErrorResponse: if include_optional: return AssetPriceNotFoundErrorResponse( message = 'Currency not found', - code = '3001' + code = 3001 ) else: return AssetPriceNotFoundErrorResponse( message = 'Currency not found', - code = '3001', + code = 3001, ) """ diff --git a/test/test_asset_response.py b/test/test_asset_response.py index 263c6fa9..5f040063 100644 --- a/test/test_asset_response.py +++ b/test/test_asset_response.py @@ -39,13 +39,13 @@ def make_instance(self, include_optional) -> AssetResponse: return AssetResponse( legacy_id = 'TST3_ETH', asset_class = 'FT', - onchain = fireblocks.models.asset_response_onchain.AssetResponse_onchain( + onchain = fireblocks.models.asset_onchain.AssetOnchain( symbol = 'TST3', name = 'Test 3', address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', decimals = 18, standard = 'ERC20', ), - metadata = fireblocks.models.asset_response_metadata.AssetResponse_metadata( + metadata = fireblocks.models.asset_metadata.AssetMetadata( scope = 'Global', deprecated = False, ) ) @@ -53,13 +53,13 @@ def make_instance(self, include_optional) -> AssetResponse: return AssetResponse( legacy_id = 'TST3_ETH', asset_class = 'FT', - onchain = fireblocks.models.asset_response_onchain.AssetResponse_onchain( + onchain = fireblocks.models.asset_onchain.AssetOnchain( symbol = 'TST3', name = 'Test 3', address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', decimals = 18, standard = 'ERC20', ), - metadata = fireblocks.models.asset_response_metadata.AssetResponse_metadata( + metadata = fireblocks.models.asset_metadata.AssetMetadata( scope = 'Global', deprecated = False, ), ) diff --git a/test/test_asset_response_beta.py b/test/test_asset_response_beta.py new file mode 100644 index 00000000..f3e83252 --- /dev/null +++ b/test/test_asset_response_beta.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.asset_response_beta import AssetResponseBeta + + +class TestAssetResponseBeta(unittest.TestCase): + """AssetResponseBeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AssetResponseBeta: + """Test AssetResponseBeta + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `AssetResponseBeta` + """ + model = AssetResponseBeta() + if include_optional: + return AssetResponseBeta( + id = '9f9f7062-df90-4fc0-8697-96685184358d', + legacy_id = 'TST3', + blockchain_id = 'e85208ff-3b15-44e9-af14-0ed0280b2a15', + display_name = 'Test 3', + display_symbol = 'TST3', + asset_class = 'FT', + onchain = fireblocks.models.asset_onchain_beta.AssetOnchainBeta( + symbol = 'TST3', + name = 'Test 3', + address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', + decimals = 18, + standards = ["ERC20"], ), + metadata = fireblocks.models.asset_metadata_beta.AssetMetadataBeta( + scope = 'Global', + deprecated = False, + deprecation_referral_id = '056776ab-9efa-4219-9820-9ece0cc4d90d', + verified = True, + website = 'https://example.org', + media = [ + fireblocks.models.asset_media.AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + attributes = fireblocks.models.asset_media_attributes.AssetMedia_attributes( + monochrome = True, ), ) + ], ) + ) + else: + return AssetResponseBeta( + id = '9f9f7062-df90-4fc0-8697-96685184358d', + legacy_id = 'TST3', + asset_class = 'FT', + metadata = fireblocks.models.asset_metadata_beta.AssetMetadataBeta( + scope = 'Global', + deprecated = False, + deprecation_referral_id = '056776ab-9efa-4219-9820-9ece0cc4d90d', + verified = True, + website = 'https://example.org', + media = [ + fireblocks.models.asset_media.AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + attributes = fireblocks.models.asset_media_attributes.AssetMedia_attributes( + monochrome = True, ), ) + ], ), + ) + """ + + def testAssetResponseBeta(self): + """Test AssetResponseBeta""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchain_explorer.py b/test/test_blockchain_explorer.py new file mode 100644 index 00000000..0ebb7f08 --- /dev/null +++ b/test/test_blockchain_explorer.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.blockchain_explorer import BlockchainExplorer + + +class TestBlockchainExplorer(unittest.TestCase): + """BlockchainExplorer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockchainExplorer: + """Test BlockchainExplorer + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BlockchainExplorer` + """ + model = BlockchainExplorer() + if include_optional: + return BlockchainExplorer( + base = 'https://example.com', + address = 'https://example.com/address/{address}', + tx = 'https://example.com/tx/{tx}', + token = 'https://example.com/nft/{contract}/{tokenId}' + ) + else: + return BlockchainExplorer( + base = 'https://example.com', + ) + """ + + def testBlockchainExplorer(self): + """Test BlockchainExplorer""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchain_media.py b/test/test_blockchain_media.py new file mode 100644 index 00000000..5fb6cb53 --- /dev/null +++ b/test/test_blockchain_media.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.blockchain_media import BlockchainMedia + + +class TestBlockchainMedia(unittest.TestCase): + """BlockchainMedia unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockchainMedia: + """Test BlockchainMedia + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BlockchainMedia` + """ + model = BlockchainMedia() + if include_optional: + return BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml' + ) + else: + return BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + ) + """ + + def testBlockchainMedia(self): + """Test BlockchainMedia""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchain_metadata.py b/test/test_blockchain_metadata.py new file mode 100644 index 00000000..e17b22db --- /dev/null +++ b/test/test_blockchain_metadata.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.blockchain_metadata import BlockchainMetadata + + +class TestBlockchainMetadata(unittest.TestCase): + """BlockchainMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockchainMetadata: + """Test BlockchainMetadata + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BlockchainMetadata` + """ + model = BlockchainMetadata() + if include_optional: + return BlockchainMetadata( + scope = 'Global', + deprecated = False, + media = [ + fireblocks.models.blockchain_media.BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', ) + ], + explorer = fireblocks.models.blockchain_explorer.BlockchainExplorer( + base = 'https://example.com', + address = 'https://example.com/address/{address}', + tx = 'https://example.com/tx/{tx}', + token = 'https://example.com/nft/{contract}/{tokenId}', ) + ) + else: + return BlockchainMetadata( + scope = 'Global', + deprecated = False, + ) + """ + + def testBlockchainMetadata(self): + """Test BlockchainMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchain_not_found_error_response.py b/test/test_blockchain_not_found_error_response.py new file mode 100644 index 00000000..dd2c604a --- /dev/null +++ b/test/test_blockchain_not_found_error_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.blockchain_not_found_error_response import ( + BlockchainNotFoundErrorResponse, +) + + +class TestBlockchainNotFoundErrorResponse(unittest.TestCase): + """BlockchainNotFoundErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockchainNotFoundErrorResponse: + """Test BlockchainNotFoundErrorResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BlockchainNotFoundErrorResponse` + """ + model = BlockchainNotFoundErrorResponse() + if include_optional: + return BlockchainNotFoundErrorResponse( + message = 'Blockchain with specified ID not found', + code = 1505 + ) + else: + return BlockchainNotFoundErrorResponse( + message = 'Blockchain with specified ID not found', + code = 1505, + ) + """ + + def testBlockchainNotFoundErrorResponse(self): + """Test BlockchainNotFoundErrorResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchain_onchain.py b/test/test_blockchain_onchain.py new file mode 100644 index 00000000..3f489585 --- /dev/null +++ b/test/test_blockchain_onchain.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.blockchain_onchain import BlockchainOnchain + + +class TestBlockchainOnchain(unittest.TestCase): + """BlockchainOnchain unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockchainOnchain: + """Test BlockchainOnchain + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BlockchainOnchain` + """ + model = BlockchainOnchain() + if include_optional: + return BlockchainOnchain( + protocol = 'EVM', + chain_id = '1', + test = False, + signing_algo = 'ECDSA_SECP256K1' + ) + else: + return BlockchainOnchain( + protocol = 'EVM', + test = False, + signing_algo = 'ECDSA_SECP256K1', + ) + """ + + def testBlockchainOnchain(self): + """Test BlockchainOnchain""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchain_response.py b/test/test_blockchain_response.py new file mode 100644 index 00000000..7fe40fa3 --- /dev/null +++ b/test/test_blockchain_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.blockchain_response import BlockchainResponse + + +class TestBlockchainResponse(unittest.TestCase): + """BlockchainResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BlockchainResponse: + """Test BlockchainResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `BlockchainResponse` + """ + model = BlockchainResponse() + if include_optional: + return BlockchainResponse( + id = '9f9f7062-df90-4fc0-8697-96685184357b', + legacy_id = 'TST3', + display_name = 'Test 3', + native_asset_id = '9f9f7062-df90-4fc0-8697-96685184356a', + onchain = fireblocks.models.blockchain_onchain.BlockchainOnchain( + protocol = 'EVM', + chain_id = '1', + test = False, + signing_algo = 'ECDSA_SECP256K1', ), + metadata = fireblocks.models.blockchain_metadata.BlockchainMetadata( + scope = 'Global', + deprecated = False, + media = [ + fireblocks.models.blockchain_media.BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', ) + ], + explorer = fireblocks.models.blockchain_explorer.BlockchainExplorer( + base = 'https://example.com', + address = 'https://example.com/address/{address}', + tx = 'https://example.com/tx/{tx}', + token = 'https://example.com/nft/{contract}/{tokenId}', ), ) + ) + else: + return BlockchainResponse( + id = '9f9f7062-df90-4fc0-8697-96685184357b', + legacy_id = 'TST3', + display_name = 'Test 3', + native_asset_id = '9f9f7062-df90-4fc0-8697-96685184356a', + onchain = fireblocks.models.blockchain_onchain.BlockchainOnchain( + protocol = 'EVM', + chain_id = '1', + test = False, + signing_algo = 'ECDSA_SECP256K1', ), + metadata = fireblocks.models.blockchain_metadata.BlockchainMetadata( + scope = 'Global', + deprecated = False, + media = [ + fireblocks.models.blockchain_media.BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', ) + ], + explorer = fireblocks.models.blockchain_explorer.BlockchainExplorer( + base = 'https://example.com', + address = 'https://example.com/address/{address}', + tx = 'https://example.com/tx/{tx}', + token = 'https://example.com/nft/{contract}/{tokenId}', ), ), + ) + """ + + def testBlockchainResponse(self): + """Test BlockchainResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_blockchains_assets_beta_api.py b/test/test_blockchains_assets_beta_api.py new file mode 100644 index 00000000..a6022bc6 --- /dev/null +++ b/test/test_blockchains_assets_beta_api.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.api.blockchains_assets_beta_api import BlockchainsAssetsBetaApi + + +class TestBlockchainsAssetsBetaApi(unittest.TestCase): + """BlockchainsAssetsBetaApi unit test stubs""" + + def setUp(self) -> None: + self.api = BlockchainsAssetsBetaApi() + + def tearDown(self) -> None: + pass + + def test_get_asset_by_id(self) -> None: + """Test case for get_asset_by_id + + Get an asset + """ + pass + + def test_get_blockchain_by_id(self) -> None: + """Test case for get_blockchain_by_id + + Get an blockchain + """ + pass + + def test_list_assets(self) -> None: + """Test case for list_assets + + List assets + """ + pass + + def test_list_blockchains(self) -> None: + """Test case for list_blockchains + + List blockchains + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_callback_handler.py b/test/test_callback_handler.py new file mode 100644 index 00000000..45ebe6ae --- /dev/null +++ b/test/test_callback_handler.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.callback_handler import CallbackHandler + + +class TestCallbackHandler(unittest.TestCase): + """CallbackHandler unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CallbackHandler: + """Test CallbackHandler + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `CallbackHandler` + """ + model = CallbackHandler() + if include_optional: + return CallbackHandler( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ... +-----END PUBLIC KEY-----', + cert_public_key_hash = '' + ) + else: + return CallbackHandler( + url = 'https://example.com/callback-handler', + ) + """ + + def testCallbackHandler(self): + """Test CallbackHandler""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_callback_handler_request.py b/test/test_callback_handler_request.py new file mode 100644 index 00000000..77890478 --- /dev/null +++ b/test/test_callback_handler_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.callback_handler_request import CallbackHandlerRequest + + +class TestCallbackHandlerRequest(unittest.TestCase): + """CallbackHandlerRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CallbackHandlerRequest: + """Test CallbackHandlerRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `CallbackHandlerRequest` + """ + model = CallbackHandlerRequest() + if include_optional: + return CallbackHandlerRequest( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ...-----END PUBLIC KEY-----', + cert = '-----BEGIN CERTIFICATE----- +... truncated ... +-----END CERTIFICATE-----' + ) + else: + return CallbackHandlerRequest( + url = 'https://example.com/callback-handler', + ) + """ + + def testCallbackHandlerRequest(self): + """Test CallbackHandlerRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_chain_descriptor.py b/test/test_chain_descriptor.py new file mode 100644 index 00000000..faff7c34 --- /dev/null +++ b/test/test_chain_descriptor.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.chain_descriptor import ChainDescriptor + + +class TestChainDescriptor(unittest.TestCase): + """ChainDescriptor unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testChainDescriptor(self): + """Test ChainDescriptor""" + # inst = ChainDescriptor() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_chain_info_response_dto.py b/test/test_chain_info_response.py similarity index 78% rename from test/test_chain_info_response_dto.py rename to test/test_chain_info_response.py index 95395c74..ff25335c 100644 --- a/test/test_chain_info_response_dto.py +++ b/test/test_chain_info_response.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.chain_info_response_dto import ChainInfoResponseDto +from fireblocks.models.chain_info_response import ChainInfoResponse -class TestChainInfoResponseDto(unittest.TestCase): - """ChainInfoResponseDto unit test stubs""" +class TestChainInfoResponse(unittest.TestCase): + """ChainInfoResponse unit test stubs""" def setUp(self): pass @@ -27,40 +27,40 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ChainInfoResponseDto: - """Test ChainInfoResponseDto + def make_instance(self, include_optional) -> ChainInfoResponse: + """Test ChainInfoResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ChainInfoResponseDto` + # uncomment below to create an instance of `ChainInfoResponse` """ - model = ChainInfoResponseDto() + model = ChainInfoResponse() if include_optional: - return ChainInfoResponseDto( + return ChainInfoResponse( chain_descriptor = 'SOL', current_epoch = 483, epoch_elapsed = 0.31, epoch_duration = 172800000, - additional_info = fireblocks.models.additional_info_dto.AdditionalInfoDto( + additional_info = fireblocks.models.additional_info.AdditionalInfo( estimated_annual_reward = 6.48, lockup_period = 172800000, activation_period = 172800000, ) ) else: - return ChainInfoResponseDto( + return ChainInfoResponse( chain_descriptor = 'SOL', current_epoch = 483, epoch_elapsed = 0.31, epoch_duration = 172800000, - additional_info = fireblocks.models.additional_info_dto.AdditionalInfoDto( + additional_info = fireblocks.models.additional_info.AdditionalInfo( estimated_annual_reward = 6.48, lockup_period = 172800000, activation_period = 172800000, ), ) """ - def testChainInfoResponseDto(self): - """Test ChainInfoResponseDto""" + def testChainInfoResponse(self): + """Test ChainInfoResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_execute_action_request.py b/test/test_claim_rewards_request.py similarity index 54% rename from test/test_execute_action_request.py rename to test/test_claim_rewards_request.py index 1fb74e6c..30e9a4f3 100644 --- a/test/test_execute_action_request.py +++ b/test/test_claim_rewards_request.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.execute_action_request import ExecuteActionRequest +from fireblocks.models.claim_rewards_request import ClaimRewardsRequest -class TestExecuteActionRequest(unittest.TestCase): - """ExecuteActionRequest unit test stubs""" +class TestClaimRewardsRequest(unittest.TestCase): + """ClaimRewardsRequest unit test stubs""" def setUp(self): pass @@ -27,36 +27,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ExecuteActionRequest: - """Test ExecuteActionRequest + def make_instance(self, include_optional) -> ClaimRewardsRequest: + """Test ClaimRewardsRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ExecuteActionRequest` + # uncomment below to create an instance of `ClaimRewardsRequest` """ - model = ExecuteActionRequest() + model = ClaimRewardsRequest() if include_optional: - return ExecuteActionRequest( - vault_account_id = '22', - provider_id = 'kiln', - stake_amount = '32', - tx_note = 'withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH', + return ClaimRewardsRequest( + id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', fee = '7', fee_level = 'MEDIUM', - id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', - amount = '75' + tx_note = 'claim rewards request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #MATIC' ) else: - return ExecuteActionRequest( - vault_account_id = '22', - provider_id = 'kiln', - stake_amount = '32', + return ClaimRewardsRequest( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', ) """ - def testExecuteActionRequest(self): - """Test ExecuteActionRequest""" + def testClaimRewardsRequest(self): + """Test ClaimRewardsRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_compliance_api.py b/test/test_compliance_api.py index ddc91c6e..7e76348e 100644 --- a/test/test_compliance_api.py +++ b/test/test_compliance_api.py @@ -55,6 +55,13 @@ def test_get_screening_policy(self) -> None: """ pass + def test_retry_rejected_transaction_bypass_screening_checks(self) -> None: + """Test case for retry_rejected_transaction_bypass_screening_checks + + Calling the \"Bypass Screening Policy\" API endpoint triggers a new transaction, with the API user as the initiator, bypassing the screening policy check + """ + pass + def test_update_aml_screening_configuration(self) -> None: """Test case for update_aml_screening_configuration diff --git a/test/test_cosigner.py b/test/test_cosigner.py index 5e3b1fa6..83b1e5d2 100644 --- a/test/test_cosigner.py +++ b/test/test_cosigner.py @@ -39,7 +39,10 @@ def make_instance(self, include_optional) -> Cosigner: return Cosigner( archived = False, id = '44fcead0-7053-4831-a53a-df7fb90d440f', - name = 'My Cosigner 1' + name = 'My Cosigner 1', + type = 'SGX', + version = fireblocks.models.version.Version( + hash = 'a1b2c3d4', ) ) else: return Cosigner( diff --git a/test/test_cosigners_beta_api.py b/test/test_cosigners_beta_api.py index 5d5cf745..b3fbb211 100644 --- a/test/test_cosigners_beta_api.py +++ b/test/test_cosigners_beta_api.py @@ -27,6 +27,13 @@ def setUp(self) -> None: def tearDown(self) -> None: pass + def test_add_cosigner(self) -> None: + """Test case for add_cosigner + + Add cosigner + """ + pass + def test_get_api_key(self) -> None: """Test case for get_api_key @@ -55,6 +62,20 @@ def test_get_cosigners(self) -> None: """ pass + def test_get_request_status(self) -> None: + """Test case for get_request_status + + Get request status + """ + pass + + def test_pair_api_key(self) -> None: + """Test case for pair_api_key + + Pair API key + """ + pass + def test_rename_cosigner(self) -> None: """Test case for rename_cosigner @@ -62,6 +83,20 @@ def test_rename_cosigner(self) -> None: """ pass + def test_unpair_api_key(self) -> None: + """Test case for unpair_api_key + + Unpair API key + """ + pass + + def test_update_callback_handler(self) -> None: + """Test case for update_callback_handler + + Update API key callback handler + """ + pass + if __name__ == "__main__": unittest.main() diff --git a/test/test_cosigners_paginated_response.py b/test/test_cosigners_paginated_response.py index 64c79f05..3a34d83a 100644 --- a/test/test_cosigners_paginated_response.py +++ b/test/test_cosigners_paginated_response.py @@ -41,7 +41,10 @@ def make_instance(self, include_optional) -> CosignersPaginatedResponse: fireblocks.models.cosigner.Cosigner( archived = False, id = '44fcead0-7053-4831-a53a-df7fb90d440f', - name = 'My Cosigner 1', ) + name = 'My Cosigner 1', + type = 'SGX', + version = fireblocks.models.version.Version( + hash = 'a1b2c3d4', ), ) ], next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' ) @@ -51,7 +54,10 @@ def make_instance(self, include_optional) -> CosignersPaginatedResponse: fireblocks.models.cosigner.Cosigner( archived = False, id = '44fcead0-7053-4831-a53a-df7fb90d440f', - name = 'My Cosigner 1', ) + name = 'My Cosigner 1', + type = 'SGX', + version = fireblocks.models.version.Version( + hash = 'a1b2c3d4', ), ) ], ) """ diff --git a/test/test_create_webhook_request.py b/test/test_create_webhook_request.py new file mode 100644 index 00000000..b5a148d6 --- /dev/null +++ b/test/test_create_webhook_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.create_webhook_request import CreateWebhookRequest + + +class TestCreateWebhookRequest(unittest.TestCase): + """CreateWebhookRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateWebhookRequest: + """Test CreateWebhookRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `CreateWebhookRequest` + """ + model = CreateWebhookRequest() + if include_optional: + return CreateWebhookRequest( + url = 'https://example.com/webhook', + description = 'This webhook is used for transactions notifications', + events = ["transaction.created","transaction.status.updated"], + enabled = False + ) + else: + return CreateWebhookRequest( + url = 'https://example.com/webhook', + description = 'This webhook is used for transactions notifications', + events = ["transaction.created","transaction.status.updated"], + ) + """ + + def testCreateWebhookRequest(self): + """Test CreateWebhookRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_delegation_dto.py b/test/test_delegation.py similarity index 75% rename from test/test_delegation_dto.py rename to test/test_delegation.py index 4c4c6052..0e73fd9f 100644 --- a/test/test_delegation_dto.py +++ b/test/test_delegation.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.delegation_dto import DelegationDto +from fireblocks.models.delegation import Delegation -class TestDelegationDto(unittest.TestCase): - """DelegationDto unit test stubs""" +class TestDelegation(unittest.TestCase): + """Delegation unit test stubs""" def setUp(self): pass @@ -27,16 +27,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> DelegationDto: - """Test DelegationDto + def make_instance(self, include_optional) -> Delegation: + """Test Delegation include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `DelegationDto` + # uncomment below to create an instance of `Delegation` """ - model = DelegationDto() + model = Delegation() if include_optional: - return DelegationDto( + return Delegation( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850a', vault_account_id = '2', validator_name = 'FwR3P......tT59f', @@ -53,12 +53,11 @@ def make_instance(self, include_optional) -> DelegationDto: available_actions = ["unstake"], in_progress = True, in_progress_tx_id = 'c80601f4-d7b1-4795-a8ee-b09cdb5b450c', - blockchain_position_info = fireblocks.models.solana_blockchain_data_dto.SolanaBlockchainDataDto( - stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq', ), + blockchain_position_info = {"stakeAccountAddress":"3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq"}, related_requests = [{"status":"deactivating","inProgress":false,"amount":"0.05","txId":"c80601f4-d7b1-4795-a8ee-b09cdb5b450c"}] ) else: - return DelegationDto( + return Delegation( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850a', vault_account_id = '2', validator_name = 'FwR3P......tT59f', @@ -67,19 +66,19 @@ def make_instance(self, include_optional) -> DelegationDto: amount = '0.05', rewards_amount = '0.000856038', date_created = '2023-07-13T15:55:34.256Z', + date_updated = '2023-07-13T15:55:34.256Z', status = 'active', related_transactions = [{"txId":"b70601f4-d7b1-4795-a8ee-b09cdb4r850d","completed":true},{"txId":"c80601f4-d7b1-4795-a8ee-b09cdb5b450c","completed":false}], validator_address = 'FwR3PbjS5iyqzLiLugrBqKSa5EKZ4vK9SKs7eQXtT59f', provider_id = 'kiln', available_actions = ["unstake"], in_progress = True, - blockchain_position_info = fireblocks.models.solana_blockchain_data_dto.SolanaBlockchainDataDto( - stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq', ), + blockchain_position_info = {"stakeAccountAddress":"3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq"}, ) """ - def testDelegationDto(self): - """Test DelegationDto""" + def testDelegation(self): + """Test Delegation""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_delegation_summary_dto.py b/test/test_delegation_summary.py similarity index 87% rename from test/test_delegation_summary_dto.py rename to test/test_delegation_summary.py index 6e609b5d..0267556d 100644 --- a/test/test_delegation_summary_dto.py +++ b/test/test_delegation_summary.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.delegation_summary_dto import DelegationSummaryDto +from fireblocks.models.delegation_summary import DelegationSummary -class TestDelegationSummaryDto(unittest.TestCase): - """DelegationSummaryDto unit test stubs""" +class TestDelegationSummary(unittest.TestCase): + """DelegationSummary unit test stubs""" def setUp(self): pass @@ -27,16 +27,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> DelegationSummaryDto: - """Test DelegationSummaryDto + def make_instance(self, include_optional) -> DelegationSummary: + """Test DelegationSummary include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `DelegationSummaryDto` + # uncomment below to create an instance of `DelegationSummary` """ - model = DelegationSummaryDto() + model = DelegationSummary() if include_optional: - return DelegationSummaryDto( + return DelegationSummary( active = [ fireblocks.models.amount_and_chain_descriptor.AmountAndChainDescriptor( chain_descriptor = 'ETH', @@ -59,7 +59,7 @@ def make_instance(self, include_optional) -> DelegationSummaryDto: ] ) else: - return DelegationSummaryDto( + return DelegationSummary( active = [ fireblocks.models.amount_and_chain_descriptor.AmountAndChainDescriptor( chain_descriptor = 'ETH', @@ -83,8 +83,8 @@ def make_instance(self, include_optional) -> DelegationSummaryDto: ) """ - def testDelegationSummaryDto(self): - """Test DelegationSummaryDto""" + def testDelegationSummary(self): + """Test DelegationSummary""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_embedded_wallets_api.py b/test/test_embedded_wallets_api.py new file mode 100644 index 00000000..84fbc040 --- /dev/null +++ b/test/test_embedded_wallets_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.api.embedded_wallets_api import EmbeddedWalletsApi + + +class TestEmbeddedWalletsApi(unittest.TestCase): + """EmbeddedWalletsApi unit test stubs""" + + def setUp(self) -> None: + self.api = EmbeddedWalletsApi() + + def tearDown(self) -> None: + pass + + def test_get_public_key_info_for_address_ncw(self) -> None: + """Test case for get_public_key_info_for_address_ncw + + Get the public key of an asset + """ + pass + + def test_get_public_key_info_ncw(self) -> None: + """Test case for get_public_key_info_ncw + + Get the public key for a derivation path + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_fee_level.py b/test/test_fee_level.py new file mode 100644 index 00000000..476c83d3 --- /dev/null +++ b/test/test_fee_level.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.fee_level import FeeLevel + + +class TestFeeLevel(unittest.TestCase): + """FeeLevel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFeeLevel(self): + """Test FeeLevel""" + # inst = FeeLevel() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_get_mpc_keys_response.py b/test/test_get_mpc_keys_response.py new file mode 100644 index 00000000..c96f185f --- /dev/null +++ b/test/test_get_mpc_keys_response.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.get_mpc_keys_response import GetMpcKeysResponse + + +class TestGetMpcKeysResponse(unittest.TestCase): + """GetMpcKeysResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetMpcKeysResponse: + """Test GetMpcKeysResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `GetMpcKeysResponse` + """ + model = GetMpcKeysResponse() + if include_optional: + return GetMpcKeysResponse( + tenant_id = 'bdb57751-921d-45d5-99fd-344cffb364f6', + keys = [ + fireblocks.models.mpc_key.MpcKey( + key_id = '743f82cf-b526-4148-afb1-cd71f1dfee10', + user_id = 'da084d02-d446-413e-b4ce-1e3256517dfd', + algorithm = 201, + players = [ + fireblocks.models.players.Players( + id = '47d3383e-37a3-43d5-90a4-de0ca8c5e258', + type = 'MOBILE', ) + ], + last_preprocessed_index = 6, ) + ] + ) + else: + return GetMpcKeysResponse( + tenant_id = 'bdb57751-921d-45d5-99fd-344cffb364f6', + keys = [ + fireblocks.models.mpc_key.MpcKey( + key_id = '743f82cf-b526-4148-afb1-cd71f1dfee10', + user_id = 'da084d02-d446-413e-b4ce-1e3256517dfd', + algorithm = 201, + players = [ + fireblocks.models.players.Players( + id = '47d3383e-37a3-43d5-90a4-de0ca8c5e258', + type = 'MOBILE', ) + ], + last_preprocessed_index = 6, ) + ], + ) + """ + + def testGetMpcKeysResponse(self): + """Test GetMpcKeysResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_keys_beta_api.py b/test/test_keys_beta_api.py new file mode 100644 index 00000000..dc999599 --- /dev/null +++ b/test/test_keys_beta_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.api.keys_beta_api import KeysBetaApi + + +class TestKeysBetaApi(unittest.TestCase): + """KeysBetaApi unit test stubs""" + + def setUp(self) -> None: + self.api = KeysBetaApi() + + def tearDown(self) -> None: + pass + + def test_get_mpc_keys_list(self) -> None: + """Test case for get_mpc_keys_list + + Get list of mpc keys + """ + pass + + def test_get_mpc_keys_list_by_user(self) -> None: + """Test case for get_mpc_keys_list_by_user + + Get list of mpc keys by `userId` + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_list_assets_response.py b/test/test_list_assets_response.py new file mode 100644 index 00000000..3c040138 --- /dev/null +++ b/test/test_list_assets_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.list_assets_response import ListAssetsResponse + + +class TestListAssetsResponse(unittest.TestCase): + """ListAssetsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListAssetsResponse: + """Test ListAssetsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `ListAssetsResponse` + """ + model = ListAssetsResponse() + if include_optional: + return ListAssetsResponse( + data = [ + fireblocks.models.asset_response_beta.AssetResponseBeta( + id = '9f9f7062-df90-4fc0-8697-96685184358d', + legacy_id = 'TST3', + blockchain_id = 'e85208ff-3b15-44e9-af14-0ed0280b2a15', + display_name = 'Test 3', + display_symbol = 'TST3', + asset_class = 'FT', + onchain = fireblocks.models.asset_onchain_beta.AssetOnchainBeta( + symbol = 'TST3', + name = 'Test 3', + address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', + decimals = 18, + standards = ["ERC20"], ), + metadata = fireblocks.models.asset_metadata_beta.AssetMetadataBeta( + scope = 'Global', + deprecated = False, + deprecation_referral_id = '056776ab-9efa-4219-9820-9ece0cc4d90d', + verified = True, + website = 'https://example.org', + media = [ + fireblocks.models.asset_media.AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + attributes = fireblocks.models.asset_media_attributes.AssetMedia_attributes( + monochrome = True, ), ) + ], ), ) + ], + next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' + ) + else: + return ListAssetsResponse( + data = [ + fireblocks.models.asset_response_beta.AssetResponseBeta( + id = '9f9f7062-df90-4fc0-8697-96685184358d', + legacy_id = 'TST3', + blockchain_id = 'e85208ff-3b15-44e9-af14-0ed0280b2a15', + display_name = 'Test 3', + display_symbol = 'TST3', + asset_class = 'FT', + onchain = fireblocks.models.asset_onchain_beta.AssetOnchainBeta( + symbol = 'TST3', + name = 'Test 3', + address = '0xe7A9as1oa38bc4da0248s179E30aa94CcF453991', + decimals = 18, + standards = ["ERC20"], ), + metadata = fireblocks.models.asset_metadata_beta.AssetMetadataBeta( + scope = 'Global', + deprecated = False, + deprecation_referral_id = '056776ab-9efa-4219-9820-9ece0cc4d90d', + verified = True, + website = 'https://example.org', + media = [ + fireblocks.models.asset_media.AssetMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', + attributes = fireblocks.models.asset_media_attributes.AssetMedia_attributes( + monochrome = True, ), ) + ], ), ) + ], + next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9', + ) + """ + + def testListAssetsResponse(self): + """Test ListAssetsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_list_blockchains_response.py b/test/test_list_blockchains_response.py new file mode 100644 index 00000000..614ee399 --- /dev/null +++ b/test/test_list_blockchains_response.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.list_blockchains_response import ListBlockchainsResponse + + +class TestListBlockchainsResponse(unittest.TestCase): + """ListBlockchainsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListBlockchainsResponse: + """Test ListBlockchainsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `ListBlockchainsResponse` + """ + model = ListBlockchainsResponse() + if include_optional: + return ListBlockchainsResponse( + data = [ + fireblocks.models.blockchain_response.BlockchainResponse( + id = '9f9f7062-df90-4fc0-8697-96685184357b', + legacy_id = 'TST3', + display_name = 'Test 3', + native_asset_id = '9f9f7062-df90-4fc0-8697-96685184356a', + onchain = fireblocks.models.blockchain_onchain.BlockchainOnchain( + protocol = 'EVM', + chain_id = '1', + test = False, + signing_algo = 'ECDSA_SECP256K1', ), + metadata = fireblocks.models.blockchain_metadata.BlockchainMetadata( + scope = 'Global', + deprecated = False, + media = [ + fireblocks.models.blockchain_media.BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', ) + ], + explorer = fireblocks.models.blockchain_explorer.BlockchainExplorer( + base = 'https://example.com', + address = 'https://example.com/address/{address}', + tx = 'https://example.com/tx/{tx}', + token = 'https://example.com/nft/{contract}/{tokenId}', ), ), ) + ], + next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' + ) + else: + return ListBlockchainsResponse( + data = [ + fireblocks.models.blockchain_response.BlockchainResponse( + id = '9f9f7062-df90-4fc0-8697-96685184357b', + legacy_id = 'TST3', + display_name = 'Test 3', + native_asset_id = '9f9f7062-df90-4fc0-8697-96685184356a', + onchain = fireblocks.models.blockchain_onchain.BlockchainOnchain( + protocol = 'EVM', + chain_id = '1', + test = False, + signing_algo = 'ECDSA_SECP256K1', ), + metadata = fireblocks.models.blockchain_metadata.BlockchainMetadata( + scope = 'Global', + deprecated = False, + media = [ + fireblocks.models.blockchain_media.BlockchainMedia( + url = 'https://example.com/image.png', + type = 'image/svg+xml', ) + ], + explorer = fireblocks.models.blockchain_explorer.BlockchainExplorer( + base = 'https://example.com', + address = 'https://example.com/address/{address}', + tx = 'https://example.com/tx/{tx}', + token = 'https://example.com/nft/{contract}/{tokenId}', ), ), ) + ], + next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9', + ) + """ + + def testListBlockchainsResponse(self): + """Test ListBlockchainsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_mpc_key.py b/test/test_mpc_key.py new file mode 100644 index 00000000..baf80fb2 --- /dev/null +++ b/test/test_mpc_key.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.mpc_key import MpcKey + + +class TestMpcKey(unittest.TestCase): + """MpcKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MpcKey: + """Test MpcKey + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `MpcKey` + """ + model = MpcKey() + if include_optional: + return MpcKey( + key_id = '743f82cf-b526-4148-afb1-cd71f1dfee10', + user_id = 'da084d02-d446-413e-b4ce-1e3256517dfd', + algorithm = 201, + players = [ + fireblocks.models.players.Players( + id = '47d3383e-37a3-43d5-90a4-de0ca8c5e258', + type = 'MOBILE', ) + ], + last_preprocessed_index = 6 + ) + else: + return MpcKey( + key_id = '743f82cf-b526-4148-afb1-cd71f1dfee10', + user_id = 'da084d02-d446-413e-b4ce-1e3256517dfd', + algorithm = 201, + players = [ + fireblocks.models.players.Players( + id = '47d3383e-37a3-43d5-90a4-de0ca8c5e258', + type = 'MOBILE', ) + ], + ) + """ + + def testMpcKey(self): + """Test MpcKey""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_notification.py b/test/test_notification.py new file mode 100644 index 00000000..588be2d1 --- /dev/null +++ b/test/test_notification.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.notification import Notification + + +class TestNotification(unittest.TestCase): + """Notification unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Notification: + """Test Notification + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `Notification` + """ + model = Notification() + if include_optional: + return Notification( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + created_at = '2021-07-01T00:00Z', + updated_at = '2021-07-01T00:00Z', + status = 'COMPLETED', + event_type = 'transaction.created', + event_version = 1, + resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f', + attempts = [ + '' + ] + ) + else: + return Notification( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + created_at = '2021-07-01T00:00Z', + updated_at = '2021-07-01T00:00Z', + status = 'COMPLETED', + event_type = 'transaction.created', + event_version = 1, + ) + """ + + def testNotification(self): + """Test Notification""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_notification_paginated_response.py b/test/test_notification_paginated_response.py new file mode 100644 index 00000000..3801bbf4 --- /dev/null +++ b/test/test_notification_paginated_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.notification_paginated_response import ( + NotificationPaginatedResponse, +) + + +class TestNotificationPaginatedResponse(unittest.TestCase): + """NotificationPaginatedResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NotificationPaginatedResponse: + """Test NotificationPaginatedResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `NotificationPaginatedResponse` + """ + model = NotificationPaginatedResponse() + if include_optional: + return NotificationPaginatedResponse( + data = [ + fireblocks.models.notification.Notification( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + created_at = '2021-07-01T00:00Z', + updated_at = '2021-07-01T00:00Z', + status = 'COMPLETED', + event_type = 'transaction.created', + event_version = 1, + resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f', + attempts = [ + '' + ], ) + ], + next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' + ) + else: + return NotificationPaginatedResponse( + data = [ + fireblocks.models.notification.Notification( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + created_at = '2021-07-01T00:00Z', + updated_at = '2021-07-01T00:00Z', + status = 'COMPLETED', + event_type = 'transaction.created', + event_version = 1, + resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f', + attempts = [ + '' + ], ) + ], + ) + """ + + def testNotificationPaginatedResponse(self): + """Test NotificationPaginatedResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_notification_status.py b/test/test_notification_status.py new file mode 100644 index 00000000..4e1c9d2a --- /dev/null +++ b/test/test_notification_status.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.notification_status import NotificationStatus + + +class TestNotificationStatus(unittest.TestCase): + """NotificationStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationStatus(self): + """Test NotificationStatus""" + # inst = NotificationStatus() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_notification_with_data.py b/test/test_notification_with_data.py new file mode 100644 index 00000000..ab0d8aca --- /dev/null +++ b/test/test_notification_with_data.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.notification_with_data import NotificationWithData + + +class TestNotificationWithData(unittest.TestCase): + """NotificationWithData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NotificationWithData: + """Test NotificationWithData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `NotificationWithData` + """ + model = NotificationWithData() + if include_optional: + return NotificationWithData( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + created_at = '2021-07-01T00:00Z', + updated_at = '2021-07-01T00:00Z', + status = 'COMPLETED', + event_type = 'transaction.created', + event_version = 1, + resource_id = '44fcead0-7053-4831-a53a-df7fb90d440f', + attempts = [ + '' + ], + data = None + ) + else: + return NotificationWithData( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + created_at = '2021-07-01T00:00Z', + updated_at = '2021-07-01T00:00Z', + status = 'COMPLETED', + event_type = 'transaction.created', + event_version = 1, + attempts = [ + '' + ], + ) + """ + + def testNotificationWithData(self): + """Test NotificationWithData""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_pair_api_key_request.py b/test/test_pair_api_key_request.py new file mode 100644 index 00000000..7a5468ca --- /dev/null +++ b/test/test_pair_api_key_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.pair_api_key_request import PairApiKeyRequest + + +class TestPairApiKeyRequest(unittest.TestCase): + """PairApiKeyRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PairApiKeyRequest: + """Test PairApiKeyRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `PairApiKeyRequest` + """ + model = PairApiKeyRequest() + if include_optional: + return PairApiKeyRequest( + callback_handler = fireblocks.models.callback_handler_request.CallbackHandlerRequest( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ...-----END PUBLIC KEY-----', + cert = '-----BEGIN CERTIFICATE----- +... truncated ... +-----END CERTIFICATE-----', ) + ) + else: + return PairApiKeyRequest( + ) + """ + + def testPairApiKeyRequest(self): + """Test PairApiKeyRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_pair_api_key_response.py b/test/test_pair_api_key_response.py new file mode 100644 index 00000000..f35c27e0 --- /dev/null +++ b/test/test_pair_api_key_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.pair_api_key_response import PairApiKeyResponse + + +class TestPairApiKeyResponse(unittest.TestCase): + """PairApiKeyResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PairApiKeyResponse: + """Test PairApiKeyResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `PairApiKeyResponse` + """ + model = PairApiKeyResponse() + if include_optional: + return PairApiKeyResponse( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + callback_handler = fireblocks.models.callback_handler_request.CallbackHandlerRequest( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ...-----END PUBLIC KEY-----', + cert = '-----BEGIN CERTIFICATE----- +... truncated ... +-----END CERTIFICATE-----', ) + ) + else: + return PairApiKeyResponse( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + ) + """ + + def testPairApiKeyResponse(self): + """Test PairApiKeyResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_players.py b/test/test_players.py new file mode 100644 index 00000000..8d278079 --- /dev/null +++ b/test/test_players.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.players import Players + + +class TestPlayers(unittest.TestCase): + """Players unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Players: + """Test Players + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `Players` + """ + model = Players() + if include_optional: + return Players( + id = '47d3383e-37a3-43d5-90a4-de0ca8c5e258', + type = 'MOBILE' + ) + else: + return Players( + id = '47d3383e-37a3-43d5-90a4-de0ca8c5e258', + type = 'MOBILE', + ) + """ + + def testPlayers(self): + """Test Players""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_provider_dto.py b/test/test_provider.py similarity index 58% rename from test/test_provider_dto.py rename to test/test_provider.py index 3c9d08d6..b3c5189b 100644 --- a/test/test_provider_dto.py +++ b/test/test_provider.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.provider_dto import ProviderDto +from fireblocks.models.provider import Provider -class TestProviderDto(unittest.TestCase): - """ProviderDto unit test stubs""" +class TestProvider(unittest.TestCase): + """Provider unit test stubs""" def setUp(self): pass @@ -27,36 +27,37 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ProviderDto: - """Test ProviderDto + def make_instance(self, include_optional) -> Provider: + """Test Provider include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ProviderDto` + # uncomment below to create an instance of `Provider` """ - model = ProviderDto() + model = Provider() if include_optional: - return ProviderDto( + return Provider( id = 'kiln', provider_name = 'Kiln', - validators = [{"chainDescriptor":"SOL","feePercent":5},{"chainDescriptor":"ETH","feePercent":7}], + validators = [{"chainDescriptor":"ETH","feePercent":5},{"chainDescriptor":"SOL","feePercent":7}], icon_url = 'https://static.fireblocks.io/staking/validators/kiln_console.png', terms_of_service_url = 'https://www.kiln.fi/terms-and-conditions-for-fireblocks-customers', - is_terms_of_service_approved = True + is_terms_of_service_approved = True, + is_private = True, + is_liquid_staking = True ) else: - return ProviderDto( + return Provider( id = 'kiln', provider_name = 'Kiln', - validators = [{"chainDescriptor":"SOL","feePercent":5},{"chainDescriptor":"ETH","feePercent":7}], - icon_url = 'https://static.fireblocks.io/staking/validators/kiln_console.png', - terms_of_service_url = 'https://www.kiln.fi/terms-and-conditions-for-fireblocks-customers', + validators = [{"chainDescriptor":"ETH","feePercent":5},{"chainDescriptor":"SOL","feePercent":7}], is_terms_of_service_approved = True, + is_liquid_staking = True, ) """ - def testProviderDto(self): - """Test ProviderDto""" + def testProvider(self): + """Test Provider""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_public_key_information.py b/test/test_public_key_information.py index e3bc4a11..5187e7d1 100644 --- a/test/test_public_key_information.py +++ b/test/test_public_key_information.py @@ -37,11 +37,9 @@ def make_instance(self, include_optional) -> PublicKeyInformation: model = PublicKeyInformation() if include_optional: return PublicKeyInformation( - algorithm = '', - derivation_path = [ - 1.337 - ], - public_key = '' + algorithm = 'MPC_ECDSA_SECP256K1', + derivation_path = [44,0,0,0,0], + public_key = '1044c36403c1802818b472398f546a43a0d91569d5583a6e807c3825b155c7bd' ) else: return PublicKeyInformation( diff --git a/test/test_related_request_dto.py b/test/test_related_request.py similarity index 73% rename from test/test_related_request_dto.py rename to test/test_related_request.py index 1388ad09..85d7f34a 100644 --- a/test/test_related_request_dto.py +++ b/test/test_related_request.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.related_request_dto import RelatedRequestDto +from fireblocks.models.related_request import RelatedRequest -class TestRelatedRequestDto(unittest.TestCase): - """RelatedRequestDto unit test stubs""" +class TestRelatedRequest(unittest.TestCase): + """RelatedRequest unit test stubs""" def setUp(self): pass @@ -27,31 +27,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RelatedRequestDto: - """Test RelatedRequestDto + def make_instance(self, include_optional) -> RelatedRequest: + """Test RelatedRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `RelatedRequestDto` + # uncomment below to create an instance of `RelatedRequest` """ - model = RelatedRequestDto() + model = RelatedRequest() if include_optional: - return RelatedRequestDto( + return RelatedRequest( status = 'deactivating', in_progress = False, amount = '0.05', tx_id = 'c80601f4-d7b1-4795-a8ee-b09cdb5b450c' ) else: - return RelatedRequestDto( + return RelatedRequest( status = 'deactivating', in_progress = False, amount = '0.05', ) """ - def testRelatedRequestDto(self): - """Test RelatedRequestDto""" + def testRelatedRequest(self): + """Test RelatedRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_related_transaction_dto.py b/test/test_related_transaction.py similarity index 73% rename from test/test_related_transaction_dto.py rename to test/test_related_transaction.py index 7767b80f..dfd298c2 100644 --- a/test/test_related_transaction_dto.py +++ b/test/test_related_transaction.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.related_transaction_dto import RelatedTransactionDto +from fireblocks.models.related_transaction import RelatedTransaction -class TestRelatedTransactionDto(unittest.TestCase): - """RelatedTransactionDto unit test stubs""" +class TestRelatedTransaction(unittest.TestCase): + """RelatedTransaction unit test stubs""" def setUp(self): pass @@ -27,28 +27,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RelatedTransactionDto: - """Test RelatedTransactionDto + def make_instance(self, include_optional) -> RelatedTransaction: + """Test RelatedTransaction include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `RelatedTransactionDto` + # uncomment below to create an instance of `RelatedTransaction` """ - model = RelatedTransactionDto() + model = RelatedTransaction() if include_optional: - return RelatedTransactionDto( + return RelatedTransaction( tx_id = 'b70601f4-d7b1-4795-a8ee-b09cdb4r850d', completed = True ) else: - return RelatedTransactionDto( + return RelatedTransaction( tx_id = 'b70601f4-d7b1-4795-a8ee-b09cdb4r850d', completed = True, ) """ - def testRelatedTransactionDto(self): - """Test RelatedTransactionDto""" + def testRelatedTransaction(self): + """Test RelatedTransaction""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_solana_blockchain_data_dto.py b/test/test_solana_blockchain_data.py similarity index 67% rename from test/test_solana_blockchain_data_dto.py rename to test/test_solana_blockchain_data.py index 6b49e26f..64305b7b 100644 --- a/test/test_solana_blockchain_data_dto.py +++ b/test/test_solana_blockchain_data.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.solana_blockchain_data_dto import SolanaBlockchainDataDto +from fireblocks.models.solana_blockchain_data import SolanaBlockchainData -class TestSolanaBlockchainDataDto(unittest.TestCase): - """SolanaBlockchainDataDto unit test stubs""" +class TestSolanaBlockchainData(unittest.TestCase): + """SolanaBlockchainData unit test stubs""" def setUp(self): pass @@ -27,26 +27,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> SolanaBlockchainDataDto: - """Test SolanaBlockchainDataDto + def make_instance(self, include_optional) -> SolanaBlockchainData: + """Test SolanaBlockchainData include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `SolanaBlockchainDataDto` + # uncomment below to create an instance of `SolanaBlockchainData` """ - model = SolanaBlockchainDataDto() + model = SolanaBlockchainData() if include_optional: - return SolanaBlockchainDataDto( - stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq' + return SolanaBlockchainData( + stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq', + stake_account_derivation_change_value = 7 ) else: - return SolanaBlockchainDataDto( + return SolanaBlockchainData( stake_account_address = '3Ru67FyzMTcdENmmRL4Eve4dtPd6AdpuypR21q5EQCdq', + stake_account_derivation_change_value = 7, ) """ - def testSolanaBlockchainDataDto(self): - """Test SolanaBlockchainDataDto""" + def testSolanaBlockchainData(self): + """Test SolanaBlockchainData""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_split_request.py b/test/test_split_request.py new file mode 100644 index 00000000..3aa9d0b8 --- /dev/null +++ b/test/test_split_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.split_request import SplitRequest + + +class TestSplitRequest(unittest.TestCase): + """SplitRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SplitRequest: + """Test SplitRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `SplitRequest` + """ + model = SplitRequest() + if include_optional: + return SplitRequest( + id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', + amount = '20', + fee = '7', + fee_level = 'MEDIUM', + tx_note = 'split 20 SOL out of 100 SOL, created on 02.04.23' + ) + else: + return SplitRequest( + id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', + amount = '20', + ) + """ + + def testSplitRequest(self): + """Test SplitRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_stake_response_dto.py b/test/test_split_response.py similarity index 66% rename from test/test_stake_response_dto.py rename to test/test_split_response.py index 091901de..ed6fd8d0 100644 --- a/test/test_stake_response_dto.py +++ b/test/test_split_response.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.stake_response_dto import StakeResponseDto +from fireblocks.models.split_response import SplitResponse -class TestStakeResponseDto(unittest.TestCase): - """StakeResponseDto unit test stubs""" +class TestSplitResponse(unittest.TestCase): + """SplitResponse unit test stubs""" def setUp(self): pass @@ -27,26 +27,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> StakeResponseDto: - """Test StakeResponseDto + def make_instance(self, include_optional) -> SplitResponse: + """Test SplitResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `StakeResponseDto` + # uncomment below to create an instance of `SplitResponse` """ - model = StakeResponseDto() + model = SplitResponse() if include_optional: - return StakeResponseDto( + return SplitResponse( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d' ) else: - return StakeResponseDto( + return SplitResponse( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850d', ) """ - def testStakeResponseDto(self): - """Test StakeResponseDto""" + def testSplitResponse(self): + """Test SplitResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_stake_request_dto.py b/test/test_stake_request.py similarity index 76% rename from test/test_stake_request_dto.py rename to test/test_stake_request.py index ae963c5a..834184ef 100644 --- a/test/test_stake_request_dto.py +++ b/test/test_stake_request.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.stake_request_dto import StakeRequestDto +from fireblocks.models.stake_request import StakeRequest -class TestStakeRequestDto(unittest.TestCase): - """StakeRequestDto unit test stubs""" +class TestStakeRequest(unittest.TestCase): + """StakeRequest unit test stubs""" def setUp(self): pass @@ -27,16 +27,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> StakeRequestDto: - """Test StakeRequestDto + def make_instance(self, include_optional) -> StakeRequest: + """Test StakeRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `StakeRequestDto` + # uncomment below to create an instance of `StakeRequest` """ - model = StakeRequestDto() + model = StakeRequest() if include_optional: - return StakeRequestDto( + return StakeRequest( vault_account_id = '22', provider_id = 'kiln', stake_amount = '32', @@ -45,15 +45,15 @@ def make_instance(self, include_optional) -> StakeRequestDto: fee_level = 'MEDIUM' ) else: - return StakeRequestDto( + return StakeRequest( vault_account_id = '22', provider_id = 'kiln', stake_amount = '32', ) """ - def testStakeRequestDto(self): - """Test StakeRequestDto""" + def testStakeRequest(self): + """Test StakeRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_stake_response.py b/test/test_stake_response.py new file mode 100644 index 00000000..e558b690 --- /dev/null +++ b/test/test_stake_response.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.stake_response import StakeResponse + + +class TestStakeResponse(unittest.TestCase): + """StakeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StakeResponse: + """Test StakeResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `StakeResponse` + """ + model = StakeResponse() + if include_optional: + return StakeResponse( + id = 'afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8' + ) + else: + return StakeResponse( + id = 'afedfd2e4-e3c9-4b70-90d6-eb0f74bfd4sd8', + ) + """ + + def testStakeResponse(self): + """Test StakeResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_staking_api.py b/test/test_staking_api.py new file mode 100644 index 00000000..964cb093 --- /dev/null +++ b/test/test_staking_api.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.api.staking_api import StakingApi + + +class TestStakingApi(unittest.TestCase): + """StakingApi unit test stubs""" + + def setUp(self) -> None: + self.api = StakingApi() + + def tearDown(self) -> None: + pass + + def test_approve_terms_of_service_by_provider_id(self) -> None: + """Test case for approve_terms_of_service_by_provider_id + + Approve staking terms of service + """ + pass + + def test_claim_rewards(self) -> None: + """Test case for claim_rewards + + Execute a Claim Rewards operation + """ + pass + + def test_get_all_delegations(self) -> None: + """Test case for get_all_delegations + + List staking positions details + """ + pass + + def test_get_chain_info(self) -> None: + """Test case for get_chain_info + + Get chain-specific staking summary + """ + pass + + def test_get_chains(self) -> None: + """Test case for get_chains + + List staking supported chains + """ + pass + + def test_get_delegation_by_id(self) -> None: + """Test case for get_delegation_by_id + + Get staking position details + """ + pass + + def test_get_providers(self) -> None: + """Test case for get_providers + + List staking providers details + """ + pass + + def test_get_summary(self) -> None: + """Test case for get_summary + + Get staking summary details + """ + pass + + def test_get_summary_by_vault(self) -> None: + """Test case for get_summary_by_vault + + Get staking summary details by vault + """ + pass + + def test_split(self) -> None: + """Test case for split + + Execute a Split operation on SOL/SOL_TEST stake account + """ + pass + + def test_stake(self) -> None: + """Test case for stake + + Initiate Stake Operation + """ + pass + + def test_unstake(self) -> None: + """Test case for unstake + + Execute an Unstake operation + """ + pass + + def test_withdraw(self) -> None: + """Test case for withdraw + + Execute a Withdraw operation + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_staking_beta_api.py b/test/test_staking_beta_api.py deleted file mode 100644 index 8a4179a9..00000000 --- a/test/test_staking_beta_api.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Fireblocks API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.6.2 - Contact: support@fireblocks.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from fireblocks.api.staking_beta_api import StakingBetaApi - - -class TestStakingBetaApi(unittest.TestCase): - """StakingBetaApi unit test stubs""" - - def setUp(self) -> None: - self.api = StakingBetaApi() - - def tearDown(self) -> None: - pass - - def test_approve_terms_of_service_by_provider_id(self) -> None: - """Test case for approve_terms_of_service_by_provider_id""" - pass - - def test_execute_action(self) -> None: - """Test case for execute_action""" - pass - - def test_get_all_delegations(self) -> None: - """Test case for get_all_delegations""" - pass - - def test_get_chain_info(self) -> None: - """Test case for get_chain_info""" - pass - - def test_get_chains(self) -> None: - """Test case for get_chains""" - pass - - def test_get_delegation_by_id(self) -> None: - """Test case for get_delegation_by_id""" - pass - - def test_get_providers(self) -> None: - """Test case for get_providers""" - pass - - def test_get_summary(self) -> None: - """Test case for get_summary""" - pass - - def test_get_summary_by_vault(self) -> None: - """Test case for get_summary_by_vault""" - pass - - -if __name__ == "__main__": - unittest.main() diff --git a/test/test_staking_provider.py b/test/test_staking_provider.py new file mode 100644 index 00000000..7aec381f --- /dev/null +++ b/test/test_staking_provider.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.staking_provider import StakingProvider + + +class TestStakingProvider(unittest.TestCase): + """StakingProvider unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStakingProvider(self): + """Test StakingProvider""" + # inst = StakingProvider() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_status.py b/test/test_status.py new file mode 100644 index 00000000..ffa04170 --- /dev/null +++ b/test/test_status.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.status import Status + + +class TestStatus(unittest.TestCase): + """Status unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Status: + """Test Status + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `Status` + """ + model = Status() + if include_optional: + return Status( + status = 'COMPLETED', + type = 'PAIR_API_KEY' + ) + else: + return Status( + status = 'COMPLETED', + type = 'PAIR_API_KEY', + ) + """ + + def testStatus(self): + """Test Status""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_token_info_not_found_error_response.py b/test/test_token_info_not_found_error_response.py new file mode 100644 index 00000000..f731033d --- /dev/null +++ b/test/test_token_info_not_found_error_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.token_info_not_found_error_response import ( + TokenInfoNotFoundErrorResponse, +) + + +class TestTokenInfoNotFoundErrorResponse(unittest.TestCase): + """TokenInfoNotFoundErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenInfoNotFoundErrorResponse: + """Test TokenInfoNotFoundErrorResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `TokenInfoNotFoundErrorResponse` + """ + model = TokenInfoNotFoundErrorResponse() + if include_optional: + return TokenInfoNotFoundErrorResponse( + message = 'Invalid address, could not get asset information', + code = 3009 + ) + else: + return TokenInfoNotFoundErrorResponse( + message = 'Invalid address, could not get asset information', + code = 3009, + ) + """ + + def testTokenInfoNotFoundErrorResponse(self): + """Test TokenInfoNotFoundErrorResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_unstake_request_dto.py b/test/test_unstake_request.py similarity index 73% rename from test/test_unstake_request_dto.py rename to test/test_unstake_request.py index 8b53dd28..a48dffbd 100644 --- a/test/test_unstake_request_dto.py +++ b/test/test_unstake_request.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.unstake_request_dto import UnstakeRequestDto +from fireblocks.models.unstake_request import UnstakeRequest -class TestUnstakeRequestDto(unittest.TestCase): - """UnstakeRequestDto unit test stubs""" +class TestUnstakeRequest(unittest.TestCase): + """UnstakeRequest unit test stubs""" def setUp(self): pass @@ -27,16 +27,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> UnstakeRequestDto: - """Test UnstakeRequestDto + def make_instance(self, include_optional) -> UnstakeRequest: + """Test UnstakeRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `UnstakeRequestDto` + # uncomment below to create an instance of `UnstakeRequest` """ - model = UnstakeRequestDto() + model = UnstakeRequest() if include_optional: - return UnstakeRequestDto( + return UnstakeRequest( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850e', fee = '7', fee_level = 'MEDIUM', @@ -44,13 +44,13 @@ def make_instance(self, include_optional) -> UnstakeRequestDto: amount = '75' ) else: - return UnstakeRequestDto( + return UnstakeRequest( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850e', ) """ - def testUnstakeRequestDto(self): - """Test UnstakeRequestDto""" + def testUnstakeRequest(self): + """Test UnstakeRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_update_callback_handler_request.py b/test/test_update_callback_handler_request.py new file mode 100644 index 00000000..7e9ac6d7 --- /dev/null +++ b/test/test_update_callback_handler_request.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.update_callback_handler_request import ( + UpdateCallbackHandlerRequest, +) + + +class TestUpdateCallbackHandlerRequest(unittest.TestCase): + """UpdateCallbackHandlerRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCallbackHandlerRequest: + """Test UpdateCallbackHandlerRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `UpdateCallbackHandlerRequest` + """ + model = UpdateCallbackHandlerRequest() + if include_optional: + return UpdateCallbackHandlerRequest( + callback_handler = fireblocks.models.callback_handler_request.CallbackHandlerRequest( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ...-----END PUBLIC KEY-----', + cert = '-----BEGIN CERTIFICATE----- +... truncated ... +-----END CERTIFICATE-----', ) + ) + else: + return UpdateCallbackHandlerRequest( + ) + """ + + def testUpdateCallbackHandlerRequest(self): + """Test UpdateCallbackHandlerRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_callback_handler_response.py b/test/test_update_callback_handler_response.py new file mode 100644 index 00000000..72a4ce72 --- /dev/null +++ b/test/test_update_callback_handler_response.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.update_callback_handler_response import ( + UpdateCallbackHandlerResponse, +) + + +class TestUpdateCallbackHandlerResponse(unittest.TestCase): + """UpdateCallbackHandlerResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateCallbackHandlerResponse: + """Test UpdateCallbackHandlerResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `UpdateCallbackHandlerResponse` + """ + model = UpdateCallbackHandlerResponse() + if include_optional: + return UpdateCallbackHandlerResponse( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + callback_handler = fireblocks.models.callback_handler_request.CallbackHandlerRequest( + url = 'https://example.com/callback-handler', + public_key = '-----BEGIN PUBLIC KEY----- +... truncated ...-----END PUBLIC KEY-----', + cert = '-----BEGIN CERTIFICATE----- +... truncated ... +-----END CERTIFICATE-----', ) + ) + else: + return UpdateCallbackHandlerResponse( + id = '44fcead0-7053-4831-a53a-df7fb90d440f', + ) + """ + + def testUpdateCallbackHandlerResponse(self): + """Test UpdateCallbackHandlerResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_update_webhook_request.py b/test/test_update_webhook_request.py new file mode 100644 index 00000000..20ccfdaa --- /dev/null +++ b/test/test_update_webhook_request.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.update_webhook_request import UpdateWebhookRequest + + +class TestUpdateWebhookRequest(unittest.TestCase): + """UpdateWebhookRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateWebhookRequest: + """Test UpdateWebhookRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `UpdateWebhookRequest` + """ + model = UpdateWebhookRequest() + if include_optional: + return UpdateWebhookRequest( + url = 'https://example.com/webhook', + description = 'This webhook is used for transactions notifications', + events = ["transaction.created","transaction.status.updated"], + enabled = False + ) + else: + return UpdateWebhookRequest( + ) + """ + + def testUpdateWebhookRequest(self): + """Test UpdateWebhookRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_validator_dto.py b/test/test_validator.py similarity index 67% rename from test/test_validator_dto.py rename to test/test_validator.py index 7bf4d6cf..af59cfcb 100644 --- a/test/test_validator_dto.py +++ b/test/test_validator.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.validator_dto import ValidatorDto +from fireblocks.models.validator import Validator -class TestValidatorDto(unittest.TestCase): - """ValidatorDto unit test stubs""" +class TestValidator(unittest.TestCase): + """Validator unit test stubs""" def setUp(self): pass @@ -27,28 +27,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ValidatorDto: - """Test ValidatorDto + def make_instance(self, include_optional) -> Validator: + """Test Validator include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `ValidatorDto` + # uncomment below to create an instance of `Validator` """ - model = ValidatorDto() + model = Validator() if include_optional: - return ValidatorDto( + return Validator( chain_descriptor = 'SOL', - fee_percent = 5 + fee_percent = 5, + is_private = True ) else: - return ValidatorDto( + return Validator( chain_descriptor = 'SOL', fee_percent = 5, ) """ - def testValidatorDto(self): - """Test ValidatorDto""" + def testValidator(self): + """Test Validator""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_version.py b/test/test_version.py new file mode 100644 index 00000000..0d120ace --- /dev/null +++ b/test/test_version.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.version import Version + + +class TestVersion(unittest.TestCase): + """Version unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Version: + """Test Version + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `Version` + """ + model = Version() + if include_optional: + return Version( + hash = 'a1b2c3d4' + ) + else: + return Version( + hash = 'a1b2c3d4', + ) + """ + + def testVersion(self): + """Test Version""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_webhook.py b/test/test_webhook.py new file mode 100644 index 00000000..df01d026 --- /dev/null +++ b/test/test_webhook.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.webhook import Webhook + + +class TestWebhook(unittest.TestCase): + """Webhook unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Webhook: + """Test Webhook + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `Webhook` + """ + model = Webhook() + if include_optional: + return Webhook( + id = '123e4567-e89b-12d3-a456-426614174000', + url = 'https://example.com/webhook', + description = 'This webhook is used for transactions notifications', + events = ["transaction.created","transaction.status.updated"], + status = 'ENABLED', + created_at = '2021-09-01T12:00Z', + updated_at = '2021-09-05T15:00Z' + ) + else: + return Webhook( + ) + """ + + def testWebhook(self): + """Test Webhook""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_webhook_event.py b/test/test_webhook_event.py new file mode 100644 index 00000000..ebe5d41f --- /dev/null +++ b/test/test_webhook_event.py @@ -0,0 +1,36 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.webhook_event import WebhookEvent + + +class TestWebhookEvent(unittest.TestCase): + """WebhookEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testWebhookEvent(self): + """Test WebhookEvent""" + # inst = WebhookEvent() + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_webhook_paginated_response.py b/test/test_webhook_paginated_response.py new file mode 100644 index 00000000..f5de6c92 --- /dev/null +++ b/test/test_webhook_paginated_response.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.models.webhook_paginated_response import WebhookPaginatedResponse + + +class TestWebhookPaginatedResponse(unittest.TestCase): + """WebhookPaginatedResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> WebhookPaginatedResponse: + """Test WebhookPaginatedResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included""" + # uncomment below to create an instance of `WebhookPaginatedResponse` + """ + model = WebhookPaginatedResponse() + if include_optional: + return WebhookPaginatedResponse( + data = [ + fireblocks.models.webhook.Webhook( + id = '123e4567-e89b-12d3-a456-426614174000', + url = 'https://example.com/webhook', + description = 'This webhook is used for transactions notifications', + events = ["transaction.created","transaction.status.updated"], + status = 'ENABLED', + created_at = '2021-09-01T12:00Z', + updated_at = '2021-09-05T15:00Z', ) + ], + next = 'eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9' + ) + else: + return WebhookPaginatedResponse( + data = [ + fireblocks.models.webhook.Webhook( + id = '123e4567-e89b-12d3-a456-426614174000', + url = 'https://example.com/webhook', + description = 'This webhook is used for transactions notifications', + events = ["transaction.created","transaction.status.updated"], + status = 'ENABLED', + created_at = '2021-09-01T12:00Z', + updated_at = '2021-09-05T15:00Z', ) + ], + ) + """ + + def testWebhookPaginatedResponse(self): + """Test WebhookPaginatedResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_webhooks_v2_beta_api.py b/test/test_webhooks_v2_beta_api.py new file mode 100644 index 00000000..a4c7e32e --- /dev/null +++ b/test/test_webhooks_v2_beta_api.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Fireblocks API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.6.2 + Contact: support@fireblocks.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from fireblocks.api.webhooks_v2_beta_api import WebhooksV2BetaApi + + +class TestWebhooksV2BetaApi(unittest.TestCase): + """WebhooksV2BetaApi unit test stubs""" + + def setUp(self) -> None: + self.api = WebhooksV2BetaApi() + + def tearDown(self) -> None: + pass + + def test_create_webhook(self) -> None: + """Test case for create_webhook + + Create new webhook + """ + pass + + def test_delete_webhook(self) -> None: + """Test case for delete_webhook + + Delete webhook + """ + pass + + def test_get_notification(self) -> None: + """Test case for get_notification + + Get notification by id + """ + pass + + def test_get_notifications(self) -> None: + """Test case for get_notifications + + Get all notifications by webhook id + """ + pass + + def test_get_webhook(self) -> None: + """Test case for get_webhook + + Get webhook by id + """ + pass + + def test_get_webhooks(self) -> None: + """Test case for get_webhooks + + Get all webhooks + """ + pass + + def test_update_webhook(self) -> None: + """Test case for update_webhook + + Update webhook + """ + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/test/test_withdraw_request_dto.py b/test/test_withdraw_request.py similarity index 76% rename from test/test_withdraw_request_dto.py rename to test/test_withdraw_request.py index 48525e26..0af9761a 100644 --- a/test/test_withdraw_request_dto.py +++ b/test/test_withdraw_request.py @@ -15,11 +15,11 @@ import unittest -from fireblocks.models.withdraw_request_dto import WithdrawRequestDto +from fireblocks.models.withdraw_request import WithdrawRequest -class TestWithdrawRequestDto(unittest.TestCase): - """WithdrawRequestDto unit test stubs""" +class TestWithdrawRequest(unittest.TestCase): + """WithdrawRequest unit test stubs""" def setUp(self): pass @@ -27,29 +27,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> WithdrawRequestDto: - """Test WithdrawRequestDto + def make_instance(self, include_optional) -> WithdrawRequest: + """Test WithdrawRequest include_option is a boolean, when False only required params are included, when True both required and optional params are included""" - # uncomment below to create an instance of `WithdrawRequestDto` + # uncomment below to create an instance of `WithdrawRequest` """ - model = WithdrawRequestDto() + model = WithdrawRequest() if include_optional: - return WithdrawRequestDto( + return WithdrawRequest( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', fee = '7', fee_level = 'MEDIUM', tx_note = 'withdraw request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #ETH' ) else: - return WithdrawRequestDto( + return WithdrawRequest( id = 'b70701f4-d7b1-4795-a8ee-b09cdb5b850f', ) """ - def testWithdrawRequestDto(self): - """Test WithdrawRequestDto""" + def testWithdrawRequest(self): + """Test WithdrawRequest""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True)