mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
v3.0.4
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ripple-address-codec",
|
||||
"version": "3.0.3",
|
||||
"version": "3.0.4",
|
||||
"description": "encodes/decodes base58 encoded XRP Ledger identifiers",
|
||||
"files": [
|
||||
"dist/*",
|
||||
|
||||
@@ -193,11 +193,15 @@ export function encodeAccountID(bytes: Buffer): string {
|
||||
return codecWithXrpAlphabet.encode(bytes, opts)
|
||||
}
|
||||
|
||||
export const encodeAddress = encodeAccountID
|
||||
|
||||
export function decodeAccountID(accountId: string): Buffer {
|
||||
const opts = {versions: [ACCOUNT_ID], expectedLength: 20}
|
||||
return codecWithXrpAlphabet.decode(accountId, opts).bytes
|
||||
}
|
||||
|
||||
export const decodeAddress = decodeAccountID
|
||||
|
||||
export function decodeNodePublic(base58string: string): Buffer {
|
||||
const opts = {versions: [NODE_PUBLIC], expectedLength: 33}
|
||||
return codecWithXrpAlphabet.decode(base58string, opts).bytes
|
||||
|
||||
Reference in New Issue
Block a user