Manage Wallet

The wallet consists of four private keys-public keys and is divided into owner, active, posting, and memo.

Create Account

You can create a new wallet using the existing wallet.

  • When generated as a nodejs server, a private key-public key is generated by combining usernames and passwords.
  • When generated as a cli_wallet, the private key-public key is automatically generated and the key is automatically imported.
  • If you use cli_wallet and cli_wallet websocket at the same file, you may lose your key, so run them separately.
$ curl -X POST --data 'creator=[your account]&creatorwif=[your password]&username=[new account]&password=[password]]' http://[server ip]:[port]/api/createaccount

{"status":"success","result":{"id":"993d5cc8e74b4150514fe2797902de0d49090c78","block_num":1404714,"trx_num":0,"expired":false}}
> {"jsonrpc": "2.0", "method": "create_account", "params": ["[your account]", "[new account]", "", true], "id":1 }

<{
  "id": 1,
  "result": {
    "ref_block_num": 30734,
    "ref_block_prefix": 306348178,
    "expiration": "2021-11-17T03:59:30",
    "operations": [
      [
        "account_create",
        {
          "creator": "adcadmin",
          "new_account_name": "test002",
          "owner": {
            "weight_threshold": 1,
            "account_auths": [

            ],
            "key_auths": [
              [
                "ADC5ays6KQaLEunfXgubqwxhTaM6nGwLktE39oEarppWipfUzRfxA",
                1
              ]
            ]
          },
          "active": {
            "weight_threshold": 1,
            "account_auths": [

            ],
            "key_auths": [
              [
                "ADC8QqPfcBRRw7KKNVNFCFveHh9iHVXtMsWj3UuLEf3fc4j7VnjAX",
                1
              ]
            ]
          },
          "posting": {
            "weight_threshold": 1,
            "account_auths": [

            ],
            "key_auths": [
              [
                "ADC4xenJz5AAjcbgLVEaTDs1BBEjFbdiDagsNrJKEtJT41uPWoJRg",
                1
              ]
            ]
          },
          "memo_key": "ADC6ozpLvAwkFMPopDoXayxKV6sW6gMi8aPJR6VCSNMLcjfvWF5hr",
          "json_metadata": ""
        }
      ]
    ],
    "extensions": [

    ],
    "signatures": [
      "206d0bcdb2ae16a6814f2fbcae6d2e6dbfeee190db47960951ced31b04c2e1389424aa02f1a56ea88483541225783e6d0d174cba7e7478ac823325bab98fafee75"
    ],
    "transaction_id": "77af3931cc811835cef8fcd0307615ab680c2e2d",
    "block_num": 1406991,
    "transaction_num": 0
  }
}
unlocked >>> create_account [your account] [new account] "" true

{
  "ref_block_num": 31023,
  "ref_block_prefix": 1295551436,
  "expiration": "2021-11-17T04:13:57",
  "operations": [[
      "account_create",{
        "creator": "adcaccount",
        "new_account_name": "test004",
        "owner": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "ADC753AJtqN3cArkq6PVDDJyJqWkitKhK9ZoVmnqty6QHGdZoNd1R",
              1
            ]
          ]
        },
        "active": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "ADC6yMpKzPsaPtKhr5tKBxYWGkDZS64wmga2mRUW2zGcZYgx6ejnA",
              1
            ]
          ]
        },
        "posting": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "ADC6Agd3ThrUs5vWXHSkteKMXELHRrG2HegCFLJQZPBEAdERXdgE3",
              1
            ]
          ]
        },
        "memo_key": "ADC6dw51M5fMisxk9gjTx4PiWqmCHsyKC6khrUziUcKbo7efwbMhn",
        "json_metadata": ""
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "206043bcbf5d8478752629a2d00dd33ea06b18750b95687e5bb69a25f91798d4d456c48a99e50d5e372fde77925762024e7a9e013ea9b0c481f08971db7035c752"
  ],
  "transaction_id": "81333b8f3914d39a3abe6aa0b49a18978774e749",
  "block_num": 1407280,
  "transaction_num": 0
}

