Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(signer): add arweave signer to ario class
Browse files Browse the repository at this point in the history
Atticus committed Mar 16, 2024
1 parent e0c6fca commit 25ea098
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({
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({
Loading

0 comments on commit 25ea098

Please sign in to comment.