Bitpanda Enterprise
  1. Tutorials
Bitpanda Enterprise
  • Bitpanda Enterprise
    • Getting Started
      • Overview
      • Authentication
      • Versioning and API Changes
      • Changelog
    • REST API Endpoints
      • Overview
      • Auth Tokens
        • Obtain a Refresh and Access Tokens
        • Revoke a Refresh Token
      • User Administration
        • Individual Users
          • Create new user
          • Get user list v2
          • Search for users
          • Get user details v2
          • Update an existing user
          • Get user details
          • Off-boarding user
          • Inactivate user
          • Get user accepted Terms & Conditions
          • Get user accepted Terms & Conditions v2
          • User verification files
          • Get account levels
        • Businesses
          • Get risk questions
          • Get a list of available businesses
          • Create new business
          • Get business details
          • Update an existing business
          • Create Authorized Individual
          • Get a list of Authorized Individuals
          • Get Authorized Individual details
          • Update Authorized Individual
          • Delete Authorized Individual
          • Create Shareholder
          • Get a list of Shareholders
          • Get Shareholder details
          • Update Shareholder
          • Delete Shareholder
          • Create Beneficial Owner
          • Get a list of Beneficial Owners
          • Get Beneficial Owner details
          • Update Beneficial Owner
          • Delete Beneficial Owner
          • Create Managing Director
          • Get a list of Managing Directors
          • Get Managing Director details
          • Update Managing Director
          • Delete Managing Director
          • Create Individual
          • Get a list of Individuals
          • Get Individual details
          • Update Individual
          • Delete Individual
        • User Files
          • Upload a file
          • Get file contents
          • Get file information
        • Legal & Regulatory
          • Get Terms & Conditions
          • Get Terms & Conditions v2
          • Get AML questions
          • Get appropriateness questions
          • Get client categorization questionnaire
          • Get DAC8 questionnaire
          • Get FATCA questionnaire
          • Get Legal Documents
          • Capture consent for User's final check
          • Retrieve Tax Identification Number Configuration
          • Get UK appropriateness questionnaire
          • Get appropriateness questionnaire for complex products
          • Get client categorization questionnaire
          • Get UK Risk Disclosure Warning
          • Acknowledge UK Risk Disclosure Warning
          • Get user compliance status
      • Asset Oversight
        • Available Assets
          • Get a list of available assets
          • Get a list of available assets v2
        • Asset Details
          • Get asset details
          • Get asset details v2
        • Asset History
          • Get asset history
          • Get asset history
        • Asset Info
          • Get asset information
          • Get asset information
        • Cryptocoin Details
          • Get cryptocoin details
          • Get cryptocoin details
        • Metal Details
          • Get metal details
          • Get metal details
        • Crypto Index Details
          • Get crypto index details
          • Get crypto index details
        • Stock Details
          • Get stock details
          • Get stock details
        • Equity Stock Details
          • Get equity stock details
          • Get equity stock details V2
        • ETF Details
          • Get ETF details
          • Get ETF details
        • Equity ETF Details
          • Get equity ETF details
          • Get equity ETF details V2
        • ETC Details
          • Get ETC details
          • Get ETC details
        • Equity ETC Details
          • Get Equity ETC details
          • Get Equity ETC details V2
        • Token Details
          • Get token details
          • Get token details
        • Asset ESG Data
          • Get asset ESG data
          • Get asset ESG data V2
        • List all available fiats per partner
        • Get the exchange rate for two assets
        • Get the swap exchange rate between two assets
        • Get assets under management
        • Get assets under management grouped by type
        • Get crypto index allocations
        • Get asset tags mapping
        • Get prices
        • Get prices V2
      • Trading Capabilities
        • Trades
          • Create a trade offer
          • Create a trade offer V2
          • [Deprecated] Accept a trade offer
          • Accept a trade offer V2
          • Accept a trade offer V3
          • Get a trade offer status
        • Swaps
          • Create a swap offer
          • Create a swap offer V2
          • Accept a swap offer
          • Accept a swap offer V2
        • Automated Orders
          • List automated orders
          • Get automated order price estimation
          • Create an automated order
          • Get an automated order details
          • Cancel an automated order
      • Portfolio Management
        • Returns the list of owned assets
        • Returns the list of owned asset groups
        • Portfolio performance based on timeframe
        • Returns the enhanced portfolio detail of an asset
        • Returns the list of owned assets
        • Returns the list of owned asset groups
        • Portfolio performance based on timeframe
        • Returns the enhanced portfolio detail of an asset
      • Transactions Timeline
        • All
          • Transaction timeline per user
        • Trades
          • List all trades per user
          • Get trade details
          • Get trades history for user using asset and fiat uuid
          • Search for trades
          • Lightweight Search for trades V2
        • Swaps
          • Search for swaps
          • Swap details by swap offer ID
          • Search for swaps V2
          • Swap details by swap offer ID V2
        • Crypto Transfers
          • List all crypto transfers per user
          • Search for crypto transfers
        • Non-User Initiated Transactions
          • Non-user initiated transaction details
          • List all non-user initiated transactions per partner or per user
          • List all non-user initiated transactions per partner or per user V2
        • Corporate Actions
          • List all corporate actions per partner or per user
          • Corporate action details
        • Crypto Actions
          • Crypto action details V2
          • Crypto action details
        • Staking Actions
          • List all staking actions per user
          • List all staking actions per user V2
      • Reports
        • Get all available report types per user
        • Get all generated reports per user
        • Create Account Statement Report
        • Download a specific report
      • Tax Insights
        • Get user’s tax eligibility status
        • Update user’s tax eligibility status
        • Get trade tax details
      • Notification Events
        • List all notification events per partner
      • Smart Investment Features
        • Crypto Transfers
          • List external addresses
          • Create deposit address
          • Update external address
          • Create withdrawal address
          • List of VASPs
          • Validate crypto address
          • Update tax declaration status for a crypto deposit transaction
          • Create a crypto withdrawal offer
          • Confirm a withdrawal offer
        • Crypto Staking
          • Get staking overview
          • Get bonded overview
          • Stake a crypto asset
          • Unstake a crypto asset
          • Stake a crypto asset V2
          • Unstake a crypto asset V2
          • Get a staking action status
        • Savings Plans
          • Create a savings plan
          • Search for savings plans
          • Cancel a savings plan
          • Cancel a savings plan V2
          • Confirm a savings plan transaction
          • Confirm a savings plan transaction V2
          • Create a savings plan V2
          • Search for savings plans V2
          • Get savings plan next recurrence date.
      • Settlements
        • List all available fiats per partner
        • Create a settlement deposit
        • Update the fiat stock
        • List all settlement transactions per partner
    • Webhooks
      • Overview
      • Setting Up Webhooks
      • Handling Webhooks Events
        • User Updates Notifications
          • User Updates Notifications
        • Corporate Actions Notifications
          • Corporate Actions Notifications
          • Corporate Actions Notifications
        • Crypto Transfers Notifications
          • Deposit or withdrawal notification
        • Settlement Notifications
          • Top-Up Request
          • Top-Up Request V2
          • Top-Up Success
          • Top-Up Success V2
          • Send Money
          • Send Money V2
          • Send Money Success
          • Send Money Success V2
        • Non-user Initiated Transactions Notifications
          • Non-user Initiated Transactions
          • Non-user Initiated Transactions V2
          • Non-user Initiated Transactions V3
        • Savings Plans Notifications
          • Savings Plan Upcoming Trade
          • Savings Plan Upcoming Trade v2
          • Savings Plan Successful Trade
          • Savings Plan Failed Trade
          • Savings Plan Auto Cancel
        • Crypto Actions Notifications
          • Crypto Actions Notifications
        • Reports Notifications
          • Reports Notifications
        • Automated Orders Notifications
          • Automated Orders Notifications
    • WebSocket
      • Overview
      • Setting a Websocket
      • Websocket Server Documentation
    • Glosary
      • Key Terms and Definitions
    • Schemas
      • 400
      • 401
      • 403
      • UserJourney
      • 404
      • trades-search-lightweight
      • 413
      • TradeDetails
      • 422
      • CreateOfferRequest
      • 500
      • CreateOfferUUIDRequest
      • AccessToken
      • ListOrderResponse
      • getTransactionResponse
      • CreateOrderRequest
      • getFiatsResponse
      • CreateOrderResponse
      • GetOrderResponse
      • 405
      • 406
      • 409
      • 410
      • 503
      • Term
      • PaginationMeta
      • PaginationLinks
      • TermV2Link
      • ComplexProductsAnswer
      • TermV2Text
      • ComplexProductsQuestion
      • AmlAnswerNested
      • AmlQuestionNested
      • AmlAnswer
      • AmlQuestion
      • QuestionnaireAnswer
      • QuestionnaireQuestion
      • ClientCategorizationNestedAnswer
      • ClientCategorizationNestedQuestion
      • ClientCategorizationAnswer
      • ClientCategorizationQuestion
      • UKRiskDisclosureContentLink
      • Dac8Answer
      • UKRiskDisclosureContent
      • Dac8Question
      • UKRiskDisclosureActions
      • FatcaAnswer
      • UKRiskDisclosure
      • FatcaQuestion
      • AccountLevel
      • GetUserList
      • SimpleCursorPaginationMeta
      • AmlQuestionAnswerRequest
      • AppropriatenessQuestionAnswerRequest
      • ClientCategorizationQuestionAnswerRequest
      • FatcaQuestionAnswerRequest
      • Dac8QuestionAnswerRequest
      • UserVerificationV2Request
      • UserTax
      • UserMultipleTax
      • UserExtCompliance
      • CreateUserV2RequestBody
      • UserSearch
      • GetUserV2
      • UpdateUserV2RequestBody
      • GetUser
      • UserOffBoardingRequestBody
      • UserAcceptedTerm
      • UserAcceptedTermV2Link
      • UserAcceptedTermV2Text
      • ComplianceDetails
      • UserVerificationFilesV2RequestBody
      • UserComplianceV2
      • LegalDocument
      • UserComplianceV2Response
      • TaxRules
      • Asset
      • AssetHistory
      • AssetInfo
      • CryptoIndexAllocation
      • CoinDetails
      • MetalDetails
      • CryptoIndexDetails
      • YearlyNetIncome
      • StockDetails
      • EquityStockDetails
      • ETFDetails
      • EquityETFDetails
      • ETCDetails
      • EquityETCDetails
      • TokenDetails
      • ESGData
      • ExchangeRate
      • SwapExchangeRate
      • Asset-V2
      • GetAssetsUnderManagement
      • GetAssetsUnderManagementTypeGroup
      • FiatV2
      • TagGroup
      • TagsMapping
      • Trade
      • TradeV2
      • TransactionTimelineItem
      • TradeSearchV2
      • NextPrevCursorPagination
      • CorporateActions
      • CorporateActionDetailsAsset
      • CorporateActionDetailsFiat
      • CorporateActionDetails
      • NonUserInitiatedTransactionsDetailsAsset
      • NonUserInitiatedTransactionDetailsFiat
      • NonUserInitiatedTransactionsDetails
      • CryptoActionDetailsAsset
      • CryptoActionDetailsFiat
      • CryptoActionDetails
      • CryptoActionDetailsAssetV2
      • CryptoActionTransaction
      • CryptoActionDetailsV2
      • Warnings
      • Offer
      • OfferUUID
      • Offer-Accept
      • Offer-Accept-Uuid
      • Overview
      • GroupOverview
      • Performance
      • AssetDetailsEnhancedWithStaking
      • OverviewV2
      • AssetDetailsEnhancedWithStakingV2
      • Fiat
      • CreateDomainDepositRequestBody
      • UpdateFiatStockRequestBody
      • TransactionSearch
      • CreateAccountStatement
      • AccountStatementReportResponse
      • ReportDetails
      • UploadFileRequestBody
      • FileInformation
      • OverviewResponse
      • BondedOverviewResponse
      • StakeRequest
      • StakeResponse
      • PendingStakeActionResponse
      • UnstakeRequest
      • UnstakeResponse
      • SearchResponse
      • SearchV2Response
      • PaginationMetaV2
      • StakeV2Request
      • StakeV2Response
      • UnstakeV2Request
      • UnstakeV2Response
      • GetStatusResponse
      • EventV2
      • NonUserInitiatedTransactions
      • NonUserInitiatedTransactionsV2
      • GetPricesResponse
      • GetPricesResponse-v2
      • GetTaxStatusResponse
      • OrderPriceEstimationResponse
      • UpdateTaxStatusRequest
      • UpdateTaxStatusResponse
      • GetTaxDetailsResponse
      • AddressResponse
      • CreateAddressRequest
      • DepositAddressResponse
      • UpdateExternalAddressRequest
      • CreateWithdrawalAddressRequest
      • VaspResponse
      • ValidateCryptoAddressRequest
      • ValidateCryptoAddressResponse
      • TransactionResponse
      • TaxDeclarationUpdateRequest
      • WithdrawalOfferRequest
      • WithdrawalOfferResponse
      • WithdrawalResponse
      • SearchSavingsPlanResponse
      • CreateSavingsPlanRequest
      • CreateSavingsPlanResponse
      • ModifySavingsPlanRequest
      • ModifySavingsPlanResponse
      • CancelSavingsPlanV2Response
      • ConfirmSavingsPlanTransactionResponse
      • ConfirmSavingsPlanTransactionV2Response
      • SearchSavingsPlanV2Response
      • CreateSavingsPlanV2Request
      • CreateSavingsPlanV2Response
      • GetSavingsPlanNextRecurrenceResponse
      • CreateSwapOfferRequest
      • CreateSwapOfferResponse
      • SwapTradesSearch
      • GetSwap
      • CreateSwapOfferRequestV2
      • CreateSwapOfferResponseV2
      • SwapTradesSearchV2
      • GetSwapV2
      • AcceptSwapOfferResponse
      • AcceptSwapOfferResponseV2
      • ResponseMeta
      • RiskAnswer
      • RiskQuestion
      • GeneralAddress
      • EntityTaxClassification
      • Business
      • RiskQuestionAnswerRequest
      • CreateBusinessRequestBody
      • BusinessDetails
      • UpdateBusinessRequestBody
      • AuthorizedIndividual
      • CreateAuthorizedIndividualRequestBody
      • UpdateAuthorizedIndividualRequestBody
      • Shareholder
      • CreateShareholderRequestBody
      • UpdateShareholderRequestBody
      • BeneficialOwnerType
      • BeneficialOwnerControllingPersonType
      • BeneficialOwner
      • CreateBeneficialOwnerRequestBody
      • UpdateBeneficialOwnerRequestBody
      • ManagingDirector
      • CreateManagingDirectorRequestBody
      • UpdateManagingDirectorRequestBody
      • Individual
      • CreateIndividualRequestBody
      • UpdateIndividualRequestBody
  • Custody
    • Introduction
    • Security
    • Getting Started
    • Changelog
    • Webhooks
    • Supported Assets
    • Glossary
    • Tutorials
      • API Onboarding
      • TrustVault Node.js SDK
      • Change Wallet Policy API
      • Create a Bitcoin Transaction
      • Create an Ethereum Transaction
      • Create Transaction (Unsupported EVM chain)
      • Create Ethereum Transaction GraphQL API
      • Calculating Transaction Fee
      • Decoding an Ethereum Transaction Webhook Payload
      • Get User Portfolio
      • Environments
    • APIs
      • Travel Rule API
      • Deprecations
      • Trust API
        • Authentication
          • TrustVault Public Keys
        • Query
          • User
            • User SubWallets - Details
            • User SubWallets - Portfolio
            • User SubWallets - Balances
            • Get Transactions
            • Get Transactions for a BTC Receive Address
            • Get All BTC Receive Addresses (With Transactions)
            • Get User Portfolio
            • csvPortfolio
          • Get Request Item
        • Mutations
          • Create Transactions
            • Create BTC Transaction
            • Create ETH
            • Create Transaction (EVM compatible chain)
            • Create Exchange Transfer
          • Create Change Policy Request
          • Create Bitcoin Receive Address
          • Add Signature
          • Cancel request
          • Create Sub Wallet
          • Create Eth Personal Sign
          • Create Eth Signed Typed Data
          • Create Radix Transaction
          • Create Xdc.Network Transaction
    • Under the Hood
      • Understanding Bitcoin
      • Supported Ethereum Decoded Data
  • Crypto Pay by Bitpanda
    • Overview
    • REST API Endpoints
      • Authentication
        • Obtain a Refresh and Access Tokens
        • Revoke a Refresh Token
      • Transactions
        • Get transaction details
        • Create a new transaction
        • Get transactions details
      • Get list of fiat currencies
    • Webhooks
      • Settlement Update Notifications
      • Transaction Update Notifications
    • Schemas
      • 400
      • 401
      • 403
      • 404
      • 413
      • 422
      • 500
      • AccessToken
      • getTransactionResponse
      • getFiatsResponse
  1. Tutorials

