Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sats-connect/core

Package Overview
Dependencies
Maintainers
2
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sats-connect/core - npm Package Compare versions

Comparing version 0.0.1-d9455a7 to 0.0.1-f5ee597

2

dist/adapters/index.js

@@ -25,2 +25,4 @@ "use strict";

webUrl: 'https://www.xverse.app/',
googlePlayStoreUrl: 'https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse',
iOSAppStoreUrl: 'https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513',
chromeWebStoreUrl: 'https://chromewebstore.google.com/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg',

@@ -27,0 +29,0 @@ icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgdmlld0JveD0iMCAwIDEwMiAxMDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJJY29uX0FydCAoRWRpdCBNZSkiPgo8cmVjdCB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgZmlsbD0iIzE4MTgxOCIvPgo8ZyBpZD0iTG9nby9FbWJsZW0iIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8xMjIzKSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik03NC42NTQyIDczLjg4ODNWNjUuMjMxMkM3NC42NTQyIDY0Ljg4OCA3NC41MTc3IDY0LjU2MDYgNzQuMjc0NSA2NC4zMTc0TDM3LjQzOTcgMjcuNDgyNUMzNy4xOTY1IDI3LjIzOTIgMzYuODY5MSAyNy4xMDI4IDM2LjUyNTggMjcuMTAyOEgyNy44NjlDMjcuNDQxNiAyNy4xMDI4IDI3LjA5MzggMjcuNDUwNiAyNy4wOTM4IDI3Ljg3OFYzNS45MjExQ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IDc0LjUzMzQgMjcuMTM5MSA3NC4xMDE3IDI3LjEzOTFMNjUuMjUzOCAyNy4xMjc3QzY1LjA0NyAyNy4xMjc3IDY0Ljg0OTIgMjcuMjA5NiA2NC43MDE0IDI3LjM1NTFMNTQuODA1NiAzNy4yMzVDNTQuMzE0NSAzNy43MjYgNTQuNjYyMyAzOC41NjcyIDU1LjM1NTcgMzguNTY3Mkg1NS4zNThaIiBmaWxsPSIjRUU3QTMwIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMF8xMjIzIj4KPHJlY3Qgd2lkdGg9IjQ3LjgxMjUiIGhlaWdodD0iNDcuODEyNSIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3LjA5MzggMjcuMDkzOCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K',

20

dist/adapters/unisat.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnisatAdapter = void 0;
const buffer_1 = require("buffer");
const satsConnectAdapter_1 = require("./satsConnectAdapter");

@@ -8,2 +9,3 @@ const types_1 = require("../types");

