@wallet-standard/base
Advanced tools
Comparing version 1.0.0-rc.3 to 1.0.0-rc.4
import type { Wallet } from './wallet.js'; | ||
/** TODO: docs */ | ||
export declare type AppInitializeEventType = 'wallet-standard-app-initialize'; | ||
export declare type WindowAppReadyEventType = 'wallet-standard:app-ready'; | ||
/** TODO: docs */ | ||
export interface AppInitializeEventAPI { | ||
export interface WindowAppReadyEventAPI { | ||
/** TODO: docs */ | ||
@@ -10,30 +10,46 @@ register(wallet: Wallet): () => void; | ||
/** TODO: docs */ | ||
export interface AppInitializeEvent extends Event { | ||
export interface WindowAppReadyEvent extends Event { | ||
/** TODO: docs */ | ||
readonly type: AppInitializeEventType; | ||
readonly type: WindowAppReadyEventType; | ||
/** TODO: docs */ | ||
readonly detail: AppInitializeEventAPI; | ||
readonly detail: WindowAppReadyEventAPI; | ||
} | ||
/** TODO: docs */ | ||
export declare type WalletInitializeEventType = 'wallet-standard-wallet-initialize'; | ||
export declare type WindowRegisterWalletEventType = 'wallet-standard:register-wallet'; | ||
/** TODO: docs */ | ||
export declare type WalletInitializeEventCallback = (api: AppInitializeEventAPI) => void; | ||
export declare type WindowRegisterWalletEventCallback = (api: WindowAppReadyEventAPI) => void; | ||
/** TODO: docs */ | ||
export interface WalletInitializeEvent extends Event { | ||
export interface WindowRegisterWalletEvent extends Event { | ||
/** TODO: docs */ | ||
readonly type: WalletInitializeEventType; | ||
readonly type: WindowRegisterWalletEventType; | ||
/** TODO: docs */ | ||
readonly detail: WalletInitializeEventCallback; | ||
readonly detail: WindowRegisterWalletEventCallback; | ||
} | ||
/** TODO: docs */ | ||
export interface WalletEventsWindow { | ||
export interface WalletEventsWindow extends Omit<Window, 'addEventListener' | 'dispatchEvent'> { | ||
/** TODO: docs */ | ||
addEventListener(type: AppInitializeEventType, listener: (event: AppInitializeEvent) => void): void; | ||
addEventListener(type: WindowAppReadyEventType, listener: (event: WindowAppReadyEvent) => void): void; | ||
/** TODO: docs */ | ||
addEventListener(type: WalletInitializeEventType, listener: (event: WalletInitializeEvent) => void): void; | ||
addEventListener(type: WindowRegisterWalletEventType, listener: (event: WindowRegisterWalletEvent) => void): void; | ||
/** TODO: docs */ | ||
dispatchEvent(event: AppInitializeEvent): void; | ||
dispatchEvent(event: WindowAppReadyEvent): void; | ||
/** TODO: docs */ | ||
dispatchEvent(event: WalletInitializeEvent): void; | ||
dispatchEvent(event: WindowRegisterWalletEvent): void; | ||
} | ||
/** @deprecated */ | ||
export interface DEPRECATED_WalletsWindow extends Window { | ||
navigator: DEPRECATED_WalletsNavigator; | ||
} | ||
/** @deprecated */ | ||
export interface DEPRECATED_WalletsNavigator extends Navigator { | ||
wallets?: DEPRECATED_Wallets; | ||
} | ||
/** @deprecated */ | ||
export interface DEPRECATED_Wallets { | ||
push(...callbacks: DEPRECATED_WalletsCallback[]): void; | ||
} | ||
/** @deprecated */ | ||
export declare type DEPRECATED_WalletsCallback = (wallets: { | ||
register(...wallets: Wallet[]): () => void; | ||
}) => void; | ||
//# sourceMappingURL=window.d.ts.map |
{ | ||
"name": "@wallet-standard/base", | ||
"version": "1.0.0-rc.3", | ||
"version": "1.0.0-rc.4", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/wallet-standard/wallet-standard", |
@@ -19,4 +19,4 @@ # Wallet Standard | ||
- Global [`window`](src/window.ts) events | ||
- Wallet [`initializeWallet`](../wallet/src/initialize.ts) function | ||
- App [`initializeApp`](../app/src/initialize.ts) function | ||
- Wallet [`registerWallet`](../wallet/src/register.ts) function | ||
- App [`getWallets`](../app/src/wallets.ts) function | ||
- [Example](../../example/wallets/src/window.ts) of how wallets attach to the window | ||
@@ -23,0 +23,0 @@ |
import type { Wallet } from './wallet.js'; | ||
/** TODO: docs */ | ||
export type AppInitializeEventType = 'wallet-standard-app-initialize'; | ||
export type WindowAppReadyEventType = 'wallet-standard:app-ready'; | ||
/** TODO: docs */ | ||
export interface AppInitializeEventAPI { | ||
export interface WindowAppReadyEventAPI { | ||
/** TODO: docs */ | ||
@@ -13,33 +13,51 @@ register(wallet: Wallet): () => void; | ||
/** TODO: docs */ | ||
export interface AppInitializeEvent extends Event { | ||
export interface WindowAppReadyEvent extends Event { | ||
/** TODO: docs */ | ||
readonly type: AppInitializeEventType; | ||
readonly type: WindowAppReadyEventType; | ||
/** TODO: docs */ | ||
readonly detail: AppInitializeEventAPI; | ||
readonly detail: WindowAppReadyEventAPI; | ||
} | ||
/** TODO: docs */ | ||
export type WalletInitializeEventType = 'wallet-standard-wallet-initialize'; | ||
export type WindowRegisterWalletEventType = 'wallet-standard:register-wallet'; | ||
/** TODO: docs */ | ||
export type WalletInitializeEventCallback = (api: AppInitializeEventAPI) => void; | ||
export type WindowRegisterWalletEventCallback = (api: WindowAppReadyEventAPI) => void; | ||
/** TODO: docs */ | ||
export interface WalletInitializeEvent extends Event { | ||
export interface WindowRegisterWalletEvent extends Event { | ||
/** TODO: docs */ | ||
readonly type: WalletInitializeEventType; | ||
readonly type: WindowRegisterWalletEventType; | ||
/** TODO: docs */ | ||
readonly detail: WalletInitializeEventCallback; | ||
readonly detail: WindowRegisterWalletEventCallback; | ||
} | ||
/** TODO: docs */ | ||
export interface WalletEventsWindow { | ||
export interface WalletEventsWindow extends Omit<Window, 'addEventListener' | 'dispatchEvent'> { | ||
/** TODO: docs */ | ||
addEventListener(type: AppInitializeEventType, listener: (event: AppInitializeEvent) => void): void; | ||
addEventListener(type: WindowAppReadyEventType, listener: (event: WindowAppReadyEvent) => void): void; | ||
/** TODO: docs */ | ||
addEventListener(type: WalletInitializeEventType, listener: (event: WalletInitializeEvent) => void): void; | ||
addEventListener(type: WindowRegisterWalletEventType, listener: (event: WindowRegisterWalletEvent) => void): void; | ||
/** TODO: docs */ | ||
dispatchEvent(event: AppInitializeEvent): void; | ||
dispatchEvent(event: WindowAppReadyEvent): void; | ||
/** TODO: docs */ | ||
dispatchEvent(event: WalletInitializeEvent): void; | ||
dispatchEvent(event: WindowRegisterWalletEvent): void; | ||
} | ||
/** @deprecated */ | ||
export interface DEPRECATED_WalletsWindow extends Window { | ||
navigator: DEPRECATED_WalletsNavigator; | ||
} | ||
/** @deprecated */ | ||
export interface DEPRECATED_WalletsNavigator extends Navigator { | ||
wallets?: DEPRECATED_Wallets; | ||
} | ||
/** @deprecated */ | ||
export interface DEPRECATED_Wallets { | ||
push(...callbacks: DEPRECATED_WalletsCallback[]): void; | ||
} | ||
/** @deprecated */ | ||
export type DEPRECATED_WalletsCallback = (wallets: { register(...wallets: Wallet[]): () => void }) => void; |
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
34449
234