Utility for encoding and decoding a travel address based on the Travel Rule Protocol (TRP).
npm i --save trp-travel-address
encodeTravelAddress(url)
const { encodeTravelAddress } = require("trp-travel-address");
const url = "beneficiary.com/x/12345?t=i";
const ta = encodeTravelAddress(url);
console.log(ta);
// ta2W2HPKfHxgSgrzY178knqXHg1H3jfeQrwQ9JrKBs9wv
decodeTravelAddress(ta)
const { decodeTravelAddress } = require("trp-travel-address");
const ta = "ta2W2HPKfHxgSgrzY178knqXHg1H3jfeQrwQ9JrKBs9wv";
const url = decodeTravelAddress(ta);
console.log(url);
// beneficiary.com/x/12345?t=i