Skip to content

Repository files navigation

nmcjson

nmcjson extends the btcjson package with Namecoin-specific JSON-RPC commands.

Examples

// Register nmcjson commands with btcjsonnmcjson.Init()
id:=1// Create the commandnameListCmd, err:=nmcjson.NewNameListCmd(id)
iferr!=nil {
panic("Something wrong")
}
// Send the command and get a replynameListReply, err:=btcjson.RpcSend(myName, myPass, myURL, nameListCmd)
iferr!=nil {
panic("Something wrong")
}
// Print the replyifnameListReply.Result!=nil {
ifinfo, ok:=nameListReply.Result.([]nmcjson.NameListResult); ok {
for_, v:=rangeinfo {
fmt.Printf("Name: %v\n", v.Name)
}
}
}

Documentation

Full go doc style documentation can be viewed online using the GoDoc site here.

Installation

$ go get github.com/kefkius/nmcjson

TODO

  • Unit tests

License

nmcjson is licensed under the liberal ISC License, the same license btcjson is licensed under.

About

Namecoin extension of btcjson

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages