Skip to content

medoix/nmcjson

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nmcjson

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

Examples

        // Register nmcjson commands with btcjson
        nmcjson.Init()
        id := 1
        // Create the command
        nameListCmd, err := nmcjson.NewNameListCmd(id)
        if err != nil {
            panic("Something wrong")
        }
        // Send the command and get a reply
        nameListReply, err := btcjson.RpcSend(myName, myPass, myURL, nameListCmd)
        if err != nil {
            panic("Something wrong")
        }
        // Print the reply
        if nameListReply.Result != nil {
            if info, ok := nameListReply.Result.([]nmcjson.NameListResult); ok {
                for _, v := range info {
                    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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%