Closed JackGod001 closed 1 year ago
Hey, you can see the details of the account you created through the CLI, by inspecting the file with accounts:
cat ~/.starknet_accounts/starknet_open_zeppelin_accounts.json
It should look something like this:
{
"alpha-goerli": {
"__default__": {
"private_key": "...",
"public_key": "...",
"salt": "...",
"address": "...",
"deployed": false
},
"second_account": {
...
},
}
}
The class hash of the OpenZeppelin account used, when creating through CLI is:
0x06f500f527355dfdb8093c7fe46e6f73c96a867392b49fa4157a757538928539
Hey, you can see the details of the account you created through the CLI, by inspecting the file with accounts:嘿,您可以通过检查带有帐户的文件来查看您通过 CLI 创建的帐户的详细信息:
cat ~/.starknet_accounts/starknet_open_zeppelin_accounts.json
It should look something like this:它应该看起来像这样:
{ "alpha-goerli": { "__default__": { "private_key": "...", "public_key": "...", "salt": "...", "address": "...", "deployed": false }, "second_account": { ... }, } }
The class hash of the OpenZeppelin account used, when creating through CLI is:通过 CLI 创建时使用的 OpenZeppelin 帐户的类哈希是:
0x06f500f527355dfdb8093c7fe46e6f73c96a867392b49fa4157a757538928539
I can't find the starknet_open_zeppelin_accounts.json file, but would like to provide some examples of using OpenZeppelin account in a python non-cli way. I can find print in the source code, and I can print out salt, private_key by modifying the source code, but how is the mnemonic phrase calculated? I want to use it to import into argentx
So the starknet_open_zeppelin_accounts.json
in ~/.starknet_accounts/
directory is created after the first use of
starknet new_account
from the CLI. It gives you all the details of the account.
If you would like to know the internals, of how things are calculated, when creating a new account, you could check out the implementation from cairo-lang
.
So the
starknet_open_zeppelin_accounts.json
in~/.starknet_accounts/
directory is created after the first usestarknet_open_zeppelin_accounts.json
~/.starknet_accounts/
first usestarknet_open_zeppelin_accounts.json
~/.starknet_accounts/
首次使用 ofstarknet new_account
from the CLI. It gives you all the details of the account.
If you would like to know the internals, of how things are calculated, when creating a new account, you could check out the implementation from
cairo-lang
查看实现cairo-lang
查看实现cairo-lang
.
Yes I have found the code for the implementation, I would like to know how to calculate private_key using mnemonics
Hey, I don't think CLI is using mnemonics at all. There should be some library to do so in python (there is but I don't know if it is valid or not)
I tried to use the eth account mnemonic phrase generated by web3 can be imported into the argent-x plugin, but the private key of the eth account cannot be used in starknet_py, I want to generate an account with mnemonic, private key, public key in python that can be used in argent-x plugin. But I haven't found a solution yet
I think you can ask at argent-x
channel on the StarkNet discord server. They should know how to calculate private key from the mnemonics :)
Feature Request
I want to generate an account, but the official is running starknet new_account I can't get private_key class_hash salt, and I can't find it in the documentation, can you tell me how they generated it? Is there any way to build?