Skip to content

how did u imported the private key? #9

@cell0901

Description

@cell0901

i tried importing from .env why it doesnt works (the key is right). Also i cant find any way to import it as bytes in wallets? then how did he did it?

async function main() {
16 |     const keypair = Keypair.fromSecretKey(
17 |         Uint8Array.from(JSON.parse(process.env.PRIVATE_KEY!))
                                  ^
SyntaxError: JSON Parse error: Unable to parse JSON string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions