You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP →

@dynamic-labs/bitcoin

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynamic-labs/bitcoin - npm Package Compare versions

Comparing version

to
4.20.1

'use client'
var version = "4.20.0";
var version = "4.20.1";
export { version };
{
"name": "@dynamic-labs/bitcoin",
"version": "4.20.0",
"version": "4.20.1",
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",

@@ -28,7 +28,7 @@ "author": "Dynamic Labs, Inc.",

"jsontokens": "4.0.1",
"@dynamic-labs/assert-package-version": "4.20.0",
"@dynamic-labs/types": "4.20.0",
"@dynamic-labs/utils": "4.20.0",
"@dynamic-labs/wallet-book": "4.20.0",
"@dynamic-labs/wallet-connector-core": "4.20.0",
"@dynamic-labs/assert-package-version": "4.20.1",
"@dynamic-labs/types": "4.20.1",
"@dynamic-labs/utils": "4.20.1",
"@dynamic-labs/wallet-book": "4.20.1",
"@dynamic-labs/wallet-connector-core": "4.20.1",
"eventemitter3": "5.0.1"

@@ -35,0 +35,0 @@ },

@@ -57,2 +57,3 @@ import { type EventEmitter } from 'eventemitter3';

getBlockExplorerUrlsForCurrentNetwork(): Promise<string[]>;
protected openInAppBrowserIfRequired(): boolean;
}

@@ -6,3 +6,3 @@ 'use client'

import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
import { isLedgerAddressViaVerifiedCredentials, DynamicError } from '@dynamic-labs/utils';
import { isLedgerAddressViaVerifiedCredentials, isMobile, template, PlatformService, DynamicError } from '@dynamic-labs/utils';
import { WalletAddressType } from '@dynamic-labs/sdk-api-core';

@@ -327,4 +327,20 @@ import { BitcoinLocalStorageCache } from '../BitcoinLocalStorageCache.js';

}
openInAppBrowserIfRequired() {
var _a;
if (this.isInstalledOnBrowser() ||
!isMobile() ||
!((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) ||
this.mobileExperience === 'redirect') {
return false;
}
const inAppBrowserCompiledTemplate = template(this.metadata.inAppBrowserUrl);
const deepLink = inAppBrowserCompiledTemplate({
// TODO: use PlatformService
encodedDappURI: encodeURIComponent(window.location.toString()),
});
PlatformService.openURL(deepLink);
return true;
}
}
export { BitcoinWalletConnector };
'use client'
import { __awaiter } from '../../../_virtual/_tslib.js';
import { Psbt } from 'bitcoinjs-lib';
import { isMobile, template } from '@dynamic-labs/utils';
import { logger } from '@dynamic-labs/wallet-connector-core';

@@ -16,14 +15,4 @@ import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';

return __awaiter(this, void 0, void 0, function* () {
var _a;
if (!this.isInstalledOnBrowser() &&
isMobile() &&
((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) &&
this.mobileExperience === 'in-app-browser') {
const inAppBrowserCompiledTemplate = template(this.metadata.inAppBrowserUrl);
const deepLink = inAppBrowserCompiledTemplate({
// TODO: use PlatformService
encodedDappURI: encodeURIComponent(window.location.toString()),
});
// TODO: use PlatformService
window.location.assign(deepLink);
const didOpenInAppBrowser = this.openInAppBrowserIfRequired();
if (didOpenInAppBrowser) {
return;

@@ -30,0 +19,0 @@ }

'use client'
import { __awaiter } from '../../../_virtual/_tslib.js';
import { Psbt } from 'bitcoinjs-lib';
import { isMobile, template, PlatformService } from '@dynamic-labs/utils';
import { logger } from '@dynamic-labs/wallet-connector-core';

@@ -16,13 +15,4 @@ import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';

return __awaiter(this, void 0, void 0, function* () {
var _a;
if (!this.isInstalledOnBrowser() &&
isMobile() &&
((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) &&
this.mobileExperience === 'in-app-browser') {
const inAppBrowserCompiledTemplate = template(this.metadata.inAppBrowserUrl);
const deepLink = inAppBrowserCompiledTemplate({
// TODO: use PlatformService
encodedDappURI: encodeURIComponent(window.location.toString()),
});
PlatformService.openURL(deepLink);
const didOpenInAppBrowser = this.openInAppBrowserIfRequired();
if (didOpenInAppBrowser) {
return;

@@ -29,0 +19,0 @@ }

@@ -22,2 +22,6 @@ 'use client'

return __awaiter(this, void 0, void 0, function* () {
const didOpenInAppBrowser = this.openInAppBrowserIfRequired();
if (didOpenInAppBrowser) {
return;
}
const provider = this.getProvider();

@@ -24,0 +28,0 @@ if (!provider) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet