@akord/akord-js-arweave-signer
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-alpha.0 • Public • Published

AkordJS <> Arweave Signer

Usage

Install dependencies

yarn add @akord/akord-js @akord/akord-js-arweave-signer

Signup with Arweave signer

import { ArweaveSigner } from "@akord/akord-js-arweave-signer"
import { Akord, Auth } from "@akord/akord-js";
import Arweave from "arweave";

// generate new Arweave wallet or use an existing one
const arweave = Arweave.init({
    host: 'arweave.net',
    port: 443,
    protocol: 'https'
});
const jwk = await arweave.wallets.generate();
const signer = new ArweaveSigner(jwk);
await Auth.signUpWithWallet({ wallet: signer, walletType: "ARWEAVE" });

Use AkordJS with Arweave signer

import { ArweaveSigner } from "@akord/akord-js-arweave-signer"
import { Akord, Auth } from "@akord/akord-js";

await Auth.signInWithWallet({ wallet: signer });
const akord = new Akord({ signer: signer });
const { vaultId } = await akord.vault.create("Vault created with Arweave", { public: true });

Development

Install dependencies

yarn install

Test

node --inspect node_modules/.bin/jest ./src/__tests__/arweave.test.ts

Package Sidebar

Install

npm i @akord/akord-js-arweave-signer

Weekly Downloads

0

Version

0.1.0-alpha.0

License

MIT

Unpacked Size

7.42 kB

Total Files

4

Last publish

Collaborators

  • akord-service
  • kgracki
  • katala
  • wkolod
  • jarrvis