User Tools

Site Tools


slates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

slates [2025/06/17 15:42] – created transatoshislates [2025/06/17 16:08] (current) – [Reference-level explanation] transatoshi
Line 135: Line 135:
 Compacting the slate also acts as a minor privacy-enhancer by hiding the initiator's outputs from the other party. Compacting the slate also acts as a minor privacy-enhancer by hiding the initiator's outputs from the other party.
  
-==== Reference-level explanation ====+===== Reference-level explanation ===== 
 + 
 +=== Slate Definition - JSON ===
  
-Slate Definition - JSON 
-Entries prefixed with // denote fields that may be omitted, as well as their default assumed values. # denotes a comment for the purposes of illustration. 
  
 Field ordering is canonical. Field ordering is canonical.
  
-''+These fields are always present
-These fields are always present+
   "ver": "4:3",   "ver": "4:3",
   "id": "0436430c-2b02-624c-2032-570501212b00",   "id": "0436430c-2b02-624c-2032-570501212b00",
Line 149: Line 148:
   "off": "d202964900000000d302964900000000d402964900000000d502964900000000",   "off": "d202964900000000d302964900000000d402964900000000d502964900000000",
  
-These fields may or may not be present +These fields may or may not be present 
-//"num_parts: 2, +   
-//"fee": "8000000", +  "num_parts": 2, 
-//"amt": "1000000000", +  "fee": "8000000", 
-//"feat": 0, +  "amt": "1000000000", 
-//"ttl": null,+  "feat": 0, 
 +  "ttl": null,
  
-Sigs is always present with at least one entry+Sigs is always present with at least one entry
   "sigs": [   "sigs": [
     {     {
       "xs": "03b0d73a044f1f9ae06cf96ef91593f121864b66bf7f7e7ac481b0ce61e39847fe",       "xs": "03b0d73a044f1f9ae06cf96ef91593f121864b66bf7f7e7ac481b0ce61e39847fe",
-//    "part": null,+      "part": null,
       "nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",       "nonce": "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f",
     }     }
-  ] 
  
-These structs may or may not be present+These structs may or may not be present 
 + 
 +  "coms": null, 
 +  "proof": null, 
 +  "feat_args": null 
  
-//"coms": null, 
-//"proof": null, 
-//"feat_args": null 
-} 
-'' 
  
-A description of all fields and their meanings is as follows:+**A description of all fields and their meanings is as follows:**
  
 ==== Top-Level Slate Struct ==== ==== Top-Level Slate Struct ====
Line 253: Line 252:
 If included, the proof structure is: If included, the proof structure is:
  
-''  "proof":+  "proof":
-    "saddr": "7e008eb593ba17d116e282d6267a3c6aad87b910933ad34dfa4d7d2c92b6ba31", +  "saddr": "7e008eb593ba17d116e282d6267a3c6aad87b910933ad34dfa4d7d2c92b6ba31", 
-//  "rsig": null, +  "rsig": null, 
-    "raddr": "3a425bd5da5f0f78593251ede7fad0ecf7a95679d84b2cb405255d97ce068234" +  "raddr": "3a425bd5da5f0f78593251ede7fad0ecf7a95679d84b2cb405255d97ce068234"
-  }''+
      
 The proof struct is an optional payment proof request that must be filled out by the recipient if requested (only valid for basic transaction flow). Its fields are as follows: The proof struct is an optional payment proof request that must be filled out by the recipient if requested (only valid for basic transaction flow). Its fields are as follows:
Line 298: Line 296:
 Depending on the chosen Kernel Feature set, feat_args may be populated with arguments specific to the kernel. The exact arguments that will be present here depend on the value of feat. Currently, the only supported kernel is HeightLocked (value 1) which has the arguments: Depending on the chosen Kernel Feature set, feat_args may be populated with arguments specific to the kernel. The exact arguments that will be present here depend on the value of feat. Currently, the only supported kernel is HeightLocked (value 1) which has the arguments:
  
-''"feat_args": { +  "feat_args":  
-   "lock_hgt": "2343234" // For HeightLocked kernels (1) +  "lock_hgt": "2343234" // For HeightLocked kernels (1) 
-}''+
  
 ==== Changes from existing V3 Slate ==== ==== Changes from existing V3 Slate ====
Line 342: Line 340:
 The examples above are pretty-printed for reference, but all Slates should remove all whitespace before sending to other parties. The whitespace and formatting can be re-added anywhere the Slate needs to be presented for debugging. The examples above are pretty-printed for reference, but all Slates should remove all whitespace before sending to other parties. The whitespace and formatting can be re-added anywhere the Slate needs to be presented for debugging.
  
-==== Slate Definition - Binary ==== 
- 
-While the JSON slate remains the first-order slate definition, and should be accepted by all wallets and APIs, wallets should also have the ability to transform slates between the JSON format and a reduced binary format suitable for armoring or direct transfer. The definition of the V4 binary slate format follows. 
- 
-All integer values are Big-Endian. 
- 
-Slate V4 Field type len notes 
-ver.slate_version u16 2  
-ver.block_header_version u16 2  
-id Uuid 16 binary Uuid representation 
-sta u8 1 See Status Byte 
-offset BlindingFactor 32  
-Optional field status u8 1 See Optional Field Status 
-num_parts u8 (1) If present 
-amt u64 (8) If present 
-fee u64 (8) If present 
-feat u8 (1) If present 
-ttl u64 (8) If present 
-sigs entries struct varies See Sigs Entries 
-Optional struct status u8 1 See Optional Struct Status 
-coms entries struct (varies) If present. See Coms Entries 
-proof struct (varies) If present. See Proof 
-feat_args entries struct (varies) If present. See Feature Args 
-Status Byte 
-Encodes slate status (sta) field, mapped as follows: 
- 
-State value 
-NA (Unknown) 0 
-S1 1 
-S2 2 
-S3 3 
-I1 4 
-I2 5 
-I3 6 
- 
-**Optional Field Status** 
- 
-A bit field that denotes the presence or absence of the optional slate fields. Each bit is mapped to particular slate field as follows: 
- 
-Bit 7 6 5 4 3 2 1 0 
-field ttl feat fee amt num_parts 
-If the corresponding field for a bit is 1, the field is present and must be read accordingly. 
- 
-**Sigs Entries** 
- 
-Sigs Entries contains a length-prefixed array of entries corresponding to the sigs struct. 
- 
-Field type len notes 
-length u8 1  
-entries struct varies array of entries, see below 
-Each Sigs Entry is structured as follows: 
- 
-Field type len notes 
-complete flag u8 1 If non-zero, entry contains part 
-xs secp256k1 Public Key 33  
-nonce secp256k1 Public Key 33  
-part secp256k1 AggSig (64) If present 
-Optional Struct Status 
-A bit field that denotes the presence or absence of the optional slate structures. Each bit is mapped to particular slate structure as follows: 
- 
-Bit 7 6 5 4 3 2 1 0 
-struct proof coms 
-If the corresponding field for a struct is 1, the struct is present and must be read accordingly. 
- 
-**Coms Entries** 
- 
-Coms Entries contains a length-prefixed array of entries corresponding to the coms struct. 
- 
-Field type len notes 
-length u16 2  
-entries struct varies array of entries, see below 
-Each Coms Entry is structured as follows: 
- 
-Field type len notes 
-output flag u8 1 If non-zero, entry is output and contains p (proof) 
-f u8 1 features (1 = Coinbase, 0 = Plain) 
-c Commitment 33  
-p Rangeproof 675 If present 
- 
-**Proof** 
- 
-Optional Payment proof, with fields as follows 
- 
-Proof Field type len notes 
-saddr ed25519 Public Key 32  
-raddr ed25519 Public Key 32  
-rsig flag u8 1 If non-zero, rsig field is present 
-rsig ed25519 EDCSA Sig (64) If present 
-Feature Args 
-Optional feature args, presence or absence of which should be determined by the value of the feat field. Currently only present if feat is 2. 
- 
-Field type len notes 
-lock_hgt u64 8 Lock height, present if feat is 2 
  
slates.txt · Last modified: by transatoshi