@solana/wallet-adapter-base
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -8,2 +8,5 @@ export declare class WalletError extends Error { | ||
} | ||
export declare class WalletLoadError extends WalletError { | ||
name: string; | ||
} | ||
export declare class WalletConfigError extends WalletError { | ||
@@ -10,0 +13,0 @@ name: string; |
@@ -14,2 +14,8 @@ export class WalletError extends Error { | ||
} | ||
export class WalletLoadError extends WalletError { | ||
constructor() { | ||
super(...arguments); | ||
this.name = 'WalletLoadError'; | ||
} | ||
} | ||
export class WalletConfigError extends WalletError { | ||
@@ -16,0 +22,0 @@ constructor() { |
import { WalletAdapter } from './adapter'; | ||
import { MessageSignerWalletAdapter, SignerWalletAdapter } from './signer'; | ||
declare type Brand<T, B> = T & { | ||
__brand__: B; | ||
export declare type WalletName = string & { | ||
__brand__: 'WalletName'; | ||
}; | ||
export declare type WalletName = Brand<string, 'WalletName'>; | ||
export declare type Adapter = WalletAdapter | SignerWalletAdapter | MessageSignerWalletAdapter; | ||
@@ -14,2 +13,1 @@ export interface Wallet { | ||
} | ||
export {}; |
{ | ||
"name": "@solana/wallet-adapter-base", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -32,3 +32,3 @@ "repository": "https://github.com/solana-labs/wallet-adapter", | ||
}, | ||
"gitHead": "137794254bdd45d8ebc0f59394d7919bf8599f6e" | ||
"gitHead": "c118a6597db711e8a1f89f3f47accd4de6d5aaf6" | ||
} |
@@ -15,2 +15,6 @@ export class WalletError extends Error { | ||
export class WalletLoadError extends WalletError { | ||
name = 'WalletLoadError'; | ||
} | ||
export class WalletConfigError extends WalletError { | ||
@@ -17,0 +21,0 @@ name = 'WalletConfigError'; |
import { WalletAdapter } from './adapter'; | ||
import { MessageSignerWalletAdapter, SignerWalletAdapter } from './signer'; | ||
// WalletName is a nominal type that wallet adapters should use, e.g. `'MyCryptoWallet' as WalletName` | ||
// https://medium.com/@KevinBGreene/surviving-the-typescript-ecosystem-branding-and-type-tagging-6cf6e516523d | ||
type Brand<T, B> = T & { __brand__: B }; | ||
export type WalletName = string & { __brand__: 'WalletName' }; | ||
// WalletName is a nominal type that wallet adapters should use, e.g. `'MyCryptoWallet' as WalletName` | ||
export type WalletName = Brand<string, 'WalletName'>; | ||
export type Adapter = WalletAdapter | SignerWalletAdapter | MessageSignerWalletAdapter; | ||
@@ -11,0 +9,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33591
470