Create Transaction (Unsupported EVM chain)

Who is this tutorial for:
API users that want to interact to an EVM compatible chain that TrustVault does not support natively
API users that want to send native currency transactions to an EVM compatible chain that TrustVault does not support natively
API users that want to invoke smart contract methods (including ERC-20 transfers) to an EVM compatible chain that TrustVault does not support natively

Brief Outline#

Supported EVM Compatible Chains
Support Chains has the benefit of:
The balance and transactions of an addresses in the chain can be viewed in the iOS TrustVault app and TrustVault Web
The ability to construct a transaction for the chain in the iOS TrustVault app and TrustVault Web
The API supports creating a transaction for a supported asset in the chain by passing just the assetSymbol (e.g. LINK)
Webhook users can get a webhook when ERC-20s are received in the chain with full ERC-20 data payload including a valuation
Unsupported EVM Compatible Chains
All EVM compatible chains are unsupported by default which means:
They can only be interacted via TrustVault API or MetaMask x TrustVault chrome extension
In order to interact via TrustVault API with an EVM compatible chain that TrustVault does not support natively there are a few steps that needs to be done manually (these are done automatically for natively supported chains). The steps are:
1.
Decide the EVM compatible chain you want to interact with and get the chain information
1.
see EVM chain info (RPC URL and Chain ID) section
2.
Decide if you are sending a native currency (i.e. MATIC on Polygon) or invoking a smart contract (including ERC-20 transfers) and follow the correct instructions:
1.
Sending native currency transaction
2.
Invoking a smart contract method
3.
Construct the raw transaction by calculating the transaction details
4.
Submit the raw transaction to TrustVault setting the sendToNetworkWhenSigned: false (the signed transaction must be sent to network manually)
5.
Workflow / Sign the transaction as normal using your iOS device
6.
Poll the transaction request for the correct state
7.
Grab the rawTransactionBytes and submit to network

Sending native currency transaction (EVM compatible chain)#

To send a native currency transaction to an EVM compatible chain that TrustVault does not support natively:
1.
Create a transaction using the steps in Native Currency Transaction Mutation
1.
Take note of the requestId from the response (required for step 2 and 3)
2.
Add signatures using the TrustVault IOS app or Add Signature Mutation (requestId required) for externally held device keys.
3.
Poll for the rawTransactionBytes using the steps in Get rawTransactionBytes of the transaction request
4.
Broadcast the rawTransactionBytes to the EVM compatible chain using the steps in Broadcast the rawTransactionBytes

Invoking a smart contract method (EVM compatible chain)#

When sending a smart contract transaction we can invoke any method available in the ABI of a smart contract. For transferring ERC-20 use the transfer method of the ERC-20 smart contract.
See the steps in Generate data field on how to select the available methods of a smart contract.
To invoke a smart contract method in an EVM compatible chain that TrustVault does not support natively:
1.
Create a transaction using the steps in Smart contract transaction mutation
1.
Take note of the requestId from the response (required for step 2 and 3)
2.
Add signatures using the TrustVault IOS app or Add Signature Mutation (requestId required) for externally held device keys.
3.
Poll for the rawTransactionBytes using the steps in Get rawTransactionBytes of the transaction request
4.
Broadcast the rawTransactionBytes to the EVM compatible chain using the steps in Broadcast the rawTransactionBytes

