NEWTON

NEWTON


Popular tags

    How to use Argent (or any from the main providers) account in the StarkNet.py?

    Asked

    30 days ago

    20

    views


    0

    Hey, I have an Argent account and would like to use it in my python scripts. Is there any way of signing transactions in StarkNet.py with an Argent account?

      starknetpystarknet_pyargent

    0xa483...6765fa

    asked

    30 days ago


    1 answers

    0

    Accepted answer

    You can export a private key from your account. With the private key, you can create AccountClient. You will also need the address of your account.

    Short code example:

    client = GatewayClient(net=TESTNET)
    account_client_testnet = AccountClient(
        address=address,
        key_pair=KeyPair.from_private_key(private_key),
        chain=StarknetChainId.TESTNET,
        client=client,
        supported_tx_version=1,
    )
    

    war-in

    answered

    30 days ago

    Your answer

    NEWTON

    NEWTON