UNPKG

@venly/venly-core-sdk

Version:

Javascrip/Typescript SDK for Venly's Web3 Services

595 lines (547 loc) 36.1 kB
import { VyPromise, VyUserAuth } from '../core'; import { Any } from '../helpers/json'; import * as wallet from '../models/wallet/index'; import * as enums from '../models/enums/index'; import { VyApiBase } from './VyApiBase'; export declare abstract class VyWalletAPI_Gen { protected _apiBase: VyApiBase; protected _apiEndpoint: enums.VyApiEndpoint; constructor(_apiBase: VyApiBase); /** * This endpoint is used to check the current health of the **Wallet-API**. It returns the API health status as either **UP** or **DOWN**. * @returns {VyWalletApiHealthDto} Wallet-API health result */ checkHealthWalletAPI(): VyPromise<wallet.VyWalletApiHealthDto>; /** * This endpoint retrieves all your users and their information. * @param {VyQuery_GetUsers} query - Query to filter the operation results * @returns {VyUserDto[]} All users retrieved successfully. */ getUsers(query?: wallet.VyQuery_GetUsers): VyPromise<wallet.VyUserDto[]>; /** * Creates a new user account along with their primary signing method. Users are unique entities that can own and manage multiple wallets. **Signing Method Requirements:** - The first signing method must be a six-digit PIN - This PIN serves as the primary authentication method for wallet access - Signing methods are required to authorize transactions and access wallet functions **User-Wallet Relationship:** - Each user can be associated with multiple wallets - The signing method applies to all wallets owned by the user - Users maintain a single identity across all their associated wallets This endpoint combines user creation and security setup in a single operation * @param {VyCreateUserRequest} reqParams - Request data for the operation * @returns {VyUserDto} User is created. */ createUser(reqParams: wallet.VyCreateUserRequest): VyPromise<wallet.VyUserDto>; /** * This endpoint retrieves detailed information for a specific user by their `UUID`. * @param {string} userId - This is the user `ID` whose details you want to fetch. * @returns {VyUserDto} A specific user's details retrieved successfully. */ getUser(userId: string): VyPromise<wallet.VyUserDto>; /** * Updates the reference identifier for a specific user based on the user `UUID`. The reference is a custom identifier that can be used to link users to external systems. * @param {string} userId - The user `UUID` whose **reference** you want to update. * @param {VyUpdateUserReferenceRequest} reqParams - Request data for the operation * @returns {VyUserReferenceDto} User's reference updated successfully. */ updateUserReference(userId: string, reqParams: wallet.VyUpdateUserReferenceRequest): VyPromise<wallet.VyUserReferenceDto>; /** * This endpoint deletes a user. All the linked wallets to the user will be inaccessible once the user has been deleted. * @param {string} userId - This is the `UUID` of the user you want to delete. * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user */ deleteUser(userId: string, signingMethod: VyUserAuth): VyPromise<Any>; /** * This endpoint allows you to create a signing method for a user, whether it's their first or an additional one. The first signing method must always be a six-digit `PIN`, and does not require the `Signing-Method` to be passed in the header. For creating subsequent signing methods like `BIOMETRIC`/`EMERGENCY_CODE`/`PASSWORD`, include an existing valid `Signing-Method` in the request header. * @param {string} userId - This is the `UUID` of user whose **signing method** you want to create. * @param {VyCreateSigningMethodRequestBase} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VySigningMethodDto[]} Signing method is created for user. */ createSigningMethod(userId: string, reqParams: wallet.VyCreateSigningMethodRequestBase, signingMethod: VyUserAuth): VyPromise<wallet.VySigningMethodDto[]>; /** * This endpoint is used to update a user's signing method. This can be done, in case the user forgets their PIN. In order to update a signing method, another valid signign method has to be passed in the header. * @param {string} userId - This is the `UUID` of the user whos signing method you want to update. * @param {string} signingMethodId - This is the `UUID` of signing method you want to update. * @param {VyUpdateSigningMethodRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VySigningMethodDto} Signing method of user updated successfully. */ updateSigningMethod(userId: string, signingMethodId: string, reqParams: wallet.VyUpdateSigningMethodRequest, signingMethod: VyUserAuth): VyPromise<wallet.VySigningMethodDto>; /** * This endpoint is used to delete a user's signing method. * @param {string} userId - This is the `UUID` of the user whos signing method you want to delete. * @param {string} signingMethodId - This is the `UUID` of signing method you want to delete. * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user */ deleteSigningMethod(userId: string, signingMethodId: string, signingMethod: VyUserAuth): VyPromise<Any>; /** * This endpoint gets a wallet by id. * @param {string} id - This is the ID of the wallet who's details you want to get. * @param {VyQuery_GetWallet} query - Query to filter the operation results * @returns {VyWalletDto} Retrieved the wallet's information successfully. */ getWallet(id: string, query?: wallet.VyQuery_GetWallet): VyPromise<wallet.VyWalletDto>; /** * Updates modifiable metadata properties of an existing wallet. This endpoint allows you to modify the wallet's description, set primary status, archive/unarchive the wallet, or update the custom identifier for external system integration * @param {string} id - This is the `UUID` of the wallet * @param {VyUpdateWalletRequest} reqParams - Request data for the operation * @returns {VyWalletDto} Wallet description and/or arhive/unarchive successful. */ updateWallet(id: string, reqParams: wallet.VyUpdateWalletRequest): VyPromise<wallet.VyWalletDto>; /** * Retrieves a paginated list of all wallets accessible to your account. This endpoint supports comprehensive filtering, sorting, and inclusion options to help you find specific wallets or groups of wallets based on various criteria. **Key Features:** - Filter by blockchain network, user, or company - Include or exclude archived wallets - Sort results by multiple criteria - Control balance information inclusion for performance - Search by wallet address or custom identifier Use this endpoint for wallet management dashboards, reporting, or integration with external systems requiring wallet inventory data. * @param {VyQuery_GetWallets} query - Query to filter the operation results * @returns {VyWalletDto[]} Retrieved all wallets information successfully. */ getWallets(query?: wallet.VyQuery_GetWallets): VyPromise<wallet.VyWalletDto[]>; /** * Creates a new wallet for an existing user with a configured signing method. **Prerequisites:** - User must be created to which the wallet will be linked - User must have at least one configured signing method (used to authenticate wallet creation) * @param {VyCreateWalletRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyWalletDto} Wallet created successfully. */ createWallet(reqParams: wallet.VyCreateWalletRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyWalletDto>; /** * Exports wallet credentials for use in external applications or backup purposes. **Security Considerations:** - Password-protected keystores are recommended for enhanced security against network attacks - Once exported, private keys are outside our security controls - Compromised keys can result in unauthorized access and potential fund loss **Important:** Exported credentials grant full wallet access. Store them securely and never share with untrusted parties. * @param {string} walletId - This is the `UUID` of the wallet whose keystore/ private key you want to export. * @param {VyExportWalletRequestBase} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyExportWalletResultDto} Wallet exported successfully. */ exportWallet(walletId: string, reqParams: wallet.VyExportWalletRequestBase, signingMethod: VyUserAuth): VyPromise<wallet.VyExportWalletResultDto>; /** * This endpoint is used to import a wallet. Read more about [how to import a wallet](https://docs.venly.io/docs/import-a-wallet). * @param {VyWalletImportRequestBase} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyWalletDto} Wallet imported successfully. */ importWallet(reqParams: wallet.VyWalletImportRequestBase, signingMethod: VyUserAuth): VyPromise<wallet.VyWalletDto>; /** * This endpoint is used to validate whether the format of a wallet address is correct for a specific chain. * @param {VyChain} chain - The blockchain of the wallet * @param {string} walletAddress - The public wallet address of the wallet * @returns {VyValidateWalletResultDto} Wallet address format validated successfully. */ validateWallet(chain: enums.VyChain, walletAddress: string): VyPromise<wallet.VyValidateWalletResultDto>; /** * This endpoint retrieves all the events related to a wallet by `walletId`. The events can be wallet created, funds transfer, signed signature, etc. * @param {string} walletId - The `UUID` of the wallet * @returns {VyWalletEventDto[]} Retrieved all wallet events successfully. */ getWalletEvents(walletId: string): VyPromise<wallet.VyWalletEventDto[]>; /** * This endpoint gets native balance of a wallet by wallet `UUID`. * @param {string} walletId - `UUID` of the wallet to fetch native balance for * @returns {VyWalletNativeBalanceDto} Native balance of wallet retrieved successfully. */ getNativeBalanceByWalletId(walletId: string): VyPromise<wallet.VyWalletNativeBalanceDto>; /** * This endpoint fetches all the ERC20 token balance by wallet `UUID` * @param {string} walletId - `UUID` of the wallet * @param {VyQuery_GetErc20TokensByWalletId} query - Query to filter the operation results * @returns {VyErc20TokenDto[]} ERC20 token balances of wallet retrieved successfully. */ getErc20TokensByWalletId(walletId: string, query?: wallet.VyQuery_GetErc20TokensByWalletId): VyPromise<wallet.VyErc20TokenDto[]>; /** * This endpoint retrieves ERC20 Token balances by wallet `UUID` and token contract address. * @param {string} walletId - `UUID` of the wallet * @param {string} token - Smart contract address of the token for which to retrieve balance information * @param {VyQuery_GetErc20TokenByWalletId} query - Query to filter the operation results * @returns {VyErc20TokenDto} ERC20 token balance of wallet retrieved successfully. */ getErc20TokenByWalletId(walletId: string, token: string, query?: wallet.VyQuery_GetErc20TokenByWalletId): VyPromise<wallet.VyErc20TokenDto>; /** * This endpoint retrieves the token assocciations for a Hedera wallet using the wallet address. * @param {string} chain - The blockchain of the wallet. This will be `HEDERA`. * @param {string} walletAddress - The wallet address * @returns {VyHederaTokenAssociationDto} Token assocciations of Hedera wallet retrieved successfully. */ getTokenAssociationsForHedera(chain: string, walletAddress: string): VyPromise<wallet.VyHederaTokenAssociationDto>; /** * Retrieves the native token balance for a specific wallet address on the specified blockchain network. This endpoint returns the current balance in both human-readable and raw formats, along with token metadata and USD exchange rates when available. * @param {VyChain} chain - Blockchain network on which to query the wallet balance * @param {string} walletAddress - Public blockchain address of the wallet to query * @returns {VyWalletNativeBalanceDto} Native balance of wallet retrieved successfully. */ getNativeBalanceByWalletAddress(chain: enums.VyChain, walletAddress: string): VyPromise<wallet.VyWalletNativeBalanceDto>; /** * Retrieves ERC20 token balances for a specific wallet address on the specified blockchain network. This endpoint returns detailed balance information including token metadata, exchange rates, and USD valuations when available. **Filtering Options:** - Query specific tokens by contract address - Show all tokens or only those with non-zero balances - Include or exclude potential spam/scam tokens * @param {VyChain} chain - Blockchain network on which to query token balances * @param {string} walletAddress - The address of the wallet to fetch token balance for * @param {VyQuery_GetErc20TokensByWalletAddress} query - Query to filter the operation results * @returns {VyErc20TokenDto[]} ERC20 token balance of wallet retrieved successfully. */ getErc20TokensByWalletAddress(chain: enums.VyChain, walletAddress: string, query?: wallet.VyQuery_GetErc20TokensByWalletAddress): VyPromise<wallet.VyErc20TokenDto[]>; /** * This endpoint gets the ERC20 token balance by Wallet `ID`, wallet address, and token address. * @param {VyChain} chain - Blockchain network on which the token contract is deployed * @param {string} walletAddress - The address of the wallet to fetch token balances for * @param {string} token - Contract address of the token (contract) to fetch the balance for * @param {VyQuery_GetErc20TokenByWalletAddress} query - Query to filter the operation results * @returns {VyErc20TokenDto} ERC20 token balance of wallet retrieved successfully. */ getErc20TokenByWalletAddress(chain: enums.VyChain, walletAddress: string, token: string, query?: wallet.VyQuery_GetErc20TokenByWalletAddress): VyPromise<wallet.VyErc20TokenDto>; /** * Retrieves a paginated list of transactions with optional filtering capabilities. **Features:** - Filter by transaction status - Filter by specific user UUID - Configurable pagination - Flexible sorting options - Optional user details inclusion * @param {VyQuery_GetTransactions} query - Query to filter the operation results * @returns {VyTransactionDto[]} All transactions retrieved successfully. */ getTransactions(query?: wallet.VyQuery_GetTransactions): VyPromise<wallet.VyTransactionDto[]>; /** * Creates a blockchain transaction of any supported type with autogenrating the gas fields. **Supported Transaction Types:** - Native token transfers - ERC-20 token transfers - NFT transfers (ERC-721, ERC-1155) - Smart contract interactions * @param {VyCreateTransactionRequestBase} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyTransactionResultDto} Transaction executed successfully. */ createTransaction(reqParams: wallet.VyCreateTransactionRequestBase, signingMethod: VyUserAuth): VyPromise<wallet.VyTransactionResultDto>; /** * Confirms a saved transaction request and prepares it for execution by updating its status from **SAVED** to **READY**. **Process flow:** 1. Validates the saved transaction request parameters 2. Calculates and populates gas fees, nonce, and other blockchain-specific fields 3. Updates status to **READY**, making it available for execution 4. Sets expiration time for the confirmed transaction **When to use:** - After creating a transaction request with `status: "SAVED"` - Before calling the execute endpoint to complete the transaction - When you're ready to finalize gas calculations and network parameters **Important notes:** - Only works with transaction requests in **SAVED** status - Gas fields will be auto-populated based on current network conditions - The confirmed transaction will have an expiration time after which it cannot be executed * @param {string} id - UUID of the transaction request to confirm * @param {VyConfirmTransactionRequest} reqParams - Blockchain of the transaction request * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyConfirmTransactionResultDto} Transaction confirmed successfully and ready for execution. */ confirmTransaction(id: string, reqParams: wallet.VyConfirmTransactionRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyConfirmTransactionResultDto>; /** * Executes a confirmed transaction request by transaction UUID, by performing the blockchain transaction operation. **Prerequisites:** - Transaction request must be in **READY** status (use confirm endpoint first) - Transaction must not be expired **Process:** 1. Validates the transaction request status and expiration 2. Authenticates using provided signing method 3. Signs and broadcasts the transaction to the blockchain network 4. Returns the transaction result with hash and network confirmation * @param {string} id - UUID of the transaction request to execute * @param {VyConfirmTransactionRequest} reqParams - Blockchain for the transaction * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyTransactionResultDto} Transaction executed successfully and broadcast to the blockchain. */ executeTransactionByUuid(id: string, reqParams: wallet.VyConfirmTransactionRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyTransactionResultDto>; /** * Creates and executes a blockchain transaction of any supported type. **Supported Transaction Types:** - Native token transfers - ERC-20 token transfers - NFT transfers (ERC-721, ERC-1155) - Smart contract interactions * @param {VyExecuteTransactionRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyTransactionResultDto} Transaction executed successfully. */ executeTransaction(reqParams: wallet.VyExecuteTransactionRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyTransactionResultDto>; /** * Transforms a generic transaction request into a blockchain-specific transaction with all necessary parameters populated for the target network. **What this endpoint does:** - Validates transaction data against the specified blockchain network - Converts generic amounts to blockchain-native units (e.g., 0.1 SUI → 100000000 MIST) - Calculates and populates network-specific parameters (gas price, gas budget, nonce) - Transforms generic transaction types to chain-specific types (TRANSFER → SUI_TRANSFER) - Returns a structured transaction request ready for confirmation and execution **Supported transaction types:** - **Native transfers**: Send blockchain's native currency (ETH, SUI, MATIC, etc.) - **Token transfers**: Send ERC-20 or equivalent tokens - **NFT transfers**: Transfer ERC-721/ERC-1155 or equivalent NFTs - **Contract execution**: Call smart contract functions - **Multi-transfers**: Batch multiple operations (Hedera only) * @param {VyBuildTransactionRequestBase} reqParams - Request data for the operation * @returns {VyTransactionRequestBase} Transaction prepared for a specific chain successfully. */ buildTransaction(reqParams: wallet.VyBuildTransactionRequestBase): VyPromise<wallet.VyTransactionRequestBase>; /** * Retrieves the current status of a blockchain transaction using its unique hash identifier. This endpoint queries the specified blockchain network to determine the transaction's current state, such as whether it's pending, confirmed, or failed. The status is fetched directly from the blockchain's network nodes to ensure accuracy. **Supported Status Values:** - `PENDING` - Transaction submitted but not yet confirmed - `SUCCEEDED` - Transaction successfully confirmed on blockchain - `FAILED` - Transaction failed during execution - `UNKNOWN` - Status cannot be determined (unsupported chain or invalid hash) * @param {VyChain} chain - The blockchain of the transaction * @param {string} transactionHash - The transaction hash of the transaction to check the status for * @param {VyQuery_GetTransactionStatus} query - Query to filter the operation results * @returns {VyTransactionStatusDto} Transaction status retrieved successfully. */ getTransactionStatus(chain: enums.VyChain, transactionHash: string, query?: wallet.VyQuery_GetTransactionStatus): VyPromise<wallet.VyTransactionStatusDto>; /** * This endpoint fetches the current fees (for EVM based chains: `gasprice`) for a specific chain * @param {VyChain} chain - The blockchain for which you want to get gas price details * @returns {Any} Gas price for a chain retrieved successfully. */ getGasPrice(chain: enums.VyChain): VyPromise<Any>; /** * This endpoint retrives all the signature requests, and the results can be filtered by `userId` and signature status. * @param {VyQuery_GetSignatureInfo} query - Query to filter the operation results * @returns {VySignatureInfoDto} Signature requests retrieved succesfully. */ getSignatureInfo(query?: wallet.VyQuery_GetSignatureInfo): VyPromise<wallet.VySignatureInfoDto>; /** * Creates and optionally executes cryptographic signatures for blockchain messages and structured data. **Supported signature types:** - **Message signing**: Plain text message signing using personal_sign method - **EIP-712**: Ethereum typed structured data signing for improved security and usability * @param {VyCreateSignatureRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyCreateSignatureBase} Signature created and signed successfully. */ createSignature(reqParams: wallet.VyCreateSignatureRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyCreateSignatureBase>; /** * Confirms a saved signature request and prepares it for execution by updating its status from **SAVED** to **READY**. **Process flow:** 1. Validates the saved signature request parameters 2. For transaction signatures: Calculates and populates gas fees, nonce, and other required fields 3. Updates status to **READY**, making it available for signing 4. Sets expiration time for the confirmed request * @param {string} id - The UUID of the signature request to mark as READY * @param {VyConfirmSignatureRequest} reqParams - Request data for the operation * @returns {VySignatureInfoDto} */ confirmSignature(id: string, reqParams: wallet.VyConfirmSignatureRequest): VyPromise<wallet.VySignatureInfoDto>; /** * Executes a confirmed signature request by performing the cryptographic signing operation. It returns the completed signature in the appropriate format. **Prerequisites:** - Signature request must be in **READY** status (use confirm endpoint first) * @param {string} id - UUID of the signature request to execute * @param {VySignSignatureRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VySignatureBase} Signature signed successfully. */ signSignatureById(id: string, reqParams: wallet.VySignSignatureRequest, signingMethod: VyUserAuth): VyPromise<wallet.VySignatureBase>; /** * Transforms a generic signature request into a blockchain-specific signature request with all necessary parameters populated for the target network. **Supported operations:** - **Plain Message signing** - **EIP-712 structured data signing** * @param {VyBuildSignatureRequestBase} reqParams - Request data for the operation * @returns {VyBuildSignatureResultDto} */ buildSignatureRequest(reqParams: wallet.VyBuildSignatureRequestBase): VyPromise<wallet.VyBuildSignatureResultDto>; /** * Cryptographically verifies that a signature was signed by a specific wallet address for the given message or data. * @param {VyVerifySignatureRequest} reqParams - Request data for the operation * @returns {boolean} Verification of the signed signature successful. */ verifySignature(reqParams: wallet.VyVerifySignatureRequest): VyPromise<Boolean>; /** * Retrieves a signature request by its unique identifier, including current status, metadata, and signing details. **Returns information about:** - Current signature request status (SAVED, READY, SIGNED, EXPIRED, CANCELED) - Original request parameters and data - Timestamps (created, expires, signed) - Signature results (if completed) - Associated wallet and blockchain network details * @param {string} id - UUID of the signature request to retrieve * @returns {VySignatureInfoDto} Specific signature request retrieved successfully. */ getSignatureInfoById(id: string): VyPromise<wallet.VySignatureInfoDto>; /** * Cancels a signature request by setting its status to **CANCELED**. This prevents the signature from being executed and marks it as permanently inactive. **Cancellation rules:** - Can only cancel requests with status: **SAVED** or **READY** - Cannot cancel already **SIGNED**, **EXPIRED**, or **CANCELED** requests - Action is irreversible - canceled requests cannot be reactivated * @param {string} id - UUID of the signature request to cancel */ deleteSignature(id: string): VyPromise<Any>; /** * This endpoint immediately tries to resubmit a stuck transaction. Sometimes a transaction fails to execute/propagate. This can be due to several factors, for example, the gas price is too low. * @param {VyResubmitTransactionRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyTransactionResultDto} Transaction resubmitted successfully. */ resubmitTransaction(reqParams: wallet.VyResubmitTransactionRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyTransactionResultDto>; /** * This endpoint immediately tries to cancel a stuck transaction. * @param {VyCancelTransactionRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyTransactionResultDto} Transaction canceled successfully. */ cancelTransaction(reqParams: wallet.VyCancelTransactionRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyTransactionResultDto>; /** * This endpoint allows you to read contract functions. This function is only available for EVM-based chains. * @param {VyReadContractRequest} reqParams - Request data for the operation * @returns {VyReadContractResultDto[]} Contract read successful. */ readContract(reqParams: wallet.VyReadContractRequest): VyPromise<wallet.VyReadContractResultDto[]>; /** * This endpoint allows you to encode contract functions. This function is only available for EVM-based chains. * @param {VyContractEncodeRequest} reqParams - Request data for the operation * @returns {VyContractEncodeResultDto} */ encodeContract(reqParams: wallet.VyContractEncodeRequest): VyPromise<wallet.VyContractEncodeResultDto>; /** * This endpoint allows you to decode contract functions. This function is only available for EVM-based chains. * @param {VyContractDecodeRequest} reqParams - Request data for the operation * @returns {VyContractDecodeResultDto[]} */ decodeContract(reqParams: wallet.VyContractDecodeRequest): VyPromise<wallet.VyContractDecodeResultDto[]>; /** * This endpoint is used only when migrating from the old/deprecated wallet management to the new user management. Click [here](https://docs.venly.io/docs/user-management) to read more about user management. It is used to link an existing wallet to a user. * @param {string} id - This is the wallet `ID` * @param {VyLinkWalletToUserRequest} reqParams - Request data for the operation * @param {VyUserAuth} signingMethod - This operation requires a valid Signing-Method from the corresponding user * @returns {VyWalletDto} Wallet linked to user successfully. */ linkWalletToUser(id: string, reqParams: wallet.VyLinkWalletToUserRequest, signingMethod: VyUserAuth): VyPromise<wallet.VyWalletDto>; /** * This endpoint retrieves NFTs by wallet `ID` * @param {string} walletId - `ID` of the wallet * @param {VyQuery_GetNftsByWalletId} query - Query to filter the operation results * @returns {VyNftDto[]} NFTs of wallet retrieved successfully. */ getNftsByWalletId(walletId: string, query?: wallet.VyQuery_GetNftsByWalletId): VyPromise<wallet.VyNftDto[]>; /** * This endpoint retrieves NFTs by blockchain. * @param {VyQuery_GetNftBalances} query - Query to filter the operation results * @returns {VyNftBalanceDto[]} NFTs of wallet retrieved successfully. */ getNftBalances(query?: wallet.VyQuery_GetNftBalances): VyPromise<wallet.VyNftBalanceDto[]>; /** * This endpoint retrieves NFTs by blockchain and wallet address. * @param {VyChain} chain - Blockchain to filter by * @param {string} walletAddress - Wallet address to get NFTs * @param {VyQuery_GetNftsByWalletAddress} query - Query to filter the operation results * @returns {VyNftDto[]} NFTs of wallet retrieved successfully. */ getNftsByWalletAddress(chain: enums.VyChain, walletAddress: string, query?: wallet.VyQuery_GetNftsByWalletAddress): VyPromise<wallet.VyNftDto[]>; /** * This endpoint retrieves NFT contract information by blockchain and contract address. * @param {VyChain} chain - The blockchain to filter by * @param {string} contractAddress - The contract address of the NFT * @param {VyQuery_GetNftContract} query - Query to filter the operation results * @returns {VyNftContractDto} NFT contract information retrieved successfully. */ getNftContract(chain: enums.VyChain, contractAddress: string, query?: wallet.VyQuery_GetNftContract): VyPromise<wallet.VyNftContractDto>; /** * This endpoint retrieves a specific NFT information by chain, contract address, and the token `ID`. * @param {VyChain} chain - The blockchain to filter by * @param {string} contractAddress - The contract address of the NFT * @param {string} tokenId - The token `ID` of the NFT * @returns {VyNftDto} Specific NFT information retrieved successfully. */ getNft(chain: enums.VyChain, contractAddress: string, tokenId: string): VyPromise<wallet.VyNftDto>; /** * This endpoint fetches the wallet that contain a specific NFT. The wallets are filtered by blockchain, contract address of the NFT, and the token `ID` * @param {VyChain} chain - The blockchain to filter by * @param {string} contractAddress - The contract address of the specific NFT * @param {string} tokenId - The token `ID` of the NFT * @param {VyQuery_GetWalletsContainingTokenIdFrom} query - Query to filter the operation results * @returns {VyWalletBalanceDto} Wallet address retrieved successfully containing a specific NFT. */ getWalletsContainingTokenIdFrom(chain: enums.VyChain, contractAddress: string, tokenId: string, query?: wallet.VyQuery_GetWalletsContainingTokenIdFrom): VyPromise<wallet.VyWalletBalanceDto>; /** * This endpoint retrieves the token allowances specifically for Hedera chain * @param {string} walletAddress - The public address of the wallet that own tokens * @param {VyQuery_GetTokenAllowancesForHedera} query - Query to filter the operation results * @returns {VyHederaNonFungibleAllowanceDto[]} Token allowance of Hedera wallet retrieved successfully. */ getTokenAllowancesForHedera(walletAddress: string, query?: wallet.VyQuery_GetTokenAllowancesForHedera): VyPromise<wallet.VyHederaNonFungibleAllowanceDto[]>; /** * This endpoint returns the wallet address(es) which contain NFTs from a specific NFT contract address. * @param {string} chain - The blockchain of the NFT * @param {string} address - The contract address of the NFT * @param {VyQuery_GetWalletsContainingTokensFrom} query - Query to filter the operation results * @returns {VyWalletBalanceDto} Wallet address(es) retrieved successfully containing NFTs from a specific NFT contract. */ getWalletsContainingTokensFrom(chain: string, address: string, query?: wallet.VyQuery_GetWalletsContainingTokensFrom): VyPromise<wallet.VyWalletBalanceDto>; /** * This endpoint gets all the possible token pairs that can be swapped based on the blockchain of the wallet. * @param {string} id - This is the wallet `ID`. The **SWAP** pairs will be displayed based on the blockchain of this wallet. * @returns {VyTradingPairDto[]} Token pairs retrieved successfully. */ getTraidingPairs(id: string): VyPromise<wallet.VyTradingPairDto[]>; /** * This endpoint returns information about the expected result of the swap. It provides the expected output amount, as well gives information about the slippage, and fee involved for that specific swap. * @param {VyQuery_GetExchangeRate} query - Query to filter the operation results * @returns {VyExchangeRateResultDto} Exchange rate and swap information retrieved successfully. */ getExchangeRate(query?: wallet.VyQuery_GetExchangeRate): VyPromise<wallet.VyExchangeRateResultDto>; /** * This endpoint returns the transaction detail that is needed to perform the actual swap, based on information obtained in the **Get Exchange Rate** endpoint. This endpoint will build a transaction for you, which afterward you or your user needs to execute. Each item in the response array needs to be taken, enriched with the relevant signing method and submitted against the endpoint: `/api/transactions/execute` * @param {string} id - This is the `ID` of the source wallet. (Wallet that holds tokens to swap) * @param {VyBuildTokenSwapRequest} reqParams - Request data for the operation * @returns {VyTransactionRequestBase[]} Swap transactions created successfully. */ buildTokenSwap(id: string, reqParams: wallet.VyBuildTokenSwapRequest): VyPromise<wallet.VyTransactionRequestBase[]>; /** * Returns information about a specific blockchain. * @param {VyChain} chain - Select the blockchain to get block information * @returns {VyBlockchainInfoDto} Block information retrieved successfully. */ getBlockchainInfo(chain: enums.VyChain): VyPromise<wallet.VyBlockchainInfoDto>; /** * This endpoint returns all the supported chains by the Wallet-API. * @returns {VyChain[]} All supported chains retrieved successfully. */ getSupportedWalletChains(): VyPromise<enums.VyChain[]>; /** * This endpoint retrieves the Venly public key. * @returns {VySecuritySpecificationDto} */ getPublicKey(): VyPromise<wallet.VySecuritySpecificationDto>; } //# sourceMappingURL=VyWalletAPI.generated.d.ts.map