diff --git a/src/contrib/cashu-ts/dist/lib/es5/base64.js b/src/contrib/cashu-ts/dist/lib/es5/base64.js index f5132264..aa7dea9b 100644 --- a/src/contrib/cashu-ts/dist/lib/es5/base64.js +++ b/src/contrib/cashu-ts/dist/lib/es5/base64.js @@ -7,7 +7,11 @@ function encodeUint8toBase64(uint8array) { } exports.encodeUint8toBase64 = encodeUint8toBase64; function encodeUint8toBase64Url(bytes) { - return buffer_1.Buffer.from(bytes).toString('base64url').replace(/\=+$/, ''); + return buffer_1.Buffer.from(bytes) + .toString('base64') + .replace(/\+/g, '-') // Replace + with - + .replace(/\//g, '_') // Replace / with _ + .replace(/=+$/, ''); // Remove padding characters } exports.encodeUint8toBase64Url = encodeUint8toBase64Url; function encodeBase64toUint8(base64String) { diff --git a/src/contrib/cashu-ts/dist/lib/es6/base64.js b/src/contrib/cashu-ts/dist/lib/es6/base64.js index b82ef9aa..5061df29 100644 --- a/src/contrib/cashu-ts/dist/lib/es6/base64.js +++ b/src/contrib/cashu-ts/dist/lib/es6/base64.js @@ -3,7 +3,11 @@ function encodeUint8toBase64(uint8array) { return Buffer.from(uint8array).toString('base64'); } function encodeUint8toBase64Url(bytes) { - return Buffer.from(bytes).toString('base64url').replace(/\=+$/, ''); + return Buffer.from(bytes) + .toString('base64') + .replace(/\+/g, '-') // Replace + with - + .replace(/\//g, '_') // Replace / with _ + .replace(/=+$/, ''); // Remove padding characters } function encodeBase64toUint8(base64String) { return Buffer.from(base64String, 'base64'); diff --git a/src/contrib/cashu-ts/dist/lib/es6/base64.js.map b/src/contrib/cashu-ts/dist/lib/es6/base64.js.map index a357a150..7452dbb9 100644 --- a/src/contrib/cashu-ts/dist/lib/es6/base64.js.map +++ b/src/contrib/cashu-ts/dist/lib/es6/base64.js.map @@ -1 +1 @@ -{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../../src/base64.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,SAAS,mB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