getAuthDetails
getAuthDetails
returns the details about the authenticated user, specifically all EOA addresses tied to the user's Fireblocks vault.
This method must be called after authenticate
. Otherwise, this method will throw an error with the message Not Authenticated
.
Usage
ts
import { createFireblocksSigner } from "./fireblocks";
const fireblocksSigner = await createFireblocksSigner();
const details = await fireblocksSigner.getAuthDetails();
ts
import { FireblocksSigner } from "@alchemy/aa-signers/fireblocks";
import { ChainId } from "@fireblocks/fireblocks-web3-provider";
export const createFireblocksSigner = async () => {
const fireblocksSigner = new FireblocksSigner({
privateKey: process.env.FIREBLOCKS_API_PRIVATE_KEY_PATH!,
apiKey: process.env.FIREBLOCKS_API_KEY!,
vaultAccountIds: process.env.FIREBLOCKS_VAULT_ACCOUNT_IDS,
chainId: ChainId.SEPOLIA,
});
await fireblocksSigner.authenticate();
return fireblocksSigner;
};
Returns
Promise<FireblocksUserInfo>
A Promise
containing the FireblocksUserInfo
, an object with the following fields:
addresses: Address[]
-- all EOA addresses accessible via the user's Fireblocks vault.