Skip to main content

๐Ÿ”‘ Create Wallet

๐Ÿšจ Read Before ๐Ÿšจโ€‹

New Walletโ€‹

from lunespy.wallet import wallet_factory

wallet = wallet_factory()

From seedโ€‹

from lunespy.wallet import wallet_factory

wallet = wallet_factory(
seed="scrub guard swim catch range upon dawn ensure segment alpha sentence spend effort bar benefit"
)

From private keyโ€‹

from lunespy.wallet import wallet_factory

wallet = wallet_factory(
private_key="BHqy61X4HMNoyJUcvkbZLomqeFqwq7QtYecWUe3hoazX"
)

Full Exampleโ€‹

from lunespy.wallet import wallet_factory

wallet = wallet_factory(
# you can create a seed with any string
seed="scrub guard swim catch range upon dawn ensure segment alpha sentence spend effort bar benefit",
# only if it doesn't pass the seed
private_key="BHqy61X4HMNoyJUcvkbZLomqeFqwq7QtYecWUe3hoazX",
# 1 for mainnet, 0 fo testnet
chain=1,
# 0 by default, but can go up to
nonce=0,
# number of words of the seed, only when creating a new seed
seed_len=15,
)