Output ABI encoding function
- Source:
Methods
(inner) decodeNote(note) → {Array.<Object>}
Decode a note
Parameters:
| Name | Type | Description |
|---|---|---|
note |
note |
AZTEC note |
- Source:
(inner) decodeNotes(notes) → {Array.<Object>}
Decode an array of notes
Parameters:
| Name | Type | Description |
|---|---|---|
notes |
note |
array of AZTEC notes |
- Source:
(inner) decodeProofOutput(proofOutput) → {Array.<Object>}
Decode a bytes proofOutput string into it's constitutent objects
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutput |
Object |
bytes proofOutput string, outputted from a zero-knowledge proof |
- Source:
(inner) decodeProofOutputs(proofOutputsHex) → {Array.<Object>}
Decode a bytes proofOutputs object into the constituent variables of each individual bytes proofOutput object
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutputsHex |
string |
bytes proofOutputs string, containing multiple individual bytes proofOutput objects |
- Source:
(inner) encodeNote(note, encodeMetaData) → {string}
Encode an output note, according to the ABI encoding specification
Parameters:
| Name | Type | Description |
|---|---|---|
note |
note |
AZTEC note |
encodeMetaData |
bool |
boolean controlling whether metaData is to be encoded or not. Typically, if inputNotes are being encoded the metadata is not encoded whereas if outputNotes are being encoded then the metaData is encoded |
- Source:
(inner) encodeNotes(notes, encodeMetaData) → {string}
Encode an array of notes according to the ABI specification. Able to encode both input and output notes
Parameters:
| Name | Type | Description |
|---|---|---|
notes |
Array.<note> |
array of AZTEC notes |
encodeMetaData |
boolean |
boolean controlling whether metaData is to be encoded or not. Typically, if inputNotes are being encoded the metadata is not encoded whereas if outputNotes are being encoded then the metaData is encoded |
- Source:
(inner) encodeProofOutput(inputNotes, outputNotes, publicOwner, publicValue, challenge) → {string}
Encode a proofOutput object according to the ABI specification
Parameters:
| Name | Type | Description |
|---|---|---|
inputNotes |
Array.<note> |
array of notes to be input to a zero-knowledge proof |
outputNotes |
Array.<note> |
array of notes to be output from a zero-knowledge proof |
publicOwner |
address |
Ethereum address of the account |
publicValue |
Number |
quantity of public ERC20 tokens input to the zero-knowledge proof |
challenge |
string |
cryptographic challenge variable, part of the sigma protocol |
- Source:
(inner) encodeProofOutputs(proofOutputs) → {string}
Encode a proofOutputs object according to the ABI specification
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutputs |
Array.<Object> |
array of notes to be input to a zero-knowledge proof |
- Source:
(inner) getInputNotes(proofOutput)
Extract the the input notes from a proof output
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutput |
string |
the particular proofOutput the user wishes to select |
- Source:
(inner) getMetadata(notes) → {strings}
Extract the metadata from a notee
Parameters:
| Name | Type | Description |
|---|---|---|
notes |
string |
bytes note string |
- Source:
(inner) getNote(notes, i) → {string}
Extract the note from a bytes notes string
Parameters:
| Name | Type | Description |
|---|---|---|
notes |
string |
bytes notes string |
i |
Number |
index to the particular note the user wishes to select |
- Source:
(inner) getOutputNotes(proofOutput)
Extract the the input notes from a proof output
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutput |
string |
the particular proofOutput the user wishes to select |
- Source:
(inner) getProofOutput(proofOutputsHex, i) → {string}
Decode a bytes proofOutputs object into the constituent variables of each individual bytes proofOutput object
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutputsHex |
string |
bytes proofOutputs string, containing multiple individual bytes proofOutput objects |
i |
Number |
index to the particular proofOutput the user wishes to select |
- Source:
(inner) hashProofOutput(proofOutput) → {string}
Decode a bytes proofOutputs object into the constituent variables of each individual bytes proofOutput object
Parameters:
| Name | Type | Description |
|---|---|---|
proofOutput |
Object |
proofOutput object, contains transfer instructions |
- Source: