Closed marekyggdrasil closed 3 years ago
grin-wallet owner_api
Password:
20201220 07:55:46.473 WARN grin_wallet_controller::controller - Starting HTTP Foreign API on Owner server at 127.0.0.1:3420.
20201220 07:55:46.473 WARN grin_wallet_controller::controller - Starting HTTP Owner API server at 127.0.0.1:3420.
20201220 07:55:46.473 WARN grin_wallet_controller::controller - HTTP Owner listener started
HTTP Owner successfully started.
Before runnning the script, we need to make sure to edit the configuration.
api_sercet_file = '/Users/path/.grin/main/.owner_api_secret'
wallet_password = 'xxx'
and to add at the end : pp.pprint(wallet.accounts())
pyhton3 wallet_v3.py
[ {'label': 'default', 'path': '0200000000000000000000000000000000'},
{'label': 'newaccount', 'path': '0200000001000000000000000000000000'}]
Request returns a list of accounts stored in the wallet (i.e. mappings between user-specified labels and BIP32 derivation paths. Provide requests and response full payloads as well as wallet and node logs.
20201220 07:55:43.286 INFO grin_util::logger - log4rs is initialized, file level: Info, stdout level: Warn, min. level: Info
20201220 07:55:43.286 INFO grin_wallet - Using wallet configuration file at /Users/workstation/.grin/main/grin-wallet.toml
20201220 07:55:43.287 INFO grin_wallet - This is Grin Wallet version 4.0.0 (git v4.0.0), built for x86_64-apple-darwin by rustc 1.44.1 (c7087fe00 2020-06-17).
20201220 07:55:46.473 WARN grin_wallet_controller::controller - Starting HTTP Foreign API on Owner server at 127.0.0.1:3420.
20201220 07:55:46.473 WARN grin_wallet_controller::controller - Starting HTTP Owner API server at 127.0.0.1:3420.
20201220 07:55:46.473 WARN grin_wallet_controller::controller - HTTP Owner listener started.
Awesome!
@mojitoo I forgot to ask, can you please provide version of wallet that has the owner api listener on?
Description Testing the accounts method from the Owner API
Prerequisites
Test procedure
Expected result: Request returns a list of accounts stored in the wallet (i.e. mappings between user-specified labels and BIP32 derivation paths. Provide requests and response full payloads as well as wallet and node logs.