November: Procrastination Month


    0.0.1 • Public • Published

    ⛽️ Gas Station

    Gas Station is a library for React Native apps to easily connect to the Ethereum network and complete transactions.


    Gas Station is a React Native library allowing you to build dApps (Decentralized Applications) which transform your mobile device into a light client node on the Ethereum Network and enables you to easily access Ethereum’s entire ecosystem, including interacting with Smart Contracts, make payment, and more.

    Project status

    We just got started. This is what the project timeline looks like:

    • May 20th: have react-native-geth up and running for iOS.
    • June 10th: finished basic UI for creating a wallet, getting funds, and approving transactions.
    • June 20th: finish interface and API for connecting with other apps to share wallets between apps.
    • July 1st: added Android support.
    • July 10th: first stable release for iOS and Android.

    Supported platforms

    • iOS
    • Android support coming soon


    Using NPM:

    npm i gas-station
    react-native link gas-station

    Using Yarn:

    yarn add gas-station
    react-native link gas-station


    Due to the rapid changes being made in the React Native ecosystem, we are not officially going to support this module on anything but the latest version of React Native. With that said, we will do our best to stay compatible with older versions as much that is practical, and the peer dependency of this requirement is set to "react-native": "*" explicitly for this reason. If you are using an older version of React Native with this module though, some features may be buggy.

    Usage example

    import { Alert } from 'react-native'
    import GasStation from 'gas-station'
    // Do this as soon as you need access to the Ethereum network
    // Note that this will bring up a UI the first time it is called!
        .then(async (eth) => {
            // We now have access to the ethereum blockcahin
            const addresses = await eth.getAccounts()
            Alert.alert('Your wallet address', addresses[0])
        .catch((e) => {
            // Node couldn't start or user cancelled login

    API documentation

    All API methods below are asynchronous and return Promise instances.


    Returns Array denoting the addresses of all wallets that the user has created or has given the current app access to.


    Retrieves the address associated with the user's default account.

    Returns String with wallet address.


    Returns the wei balance of the current account.

    Returns String balance.


    Returns the wei balance of the specified account.


    • address String Address of account being looked up.

    Returns String balance.


    Retrieves the current progress of the sync algorithm.

    Returns Object Return object sync progress or null


    Subscribes to notifications about the current blockchain head.

    Returns Boolean – true if subscribed.


    Brings up a modal window where the user can manage their accounts.


    Brings up a modal window where the user can add Ethereum to their primary account, either by copying their address, viewing their wallet's QR code, or by opening the Coinbase app and starting a transaction to their wallet's address.


    Create and send a transaction. The user will see a modal window and will have to agree to sending the transaction.


    • toAddress String Address destination
    • amount Number Amount
    • gasLimit Number Gas limit (optional, automatically set if left empty)
    • gasPrice Number Gas price (optional, automatically set if left empty)
    • data Number

    Returns String – transaction HEX identifier


    Retrieves the currently suggested gas price to allow a timely execution of a transaction.

    Returns Double – suggested gas price


    Retrieves this account's pending nonce. This is the nonce you should use when creating a transaction.

    Returns Double – nonce


    npm i gas-station

    DownloadsWeekly Downloads






    Unpacked Size

    528 kB

    Total Files


    Last publish


    • tschoffelen