You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@turnkey/crypto

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turnkey/crypto - npm Package Compare versions

Comparing version
2.4.2
to
2.4.3
+8
dist/bs58.d.ts
type Bs58 = {
encode(buffer: Uint8Array | number[]): string;
decodeUnsafe(str: string): Uint8Array | undefined;
decode(str: string): Uint8Array;
};
declare const bs58: Bs58;
export default bs58;
//# sourceMappingURL=bs58.d.ts.map
{"version":3,"file":"bs58.d.ts","sourceRoot":"","sources":["../src/bs58.ts"],"names":[],"mappings":"AAiBA,KAAK,IAAI,GAAG;IACV,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IAC9C,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAClD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CACjC,CAAC;AAcF,QAAA,MAAM,IAAI,MAAsB,CAAC;AAEjC,eAAe,IAAI,CAAC"}
'use strict';
var raw = require('bs58');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var raw__namespace = /*#__PURE__*/_interopNamespaceDefault(raw);
// This is a temporary shim for bs58@6.0.0
//
// This issue is similar to the one described here: https://github.com/bitcoinjs/bs58check/issues/47
//
// bs58 v6.0.0 uses ESM with only a default export, which causes compatibility
// issues with Metro (React Native). When importing the package using
// `import bs58 from 'bs58'`, Metro applies multiple levels of wrapping,
// resulting in a structure like `{ default: { default: { encode, decode, ... } } }`.
//
// This shim unwraps the exports until it reaches the object that contains `.decode`,
// `.encode`, and `.decodeUnsafe`, allowing consistent usage across platforms.
//
// We can remove this shim once bs58 publishes a version that properly re-exports
// named methods from its ESM build.
function unwrap(obj) {
let cur = obj;
while (cur &&
!(cur.encode && cur.decode && cur.decodeUnsafe) &&
cur.default) {
cur = cur.default;
}
return cur;
}
const bs58 = unwrap(raw__namespace);
module.exports = bs58;
//# sourceMappingURL=bs58.js.map
{"version":3,"file":"bs58.js","sources":["../src/bs58.ts"],"sourcesContent":[null],"names":["raw"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,SAAS,MAAM,CAAC,GAAQ,EAAA;IACtB,IAAI,GAAG,GAAG,GAAG,CAAC;AACd,IAAA,OACE,GAAG;AACH,QAAA,EAAE,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC;QAC/C,GAAG,CAAC,OAAO,EACX;AACA,QAAA,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;KACnB;AACD,IAAA,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,IAAI,GAAG,MAAM,CAACA,cAAG;;;;"}
import * as raw from 'bs58';
// This is a temporary shim for bs58@6.0.0
//
// This issue is similar to the one described here: https://github.com/bitcoinjs/bs58check/issues/47
//
// bs58 v6.0.0 uses ESM with only a default export, which causes compatibility
// issues with Metro (React Native). When importing the package using
// `import bs58 from 'bs58'`, Metro applies multiple levels of wrapping,
// resulting in a structure like `{ default: { default: { encode, decode, ... } } }`.
//
// This shim unwraps the exports until it reaches the object that contains `.decode`,
// `.encode`, and `.decodeUnsafe`, allowing consistent usage across platforms.
//
// We can remove this shim once bs58 publishes a version that properly re-exports
// named methods from its ESM build.
function unwrap(obj) {
let cur = obj;
while (cur &&
!(cur.encode && cur.decode && cur.decodeUnsafe) &&
cur.default) {
cur = cur.default;
}
return cur;
}
const bs58 = unwrap(raw);
export { bs58 as default };
//# sourceMappingURL=bs58.mjs.map
{"version":3,"file":"bs58.mjs","sources":["../src/bs58.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA,SAAS,MAAM,CAAC,GAAQ,EAAA;IACtB,IAAI,GAAG,GAAG,GAAG,CAAC;AACd,IAAA,OACE,GAAG;AACH,QAAA,EAAE,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC;QAC/C,GAAG,CAAC,OAAO,EACX;AACA,QAAA,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;KACnB;AACD,IAAA,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG;;;;"}
+6
-0
# @turnkey/crypto
## 2.4.3
### Patch Changes
- [#720](https://github.com/tkhq/sdk/pull/720) [`6cbff7a`](https://github.com/tkhq/sdk/commit/6cbff7a0c0b3a9a05586399e5cef476154d3bdca) Author [@moeodeh3](https://github.com/moeodeh3) - Fixed `decryptExportBundle` not working in some environments by adding a shim to handle `bs58`'s ESM-only export.
## 2.4.2

@@ -4,0 +10,0 @@

+1
-1
'use strict';
var bs58check = require('./bs58check.js');
var bs58 = require('bs58');
var bs58 = require('./bs58.js');
var encoding = require('@turnkey/encoding');

@@ -6,0 +6,0 @@ var constants = require('./constants.js');

import bs58check from './bs58check.mjs';
import bs58 from 'bs58';
import bs58 from './bs58.mjs';
import { uint8ArrayToHexString, uint8ArrayFromHexString, hexToAscii } from '@turnkey/encoding';

@@ -4,0 +4,0 @@ import { PRODUCTION_SIGNER_PUBLIC_KEY, PRODUCTION_NOTARIZER_PUBLIC_KEY } from './constants.mjs';

{
"name": "@turnkey/crypto",
"version": "2.4.2",
"version": "2.4.3",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/index.mjs",