While working with the blockchain using any provided connection tool, the main instrument for changing blockchain data is extrinsic. Extrinsic is a request with certain parameters, which consists of 3 parts:
- Blockchain section
- Method section
- Array of arguments
Once an extrinsic has been generated, it must be signed for the chain to complete the requested changes.
Use Substrate and Polkadot documentation to learn more about extrinsics in general.
Extrinsic lifecycle in Unique Network connection tools
Using SDK as a connection tool involves the following sequence of actions to change something in the blockchain:
- SDK creates request parameters and sends them into SubstrateRest.
- SubstrateRest sends request parameters into SubstrateClient.
- SubstrateClient builds an unsigned extrinsic.
- SDK uses the Account package to sign an extrinsic and sends it into SubstrateRest.
- SubstrateRest sends a signed extrinsic into the blockchain.
- Blockchain changes its condition according to the signed extrinsic.
- SDK can request new blockchain state / extrinsic status.
Input and output data
|Error type||Additional information|