@solana-mobile/wallet-adapter-mobile 0.9.6 → 0.9.7

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.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var mobileWalletAdapterProtocolWeb3js = require('@solana-mobile/mobile-wallet-adapter-protocol-web3js');
6
5
  var walletAdapterBase = require('@solana/wallet-adapter-base');
7
6
  var web3_js = require('@solana/web3.js');
7
+ var mobileWalletAdapterProtocolWeb3js = require('@solana-mobile/mobile-wallet-adapter-protocol-web3js');
8
8
 
9
- /*! *****************************************************************************
9
+ /******************************************************************************
10
10
  Copyright (c) Microsoft Corporation.
11
11
 
12
12
  Permission to use, copy, modify, and/or distribute this software for any
package/lib/cjs/index.js CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var mobileWalletAdapterProtocolWeb3js = require('@solana-mobile/mobile-wallet-adapter-protocol-web3js');
6
5
  var walletAdapterBase = require('@solana/wallet-adapter-base');
7
6
  var web3_js = require('@solana/web3.js');
7
+ var mobileWalletAdapterProtocolWeb3js = require('@solana-mobile/mobile-wallet-adapter-protocol-web3js');
8
8
 
9
- /*! *****************************************************************************
9
+ /******************************************************************************
10
10
  Copyright (c) Microsoft Corporation.
11
11
 
12
12
  Permission to use, copy, modify, and/or distribute this software for any
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var mobileWalletAdapterProtocolWeb3js = require('@solana-mobile/mobile-wallet-adapter-protocol-web3js');
6
5
  var walletAdapterBase = require('@solana/wallet-adapter-base');
7
6
  var web3_js = require('@solana/web3.js');
7
+ var mobileWalletAdapterProtocolWeb3js = require('@solana-mobile/mobile-wallet-adapter-protocol-web3js');
8
8
  var jsBase64 = require('js-base64');
9
9
  var reactNative = require('react-native');
10
10
  var AsyncStorage = require('@react-native-async-storage/async-storage');
@@ -13,7 +13,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
13
 
14
14
  var AsyncStorage__default = /*#__PURE__*/_interopDefaultLegacy(AsyncStorage);
15
15
 
16
- /*! *****************************************************************************
16
+ /******************************************************************************
17
17
  Copyright (c) Microsoft Corporation.
18
18
 
19
19
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,8 +1,8 @@
1
- import { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';
2
1
  import { BaseMessageSignerWalletAdapter, WalletReadyState, WalletPublicKeyError, WalletNotReadyError, WalletConnectionError, WalletDisconnectedError, WalletNotConnectedError, WalletSignTransactionError, WalletSendTransactionError, WalletSignMessageError } from '@solana/wallet-adapter-base';
3
2
  import { PublicKey } from '@solana/web3.js';
3
+ import { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';
4
4
 
5
- /*! *****************************************************************************
5
+ /******************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
7
7
 
8
8
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,8 +1,8 @@
1
- import { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';
2
1
  import { BaseMessageSignerWalletAdapter, WalletReadyState, WalletPublicKeyError, WalletNotReadyError, WalletConnectionError, WalletDisconnectedError, WalletNotConnectedError, WalletSignTransactionError, WalletSendTransactionError, WalletSignMessageError } from '@solana/wallet-adapter-base';
3
2
  import { PublicKey } from '@solana/web3.js';
3
+ import { transact } from '@solana-mobile/mobile-wallet-adapter-protocol-web3js';
4
4
 
5
- /*! *****************************************************************************
5
+ /******************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
7
7
 
8
8
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,7 +1,7 @@
1
- import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
2
1
  import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from "@solana/wallet-adapter-base";
3
2
  import { Connection, PublicKey, SendOptions, TransactionSignature, TransactionVersion, VersionedTransaction } from "@solana/web3.js";
4
3
  import { Transaction as LegacyTransaction } from "@solana/web3.js";
4
+ import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
5
5
  interface AuthorizationResultCache {
6
6
  clear(): Promise<void>;
7
7
  get(): Promise<AuthorizationResult | undefined>;
@@ -1,7 +1,7 @@
1
- import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
2
1
  import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from "@solana/wallet-adapter-base";
3
2
  import { Connection, PublicKey, SendOptions, TransactionSignature, TransactionVersion, VersionedTransaction } from "@solana/web3.js";
4
3
  import { Transaction as LegacyTransaction } from "@solana/web3.js";
4
+ import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
5
5
  interface AuthorizationResultCache {
6
6
  clear(): Promise<void>;
7
7
  get(): Promise<AuthorizationResult | undefined>;
@@ -1,7 +1,7 @@
1
- import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
2
1
  import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from "@solana/wallet-adapter-base";
3
2
  import { Connection, PublicKey, SendOptions, TransactionSignature, TransactionVersion, VersionedTransaction } from "@solana/web3.js";
4
3
  import { Transaction as LegacyTransaction } from "@solana/web3.js";
4
+ import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
5
5
  interface AuthorizationResultCache {
6
6
  clear(): Promise<void>;
7
7
  get(): Promise<AuthorizationResult | undefined>;
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@solana-mobile/wallet-adapter-mobile",
3
3
  "description": "An adapter for mobile wallet apps that conform to the Solana Mobile Wallet Adapter protocol",
4
- "version": "0.9.6",
4
+ "version": "0.9.7",
5
5
  "author": "Steven Luscher <steven.luscher@solanamobile.com>",
6
6
  "repository": "https://github.com/solana-mobile/mobile-wallet-adapter",
7
7
  "license": "Apache-2.0",
8
8
  "type": "module",
9
9
  "sideEffects": false,
10
10
  "main": "lib/cjs/index.js",
11
- "module": "lib/esm/index.mjs",
11
+ "module": "lib/esm/index.js",
12
12
  "react-native": "lib/cjs/index.native.js",
13
13
  "types": "lib/types/index.d.ts",
14
14
  "browser": {
15
15
  "./lib/cjs/index.js": "./lib/cjs/index.browser.js",
16
- "./lib/esm/index.mjs": "./lib/esm/index.browser.mjs"
16
+ "./lib/esm/index.js": "./lib/esm/index.browser.js"
17
17
  },
18
18
  "exports": {
19
19
  "./package.json": "./package.json",
20
20
  ".": {
21
- "import": "./lib/esm/index.mjs",
21
+ "import": "./lib/esm/index.js",
22
22
  "require": "./lib/cjs/index.js"
23
23
  }
24
24
  },
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@react-native-async-storage/async-storage": "^1.17.7",
44
- "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^0.9.6",
44
+ "@solana-mobile/mobile-wallet-adapter-protocol-web3js": "^0.9.7",
45
45
  "@solana/wallet-adapter-base": "^0.9.17",
46
46
  "js-base64": "^3.7.2"
47
47
  },
@@ -51,5 +51,5 @@
51
51
  "cross-env": "^7.0.3",
52
52
  "shx": "^0.3.4"
53
53
  },
54
- "gitHead": "a5baca70e3ab481bf85dbd29aac13b769e317045"
54
+ "gitHead": "91473dbc1754c0161994a22c2895c43c36f9377d"
55
55
  }
@@ -1,65 +0,0 @@
1
- import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
2
- import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from "@solana/wallet-adapter-base";
3
- import { Connection, PublicKey, SendOptions, TransactionSignature, TransactionVersion, VersionedTransaction } from "@solana/web3.js";
4
- import { Transaction as LegacyTransaction } from "@solana/web3.js";
5
- interface AuthorizationResultCache {
6
- clear(): Promise<void>;
7
- get(): Promise<AuthorizationResult | undefined>;
8
- set(authorizationResult: AuthorizationResult): Promise<void>;
9
- }
10
- interface AddressSelector {
11
- select(addresses: Base64EncodedAddress[]): Promise<Base64EncodedAddress>;
12
- }
13
- declare const SolanaMobileWalletAdapterWalletName: WalletName<string>;
14
- declare class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
15
- readonly supportedTransactionVersions: Set<TransactionVersion>;
16
- name: WalletName<string>;
17
- url: string;
18
- icon: string;
19
- private _addressSelector;
20
- private _appIdentity;
21
- private _authorizationResult;
22
- private _authorizationResultCache;
23
- private _connecting;
24
- /**
25
- * Every time the connection is recycled in some way (eg. `disconnect()` is called)
26
- * increment this and use it to make sure that `transact` calls from the previous
27
- * 'generation' don't continue to do work and throw exceptions.
28
- */
29
- private _connectionGeneration;
30
- private _cluster;
31
- private _onWalletNotFound;
32
- private _publicKey;
33
- private _readyState;
34
- private _selectedAddress;
35
- constructor(config: {
36
- addressSelector: AddressSelector;
37
- appIdentity: AppIdentity;
38
- authorizationResultCache: AuthorizationResultCache;
39
- cluster: Cluster;
40
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapter) => Promise<void>;
41
- });
42
- get publicKey(): PublicKey | null;
43
- get connected(): boolean;
44
- get connecting(): boolean;
45
- get readyState(): WalletReadyState;
46
- private declareWalletAsInstalled;
47
- private runWithGuard;
48
- autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(): Promise<void>;
49
- connect(): Promise<void>;
50
- private handleAuthorizationResult;
51
- private performReauthorization;
52
- disconnect(): Promise<void>;
53
- private transact;
54
- private assertIsAuthorized;
55
- private performSignTransactions;
56
- sendTransaction<T extends LegacyTransaction | VersionedTransaction>(transaction: T, connection: Connection, options?: SendOptions): Promise<TransactionSignature>;
57
- signTransaction<T extends LegacyTransaction | VersionedTransaction>(transaction: T): Promise<T>;
58
- signAllTransactions<T extends LegacyTransaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
59
- signMessage(message: Uint8Array): Promise<Uint8Array>;
60
- }
61
- declare function createDefaultAddressSelector(): AddressSelector;
62
- declare function createDefaultAuthorizationResultCache(): AuthorizationResultCache;
63
- declare function createDefaultWalletNotFoundHandler(): (mobileWalletAdapter: SolanaMobileWalletAdapter) => Promise<void>;
64
- export { AuthorizationResultCache, AddressSelector, SolanaMobileWalletAdapterWalletName, SolanaMobileWalletAdapter, createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler };
65
- //# sourceMappingURL=index.browser.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.browser.d.mts","sourceRoot":"","sources":["../../src/index.ts","../../src/base64Utils.ts","../../src/getIsSupported.ts","../../src/adapter.ts","../../src/createDefaultAddressSelector.ts","../../src/createDefaultAuthorizationResultCache.ts","../../src/createDefaultWalletNotFoundHandler.ts"],"names":[],"mappings":""}
@@ -1,65 +0,0 @@
1
- import { AppIdentity, AuthorizationResult, Base64EncodedAddress, Cluster } from "@solana-mobile/mobile-wallet-adapter-protocol";
2
- import { BaseMessageSignerWalletAdapter, WalletName, WalletReadyState } from "@solana/wallet-adapter-base";
3
- import { Connection, PublicKey, SendOptions, TransactionSignature, TransactionVersion, VersionedTransaction } from "@solana/web3.js";
4
- import { Transaction as LegacyTransaction } from "@solana/web3.js";
5
- interface AuthorizationResultCache {
6
- clear(): Promise<void>;
7
- get(): Promise<AuthorizationResult | undefined>;
8
- set(authorizationResult: AuthorizationResult): Promise<void>;
9
- }
10
- interface AddressSelector {
11
- select(addresses: Base64EncodedAddress[]): Promise<Base64EncodedAddress>;
12
- }
13
- declare const SolanaMobileWalletAdapterWalletName: WalletName<string>;
14
- declare class SolanaMobileWalletAdapter extends BaseMessageSignerWalletAdapter {
15
- readonly supportedTransactionVersions: Set<TransactionVersion>;
16
- name: WalletName<string>;
17
- url: string;
18
- icon: string;
19
- private _addressSelector;
20
- private _appIdentity;
21
- private _authorizationResult;
22
- private _authorizationResultCache;
23
- private _connecting;
24
- /**
25
- * Every time the connection is recycled in some way (eg. `disconnect()` is called)
26
- * increment this and use it to make sure that `transact` calls from the previous
27
- * 'generation' don't continue to do work and throw exceptions.
28
- */
29
- private _connectionGeneration;
30
- private _cluster;
31
- private _onWalletNotFound;
32
- private _publicKey;
33
- private _readyState;
34
- private _selectedAddress;
35
- constructor(config: {
36
- addressSelector: AddressSelector;
37
- appIdentity: AppIdentity;
38
- authorizationResultCache: AuthorizationResultCache;
39
- cluster: Cluster;
40
- onWalletNotFound: (mobileWalletAdapter: SolanaMobileWalletAdapter) => Promise<void>;
41
- });
42
- get publicKey(): PublicKey | null;
43
- get connected(): boolean;
44
- get connecting(): boolean;
45
- get readyState(): WalletReadyState;
46
- private declareWalletAsInstalled;
47
- private runWithGuard;
48
- autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(): Promise<void>;
49
- connect(): Promise<void>;
50
- private handleAuthorizationResult;
51
- private performReauthorization;
52
- disconnect(): Promise<void>;
53
- private transact;
54
- private assertIsAuthorized;
55
- private performSignTransactions;
56
- sendTransaction<T extends LegacyTransaction | VersionedTransaction>(transaction: T, connection: Connection, options?: SendOptions): Promise<TransactionSignature>;
57
- signTransaction<T extends LegacyTransaction | VersionedTransaction>(transaction: T): Promise<T>;
58
- signAllTransactions<T extends LegacyTransaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
59
- signMessage(message: Uint8Array): Promise<Uint8Array>;
60
- }
61
- declare function createDefaultAddressSelector(): AddressSelector;
62
- declare function createDefaultAuthorizationResultCache(): AuthorizationResultCache;
63
- declare function createDefaultWalletNotFoundHandler(): (mobileWalletAdapter: SolanaMobileWalletAdapter) => Promise<void>;
64
- export { AuthorizationResultCache, AddressSelector, SolanaMobileWalletAdapterWalletName, SolanaMobileWalletAdapter, createDefaultAddressSelector, createDefaultAuthorizationResultCache, createDefaultWalletNotFoundHandler };
65
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/index.ts","../../src/base64Utils.ts","../../src/getIsSupported.ts","../../src/adapter.ts","../../src/createDefaultAddressSelector.ts","../../src/createDefaultAuthorizationResultCache.ts","../../src/createDefaultWalletNotFoundHandler.ts"],"names":[],"mappings":""}