0.1.9 • Published 3 years ago

@artbycity/bundledao-client v0.1.9

Weekly downloads
-
License
AGPL-3.0-only
Repository
gitlab
Last release
3 years ago

BundleDAO Client

This is a JavaScript library written in TypeScript to create Arweave ANS-104 Binary Bundles with a DeSo identity. The client signs Data Items and posts bundles to the BundleDAO Node for payment delegation to the Arweave network.

Install

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

Usage

Create a BundleDAOClient, Bundle, and post it to the BundleDAO Node

import { BundleDAOClient } from '@artbycity/bundledao-client'
// Get this info from user auth object after log-in with identity service
const identityServiceSignerInfo = {
    accessLevelHmac: 'user-access-level-hmac',
    encryptedSeedHex: 'user-encrypted-seedhex',
    desoPublicKey: 'user-deso-public-key' // e.g. BC1YLioCEtYLNTTRjvAok9Hkfj8yd1E1LWQ2PSBv1KdbPKKdcvu74aN
}
const bundleDAO = new BundleDAOClient('deso', identityServiceSignerInfo)

const data = 'my data' // or Uint8Array

// Add metadata tags to your data
const tags = [
    { name: 'Content-Type', value: 'text/plain' }, // Content MIME Type for serving
    { name: 'External-Network', value: 'deso' },
    { name: 'External-Owner', value: 'my-deso-public-key' }, // Your DeSo Public Key, for discoverability
]
const dataItem = await bundleDAO.createData(data, { tags })

// Wrap all of your data items in a Bundle
const items = [ dataItem ]
const bundle = await bundleDAO.createBundle(items)

// Post!
const bundleTxId = await bundleDAO.postBundle(bundle)

About BundleDAO

BundleDAO on DAODAO

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago