Setup

1. initEndpoint()

First, you have to initialize the endpoint of API.

Syntax

initEndpoint: (_endpoint: string, _webseedUrl?: string)

Parameters

NameTypeRequiredDescription

_endpoint

string

Yes

Endpoint of API. You can get the endpoint from here.

_webseedUrl

string

No

Webseed URL. Default value is:

https://node1-gateway-ipfs.eueno.io/ipfs/

2. Adding EuenoProvider

We will enable eueno library services by rendering a <EuenoProvider> component around our entire <App>.

Example

Let's add that to our App.js file:

import React from "react";
import { EuenoProvider, initEndpoint } from "@eueno/lib-browser";
import { Test } from "./Test";
const ENDPOINT = "https://v2-developers.eueno.io/";

function App() {
  useEffect(() => {
    initEndpoint(ENDPOINT);
  }, []);
  
  return (
    <EuenoProvider>
      <Test />
    </EuenoProvider>
  );
}

export default App;

Last updated