@solana-mobile/wallet-standard-mobile 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,84 +0,0 @@
1
- import { SolanaSignAndSendTransactionFeature, SolanaSignInFeature, SolanaSignMessageFeature, SolanaSignTransactionFeature } from "@solana/wallet-standard-features";
2
- import { AppIdentity, AuthorizationResult, GetCapabilitiesAPI } from "@solana-mobile/mobile-wallet-adapter-protocol";
3
- import { IdentifierArray, IdentifierString, Wallet, WalletAccount } from "@wallet-standard/base";
4
- import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from "@wallet-standard/features";
5
- type WalletCapabilities = Awaited<ReturnType<GetCapabilitiesAPI["getCapabilities"]>>;
6
- type Authorization = AuthorizationResult & Readonly<{
7
- chain: IdentifierString;
8
- capabilities: WalletCapabilities;
9
- }>;
10
- interface AuthorizationCache {
11
- clear(): Promise<void>;
12
- get(): Promise<Authorization | undefined>;
13
- set(authorization: Authorization): Promise<void>;
14
- }
15
- interface ChainSelector {
16
- select(chains: IdentifierArray): Promise<IdentifierString>;
17
- }
18
- declare const SolanaMobileWalletAdapterWalletName = "Mobile Wallet Adapter";
19
- declare const SolanaMobileWalletAdapterRemoteWalletName = "Remote Mobile Wallet Adapter";
20
- interface SolanaMobileWalletAdapterWallet extends Wallet {
21
- url: string;
22
- }
23
- interface SolanaMobileWalletAdapterAuthorization {
24
- get isAuthorized(): boolean;
25
- get currentAuthorization(): Authorization | undefined;
26
- get cachedAuthorizationResult(): Promise<Authorization | undefined>;
27
- }
28
- declare class LocalSolanaMobileWalletAdapterWallet implements SolanaMobileWalletAdapterWallet, SolanaMobileWalletAdapterAuthorization {
29
- #private;
30
- get version(): "1.0.0";
31
- get name(): string;
32
- get url(): string;
33
- get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
34
- get chains(): IdentifierArray;
35
- get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignMessageFeature & SolanaSignInFeature & (SolanaSignAndSendTransactionFeature | SolanaSignTransactionFeature);
36
- get accounts(): WalletAccount[];
37
- constructor(config: {
38
- appIdentity: AppIdentity;
39
- authorizationCache: AuthorizationCache;
40
- chains: IdentifierArray;
41
- chainSelector: ChainSelector;
42
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
43
- });
44
- get connected(): boolean;
45
- get isAuthorized(): boolean;
46
- get currentAuthorization(): Authorization | undefined;
47
- get cachedAuthorizationResult(): Promise<Authorization | undefined>;
48
- }
49
- declare class RemoteSolanaMobileWalletAdapterWallet implements SolanaMobileWalletAdapterWallet, SolanaMobileWalletAdapterAuthorization {
50
- #private;
51
- get version(): "1.0.0";
52
- get name(): string;
53
- get url(): string;
54
- get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
55
- get chains(): IdentifierArray;
56
- get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignMessageFeature & SolanaSignInFeature & (SolanaSignAndSendTransactionFeature | SolanaSignTransactionFeature);
57
- get accounts(): WalletAccount[];
58
- constructor(config: {
59
- appIdentity: AppIdentity;
60
- authorizationCache: AuthorizationCache;
61
- chains: IdentifierArray;
62
- chainSelector: ChainSelector;
63
- remoteHostAuthority: string;
64
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
65
- });
66
- get connected(): boolean;
67
- get isAuthorized(): boolean;
68
- get currentAuthorization(): Authorization | undefined;
69
- get cachedAuthorizationResult(): Promise<Authorization | undefined>;
70
- }
71
- declare function registerMwa(config: {
72
- appIdentity: AppIdentity;
73
- authorizationCache: AuthorizationCache;
74
- chains: IdentifierArray;
75
- chainSelector: ChainSelector;
76
- remoteHostAuthority?: string;
77
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
78
- }): void;
79
- declare function defaultErrorModalWalletNotFoundHandler(): Promise<void>;
80
- declare function createDefaultWalletNotFoundHandler(): (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
81
- declare function createDefaultAuthorizationCache(): AuthorizationCache;
82
- declare function createDefaultChainSelector(): ChainSelector;
83
- export { Authorization, AuthorizationCache, ChainSelector, SolanaMobileWalletAdapterWalletName, SolanaMobileWalletAdapterRemoteWalletName, SolanaMobileWalletAdapterWallet, LocalSolanaMobileWalletAdapterWallet, RemoteSolanaMobileWalletAdapterWallet, registerMwa, defaultErrorModalWalletNotFoundHandler, createDefaultWalletNotFoundHandler as default, createDefaultWalletNotFoundHandler, createDefaultAuthorizationCache, createDefaultChainSelector };
84
- //# sourceMappingURL=index.browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/embedded-modal/loadingSpinner.ts","../../src/embedded-modal/modal.ts","../../src/embedded-modal/remoteConnectionModal.ts","../../src/icon.ts","../../src/base64Utils.ts","../../src/embedded-modal/localConnectionModal.ts","../../src/embedded-modal/loopbackBlockedModal.ts","../../src/embedded-modal/loopbackPermissionModal.ts","../../src/getIsSupported.ts","../../src/wallet.ts","../../src/initialize.ts","../../src/embedded-modal/errorModal.ts","../../src/createDefaultWalletNotFoundHandler.ts","../../src/createDefaultAuthorizationCache.ts","../../src/createDefaultChainSelector.ts"],"names":[],"mappings":""}
@@ -1,84 +0,0 @@
1
- import { SolanaSignAndSendTransactionFeature, SolanaSignInFeature, SolanaSignMessageFeature, SolanaSignTransactionFeature } from "@solana/wallet-standard-features";
2
- import { AppIdentity, AuthorizationResult, GetCapabilitiesAPI } from "@solana-mobile/mobile-wallet-adapter-protocol";
3
- import { IdentifierArray, IdentifierString, Wallet, WalletAccount } from "@wallet-standard/base";
4
- import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from "@wallet-standard/features";
5
- type WalletCapabilities = Awaited<ReturnType<GetCapabilitiesAPI["getCapabilities"]>>;
6
- type Authorization = AuthorizationResult & Readonly<{
7
- chain: IdentifierString;
8
- capabilities: WalletCapabilities;
9
- }>;
10
- interface AuthorizationCache {
11
- clear(): Promise<void>;
12
- get(): Promise<Authorization | undefined>;
13
- set(authorization: Authorization): Promise<void>;
14
- }
15
- interface ChainSelector {
16
- select(chains: IdentifierArray): Promise<IdentifierString>;
17
- }
18
- declare const SolanaMobileWalletAdapterWalletName = "Mobile Wallet Adapter";
19
- declare const SolanaMobileWalletAdapterRemoteWalletName = "Remote Mobile Wallet Adapter";
20
- interface SolanaMobileWalletAdapterWallet extends Wallet {
21
- url: string;
22
- }
23
- interface SolanaMobileWalletAdapterAuthorization {
24
- get isAuthorized(): boolean;
25
- get currentAuthorization(): Authorization | undefined;
26
- get cachedAuthorizationResult(): Promise<Authorization | undefined>;
27
- }
28
- declare class LocalSolanaMobileWalletAdapterWallet implements SolanaMobileWalletAdapterWallet, SolanaMobileWalletAdapterAuthorization {
29
- #private;
30
- get version(): "1.0.0";
31
- get name(): string;
32
- get url(): string;
33
- get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
34
- get chains(): IdentifierArray;
35
- get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignMessageFeature & SolanaSignInFeature & (SolanaSignAndSendTransactionFeature | SolanaSignTransactionFeature);
36
- get accounts(): WalletAccount[];
37
- constructor(config: {
38
- appIdentity: AppIdentity;
39
- authorizationCache: AuthorizationCache;
40
- chains: IdentifierArray;
41
- chainSelector: ChainSelector;
42
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
43
- });
44
- get connected(): boolean;
45
- get isAuthorized(): boolean;
46
- get currentAuthorization(): Authorization | undefined;
47
- get cachedAuthorizationResult(): Promise<Authorization | undefined>;
48
- }
49
- declare class RemoteSolanaMobileWalletAdapterWallet implements SolanaMobileWalletAdapterWallet, SolanaMobileWalletAdapterAuthorization {
50
- #private;
51
- get version(): "1.0.0";
52
- get name(): string;
53
- get url(): string;
54
- get icon(): `data:image/svg+xml;base64,${string}` | `data:image/webp;base64,${string}` | `data:image/png;base64,${string}` | `data:image/gif;base64,${string}`;
55
- get chains(): IdentifierArray;
56
- get features(): StandardConnectFeature & StandardDisconnectFeature & StandardEventsFeature & SolanaSignMessageFeature & SolanaSignInFeature & (SolanaSignAndSendTransactionFeature | SolanaSignTransactionFeature);
57
- get accounts(): WalletAccount[];
58
- constructor(config: {
59
- appIdentity: AppIdentity;
60
- authorizationCache: AuthorizationCache;
61
- chains: IdentifierArray;
62
- chainSelector: ChainSelector;
63
- remoteHostAuthority: string;
64
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
65
- });
66
- get connected(): boolean;
67
- get isAuthorized(): boolean;
68
- get currentAuthorization(): Authorization | undefined;
69
- get cachedAuthorizationResult(): Promise<Authorization | undefined>;
70
- }
71
- declare function registerMwa(config: {
72
- appIdentity: AppIdentity;
73
- authorizationCache: AuthorizationCache;
74
- chains: IdentifierArray;
75
- chainSelector: ChainSelector;
76
- remoteHostAuthority?: string;
77
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
78
- }): void;
79
- declare function defaultErrorModalWalletNotFoundHandler(): Promise<void>;
80
- declare function createDefaultWalletNotFoundHandler(): (mobileWalletAdapter: SolanaMobileWalletAdapterWallet) => Promise<void>;
81
- declare function createDefaultAuthorizationCache(): AuthorizationCache;
82
- declare function createDefaultChainSelector(): ChainSelector;
83
- export { Authorization, AuthorizationCache, ChainSelector, SolanaMobileWalletAdapterWalletName, SolanaMobileWalletAdapterRemoteWalletName, SolanaMobileWalletAdapterWallet, LocalSolanaMobileWalletAdapterWallet, RemoteSolanaMobileWalletAdapterWallet, registerMwa, defaultErrorModalWalletNotFoundHandler, createDefaultWalletNotFoundHandler as default, createDefaultWalletNotFoundHandler, createDefaultAuthorizationCache, createDefaultChainSelector };
84
- //# sourceMappingURL=index.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/embedded-modal/loadingSpinner.ts","../../src/embedded-modal/modal.ts","../../src/embedded-modal/remoteConnectionModal.ts","../../src/icon.ts","../../src/base64Utils.ts","../../src/embedded-modal/localConnectionModal.ts","../../src/embedded-modal/loopbackBlockedModal.ts","../../src/embedded-modal/loopbackPermissionModal.ts","../../src/getIsSupported.ts","../../src/wallet.ts","../../src/initialize.ts","../../src/embedded-modal/errorModal.ts","../../src/createDefaultWalletNotFoundHandler.ts","../../src/createDefaultAuthorizationCache.ts","../../src/createDefaultChainSelector.ts","../../src/__forks__/react-native/createDefaultAuthorizationCache.ts"],"names":[],"mappings":""}