@mabalashov/azuro-client
v0.0.32
Published
The client to simplify access to Azuro games
Downloads
34
Readme
Azuro Client
The client to simplify access to Azuro games
It contains the clients to fetch the games from Azuro Cache Server and from Azuro SmartContracts
You can combine several clients to implement the Fallback strategy
Install
yarn add @mabalashov/azuro-client
Usage
import { configure, setSelectedChainId } from "@mabalashov/azuro-sdk";
import { Client, SdkClient, ApiClient } from "@mabalashov/azuro-client";
const init = async () => {
// configure SDK Client
configure({
rpcUrl: 'https://sokol-rpc.azuro.org/',
ipfsGateway: 'https://ipfs-gateway.azuro.org/ipfs/',
});
const client = new Client([ // order is important
new ApiClient({
// you can pass configured Axios instance
baseUrl: 'http://127.0.0.1:3000'
}),
new SdkClient(),
]);
const games = await client.fetchGames();
console.log(games);
}
init();