{"id":16154207,"url":"https://github.com/omani/nkn-wallet","last_synced_at":"2026-04-29T17:07:24.588Z","repository":{"id":186235232,"uuid":"672671484","full_name":"omani/nkn-wallet","owner":"omani","description":"A next generation NKN wallet with built-in age encryption and NKN OpenAPI support.","archived":false,"fork":false,"pushed_at":"2023-08-13T11:35:43.000Z","size":214,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T05:43:15.722Z","etag":null,"topics":["age","encryption","nkn","openapi","wallet"],"latest_commit_sha":null,"homepage":"https://nkn.org/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omani.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}},"created_at":"2023-07-30T21:39:20.000Z","updated_at":"2023-08-05T14:38:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"efc119aa-f1ea-4ef1-99c7-012f83ad6008","html_url":"https://github.com/omani/nkn-wallet","commit_stats":null,"previous_names":["omani/nkn-wallet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omani%2Fnkn-wallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omani%2Fnkn-wallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omani%2Fnkn-wallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omani%2Fnkn-wallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omani","download_url":"https://codeload.github.com/omani/nkn-wallet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247569130,"owners_count":20959758,"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":["age","encryption","nkn","openapi","wallet"],"created_at":"2024-10-10T01:15:34.897Z","updated_at":"2026-04-29T17:07:24.487Z","avatar_url":"https://github.com/omani.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\".media/logo.png\" width=\"150\"\u003e\u003c/p\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/omani/nkn-wallet.svg)](https://pkg.go.dev/github.com/omani/nkn-wallet)\n\n\n# nkn-wallet\nA next generation NKN wallet with built-in age encryption and NKN OpenAPI support.\n\nnkn-wallet is a library that implements [nkn-sdk-go](https://github.com/nknorg/nkn-sdk-go) with a new wallet functionality utilizing age encryption and using the [NKN OpenAPI](https://github.com/rule110-io/nkn-open-api) for querying the NKN blockchain.\n\nUpcoming releases will include the possibility for encryption by SSH public key (\"ssh-ed25519 AAAA...\", \"ssh-rsa AAAA...\") stored on disk or by fetching the keys from a Github user profile (github.com/[user].keys).\n\n---\n\nWhile nkn-wallet has its own wallet implementation the underlying SDK functionality remains the same and is compatible with nkn-sdk-go. The move to age as an encryption toolkit results in overall less loc since there is no need to implement scrypt functionality manually. This wallet implementation uses age's internal scrypt feature which is identical to the original NKN wallet implementation performance-wise and slightly enhanced security-wise through the use of an additional layer, that is, the derived scrypt key being encrypted again with a [ChaCha20-Poly1305](https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305) [AEAD](https://en.wikipedia.org/wiki/Authenticated_encryption#Authenticated_encryption_with_associated_data_(AEAD)).\n\n---\n\n\n\nFeatures:\n* Manage all your different accounts from a central place\n* State-of-the-art encryption with [Age](https://github.com/FiloSottile/age)\n* Manage multiple accounts in a single wallet file (multiwallet capability)\n* List all your accounts\n* Set an alias for your account\n* Show the balance of your account\n* Show transactions of your account\n* Move funds between accounts in the wallet\n* Transfer funds to another NKN address\n* Restore your accounts\n* Change password of your account\n* Change or set an alias for your account\n* NKN OpenAPI support\n\n# Library\n## Installation\n`import nknwallet \"github.com/omani/nkn-wallet\"`\n\n## Example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/nknorg/nkn-sdk-go\"\n\tnknwallet \"github.com/omani/nkn-wallet\"\n)\n\nfunc main() {\n\tpasswd := []byte(\"secretpassword\")\n\tstore := nknwallet.NewStore(\"mywallet.json\")\n\n\twalletcfg := \u0026nkn.WalletConfig{}\n\twallet, err := store.NewWallet(passwd, \"my-new-shiny-account\", walletcfg)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// save new wallet to store (otherwise it is in-memory only)\n\tstore.SaveWallet(wallet)\n\n\t// list wallets in store\n\tstore.ListWallets()\n\n\t// get balance of newly created account\n\tbalance, err := wallet.OpenAPI().GetBalance()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"Address: %s - Balance: %s NKN\\n\", wallet.Address(), balance)\n\n\t// fetch a wallet from store\n\twallet, err = store.GetWalletByAlias(\"my-new-shiny-account\", passwd)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// print account address\n\tfmt.Printf(\"Address of account: %s\\n\", wallet.Address())\n\n\t// get transactions associated with account\n\ttxn, err := wallet.OpenAPI().GetTransactions()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif len(txn.Data) == 0 {\n\t\tfmt.Println(\"Account has no transactions.\")\n\t\treturn\n\t}\n\n\tfor _, tx := range txn.Data {\n\t\tfmt.Printf(\"Sent %s NKN to address %s\", tx.Payload.Amount, tx.Payload.RecipientWallet)\n\t}\n}\n```\n\n### Use with nkn-sdk-go\n```go\npackage main\n\nimport (\n\t\"crypto/rand\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/nknorg/nkn-sdk-go\"\n\tnknwallet \"github.com/omani/nkn-wallet\"\n)\n\nfunc main() {\n\tstore := nknwallet.NewStore(\"mywallet.json\")\n\n\twalletcfg := \u0026nkn.WalletConfig{}\n\twallet, err := store.NewWallet([]byte(\"secretpassword\"), \"my-new-shiny-account\", walletcfg)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// continue to use nkn-sdk-go as usual\n\terr = func() error {\n\t\t// get the underlying nkn.Account\n\t\taccount := wallet.Account()\n\n\t\tfromIdentifier := make([]byte, 8)\n\t\t_, err = rand.Read(fromIdentifier)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttoIdentifier := make([]byte, 8)\n\t\t_, err = rand.Read(toIdentifier)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfromClient, err := nkn.NewMultiClient(account, hex.EncodeToString(fromIdentifier), 4, false, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer fromClient.Close()\n\t\t\u003c-fromClient.OnConnect.C\n\n\t\ttoClient, err := nkn.NewMultiClient(account, hex.EncodeToString(toIdentifier), 4, false, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer toClient.Close()\n\t\t\u003c-toClient.OnConnect.C\n\n\t\ttime.Sleep(time.Second)\n\n\t\ttimeSent := time.Now().UnixNano() / int64(time.Millisecond)\n\t\tvar timeReceived int64\n\t\tgo func() {\n\t\t\tmsg := \u003c-toClient.OnMessage.C\n\t\t\ttimeReceived = time.Now().UnixNano() / int64(time.Millisecond)\n\t\t\tisEncryptedStr := \"unencrypted\"\n\t\t\tif msg.Encrypted {\n\t\t\t\tisEncryptedStr = \"encrypted\"\n\t\t\t}\n\t\t\tlog.Println(\"Receive\", isEncryptedStr, \"message\", \"\\\"\"+string(msg.Data)+\"\\\"\", \"from\", msg.Src, \"after\", timeReceived-timeSent, \"ms\")\n\t\t\t// []byte(\"World\") can be replaced with \"World\" for text payload type\n\t\t\tmsg.Reply([]byte(\"World\"))\n\t\t}()\n\n\t\tlog.Println(\"Send message from\", fromClient.Address(), \"to\", toClient.Address())\n\t\t// []byte(\"Hello\") can be replaced with \"Hello\" for text payload type\n\t\tonReply, err := fromClient.Send(nkn.NewStringArray(toClient.Address()), []byte(\"Hello\"), nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treply := \u003c-onReply.C\n\t\tisEncryptedStr := \"unencrypted\"\n\t\tif reply.Encrypted {\n\t\t\tisEncryptedStr = \"encrypted\"\n\t\t}\n\t\ttimeResponse := time.Now().UnixNano() / int64(time.Millisecond)\n\t\tlog.Println(\"Got\", isEncryptedStr, \"reply\", \"\\\"\"+string(reply.Data)+\"\\\"\", \"from\", reply.Src, \"after\", timeResponse-timeReceived, \"ms\")\n\n\t\t// wait to send receipt\n\t\ttime.Sleep(time.Second)\n\n\t\treturn nil\n\t}()\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n}\n\n```\n\n# CLI App\nThis package comes with a CLI app in `cmd/`\n\n## Installation\n`go install github.com/omani/nkn-wallet/cmd/nkn-wallet@latest`\n\n## Usage\n### Invocation\n```\n$ nkn-wallet\nnkn-wallet v1.0\n---------------------------------------------------------------------------\nnkn-wallet is a library that implements nkn-sdk-go with a new wallet\nfunctionality utilizing age encryption and using the NKN OpenAPI for\nquerying the NKN blockchain.\n\nUpcoming releases will include the possibility for encryption by\nSSH public key (\"ssh-ed25519 AAAA...\", \"ssh-rsa AAAA...\") stored on disk\nor by fetching the keys from a Github user profile (github.com/[user].keys).\n\nURL: https://github.com/omani/nkn-wallet\nMIT license. Copyright (c) 2023 HAH! Sun\n\n[This message will be removed with the next version]\n---------------------------------------------------------------------------\n\nUsage:\n  nkn-wallet [command]\n\nAvailable Commands:\n  change      Change various information of an account in the wallet\n  create      Create an account in the wallet\n  delete      Delete an account from the wallet\n  help        Help about any command\n  list        List all accounts of the wallet\n  move        Move funds between accounts in the wallet\n  restore     Restore an account from a seed\n  show        Show various information to an account in the wallet\n  transfer    Transfer funds to another NKN address\n\nFlags:\n  -h, --help          help for nkn-wallet\n      --ip string     DNS/IP of NKN remote node (default \"mainnet-seed-0001.org\")\n  -p, --path string   path to wallet file (default \"./nkn-wallet.json\")\n  -v, --version       version for nkn-wallet\n\nUse \"nkn-wallet [command] --help\" for more information about a command.\n```\n\n### Create account\n```\n$ nkn-wallet --path usethiswallet.json create --alias mining-wallet-srv01 -s\nPassword:\nRe-enter Password:\n\nAccount information:\nSeed: c2017a52472f4e616b1ee028297c8609d09fdec90db8522b978df85df9a14d10\nAddress: NKNT43Q5z863qL2wdheRqEmSgPtNDnbiLTw3\nAlias: mining-wallet-srv01\nAccount saved successfully.\n```\n**Note:** Use the `-s` flag to save the newly created account to the wallet!\n\n### Create another one\n```\n$ nkn-wallet --path usethiswallet.json create --alias github-donations -s\nPassword:\nRe-enter Password:\n\nAccount information:\nSeed: de392b438d5020b46123f461d0c1db50c2eef244fb6e213c20bfaa3a4b2ae237\nAddress: NKND1ejSRWBExoq8t4DWpPHaK5BMBe4yifTN\nAlias: github-donations\nAccount saved successfully.\n```\n**Note:** Use the `-s` flag to save the newly created account to the wallet!\n\n### List accounts\n```\n$ nkn-wallet --path usethiswallet.json list\n────┼─────────────────────┼──────────────────────────────────────\n ID │ ALIAS               │ ADDRESS\n────┼─────────────────────┼──────────────────────────────────────\n  1 │ mining-wallet-srv01 │ NKNT43Q5z863qL2wdheRqEmSgPtNDnbiLTw3\n  2 │ github-donations    │ NKND1ejSRWBExoq8t4DWpPHaK5BMBe4yifTN\n```\n\n### Show account info\n```\n$ nkn-wallet --path usethiswallet.json show info -i 1\nPassword:\n ID │ ALIAS               │ ADDRESS                              │ PUBKEY                                                           │ SEED\n────┼─────────────────────┼──────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────\n  1 │ mining-wallet-srv01 │ NKNT43Q5z863qL2wdheRqEmSgPtNDnbiLTw3 │ d9390cfde27fb118c18e70367afb2fc4ffb17d2386c43f5b157b13c34a5b3120 │ c2017a52472f4e616b1ee028297c8609d09fdec90db8522b978df85df9a14d10\n```\n\n### Show balance of account\n```\n$ nkn-wallet --path usethiswallet.json show balance -i 1\n ID │ ALIAS               │ ADDRESS                              │ BALANCE\n────┼─────────────────────┼──────────────────────────────────────┼─────────\n  1 │ mining-wallet-srv01 │ NKNT43Q5z863qL2wdheRqEmSgPtNDnbiLTw3 │       0\n```\n\n### Show transactions of account\nFor example purposes the wallet shown in this example is a wallet with already several transactions, not the newly created one in the examples above.\n```\n$ nkn-wallet --path usethiswallet.json show transactions -i 1\nPassword:\n CREATED AT          │ BLOCK HEIGHT │ TXN HASH                                                         │ SENDER                               │ RECIPIENT                            │       AMOUNT\n─────────────────────┼──────────────┼──────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────────────────────────────────┼──────────────\n 2023-08-05 01:58:55 │    5666741   │ 26d7c4e968a4b40a2773e74c9429b73243210981102471cae7973b3c81558510 │ NKNKQ34u5DeSxfi5VN1HDtG9iuQdhmsxAx7m │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │            0\n 2023-08-05 01:49:44 │    5666719   │ b770f948117078ea9e6f07f876e8c359732a8e8fa0fa5e2619b6d5604057f8dc │ NKNKQ34u5DeSxfi5VN1HDtG9iuQdhmsxAx7m │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │            1\n 2023-08-05 01:34:33 │    5666683   │ 2854bf89c665caaf393a2fa70e01f3abd861a13f16fc4ff828a14a71524667dd │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNKQ34u5DeSxfi5VN1HDtG9iuQdhmsxAx7m │            1\n 2023-08-02 21:32:56 │    5658789   │ d6005aeb904038b45041ce4680ca11229178053c02c7a585b998b54f6a9b1d59 │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │            1\n 2023-07-30 19:19:03 │    5647512   │ 43a465187b71e80864d72c4c40140f9e22b587628915be384d36989839d05f04 │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │            1\n 2023-03-31 14:48:06 │    5205199   │ a095963dc703e3a67829b00c8a3c258b937d826ff653d2469f0cd49c88534847 │ NKNJ8PDyiaJBbJJagiWEZLfpDyeBcxvgCgTu │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │  35.87375384\n 2023-03-24 15:12:15 │    5179448   │ d54bc49c200602a5c5b1a7dc58fc7e1bdf5391ebfbf0ef0ad4aada31a6cf2a18 │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNJebQsifkREcuvGVteiZwcTL8WTxEXdLtb │          300\n 2023-03-24 15:07:01 │    5179436   │ c4123b1a842563520e826f6c594cd5b7dbd9b237c043a18cb91b01d73bde29dd │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNSns2iiMibVUfwmXKC2oLFfeWZoTENiMvk │          300\n 2021-12-24 01:41:40 │    3469174   │ 497862b0b28dac959fabc760c3c81ef9077ce0a46b266bf598feb35edad1253c │ NKNRBnhQq4dG68C3XVmEsos2QPaHtN4JiC6V │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │          281\n 2021-12-21 07:52:54 │    3458748   │ 8e703cdd54696df94cc11c91163ebcb3c203e85bad8708764ae05132eb0da808 │ NKNToMMXL3W4EQxAZ7ooqgkyzPuHDb52fQJy │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │          100\n 2021-12-05 03:33:45 │    3397448   │ 5ee5a1c763d7a1bdb00486fcf176363ac6c1b111b98fdea6277278f113df9a9b │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNPDgusz7HSnXGcvCqPQsLiqNaGspQoCzbz │           10\n 2021-12-05 03:33:00 │    3397446   │ 3719cfee8b7c4c0c34df799120f717b65cff035843e221428ec3021481def1b3 │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNGuNrjgcLTsRvGpYKfE68Fht4Anbh52aR4 │           10\n 2021-12-05 02:22:24 │    3397261   │ e64cf77e46833a1d9e23ca0988b9624b4d7b29f0660fde85277b51937149f955 │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ NKNJ8PDyiaJBbJJagiWEZLfpDyeBcxvgCgTu │           10\n 2021-12-05 02:05:20 │    3397216   │ b0c260b27903df84d7719f1ef602f02be5a457dfc53c2d2d02bf24ee7a60928c │ NKNHb4UMs8whWosffseg7aPpztVNBt5NDrCR │ NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm │ 284.96270000\nTotal balance of account: 71.83645384 NKN\n```\n\n### Transfer funds to another NKN address\nFor example purposes the wallet shown in this example is a wallet with a positive balance, not the newly created one in the examples above.\n```\n$ nkn-wallet transfer -i 10 --amount 1 --to NKNCSjyCsuDbJcSrRW4kG2atu4SW6sTJkx4o\nPassword:\nSuccessfully sent 1 KNN from NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm to NKNCSjyCsuDbJcSrRW4kG2atu4SW6sTJkx4o. txHash: ba2313cdffa1060a4f28474a01ef19dc09ea5e042398eb56593870542e664cbb\n```\n\n### Move funds between accounts within the wallet\nFor example purposes the wallet shown in this example is a wallet with a positive balance, not the newly created one in the examples above.\n\nUse the special keyword \"all\" to move all funds.\n```\n$ nkn-wallet move --from-id 11 --to-id 10 --amount all\nPassword:\nSuccessfully sent 1 NKN from NKNCSjyCsuDbJcSrRW4kG2atu4SW6sTJkx4o to NKNVmZQZcDrgdMJKdgRfz2gn5ZdTAyro5uHm. txHash: 61c8035b27b8232faad2adf641922dea09d4e925e4e5230d73c9a55ae8917549\n```\n\n## Example with age encryption\n### Install age\nRefer to https://github.com/FiloSottile/age to see how to install age.\n\n### Create a new age identity\n```\n~ $ cd /tmp/\n/tmp $ age-keygen \u003e ident1\nage-keygen: warning: writing secret key to a world-readable file\nPublic key: age1f2fcrl2l5swmd4nquukwhh7kd8qz579usp74ee4t7gm068wqpgjqwnuldf\n```\n\n### Create another one for demonstration purposes\n```\n/tmp $ age-keygen \u003e ident2\nage-keygen: warning: writing secret key to a world-readable file\nPublic key: age1pklphvwtf6sfedu4seth44vepy597tesc4e82zsh536lj58ggp4szg25p3\n/tmp $\n```\n\n### Use newly created age identity as a recipient for new wallet\n```\n$ go run main.go create -r age1f2fcrl2l5swmd4nquukwhh7kd8qz579usp74ee4t7gm068wqpgjqwnuldf -s\nAccount information:\nID: 1\nAddress: NKNEtSx32P6AnhSjdaWujE98sKZHFm2iHPSv\nSeed: 947c34c358c9157aa01e9f46d1af613ac9aed0912644fe55e9391184802d9063\nAccount saved successfully.\n\n$ go run main.go create -r age1pklphvwtf6sfedu4seth44vepy597tesc4e82zsh536lj58ggp4szg25p3 -s\nAccount information:\nID: 2\nAddress: NKNYzaG8M6VcBcbSyUPgak46TQRCav8LzGfQ\nSeed: 405ef86b621ebb7a3bab1de127a203778366b5abee445aaf5d40cbc7322b1c05\nAccount saved successfully.\n```\n\nNow we have to accounts in the wallet. Each encrypted to the recipients above\n\n```\n$ go run main.go list\n ID │ ALIAS │ ADDRESS\n────┼───────┼──────────────────────────────────────\n  1 │       │ NKNEtSx32P6AnhSjdaWujE98sKZHFm2iHPSv\n  2 │       │ NKNYzaG8M6VcBcbSyUPgak46TQRCav8LzGfQ\n```\n\n### Access to account will only work with identity file\n```\n$ go run main.go show info --index 1\nError: Wallet is not an scrypt type. Use an identity file to decrypt it.\nexit status 1\n\n$ go run main.go show info --index 1 -i /tmp/ident2\nError: no identity matched any of the recipients\nexit status 1\n\n$ go run main.go show info --index 1 -i /tmp/ident1\n ID │ ALIAS │ ADDRESS                              │ PUBKEY                                                           │ SEED\n────┼───────┼──────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────\n  1 │       │ NKNEtSx32P6AnhSjdaWujE98sKZHFm2iHPSv │ 8a16c717629980ed7fcf93f4430300b65f1645a83020d97d9615539b5a08a499 │ 947c34c358c9157aa01e9f46d1af613ac9aed0912644fe55e9391184802d9063\n```\n\n## Example using SSH Keys\n### Create new account with SSH public key file as recipient\n```\ngo run main.go create -R ~/.ssh/id_ed25519.pub -s\nAccount information:\nID: 1\nAddress: NKNTNxHR3NRFHT3RGbjjwkKQzWVYF3cfraSR\nSeed: bb54ec61a42a9b1dd213a0a2e613576c17590c429c79621c6bccfc0e97d93092\nAccount saved successfully.\n```\n\n### Access to account will only work with SSH private key\n```\ngo run main.go show info --index 1\nError: Wallet is not an scrypt type. Use an identity file to decrypt it.\nexit status 1\n\ngo run main.go show info --index 1 -i ~/.ssh/id_ed25519\n1\n ID │ ALIAS │ ADDRESS                              │ PUBKEY                                                           │ SEED                                   \n────┼───────┼──────────────────────────────────────┼──────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────\n  1 │       │ NKNTNxHR3NRFHT3RGbjjwkKQzWVYF3cfraSR │ 101905457c9e798d5e04fb350779d79999c4f3a9297dcdcf803d182d11ddaf17 │ bb54ec61a42a9b1dd213a0a2e613576c17590c429c79621c6bccfc0e97d93092\n```\n\n\nFor information refer to the help menu with `nkn-wallet help` or `nkn-wallet [cmd] help`.\n\n## File Format\nThe file format of the wallet looks like this:\n```\n  ...\n  {\n    \"id\": 5,\n    \"address\": \"NKNRdA5G8U5kSQ68Q5beeAuzGfvp2vEiRzEr\",\n    \"armor\": \"-----BEGIN AGE ENCRYPTED FILE-----\\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNjcnlwdCBqWjFpT01iV2g0VzZ6aW9L\\nM21tajZnIDE4Cm1BZFNnNjhzdWR4NGQzUUR6TzBKV2xSOVJFZXl4ZW1oVDZJZWdh\\nSzhtRWMKLS0tIHRBSlp0ZkdKaWNHamd4b1Vab250WFF3TTFxVThXUFFyUVQxRDRy\\nWGNqQTgK7M8ZKYVVvQGP0LEKwiEO9lN0mTK3MUjnO4X98nEerJOh+kJZnziJPkxL\\nxrKvpsGOCurMSkuTLbU10NlQfuc6Bv1oHSYP1+GYcmwrvJgI/6B00atlHGY/jmeb\\nMRo5D1mJBxhhgdWe3udvjMB264k46R/oIGKkxeCC5nA/eLToqvplb0qDv6FMapDe\\nScrKSg50eNuaoe3yWxZlP8bS1RsPDJtIgJ+cTE0B66xt6G8rLQX80B4xp72AzHnh\\nXn182U0+2i5PjYIpFZsoKdIKTD4eXXDF0aH8BfpYm0bHHM32vRS2rW3pCYz0mF35\\nBzBHCel5A3kXhksSCgze7w==\\n-----END AGE ENCRYPTED FILE-----\\n\",\n    \"alias\": \"personal\"\n  },\n  {\n    \"id\": 7,\n    \"address\": \"NKNHyoTeS3XEWFfEMuBXGKi16RP6rSqjr3bU\",\n    \"armor\": \"-----BEGIN AGE ENCRYPTED FILE-----\\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNjcnlwdCA2YkZDbmlrN3J6QkpIK0xE\\naXNEcDlnIDE4Cnp0KzFOeWNQRmM5MjYzajI2L3NzK3RaeFY2WWZNd2YyTzNLRWJH\\na0o1dTgKLS0tIHFNdTFTc0pXUVMrdVVLSjlsREU1RkdJamMrWit2cXVoZjVvdzNI\\naDZQVlUKVzxvmCI4A9+tVmEzKnTADJ1T2yAVoWQ8pUJ7yuPXOR3Kf1VPc+iwGMsF\\n5Tdoom46Ii/VtBG8DPpFVNflehqdS5zAqjvB3UQO9qtUR1ZRL2goG20UtVbrS0Np\\nWHEgi/gr+QZho6rYd9wr1M691rbDrOSgzQUNEdALczrwe/SBFDXGMPGRlGP5SAyP\\nX/ZhQaYO6QTwdjnpbEzYsZ+OoijyAT9052RDhQwtCYKuZ4p4NxITmFM6TAdgfo3P\\nR5XHKHVzGY/JLsqFQcp1nMGPy5XNghnDvxk+v/TqA6BEe4qn4YoloZ5cFjvmf4Xp\\n1Mem0tXgEHxIt8rO4enQNg==\\n-----END AGE ENCRYPTED FILE-----\\n\",\n    \"alias\": \"github-donations\"\n  },\n  {\n    \"id\": 8,\n    \"address\": \"NKNKQ34u5DeSxfi5VN1HDtG9iuQdhmsxAx7m\",\n    \"armor\": \"-----BEGIN AGE ENCRYPTED FILE-----\\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNjcnlwdCBjbTRUK3Z2N2xLWCtnQk1W\\nVjlaVEdRIDE4CmNkYm9DVThDRFNVdE53elhSK0l3b2F0SFpqdUxNbVY0OEFDdmd4\\nZ0FlSHMKLS0tIHFIaVRmZVBCUDhOWUJVZjlJUE9KU2F5clpvejMrM2tuakVJUTJQ\\nRENjU0kK1ov/aEbZzd+WUV+i47MpGR0LdhNWBXewUjwSrqIPH8xGsm8hwmvs/j5v\\nGTSO9ndzzFdizU93zhvsXoQIZmzkm5OvTRXCj6IUj/B0UlCtcUHkcvUFK9KJQ7Uc\\nuUVpxazelIDCg5Oi3+tGrT45KqKYiwnYwPKbk5zj7nVNvOVEST15m2MjPM4cWq9W\\ny17jdKrHekeIOvXGiLau3ZGEUh7Z9XtJh9BAI20lN9upMrpQYZzn9vuKQZByznI5\\n5ge3CbAs9F8ldD4TocSbg8vabQ3iQwPanxZQZiXrn6u4+fQJnXaw/LXUpJITg0Az\\n7gX1fz/Ea6FVyk+ZggB3Ig==\\n-----END AGE ENCRYPTED FILE-----\\n\",\n    \"alias\": \"office\"\n  },\n  ...\n```\n\nThe age encryption is stored as an armor in the `armor` field. the associated NKN address, id and alias are cleartext.\n\nThe base64 decoded armor looks like this:\n```\n$ echo \"YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNjcnlwdCBqWjFpT01iV2g0VzZ6aW9L\nM21tajZnIDE4Cm1BZFNnNjhzdWR4NGQzUUR6TzBKV2xSOVJFZXl4ZW1oVDZJZWdh\nSzhtRWMKLS0tIHRBSlp0ZkdKaWNHamd4b1Vab250WFF3TTFxVThXUFFyUVQxRDRy\nWGNqQTgK7M8ZKYVVvQGP0LEKwiEO9lN0mTK3MUjnO4X98nEerJOh+kJZnziJPkxL\nxrKvpsGOCurMSkuTLbU10NlQfuc6Bv1oHSYP1+GYcmwrvJgI/6B00atlHGY/jmeb\nMRo5D1mJBxhhgdWe3udvjMB264k46R/oIGKkxeCC5nA/eLToqvplb0qDv6FMapDe\nScrKSg50eNuaoe3yWxZlP8bS1RsPDJtIgJ+cTE0B66xt6G8rLQX80B4xp72AzHnh\nXn182U0+2i5PjYIpFZsoKdIKTD4eXXDF0aH8BfpYm0bHHM32vRS2rW3pCYz0mF35\nBzBHCel5A3kXhksSCgze7w==\" | base64 -d\n\nage-encryption.org/v1\n-\u003e scrypt jZ1iOMbWh4W6zioK3mmj6g 18\nmAdSg68sudx4d3QDzO0JWlR9REeyxemhT6IegaK8mEc\n--- tAJZtfGJicGjgxoUZontXQwM1qU8WPQrQT1D4rXcjA8\n)Uб\n!St21H;qBY8\u003eLKƲ\nJK-5P~:h\u0026rltѫef?g19Ya՞ov8 bp?xeoJLjIJtxۚ[e?\n                                          LMmo+-1y^}|M\u003e.O)()\nL\u003e]pXFm ]0G     yyK\n\n```\n\n---\n\n# Contribution\n* You can fork this, extend it and contribute back.\n* You can contribute with pull requests.\n\n# Donations\nI accept payments and donations in BTC:\n\n\u003cimg src=\"https://raw.githubusercontent.com/bitpay/bitcoin-brand/master/bitcoin.svg\" width=\"16\" height=\"16\" /\u003e `bc1qgezvfp4s0xme8pdv6aaqu9ayfgnv4mejdlv3tx`\n\n# LICENSE\nMIT License\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomani%2Fnkn-wallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomani%2Fnkn-wallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomani%2Fnkn-wallet/lists"}