issueZPass
Description
The issueZPass method allows you to issue a new ZPass credential on-chain. This method handles the on-chain interaction for creating a new ZPass credential.
Parameters
options(OnChainOptions): An object containing the necessary parameters for on-chain interaction:programName(string): The Aleo program namefunctionName(string): Name of the function to executeinputs(string[]): Array of input parameters for the functionfee(number): Transaction fee in microcreditsprivateFee(boolean): Whether to use private feefeeRecord(string, optional): Record for private fee payment if private fee is used
Returns
Returns a Promise that resolves to a string containing the transaction ID of the issued ZPass.
transactionId(string): The transaction ID of the issued ZPass
Example
const transactionId = await zpass.issueZPass({
programName,
functionName: functionName,
inputs: [signature, `{
issuer: ${issuer},
subject: ${subject},
dob: ${dob},
nationality: ${nationality},
expiry: ${expiry}
}`,
`{ salt: ${salt} }`,
],
fee: 300000,
privateFee: false,
});Last updated