Native Currency Transaction Mutation#

The following fields are needed in order to send a native currency transaction to an EVM compatible chain that TrustVault does not support natively:
from - the Ethereum TrustVault address where the transaction will come from
to - the recipient of the transaction
value - see the steps in Get value section
gasPrice - see the steps in Get gasPrice section
gasLimit - see the steps in Get gasLimit section
nonce - see the steps in Get nonce section
chainId - see EVM chain info (RPC URL and Chain ID) section
Headers:
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request:
Variables:
FROM - the Ethereum TrustVault address where the transaction will come from
TO - the recipient of the transaction
VALUE - see the steps in Get value section
GAS_PRICE - see the steps in Get gasPrice section
GAS_LIMIT - see the steps in Get gasLimit section
NONCE - see the steps in Get nonce section
CHAIN_ID - see EVM chain info (RPC URL and Chain ID) section
{
 "from": "<FROM>",
 "to":"<TO>",
 "value": "<VALUE>",
 "gasPrice": "<GAS_PRICE>",
 "gasLimit": "<GAS_LIMIT>",
 "nonce": <NONCE>,
 "chainId": <CHAIN_ID>
}
Response:
{
    "data": {
        "createEthereumTransaction": {
            "requestId": "93b99bf0-22a4-adcf-cef7-06c1b23409c4",
            "signData": {
                "transaction": {
                    "fromAddress": "0xB96966D32f4654b823eaa3844EB381932c04C18D",
                    "to": "0x61Df7eAb4f740AFCeB8e468cb16d323f262e3970",
                    "value": "100000000000000",
                    "gasPrice": "30000000000",
                    "gasLimit": "21000",
                    "nonce": 0,
                    "chainId": 137,
                    "data": null
                },
                "hdWalletPath": {
                    "hdWalletPurpose": "0x80000044",
                    "hdWalletCoinType": "0x80000060",
                    "hdWalletAccount": "0x80000000",
                    "hdWalletUsage": "0x0",
                    "hdWalletAddressIndex": "0x0"
                },
                "unverifiedDigestData": {
                    "transactionDigest": "733a5d51394fef258dc2245c928ad92d82c3eee530cb4615e8a71d4ea2eafb28",
                    "signData": "303f0420733a5d51394fef258dc2245c928ad92d82c3eee530cb4615e8a71d4ea2eafb28301b020500800000440205008000006002050080000000020100020100",
                    "shaSignData": "d7d20a63d9353f3fd967803ed26ce6774432a852745c7f935ccb75e37f6c7409"
                }
            }
        }
    }
}

