Skip to content
Utilities for managing multisig on the Stellar network.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
.vscode
demo
src
tests
.babelrc
.gitignore
.npmignore
.prettierignore
CHANGELOG.md
LICENSE
README.md
example.ts
package.json
tsconfig.json
tsconfig.module.json
tslint.json
yarn.lock

README.md

@stellarguard/multisig-utils

Utilities for working with Stellar mulitsig.

Installation

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

Usage

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 for examples.

Try a live 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.
You can’t perform that action at this time.