2.0.1 • Published 3 years ago

@stellarguard/multisig-utils v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

@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.
2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

4 years ago

1.0.0

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.5

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago