tezos-bundler
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Art By City - Tezos Bundler

Description

This project offers a REST API for accepting Tezos wallet keypair signed Arweve ANS-104 Bundles.

Requirements

  • node v16.13.2

Dev Requirements

  • ArLocal If developing locally, ensure the Arweave wallet passed to TezosBundler has an AR balance by calling /mint/<address>/<amount> on the arlocal API.

Install

$ npm i --save @tezos-bundler

Run Programmatically

import Arweave from 'arweave'
import TezosBundler from 'tezos-bundler'

// Import your Arweave JWK keyfile
import arweaveJWK from './my-arweave-keyfile.json'

const arweave = new Arweave({ /* Arweave API Config */ })
const tezosBundler = new TezosBundler(arweaveJWK, arweave)
await tezosBundler.start()

Or with NuxtJS/NextJS/etc Server Middleware

import Arweave from 'arweave'
import TezosBundler from 'tezos-bundler'

// Import your Arweave JWK keyfile
import arweaveJWK from './my-arweave-keyfile.json'

const arweave = new Arweave({ /* Arweave API Config */ })
const tezosBundler = new TezosBundler(testweaveJWK, arweave)
const callback = tezosBundler.app.callback()

export default callback

Rest API

  • POST /bundle/xtz Post an ANS-104 binary bundle to be posted to Arweave
    • Status 200
    • Body
      {
        txid: 'arweave-tx-id',
        status: 200,
        statusText: 'OK'
      }
      

Readme

Keywords

none

Package Sidebar

Install

npm i tezos-bundler

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

18.1 kB

Total Files

15

Last publish

Collaborators

  • jim-toth