@lit-protocol/e2e
Version:
Lit Protocol E2E testing package for running comprehensive integration tests
18 lines • 769 B
JavaScript
export const createViemSignTransactionTest = (ctx, getAuthContext) => {
return async () => {
const pkpViemAccount = await ctx.litClient.getPkpViemAccount({
pkpPublicKey: ctx.aliceViemAccountPkp.pubkey,
authContext: getAuthContext(),
chainConfig: ctx.litClient.getChainConfig().viemConfig,
});
const txRequest = {
chainId: ctx.litClient.getChainConfig().viemConfig.id,
to: pkpViemAccount.address,
value: BigInt('1000000000000000'),
};
const signedTx = await pkpViemAccount.signTransaction(txRequest);
expect(signedTx).toBeDefined();
expect(signedTx).toMatch(/^0x[a-fA-F0-9]+$/);
};
};
//# sourceMappingURL=viem-sign-transaction.js.map