Skip to content

hgraph-io/react-native-template

Repository files navigation

React Native @hgraph.io/sdk template

This is an Expo project created with create-expo-app.

Examples overview

The template contains several examples of using @hgraph.io/sdk features, as well as an example of hedera wallet integration using @hashgraph/hedera-wallet-connect:

Wallet

The entry point is at app/hedera-wallet-connect/index.tsx This demo example of wallet management (create, export, import) and integration @hashgraph/hedera-wallet-connect with React Native.

Allows the hedera wallet to connect to the DApp via the WalletConnect protocol and execute requests from the DApp, such as signing messages and transactions, executing requests and transactions, etc. in accordance with HIP-820.

To use the example, please create a project in Reown Cloud and fill in the variables in .env.

A demo version of the DApp is available here.

Recent Transactions Feed

The entry point is at app/hgraph-sdk/transactions-feed.tsx

Example of subscribing and displaying recent transactions as a live feed with a readable type and transaction success highlighting using @hgraph.io/sdk GraphQL subscription placed on src/gql/RecentTransactions.gql

NFT Collections Search

The entry point is at app/hgraph-sdk/nft-collections-search.tsx

Example of searching NFT collections by symbol (partial case-insensitive search) using @hgraph.io/sdk. Used debounce and abort controller mechanics for correct search in real time. Also displaying one NFT for each collection with an image, with simple decoded from ipfs metadata (if available) with animations supported. GraphQL query placed on src/gql/SearchNFTCollection.gql

Recent Tokens Transfers Feed

The entry point is at app/hgraph-sdk/tokens-transfers-feed.tsx

Example of subscribing and displaying recent transfers for fungible tokens as a live feed using @hgraph.io/sdk. GraphQL subscription placed on src/gql/RecentTokensTransfers.gql

Useful recources

Get started

  1. Install dependencies

    yarn install
  2. Seup env vars

    cp .env.example .env
  3. Start the app

     yarn start

In the output, you'll find options to open the app in a

You can start developing by editing the files inside the app directory. This project uses file-based routing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •