Skip to content
Permalink
Browse files

Add the checkAddress method

  • Loading branch information...
pxgamer committed Nov 5, 2018
1 parent 6f35ec4 commit 610ffbf01c8017c6dda6df35c0ff532cc036be15
Showing with 20 additions and 0 deletions.
  1. +20 −0 src/Arionum.js
@@ -233,6 +233,9 @@ class Arionum {
/**
* Check that a signature is valid against a public key.
*
* @param {string} signature
* @param {string} data
* @param {string} publicKey
* @return Promise
*/
checkSignature (signature, data, publicKey) {
@@ -301,6 +304,23 @@ class Arionum {
})
}

/**
* Check that an address is valid.
* Optionally validate it against the corresponding public key.
*
* @param {string} address
* @param {string|null} publicKey
* @return Promise
*/
checkAddress (address, publicKey = null) {
return this
.getJson({
q: 'checkAddress',
account: address,
public_key: publicKey
})
}

/**
* @returns void
*/

0 comments on commit 610ffbf

Please sign in to comment.
You can’t perform that action at this time.