@affluent-org/sdk 0.0.2 → 0.0.3
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/build/Account.compiled.json +1 -0
- package/dist/build/Receipt.compiled.json +1 -0
- package/dist/build/WTONWallet.compiled.json +1 -0
- package/dist/common/cache.d.ts +16 -0
- package/dist/common/cache.js +96 -0
- package/dist/common/service.d.ts +20 -0
- package/dist/common/service.js +69 -0
- package/dist/common/type.d.ts +14 -0
- package/dist/common/type.js +2 -0
- package/dist/common/unknown-contract.d.ts +14 -0
- package/dist/common/unknown-contract.js +18 -0
- package/dist/common/versions.d.ts +14 -0
- package/dist/common/versions.js +22 -0
- package/dist/constants/pool.d.ts +1 -0
- package/dist/constants/pool.js +2 -0
- package/dist/contracts/_mock/simple-oracle.d.ts +34 -0
- package/dist/contracts/_mock/simple-oracle.js +73 -0
- package/dist/contracts/vault/share-vault/type.d.ts +30 -0
- package/dist/contracts/vault/share-vault/type.js +2 -0
- package/dist/contracts/vault/strategy-vault/utils.d.ts +6 -0
- package/dist/contracts/vault/strategy-vault/utils.js +32 -0
- package/dist/factorial.d.ts +14 -0
- package/dist/factorial.js +20 -0
- package/dist/farm.d.ts +92 -0
- package/dist/farm.js +209 -0
- package/dist/monitor.d.ts +57 -0
- package/dist/monitor.js +527 -0
- package/dist/monitorCacheV1.d.ts +52 -0
- package/dist/monitorCacheV1.js +504 -0
- package/dist/oracle/oracle-v2.d.ts +39 -0
- package/dist/oracle/oracle-v2.js +151 -0
- package/dist/oracle/oracle.d.ts +107 -0
- package/dist/oracle/oracle.js +392 -0
- package/dist/periphery.d.ts +259 -0
- package/dist/periphery.js +1087 -0
- package/dist/pool.d.ts +216 -0
- package/dist/pool.js +2298 -0
- package/dist/poolCacheV1.d.ts +139 -0
- package/dist/poolCacheV1.js +1841 -0
- package/dist/rfq-auction.d.ts +75 -0
- package/dist/rfq-auction.js +220 -0
- package/dist/rfq-batch.d.ts +112 -0
- package/dist/rfq-batch.js +284 -0
- package/dist/services/share-vault/computation.d.ts +14 -17
- package/dist/services/share-vault/computation.js +39 -0
- package/dist/services/share-vault/index.js +6 -3
- package/dist/services/share-vault/query.d.ts +38 -8
- package/dist/services/share-vault/query.js +20 -27
- package/dist/services/share-vault/type.d.ts +19 -0
- package/dist/services/share-vault/type.js +2 -0
- package/dist/services/share-vault/user/index.js +3 -1
- package/dist/services/strategy-vault/computation.d.ts +1 -0
- package/dist/services/strategy-vault/computation.js +15 -0
- package/dist/services/strategy-vault/query.d.ts +147 -0
- package/dist/services/strategy-vault/query.js +67 -0
- package/dist/services/strategy-vault/type.d.ts +2 -0
- package/dist/services/strategy-vault/type.js +2 -0
- package/dist/share-vault.d.ts +91 -0
- package/dist/share-vault.js +747 -0
- package/dist/stonfi.d.ts +18 -0
- package/dist/stonfi.js +76 -0
- package/dist/strategy_vault/base.d.ts +399 -0
- package/dist/strategy_vault/base.js +1199 -0
- package/dist/strategy_vault/index.d.ts +3 -0
- package/dist/strategy_vault/index.js +7 -0
- package/dist/strategy_vault/steps.d.ts +49 -0
- package/dist/strategy_vault/steps.js +170 -0
- package/dist/types/action.d.ts +55 -0
- package/dist/types/action.js +2 -0
- package/dist/types/messages.d.ts +7 -0
- package/dist/types/messages.js +2 -0
- package/dist/types/params.d.ts +19 -0
- package/dist/types/params.js +2 -0
- package/dist/types/pool.d.ts +83 -0
- package/dist/types/pool.js +2 -0
- package/dist/types/transaction.d.ts +40 -0
- package/dist/types/transaction.js +2 -0
- package/dist/utils/_parse_temp/JumpIRM.d.ts +37 -0
- package/dist/utils/_parse_temp/JumpIRM.js +71 -0
- package/dist/utils/_parse_temp/Pool.d.ts +559 -0
- package/dist/utils/_parse_temp/Pool.js +1023 -0
- package/dist/utils/_parse_temp/ShareVault.d.ts +264 -0
- package/dist/utils/_parse_temp/ShareVault.js +479 -0
- package/dist/utils/_parse_temp/StrategyVault.d.ts +729 -0
- package/dist/utils/_parse_temp/StrategyVault.js +1865 -0
- package/dist/utils/_parse_temp/parseMsgBody.d.ts +13 -0
- package/dist/utils/_parse_temp/parseMsgBody.js +313 -0
- package/dist/utils/assert.d.ts +1 -0
- package/dist/utils/assert.js +9 -0
- package/dist/utils/client-for-parameter.d.ts +12 -0
- package/dist/utils/client-for-parameter.js +97 -0
- package/dist/utils/oracle/index.d.ts +4 -0
- package/dist/utils/oracle/index.js +19 -0
- package/dist/utils/oracle/redstone/helper.d.ts +22 -0
- package/dist/utils/oracle/redstone/helper.js +186 -0
- package/dist/utils/tracer.d.ts +13 -0
- package/dist/utils/tracer.js +137 -0
- package/dist/utils/tracker/index.d.ts +5 -0
- package/dist/utils/tracker/index.js +118 -0
- package/dist/utils/tracker/query-id-generactor.d.ts +2 -0
- package/dist/utils/tracker/query-id-generactor.js +12 -0
- package/dist/utils/tracker/type.d.ts +34 -0
- package/dist/utils/tracker/type.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { Address, Cell, Sender, TonClient } from "@ton/ton";
|
|
2
|
+
import { TxStep, TxCallBackFn } from "./utils/tracker/type";
|
|
3
|
+
import { MultiSender } from "./types/sender";
|
|
4
|
+
export declare class PeripheryV1 {
|
|
5
|
+
client: TonClient;
|
|
6
|
+
contracts: Record<string, string>;
|
|
7
|
+
private walletAddresses;
|
|
8
|
+
constructor(client: TonClient, network: "testnet" | "mainnet" | "custom", custom_contracts?: Record<string, string>);
|
|
9
|
+
private getJettonWalletAddress;
|
|
10
|
+
deployWallet(sender: Sender, tokenAddress: Address | string, targetAddress: Address | string, gas?: bigint): Promise<void>;
|
|
11
|
+
deployWLPWalletAndWaitTx(sender: Sender, params: {
|
|
12
|
+
senderAddress: Address | string;
|
|
13
|
+
tokenAddress: Address | string;
|
|
14
|
+
targetAddress: Address | string;
|
|
15
|
+
gas?: bigint;
|
|
16
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
17
|
+
initializeLFWallet(sender: Sender, lfTokenAddress: Address | string, targetAddress: Address | string): Promise<void>;
|
|
18
|
+
deployWLPWalletAndWaitTx2(sender: MultiSender, params: {
|
|
19
|
+
senderAddress: Address | string;
|
|
20
|
+
tokenAddress: Address | string;
|
|
21
|
+
targetAddress: Address | string;
|
|
22
|
+
gas?: bigint;
|
|
23
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
24
|
+
seize(sender: Sender, senderAddress: Address | string, lfTokenAddress: Address | string, targetAddress: Address | string, responseAddress: Address | string, amount: bigint, gas?: bigint): Promise<void>;
|
|
25
|
+
wrapDedustLPAndWaitTx(sender: Sender, params: {
|
|
26
|
+
senderAddress: Address | string;
|
|
27
|
+
wlpTokenAddress: Address | string;
|
|
28
|
+
responseAddress: Address | string;
|
|
29
|
+
amount: bigint;
|
|
30
|
+
gas?: bigint;
|
|
31
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
32
|
+
wrapStonfiLPAndWaitTx(sender: Sender, params: {
|
|
33
|
+
senderAddress: Address | string;
|
|
34
|
+
wlpTokenAddress: Address | string;
|
|
35
|
+
responseAddress: Address | string;
|
|
36
|
+
amount: bigint;
|
|
37
|
+
gas?: bigint;
|
|
38
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
39
|
+
unwrapDedustWLPAndWaitTx(sender: Sender, params: {
|
|
40
|
+
senderAddress: Address | string;
|
|
41
|
+
wlpTokenAddress: Address | string;
|
|
42
|
+
recipientAddress: Address | string;
|
|
43
|
+
responseAddress: Address | string;
|
|
44
|
+
amount: bigint;
|
|
45
|
+
gas?: bigint;
|
|
46
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
47
|
+
unwrapStonfiWLPAndWaitTx(sender: Sender, params: {
|
|
48
|
+
senderAddress: Address | string;
|
|
49
|
+
wlpTokenAddress: Address | string;
|
|
50
|
+
recipientAddress: Address | string;
|
|
51
|
+
responseAddress: Address | string;
|
|
52
|
+
amount: bigint;
|
|
53
|
+
gas?: bigint;
|
|
54
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
55
|
+
seizeDedustLPAndWaitTx(sender: Sender, params: {
|
|
56
|
+
senderAddress: Address | string;
|
|
57
|
+
wlpTokenAddress: Address | string;
|
|
58
|
+
targetAddress: Address | string;
|
|
59
|
+
responseAddress: Address | string;
|
|
60
|
+
amount: bigint;
|
|
61
|
+
gas?: bigint;
|
|
62
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
63
|
+
seizeStonfiLPAndWaitTx(sender: Sender, params: {
|
|
64
|
+
senderAddress: Address | string;
|
|
65
|
+
wlpTokenAddress: Address | string;
|
|
66
|
+
targetAddress: Address | string;
|
|
67
|
+
responseAddress: Address | string;
|
|
68
|
+
amount: bigint;
|
|
69
|
+
gas?: bigint;
|
|
70
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
71
|
+
syncStonfiWLPAndWaitTx(sender: Sender, params: {
|
|
72
|
+
senderAddress: Address | string;
|
|
73
|
+
wlpTokenAddress: Address | string;
|
|
74
|
+
targetAddress: Address | string;
|
|
75
|
+
gas?: bigint;
|
|
76
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
77
|
+
isSeizableDedustLP(params: {
|
|
78
|
+
senderAddress?: Address | string;
|
|
79
|
+
wlpTokenAddress: Address | string;
|
|
80
|
+
targetAddress: Address | string;
|
|
81
|
+
responseAddress: Address | string;
|
|
82
|
+
amount: bigint;
|
|
83
|
+
gas?: bigint;
|
|
84
|
+
}): Promise<{
|
|
85
|
+
seizable: boolean;
|
|
86
|
+
errorType: number;
|
|
87
|
+
message: string;
|
|
88
|
+
wlpBalance?: undefined;
|
|
89
|
+
lockedAssetBalance?: undefined;
|
|
90
|
+
seizableAmount?: undefined;
|
|
91
|
+
} | {
|
|
92
|
+
seizable: boolean;
|
|
93
|
+
errorType: number;
|
|
94
|
+
message: string;
|
|
95
|
+
wlpBalance: bigint;
|
|
96
|
+
lockedAssetBalance: bigint;
|
|
97
|
+
seizableAmount?: undefined;
|
|
98
|
+
} | {
|
|
99
|
+
seizable: boolean;
|
|
100
|
+
wlpBalance: bigint;
|
|
101
|
+
lockedAssetBalance: bigint;
|
|
102
|
+
seizableAmount: bigint;
|
|
103
|
+
errorType?: undefined;
|
|
104
|
+
message?: undefined;
|
|
105
|
+
}>;
|
|
106
|
+
isSeizableStonfiLP(params: {
|
|
107
|
+
senderAddress?: Address | string;
|
|
108
|
+
wlpTokenAddress: Address | string;
|
|
109
|
+
targetAddress: Address | string;
|
|
110
|
+
responseAddress: Address | string;
|
|
111
|
+
amount: bigint;
|
|
112
|
+
gas?: bigint;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
seizable: boolean;
|
|
115
|
+
errorType: number;
|
|
116
|
+
wlpBalance: bigint;
|
|
117
|
+
message: string;
|
|
118
|
+
lockedAssetBalance: bigint;
|
|
119
|
+
lockedAssetCash: bigint;
|
|
120
|
+
} | {
|
|
121
|
+
seizable: boolean;
|
|
122
|
+
errorType: number;
|
|
123
|
+
message: string;
|
|
124
|
+
balance: bigint;
|
|
125
|
+
wlpBalance?: undefined;
|
|
126
|
+
lockedAssetBalance?: undefined;
|
|
127
|
+
seizableAmount?: undefined;
|
|
128
|
+
} | {
|
|
129
|
+
seizable: boolean;
|
|
130
|
+
errorType: number;
|
|
131
|
+
message: string;
|
|
132
|
+
wlpBalance: bigint;
|
|
133
|
+
lockedAssetBalance: bigint;
|
|
134
|
+
balance?: undefined;
|
|
135
|
+
seizableAmount?: undefined;
|
|
136
|
+
} | {
|
|
137
|
+
seizable: boolean;
|
|
138
|
+
wlpBalance: bigint;
|
|
139
|
+
lockedAssetBalance: bigint;
|
|
140
|
+
seizableAmount: bigint;
|
|
141
|
+
errorType?: undefined;
|
|
142
|
+
message?: undefined;
|
|
143
|
+
balance?: undefined;
|
|
144
|
+
}>;
|
|
145
|
+
farmStonfiWLPAndWaitTx(sender: Sender, params: {
|
|
146
|
+
senderAddress: Address | string;
|
|
147
|
+
wlpTokenAddress: Address | string;
|
|
148
|
+
responseAddress: Address | string;
|
|
149
|
+
amount: bigint;
|
|
150
|
+
gas?: bigint;
|
|
151
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
152
|
+
unfarmStonfiWLPAndWaitTx(sender: Sender, params: {
|
|
153
|
+
senderAddress: Address | string;
|
|
154
|
+
targetAddress: Address | string;
|
|
155
|
+
wlpTokenAddress: Address | string;
|
|
156
|
+
nftAddress: Address | string;
|
|
157
|
+
gas?: bigint;
|
|
158
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
159
|
+
getStonfiWLPFarmedNfts(params: {
|
|
160
|
+
wlpTokenAddress: Address | string;
|
|
161
|
+
targetAddress: Address | string;
|
|
162
|
+
}): Promise<void>;
|
|
163
|
+
lock(sender: Sender, senderAddress: Address | string, lpTokenAddress: Address | string, lfTokenAddress: Address | string, amount: bigint, gas?: bigint): Promise<void>;
|
|
164
|
+
withdrawTons(sender: Sender, senderAddress: Address | string, wlpAddress: Address | string): Promise<void>;
|
|
165
|
+
withdrawTonAndWaitTx(sender: Sender, params: {
|
|
166
|
+
senderAddress: Address | string;
|
|
167
|
+
wlpAddress: Address | string;
|
|
168
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
169
|
+
withdrawJettons(sender: Sender, senderAddress: Address | string, wlpAddress: Address | string, assetAddress: Address | string, amount: bigint): Promise<void>;
|
|
170
|
+
withdrawJettonAndWaitTx(sender: Sender, params: {
|
|
171
|
+
senderAddress: Address | string;
|
|
172
|
+
wlpAddress: Address | string;
|
|
173
|
+
assetAddress: Address | string;
|
|
174
|
+
amount: bigint;
|
|
175
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
176
|
+
getStonfiLFData(lfTokenAddress: Address | string, targetAddress: Address | string): Promise<{
|
|
177
|
+
deployed: boolean;
|
|
178
|
+
balance: bigint;
|
|
179
|
+
lockedAssetBalance: bigint;
|
|
180
|
+
lockedAssetCash: bigint;
|
|
181
|
+
lockedAssetCashBeforeSync: bigint;
|
|
182
|
+
jettonAddress: Address;
|
|
183
|
+
assetWalletAddress: Address | null;
|
|
184
|
+
poolAccountAddress: Address | null;
|
|
185
|
+
connectedWithPoolAccount: boolean;
|
|
186
|
+
ownerAddress: Address;
|
|
187
|
+
assetAddress: Address;
|
|
188
|
+
poolAddress: Address;
|
|
189
|
+
} | {
|
|
190
|
+
deployed: boolean;
|
|
191
|
+
balance: bigint;
|
|
192
|
+
lockedAssetBalance: bigint;
|
|
193
|
+
lockedAssetCash: bigint;
|
|
194
|
+
lockedAssetCashBeforeSync: bigint;
|
|
195
|
+
jettonAddress?: undefined;
|
|
196
|
+
assetWalletAddress?: undefined;
|
|
197
|
+
poolAccountAddress?: undefined;
|
|
198
|
+
connectedWithPoolAccount?: undefined;
|
|
199
|
+
ownerAddress?: undefined;
|
|
200
|
+
assetAddress?: undefined;
|
|
201
|
+
poolAddress?: undefined;
|
|
202
|
+
}>;
|
|
203
|
+
getDedustLFData(lfTokenAddress: Address | string, targetAddress: Address | string): Promise<{
|
|
204
|
+
deployed: boolean;
|
|
205
|
+
balance: bigint;
|
|
206
|
+
lockedAssetBalance: bigint;
|
|
207
|
+
jettonAddress: Address;
|
|
208
|
+
assetWalletAddress: Address | null;
|
|
209
|
+
poolAccountAddress: Address | null;
|
|
210
|
+
connectedWithPoolAccount: boolean;
|
|
211
|
+
ownerAddress: Address;
|
|
212
|
+
assetAddress: Address;
|
|
213
|
+
poolAddress: Address;
|
|
214
|
+
} | {
|
|
215
|
+
deployed: boolean;
|
|
216
|
+
balance: bigint;
|
|
217
|
+
lockedAssetBalance: bigint;
|
|
218
|
+
jettonAddress?: undefined;
|
|
219
|
+
assetWalletAddress?: undefined;
|
|
220
|
+
poolAccountAddress?: undefined;
|
|
221
|
+
connectedWithPoolAccount?: undefined;
|
|
222
|
+
ownerAddress?: undefined;
|
|
223
|
+
assetAddress?: undefined;
|
|
224
|
+
poolAddress?: undefined;
|
|
225
|
+
}>;
|
|
226
|
+
dedustUnlock(sender: Sender, senderAddress: Address | string, lfTokenAddress: Address | string, amount: bigint, gas?: bigint): Promise<void>;
|
|
227
|
+
stonfiUnlock(sender: Sender, senderAddress: Address | string, lfTokenAddress: Address | string, amount: bigint, gas?: bigint): Promise<void>;
|
|
228
|
+
claimDedustRewardAndWaitTx(sender: Sender, params: {
|
|
229
|
+
senderAddress: Address | string;
|
|
230
|
+
wlpTokenAddress: Address | string;
|
|
231
|
+
rewardAssetAddress: Address | string;
|
|
232
|
+
distributorAddress: Address | string;
|
|
233
|
+
proof: Cell;
|
|
234
|
+
gas?: bigint;
|
|
235
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
236
|
+
dedustClaimReward(sender: Sender, senderAddress: Address | string, lfTokenAddress: Address | string, distributorAddress: Address | string, proof: Cell, gas?: bigint): Promise<void>;
|
|
237
|
+
claimStonfiRewardAndWaitTx(sender: Sender, params: {
|
|
238
|
+
senderAddress: Address | string;
|
|
239
|
+
wlpTokenAddress: Address | string;
|
|
240
|
+
nftAddress: Address | string;
|
|
241
|
+
gas?: bigint;
|
|
242
|
+
}, callbackFn?: TxCallBackFn): Promise<TxStep[]>;
|
|
243
|
+
stonfiClaimReward(sender: Sender, senderAddress: Address | string, lfTokenAddress: Address | string, nftAddress: Address | string, gas?: bigint): Promise<void>;
|
|
244
|
+
stonfiFarm(sender: Sender, senderAddress: Address | string, lfTokenAddress: Address | string, amount: bigint, gas?: bigint): Promise<void>;
|
|
245
|
+
stonfiUnfarm(sender: Sender, targetAddress: Address | string, lfTokenAddress: Address | string, nftAddress: Address | string, gas?: bigint): Promise<void>;
|
|
246
|
+
findAndCallback(target: Address, step: TxStep, createdLt: string | bigint, callbackFn?: TxCallBackFn): Promise<import("./utils/tracker/type").MatchedTxResult>;
|
|
247
|
+
stonfiSync(sender: Sender, targetAddress: Address | string, lfTokenAddress: Address | string, gas?: bigint): Promise<void>;
|
|
248
|
+
connectToPoolAccount(sender: Sender, targetAddress: Address | string, lfTokenAddress: Address | string, gas?: bigint): Promise<void>;
|
|
249
|
+
getStonfiFarmingData(nftAddress: string | Address): Promise<{
|
|
250
|
+
address: string | Address;
|
|
251
|
+
status: number;
|
|
252
|
+
statusString: string;
|
|
253
|
+
itemIndex: bigint;
|
|
254
|
+
stakedTokens: bigint;
|
|
255
|
+
stakedDate: bigint;
|
|
256
|
+
claimedPerUnitDict: Cell;
|
|
257
|
+
ownerAddress: Address;
|
|
258
|
+
}>;
|
|
259
|
+
}
|