Socket
Socket
Sign inDemoInstall

@solana/wallet-adapter-base

Package Overview
Dependencies
Maintainers
15
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/wallet-adapter-base - npm Package Compare versions

Comparing version 0.9.18 to 0.9.19

5

lib/cjs/signer.js

@@ -26,2 +26,3 @@ "use strict";

const errors_js_1 = require("./errors.js");
const types_js_1 = require("./types.js");
class BaseSignerWalletAdapter extends adapter_js_1.BaseWalletAdapter {

@@ -32,3 +33,3 @@ sendTransaction(transaction, connection, options = {}) {

try {
if ('version' in transaction) {
if ((0, types_js_1.isVersionedTransaction)(transaction)) {
if (!this.supportedTransactionVersions)

@@ -82,3 +83,3 @@ throw new errors_js_1.WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);

for (const transaction of transactions) {
if ('version' in transaction) {
if ((0, types_js_1.isVersionedTransaction)(transaction)) {
if (!this.supportedTransactionVersions)

@@ -85,0 +86,0 @@ throw new errors_js_1.WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);

6

lib/cjs/types.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WalletAdapterNetwork = void 0;
exports.isVersionedTransaction = exports.WalletAdapterNetwork = void 0;
var WalletAdapterNetwork;

@@ -10,2 +10,6 @@ (function (WalletAdapterNetwork) {

})(WalletAdapterNetwork = exports.WalletAdapterNetwork || (exports.WalletAdapterNetwork = {}));
function isVersionedTransaction(transaction) {
return 'version' in transaction;
}
exports.isVersionedTransaction = isVersionedTransaction;
//# sourceMappingURL=types.js.map
import { BaseWalletAdapter } from './adapter.js';
import { WalletSendTransactionError, WalletSignTransactionError } from './errors.js';
import { isVersionedTransaction } from './types.js';
export class BaseSignerWalletAdapter extends BaseWalletAdapter {

@@ -7,3 +8,3 @@ async sendTransaction(transaction, connection, options = {}) {

try {
if ('version' in transaction) {
if (isVersionedTransaction(transaction)) {
if (!this.supportedTransactionVersions)

@@ -55,3 +56,3 @@ throw new WalletSendTransactionError(`Sending versioned transactions isn't supported by this wallet`);

for (const transaction of transactions) {
if ('version' in transaction) {
if (isVersionedTransaction(transaction)) {
if (!this.supportedTransactionVersions)

@@ -58,0 +59,0 @@ throw new WalletSignTransactionError(`Signing versioned transactions isn't supported by this wallet`);

@@ -7,2 +7,5 @@ export var WalletAdapterNetwork;

})(WalletAdapterNetwork || (WalletAdapterNetwork = {}));
export function isVersionedTransaction(transaction) {
return 'version' in transaction;
}
//# sourceMappingURL=types.js.map

@@ -12,2 +12,3 @@ import type { Transaction, TransactionVersion, VersionedTransaction } from '@solana/web3.js';

export declare type TransactionOrVersionedTransaction<S extends SupportedTransactionVersions> = S extends null | undefined ? Transaction : Transaction | VersionedTransaction;
export declare function isVersionedTransaction(transaction: Transaction | VersionedTransaction): transaction is VersionedTransaction;
//# sourceMappingURL=types.d.ts.map
{
"name": "@solana/wallet-adapter-base",
"version": "0.9.18",
"version": "0.9.19",
"author": "Solana Maintainers <maintainers@solana.foundation>",
"repository": "https://github.com/solana-labs/wallet-adapter",
"license": "Apache-2.0",
"type": "module",
"sideEffects": false,
"publishConfig": {
"access": "public"
},
"files": [
"lib",
"src",
"LICENSE"
],
"engines": {
"node": ">=16"
},
"type": "module",
"sideEffects": false,
"main": "./lib/cjs/index.js",

@@ -20,12 +28,4 @@ "module": "./lib/esm/index.js",

},
"files": [
"lib",
"src",
"LICENSE"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@solana/web3.js": "^1.61.0"
"@solana/web3.js": "^1.58.0"
},

@@ -36,3 +36,3 @@ "dependencies": {

"devDependencies": {
"@solana/web3.js": "^1.61.0",
"@solana/web3.js": "^1.58.0",
"@types/node-fetch": "^2.6.2",

@@ -43,4 +43,4 @@ "shx": "^0.3.4"

"clean": "shx mkdir -p lib && shx rm -rf lib",
"package": "shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json"
"package": "shx mkdir -p lib/cjs && shx echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json"
}
}

@@ -6,2 +6,3 @@ import type { Connection, TransactionSignature } from '@solana/web3.js';

import type { TransactionOrVersionedTransaction } from './types.js';
import { isVersionedTransaction } from './types.js';

@@ -30,3 +31,3 @@ export interface SignerWalletAdapterProps<Name extends string = string> extends WalletAdapterProps<Name> {

try {
if ('version' in transaction) {
if (isVersionedTransaction(transaction)) {
if (!this.supportedTransactionVersions)

@@ -94,3 +95,3 @@ throw new WalletSendTransactionError(

for (const transaction of transactions) {
if ('version' in transaction) {
if (isVersionedTransaction(transaction)) {
if (!this.supportedTransactionVersions)

@@ -97,0 +98,0 @@ throw new WalletSignTransactionError(

@@ -18,1 +18,7 @@ import type { Transaction, TransactionVersion, VersionedTransaction } from '@solana/web3.js';

: Transaction | VersionedTransaction;
export function isVersionedTransaction(
transaction: Transaction | VersionedTransaction
): transaction is VersionedTransaction {
return 'version' in transaction;
}

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc