1.0.3 • Published 1 year ago

krnl v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

krnl.js

npm (tag) npm (downloads)


Forked from ethers.js 6.10.1and extended with krnl specific rpc calls and configs.

Installing

NodeJS

npm install krnl

Browser (ESM)

The bundled library is available in the ./dist/ folder in this repo.

<script type="module">
    import { ethers } from "./dist/ethers.min.js";
</script>

Changelog

For the latest changes, see the CHANGELOG.

Original ethers documentation

Browse the documentation online:

Usage

Note: Metamask connection is currently not supported.

Setting up your krnl json rpc provider

const provider = new ethers.JsonRpcProvider(KRNL_NODE, krnlAccessToken);

Sending krnl transaction requests and calling contracts

// specify the FaaS you need
const faasRequests: string[] = ["KYT", "KYC"];
// requesting the signatureToken
const hashAndSig = await provider.sendKrnlTransactionRequest(faasRequests);
// call your contract
const sentTx = await dapp.protectedFunctionality(
  "test",
  hashAndSig.hash,
  hashAndSig.signatureToken,
  { messages: faasRequests }
);

For more example see the sandbox example scripts.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.3

1 year ago

1.0.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.1.0-beta

1 year ago