Update Account

Change 4 keys. Owner key is required.

  • When using nodejs server, enter user name or password or put owner private key in password.
  • If you use cli_wallet, you must generate four keys in advance, create a user name, password combination like a nodejs server, or use suggest_brain_key.
  • When using cli_wallet, the user name's owner private key must be imported in advance.
  • If you use cli_wallet, you must put in four newly set private keys as import_key.
$ curl -X POST --data 'username=[your username]&old_password=[old password]&password=[new password]' http://[server ip]:[port]/api/updateaccount

{"status":"success","result":{"id":"ef613183f70abc8c36904e87932432bc1653b903","block_num":1410774,"trx_num":0,"expired":false}}
> {"jsonrpc": "2.0", "method": "get_private_key_from_password", "params": ["test001", "owner", "123456"], "id":1 }
< {"id":1,"result":["ADC71mFwhP3buhzpPNDwak2YztGYFe68RDXgkzBtrbpTjGQuePtaR","5HvPz4MDLJ3GzoSiU3siKzhfQkdSXhJhT5NmBzXqVw7Wrf4S7zA"]}

> {"jsonrpc": "2.0", "method": "get_private_key_from_password", "params": ["test001", "active", "123456"], "id":1 }
< {"id":1,"result":["ADC5kGSxRoJFe9SajZ9yGuetEX7vynJGV7cZFjW1cP1qxo2AM2Rw1","5KVfD6bpdku3vRiKucLwVNCnfwa9iAKS5x3EifTN1kjyyu2UzkS"]}

> {"jsonrpc": "2.0", "method": "get_private_key_from_password", "params": ["test001", "posting", "123456"], "id":1 }
< {"id":1,"result":["ADC7pKXF7EU8yvyUYWJFyEFbVu2owdMYkcvzNzkPsvb6b9JumPczJ","5JAaWQ8opyFN6vR18gNbMhPdxdvQW6WA2a25yeUAEzRkuaY7vm4"]}

> {"jsonrpc": "2.0", "method": "get_private_key_from_password", "params": ["test001", "memo", "123456"], "id":1 }
< {"id":1,"result":["ADC5ATxSp9tRG25mF1yGZyc7WokQ86EMTv1C6ErQMbZDaRaSAd4R4","5JGS6DXcLvt6dvDPg4JXRyKW19uaFU6Fg4dtkrHc8HAnobTRNVz"]}

> {"jsonrpc": "2.0", "method": "update_account", "params": ["test002","",
                            "ADC71mFwhP3buhzpPNDwak2YztGYFe68RDXgkzBtrbpTjGQuePtaR",
                            "ADC5kGSxRoJFe9SajZ9yGuetEX7vynJGV7cZFjW1cP1qxo2AM2Rw1",
                            "ADC7pKXF7EU8yvyUYWJFyEFbVu2owdMYkcvzNzkPsvb6b9JumPczJ",
                            "ADC5ATxSp9tRG25mF1yGZyc7WokQ86EMTv1C6ErQMbZDaRaSAd4R4", true], "id":1 }
