New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@jeansoon/mxw-api

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jeansoon/mxw-api

Maxonrow blockchain SDK

latest
Source
npmnpm
Version
0.0.4-20190214-1
Version published
Maintainers
1
Created
Source

mxw : object

MXW SDK module

Kind: global namespace
Version: 0.1

mxw.events : object

Events

Kind: static namespace of mxw

events~onTx(fnc)

Set the new transaction handler.

Kind: inner method of events

ParamTypeDescription
fncfunctionFunction that will be called on every new transaction (format: (data) => {})

events~onBlock(fnc)

Set the new block handler.

Kind: inner method of events

ParamTypeDescription
fncfunctionFunction that will be called on every new block (format: (data) => {})

events~removeHandler(type)

Removes a certain handler

Kind: inner method of events

ParamTypeDescription
typestringHandler type ('tx'

mxw.main : object

Main

Kind: static namespace of mxw

main~balance(address) ⇒ Promise

Returns the balance of the given address.

Kind: inner method of main
Returns: Promise - balance - Wallet balance

ParamTypeDescription
addressstringAddress of the wallet

main~transfer(privateKey, address) ⇒ Promise

Transfer tokens from one address to another.

Kind: inner method of main
Returns: Promise - tx - Transaction result
Params: number amount - Amount of tokens

ParamTypeDescription
privateKeystringPrivate key of the wallet from which we're transfering tokens
addressstringAddress of the wallet to which we're transfering tokens

main~signTransfer(privateKey, address) ⇒ Promise

Signs a transfer transaction without relaying it.

Kind: inner method of main
Returns: Promise - tx - Transaction signature
Params: number amount - Amount of tokens

ParamTypeDescription
privateKeystringPrivate key of the wallet from which we're transfering tokens
addressstringAddress of the wallet to which we're transfering tokens

mxw.util : object

Utilities

Kind: static namespace of mxw

util~getAddressByPrivateKey(privateKey) ⇒ string

Returns wallet address.

Kind: inner method of util
Returns: string - address - Wallet address

ParamTypeDescription
privateKeystringWallet's private key

util~getAddressByPublicKey(publicKey) ⇒ string

Returns wallet address.

Kind: inner method of util
Returns: string - address - Wallet address

ParamTypeDescription
publicKeystringWallet's public key

util~generateKeyPair() ⇒ object

Generates a new private/public key pair and a wallet address.

Kind: inner method of util
Returns: object - keyPair - Generated keypair

util~getAddressFromPublicKeyByteArray(byteArray) ⇒ string

Returns wallet address.

Kind: inner method of util
Returns: string - address - Wallet address

ParamTypeDescription
byteArrayBufferWallet's public key as a byte array

util~decodeTx(encoded) ⇒ object

Decodes a tendermint transaction.

Kind: inner method of util
Returns: object - tx - Decoded transaction

ParamTypeDescription
encodedstringBase64 encoded transaction

util~getSha256(str) ⇒ string

Get SHA256 hash of a given string.

Kind: inner method of util
Returns: string - hash - Hashed string

ParamTypeDescription
strstringArbitrary string

util~getBlock(height) ⇒ Promise

Get a block at given height.

Kind: inner method of util
Returns: Promise - block - Block data

ParamTypeDescription
heightnumberBlock height

util~getTx(hash) ⇒ Promise

Get a single transaction by hash.

Kind: inner method of util
Returns: Promise - tx - Transaction data

ParamTypeDescription
hashstringTransaction hash

util~getTxs(address) ⇒ Promise

Get transactions by wallet address.

Kind: inner method of util
Returns: Promise - txs - Transactions

ParamTypeDescription
addressstringWallet address

mxw.alias : object

Aliasing module

Kind: static namespace of mxw

alias~setAlias(privateKey, alias) ⇒ Promise

Set an alias.

Kind: inner method of alias
Returns: Promise - tx - Transaction result

ParamTypeDescription
privateKeystringWallet's private key
aliasstringAn alias

alias~removeAlias(privateKey, alias) ⇒ Promise

Remove an alias.

Kind: inner method of alias
Returns: Promise - tx - Transaction result

ParamTypeDescription
privateKeystringWallet's private key
aliasstringAn alias

alias~getAliasByAddress(address) ⇒ Promise

Gets alias for a given address

Kind: inner method of alias
Returns: Promise - alias - Alias

ParamTypeDescription
addressstringAddress of a wallet

alias~getAddressByAlias(alias) ⇒ Promise

Gets the address of an alias

Kind: inner method of alias
Returns: Promise - address - Wallet address

ParamTypeDescription
aliasstringAn alias

mxw.kyc : object

KYC module

Kind: static namespace of mxw

kyc~requestWhitelist(privateKey, whitelistAddress) ⇒ Promise

Allows users to request whitelisting from the mock KYC service.

Kind: inner method of kyc
Returns: Promise - tx - Transaction result

ParamTypeDescription
privateKeystringPrivate key of the KYC provider
whitelistAddressstringAddress that we're whitelisting

kyc~isWhitelisted(address) ⇒ Promise

Checks if the wallet address is whitelisted.

Kind: inner method of kyc
Returns: Promise - whitelist - Boolean

ParamTypeDescription
addressstringAddress of a wallet

mxw.faucet : object

Faucet module

Kind: static namespace of mxw

faucet~requestCoins(privateKey, address) ⇒ Promise

Allows users to request coins from the faucet if they have less than 100 MXW.

Kind: inner method of faucet
Returns: Promise - tx - Transaction result

ParamTypeDescription
privateKeystringPrivate key of the wallet that's requesting tokens
addressstringAddress of the wallet that's receiving tokens (optional)

mxw.this.setBackend(be)

Set the backend.

Kind: static method of mxw

ParamTypeDescription
bestringName of the backend ('lotion'

FAQs

Package last updated on 14 Feb 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