JS Plugin

Tezos Harbinger Polywrapper JS Plugin

Client JS

Import Plugins

import { Web3ApiClient } from "@web3api/client-js"
import { tezosPlugin } from "@web3api/tezos-plugin-js"

Web3 API Client

Creates a new Web3ApiClient client from which queries and mutations will be called.

export const client = new Web3ApiClient({
   plugins: [
       {
         uri: "w3://ens/tezos.web3api.eth",
         plugin: tezosPlugin({
           networks: {
               mainnet: {
                   provider: "https://rpc.tzstats.com"
               }, 
               granadanet: {
                   provider: "https://rpc.granada.tzstats.com",
               }
           },
           defaultNetwork: "mainnet"
         })
       }
   ]
})

Query JS

Import Client

Set Wrapper URI

Sets the URI which points to the Tezos Harbinger Polywrapper’s WASM files uploaded on IPFS.

Get Asset Data

Gets an asset's data by passing the network and asset code.

Last updated