open-index/open-npm huggingface dataset:
npm package: @keypo/execute
Description: Execute package for Keypo
Author: Keypo
Latest version: 0.0.20
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @keypo/execute

Execute package for Keypo, providing authentication and execution utilities.

## Installation

```bash
npm install @keypo/execute
```

## Usage

```typescript
import { getLitAuthData } from '@keypo/execute';

// Use the getLitAuthData function
const authData = await getLitAuthData(apiName, keypoInstance);
```

## Building

Run `nx build execute` to build the library.

## Running unit tests

Run `nx test execute` to execute the unit tests via Jest.

## License

MIT
npm package: @keypo/typescript-sdk
Description: A TypeScript SDK for using Keypo
Author: Decentralized Storage Team
Latest version: 1.0.37

# Keypo SDK

## Overview
The Keypo SDK provides cryptographic and data management functions for browser and Node.js environments.

For usage instructions, please consult https://www.keypo.io/docs

## Note

The Keypo SDK is designed for browser/client environments. For server environments, please use https://www.npmjs.com/package/@keypo/typescript-sdk-server

## Installation
```bash
npm install @keypo/typescript-sdk
```

## License
MIT
npm package: @keyring/bsv
Description: Library for working with BSV
Author: BitBoss
Latest version: 0.2.2

# Keyring BSV javascript library

KeyRing is a javascript library for creating and signing bitcoin transactions, allowing you to easily build wallets for the Bitcoin SV blockchain. The library includes support for the larger OP_RETURN size.  With KeyRing it is very easy to add new op codes and script templates because of the projects modular nature.

### To add Keyring BSV to your javascript project:
npm
```
npm install @keyring/bsv --save
```

yarn
```
yarn add @keyring/bsv
```

### Reference the Transaction package
Add a require reference at the top of your code.
```
const BSV = require('@keyring/bsv');
const Transaction = BSV.Transaction;
```


### Instantiate a new Transaction object
You can create a new transaction object by passing in a buffer or a hex string representation of an existing blockchain transaction.
```
let txin = new Transaction(hexData);
```

Another option is to pass in an Output object into the Transaction.from() method.  You can also pass an array of outputs into the Transaction.from method.  The amount is specified in satoshi.
```
let tx = new Transaction().from(
      {
        txid: '729b4706357b70c6aae58cd556e895d9441a7741aeb9436419ecaf18e764ea41',
        index: 2,
        asm: 'OP_DUP OP_HASH160 108748bafaa372bcaa21b1858eccc78b54fcd371 OP_EQUALVERIFY OP_CHECKSIG',
        amount: 1638569
      }
);
```

### Set the “to” address
The address value should be in the standard address format, passed in as a string.  Also include the amount of crypto being sent to that address.
```
tx.to(address, satoshis);
```


### Set the fee
Use 0 if you want the library to auto calculate the proper fee.
```
tx.fee(0);
```

### Specify the change address 
The address value should be in the standard address format, passed in as a string.
```
tx.change(address);
```

### Set OP_RETURN data
Set data into the OP_RETURN as a node.js Buffer value.
```
tx.data(Buffer.from(myDataAsString));
```

Set B:// protocol formatted file data into the OP_RETURN.  
```
tx.files(rawData, 'image/jpg', 'rockies.jpg', 'binary');
```
The arguments for the files method are: 
* file data as a Buffer
* file type
* file name
* encoding 

Example file type values: image/jpg, text/plain, application/octet-stream, application/msgpack, application/cbor 
Example encoding values: binary, hex 

Both the MsgPack and CBOR plugins will recognize the B:// protocol format when reading in a raw transaction and will parse the file data if the file type is set to application/msgpack or application/cbor respectively.


### Sign and Serialize the Transaction
Sign with the private key as a node.js Buffer value, and then serialize the transaction.  You can then broadcast it using a SPV server’s API.
```
tx.sign(privKey);
const serializedTx = tx.hex;
// send serializedTx...
```

### Chaining together method calls
Note that you can also chain together Transaction method calls, for example:
```
tx.to(address, satoshis).change(address).data(Buffer.from(myDataAsString));
```
npm package: @keyring/cbor-plugin
Description: Plugin for storing data in a transaction with cbor encoding
Author: Josh Robinson
Latest version: 0.2.1

# `@keyring/cbor-plugin`

This plugin allows you to easily insert CBOR encoded data into a transaction.  When using this plugin a cbor method is added to the Keyring Transaction class.

## Usage

```
const BSV = require('@keyring/bsv');
const cborPlugin = require('@keyring/cbor-plugin');

const Transaction = BSV.Transaction;
Transaction.use(new cborPlugin());

let tx = new Transaction();
tx.cbor({ hello: 'world' });
console.log('data', tx.data()[0]);
```
npm package: @keyring/keyring
Description: Keyring base package
Latest version: 0.2.0

# Keyring

***Warning*** - This library is new and changing rapidly.

Keyring is a collection of javascript libraries for working with Bitcoin(BSV) transactions and wallets.

## Libraries

