Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tweaking Fr and Fq fromString functionality to distinguish number-only strings #10529

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions yarn-project/accounts/src/testing/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { Fr } from '@aztec/foundation/fields';
import { SchnorrAccountContractArtifact, getSchnorrAccount } from '../schnorr/index.js';

export const INITIAL_TEST_SECRET_KEYS = [
Fr.fromString('2153536ff6628eee01cf4024889ff977a18d9fa61d0e414422f7681cf085c281'),
Fr.fromString('aebd1b4be76efa44f5ee655c20bf9ea60f7ae44b9a7fd1fd9f189c7a0b0cdae'),
Fr.fromString('0f6addf0da06c33293df974a565b03d1ab096090d907d98055a8b7f4954e120c'),
Fr.fromHexString('2153536ff6628eee01cf4024889ff977a18d9fa61d0e414422f7681cf085c281'),
Fr.fromHexString('aebd1b4be76efa44f5ee655c20bf9ea60f7ae44b9a7fd1fd9f189c7a0b0cdae'),
Fr.fromHexString('0f6addf0da06c33293df974a565b03d1ab096090d907d98055a8b7f4954e120c'),
];

export const INITIAL_TEST_ENCRYPTION_KEYS = INITIAL_TEST_SECRET_KEYS.map(secretKey =>
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/archiver/src/archiver/archiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ class ArchiverStoreHelper
for (const [classIdString, classEvents] of Object.entries(
groupBy([...privateFnEvents, ...unconstrainedFnEvents], e => e.contractClassId.toString()),
)) {
const contractClassId = Fr.fromString(classIdString);
const contractClassId = Fr.fromHexString(classIdString);
const contractClass = await this.getContractClass(contractClassId);
if (!contractClass) {
this.#log.warn(`Skipping broadcasted functions as contract class ${contractClassId.toString()} was not found`);
Expand Down
8 changes: 4 additions & 4 deletions yarn-project/archiver/src/archiver/data_retrieval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export async function retrieveL1ToL2Messages(

for (const log of messageSentLogs) {
const { index, hash } = log.args;
retrievedL1ToL2Messages.push(new InboxLeaf(index!, Fr.fromString(hash!)));
retrievedL1ToL2Messages.push(new InboxLeaf(index!, Fr.fromHexString(hash!)));
}

// handles the case when there are no new messages:
Expand All @@ -230,7 +230,7 @@ export async function retrieveL2ProofVerifiedEvents(
return logs.map(log => ({
l1BlockNumber: log.blockNumber,
l2BlockNumber: log.args.blockNumber,
proverId: Fr.fromString(log.args.proverId),
proverId: Fr.fromHexString(log.args.proverId),
txHash: log.transactionHash,
}));
}
Expand Down Expand Up @@ -297,8 +297,8 @@ export async function getProofFromSubmitProofTx(
];

aggregationObject = Buffer.from(hexToBytes(decodedArgs.aggregationObject));
proverId = Fr.fromString(decodedArgs.args[6]);
archiveRoot = Fr.fromString(decodedArgs.args[1]);
proverId = Fr.fromHexString(decodedArgs.args[6]);
archiveRoot = Fr.fromHexString(decodedArgs.args[1]);
proof = Proof.fromBuffer(Buffer.from(hexToBytes(decodedArgs.proof)));
} else {
throw new Error(`Unexpected proof method called ${functionName}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class ContractClassStore {
}

getContractClassIds(): Fr[] {
return Array.from(this.#contractClasses.keys()).map(key => Fr.fromString(key));
return Array.from(this.#contractClasses.keys()).map(key => Fr.fromHexString(key));
}

async addFunctions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class MemoryArchiverStore implements ArchiverDataStore {
}

public getContractClassIds(): Promise<Fr[]> {
return Promise.resolve(Array.from(this.contractClasses.keys()).map(key => Fr.fromString(key)));
return Promise.resolve(Array.from(this.contractClasses.keys()).map(key => Fr.fromHexString(key)));
}

public getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined> {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/aztec/src/cli/cmds/start_pxe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export async function addPXE(
l2Contracts[key] = {
name: key,
address: AztecAddress.fromString(basicContractsInfo[key].address),
initHash: Fr.fromString(basicContractsInfo[key].initHash),
salt: Fr.fromString(basicContractsInfo[key].salt),
initHash: Fr.fromHexString(basicContractsInfo[key].initHash),
salt: Fr.fromHexString(basicContractsInfo[key].salt),
artifact: await getContractArtifact(artifactName, userLog),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export class BBNativePrivateKernelProver implements PrivateKernelProver {
fs.readFile(`${filePath}/${PROOF_FIELDS_FILENAME}`, { encoding: 'utf-8' }),
]);
const json = JSON.parse(proofString);
const fields = json.map(Fr.fromString);
const fields = json.map(Fr.fromHexString);
const numPublicInputs = vkData.numPublicInputs - AGGREGATION_OBJECT_LENGTH;
const fieldsWithoutPublicInputs = fields.slice(numPublicInputs);
this.log.info(
Expand Down
8 changes: 4 additions & 4 deletions yarn-project/bb-prover/src/prover/bb_prover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,8 @@ export class BBNativeRollupProver implements ServerCircuitProver {
const json = JSON.parse(proofString);
const fields = json
.slice(0, 3)
.map(Fr.fromString)
.concat(json.slice(3 + numPublicInputs).map(Fr.fromString));
.map(Fr.fromHexString)
.concat(json.slice(3 + numPublicInputs).map(Fr.fromHexString));
return new RecursiveProof(
fields,
new Proof(proof.binaryProof.buffer, vk.numPublicInputs),
Expand Down Expand Up @@ -877,8 +877,8 @@ export class BBNativeRollupProver implements ServerCircuitProver {

const fieldsWithoutPublicInputs = json
.slice(0, 3)
.map(Fr.fromString)
.concat(json.slice(3 + numPublicInputs).map(Fr.fromString));
.map(Fr.fromHexString)
.concat(json.slice(3 + numPublicInputs).map(Fr.fromHexString));
logger.debug(
`Circuit path: ${filePath}, complete proof length: ${json.length}, num public inputs: ${numPublicInputs}, circuit size: ${vkData.circuitSize}, is recursive: ${vkData.isRecursive}, raw length: ${binaryProof.length}`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function extractVkData(vkDirectoryPath: string): Promise<Verificati
fs.readFile(path.join(vkDirectoryPath, VK_FILENAME)),
]);
const fieldsJson = JSON.parse(rawFields);
const fields = fieldsJson.map(Fr.fromString);
const fields = fieldsJson.map(Fr.fromHexString);
// The hash is not included in the BB response
const vkHash = hashVK(fields);
const vkAsFields = new VerificationKeyAsFields(fields, vkHash);
Expand All @@ -37,7 +37,7 @@ export async function extractAvmVkData(vkDirectoryPath: string): Promise<Verific
fs.readFile(path.join(vkDirectoryPath, VK_FILENAME)),
]);
const fieldsJson = JSON.parse(rawFields);
const fields = fieldsJson.map(Fr.fromString);
const fields = fieldsJson.map(Fr.fromHexString);
// The first item is the hash, this is not part of the actual VK
// TODO: is the above actually the case?
const vkHash = fields[0];
Expand Down
10 changes: 5 additions & 5 deletions yarn-project/bot/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,20 @@ export const botConfigMappings: ConfigMappingsType<BotConfig> = {
senderPrivateKey: {
env: 'BOT_PRIVATE_KEY',
description: 'Signing private key for the sender account.',
parseEnv: (val: string) => Fr.fromString(val),
parseEnv: (val: string) => Fr.fromHexString(val),
defaultValue: Fr.random(),
},
recipientEncryptionSecret: {
env: 'BOT_RECIPIENT_ENCRYPTION_SECRET',
description: 'Encryption secret for a recipient account.',
parseEnv: (val: string) => Fr.fromString(val),
defaultValue: Fr.fromString('0xcafecafe'),
parseEnv: (val: string) => Fr.fromHexString(val),
defaultValue: Fr.fromHexString('0xcafecafe'),
},
tokenSalt: {
env: 'BOT_TOKEN_SALT',
description: 'Salt for the token contract deployment.',
parseEnv: (val: string) => Fr.fromString(val),
defaultValue: Fr.fromString('1'),
parseEnv: (val: string) => Fr.fromHexString(val),
defaultValue: Fr.fromHexString('1'),
},
txIntervalSeconds: {
env: 'BOT_TX_INTERVAL_SECONDS',
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/circuit-types/src/interfaces/prover-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const proverConfigMappings: ConfigMappingsType<ProverConfig> = {
};

function parseProverId(str: string) {
return Fr.fromString(str.startsWith('0x') ? str : Buffer.from(str, 'utf8').toString('hex'));
return Fr.fromHexString(str.startsWith('0x') ? str : Buffer.from(str, 'utf8').toString('hex'));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('ContractClass', () => {
const artifact = getBenchmarkContractArtifact();
const contractClass = getContractClassFromArtifact({
...artifact,
artifactHash: Fr.fromString('0x1234'),
artifactHash: Fr.fromHexString('0x1234'),
});

// Assert bytecode has a reasonable length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ describe('ContractClass', () => {
it('calculates the contract class id', () => {
const contractClass: ContractClass = {
version: 1,
artifactHash: Fr.fromString('0x1234'),
artifactHash: Fr.fromHexString('0x1234'),
packedBytecode: Buffer.from('123456789012345678901234567890', 'hex'),
privateFunctions: [
{
selector: FunctionSelector.fromString('0x12345678'),
vkHash: Fr.fromString('0x1234'),
vkHash: Fr.fromHexString('0x1234'),
},
],
publicFunctions: [
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/circuits.js/src/keys/derivation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('🔑', () => {
const masterOutgoingViewingPublicKey = new Point(new Fr(5), new Fr(6), false);
const masterTaggingPublicKey = new Point(new Fr(7), new Fr(8), false);

const expected = Fr.fromString('0x0fecd9a32db731fec1fded1b9ff957a1625c069245a3613a2538bd527068b0ad');
const expected = Fr.fromHexString('0x0fecd9a32db731fec1fded1b9ff957a1625c069245a3613a2538bd527068b0ad');
expect(
new PublicKeys(
masterNullifierPublicKey,
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('🔑', () => {

const publicKeys = new PublicKeys(npkM, ivpkM, ovpkM, tpkM);

const partialAddress = Fr.fromString('0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de');
const partialAddress = Fr.fromHexString('0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de');

const address = computeAddress(publicKeys, partialAddress).toString();
expect(address).toMatchSnapshot();
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/circuits.js/src/structs/complete_address.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('CompleteAddress', () => {
);

const address = new AztecAddress(
Fr.fromString('0x24e4646f58b9fbe7d38e317db8d5636c423fbbdfbe119fc190fe9c64747e0c62'),
Fr.fromHexString('0x24e4646f58b9fbe7d38e317db8d5636c423fbbdfbe119fc190fe9c64747e0c62'),
);
const npkM = Point.fromString(
'0x22f7fcddfa3ce3e8f0cc8e82d7b94cdd740afa3e77f8e4a63ea78a239432dcab0471657de2b6216ade6c506d28fbc22ba8b8ed95c871ad9f3e3984e90d9723a7',
Expand All @@ -55,7 +55,7 @@ describe('CompleteAddress', () => {
'0x00d3d81beb009873eb7116327cf47c612d5758ef083d4fda78e9b63980b2a7622f567d22d2b02fe1f4ad42db9d58a36afd1983e7e2909d1cab61cafedad6193a',
);

const partialAddress = Fr.fromString('0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de');
const partialAddress = Fr.fromHexString('0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de');

const completeAddressFromComponents = new CompleteAddress(
address,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli-wallet/src/cmds/bridge_fee_juice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export async function bridgeL1FeeJuice(
setTimeout(async () => {
const witness = await pxe.getL1ToL2MembershipWitness(
feeJuiceAddress,
Fr.fromString(messageHash),
Fr.fromHexString(messageHash),
claimSecret,
);
resolve(witness);
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/cli-wallet/src/utils/options/fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ export function parsePaymentMethod(
}
log(`Using Fee Juice for fee payments with claim for ${claimAmount} tokens`);
return new FeeJuicePaymentMethodWithClaim(sender.getAddress(), {
claimAmount: typeof claimAmount === 'string' ? Fr.fromString(claimAmount) : new Fr(claimAmount),
claimSecret: Fr.fromString(claimSecret),
claimAmount: typeof claimAmount === 'string' ? Fr.fromHexString(claimAmount) : new Fr(claimAmount),
claimSecret: Fr.fromHexString(claimSecret),
messageLeafIndex: BigInt(messageLeafIndex),
});
} else {
Expand Down
7 changes: 6 additions & 1 deletion yarn-project/cli/src/cmds/devnet/bootstrap_network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ async function fundFPC(
true,
);

await retryUntil(async () => await wallet.isL1ToL2MessageSynced(Fr.fromString(messageHash)), 'message sync', 600, 1);
await retryUntil(
async () => await wallet.isL1ToL2MessageSynced(Fr.fromHexString(messageHash)),
'message sync',
600,
1,
);

const counter = await CounterContract.at(counterAddress, wallet);

Expand Down
6 changes: 3 additions & 3 deletions yarn-project/cli/src/utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export function parsePublicKey(publicKey: string): PublicKeys | undefined {
*/
export function parsePartialAddress(address: string): Fr {
try {
return Fr.fromString(address);
return Fr.fromHexString(address);
} catch (err) {
throw new InvalidArgumentError(`Invalid partial address: ${address}`);
}
Expand All @@ -314,7 +314,7 @@ export function parsePartialAddress(address: string): Fr {
*/
export function parseSecretKey(secretKey: string): Fr {
try {
return Fr.fromString(secretKey);
return Fr.fromHexString(secretKey);
} catch (err) {
throw new InvalidArgumentError(`Invalid encryption secret key: ${secretKey}`);
}
Expand All @@ -330,7 +330,7 @@ export function parseField(field: string): Fr {
try {
const isHex = field.startsWith('0x') || field.match(new RegExp(`^[0-9a-f]{${Fr.SIZE_IN_BYTES * 2}}$`, 'i'));
if (isHex) {
return Fr.fromString(field);
return Fr.fromHexString(field);
}

if (['true', 'false'].includes(field)) {
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/end-to-end/src/devnet/e2e_smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ describe('End-to-end tests for devnet', () => {
.deploy({
fee: {
paymentMethod: new FeeJuicePaymentMethodWithClaim(l2Account.getAddress(), {
claimAmount: Fr.fromString(claimAmount),
claimSecret: Fr.fromString(claimSecret.value),
claimAmount: Fr.fromHexString(claimAmount),
claimSecret: Fr.fromHexString(claimSecret.value),
messageLeafIndex: BigInt(messageLeafIndex),
}),
},
Expand Down
10 changes: 5 additions & 5 deletions yarn-project/end-to-end/src/e2e_authwit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('e2e_authwit_tests', () => {
// 6. We check that the authwit is NOT valid in private for wallet[1] (check that it is not signed by 1)

// docs:start:compute_inner_authwit_hash
const innerHash = computeInnerAuthWitHash([Fr.fromString('0xdead')]);
const innerHash = computeInnerAuthWitHash([Fr.fromHexString('0xdead')]);
// docs:end:compute_inner_authwit_hash
// docs:start:compute_arbitrary_authwit_hash

Expand Down Expand Up @@ -87,7 +87,7 @@ describe('e2e_authwit_tests', () => {
});
describe('failure case', () => {
it('invalid chain id', async () => {
const innerHash = computeInnerAuthWitHash([Fr.fromString('0xdead'), Fr.fromString('0xbeef')]);
const innerHash = computeInnerAuthWitHash([Fr.fromHexString('0xdead'), Fr.fromHexString('0xbeef')]);
const intent = { consumer: auth.address, innerHash };

const messageHash = computeAuthWitMessageHash(intent, { chainId: Fr.random(), version });
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('e2e_authwit_tests', () => {
});

it('invalid version', async () => {
const innerHash = computeInnerAuthWitHash([Fr.fromString('0xdead'), Fr.fromString('0xbeef')]);
const innerHash = computeInnerAuthWitHash([Fr.fromHexString('0xdead'), Fr.fromHexString('0xbeef')]);
const intent = { consumer: auth.address, innerHash };

const messageHash = computeAuthWitMessageHash(intent, { chainId, version: Fr.random() });
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('e2e_authwit_tests', () => {
describe('Public', () => {
describe('arbitrary data', () => {
it('happy path', async () => {
const innerHash = computeInnerAuthWitHash([Fr.fromString('0xdead'), Fr.fromString('0x01')]);
const innerHash = computeInnerAuthWitHash([Fr.fromHexString('0xdead'), Fr.fromHexString('0x01')]);

const intent = { consumer: wallets[1].getAddress(), innerHash };

Expand Down Expand Up @@ -185,7 +185,7 @@ describe('e2e_authwit_tests', () => {

describe('failure case', () => {
it('cancel before usage', async () => {
const innerHash = computeInnerAuthWitHash([Fr.fromString('0xdead'), Fr.fromString('0x02')]);
const innerHash = computeInnerAuthWitHash([Fr.fromHexString('0xdead'), Fr.fromHexString('0x02')]);
const intent = { consumer: auth.address, innerHash };

expect(await wallets[0].lookupValidity(wallets[0].getAddress(), intent)).toEqual({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('e2e_cross_chain_messaging token_bridge_public', () => {
// 2. Deposit tokens to the TokenPortal
logger.verbose(`2. Deposit tokens to the TokenPortal`);
const claim = await crossChainTestHarness.sendTokensToPortalPublic(bridgeAmount);
const msgHash = Fr.fromString(claim.messageHash);
const msgHash = Fr.fromHexString(claim.messageHash);
expect(await crossChainTestHarness.getL1BalanceOf(ethAccount)).toBe(l1TokenBalance - bridgeAmount);

// Wait for the message to be available for consumption
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('e2e_cross_chain_messaging token_bridge_public', () => {

await crossChainTestHarness.mintTokensOnL1(l1TokenBalance);
const claim = await crossChainTestHarness.sendTokensToPortalPublic(bridgeAmount);
const msgHash = Fr.fromString(claim.messageHash);
const msgHash = Fr.fromHexString(claim.messageHash);
expect(await crossChainTestHarness.getL1BalanceOf(ethAccount)).toBe(l1TokenBalance - bridgeAmount);

await crossChainTestHarness.makeMessageConsumable(msgHash);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/fixtures/l1_to_l2_messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ export async function sendL1ToL2Message(
const receivedMsgHash = topics.args.hash;
const receivedGlobalLeafIndex = topics.args.index;

return [Fr.fromString(receivedMsgHash), new Fr(receivedGlobalLeafIndex)];
return [Fr.fromHexString(receivedMsgHash), new Fr(receivedGlobalLeafIndex)];
}
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/guides/dapp_testing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('guides/dapp/testing', () => {

it('checks unencrypted logs, [Kinda broken with current implementation]', async () => {
// docs:start:unencrypted-logs
const value = Fr.fromString('ef'); // Only 1 bytes will make its way in there :( so no larger stuff
const value = Fr.fromHexString('ef'); // Only 1 bytes will make its way in there :( so no larger stuff
const tx = await testContract.methods.emit_unencrypted(value).send().wait();
const filter = {
fromBlock: tx.blockNumber!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TokenContract } from '@aztec/noir-contracts.js/Token';
import { setup } from '../fixtures/utils.js';

// docs:start:account-contract
const PRIVATE_KEY = GrumpkinScalar.fromString('0xd35d743ac0dfe3d6dbe6be8c877cb524a00ab1e3d52d7bada095dfc8894ccfa');
const PRIVATE_KEY = GrumpkinScalar.fromHexString('0xd35d743ac0dfe3d6dbe6be8c877cb524a00ab1e3d52d7bada095dfc8894ccfa');

/** Account contract implementation that authenticates txs using Schnorr signatures. */
class SchnorrHardcodedKeyAccountContract extends DefaultAccountContract {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/shared/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const browserTestSuite = (
async (rpcUrl, secretKeyString) => {
const { Fr, createPXEClient, getUnsafeSchnorrAccount } = window.AztecJs;
const pxe = createPXEClient(rpcUrl!);
const secretKey = Fr.fromString(secretKeyString);
const secretKey = Fr.fromHexString(secretKeyString);
const account = getUnsafeSchnorrAccount(pxe, secretKey);
await account.waitSetup();
const completeAddress = account.getCompleteAddress();
Expand Down
Loading
Loading