etherspot / etherspot-prime-sdk

Etherspot Prime - Account Abstraction SDK
https://etherspot.fyi
MIT License
129 stars 22 forks source link

Invalid Wallet Provider [BUG] #86

Closed Linux-Server closed 12 months ago

Linux-Server commented 12 months ago
Screenshot 2023-12-07 at 2 30 50 PM

Describe the bug

Invalid wallet provider at new PrimeSdk

Expected behavior

Im trying to inistantiate the prive sdk with "npm run 01-get-address" ` import { PrimeSdk } from '../src'; import * as dotenv from 'dotenv';

dotenv.config();

async function main() { // initializating sdk... const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key' })

// get EtherspotWallet address... const address: string = await primeSdk.getCounterFactualAddress(); console.log('\x1b[33m%s\x1b[0m', EtherspotWallet address: ${address}); }

main() .catch(console.error) .finally(() => process.exit());

`

Steps to reproduce

No response

Additional context

No response

Operating system

macOS

Prime SDK version or commit hash

1.3.13

arddluma commented 12 months ago

Screenshot 2023-12-07 at 2 30 50 PM ### Describe the bug Invalid wallet provider at new PrimeSdk

Expected behavior

Im trying to inistantiate the prive sdk with "npm run 01-get-address" ` import { PrimeSdk } from '../src'; import * as dotenv from 'dotenv';

dotenv.config();

async function main() { // initializating sdk... const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key' })

// get EtherspotWallet address... const address: string = await primeSdk.getCounterFactualAddress(); console.log('\x1b[33m%s\x1b[0m', EtherspotWallet address: ${address}); }

main() .catch(console.error) .finally(() => process.exit());

`

Steps to reproduce

No response

Additional context

No response

Operating system

macOS

Prime SDK version or commit hash

1.3.13

hello there, thanks for creating issue on GitHub. Have you set WALLET_PRIVATE_KEY in .env and CHAIN_ID ? Keep in mind priv key should start with 0x...

Linux-Server commented 12 months ago

Screenshot 2023-12-07 at 2 30 50 PM ### Describe the bug Invalid wallet provider at new PrimeSdk

Expected behavior

Im trying to inistantiate the prive sdk with "npm run 01-get-address" import { PrimeSdk } from '../src'; import * as dotenv from 'dotenv'; dotenv.config(); async function main() { // initializating sdk... const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key' }) // get EtherspotWallet address... const address: string = await primeSdk.getCounterFactualAddress(); console.log('\x1b[33m%s\x1b[0m',EtherspotWallet address: ${address}); } main() .catch(console.error) .finally(() => process.exit());

Steps to reproduce

No response

Additional context

No response

Operating system

macOS

Prime SDK version or commit hash

1.3.13

hello there, thanks for creating issue on GitHub. Have you set WALLET_PRIVATE_KEY in .env and CHAIN_ID ? Keep in mind priv key should start with 0x...

It's working now, but it should mentioned in that prime sdk docs..

arddluma commented 12 months ago

Screenshot 2023-12-07 at 2 30 50 PM ### Describe the bug Invalid wallet provider at new PrimeSdk

Expected behavior

Im trying to inistantiate the prive sdk with "npm run 01-get-address" import { PrimeSdk } from '../src'; import * as dotenv from 'dotenv'; dotenv.config(); async function main() { // initializating sdk... const primeSdk = new PrimeSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), projectKey: 'public-prime-testnet-key' }) // get EtherspotWallet address... const address: string = await primeSdk.getCounterFactualAddress(); console.log('\x1b[33m%s\x1b[0m',EtherspotWallet address: ${address}); } main() .catch(console.error) .finally(() => process.exit());

Steps to reproduce

No response

Additional context

No response

Operating system

macOS

Prime SDK version or commit hash

1.3.13

hello there, thanks for creating issue on GitHub. Have you set WALLET_PRIVATE_KEY in .env and CHAIN_ID ? Keep in mind priv key should start with 0x...

It's working now, but it should mentioned in that prime sdk docs..

good point! we gonna improve the docs. thank you!

taylorferran commented 12 months ago

Added an info tag about this in the intro and to all example docs here: https://etherspot.fyi/examples/intro

Thanks for reporting.