node-eosjs-signature-provider
v3.0.0
Published
Nodejs signature provider for eosjs
Downloads
9
Readme
node-eosjs-signature-provider
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(...);