< {
  "id": 1,
  "result": {
    "ref_block_num": 34681,
    "ref_block_prefix": 3474861860,
    "expiration": "2021-11-17T07:16:51",
    "operations": [
      [
        "account_update",
        {
          "account": "test002",
          "owner": {
            "weight_threshold": 1,
            "account_auths": [

            ],
            "key_auths": [
              [
                "ADC71mFwhP3buhzpPNDwak2YztGYFe68RDXgkzBtrbpTjGQuePtaR",
                1
              ]
            ]
          },
          "active": {
            "weight_threshold": 1,
            "account_auths": [

            ],
            "key_auths": [
              [
                "ADC5kGSxRoJFe9SajZ9yGuetEX7vynJGV7cZFjW1cP1qxo2AM2Rw1",
                1
              ]
            ]
          },
          "posting": {
            "weight_threshold": 1,
            "account_auths": [

            ],
            "key_auths": [
              [
                "ADC7pKXF7EU8yvyUYWJFyEFbVu2owdMYkcvzNzkPsvb6b9JumPczJ",
                1
              ]
            ]
          },
          "memo_key": "ADC5ATxSp9tRG25mF1yGZyc7WokQ86EMTv1C6ErQMbZDaRaSAd4R4",
          "json_metadata": ""
        }
      ]
    ],
    "extensions": [

    ],
    "signatures": [
      "1f223ab3c8beedfd7e3d7edebaedf96f760a982390ba9dc07a0c7a111df64e181207c56692a941446fc4b9170c26aa09419e9ec767336928a56490871603d6f727"
    ],
    "transaction_id": "6cb79e82ea3397bfb541ad4e9bc0ff81505cf158",
    "block_num": 1410938,
    "transaction_num": 0
  }
}
unlocked >>> suggest_brain_key
{
  "brain_priv_key": "MATSU CLINTY BANGE LEATMAN REMEDE R SINGE SIFFLOT PREHEND CARVAL SORDINO OODLES OCTOPOD PARISH STAPES POLLING",
  "wif_priv_key": "5KRduRNqtvZL4TgDWyjqT7QGfHVVsLX9UzL1hrpP8Bmcn2Ro17f",
  "pub_key": "ADC6oCNNpFp44HH6ZecAzUNQzYnhUB3RSNMkgT5VVbzWPheg9eo7V"
}
suggest_brain_key
unlocked >>> suggest_brain_key
{
  "brain_priv_key": "MOOR FACTRIX KUSAM TOADERY PLUFF RHETOR REMEANT ENTER TRIP REDEAL PAPULAR POLLAGE MANLING SAFELY ALMA CURVED",
  "wif_priv_key": "5KdTNhHN9KTkxmG3dE2ZP1rx9sUwEtzKDvW9njiQgoSTRFwup8J",
  "pub_key": "ADC7mTX9aQY8iQRdQ2nGFshC9kAX5TUQDyjxXKJvdUcnqdhhaoarL"
}
suggest_brain_key
unlocked >>> suggest_brain_key
{
  "brain_priv_key": "TINEAL LIGNIFY TUGGER STAKE IVORINE GEMMA TOTCHKA SERVE BAULEAH RED DUX REGIVE MONASE CONQUER IMPEARL RELATA",
  "wif_priv_key": "5K7QbWHutJ2m2CUP9J36fqSD2vpkRyfF3Rf2qPf1AG2HLTgEnPF",
  "pub_key": "ADC62zntGyWWvPjwUmfvj9p74APVWVUiGqPFq66kaBrJrNWHbajVm"
}
suggest_brain_key
unlocked >>> suggest_brain_key
{
  "brain_priv_key": "URGENCY BASINED UNCHAIN SURGE TOOLBOX ENWISEN TUNICIN KRAUSEN TERNAL AFFIXAL BOOSE YAHAN DOZENTH CURTAIN TOTTERY MARTEN",
  "wif_priv_key": "5J8kqV72n2VPo9Tri2c8qGR4QEmwQSt1zsNZAFaN54FxU8P5ZJH",
  "pub_key": "ADC8LV4aMFwpmBevd3tMzgbUj6Y1ZqaqeZtbvCxv8x2SPbmPpLMsK"
}
unlocked >>> update_account test005 ""
                            ADC6oCNNpFp44HH6ZecAzUNQzYnhUB3RSNMkgT5VVbzWPheg9eo7V
                            ADC7mTX9aQY8iQRdQ2nGFshC9kAX5TUQDyjxXKJvdUcnqdhhaoarL
                            ADC62zntGyWWvPjwUmfvj9p74APVWVUiGqPFq66kaBrJrNWHbajVm
                            ADC8LV4aMFwpmBevd3tMzgbUj6Y1ZqaqeZtbvCxv8x2SPbmPpLMsK true
{
  "ref_block_num": 35272,
  "ref_block_prefix": 2567809052,
  "expiration": "2021-11-17T07:46:24",
  "operations": [[
      "account_update",{
        "account": "test005",
        "owner": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "ADC6oCNNpFp44HH6ZecAzUNQzYnhUB3RSNMkgT5VVbzWPheg9eo7V",
              1
            ]
          ]
        },
        "active": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "ADC7mTX9aQY8iQRdQ2nGFshC9kAX5TUQDyjxXKJvdUcnqdhhaoarL",
              1
            ]
          ]
        },
        "posting": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "ADC62zntGyWWvPjwUmfvj9p74APVWVUiGqPFq66kaBrJrNWHbajVm",
              1
            ]
          ]
        },
        "memo_key": "ADC8LV4aMFwpmBevd3tMzgbUj6Y1ZqaqeZtbvCxv8x2SPbmPpLMsK",
        "json_metadata": ""
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "205c3d64da177261be57eca3dc783da2df1a7899c4a5f8feb5c68619dafb69a0e96f8a7ddf2c915f55d80e2b58f67bfa04a3de80f7ae194e6a96ad42d11ed8031e"
  ],
  "transaction_id": "00c7beef0a173fcbf2d5ed062e118079e89ae625",
  "block_num": 1411529,
  "transaction_num": 0
}

