-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextensions.json
More file actions
40 lines (39 loc) · 2.29 KB
/
Copy pathextensions.json
File metadata and controls
40 lines (39 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"_comment": "Chain-specific signed extensions configuration. Maps chain names to their TxExtension/SignedExtra layouts. Only include fields that actually encode bytes (omit unit types and None options). See documentation below.",
"_field_types": {
"unit": "Zero-sized field (no bytes encoded) - omit from config",
"era": "1 byte (immortal 0x00) or 2 bytes (mortal era encoding)",
"compact": "SCALE compact-encoded integer (variable: 1, 2, or 4 bytes)",
"fixed_hash_32": "Fixed 32-byte hash",
"option_hash_32": "Option<32-byte hash> (discriminant 0x00=None, 0x01+32 bytes=Some)",
"option_u32": "Option<u32> (discriminant 0x00=None, 0x01+4 bytes=Some)"
},
"_example": "To add a new chain: 1) Get SignedExtra/TxExtension definition from chain source, 2) Create entry listing fields that encode bytes in order, 3) Run: bun cli.ts add-chain --name <name> --ws-url <url>",
"enjin": {
"comment": "Enjin Matrix TxExtension (spec 1040+): Order is CheckMortality, CheckMetadataHash, CheckNonce, ChargeTransactionPayment (phantom: CheckSpecVersion, CheckTxVersion, CheckGenesis, CheckWeight, CheckFuelTank). Verified from live RPC.",
"signedExtensions": [
{ "name": "CheckMortality", "type": "era" },
{ "name": "CheckMetadataHash", "type": "metadata_mode" },
{ "name": "CheckNonce", "type": "compact" },
{ "name": "ChargeTransactionPayment", "type": "compact" }
]
},
"canary": {
"comment": "Canary Matrix TxExtension: Order is CheckMortality, CheckMetadataHash, CheckNonce, ChargeTransactionPayment (same as Enjin Matrix after spec 1040).",
"signedExtensions": [
{ "name": "CheckMortality", "type": "era" },
{ "name": "CheckMetadataHash", "type": "metadata_mode" },
{ "name": "CheckNonce", "type": "compact" },
{ "name": "ChargeTransactionPayment", "type": "compact" }
]
},
"enjin-relay": {
"comment": "Enjin Relay TxExtension: CheckEra, CheckNonce, ChargeTransactionPayment, CheckMetadataHash (phantom: CheckSpecVersion, CheckTxVersion, CheckGenesis, CheckWeight)",
"signedExtensions": [
{ "name": "CheckEra", "type": "era" },
{ "name": "CheckNonce", "type": "compact" },
{ "name": "ChargeTransactionPayment", "type": "compact" },
{ "name": "CheckMetadataHash", "type": "option_hash_32" }
]
}
}