I'm following this tutorial: https://docs.gnosis-safe.io/learn/safe-core-account-abstraction-sdk/protocol-kit

this is my repo to try to get this working. I have a .env file with the 3 keys: https://github.com/billyjitsu/safetest

I run npx ts-node index.ts
And receive this error:

TypeError: Cannot read properties of undefined (reading 'toHexString')

What am I missing?

1 Answer 1


Are you sure your environment variables are available in process.env?
Maybe you should use the dotenv library?

  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review Commented Apr 20, 2023 at 7:15

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.