@stableflow/wallet-ton 3.0.0-beta-02a59f37a0-20260515
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 +30 -0
- package/dist/index.d.mts +55 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.js +1072 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1059 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @stableflow/wallet-ton
|
|
2
|
+
|
|
3
|
+
TON wallet adapter for the StableFlow SDK.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @stableflow/wallet-ton @stableflow/core @stableflow/bridges
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Peer dependencies:**
|
|
12
|
+
|
|
13
|
+
- `@ton/ton` ^16.2.4
|
|
14
|
+
- `@layerzerolabs/lz-ton-sdk-v2` ^3.0.168
|
|
15
|
+
- `@layerzerolabs/lz-v2-utilities` ^3.0.151
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
TON as source or destination in USDT0 and related LayerZero routes.
|
|
20
|
+
|
|
21
|
+
## Main exports
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import TonWallet, { TonWallet as Named } from '@stableflow/wallet-ton';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## See also
|
|
28
|
+
|
|
29
|
+
- [Developer Guide](../../DEVELOPER_GUIDE.md)
|
|
30
|
+
- [@stableflow/bridges](../bridges/README.md)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Address } from '@ton/ton';
|
|
2
|
+
import { Service, SendType } from '@stableflow/core';
|
|
3
|
+
|
|
4
|
+
declare class TonWallet {
|
|
5
|
+
private tonConnectUI;
|
|
6
|
+
private tonClient;
|
|
7
|
+
private account;
|
|
8
|
+
private csl;
|
|
9
|
+
constructor(options: {
|
|
10
|
+
tonConnectUI: any;
|
|
11
|
+
account: string;
|
|
12
|
+
});
|
|
13
|
+
private isNativeToken;
|
|
14
|
+
getSenderJettonWallet(masterAddress: string, account?: string): Promise<Address>;
|
|
15
|
+
transfer(data: {
|
|
16
|
+
originAsset: string;
|
|
17
|
+
depositAddress: string;
|
|
18
|
+
amount: string;
|
|
19
|
+
memo?: string;
|
|
20
|
+
}): Promise<any>;
|
|
21
|
+
getBalance(token: any, account: string, options?: {
|
|
22
|
+
isCatchError?: boolean;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
balanceOf(token: string, account: string, options?: {
|
|
25
|
+
isCatchError?: boolean;
|
|
26
|
+
}): Promise<string>;
|
|
27
|
+
estimateTransferGas(data: {
|
|
28
|
+
fromToken: any;
|
|
29
|
+
depositAddress: string;
|
|
30
|
+
amount: string;
|
|
31
|
+
account: string;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
gasLimit: bigint;
|
|
34
|
+
gasPrice: bigint;
|
|
35
|
+
estimateGas: bigint;
|
|
36
|
+
}>;
|
|
37
|
+
getEstimateGas(params: any): Promise<{
|
|
38
|
+
gasPrice: bigint;
|
|
39
|
+
usd: string;
|
|
40
|
+
wei: any;
|
|
41
|
+
amount: string;
|
|
42
|
+
}>;
|
|
43
|
+
estimateTransaction(params: any): Promise<{
|
|
44
|
+
estimateSourceGasLimit: any;
|
|
45
|
+
estimateSourceGas: any;
|
|
46
|
+
estimateSourceGasUsd: string;
|
|
47
|
+
}>;
|
|
48
|
+
quote(type: Service, params: any): Promise<any>;
|
|
49
|
+
send(type: SendType, params: any): Promise<any>;
|
|
50
|
+
sendTransaction(params: any): Promise<string>;
|
|
51
|
+
quoteOFT(params: any): Promise<any>;
|
|
52
|
+
quoteOneClickProxy(params: any): Promise<any>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { TonWallet, TonWallet as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Address } from '@ton/ton';
|
|
2
|
+
import { Service, SendType } from '@stableflow/core';
|
|
3
|
+
|
|
4
|
+
declare class TonWallet {
|
|
5
|
+
private tonConnectUI;
|
|
6
|
+
private tonClient;
|
|
7
|
+
private account;
|
|
8
|
+
private csl;
|
|
9
|
+
constructor(options: {
|
|
10
|
+
tonConnectUI: any;
|
|
11
|
+
account: string;
|
|
12
|
+
});
|
|
13
|
+
private isNativeToken;
|
|
14
|
+
getSenderJettonWallet(masterAddress: string, account?: string): Promise<Address>;
|
|
15
|
+
transfer(data: {
|
|
16
|
+
originAsset: string;
|
|
17
|
+
depositAddress: string;
|
|
18
|
+
amount: string;
|
|
19
|
+
memo?: string;
|
|
20
|
+
}): Promise<any>;
|
|
21
|
+
getBalance(token: any, account: string, options?: {
|
|
22
|
+
isCatchError?: boolean;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
balanceOf(token: string, account: string, options?: {
|
|
25
|
+
isCatchError?: boolean;
|
|
26
|
+
}): Promise<string>;
|
|
27
|
+
estimateTransferGas(data: {
|
|
28
|
+
fromToken: any;
|
|
29
|
+
depositAddress: string;
|
|
30
|
+
amount: string;
|
|
31
|
+
account: string;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
gasLimit: bigint;
|
|
34
|
+
gasPrice: bigint;
|
|
35
|
+
estimateGas: bigint;
|
|
36
|
+
}>;
|
|
37
|
+
getEstimateGas(params: any): Promise<{
|
|
38
|
+
gasPrice: bigint;
|
|
39
|
+
usd: string;
|
|
40
|
+
wei: any;
|
|
41
|
+
amount: string;
|
|
42
|
+
}>;
|
|
43
|
+
estimateTransaction(params: any): Promise<{
|
|
44
|
+
estimateSourceGasLimit: any;
|
|
45
|
+
estimateSourceGas: any;
|
|
46
|
+
estimateSourceGasUsd: string;
|
|
47
|
+
}>;
|
|
48
|
+
quote(type: Service, params: any): Promise<any>;
|
|
49
|
+
send(type: SendType, params: any): Promise<any>;
|
|
50
|
+
sendTransaction(params: any): Promise<string>;
|
|
51
|
+
quoteOFT(params: any): Promise<any>;
|
|
52
|
+
quoteOneClickProxy(params: any): Promise<any>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { TonWallet, TonWallet as default };
|