Skip to content

Bithomp/xrpl-go-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@Bithomp/xrpl-go-api A Bithomp Go library for XRPL

Go Report Card GoDoc

Tests

go test -v ./...

clean package

go clean -i ./...

# To import all the necessary modules
go mod tidy

# To update the modules
go get -u ./...

Generate address and seed

package main

import (
  "fmt"
  "github.com/Bithomp/xrpl-go-api/crypto"
  "github.com/Bithomp/xrpl-go-api/wallet"
)

func main() {
  // Generate an address and seed
  seed, address, _ := wallet.Generate(crypto.ALGORITHM_ED25519)
  fmt.Println("Address: ", address)
  fmt.Println("Seed: ", seed)
}

Convert classic address to X-address

package main

import (
  "fmt"
  "github.com/Bithomp/xrpl-go-api/address_codec"
)

func main() {
  // Convert classic address to X-address
  xAddress := address_codec.ClassicAddressToXAddress("rsuUjfWxrACCAwGQDsNeZUhpzXf1n1NK5Z", nil, false)
  fmt.Println("xAddress: ", xAddress) // X7czuu79XJ4GHhN5bsHDNyNjCrDFgjXw9rE9ELS86d47DXo
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages