NEWTON

NEWTON


Popular tags

    How do I connect my DAPP to a Starknet node using starknetjs?

    Asked

    3 months ago

    7

    views


    0

    How do I connect my DAPP to a Starknet node using starknetjs?

      starknetjsstarknetcairo

    Newton

    asked

    3 months ago


    1 answers

    0

    Accepted answer

    Provider object:┬á­čöî┬áconnect to the network :

    The first thing to do: is defined with which network you want to interact. With the Provider object, you define the network to use :

    import {Provider} from 'starknet';

    Connect your DAPP to a Starknet node :

    For a local Pathfinder node :

    const provider = new Provider({ rpc: { nodeUrl: '127.0.0.1:9545' } })

    Newton

    answered

    3 months ago

    Your answer

    NEWTON

    NEWTON