@antigane/wallet-adapters 0.0.13 → 0.1.0
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/dist/index.cjs +40 -35
- package/dist/index.js +14302 -11179
- package/dist/services/metamask.d.ts +1 -1
- package/dist/services/phantom.d.ts +20 -26
- package/package.json +14 -11
|
@@ -34,7 +34,7 @@ export declare class Metamask {
|
|
|
34
34
|
* Signs a login message via MetaMask using personal_sign.
|
|
35
35
|
* Note: returning Promise<SignState> is required because wallet calls are async.
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
login(message: string): Promise<SignState>;
|
|
38
38
|
/**
|
|
39
39
|
* Generic EVM contract call via eth_sendTransaction:
|
|
40
40
|
* - encodes ABI -> calldata (viem encodeFunctionData)
|
|
@@ -1,37 +1,31 @@
|
|
|
1
1
|
import { SignState } from '../types/sign';
|
|
2
|
-
import {
|
|
2
|
+
import { Transaction } from '@solana/web3.js';
|
|
3
3
|
export declare class Phantom {
|
|
4
4
|
private getSdk;
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* LOGIN (sign challenge)
|
|
7
|
+
*/
|
|
8
|
+
login(message: string): Promise<SignState>;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Login(message: string): Promise<SignState>;
|
|
10
|
+
* GENERIC SIGN MESSAGE
|
|
11
|
+
*/
|
|
12
|
+
signMessage(message: string): Promise<string>;
|
|
14
13
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
args?: unknown[];
|
|
26
|
-
valueWei?: bigint;
|
|
27
|
-
gas?: bigint;
|
|
28
|
-
maxFeePerGas?: bigint;
|
|
29
|
-
maxPriorityFeePerGas?: bigint;
|
|
14
|
+
* SIGN TRANSACTION
|
|
15
|
+
*/
|
|
16
|
+
signTransaction(tx: Transaction): Promise<Transaction | import('@solana/web3.js').VersionedTransaction>;
|
|
17
|
+
/**
|
|
18
|
+
* SEND SOLANA TRANSACTION
|
|
19
|
+
*/
|
|
20
|
+
sendTransaction(params: {
|
|
21
|
+
rpcUrl: string;
|
|
22
|
+
to: string;
|
|
23
|
+
lamports: number;
|
|
30
24
|
}): Promise<{
|
|
31
|
-
|
|
25
|
+
signature: string;
|
|
32
26
|
}>;
|
|
33
27
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
* CHECK PHANTOM
|
|
29
|
+
*/
|
|
36
30
|
isPhantomInstalled(): boolean;
|
|
37
31
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antigane/wallet-adapters",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/antiganehq",
|
|
7
7
|
"repository": {
|
|
@@ -26,6 +26,16 @@
|
|
|
26
26
|
"sideEffects": [
|
|
27
27
|
"*.css"
|
|
28
28
|
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"dev": "vite",
|
|
31
|
+
"build": "pnpm run clean && pnpm run build:js",
|
|
32
|
+
"build:js": "vite build",
|
|
33
|
+
"lint": "eslint .",
|
|
34
|
+
"typecheck": "tsc --noEmit",
|
|
35
|
+
"clean": "rimraf dist",
|
|
36
|
+
"preview": "vite preview",
|
|
37
|
+
"publish": "pnpm publish --access public --no-git-checks"
|
|
38
|
+
},
|
|
29
39
|
"peerDependencies": {
|
|
30
40
|
"framer-motion": ">=12.24.0 <13",
|
|
31
41
|
"react": ">=18",
|
|
@@ -34,6 +44,8 @@
|
|
|
34
44
|
"dependencies": {
|
|
35
45
|
"@metamask/sdk": "^0.34.0",
|
|
36
46
|
"@phantom/browser-sdk": "^1.0.0",
|
|
47
|
+
"@solana/web3.js": "^1.98.4",
|
|
48
|
+
"bs58": "^6.0.0",
|
|
37
49
|
"viem": "^2.44.1"
|
|
38
50
|
},
|
|
39
51
|
"devDependencies": {
|
|
@@ -54,14 +66,5 @@
|
|
|
54
66
|
"vite": "^7.3.1",
|
|
55
67
|
"vite-plugin-dts": "^4.5.4",
|
|
56
68
|
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
57
|
-
},
|
|
58
|
-
"scripts": {
|
|
59
|
-
"dev": "vite",
|
|
60
|
-
"build": "pnpm run clean && pnpm run build:js",
|
|
61
|
-
"build:js": "vite build",
|
|
62
|
-
"lint": "eslint .",
|
|
63
|
-
"typecheck": "tsc --noEmit",
|
|
64
|
-
"clean": "rimraf dist",
|
|
65
|
-
"preview": "vite preview"
|
|
66
69
|
}
|
|
67
|
-
}
|
|
70
|
+
}
|