1.0.13 • Published 5 years ago

atomax-connector v1.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

ATOMAX

Atomax Connector

NPM

Javascript library that allows a web app to connect with the Atomax Wallet. Atomax Wallet is a mobile application, available for iOS and Android, and it is a crypto currency wallet.

More information on atomax.io

Getting Started

The following instructions will get you a copy of the project up and running on your local machine.

Prerequisites

What things you need to install the software and how to install them

Built With

  • Node.js
  • Rollup
  • Babel

Installation

Using npm:

$ npm i atomax-connector

Usage

The AtomaxConnector has as main scope setting up the transaction information in the atomax wallet.

The AtomaxConnector accept 3 parameter: 1. Transaction Data (Object) 2. Callback for retrive the wallet address 3. Callback for retrive the transaction ID, when the wallet send the transaction.


  1. Transaction Data (Object)
  • name: REQUIRED - "The name of the connector is used to identify each connector placed in one application. You need to specify a differente name for each connector instantiated"
  • value: REQUIRED - "Is the ETH value in the transaction"
  • gasPrice: OPTIONAL
  • gasLimit: OPTIONAL
  • nonce: OPTIONAL
  • data: OPTIONAL - here you can add optional raw data in hexadecimal format only.
  1. Callback for retrive the wallet address
  • return the address
  1. Callback for retrive the transaction ID when the wallet send the transaction.
  • return the transaction ID

A simple example of use

<html>
  <head>
    <script src='node_modules/atomax-connector/dist/atomax-connector.js'></script>
  </head>
  <body>
    <div id='atomaxConnector'></div>
    <div id='data'></div>
    <div id='tx'></div>
  </body>
  <script>
    var atomaxDiv = document.getElementById('atomaxConnector')
    AtomaxConnector({
      name: 'test',
      to: '0xbd3696b01a487b012ba99628b06a1a7859f5ca23',
      value: '10000000000000000',
      addressCB: address => {
        var dataDiv = document.getElementById('data')
        dataDiv.innerHTML = address
      },
      txIdCB: tx => {
        var txDiv = document.getElementById('tx')
        txDiv.innerHTML = tx.id || null
      }
    }).then(qrcode => {
      atomaxDiv.innerHTML = qrcode
    })
  </script>
</html>

License

This project is licensed under the MIT License - see the LICENSE file for details.

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago