How to use the urbit-key-generation/dist.combine function in urbit-key-generation

To help you get started, we’ve selected a few urbit-key-generation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github urbit / bridge / src / views / Shards.js View on Github external
async walletFromShards(shard1, shard2, shard3, pointName, passphrase) {
    const s1 = shard1 === '' ? undefined : shard1;
    const s2 = shard2 === '' ? undefined : shard2;
    const s3 = shard3 === '' ? undefined : shard3;

    let ticket = undefined;
    try {
      ticket = kg.combine([s1, s2, s3]);
    } catch (_) {
      // do nothing
    }

    if (ticket !== undefined) {
      const uhdw = await urbitWalletFromTicket(ticket, pointName, passphrase);
      this.props.setUrbitWallet(Just(uhdw));
    }
  }