0.3.0 • Published 4 years ago

ual-mykey v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

UAL for MyKey Authenticator

Forked from ual-scatter

This authenticator is meant to be used with MyKey and Universal Authenticator Library. When used in combination with them, it gives developers the ability to request transaction signatures through Scatter using the common UAL API.

Getting Started

yarn add ual-mykey

Dependencies

You must use one of the UAL renderers below.

React - ual-reactjs-renderer

PlainJS - ual-plainjs-renderer

Basic Usage with React

import { MyKey } from 'ual-mykey'
import { UALProvider, withUAL } from 'ual-reactjs-renderer'

const exampleNet = {
  chainId: '',
  rpcEndpoints: [{
    protocol: '',
    host: '',
    port: '',
  }]
}

const App = (props) => <div>{JSON.stringify(props.ual)}</div>
const AppWithUAL = withUAL(App)

const mykey = new MyKey([exampleNet], { appName: 'Example App' })

<UALProvider chains={[exampleNet]} authenticators={[mykey]}>
  <AppWithUAL />
</UALProvider>