@antigane/wallet-adapters 0.0.13 → 0.1.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.
@@ -1,2 +1,3 @@
1
1
  export * from './metamask.ts';
2
2
  export * from './phantom.ts';
3
+ export * from './peridotwallet.ts';
@@ -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
- Login(message: string): Promise<SignState>;
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 +1,11 @@
1
- export {};
1
+ import { SignState } from '../types/sign';
2
+ import { Transaction } from '@solana/web3.js';
3
+ export declare class PeridotWallet {
4
+ private getProvider;
5
+ isPeridotWallet(): boolean;
6
+ login(message: string): Promise<SignState>;
7
+ signMessage(message: string): Promise<string>;
8
+ sendTransaction(tx: Transaction): Promise<{
9
+ signature: string;
10
+ }>;
11
+ }
@@ -1,37 +1,31 @@
1
1
  import { SignState } from '../types/sign';
2
- import { Abi } from 'viem';
2
+ import { Transaction } from '@solana/web3.js';
3
3
  export declare class Phantom {
4
4
  private getSdk;
5
5
  /**
6
- * Ensure wallet connected and return the active EVM address.
7
- */
8
- private requireEvmAddress;
6
+ * LOGIN (sign challenge)
7
+ */
8
+ login(message: string): Promise<SignState>;
9
9
  /**
10
- * Signs a login message via Phantom.
11
- * Note: returning Promise<SignState> is required because wallet calls are async.
12
- */
13
- Login(message: string): Promise<SignState>;
10
+ * GENERIC SIGN MESSAGE
11
+ */
12
+ signMessage(message: string): Promise<string>;
14
13
  /**
15
- * Generic EVM contract call via transaction:
16
- * - encodes ABI -> calldata
17
- * - sends transaction through Phantom
18
- *
19
- * Returns tx hash.
20
- */
21
- callContract(params: {
22
- contractAddress: string;
23
- abi: Abi;
24
- functionName: string;
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
- hash: string;
25
+ signature: string;
32
26
  }>;
33
27
  /**
34
- * Returns true if Phantom is installed (or detectable among injected providers).
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.13",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/antiganehq",
7
7
  "repository": {
@@ -34,6 +34,8 @@
34
34
  "dependencies": {
35
35
  "@metamask/sdk": "^0.34.0",
36
36
  "@phantom/browser-sdk": "^1.0.0",
37
+ "@solana/web3.js": "^1.98.4",
38
+ "bs58": "^6.0.0",
37
39
  "viem": "^2.44.1"
38
40
  },
39
41
  "devDependencies": {