MCPcopy Create free account
hub / github.com/canopy-network/canopy / keystore_new_key

Function keystore_new_key

plugin/python/tutorial/rpc_test.py:85–89  ·  view source on GitHub ↗

Create a new key in the keystore.

(rpc_url: str, nickname: str, password: str)

Source from the content-addressed store, hash-verified

83
84
85def keystore_new_key(rpc_url: str, nickname: str, password: str) -> str:
86 """Create a new key in the keystore."""
87 req_json = json.dumps({"nickname": nickname, "password": password})
88 resp_body = post_raw_json(f"{rpc_url}/v1/admin/keystore-new-key", req_json)
89 return json.loads(resp_body)
90
91
92def keystore_get_key(rpc_url: str, address: str, password: str) -> KeyGroup:

Callers 1

test_plugin_transactionsFunction · 0.85

Calls 1

post_raw_jsonFunction · 0.85

Tested by

no test coverage detected