Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

art-by-city/bundledao-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BundleDAO Node

This is a JavaScript library written in TypeScript to accept Arweave ANS-104 Binary Bundles signed with a DeSo identity for payment delegation to the Arweave Network. See also BundleDAO Client

Install

$ npm i --save @artbycity/bundledao-node

Run Programmatically

import Arweave from 'arweave'
import BundleDAONode from '@artbycity/bundledao-node'

import arweaveJWK from './arweave-keyfile.json'

const ARWEAVE_PROTOCOL = process.env.ARWEAVE_PROTOCOL || 'http'
const ARWEAVE_HOST = process.env.ARWEAVE_HOST || 'localhost'
const ARWEAVE_PORT = process.env.ARWEAVE_PORT
  ? Number.parseInt(process.env.ARWEAVE_PORT)
  : 1984

const arweave = new Arweave({
  protocol: ARWEAVE_PROTOCOL,
  host: ARWEAVE_HOST,
  port: ARWEAVE_PORT
})

const seedHex = 'my-deso-seed-hex'

const bundleDAONode = new BundleDAONode(seedHex, arweaveJWK, arweave, 'dbpath')

await bundleDAONode.start()

Or with NuxtJS/NextJS/etc Server Middleware

// Same as above

const bundleDAONode = new BundleDAONode(seedHex, arweaveJWK, arweave, 'dbpath')
const callback = bundleDAONode.app.callback()

export default callback

About BundleDAO

BundleDAO on DAODAO

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published