metafab-client
Advanced tools
Weekly downloads
Readme
Community-built Typescript client for MetaFab's Web3 API.
The official documentation can be found at: https://trymetafab.com.
NPM
npm install metafab-client
YARN
yarn add metafab-client
Authenticate your MetaFab game
import { MetaFabClient, NETWORK } from 'metafab-client';
import type { Game } from 'metafab-client';
const client = new MetaFabClient({
network: NETWORK.POLY_MAIN,
username: process.env.METAFAB_ACCOUNT_EMAIL,
password: process.env.METAFAB_ACCOUNT_PASSWORD,
});
const result = await client.games.auth();
const game: Game = result.data;
Authenticate a MetaFab player
import { MetaFabClient, NETWORK } from 'metafab-client';
import type { Player } from 'metafab-client';
const client = new MetaFabClient({
network: NETWORK.POLY_MAIN,
username: process.env.METAFAB_ACCOUNT_EMAIL,
password: process.env.METAFAB_ACCOUNT_PASSWORD,
});
const result = await client.players.auth(process.env.METAFAB_GAME_PUBLISH_KEY, 'playerUsername', 'p@ssw0rd');
const player: Player = result.data;
FAQs
MetaFab Typescript Client SDK
The npm package metafab-client receives a total of 10 weekly downloads. As such, metafab-client popularity was classified as not popular.
We found that metafab-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.