Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arweave-uploader

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arweave-uploader

Arweave Uploader - detect and handle arweave upload failures

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

arweave-uploader

Arweave Uploader - detect and handle arweave upload failures

Installation

npm install mcmonkeys1/arweave-uploader

N.B. This installs directly from github. You may have issues uninstalling/updating the package, in this case remove node_modules & package-lock.json and try again

Example Usage

import Arweave from 'arweave'

const arweave = ...

const main = async () => {

	/* create your transaction as normal */

	const tx = await arweave.createTransaction({ data: "123" }, wallet)
	tx.addTag('App-Name', 'my-app-name')
	tx.addTag('Content-Type', 'application/json')

	try {

		/* no need to sign or post, just call "uploadTx" with your wallet */

		const txid = await uploadTx(tx, wallet) // this will take a long time!
		
		console.log('tx upload success with id ' + txid)

	}catch(e){
		
		/* bad tx found (e.g. wallet does not enough AR for tx fee) */

		console.error(e.name + ': ' + e.message)
	}
}

Options

setDebugOutput(false) to turn off console messages - not advised, but possible.

FAQs

Package last updated on 08 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc