# stag-wallet

> ## Installation

Latest version **0.7.6** (published 2023-03-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install stag-wallet
pnpm add stag-wallet
yarn add stag-wallet
bun add stag-wallet
```

## 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.7.6 |
| Published | 2023-03-27 |
| First published | 2022-10-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 24 |
| Unpacked size | 219.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | stevenzeiler |

## Links

- npm: https://www.npmjs.com/package/stag-wallet
- Repository: https://github.com/pow-co/stag-wallet
- Homepage: https://github.com/pow-co/stag-wallet#readme
- Issues: https://github.com/pow-co/stag-wallet/issues
- npm.io page: https://npm.io/package/stag-wallet

## Dependencies (24)

- [joi](https://npm.io/package/joi.md) ^17.6.4
- [txo](https://npm.io/package/txo.md) ^0.0.21
- [uuid](https://npm.io/package/uuid.md) ^9.0.0
- [bip39](https://npm.io/package/bip39.md) ^3.0.4
- [bsv-2](https://npm.io/package/bsv-2.md) npm:bsv@^2.0.10
- [mingo](https://npm.io/package/mingo.md) ^6.1.2
- [nconf](https://npm.io/package/nconf.md) ^0.12.0
- [powco](https://npm.io/package/powco.md) ^1.2.2
- [anypay](https://npm.io/package/anypay.md) ^0.1.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [bsocial](https://npm.io/package/bsocial.md) ^0.0.1
- [winston](https://npm.io/package/winston.md) ^3.8.2
- [commander](https://npm.io/package/commander.md) ^9.4.1
- [scrypt-ts](https://npm.io/package/scrypt-ts.md) ^0.1.7
- [scryptlib](https://npm.io/package/scryptlib.md) ^2.1.10
- [bitcoin-bap](https://npm.io/package/bitcoin-bap.md) ^1.3.1
- [require-all](https://npm.io/package/require-all.md) ^3.0.0
- [stag-wallet](https://npm.io/package/stag-wallet.md) ^0.6.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^9.1.0
- [text-encoder](https://npm.io/package/text-encoder.md) ^0.0.4
- [winston-loki](https://npm.io/package/winston-loki.md) ^6.0.6
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.20.1
- [bsv-coinselect](https://npm.io/package/bsv-coinselect.md) ^4.2.5
- [@runonbitcoin/tokenkit](https://npm.io/package/@runonbitcoin/tokenkit.md) ^1.1.0

## Recent versions

- 0.7.6 (latest) — 2023-03-27
- 0.7.5 — 2023-03-27
- 0.7.4 — 2023-03-27
- 0.7.3 — 2023-03-27
- 0.7.2 — 2023-02-26
- 0.6.0 — 2023-02-12
- 0.5.1 — 2023-01-22
- 0.5.0 — 2023-01-22
- 0.4.1 — 2023-01-22
- 0.4.0 — 2023-01-07
- 0.3.0 — 2022-12-31
- 0.2.0 — 2022-12-08
- 0.1.0 — 2022-12-04
- 0.0.16 — 2022-11-23
- 0.0.15 — 2022-11-21
- … 12 more at https://npm.io/package/stag-wallet/versions

## README

# Stag Wallet

## Installation

```
npm install --save stag-wallet

```
## Configure Wallet

To configure the wallet simply provide `BSV_PRIVATE_KEY` environment variable

```
export BSV_PRIVATE_KEY=KzuhQNi7gQJ3ThGi7C7YMQvjfScLWBCZ7PMb8RmpwJEYHv1JWd4G

```

## Nodejs

### Pay: Protocol

```
import { pay } from 'stag-wallet'

const url = 'https://api.anypayx.com/r/uh83lFFhE'

const { txid, txhex, txo } = await pay(url)

```

### Boostpow

```
import { boostpow } from 'stag-wallet'

const job = await boostpow({
  content: '2b7371657d34652255a276331ac89e46a82cf58693a8e6aaafcbaacfce132cd0',
  difficulty: 0.1,
  tag: 'askbitcoin.question',
  category: 'ASK',
  satoshis: 52_000
})

```

### Onchain.SV

```
import { onchain } from 'stag-wallet'

const { txid, txhex, txo } = await onchain.post({
  app: 'askbitcoin.ai,
  type: 'question',
  content: {
    content: 'Which midasvalley.net domain will be most valuable over the next month?'
  }
})

// or 

const { txid, txhex, txo } = await onchain.findOrCreate({

  where: {
    app: 'www',
    type: 'resource',
    content: {
      url: 'https://www.infowars.com/posts/dave-chappelle-tricked-snl-producers-by-giving-them-fake-monologue-during-dress-rehearsal/'
    }
  },
  defaults: {
    app: 'www',
    type: 'resource',
    content: {
      url: 'https://www.infowars.com/posts/dave-chappelle-tricked-snl-producers-by-giving-them-fake-monologue-during-dress-rehearsal/'
    }
  }

})

```

### Powco.Dev

```
import { powcodev } from 'stag-wallet'

const satoshis = 100_000_000

const txid = await powcodev.deployDevIssueContract({

  platform: 'github',

  org: 'pow-co',

  repo: 'powco.dev',

  issue_id: 555555555,

  title: '',

  description: ''

}, satoshis)

```

---
_Source: https://npm.io/package/stag-wallet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
