mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
v3.0.4
This commit is contained in:
@@ -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