mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-05 04:15:50 +00:00
27 lines
557 B
Go
27 lines
557 B
Go
package main
|
|
|
|
import (
|
|
"github.com/Peersyst/xrpl-go/xrpl/queries/utility"
|
|
"github.com/Peersyst/xrpl-go/xrpl/rpc"
|
|
)
|
|
|
|
func main() {
|
|
// Define the network client configuration
|
|
cfg, err := rpc.NewClientConfig("https://s.altnet.rippletest.net:51234/")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
// Initiate the network client
|
|
client := rpc.NewClient(cfg)
|
|
|
|
// Ping the network (used to avoid Go unused variable error, but useful to check connectivity)
|
|
_, err = client.Ping(&utility.PingRequest{})
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
// ... custom code goes here
|
|
|
|
}
|