new JoinSplitProof65793(inputNotes, outputNotes, sender, publicValue, publicOwner)
Constructs a joinSplit proof. This is the standard AZTEC zero-knowledge proof that can be used to convert ERC20 tokens into AZTEC notes and vice versa. It can also be used to transfer notes.
Parameters:
| Name | Type | Description |
|---|---|---|
inputNotes |
Array.<Object> |
array of input notes, to be removed from a note registry |
outputNotes |
Array.<Object> |
array of output notes, to be added to a note registry |
sender |
string |
Ethereum address of the transaction sender |
publicValue |
Number |
number of public ERC20 tokens being converted into notes or vice versa |
publicOwner |
string |
Ethereum address of the publicValue owner |
Methods
constructBlindingFactors()
Generate blinding factors based on the previous blinding scalars
constructBlindingScalars()
Generate random blinding scalars, conditional on the AZTEC join-split proof statement.
constructSignatures(verifyingContract, inputNoteOwners) → {string}
Construct EIP712 signatures, giving permission for the input notes to be spent
Parameters:
| Name | Type | Description |
|---|---|---|
verifyingContract |
string |
Ethereum address of the ZkAsset contract, from which confidentialTransfer() is called |
inputNoteOwners |
Array.<string> |
Ethereum accounts of input note owners |
encodeABI(validator) → {Object}
Encode the join-split proof as data for an Ethereum transaction
Parameters:
| Name | Type | Description |
|---|---|---|
validator |
string |
Ethereum address of the join-split validator contract |