I want to create anonymous account using phala network.

Here is my logic.

You need to sign with your kyc account using the password as message and verify that the account is yours inside phala contract.


0x76e01859d6cf4a8637350bdb81e3cef71e29b7c2 signed Password

import { stringToU8a, u8aToHex } from '@polkadot/util';
import { signatureVerify } from '@polkadot/util-crypto';

const alice = keyring.addFromUri('//Alice');

const message = stringToU8a('this is our message');
const signature = alice.sign(message);

// verify the message using Alice's address, this is done inside phala network smart contract
const { isValid } = signatureVerify(message, signature, alice.address);

console.log(`${u8aToHex(signature)} is ${isValid ? 'valid' : 'invalid'}`);


Then sign using anonymous account using the same password and verify that the account is yours.

Than phala network smart contract links the two accounts.

But how do I connect with the phala contract from my blockchain, so that I can validate the that anonymous account is linked to kyc account.

Is it through offchain workers or xcm? Http address are also not safe as it can be blocked by ISP. I am very new to xcm messaging, all the examples given are about asset transfer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.