Smart contract transaction mutation#

The following fields are needed in order to invoke a method of a smart contract in an EVM compatible chain that TrustVault does not support natively:
from - the Ethereum TrustVault address where the transaction will come from
contractAddress - the address of the smart contract that will be invoked
gasPrice - see the steps in Get gasPrice section
gasLimit - see the steps in Get gasLimit section
nonce - see the steps in Get nonce section
chainId - see EVM chain info (RPC URL and Chain ID) section
data - see the steps in Generate data field section
Headers:
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request:
Variables:
FROM - the Ethereum TrustVault address where the transaction will come from
CONTRACT_ADDRESS - the address of the smart contract that will be invoked
VALUE - see the steps in Get value section
GAS_PRICE - see the steps in Get gasPrice section
GAS_LIMIT - see the steps in Get gasLimit section
NONCE - see the steps in Get nonce section
CHAIN_ID - see EVM chain info (RPC URL and Chain ID) section
DATA - see the steps in Generate data field section
{
 "from": "<FROM>",
 "contractAddress":"<CONTRACT_ADDRESS>",
 "gasPrice": "<GAS_PRICE>",
 "gasLimit": "<GAS_LIMIT>",
 "nonce": <NONCE>,
 "chainId": <CHAIN_ID>,
 "data": "<DATA>"
}
Response:
{
    "data": {
        "createEthereumTransaction": {
            "requestId": "be970f58-6fec-f0f6-5880-c68342f5e768",
            "signData": {
                "transaction": {
                    "fromAddress": "0xB96966D32f4654b823eaa3844EB381932c04C18D",
                    "to": "0x61Df7eAb4f740AFCeB8e468cb16d323f262e3970",
                    "value": "0",
                    "gasPrice": "30000000000",
                    "gasLimit": "51473",
                    "nonce": 0,
                    "chainId": 137,
                    "data": "0xa9059cbb000000000000000000000000528880b3eb9b5c6ba9cf5215a777ed3d983c6c9e00000000000000000000000000000000000000000000000000005af3107a4000"
                },
                "hdWalletPath": {
                    "hdWalletPurpose": "0x80000044",
                    "hdWalletCoinType": "0x80000060",
                    "hdWalletAccount": "0x80000000",
                    "hdWalletUsage": "0x0",
                    "hdWalletAddressIndex": "0x0"
                },
                "unverifiedDigestData": {
                    "transactionDigest": "e57f9e8b6721571c1b4860a952c26a3a5c63a8016b725117bdf635767c639eb1",
                    "signData": "303f0420e57f9e8b6721571c1b4860a952c26a3a5c63a8016b725117bdf635767c639eb1301b020500800000440205008000006002050080000000020100020100",
                    "shaSignData": "0625e966997ca5741d838a4eb3ab59afe94769f094f4e46359a6f07645952872"
                }
            }
        }
    }
}

