Navigator Prefabricating Marinates
Wondering what’s next for npm?Check out our public roadmap! »

@meterio/flex-frameworkTypeScript icon, indicating that this package has built-in type declarations

0.5.2 • Public • Published

Flex Framework

npm version

Flex Framework is a library implements Flex interface. It helps various wallet instances offer consistent Flex interface to Meter Dapps.

Installation

npm i @meterio/flex-framework

Usage

To create framework instance, Flex.Driver needs to be implemented

import { Framework } from '@meterio/flex-framework';
import '@meterio/flex.driver';

class MyDriver implements Flex.Driver {
  // implementations
}

const driver = new MyDriver();

// it's suggested in development mode, which is helpful to diagnose driver implementation.
// const framework = new Framework(Framework.guardDriver(driver))

const framework = new Framework(driver);

// here `framework` is the ready-to-use Flex instance object

See also

Flex playground

Install

npm i @meterio/flex-framework

DownloadsWeekly Downloads

1

Version

0.5.2

License

LGPL-3.0

Unpacked Size

224 kB

Total Files

58

Last publish

Collaborators

  • avatar