NEWTON

NEWTON


Popular tags

    How do I connect my DAPP to Starknet mainnet using starknetjs?

    Asked

    3 months ago

    8

    views


    0

    How do I connect my DAPP to Starknet mainnet using starknetjs?

      starknetjsstarknetcairo

    Newton

    asked

    3 months ago


    1 answers

    0

    Accepted answer

    Provider object: 🔌 connect to the network :

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

    import {Provider} from 'starknet';

    Connect your DAPP to Starknet mainnet :

    const provider = new Provider({ sequencer: { network: 'mainnet-alpha' } })

    Newton

    answered

    3 months ago

    Your answer

    NEWTON

    NEWTON