Signature Generation Procedure

In order to generate an ARCANA token, the Validator (on the content side) needs to allow the user to convert their EGG token into ARCANA. Additionally, during this process, it is necessary to embed the result value of the content into the ARCANA token without tampering with this value. To achieve this, the following procedure is performed: the content side creates a signature, and the user uses this signature to send a transaction. The private key of the eggid owner can be checked from the console of the development tools in the browser by logging in to the Validator UI as the target user.


Creation of Signature Data for ARCANA Generation

To create signature data, the following data is required.

Based on the above data, create the dataToBeSigned, which is the data to be signed, using the following steps:

const genSig = require("./genSig.js");

const signature = genSig.signForIncubate(eggid, toAddr, seed, contract, privateKey);

Creation of Signature Data for PERSONA Distribution

Based on the above data, create the signature data using the following steps:

const genSig = require("./genSig.js");

const sigInfoApp = genSig.signForPersonaApprove(to, tokenId, contract, privateKey);

const sigInfoAppNonce = sigInfoApp.nonce;
const sigInfoAppSign  = sigInfoApp.sign;

const sigInfoTrans = genSig.forPersonaTransferFrom(from, to, tokenId, contract, privateKey);

const sigInfoTransNonce = sigInfoTrans.nonce;
const sigInfoTransSign  = sigInfoTrans.sign;

Libraries

Refer to the environmental information.