Skip to content

Commit

Permalink
feat(signer): add arweave signer to ario class
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Mar 16, 2024
1 parent e0c6fca commit 25ea098
Show file tree
Hide file tree
Showing 9 changed files with 858 additions and 210 deletions.
6 changes: 5 additions & 1 deletion examples/node/index.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
const Arweave = require('arweave');
const {
ArIO,
ARNS_TESTNET_REGISTRY_TX,
} = require('../../lib/cjs/node/index.js');
const { ArweaveSigner } = require('arbundles');

(async () => {
const arIO = new ArIO();
const jwk = await Arweave.init({}).wallets.generate();
const signer = new ArweaveSigner(jwk);
const arIO = new ArIO({ signer, });
// testnet gateways
const testnetGateways = await arIO.getGateways();
const protocolBalance = await arIO.getBalance({
Expand Down
6 changes: 5 additions & 1 deletion examples/node/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { ArweaveSigner } from 'arbundles';
import { ARNS_TESTNET_REGISTRY_TX, ArIO } from '../../lib/esm/node/index.js';
import Arweave from 'arweave';

(async () => {
const arIO = new ArIO();
const jwk = await Arweave.init({}).wallets.generate();
const signer = new ArweaveSigner(jwk);
const arIO = new ArIO({ signer, });
// testnet gateways
const testnetGateways = await arIO.getGateways();
const protocolBalance = await arIO.getBalance({
Expand Down
Loading

0 comments on commit 25ea098

Please sign in to comment.