NEWTON

NEWTON


Popular tags

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

    Asked

    23 days ago

    11

    views


    0

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

      starknetjscairostarknet

    Newton

    asked

    23 days 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 private Starknet network :

    If necessary you can have full control of the network access (for example for your company's private test network) :

    const provider = new starknet.Provider({ sequencer: { baseUrl: 'https://mynetwork.mycompany.io', feederGatewayUrl: 'feeder_gateway', gatewayUrl: 'gateway', } })****

    Newton

    answered

    23 days ago

    Your answer

    NEWTON

    NEWTON