Create an Ethereum Transaction
Who is this tutorial for:
- API users that DO NOT use their iPhone as the Instruction Key.
- API users that need to implement the functionality in programming languages other than JavaScript
- API users that DO NOT want to use our JavaScript SDK.
Brief Outline
- Get the list of the available ethereum wallets its address, assets and their balance from the User Subwallets Balances Query
- Create an ethereum transaction via the Create ETH/ERC20 Transaction Mutation
- Verify the transaction details is correct
- Create the digests (
transactionDigest
,signData
,shaSignData
) and verify this is the same as the fields inunverifiedDigestData
(A tutorial how to do this will be made available soon)- For testing purposes (sandbox environment) you can skip this step
- For Production we highly recommend to re-create the digests to verify
- Sign the appropriate digest according to your signing solution
- If your signing solution requires the pre-image data then use the
unverifiedDigestData.signData
and use the SHA256 hashing algorithm - If your signing solution can sign hashed data then use the
unverifiedDigestData.shaSignData
- If your signing solution requires the pre-image data then use the
- Submit the signature using the Add Signature Mutation
- Poll the status of the transaction to confirm it was sent to the network using the Get Request Item Query
JavaScript Example
Below is a brief example for creating, signing and submitting an Ethereum transaction. Sandbox users can comment out the verifyEthereumTransaction
for fast implementation but MUST implement it for Production. The code for verifyEthereumTransaction
will be made available soon.
1 | import { ApiClient } from "./api-client"; |