const addresses_1 = require("../addresses");
const _1 = require(".");
function convertSignInputsToInputType(signInputs, allowedSignHash) {

@@ -24,3 +26,3 @@ let result = [];

class UnisatAdapter extends satsConnectAdapter_1.SatsConnectAdapter {
id = 'unisat';
id = _1.DefaultAdaptersInfo.unisat.id;
async getAccounts(params) {

@@ -86,3 +88,3 @@ const { purposes } = params;

const { psbt, signInputs, allowedSignHash, broadcast } = params;
const psbtHex = Buffer.from(psbt, 'base64').toString('hex');
const psbtHex = buffer_1.Buffer.from(psbt, 'base64').toString('hex');
const signedPsbt = await window.unisat.signPsbt(psbtHex, {

@@ -135,8 +137,10 @@ autoFinalized: broadcast,

default: {
const error = {
code: types_1.RpcErrorCode.METHOD_NOT_SUPPORTED,
message: 'Method not supported by the selected wallet',
};
console.error('Error calling the method', error);
return {
status: 'error',
error: {
code: types_1.RpcErrorCode.METHOD_NOT_SUPPORTED,
message: 'Method not supported by the selected wallet',
},
error,
};

@@ -151,4 +155,4 @@ }

error: {
code: types_1.RpcErrorCode.INTERNAL_ERROR,
message: 'Wallet Error processing the request',
code: error.code === 4001 ? types_1.RpcErrorCode.USER_REJECTION : types_1.RpcErrorCode.INTERNAL_ERROR,
message: error.message ? error.message : 'Wallet method call error',
data: error,

@@ -155,0 +159,0 @@ },

@@ -6,4 +6,5 @@ "use strict";

const request_1 = require("../request");
const _1 = require(".");
class XverseAdapter extends satsConnectAdapter_1.SatsConnectAdapter {
id = 'XverseProviders.BitcoinProvider';
id = _1.DefaultAdaptersInfo.xverse.id;
request = async (method, params) => {

@@ -10,0 +11,0 @@ return (0, request_1.request)(method, params, this.id);

@@ -1,6 +0,5 @@

import { SupportedWallet } from 'src/provider';
import { SupportedWallet } from '../provider';
export interface Config {
providers: SupportedWallet[];
}
export declare const xverseIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgdmlld0JveD0iMCAwIDEwMiAxMDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJJY29uX0FydCAoRWRpdCBNZSkiPgo8cmVjdCB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgZmlsbD0iIzE4MTgxOCIvPgo8ZyBpZD0iTG9nby9FbWJsZW0iIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8xMjIzKSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik03NC42NTQyIDczLjg4ODNWNjUuMjMxMkM3NC42NTQyIDY0Ljg4OCA3NC41MTc3IDY0LjU2MDYgNzQuMjc0NSA2NC4zMTc0TDM3LjQzOTcgMjcuNDgyNUMzNy4xOTY1IDI3LjIzOTIgMzYuODY5MSAyNy4xMDI4IDM2LjUyNTggMjcuMTAyOEgyNy44NjlDMjcuNDQxNiA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gxNiAzNi44NDQgNzQuODgxNiAzNi42MzcxVjI3LjkxODlDNzQuODgxNiAyNy40ODkyIDc0LjUzMzQgMjcuMTM5MSA3NC4xMDE3IDI3LjEzOTFMNjUuMjUzOCAyNy4xMjc3QzY1LjA0NyAyNy4xMjc3IDY0Ljg0OTIgMjcuMjA5NiA2NC43MDE0IDI3LjM1NTFMNTQuODA1NiAzNy4yMzVDNTQuMzE0NSAzNy43MjYgNTQuNjYyMyAzOC41NjcyIDU1LjM1NTcgMzguNTY3Mkg1NS4zNThaIiBmaWxsPSIjRUU3QTMwIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMF8xMjIzIj4KPHJlY3Qgd2lkdGg9IjQ3LjgxMjUiIGhlaWdodD0iNDcuODEyNSIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3LjA5MzggMjcuMDkzOCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K";
export declare function createDefaultConfig(providers: SupportedWallet[]): Config;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createDefaultConfig = exports.xverseIcon = void 0;
exports.xverseIcon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgdmlld0JveD0iMCAwIDEwMiAxMDIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGlkPSJJY29uX0FydCAoRWRpdCBNZSkiPgo8cmVjdCB3aWR0aD0iMTAyIiBoZWlnaHQ9IjEwMiIgZmlsbD0iIzE4MTgxOCIvPgo8ZyBpZD0iTG9nby9FbWJsZW0iIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yMF8xMjIzKSI+CjxwYXRoIGlkPSJWZWN0b3IiIGQ9Ik03NC42NTQyIDczLjg4ODNWNjUuMjMxMkM3NC42NTQyIDY0Ljg4OCA3NC41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A2My4zODI5IDM5LjM0NjlWNDYuNTkyMUM2My4zODI5IDQ3LjI4NzcgNjQuMjI0IDQ3LjYzNTUgNjQuNzE1MSA0Ny4xNDIyTDc0LjY1NDEgMzcuMTg3M0M3NC43OTk0IDM3LjA0MTggNzQuODgxNiAzNi44NDQgNzQuODgxNiAzNi42MzcxVjI3LjkxODlDNzQuODgxNiAyNy40ODkyIDc0LjUzMzQgMjcuMTM5MSA3NC4xMDE3IDI3LjEzOTFMNjUuMjUzOCAyNy4xMjc3QzY1LjA0NyAyNy4xMjc3IDY0Ljg0OTIgMjcuMjA5NiA2NC43MDE0IDI3LjM1NTFMNTQuODA1NiAzNy4yMzVDNTQuMzE0NSAzNy43MjYgNTQuNjYyMyAzOC41NjcyIDU1LjM1NTcgMzguNTY3Mkg1NS4zNThaIiBmaWxsPSIjRUU3QTMwIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yMF8xMjIzIj4KPHJlY3Qgd2lkdGg9IjQ3LjgxMjUiIGhlaWdodD0iNDcuODEyNSIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI3LjA5MzggMjcuMDkzOCkiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K';
exports.createDefaultConfig = void 0;
const adapters_1 = require("../adapters");
function createDefaultConfig(providers) {
const config = { providers: [] };
// Xverse
const xverseProvider = providers.find((provider) => provider.id === 'XverseProviders.BitcoinProvider');
const xverseProvider = providers.find((provider) => provider.id === adapters_1.DefaultAdaptersInfo.xverse.id);
config.providers.push(xverseProvider
? xverseProvider
: {
id: 'XverseProviders.BitcoinProvider',
name: 'Xverse',
icon: exports.xverseIcon,
...adapters_1.DefaultAdaptersInfo.xverse,
isInstalled: false,
chromeWebStoreUrl: 'https://chromewebstore.google.com/detail/xverse-wallet/idnnbdplmphpflfnlkomgpfbpcgelopg',
googlePlayStoreUrl: 'https://play.google.com/store/apps/details?id=com.secretkeylabs.xverse',
iOSAppStoreUrl: 'https://apps.apple.com/app/xverse-bitcoin-web3-wallet/id1552272513',
webUrl: 'https://www.xverse.app/',
});

@@ -28,3 +22,3 @@ // Unisat

config.providers.concat(providers.filter((provider) => {
return provider.id !== 'xverseProviders.bitcoinProvider' && provider.id !== 'unisat';
return provider.id !== adapters_1.DefaultAdaptersInfo.xverse.id && provider.id !== 'unisat';
}));

@@ -31,0 +25,0 @@ return config;

{
"name": "@sats-connect/core",
"version": "0.0.1-d9455a7",
"version": "0.0.1-f5ee597",
"main": "dist/index.js",

@@ -26,2 +26,3 @@ "files": [

"bitcoin-address-validation": "2.2.3",
"buffer": "6.0.3",
"jsontokens": "4.0.1",

@@ -28,0 +29,0 @@ "lodash.omit": "4.5.0"

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc