{"id":15146731,"url":"https://github.com/goipay/go-monero","last_synced_at":"2025-06-14T08:32:37.174Z","repository":{"id":246740681,"uuid":"822163872","full_name":"goipay/go-monero","owner":"goipay","description":"A Monero Go library (Monero Wallet/Daemon RPC clients, Monero Utils)","archived":false,"fork":false,"pushed_at":"2025-03-10T14:05:40.000Z","size":36249,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T21:14:10.616Z","etag":null,"topics":["go","golang","library","monero","monero-daemon","monero-library","monero-wallet-rpc","xmr"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goipay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-30T13:06:10.000Z","updated_at":"2025-03-31T10:12:55.000Z","dependencies_parsed_at":"2024-08-19T18:26:22.025Z","dependency_job_id":"cefe6bf9-0bfd-4366-ace5-e83abbc7ed4d","html_url":"https://github.com/goipay/go-monero","commit_stats":{"total_commits":28,"total_committers":3,"mean_commits":9.333333333333334,"dds":0.3214285714285714,"last_synced_commit":"ad7ee229628e47f1569015d12f9010269a081c81"},"previous_names":["chekist32/go-monero","goipay/go-monero"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/goipay/go-monero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goipay%2Fgo-monero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goipay%2Fgo-monero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goipay%2Fgo-monero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goipay%2Fgo-monero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goipay","download_url":"https://codeload.github.com/goipay/go-monero/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goipay%2Fgo-monero/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259786379,"owners_count":22910939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","library","monero","monero-daemon","monero-library","monero-wallet-rpc","xmr"],"created_at":"2024-09-26T12:04:14.283Z","updated_at":"2025-06-14T08:32:37.158Z","avatar_url":"https://github.com/goipay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Monero Go Library\n====================\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./media/img/monero_gopher.png\" alt=\"Monero Gopher\" width=\"200\" /\u003e\n\u003c/p\u003e\n\nA client implementation for the Monero wallet and daemon RPC written in go.\nThis package is inspired by https://github.com/omani/go-monero-rpc-client.\n\n## Wallet RPC Client\n\n[![GoDoc](https://godoc.org/github.com/chekist32/go-monero/wallet?status.svg)](https://godoc.org/github.com/chekist32/go-monero/wallet)\n\n### Monero RPC Version\nThe ```go-monero/wallet``` package is the RPC client for version `v1.3` of the [Monero Wallet RPC](https://www.getmonero.org/resources/developer-guides/wallet-rpc.html).\n\n### Installation\n\n```sh\ngo get -u github.com/chekist32/go-monero\n```\n\n#### Spawn the monero-wallet-rpc daemon (without rpc login):\n\n```sh\n./monero-wallet-rpc --wallet-file /home/$user/stagenetwallet/stagenetwallet --daemon-address pool.cloudissh.com:38081 --stagenet --rpc-bind-port 6061 --password 'mystagenetwalletpassword' --disable-rpc-login\n```\nYou can use our remote node for the stagenet running at pool.cloudissh.com port `38081`.\n\n#### Go code:\n\n```Go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"log\"\n\n  \"github.com/chekist32/go-monero/wallet\"\n)\n\nfunc checkerr(err error) {\n  if err != nil {\n    log.Panic(err)\n  }\n}\n\nfunc main() {\n  // Start a wallet client instance\n  client := wallet.New(wallet.Config{\n    Address: \"http://127.0.0.1:6061\",\n  })\n\n  // check wallet balance\n  resp, err := client.GetBalance(\u0026wallet.RequestGetBalance{AccountIndex: 0})\n  checkerr(err)\n  res, _ := json.MarshalIndent(resp, \"\", \"\\t\")\n  fmt.Print(string(res))\n\n  // get incoming transfers\n  resp1, err := client.GetTransfers(\u0026wallet.RequestGetTransfers{\n    AccountIndex: 0,\n    In:           true,\n  })\n  checkerr(err)\n  for _, in := range resp1.In {\n    res, _ := json.MarshalIndent(in, \"\", \"\\t\")\n    fmt.Print(string(res))\n  }\n}\n```\n\n### Spawn the monero-wallet-rpc daemon (with rpc login):\n\n```sh\n./monero-wallet-rpc --wallet-file /home/$user/stagenetwallet/stagenetwallet --daemon-address pool.cloudissh.com:38081 --stagenet --rpc-bind-port 6061 --password 'mystagenetwalletpassword' --rpc-login test:testpass\n```\n\n#### Go code:\n\n```Go\npackage main\n\nimport (\n  \"encoding/json\"\n  \"fmt\"\n  \"log\"\n\n  \"github.com/chekist32/go-monero/wallet\"\n)\n\nfunc checkerr(err error) {\n  if err != nil {\n    log.Panic(err)\n  }\n}\n\nfunc main() {\n  t := httpdigest.New(\"test\", \"testpass\")\n\n  // Start a wallet client instance\n  client := wallet.New(wallet.Config{\n    Address: \"http://127.0.0.1:6061\",\n    Transport: t,\n  })\n\n  // check wallet balance\n  resp, err := client.GetBalance(\u0026wallet.RequestGetBalance{AccountIndex: 0})\n  checkerr(err)\n  res, _ := json.MarshalIndent(resp, \"\", \"\\t\")\n  fmt.Print(string(res))\n\n  // get incoming transfers\n  resp1, err := client.GetTransfers(\u0026wallet.RequestGetTransfers{\n    AccountIndex: 0,\n    In:           true,\n  })\n  checkerr(err)\n  for _, in := range resp1.In {\n    res, _ := json.MarshalIndent(in, \"\", \"\\t\")\n    fmt.Print(string(res))\n  }\n}\n```\n\n\n## Daemon RPC Client\n\n[![GoDoc](https://godoc.org/github.com/chekist32/go-monero/wallet?status.svg)](https://godoc.org/github.com/chekist32/go-monero/daemon)\n\nHere is a [List of implemented methods.](https://github.com/chekist32/go-monero/issues/5)\n\n**Go code:**\n```Go\npackage main\n\nimport (\n\t\"github.com/chekist32/go-monero/daemon\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/url\"\n)\n\nfunc main() {\n\tu, err := url.Parse(\"http://xmr-node.cakewallet.com:18081\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\td := daemon.NewDaemonRpcClient(daemon.NewRpcConnection(u, \"\", \"\"))\n\n\tres, err := d.GetCurrentHeight()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Printf(\"Current height: %v\\n\", res.Height)\n}\n```\n\n## Monero Utils\n\n[![GoDoc](https://godoc.org/github.com/chekist32/go-monero/wallet?status.svg)](https://godoc.org/github.com/chekist32/go-monero/utils)\n\nThis package contains helper methods that can be used for different cases, such as subaddress generation and tx output decryption.\n\n**Go code:**\n```Go\npackage main\n\nimport (\n\t\"github.com/chekist32/go-monero/utils\"\n\t\"fmt\"\n\t\"log\"\n)\n\nfunc main() {\n\ttxPub, err := utils.NewPublicKey(\"7302dd77bf4095baf868de43b7a32f4a36fe9d8b48ccfff537157a4a786fa364\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tviewKey, err := utils.NewPrivateKey(\"8aa763d1c8d9da4ca75cb6ca22a021b5cca376c1367be8d62bcc9cdf4b926009\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\toutKey, err := utils.NewPublicKey(\"7e4f4427539b206740bed78b81b0dc10acb89aa1545880863f73264492ee0c16\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tspendKey, err := utils.NewPublicKey(\"38e9908d33d034de0ba1281aa7afe3907b795cea14852b3d8fe276e8931cb130\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tres, am, err := utils.DecryptOutputPublicSpendKey(spendKey, 1, outKey, \"5db33f80fd4990bc\", txPub, viewKey)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tif res {\n\t\tfmt.Printf(\"Received: %v\\n\", utils.XMRToFloat64(am))\n\t} else {\n\t\tfmt.Println(\"The output doesn't belong to the public spend key\")\n\t}\n}\n```\n\n# Contributing\n- Before the actual PR, please create an issue where you can describe the improvements you want to add.\n\n\n# LICENSE\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoipay%2Fgo-monero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoipay%2Fgo-monero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoipay%2Fgo-monero/lists"}