This repository was archived by the owner on Mar 4, 2023. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork0
touilleio/alephium-go-client
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
WarningThis project is no longer maintained, please use the official go-sdk from Alephium:https://github.com/alephium/go-sdk
This project is a simple, yet expressive, API ClientforAlephium blockchain,written inGolang.
The client wraps the API call in regular functions, ready to be used:
import ("github.com/sirupsen/logrus""github.com/touilleio/alephium-go-client")alephiumClient, err := alephium.New("http://localhost:12973", logrus.StandardLogger())// Create a miner walletminerWallet, err := alephiumClient.CreateWallet("", "walletPassword", true, "")// Get the addresses of the freshly created miner walletwalletAddresses, err := alephiumClient.GetWalletAddresses(minerWallet.Name)// Wait until the node is sync'ed with bootstrap nodesalephiumClient.WaitUntilSyncedWithAtLeastOnePeer()
Build:
go build .
Test:
go test .
If you want to run your node manually,
docker run -it --rm -v ${PWD}/user-dev-standalone.conf:/alephium-home/.alephium/user.conf -p 12973:12973 alephium/alephium:v1.1.13