@solana-mobile/mobile-wallet-adapter-protocol-kit 0.2.3 → 0.3.1
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.
- package/README.md +1 -1
- package/lib/cjs/index.browser.js +81 -96
- package/lib/cjs/index.browser.js.map +1 -0
- package/lib/cjs/index.js +81 -96
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/index.native.js +78 -91
- package/lib/cjs/index.native.js.map +1 -0
- package/lib/cjs/package.json +1 -3
- package/lib/esm/index.browser.js +80 -94
- package/lib/esm/index.browser.js.map +1 -0
- package/lib/esm/index.js +80 -94
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/package.json +1 -3
- package/lib/types/index.d.ts +89 -26
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +10 -9
- package/lib/types/index.browser.d.ts +0 -40
- package/lib/types/index.browser.d.ts.map +0 -1
- package/lib/types/index.native.d.ts +0 -40
- package/lib/types/index.native.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/mobile-wallet-adapter-protocol-kit",
|
|
3
3
|
"description": "A convenience wrapper that enables you to call Solana Mobile Stack protocol methods using objects from @solana/kit",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"author": "Marco Martinez <marco.martinez@solana.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -46,25 +46,26 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@solana/kit": "^
|
|
49
|
+
"@solana/kit": "^6.0.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@solana/transactions": "^
|
|
53
|
-
"@solana/transaction-messages": "^
|
|
52
|
+
"@solana/transactions": "^6.0.0",
|
|
53
|
+
"@solana/transaction-messages": "^6.0.0",
|
|
54
54
|
"bs58": "^6.0.0",
|
|
55
55
|
"js-base64": "^3.7.7",
|
|
56
|
-
"@solana-mobile/mobile-wallet-adapter-protocol": "^2.2.
|
|
56
|
+
"@solana-mobile/mobile-wallet-adapter-protocol": "^2.2.8"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@solana/keys": "^
|
|
59
|
+
"@solana/keys": "^6.0.0",
|
|
60
60
|
"agadoo": "^3.0.0",
|
|
61
61
|
"cross-env": "^10.1.0",
|
|
62
62
|
"shx": "^0.4.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"clean": "shx rm -rf lib/*",
|
|
66
|
-
"build": "pnpm clean &&
|
|
67
|
-
"build:watch": "pnpm clean &&
|
|
68
|
-
"
|
|
66
|
+
"build": "pnpm clean && tsdown --config ../../tsdown.config.ts",
|
|
67
|
+
"build:watch": "pnpm clean && tsdown --config ../../tsdown.config.ts --watch",
|
|
68
|
+
"check-types": "tsc -p tsconfig.json --noEmit",
|
|
69
|
+
"postbuild": "printf '%s' '{\"type\":\"commonjs\"}' > lib/cjs/package.json && printf '%s' '{\"type\":\"module\"}' > lib/esm/package.json"
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Transaction } from "@solana/transactions";
|
|
2
|
-
import { CompilableTransactionMessage } from "@solana/transaction-messages";
|
|
3
|
-
import { SignatureBytes } from "@solana/keys";
|
|
4
|
-
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, TerminateSessionAPI, WalletAssociationConfig, RemoteWalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
5
|
-
interface KitSignAndSendTransactionsAPI {
|
|
6
|
-
signAndSendTransactions<T extends Transaction | CompilableTransactionMessage>(params: {
|
|
7
|
-
minContextSlot?: number;
|
|
8
|
-
commitment?: string;
|
|
9
|
-
skipPreflight?: boolean;
|
|
10
|
-
maxRetries?: number;
|
|
11
|
-
waitForCommitmentToSendNextTransaction?: boolean;
|
|
12
|
-
transactions: T[];
|
|
13
|
-
}): Promise<SignatureBytes[]>;
|
|
14
|
-
}
|
|
15
|
-
interface KitSignTransactionsAPI {
|
|
16
|
-
signTransactions<T extends Transaction>(params: {
|
|
17
|
-
transactions: T[];
|
|
18
|
-
}): Promise<T[]>;
|
|
19
|
-
}
|
|
20
|
-
interface KitSignMessagesAPI {
|
|
21
|
-
signMessages(params: {
|
|
22
|
-
addresses: Base64EncodedAddress[];
|
|
23
|
-
payloads: Uint8Array[];
|
|
24
|
-
}): Promise<Uint8Array[]>;
|
|
25
|
-
}
|
|
26
|
-
interface KitMobileWallet extends AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, KitSignAndSendTransactionsAPI, KitSignTransactionsAPI, KitSignMessagesAPI {
|
|
27
|
-
}
|
|
28
|
-
interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {
|
|
29
|
-
}
|
|
30
|
-
type KitScenario = Readonly<{
|
|
31
|
-
wallet: Promise<KitMobileWallet>;
|
|
32
|
-
close: () => void;
|
|
33
|
-
}>;
|
|
34
|
-
type KitRemoteScenario = KitScenario & Readonly<{
|
|
35
|
-
associationUrl: URL;
|
|
36
|
-
}>;
|
|
37
|
-
declare function transact<TReturn>(callback: (wallet: KitMobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
|
|
38
|
-
declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<KitRemoteScenario>;
|
|
39
|
-
export { KitMobileWallet, KitRemoteMobileWallet, KitScenario, KitRemoteScenario, transact, startRemoteScenario };
|
|
40
|
-
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/base64Utils.ts","../../src/transact.ts"],"names":[],"mappings":""}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Transaction } from "@solana/transactions";
|
|
2
|
-
import { CompilableTransactionMessage } from "@solana/transaction-messages";
|
|
3
|
-
import { SignatureBytes } from "@solana/keys";
|
|
4
|
-
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, TerminateSessionAPI, WalletAssociationConfig, RemoteWalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
5
|
-
interface KitSignAndSendTransactionsAPI {
|
|
6
|
-
signAndSendTransactions<T extends Transaction | CompilableTransactionMessage>(params: {
|
|
7
|
-
minContextSlot?: number;
|
|
8
|
-
commitment?: string;
|
|
9
|
-
skipPreflight?: boolean;
|
|
10
|
-
maxRetries?: number;
|
|
11
|
-
waitForCommitmentToSendNextTransaction?: boolean;
|
|
12
|
-
transactions: T[];
|
|
13
|
-
}): Promise<SignatureBytes[]>;
|
|
14
|
-
}
|
|
15
|
-
interface KitSignTransactionsAPI {
|
|
16
|
-
signTransactions<T extends Transaction>(params: {
|
|
17
|
-
transactions: T[];
|
|
18
|
-
}): Promise<T[]>;
|
|
19
|
-
}
|
|
20
|
-
interface KitSignMessagesAPI {
|
|
21
|
-
signMessages(params: {
|
|
22
|
-
addresses: Base64EncodedAddress[];
|
|
23
|
-
payloads: Uint8Array[];
|
|
24
|
-
}): Promise<Uint8Array[]>;
|
|
25
|
-
}
|
|
26
|
-
interface KitMobileWallet extends AuthorizeAPI, CloneAuthorizationAPI, DeauthorizeAPI, GetCapabilitiesAPI, ReauthorizeAPI, KitSignAndSendTransactionsAPI, KitSignTransactionsAPI, KitSignMessagesAPI {
|
|
27
|
-
}
|
|
28
|
-
interface KitRemoteMobileWallet extends KitMobileWallet, TerminateSessionAPI {
|
|
29
|
-
}
|
|
30
|
-
type KitScenario = Readonly<{
|
|
31
|
-
wallet: Promise<KitMobileWallet>;
|
|
32
|
-
close: () => void;
|
|
33
|
-
}>;
|
|
34
|
-
type KitRemoteScenario = KitScenario & Readonly<{
|
|
35
|
-
associationUrl: URL;
|
|
36
|
-
}>;
|
|
37
|
-
declare function transact<TReturn>(callback: (wallet: KitMobileWallet) => TReturn, config?: WalletAssociationConfig): Promise<TReturn>;
|
|
38
|
-
declare function startRemoteScenario(config: RemoteWalletAssociationConfig): Promise<KitRemoteScenario>;
|
|
39
|
-
export { KitMobileWallet, KitRemoteMobileWallet, KitScenario, KitRemoteScenario, transact, startRemoteScenario };
|
|
40
|
-
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/base64Utils.ts","../../src/transact.ts"],"names":[],"mappings":""}
|