Key Management

ADC consists of four keys: owner, active, posting, and memo.

  • Owner key is used to change 4 keys.
  • Active key is used to transfer coins.
  • Posting key and memo key are not currently used.
  • If you use the nodejs server, you create and use a key every time in a combination of user name and password.
  • In cli_wallet, the generated key must be imported, which is stored in the wallet.json file.
  • In the cli_wallet, you can check the private key with the public key only for the exported key.
$ curl -X POST --data 'username=test002&password=123456&roles=["owner","active","posting","memo"]' http://192.168.100.34:3034/api/getPrivateKeys

{
  "result": {
    "owner": "5JZcLY6D4E1i618Wsaocxkc7hAA42J4Ysj54byUeXwzecvVCujC",
    "ownerPubkey": "ADC6Wc9XbUYqn5HTwrbnxY2UBje6KESLzp1J4arMoi3tuos5cq5U3",
    "active": "5Jm7GpV8Txe2Xh1dMhz5m9GBmEZrxr8nsBtfNpmP5spfu3QgNiV",
    "activePubkey": "ADC5JNJQdg7xxdTvC1kgsEZ7pm5bsDqEcgTAee4tUeAnmYnTraruk",
    "posting": "5KhdzeKAPHn48Lwv4msKv4DUp7ro529i8yGxotUdXqYUsrWVsAt",
    "postingPubkey": "ADC54pBBC8t72gzQgCzT8iCdMZ71ngqM2yKRz3cic6iCrTVokSPY2",
    "memo": "5JwGx9iGS8ApEtonuHrP2er5HP122sfoZx1mMqJLWk7ozsALUNb",
    "memoPubkey": "ADC6rQ4abzc1CZZoVbTmmajj4FkaE3ovHY4DTfRYdZSReQ1Ck6WRm"
  }
}
Copy
> {"jsonrpc": "2.0", "method": "import_key", "params": ["5KRduRNqtvZL4TgDWyjqT7QGfHVVsLX9UzL1hrpP8Bmcn2Ro17f"], "id":1 }
< {"id":1,"result":true}

> {"jsonrpc": "2.0", "method": "get_private_key", "params": ["ADC6oCNNpFp44HH6ZecAzUNQzYnhUB3RSNMkgT5VVbzWPheg9eo7V"], "id":1 }
< {"id":1,"result":"5KRduRNqtvZL4TgDWyjqT7QGfHVVsLX9UzL1hrpP8Bmcn2Ro17f"}
                        
Copy
unlocked >>> import_key 5KdTNhHN9KTkxmG3dE2ZP1rx9sUwEtzKDvW9njiQgoSTRFwup8J
true

unlocked >>> get_private_key ADC7mTX9aQY8iQRdQ2nGFshC9kAX5TUQDyjxXKJvdUcnqdhhaoarL
"5KdTNhHN9KTkxmG3dE2ZP1rx9sUwEtzKDvW9njiQgoSTRFwup8J"
Copy

Get Account

You can see the information on the generated wallet.

Account History

Check the transfer history of the wallet.

  • If you put -1 in from, you will be inquired from the latest, and the latest details will be displayed at the end.
  • The first value in the history is the sequence number, and you can put this value in from to inquire about the future value.
  • Limit is up to 1000 and cannot be added more than from.
$ curl -X POST --data 'account=test001&from=-1&limit=5' http://192.168.100.34:3034/api/getAccountTransferHistory

{
  "status": "success",
  "result": [
    [
      0,
      {
        "trx_id": "bb9896baa01e52ed22089a38a400d946f2d1fd26",
        "block": 1410772,
        "trx_in_block": 0,
        "op_in_trx": 0,
        "virtual_op": 0,
        "timestamp": "2021-11-17T07:08:03",
        "op": [
          "transfer",
          {
            "from": "speedhwang",
            "to": "test001",
            "amount": "100.000000 ADC",
            "memo": ""
          }
        ]
      }
    ],
    [
      1,
      {
        "trx_id": "ef613183f70abc8c36904e87932432bc1653b903",
        "block": 1410774,
        "trx_in_block": 0,
        "op_in_trx": 0,
        "virtual_op": 1,
        "timestamp": "2021-11-17T07:08:09",
        "op": [
          "tx_fee_virtual",
          {
            "account": "test001",
            "reward": "1.000000 ADC"
          }
        ]
      }
    ]
  ]
}
Copy
> {"jsonrpc": "2.0", "method": "get_account_transfer_history", "params": ["test001", "-1", "5"], "id":1 }

< {
  "id": 1,
  "result": [
    [
      0,
      {
        "trx_id": "bb9896baa01e52ed22089a38a400d946f2d1fd26",
        "block": 1410772,
        "trx_in_block": 0,
        "op_in_trx": 0,
        "virtual_op": 0,
        "timestamp": "2021-11-17T07:08:03",
        "op": [
          "transfer",
          {
            "from": "speedhwang",
            "to": "test001",
            "amount": "100.000000 ADC",
            "memo": ""
          }
        ]
      }
    ],
    [
      1,
      {
        "trx_id": "ef613183f70abc8c36904e87932432bc1653b903",
        "block": 1410774,
        "trx_in_block": 0,
        "op_in_trx": 0,
        "virtual_op": 1,
        "timestamp": "2021-11-17T07:08:09",
        "op": [
          "tx_fee_virtual",
          {
            "account": "test001",
            "reward": "1.000000 ADC"
          }
        ]
      }
    ]
  ]
}
                        
Copy
unlocked >>> get_account_transfer_history test001 -1 5
[[
    0,{
      "trx_id": "bb9896baa01e52ed22089a38a400d946f2d1fd26",
      "block": 1410772,
      "trx_in_block": 0,
      "op_in_trx": 0,
      "virtual_op": 0,
      "timestamp": "2021-11-17T07:08:03",
      "op": [
        "transfer",{
          "from": "speedhwang",
          "to": "test001",
          "amount": "100.000000 ADC",
          "memo": ""
        }
      ]
    }
  ],[
    1,{
      "trx_id": "ef613183f70abc8c36904e87932432bc1653b903",
      "block": 1410774,
      "trx_in_block": 0,
      "op_in_trx": 0,
      "virtual_op": 1,
      "timestamp": "2021-11-17T07:08:09",
      "op": [
        "tx_fee_virtual",{
          "account": "test001",
          "reward": "1.000000 ADC"
        }
      ]
    }
  ]
]
Copy

©2021 ADC. All rights reserved.

Close

Create Post

Close

Edit Post

Close

Post Password

Please enter the password
you entered when writing the post to edit the post.

Close

Post Password

Please enter the password
you entered when creating the post to delete the post.

Close

Please enter a nickname.

Your post has been completed.