Socket
Socket
Sign inDemoInstall

@solana/wallet-adapter-base

Package Overview
Dependencies
Maintainers
11
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.7.1 to 0.8.0

lib/wallet.d.ts

7

lib/adapter.d.ts

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

export interface WalletAdapterEvents {
ready(): void;
connect(): void;

@@ -17,5 +16,5 @@ disconnect(): void;

publicKey: PublicKey | null;
ready: boolean;
connecting: boolean;
connected: boolean;
ready(): Promise<boolean>;
connect(): Promise<void>;

@@ -28,5 +27,5 @@ disconnect(): Promise<void>;

abstract publicKey: PublicKey | null;
abstract ready: boolean;
abstract connecting: boolean;
abstract connected: boolean;
get connected(): boolean;
abstract ready(): Promise<boolean>;
abstract connect(): Promise<void>;

@@ -33,0 +32,0 @@ abstract disconnect(): Promise<void>;

import EventEmitter from 'eventemitter3';
export { EventEmitter };
export class BaseWalletAdapter extends EventEmitter {
get connected() {
return !!this.publicKey;
}
}

@@ -5,0 +8,0 @@ export var WalletAdapterNetwork;

@@ -5,11 +5,8 @@ export declare class WalletError extends Error {

}
export declare class WalletNotFoundError extends WalletError {
export declare class WalletNotReadyError extends WalletError {
name: string;
}
export declare class WalletNotInstalledError extends WalletError {
export declare class WalletConfigError extends WalletError {
name: string;
}
export declare class WalletNotReadyError extends WalletError {
name: string;
}
export declare class WalletConnectionError extends WalletError {

@@ -16,0 +13,0 @@ name: string;

@@ -8,20 +8,14 @@ export class WalletError extends Error {

}
export class WalletNotFoundError extends WalletError {
export class WalletNotReadyError extends WalletError {
constructor() {
super(...arguments);
this.name = 'WalletNotFoundError';
this.name = 'WalletNotReadyError';
}
}
export class WalletNotInstalledError extends WalletError {
export class WalletConfigError extends WalletError {
constructor() {
super(...arguments);
this.name = 'WalletNotInstalledError';
this.name = 'WalletConfigError';
}
}
export class WalletNotReadyError extends WalletError {
constructor() {
super(...arguments);
this.name = 'WalletNotReadyError';
}
}
export class WalletConnectionError extends WalletError {

@@ -28,0 +22,0 @@ constructor() {

export * from './adapter';
export * from './errors';
export * from './poll';
export * from './signer';
export * from './wallet';
export * from './adapter';
export * from './errors';
export * from './poll';
export * from './signer';
export * from './wallet';
//# sourceMappingURL=index.js.map
{
"name": "@solana/wallet-adapter-base",
"version": "0.7.1",
"version": "0.8.0",
"author": "Solana Maintainers <maintainers@solana.foundation>",

@@ -32,3 +32,3 @@ "repository": "https://github.com/solana-labs/wallet-adapter",

},
"gitHead": "606551691ad84e11a7ebe91f432f113edeb8069c"
"gitHead": "137794254bdd45d8ebc0f59394d7919bf8599f6e"
}

@@ -8,3 +8,2 @@ import { Connection, PublicKey, SendOptions, Signer, Transaction, TransactionSignature } from '@solana/web3.js';

export interface WalletAdapterEvents {
ready(): void;
connect(): void;

@@ -21,6 +20,6 @@ disconnect(): void;

publicKey: PublicKey | null;
ready: boolean;
connecting: boolean;
connected: boolean;
ready(): Promise<boolean>;
connect(): Promise<void>;

@@ -39,6 +38,9 @@ disconnect(): Promise<void>;

abstract publicKey: PublicKey | null;
abstract ready: boolean;
abstract connecting: boolean;
abstract connected: boolean;
get connected(): boolean {
return !!this.publicKey;
}
abstract ready(): Promise<boolean>;
abstract connect(): Promise<void>;

@@ -45,0 +47,0 @@ abstract disconnect(): Promise<void>;

@@ -11,14 +11,10 @@ export class WalletError extends Error {

export class WalletNotFoundError extends WalletError {
name = 'WalletNotFoundError';
export class WalletNotReadyError extends WalletError {
name = 'WalletNotReadyError';
}
export class WalletNotInstalledError extends WalletError {
name = 'WalletNotInstalledError';
export class WalletConfigError extends WalletError {
name = 'WalletConfigError';
}
export class WalletNotReadyError extends WalletError {
name = 'WalletNotReadyError';
}
export class WalletConnectionError extends WalletError {

@@ -25,0 +21,0 @@ name = 'WalletConnectionError';

export * from './adapter';
export * from './errors';
export * from './poll';
export * from './signer';
export * from './wallet';

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