In note
Context vars:
0: 0 byte (>= 0 means spend, also encodes note output index in outputs, which allows multiple note spends in single tx)
1: GroupElement, a of signature
2: ByteArray, z of signature
3: ByteArray, avltree insert proof
Out note
R4 - avltree with inserted reserveNftId -> signature
R5 - next holders pk as GE (current holder of note)
R6 - Increment +1 (length of signers)
Transaction structure
Inputs:
n: note in
Outputs:
n: note out
Data inputs:
0: reserve box that holds the nft that was inserted into avltree of out note
Store
Will likely need to add a SignerService to the store that has a method like signers().restore_prover(¬e): BatchAVLProver in order to sign the note and insert values. Or maybe makes sense to have it on notes like notes().restore_prover(note_id)
Spending a note:
In note Context vars: 0:
0
byte (>= 0 means spend, also encodes note output index in outputs, which allows multiple note spends in single tx) 1:GroupElement
,a
of signature 2:ByteArray
,z
of signature 3:ByteArray
, avltree insert proofOut note
R4
- avltree with inserted reserveNftId -> signatureR5
- next holders pk as GE (current holder of note)R6
- Increment +1 (length of signers)Transaction structure Inputs:
n
: note inOutputs:
n
: note outData inputs: 0: reserve box that holds the nft that was inserted into avltree of out note
Store Will likely need to add a
SignerService
to the store that has a method likesigners().restore_prover(¬e): BatchAVLProver
in order to sign the note and insert values. Or maybe makes sense to have it onnotes
likenotes().restore_prover(note_id)