Copyright | Aleksandr Krupenkin 2016-2024 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | unportable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Network.Polkadot.Extrinsic
Description
Extrinsic is a piece of data from external world.
Synopsis
- type Extrinsic a = UncheckedExtrinsic a MultiAddress MultiSignature SignedExtra
- type SignedExtra = (CheckSpecVersion, CheckTxVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment)
- sign_and_send :: (MultiPair pair, IdentifyAccount (MultiSigner pair), Ss58Codec (AccountId (MultiSigner pair)), Encode (MultiAddress pair), Encode (MultiSignature pair), Encode call, JsonRpc m) => pair -> call -> Balance -> m HexString
- mortal_max :: JsonRpc m => m Era
- new_extra' :: Era -> Index -> Balance -> SignedExtra
- new_extra :: (Ss58Codec a, JsonRpc m) => a -> Balance -> m SignedExtra
Documentation
type Extrinsic a = UncheckedExtrinsic a MultiAddress MultiSignature SignedExtra Source #
Default Polkadot compatible extrinsic type.
type SignedExtra = (CheckSpecVersion, CheckTxVersion, CheckGenesis, CheckEra, CheckNonce, CheckWeight, ChargeTransactionPayment) Source #
Default Polkadot signed extra.
Arguments
:: (MultiPair pair, IdentifyAccount (MultiSigner pair), Ss58Codec (AccountId (MultiSigner pair)), Encode (MultiAddress pair), Encode (MultiSignature pair), Encode call, JsonRpc m) | |
=> pair | Sender account pair. |
-> call | Runtime function to call. |
-> Balance | Tips for speedup transaction (set zero for no boost). |
-> m HexString | Transaction hash. |
Sign extrinsic and send it using node RPC call.
mortal_max :: JsonRpc m => m Era Source #
Create a mortal Era
with biggest lifetime period.
Note: The assumption is runtime has BlockHashCount
= 2400. This is common
for Polkadot runtimes.
Arguments
:: Era | Transaction mortality. |
-> Index | Transaction nonce value. |
-> Balance | Transaction tips, or set zero for no tips. |
-> SignedExtra | Returns Polkadot transaction extra. |
Create signed extra from general data.