# @dappetizer/transaction-hopper-js

> A JavaScript based Transaction Hopper for EOSIO software

Latest version **0.1.22** (published 2020-09-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install @dappetizer/transaction-hopper-js
pnpm add @dappetizer/transaction-hopper-js
yarn add @dappetizer/transaction-hopper-js
bun add @dappetizer/transaction-hopper-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.22 |
| Published | 2020-09-22 |
| First published | 2020-09-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | dappetizer |

## Links

- npm: https://www.npmjs.com/package/@dappetizer/transaction-hopper-js
- Repository: https://github.com/Dappetizer/transaction-hopper-js
- Homepage: https://github.com/Dappetizer/transaction-hopper-js#readme
- Issues: https://github.com/Dappetizer/transaction-hopper-js/issues
- npm.io page: https://npm.io/package/@dappetizer/transaction-hopper-js

## Dependencies (1)

- [eosjs](https://npm.io/package/eosjs.md) ^20.0.3

## Recent versions

- 0.1.22 (latest) — 2020-09-22
- 0.1.21 — 2020-09-22
- 0.1.2 — 2020-09-20
- 0.1.1 — 2020-09-15
- 0.1.0 — 2020-09-15

## README

# Transaction Hopper JS
A JavaScript based Transaction Hopper for EOSIO software

## Usage

### Setup

    //eosjs
    const { Api, JsonRpc, RpcError } = require('eosjs');
    const { JsSignatureProvider } = require('eosjs/dist/eosjs-jssig'); //development only
    const fetch = require('node-fetch'); //node only; not needed in browsers
    const { TextEncoder, TextDecoder } = require('util'); //node only; native TextEncoder/Decoder
    const defaultPrivateKey = process.env.PRIV_KEY;
    const signatureProvider = new JsSignatureProvider([defaultPrivateKey]);
    const rpc = new JsonRpc(process.env.RPC_ENDPOINT, { fetch });
    const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });

    //require module
    const transactionHopper = require('transaction-hopper-js');

    //set signer
    const signer = 'testaccounta';

    //initialize hopper
    const hopper = TransactionHopper(signer, api);

### Load Action

    //define action
    let newAction = {
        account: 'eosio.token',
        name: 'transfer',
        authorization: [
            {
                actor: 'testaccount1',
                permission: 'active',
            }
        ],
        data: {
            from: 'testaccount1'
            to: 5
            quantity: '1.0000 TLOS'
            memo: ''
        }
    };

    //load action into hopper (loads into back of queue)
    hopper.load(newAction);

### Frontload Action

    //load action into front of hopper
    hopper.frontload(newAction);

### Fire Transaction

    //fire contents of hopper as single transaction, clears hopper
    hopper.fire();

### View Hopper

    //view contents of hopper
    hopper.view();

---
_Source: https://npm.io/package/@dappetizer/transaction-hopper-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
