@solana-mobile/mobile-wallet-adapter-protocol 2.2.5 → 2.2.6

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,5 +1,5 @@
1
1
  import { TransactionVersion } from "@solana/web3.js";
2
- import { SolanaSignInInput } from "@solana/wallet-standard";
2
+ import { SolanaSignInInput } from "@solana/wallet-standard-features";
3
3
  import { IdentifierArray, IdentifierString, WalletAccount, WalletIcon } from "@wallet-standard/core";
4
4
  // Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/
5
5
  declare const SolanaMobileWalletAdapterErrorCode: {
@@ -12,6 +12,8 @@ declare const SolanaMobileWalletAdapterErrorCode: {
12
12
  readonly ERROR_WALLET_NOT_FOUND: "ERROR_WALLET_NOT_FOUND";
13
13
  readonly ERROR_INVALID_PROTOCOL_VERSION: "ERROR_INVALID_PROTOCOL_VERSION";
14
14
  readonly ERROR_BROWSER_NOT_SUPPORTED: "ERROR_BROWSER_NOT_SUPPORTED";
15
+ readonly ERROR_LOOPBACK_ACCESS_BLOCKED: "ERROR_LOOPBACK_ACCESS_BLOCKED";
16
+ readonly ERROR_ASSOCIATION_CANCELLED: "ERROR_ASSOCIATION_CANCELLED";
15
17
  };
16
18
  type SolanaMobileWalletAdapterErrorCodeEnum = (typeof SolanaMobileWalletAdapterErrorCode)[keyof typeof SolanaMobileWalletAdapterErrorCode];
17
19
  type ErrorDataTypeMap = {
@@ -30,6 +32,10 @@ type ErrorDataTypeMap = {
30
32
  [SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND]: undefined;
31
33
  [SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION]: undefined;
32
34
  [SolanaMobileWalletAdapterErrorCode.ERROR_BROWSER_NOT_SUPPORTED]: undefined;
35
+ [SolanaMobileWalletAdapterErrorCode.ERROR_LOOPBACK_ACCESS_BLOCKED]: undefined;
36
+ [SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_CANCELLED]: {
37
+ event: Event | undefined;
38
+ };
33
39
  };
34
40
  declare class SolanaMobileWalletAdapterError<TErrorCode extends SolanaMobileWalletAdapterErrorCodeEnum> extends Error {
35
41
  data: ErrorDataTypeMap[TErrorCode] | undefined;
@@ -258,6 +264,7 @@ type RemoteScenario = Scenario & Readonly<{
258
264
  associationUrl: URL;
259
265
  }>;
260
266
  declare function transact<TReturn>(callback: (wallet: MobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
267
+ declare function startScenario(config?: WalletAssociationConfig): Promise<Scenario>;
261
268
  declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<RemoteScenario>;
262
- export { SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaMobileWalletAdapterProtocolError, transact, startRemoteScenario, Account, AppIdentity, AssociationKeypair, ProtocolVersion, SessionProperties, AuthorizationResult, AuthToken, Base64EncodedAddress, Base64EncodedTransaction, Cluster, Chain, Finality, WalletAssociationConfig, RemoteWalletAssociationConfig, AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, SignMessagesAPI, SignTransactionsAPI, SignAndSendTransactionsAPI, MobileWallet, TerminateSessionAPI, RemoteMobileWallet, SolanaSignTransactions, SolanaCloneAuthorization, SolanaSignInWithSolana, SignInPayload, SignInPayloadWithRequiredFields, SignInResult, Scenario, RemoteScenario };
269
+ export { SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaMobileWalletAdapterProtocolError, transact, startScenario, startRemoteScenario, Account, AppIdentity, AssociationKeypair, ProtocolVersion, SessionProperties, AuthorizationResult, AuthToken, Base64EncodedAddress, Base64EncodedTransaction, Cluster, Chain, Finality, WalletAssociationConfig, RemoteWalletAssociationConfig, AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, SignMessagesAPI, SignTransactionsAPI, SignAndSendTransactionsAPI, MobileWallet, TerminateSessionAPI, RemoteMobileWallet, SolanaSignTransactions, SolanaCloneAuthorization, SolanaSignInWithSolana, SignInPayload, SignInPayloadWithRequiredFields, SignInResult, Scenario, RemoteScenario };
263
270
  //# sourceMappingURL=index.browser.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { TransactionVersion } from "@solana/web3.js";
2
- import { SolanaSignInInput } from "@solana/wallet-standard";
2
+ import { SolanaSignInInput } from "@solana/wallet-standard-features";
3
3
  import { IdentifierArray, IdentifierString, WalletAccount, WalletIcon } from "@wallet-standard/core";
4
4
  // Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/
5
5
  declare const SolanaMobileWalletAdapterErrorCode: {
@@ -12,6 +12,8 @@ declare const SolanaMobileWalletAdapterErrorCode: {
12
12
  readonly ERROR_WALLET_NOT_FOUND: "ERROR_WALLET_NOT_FOUND";
13
13
  readonly ERROR_INVALID_PROTOCOL_VERSION: "ERROR_INVALID_PROTOCOL_VERSION";
14
14
  readonly ERROR_BROWSER_NOT_SUPPORTED: "ERROR_BROWSER_NOT_SUPPORTED";
15
+ readonly ERROR_LOOPBACK_ACCESS_BLOCKED: "ERROR_LOOPBACK_ACCESS_BLOCKED";
16
+ readonly ERROR_ASSOCIATION_CANCELLED: "ERROR_ASSOCIATION_CANCELLED";
15
17
  };
16
18
  type SolanaMobileWalletAdapterErrorCodeEnum = (typeof SolanaMobileWalletAdapterErrorCode)[keyof typeof SolanaMobileWalletAdapterErrorCode];
17
19
  type ErrorDataTypeMap = {
@@ -30,6 +32,10 @@ type ErrorDataTypeMap = {
30
32
  [SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND]: undefined;
31
33
  [SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION]: undefined;
32
34
  [SolanaMobileWalletAdapterErrorCode.ERROR_BROWSER_NOT_SUPPORTED]: undefined;
35
+ [SolanaMobileWalletAdapterErrorCode.ERROR_LOOPBACK_ACCESS_BLOCKED]: undefined;
36
+ [SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_CANCELLED]: {
37
+ event: Event | undefined;
38
+ };
33
39
  };
34
40
  declare class SolanaMobileWalletAdapterError<TErrorCode extends SolanaMobileWalletAdapterErrorCodeEnum> extends Error {
35
41
  data: ErrorDataTypeMap[TErrorCode] | undefined;
@@ -258,6 +264,7 @@ type RemoteScenario = Scenario & Readonly<{
258
264
  associationUrl: URL;
259
265
  }>;
260
266
  declare function transact<TReturn>(callback: (wallet: MobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
267
+ declare function startScenario(config?: WalletAssociationConfig): Promise<Scenario>;
261
268
  declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<RemoteScenario>;
262
- export { SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaMobileWalletAdapterProtocolError, transact, startRemoteScenario, Account, AppIdentity, AssociationKeypair, ProtocolVersion, SessionProperties, AuthorizationResult, AuthToken, Base64EncodedAddress, Base64EncodedTransaction, Cluster, Chain, Finality, WalletAssociationConfig, RemoteWalletAssociationConfig, AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, SignMessagesAPI, SignTransactionsAPI, SignAndSendTransactionsAPI, MobileWallet, TerminateSessionAPI, RemoteMobileWallet, SolanaSignTransactions, SolanaCloneAuthorization, SolanaSignInWithSolana, SignInPayload, SignInPayloadWithRequiredFields, SignInResult, Scenario, RemoteScenario };
269
+ export { SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaMobileWalletAdapterProtocolError, transact, startScenario, startRemoteScenario, Account, AppIdentity, AssociationKeypair, ProtocolVersion, SessionProperties, AuthorizationResult, AuthToken, Base64EncodedAddress, Base64EncodedTransaction, Cluster, Chain, Finality, WalletAssociationConfig, RemoteWalletAssociationConfig, AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, SignMessagesAPI, SignTransactionsAPI, SignAndSendTransactionsAPI, MobileWallet, TerminateSessionAPI, RemoteMobileWallet, SolanaSignTransactions, SolanaCloneAuthorization, SolanaSignInWithSolana, SignInPayload, SignInPayloadWithRequiredFields, SignInResult, Scenario, RemoteScenario };
263
270
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { TransactionVersion } from "@solana/web3.js";
2
- import { SolanaSignInInput } from "@solana/wallet-standard";
2
+ import { SolanaSignInInput } from "@solana/wallet-standard-features";
3
3
  import { IdentifierArray, IdentifierString, WalletAccount, WalletIcon } from "@wallet-standard/core";
4
4
  // Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/
5
5
  declare const SolanaMobileWalletAdapterErrorCode: {
@@ -12,6 +12,8 @@ declare const SolanaMobileWalletAdapterErrorCode: {
12
12
  readonly ERROR_WALLET_NOT_FOUND: "ERROR_WALLET_NOT_FOUND";
13
13
  readonly ERROR_INVALID_PROTOCOL_VERSION: "ERROR_INVALID_PROTOCOL_VERSION";
14
14
  readonly ERROR_BROWSER_NOT_SUPPORTED: "ERROR_BROWSER_NOT_SUPPORTED";
15
+ readonly ERROR_LOOPBACK_ACCESS_BLOCKED: "ERROR_LOOPBACK_ACCESS_BLOCKED";
16
+ readonly ERROR_ASSOCIATION_CANCELLED: "ERROR_ASSOCIATION_CANCELLED";
15
17
  };
16
18
  type SolanaMobileWalletAdapterErrorCodeEnum = (typeof SolanaMobileWalletAdapterErrorCode)[keyof typeof SolanaMobileWalletAdapterErrorCode];
17
19
  type ErrorDataTypeMap = {
@@ -30,6 +32,10 @@ type ErrorDataTypeMap = {
30
32
  [SolanaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND]: undefined;
31
33
  [SolanaMobileWalletAdapterErrorCode.ERROR_INVALID_PROTOCOL_VERSION]: undefined;
32
34
  [SolanaMobileWalletAdapterErrorCode.ERROR_BROWSER_NOT_SUPPORTED]: undefined;
35
+ [SolanaMobileWalletAdapterErrorCode.ERROR_LOOPBACK_ACCESS_BLOCKED]: undefined;
36
+ [SolanaMobileWalletAdapterErrorCode.ERROR_ASSOCIATION_CANCELLED]: {
37
+ event: Event | undefined;
38
+ };
33
39
  };
34
40
  declare class SolanaMobileWalletAdapterError<TErrorCode extends SolanaMobileWalletAdapterErrorCodeEnum> extends Error {
35
41
  data: ErrorDataTypeMap[TErrorCode] | undefined;
@@ -258,6 +264,7 @@ type RemoteScenario = Scenario & Readonly<{
258
264
  associationUrl: URL;
259
265
  }>;
260
266
  declare function transact<TReturn>(callback: (wallet: MobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
267
+ declare function startScenario(config?: WalletAssociationConfig): Promise<Scenario>;
261
268
  declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<RemoteScenario>;
262
- export { SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaMobileWalletAdapterProtocolError, transact, startRemoteScenario, Account, AppIdentity, AssociationKeypair, ProtocolVersion, SessionProperties, AuthorizationResult, AuthToken, Base64EncodedAddress, Base64EncodedTransaction, Cluster, Chain, Finality, WalletAssociationConfig, RemoteWalletAssociationConfig, AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, SignMessagesAPI, SignTransactionsAPI, SignAndSendTransactionsAPI, MobileWallet, TerminateSessionAPI, RemoteMobileWallet, SolanaSignTransactions, SolanaCloneAuthorization, SolanaSignInWithSolana, SignInPayload, SignInPayloadWithRequiredFields, SignInResult, Scenario, RemoteScenario };
269
+ export { SolanaMobileWalletAdapterErrorCode, SolanaMobileWalletAdapterError, SolanaMobileWalletAdapterProtocolErrorCode, SolanaMobileWalletAdapterProtocolError, transact, startScenario, startRemoteScenario, Account, AppIdentity, AssociationKeypair, ProtocolVersion, SessionProperties, AuthorizationResult, AuthToken, Base64EncodedAddress, Base64EncodedTransaction, Cluster, Chain, Finality, WalletAssociationConfig, RemoteWalletAssociationConfig, AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, SignMessagesAPI, SignTransactionsAPI, SignAndSendTransactionsAPI, MobileWallet, TerminateSessionAPI, RemoteMobileWallet, SolanaSignTransactions, SolanaCloneAuthorization, SolanaSignInWithSolana, SignInPayload, SignInPayloadWithRequiredFields, SignInResult, Scenario, RemoteScenario };
263
270
  //# sourceMappingURL=index.native.d.ts.map
package/package.json CHANGED
@@ -1,83 +1,82 @@
1
1
  {
2
- "name": "@solana-mobile/mobile-wallet-adapter-protocol",
3
- "description": "An implementation of the Solana Mobile Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.",
4
- "version": "2.2.5",
5
- "author": "Steven Luscher <steven.luscher@solanamobile.com>",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/solana-mobile/mobile-wallet-adapter.git"
2
+ "name": "@solana-mobile/mobile-wallet-adapter-protocol",
3
+ "description": "An implementation of the Solana Mobile Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.",
4
+ "version": "2.2.6",
5
+ "author": "Steven Luscher <steven.luscher@solanamobile.com>",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/solana-mobile/mobile-wallet-adapter.git"
9
+ },
10
+ "license": "Apache-2.0",
11
+ "exports": {
12
+ "edge-light": {
13
+ "import": "./lib/esm/index.js",
14
+ "require": "./lib/cjs/index.js"
9
15
  },
10
- "license": "Apache-2.0",
11
- "exports": {
12
- "edge-light": {
13
- "import": "./lib/esm/index.js",
14
- "require": "./lib/cjs/index.js"
15
- },
16
- "workerd": {
17
- "import": "./lib/esm/index.js",
18
- "require": "./lib/cjs/index.js"
19
- },
20
- "browser": {
21
- "import": "./lib/esm/index.browser.js",
22
- "require": "./lib/cjs/index.browser.js"
23
- },
24
- "node": {
25
- "import": "./lib/esm/index.js",
26
- "require": "./lib/cjs/index.js"
27
- },
28
- "react-native": "./lib/cjs/index.native.js",
29
- "types": "./lib/types/index.d.ts"
16
+ "workerd": {
17
+ "import": "./lib/esm/index.js",
18
+ "require": "./lib/cjs/index.js"
30
19
  },
31
20
  "browser": {
32
- "./lib/cjs/index.js": "./lib/cjs/index.browser.js",
33
- "./lib/esm/index.js": "./lib/esm/index.browser.js"
21
+ "import": "./lib/esm/index.browser.js",
22
+ "require": "./lib/cjs/index.browser.js"
34
23
  },
35
- "main": "lib/cjs/index.js",
36
- "module": "lib/esm/index.js",
37
- "react-native": "lib/cjs/index.native.js",
38
- "types": "lib/types/index.d.ts",
39
- "type": "module",
40
- "files": [
41
- "android",
42
- "src/codegenSpec",
43
- "!android/build",
44
- "lib",
45
- "LICENSE"
46
- ],
47
- "sideEffects": false,
48
- "publishConfig": {
49
- "access": "public"
24
+ "node": {
25
+ "import": "./lib/esm/index.js",
26
+ "require": "./lib/cjs/index.js"
50
27
  },
51
- "scripts": {
52
- "clean": "shx rm -rf lib/*",
53
- "build": "yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts",
54
- "build:watch": "yarn clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts --watch",
55
- "postbuild": "cross-env echo {\\\"type\\\":\\\"commonjs\\\"} | npx json > lib/cjs/package.json && echo {\\\"type\\\":\\\"module\\\"} | npx json > lib/esm/package.json",
56
- "prepublishOnly": "agadoo"
57
- },
58
- "dependencies": {
59
- "@solana/codecs-strings": "^4.0.0",
60
- "@solana/wallet-standard": "^1.1.2",
61
- "@solana/wallet-standard-util": "^1.1.1",
62
- "@wallet-standard/core": "^1.0.3",
63
- "js-base64": "^3.7.5"
64
- },
65
- "devDependencies": {
66
- "@solana/web3.js": "^1.91.7",
67
- "@types/react-native": "^0.69.3",
68
- "agadoo": "^3.0.0",
69
- "cross-env": "^7.0.3",
70
- "shx": "^0.3.4"
71
- },
72
- "peerDependencies": {
73
- "react-native": ">0.69"
74
- },
75
- "codegenConfig": {
76
- "name": "SolanaMobileWalletAdapter",
77
- "type": "all",
78
- "jsSrcsDir": "./src/codegenSpec",
79
- "android": {
80
- "javaPackageName": "com.solanamobile.mobilewalletadapter.reactnative"
81
- }
28
+ "react-native": "./lib/cjs/index.native.js",
29
+ "types": "./lib/types/index.d.ts"
30
+ },
31
+ "browser": {
32
+ "./lib/cjs/index.js": "./lib/cjs/index.browser.js",
33
+ "./lib/esm/index.js": "./lib/esm/index.browser.js"
34
+ },
35
+ "main": "lib/cjs/index.js",
36
+ "module": "lib/esm/index.js",
37
+ "react-native": "lib/cjs/index.native.js",
38
+ "types": "lib/types/index.d.ts",
39
+ "type": "module",
40
+ "files": [
41
+ "android",
42
+ "src/codegenSpec",
43
+ "!android/build",
44
+ "lib",
45
+ "LICENSE"
46
+ ],
47
+ "sideEffects": false,
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "dependencies": {
52
+ "@solana/codecs-strings": "^4.0.0",
53
+ "@solana/wallet-standard-features": "^1.3.0",
54
+ "@solana/wallet-standard-util": "^1.1.2",
55
+ "@wallet-standard/core": "^1.1.1",
56
+ "js-base64": "^3.7.5"
57
+ },
58
+ "devDependencies": {
59
+ "@solana/web3.js": "^1.91.7",
60
+ "@types/react-native": "^0.69.3",
61
+ "agadoo": "^3.0.0",
62
+ "cross-env": "^10.1.0",
63
+ "shx": "^0.4.0"
64
+ },
65
+ "peerDependencies": {
66
+ "react-native": ">0.74"
67
+ },
68
+ "codegenConfig": {
69
+ "name": "SolanaMobileWalletAdapter",
70
+ "type": "all",
71
+ "jsSrcsDir": "./src/codegenSpec",
72
+ "android": {
73
+ "javaPackageName": "com.solanamobile.mobilewalletadapter.reactnative"
82
74
  }
75
+ },
76
+ "scripts": {
77
+ "clean": "shx rm -rf lib/*",
78
+ "build": "pnpm clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts",
79
+ "build:watch": "pnpm clean && rollup --config ../../rollup.config.ts --configPlugin rollup-plugin-ts --watch",
80
+ "postbuild": "cross-env echo {\\\"type\\\":\\\"commonjs\\\"} | npx json > lib/cjs/package.json && echo {\\\"type\\\":\\\"module\\\"} | npx json > lib/esm/package.json"
81
+ }
83
82
  }