[BSV](https://github.com/BitbossIO/keyring/tree/master/packages/bsv) - The BSV library loads the most commonly needed modules to get you started working with the BSV chain.

[Transaction](https://github.com/BitbossIO/keyring/tree/master/packages/transaction) - The Transaction library handles transaction parsing, creation, signing, and more.

[Util](https://github.com/BitbossIO/keyring/tree/master/packages/util) - The Util package contains helpers shared by the other libraries.

## Contributing

All contributions of code, feedback, and feature requests are welcome. We will be using github issues to track work and will monitor it closely. Right now keyring is bare bones, but we have a nice base to build the dev tools bitcoin needs.
npm package: @keyring/msgpack-plugin
Description: Plugin for storing data in a transaction with msgpack encoding
Author: Josh Robinson
Latest version: 0.2.1

# `@keyring/msgpack-plugin`

This plugin allows you to easily insert msgpack encoded data into a transaction.  When using this plugin a msgpack method is added to the Keyring Transaction class.

## Usage

```
const BSV = require('@keyring/bsv');
const msgPackPlugin = require('@keyring/msgpack-plugin');

const Transaction = BSV.Transaction;
Transaction.use(new msgPackPlugin());

let tx = new Transaction();
tx.msgpack({ hello: 'world' });
console.log('data', tx.data()[0]);
```
npm package: @keyring/plugin
Description: > TODO: description
Author: Josh Robinson
Latest version: 0.2.0

# `@keyring/plugin`

Base functionality for Keyring plugins and classes hosting plugins

## Usage

```
const Plugin = require('@keyring/plugin');

// For a class that is hosting plugins
class Transaction extends Plugin.Host {
    ...
}

// For a class that is implementing plugin functionality
class MsgpackPlugin extends Plugin.Provider {
    ...
}
```
npm package: @keyring/transaction
Description: Keyring transaction package
Author: BitBoss
Latest version: 0.2.2

# Keyring - Transaction

@keyring/transaction is a javascript library for creating and signing bitcoin transactions, allowing you to easily build wallets for the Bitcoin SV blockchain.

### To add Keyring to your javascript project:
```
npm install @keyring/transaction —save
```

### Reference the Transaction package
Add a require reference at the top of your code.
```
const Transaction = require('@keyring/transaction');
```


### Instantiate a new Transaction object
You can create a new transaction object by passing in the (string) hex representation of an existing blockchain transaction.
```
let txin = new Transaction(hexData);
```

Another option is to pass in an Output object into the Transaction.from() method.  You can also pass an array of outputs into the Transaction.from method.  The amount is specified in satoshi.
```
let tx = new Transaction().from(
      {
        txid: '729b4706357b70c6aae58cd556e895d9441a7741aeb9436419ecaf18e764ea41',
        index: 2,
        asm: 'OP_DUP OP_HASH160 108748bafaa372bcaa21b1858eccc78b54fcd371 OP_EQUALVERIFY OP_CHECKSIG',
        amount: 1638569
      }
);
```

### Set the “to” address
The address value should be in the standard address format, passed in as a string.  Also include the amount of crypto being sent to that address.
```
tx.to(address, satoshis);
```


### Set the fee
By default the fee is auto calculated, but if you want to manually set it you can use the .fee(satoshis) method. If you want to ensure the default is used pass in 0.
```
tx.fee(10000);
```

### Specify the change address 
The address value should be in the standard address format, passed in as a string.
```
tx.change(address);
```

### Set OP_RETURN data
Set data into an OP_RETURN as a node.js Buffer value.
```
tx.data(Buffer.from(myDataAsString));
```

Note that you can also chain together Transaction method calls, for example:
```
tx.to(address, satoshis).change(address).data(Buffer.from(myDataAsString));
```


### Sign and Serialize the Transaction
Sign with the private key as a node.js Buffer value, and then serialize the transaction.  You can then broadcast it using a SPV server’s API.
```
tx.sign(privKey);
const serializedTx = tx.hex;
// send serializedTx...
```
npm package: @keyring/txo-plugin
Description: > TODO: description
Author: Josh Robinson
Latest version: 0.2.1

# `@keyring/txo-plugin`

This plugin adds TXO conversion capabilities to the Keyring Transaction class.  Using the plugin allows you to easily transform the raw transaction data into a JSON structured format to then use within Planaria for powerful queries and filters.

## Usage

```
const BSV = require('@keyring/bsv');
const TXOPlugin = require('@keyring/txo-plugin');

const Transaction = BSV.Transaction;
Transaction.use(new TXOPlugin());

let tx = new Transaction([raw hex format as a string]);
let txo = tx.txo();
// Do something with the txo JSON data such as inserting into a mongodb for querying capabilities
```
npm package: @keyring/validation-plugin
Description: > TODO: description
Author: Josh Robinson
Latest version: 0.2.1

# `@keyring/validation-plugin`

This plugin allows a developer to easily verify a transaction before sending it off to a node.  When using this plugin a validate method is added to the Keyring Transaction class.  By default it checks for the following:
* The transaction has inputs
* The transaction inputs are signed
* The transaction outputs are over the dust amount
* The transaction has a fee


## Usage

```
const BSV = require('@keyring/bsv');
const validationPlugin = require('@keyring/validation-plugin');

let options = {
    transaction: {
      hasInputs: true,
      inputsAreSigned: true,
      outputsAreOver: 500,
      hasFee: true
    }
};

const Transaction = BSV.Transaction;
Transaction.use(new validationPlugin(options));

let tx = new Transaction().from(
    {
        txid: '729b4706357b70c6aae58cd556e895d9441a7741aeb9436419ecaf18e764ea41',
        index: 2,
        asm: 'OP_DUP OP_HASH160 108748bafaa372bcaa21b1858eccc78b54fcd371 OP_EQUALVERIFY OP_CHECKSIG',
        amount: 1638569
    }
);

tx.validate();
if (tx.errors.length > 0) {
    console.log('Validation errors exist', tx.errors);
}
```

## Example output

```
Validation errors exist [ { index: 0,
    key: 'inputsAreSigned',
    message: 'Input 0 is not signed.' } ]
```