@stableflow/wallet-solana 0.0.0-experimental-5a8afd7389-20260703
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/LICENSE +21 -0
- package/README.md +34 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +1447 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1438 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 StableFlow AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @stableflow/wallet-solana
|
|
2
|
+
|
|
3
|
+
Solana wallet adapter for the StableFlow SDK.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @stableflow/wallet-solana @stableflow/core @stableflow/bridges
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Peer dependencies:**
|
|
12
|
+
|
|
13
|
+
- `@solana/web3.js` ^1.98.4
|
|
14
|
+
- `@solana/spl-token` ^0.4.14
|
|
15
|
+
- `@layerzerolabs/lz-v2-utilities` ^3.0.151
|
|
16
|
+
- `@layerzerolabs/lz-solana-sdk-v2` ^3.0.154
|
|
17
|
+
- `@layerzerolabs/oft-v2-solana-sdk` ^3.0.168
|
|
18
|
+
- `@coral-xyz/anchor` ^0.29.0
|
|
19
|
+
- `@metaplex-foundation/umi` ^1.5.1 (and related Metaplex packages — see `package.json`)
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
Solana as source or destination chain in `BridgeSFA` flows. Pass the adapter’s `wallet` (`WalletConfig`) into quote and send calls.
|
|
24
|
+
|
|
25
|
+
## Main exports
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import SolanaWallet, { SolanaWallet as Named } from '@stableflow/wallet-solana';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## See also
|
|
32
|
+
|
|
33
|
+
- [Developer Guide](../../DEVELOPER_GUIDE.md)
|
|
34
|
+
- [@stableflow/bridges](../bridges/README.md)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
|
+
import { PublicKey, Connection } from '@solana/web3.js';
|
|
3
|
+
import { Service, SendType } from '@stableflow/core';
|
|
4
|
+
|
|
5
|
+
declare class SolanaWallet {
|
|
6
|
+
private publicKey;
|
|
7
|
+
private signTransaction;
|
|
8
|
+
private signer;
|
|
9
|
+
private csl;
|
|
10
|
+
constructor(options: {
|
|
11
|
+
publicKey: PublicKey | null;
|
|
12
|
+
signer: any;
|
|
13
|
+
});
|
|
14
|
+
getConnection(): Connection;
|
|
15
|
+
transferSOL(to: string, amount: string): Promise<string>;
|
|
16
|
+
transferToken(tokenMint: string, to: string, amount: string): Promise<string>;
|
|
17
|
+
transfer(data: {
|
|
18
|
+
originAsset: string;
|
|
19
|
+
depositAddress: string;
|
|
20
|
+
amount: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
getSOLBalance(account: string, options?: {
|
|
23
|
+
isCatchError?: boolean;
|
|
24
|
+
}): Promise<number | "0">;
|
|
25
|
+
getTokenBalance(tokenMint: string, account: string, options?: {
|
|
26
|
+
isCatchError?: boolean;
|
|
27
|
+
}): Promise<bigint | "0">;
|
|
28
|
+
getBalance(token: any, account: string, options?: {
|
|
29
|
+
isCatchError?: boolean;
|
|
30
|
+
}): Promise<number | bigint | "0">;
|
|
31
|
+
balanceOf(token: any, account: string, options?: {
|
|
32
|
+
isCatchError?: boolean;
|
|
33
|
+
}): Promise<number | bigint | "0">;
|
|
34
|
+
/**
|
|
35
|
+
* Estimate gas limit for transfer transaction
|
|
36
|
+
* @param data Transfer data
|
|
37
|
+
* @returns Gas limit estimate, gas price, and estimated gas cost
|
|
38
|
+
*/
|
|
39
|
+
estimateTransferGas(data: {
|
|
40
|
+
fromToken: any;
|
|
41
|
+
depositAddress: string;
|
|
42
|
+
amount: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
gasLimit: bigint;
|
|
45
|
+
gasPrice: bigint;
|
|
46
|
+
estimateGas: bigint;
|
|
47
|
+
}>;
|
|
48
|
+
getEstimateGas(params: any): Promise<{
|
|
49
|
+
gasPrice: bigint;
|
|
50
|
+
usd: string;
|
|
51
|
+
wei: bigint;
|
|
52
|
+
amount: string;
|
|
53
|
+
}>;
|
|
54
|
+
estimateTransaction(params: any): Promise<{
|
|
55
|
+
estimateSourceGasLimit: bigint;
|
|
56
|
+
estimateSourceGas: bigint;
|
|
57
|
+
estimateSourceGasUsd: string;
|
|
58
|
+
}>;
|
|
59
|
+
checkTransactionStatus(signature: string): Promise<boolean>;
|
|
60
|
+
simulateIx(ix: any): Promise<_solana_web3_js.SimulatedTransactionResponse>;
|
|
61
|
+
quoteOFT(params: any): Promise<any>;
|
|
62
|
+
sendTransaction(params: any): Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Unified quote method that routes to specific quote methods based on type
|
|
65
|
+
* @param type Service type from Service
|
|
66
|
+
* @param params Parameters for the quote
|
|
67
|
+
*/
|
|
68
|
+
quote(type: Service, params: any): Promise<any>;
|
|
69
|
+
/**
|
|
70
|
+
* Unified send method that routes to specific send methods based on type
|
|
71
|
+
* @param type Send type from SendType enum
|
|
72
|
+
* @param params Parameters for the send transaction
|
|
73
|
+
*/
|
|
74
|
+
send(type: SendType, params: any): Promise<string>;
|
|
75
|
+
quoteOneClickProxy(params: any): Promise<any>;
|
|
76
|
+
quoteCCTP(params: any): Promise<any>;
|
|
77
|
+
createAssociatedTokenAddress(params: any): Promise<PublicKey>;
|
|
78
|
+
quoteFraxZero(params: any): Promise<any>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { SolanaWallet, SolanaWallet as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
|
+
import { PublicKey, Connection } from '@solana/web3.js';
|
|
3
|
+
import { Service, SendType } from '@stableflow/core';
|
|
4
|
+
|
|
5
|
+
declare class SolanaWallet {
|
|
6
|
+
private publicKey;
|
|
7
|
+
private signTransaction;
|
|
8
|
+
private signer;
|
|
9
|
+
private csl;
|
|
10
|
+
constructor(options: {
|
|
11
|
+
publicKey: PublicKey | null;
|
|
12
|
+
signer: any;
|
|
13
|
+
});
|
|
14
|
+
getConnection(): Connection;
|
|
15
|
+
transferSOL(to: string, amount: string): Promise<string>;
|
|
16
|
+
transferToken(tokenMint: string, to: string, amount: string): Promise<string>;
|
|
17
|
+
transfer(data: {
|
|
18
|
+
originAsset: string;
|
|
19
|
+
depositAddress: string;
|
|
20
|
+
amount: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
getSOLBalance(account: string, options?: {
|
|
23
|
+
isCatchError?: boolean;
|
|
24
|
+
}): Promise<number | "0">;
|
|
25
|
+
getTokenBalance(tokenMint: string, account: string, options?: {
|
|
26
|
+
isCatchError?: boolean;
|
|
27
|
+
}): Promise<bigint | "0">;
|
|
28
|
+
getBalance(token: any, account: string, options?: {
|
|
29
|
+
isCatchError?: boolean;
|
|
30
|
+
}): Promise<number | bigint | "0">;
|
|
31
|
+
balanceOf(token: any, account: string, options?: {
|
|
32
|
+
isCatchError?: boolean;
|
|
33
|
+
}): Promise<number | bigint | "0">;
|
|
34
|
+
/**
|
|
35
|
+
* Estimate gas limit for transfer transaction
|
|
36
|
+
* @param data Transfer data
|
|
37
|
+
* @returns Gas limit estimate, gas price, and estimated gas cost
|
|
38
|
+
*/
|
|
39
|
+
estimateTransferGas(data: {
|
|
40
|
+
fromToken: any;
|
|
41
|
+
depositAddress: string;
|
|
42
|
+
amount: string;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
gasLimit: bigint;
|
|
45
|
+
gasPrice: bigint;
|
|
46
|
+
estimateGas: bigint;
|
|
47
|
+
}>;
|
|
48
|
+
getEstimateGas(params: any): Promise<{
|
|
49
|
+
gasPrice: bigint;
|
|
50
|
+
usd: string;
|
|
51
|
+
wei: bigint;
|
|
52
|
+
amount: string;
|
|
53
|
+
}>;
|
|
54
|
+
estimateTransaction(params: any): Promise<{
|
|
55
|
+
estimateSourceGasLimit: bigint;
|
|
56
|
+
estimateSourceGas: bigint;
|
|
57
|
+
estimateSourceGasUsd: string;
|
|
58
|
+
}>;
|
|
59
|
+
checkTransactionStatus(signature: string): Promise<boolean>;
|
|
60
|
+
simulateIx(ix: any): Promise<_solana_web3_js.SimulatedTransactionResponse>;
|
|
61
|
+
quoteOFT(params: any): Promise<any>;
|
|
62
|
+
sendTransaction(params: any): Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Unified quote method that routes to specific quote methods based on type
|
|
65
|
+
* @param type Service type from Service
|
|
66
|
+
* @param params Parameters for the quote
|
|
67
|
+
*/
|
|
68
|
+
quote(type: Service, params: any): Promise<any>;
|
|
69
|
+
/**
|
|
70
|
+
* Unified send method that routes to specific send methods based on type
|
|
71
|
+
* @param type Send type from SendType enum
|
|
72
|
+
* @param params Parameters for the send transaction
|
|
73
|
+
*/
|
|
74
|
+
send(type: SendType, params: any): Promise<string>;
|
|
75
|
+
quoteOneClickProxy(params: any): Promise<any>;
|
|
76
|
+
quoteCCTP(params: any): Promise<any>;
|
|
77
|
+
createAssociatedTokenAddress(params: any): Promise<PublicKey>;
|
|
78
|
+
quoteFraxZero(params: any): Promise<any>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { SolanaWallet, SolanaWallet as default };
|