Write Transactions
Overview
Write Transactions modify data on the FIO Chain and the integrator must have access to user's Private key to properly serialize and sign each transaction.
Please note that some of Write Transactions actions require an on-chain fee to be paid in native FIO Tokens, while others can be paid with gas-free transactions which come bundled with every FIO Handle.
Integrator may choose to enable FIO Token support in their application, or collected payment from users in alternative currency and pay the on-chain fee with their own FIO Tokens.
For a complete list of Write Transaction Actions, see FIO Chain Action API.
Use MetaMask
If your application is web-based, the easiest way to support write transaction is via MetaMask using FIO Wallet Snap. MetaMask can now securely store FIO Private Key (via same seed phrase which secures all MetaMask private keys) and sign any on-chain transaction.
Use the SDK
Due to the complexities involved with serializing and signing transactions, it is recommended that integrators use the SDK, for submitting write transactions to the FIO Chain.
Lite TypeScript SDK
fio.sdk-lite is a lightweight Typescript SDK which will let you sign any transaction and broadcast it to the FIO Chain. It's recommended for most applications.
For a working playground, checkout this in-browser sandbox:
Full TypeScript SDK
fiosdk_typescript is a Full Typescript SDK with extra features and functionality.
For a working playground, checkout this in-browser sandbox:
Other SDKs
See SDK List for other opensource FIO libraries.
Use clio
clio is the command line interface for FIO and comes bundled with the FIO Chain stack. If you are running your own FIO Chain Node, you may use clio to execute Write Transactions to the FIO Chain.
For more information see: Command-line interface
Look Ma! No Hands!
If you are looking to get more control over the Write Transaction this section is for you.
Article | Description |
---|---|
Creating a prepared transaction | The FIO SDK offers some helper functions for integrators who wish to separate the creation of the transaction from the sending of the transaction. |
Offline signing of transactions | For integrators who want to limit access to FIO private keys, the FIO SDK offers methods that separate the serialization and signing of transactions. |
Pre-compute transaction ID | Pre-computing the transaction ID for a FIO transaction is useful for integrators wanting to confirm transactions on the FIO chain. |
Using fiojs to package and send transactions | The FIO SDK wraps the fiosjs library to provide convenience methods for creating and submitting transactions to the FIO chain. |
Anatomy of a Write Transaction | Checkout the four main steps you need to follow if you want to roll your own write transactions without the use of an SDK |
Setting max_fee | Describes how to to properly set the max_fee parameter which is present on most Write Transactions. |
Updated 27 days ago