4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-12 02:05:51 +00:00
qortal-ui/crypto/api/wallet/validateAddress.js

11 lines
240 B
JavaScript
Raw Permalink Normal View History

2021-12-25 14:39:47 +01:00
import Base58 from '../deps/Base58.js'
export const validateAddress = (address) => {
const decodePubKey = Base58.decode(address)
2021-12-25 14:39:47 +01:00
if (!(decodePubKey instanceof Uint8Array && decodePubKey.length == 25)) {
return false
}
return true
2021-12-25 14:39:47 +01:00
}