Skip to content

Error initializing the project #5

@RicardoBrito1938

Description

@RicardoBrito1938

Hello i am trying to setup a simple app to create a wallet, store the private keys so i could be able to make transactions, but i am getting an initial error, and did not find any initial setup on documentation

`package main

import (
"fmt"

"github.com/blocktree/tron-adapter/tron"

)

func main() {

// Initialize WalletManager
wm := tron.NewWalletManager()

// Generate a new address
address, err := wm.GenerateAddress()
if err != nil {
	fmt.Println("Error generating address:", err)
	return
}

// Print the generated address and private key
fmt.Println("Address generated successfully!")
fmt.Println("Address:", address["address"])
fmt.Println("Private Key:", address["privateKey"])

}
`

when i run
go run main.go

I get the following error, would you be able to procie any guidance?
Error generating address: API url is not setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions