@stableflow/wallet-aptos 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 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,28 @@
1
+ # @stableflow/wallet-aptos
2
+
3
+ Aptos wallet adapter for the StableFlow SDK.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @stableflow/wallet-aptos @stableflow/core @stableflow/bridges
9
+ ```
10
+
11
+ **Peer dependencies:**
12
+
13
+ - `@aptos-labs/ts-sdk` ^6.3.1
14
+
15
+ ## When to use
16
+
17
+ Aptos chain transfers and quotes in `BridgeSFA` flows.
18
+
19
+ ## Main exports
20
+
21
+ ```ts
22
+ import AptosWallet, { AptosWallet as Named } from '@stableflow/wallet-aptos';
23
+ ```
24
+
25
+ ## See also
26
+
27
+ - [Developer Guide](../../DEVELOPER_GUIDE.md)
28
+ - [@stableflow/bridges](../bridges/README.md)
@@ -0,0 +1,74 @@
1
+ import { Service, SendType } from '@stableflow/core';
2
+
3
+ declare class AptosWallet {
4
+ connection: any;
5
+ private account;
6
+ private aptos;
7
+ private signAndSubmitTransaction;
8
+ private csl;
9
+ constructor(options: {
10
+ account: any | null;
11
+ signAndSubmitTransaction: any;
12
+ });
13
+ transferAPT(to: string, amount: string): Promise<string>;
14
+ transferToken(contractAddress: string, to: string, amount: string): Promise<string>;
15
+ transfer(data: {
16
+ originAsset: string;
17
+ depositAddress: string;
18
+ amount: string;
19
+ }): Promise<string>;
20
+ getAPTBalance(account: string, options?: {
21
+ isCatchError?: boolean;
22
+ }): Promise<string>;
23
+ getTokenBalance(contractAddress: string, account: string, options?: {
24
+ isCatchError?: boolean;
25
+ }): Promise<string>;
26
+ getBalance(token: any, account: string, options?: {
27
+ isCatchError?: boolean;
28
+ }): Promise<string>;
29
+ balanceOf(token: any, account: string, options?: {
30
+ isCatchError?: boolean;
31
+ }): Promise<string>;
32
+ /**
33
+ * Estimate gas limit for transfer transaction
34
+ * @param data Transfer data
35
+ * @returns Gas limit estimate, gas price, and estimated gas cost
36
+ */
37
+ estimateTransferGas(data: {
38
+ fromToken: any;
39
+ depositAddress: string;
40
+ amount: string;
41
+ }): Promise<{
42
+ gasLimit: bigint;
43
+ gasPrice: bigint;
44
+ estimateGas: bigint;
45
+ }>;
46
+ getEstimateGas(params: any): Promise<{
47
+ gasPrice: any;
48
+ usd: string;
49
+ wei: bigint;
50
+ amount: string;
51
+ }>;
52
+ estimateTransaction(params: any): Promise<{
53
+ estimateSourceGasLimit: bigint;
54
+ estimateSourceGas: bigint;
55
+ estimateSourceGasUsd: string;
56
+ }>;
57
+ checkTransactionStatus(signature: string): Promise<boolean>;
58
+ quoteOneClickProxy(params: any): Promise<any>;
59
+ sendTransaction(params: any): Promise<any>;
60
+ /**
61
+ * Unified quote method that routes to specific quote methods based on type
62
+ * @param type Service type from Service
63
+ * @param params Parameters for the quote
64
+ */
65
+ quote(type: Service, params: any): Promise<any>;
66
+ /**
67
+ * Unified send method that routes to specific send methods based on type
68
+ * @param type Send type from SendTypeSENDm
69
+ * @param params Parameters for the send transaction
70
+ */
71
+ send(type: SendType, params: any): Promise<any>;
72
+ }
73
+
74
+ export { AptosWallet, AptosWallet as default };
@@ -0,0 +1,74 @@
1
+ import { Service, SendType } from '@stableflow/core';
2
+
3
+ declare class AptosWallet {
4
+ connection: any;
5
+ private account;
6
+ private aptos;
7
+ private signAndSubmitTransaction;
8
+ private csl;
9
+ constructor(options: {
10
+ account: any | null;
11
+ signAndSubmitTransaction: any;
12
+ });
13
+ transferAPT(to: string, amount: string): Promise<string>;
14
+ transferToken(contractAddress: string, to: string, amount: string): Promise<string>;
15
+ transfer(data: {
16
+ originAsset: string;
17
+ depositAddress: string;
18
+ amount: string;
19
+ }): Promise<string>;
20
+ getAPTBalance(account: string, options?: {
21
+ isCatchError?: boolean;
22
+ }): Promise<string>;
23
+ getTokenBalance(contractAddress: string, account: string, options?: {
24
+ isCatchError?: boolean;
25
+ }): Promise<string>;
26
+ getBalance(token: any, account: string, options?: {
27
+ isCatchError?: boolean;
28
+ }): Promise<string>;
29
+ balanceOf(token: any, account: string, options?: {
30
+ isCatchError?: boolean;
31
+ }): Promise<string>;
32
+ /**
33
+ * Estimate gas limit for transfer transaction
34
+ * @param data Transfer data
35
+ * @returns Gas limit estimate, gas price, and estimated gas cost
36
+ */
37
+ estimateTransferGas(data: {
38
+ fromToken: any;
39
+ depositAddress: string;
40
+ amount: string;
41
+ }): Promise<{
42
+ gasLimit: bigint;
43
+ gasPrice: bigint;
44
+ estimateGas: bigint;
45
+ }>;
46
+ getEstimateGas(params: any): Promise<{
47
+ gasPrice: any;
48
+ usd: string;
49
+ wei: bigint;
50
+ amount: string;
51
+ }>;
52
+ estimateTransaction(params: any): Promise<{
53
+ estimateSourceGasLimit: bigint;
54
+ estimateSourceGas: bigint;
55
+ estimateSourceGasUsd: string;
56
+ }>;
57
+ checkTransactionStatus(signature: string): Promise<boolean>;
58
+ quoteOneClickProxy(params: any): Promise<any>;
59
+ sendTransaction(params: any): Promise<any>;
60
+ /**
61
+ * Unified quote method that routes to specific quote methods based on type
62
+ * @param type Service type from Service
63
+ * @param params Parameters for the quote
64
+ */
65
+ quote(type: Service, params: any): Promise<any>;
66
+ /**
67
+ * Unified send method that routes to specific send methods based on type
68
+ * @param type Send type from SendTypeSENDm
69
+ * @param params Parameters for the send transaction
70
+ */
71
+ send(type: SendType, params: any): Promise<any>;
72
+ }
73
+
74
+ export { AptosWallet, AptosWallet as default };