How to use the eosio-signing-request.SigningRequest.from function in eosio-signing-request

To help you get started, we’ve selected a few eosio-signing-request 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 greymass / eos-voter / app / shared / utils / UriHandler.js View on Github external
// The code below the return is not yet production ready.
  pHandler.webContents.send('openUri', url);
  pHandler.show();
  return;

  log.info('app: open-url', url);
  const opts = {
    textEncoder,
    textDecoder,
    zlib: {
      deflateRaw: (data) => new Uint8Array(zlib.deflateRawSync(Buffer.from(data))),
      inflateRaw: (data) => new Uint8Array(zlib.inflateRawSync(Buffer.from(data))),
    },
  };
  // Interpret the Signing Request
  const request = SigningRequest.from(url, opts);
  // Extract relevant information
  const {
    auths,
    blockchains,
    wallets,
    whitelist
  } = store.getState();

  const chainId = request.getChainId().toLowerCase();
  log.info("requested chainId")
  log.info(chainId)

  const blockchain = find(blockchains, { chainId });
  log.info("blockchain")
  log.info(JSON.stringify(blockchain))

eosio-signing-request

EOSIO Signing Request (ESR / EEP-7) encoder and decoder

MIT
Latest version published 1 year ago

Package Health Score

47 / 100
Full package analysis

Similar packages