EVM chain info (RPC URL and Chain ID)#

RPC URL - this value is needed to get necessary information from the EVM compatible chain.
Chain ID - chain identifier where this transaction is going to be sent to
Please refer to rpc.info for the RPC URL and Chain ID of a particular EVM compatible chain

Get value#

The value of the native currency (i.e. MATIC on Polygon) sent with this transaction (integer string in wei units)
Use this ethereum unit converter to convert the Ether value (i.e native currency) to wei units.

Get gasPrice#

The price per unit of gas in wei units (integer string). The eth_gasPrice JSON RPC method will be used to grab the gasLimit for the transaction.
Request:
CHAIN_RPC_URL - EVM chain info (RPC URL and Chain ID)
Response:
{"jsonrpc":"2.0","id":73,"result":"0x70295f4f0"}
convert the hex result "0x70295f4f0" to integer string

Get gasLimit#

The maximum units of gas the transaction is allowed to use (integer string). The eth_estimateGas JSON RPC method will be used to grab the gasLimit for the transaction.
Request:
CHAIN_RPC_URL - EVM chain info (RPC URL and Chain ID)TRANSACTION_TO_FIELD - for native currency transactions this is the recipient address, for smart contract invocations (including ERC-20 transfers) this is the smart contract address
Response:
{"jsonrpc":"2.0","id":1,"result":"0x5208"}
convert the hex result "0x5208" to integer string

Get nonce#

The number of transactions made by the sender prior to this one (integer). The eth_getTransactionCount JSON RPC method will be used to grab the current nonce value.
Request:
CHAIN_RPC_URL - EVM chain info (RPC URL and Chain ID)TRANSACTION_FROM_FIELD - the Ethereum TrustVault address where the transaction will come from
Response:
{"jsonrpc":"2.0","id":1,"result":"0x0"}
convert the result to an integer

Generate data field#

The data field is optional and only required if you want to invoke methods of a smart contract (this includes ERC-20 transfers).
Follow this guide to get the ABI of the smart contract you want to invoke. Please check the ABI of the method you want to invoke and the parameters it accepts.
The example below calls the transfer method which takes in 2 arguments:
address - type address
value - type uint256
This is an example ABI of the WETH contract in Polygon: WETH ABI

Get rawTransactionBytes of the transaction request#

The rawTransactionBytes will be only be populated once the transaction request have enough signature to satisfy the wallet policy, otherwise it will be null.
Headers:
x-api-key: <YOUR_API_KEY>
Content-Type: application/json
Request:
Variables:
REQUEST_ID - the requestId of the transaction request from either Native Currency Transaction Mutation or Smart contract transaction mutation response
{
    "requestId": "<REQUEST_ID>"
}
Response:
{
    "data": {
        "getRequest": {
            "requestId": "93b99bf0-22a4-adcf-cef7-06c1b23409c4",
            "status": "SIGNED",
            "type": "EXTERNAL_ETH_TRANSACTION",
            "rawTransactionBytes": "0xf8ae82027985400746fe00830493e094c7dad2e953dc7b11474151134737a007049f576e80b844e2bbb158000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000000000000000000000000003dff70c63f22be43820217a03ef69f68465b19274f2fa71636b053f7daf7bcdde7b3f9e18662937231f10417a02b0ae881ad04fc9d006c173e86f9cb1b226c95a90c0a2f921a249b25e1574c0b"
        }
    }
}

Broadcast the rawTransactionBytes#

Once the transaction request has collected enough signatures to satisfy the policy the rawTransactionBytes will be populated and can now be broadcasted to the EVM compatible network.
The eth_sendRawTransaction JSON RPC method will used to broadcast the rawTransactionBytes.
Request:
CHAIN_RPC_URL - EVM chain info (RPC URL and Chain ID)RAW_TRANSACTION_BYTES - Get rawTransactionBytes of the transaction request
Response:
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
The response.result is the transactionHash which you can query on the EVM compatible chain blockchain explorer.
Previous
Create an Ethereum Transaction
Next
Create Ethereum Transaction GraphQL API
Built with