New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

liquidity-invoice-generation

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquidity-invoice-generation

Invoice generation system compatible with Liquidity Network

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-76.92%
Maintainers
2
Weekly downloads
 
Created
Source

liquidity-invoice-generation

Invoice generation system compatible with Liquidity Network

IMPORTANT Requires web3-utils and bignumber.js dependencies

Usage

const invoice: Invoice = createInvoice({
  network: 4, // Network id
  publicKey: '0xE6987CD613Dfda0995A95b3E6acBAbECecd41376', // public key of recipient
  // Generate unique id for invoice, payment by this invoice can be tracked by nonce which is derived by
  // invoice's id and amount. If id is not generated, then the invoice can be used multiple times.
  generateId: true,
  // Address of the operator, if not defined, on-chain invoice will be generated.
  operatorAddress: '0x4FED1fC4144c223aE3C1553be203cDFcbD38C581',
  tokenAddress: '0x4FED1fC4144c223aE3C1553be203cDFcbD38C581', // Token address, if not defined, operator address applied.
  amount: '12000000000000', // Optional. BigNumber or number also can be used.
})

const encodedInvoice: string = encodeInvoice(invoice) // Used to generate QR code

const decodedInvoice: Invoice = decodeInvoice(encodedInvoice) // Decode invoice after QR code scanning

FAQs

Package last updated on 01 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc