TransactionSource
Variant 581 v393sp_runtime::transaction_validity::TransactionSource
About This Type
Enum type: TransactionSource.
A tagged union where the first byte selects which variant is active, followed by that variant's data.
Encoding: 1-byte variant index followed by the selected variant's field data.
Variants (3)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | InBlock | none | |
| 1 | Local | none | |
| 2 | External | none |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 3 possible variants.
- Size
- variable (1+ bytes)
Examples
InBlock
0x0000 Variant index 0 = InBlockLocal
0x0101 Variant index 1 = LocalExternal
0x0202 Variant index 2 = ExternalCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode TransactionSource — variant "InBlock"
const value = registry.createType("TransactionSource", "InBlock");
console.log("Hex:", value.toHex());Type Information
- Type ID
- 581
- Kind
- Variant
- Path
- sp_runtime::transaction_validity::TransactionSource
- Runtime
- v393