# @stellarguard/multisig-utils

> Utilities for working with Stellar mulitsig.

Latest version **2.0.1** (published 2021-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @stellarguard/multisig-utils
pnpm add @stellarguard/multisig-utils
yarn add @stellarguard/multisig-utils
bun add @stellarguard/multisig-utils
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2021-05-29 |
| First published | 2018-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8.9 |
| Dependencies | 1 |
| Unpacked size | 58.5 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | pselden4 |

## Links

- npm: https://www.npmjs.com/package/@stellarguard/multisig-utils
- Repository: https://github.com/stellarguard/multisig-utils
- Homepage: https://github.com/stellarguard/multisig-utils#readme
- Issues: https://github.com/stellarguard/multisig-utils/issues
- npm.io page: https://npm.io/package/@stellarguard/multisig-utils

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.18.0

## Recent versions

- 2.0.1 (latest) — 2021-05-29
- 2.0.0 — 2020-11-23
- 1.1.0 — 2020-02-10
- 1.0.0 — 2019-05-16
- 0.4.1 — 2018-11-08
- 0.4.0 — 2018-11-02
- 0.3.2 — 2018-10-31
- 0.3.1 — 2018-10-29
- 0.3.0 — 2018-10-29
- 0.2.5 — 2018-10-19
- 0.2.3 — 2018-10-18
- 0.2.2 — 2018-10-18
- 0.2.1 — 2018-10-16
- 0.2.0 — 2018-10-16
- 0.1.0 — 2018-10-16

## README

# @stellarguard/multisig-utils

Utilities for working with Stellar mulitsig.

## Installation

```bash
npm install @stellarguard/multisig-utils --save
# or
yarn add @stellarguard/multisig-utils
```

## Usage

```js
import {
  needsMoreSignatures,
  getMultisigServerEndpoint,
  submitToMultisigServer
} from '@stellarguard/multisig-utils';

const moreSignatures = await needsMoreSignatures(transaction, server);

if (moreSignatures) {
  const multisigEndpoint = await getMultisigServerEndpoint(
    moreSignatures[0].account
  );

  const result = await submitToMultisigServer(transaction, multisigEndpoint);

  if (result.stellarGuard) {
    console.log(`Authorize your transaction at ${result.url}`);
  }
}
```

## Examples

See [example.ts](https://github.com/stellarguard/multisig-utils/blob/master/src/example.ts) for examples.

Try a [live demo](https://stellarguard.github.io/multisig-utils/demo).

## Limitations

1. needsMoreSignatures currently only works with public key signers.
2. needsMoreSignatures does not correctly identify that an account needs more signatures if the transaction changes something (like adds more signers, creates new accounts and then uses them, changes thresholds) that would then require more signers for a later operation in the transaction.

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