3.0.0 • Published 4 years ago

node-eosjs-signature-provider v3.0.0

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
4 years ago

node-eosjs-signature-provider

npm version

EosJS signature provider implementation that uses fc library to sign transactions via node cpp modules feature.

How to use?

First, you need to install library via npm or yarn

npm install --save node-eosjs-signature-provider

Than, you can use it like here:

import {Api, JsonRpc} from "eosjs";
import fetch from "node-fetch";
import * as encoding from "text-encoding";

import NodeEosjsSignatureProvider from "node-eosjs-signature-provider";


const rpc = new JsonRpc("http://your-url:8888", {fetch});
const signatureProvider = new NodeEosjsSignatureProvider(
            [
                "first p-key",
                "second p-key"
            ]
        );

const api = new Api({
                        rpc: rpc,
                        signatureProvider: signatureProvider,
                        textDecoder: new encoding.TextDecoder(),
                        textEncoder: new encoding.TextEncoder(),
                    });

api.transact(...);