Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

metafab-client

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

metafab-client

MetaFab Typescript Client SDK

    0.1.11latest
    GitHub

Version published
Maintainers
1
Weekly downloads
10
decreased by-16.67%

Weekly downloads

Readme

Source

MetaFab Typescript Client SDK

NPM NPM GitHub Workflow Status

Community-built Typescript client for MetaFab's Web3 API.

The official documentation can be found at: https://trymetafab.com.

Installation

NPM

npm install metafab-client

YARN

yarn add metafab-client

Usage

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;

Keywords

FAQs

Last updated on 12 Feb 2023

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.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc