0.1.0-alpha.0 • Published 6 months ago

@akord/akord-js-arweave-signer v0.1.0-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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
0.1.0-alpha.2

6 months ago

0.1.0-alpha.1

7 months ago

0.1.0-alpha.0

7 months ago