I am trying to create a token collection using the Aptos Typescript SDK.
const account = new AptosAccount(Uint8Array.from(Buffer.from(PRIVATE_KEY)), ACCOUNT_ADDR);
await tokenClient.createCollection(
account,
"A test collection 1",
"A test collection",
"https://google.com",
);
But I get the following error:
ApiError2: {"message":"Invalid transaction: Type: Validation Code: INVALID_AUTH_KEY","error_code":"vm_error","vm_error_code":2}
What am I doing wrong?
Tried replicating the Aptos official example but instead of creating a new account, I want to use an existing funded account.
Let's say you have a private key as a hex string, you can do it like this: