@affluent-org/sdk 0.0.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.
- package/.prettierrc +11 -0
- package/Refactoring.md +548 -0
- package/dist/_compiled/Account.compiled.json +1 -0
- package/dist/_compiled/Receipt.compiled.json +1 -0
- package/dist/_compiled/WTONWallet.compiled.json +1 -0
- package/dist/_compiled/index.d.ts +4 -0
- package/dist/_compiled/index.js +12 -0
- package/dist/affluent.d.ts +14 -0
- package/dist/affluent.js +20 -0
- package/dist/constants/constants.d.ts +2 -0
- package/dist/constants/constants.js +5 -0
- package/dist/constants/contracts.d.ts +9 -0
- package/dist/constants/contracts.js +18 -0
- package/dist/context.d.ts +43 -0
- package/dist/context.js +90 -0
- package/dist/contracts/common/type.d.ts +16 -0
- package/dist/contracts/common/type.js +2 -0
- package/dist/contracts/common/utils.d.ts +3 -0
- package/dist/contracts/common/utils.js +16 -0
- package/dist/contracts/core/account/index.d.ts +38 -0
- package/dist/contracts/core/account/index.js +128 -0
- package/dist/contracts/core/account/type.d.ts +18 -0
- package/dist/contracts/core/account/type.js +2 -0
- package/dist/contracts/core/pool/index.d.ts +149 -0
- package/dist/contracts/core/pool/index.js +379 -0
- package/dist/contracts/core/pool/serializer.d.ts +15 -0
- package/dist/contracts/core/pool/serializer.js +307 -0
- package/dist/contracts/core/pool/type.d.ts +136 -0
- package/dist/contracts/core/pool/type.js +2 -0
- package/dist/contracts/dedust-farm/MockDedustFarm.d.ts +41 -0
- package/dist/contracts/dedust-farm/MockDedustFarm.js +79 -0
- package/dist/contracts/external/tonstaker.d.ts +18 -0
- package/dist/contracts/external/tonstaker.js +26 -0
- package/dist/contracts/factory/factory.d.ts +24 -0
- package/dist/contracts/factory/factory.js +58 -0
- package/dist/contracts/factory/type.d.ts +11 -0
- package/dist/contracts/factory/type.js +2 -0
- package/dist/contracts/farm/distributor.d.ts +43 -0
- package/dist/contracts/farm/distributor.js +83 -0
- package/dist/contracts/farm/receipt.d.ts +40 -0
- package/dist/contracts/farm/receipt.js +68 -0
- package/dist/contracts/irm/jump-irm/serializer.d.ts +4 -0
- package/dist/contracts/irm/jump-irm/serializer.js +26 -0
- package/dist/contracts/irm/jump-irm/type.d.ts +8 -0
- package/dist/contracts/irm/jump-irm/type.js +2 -0
- package/dist/contracts/jetton/jetton-minter.d.ts +23 -0
- package/dist/contracts/jetton/jetton-minter.js +46 -0
- package/dist/contracts/jetton/jetton-wallet.d.ts +67 -0
- package/dist/contracts/jetton/jetton-wallet.js +119 -0
- package/dist/contracts/jetton/type.d.ts +7 -0
- package/dist/contracts/jetton/type.js +2 -0
- package/dist/contracts/liquid_token/dedust/minter.d.ts +56 -0
- package/dist/contracts/liquid_token/dedust/minter.js +112 -0
- package/dist/contracts/liquid_token/dedust/wallet.d.ts +127 -0
- package/dist/contracts/liquid_token/dedust/wallet.js +213 -0
- package/dist/contracts/liquid_token/stonfi/LFStonfiJettonMinter.d.ts +53 -0
- package/dist/contracts/liquid_token/stonfi/LFStonfiJettonMinter.js +110 -0
- package/dist/contracts/liquid_token/stonfi/LFStonfiJettonWallet.d.ts +169 -0
- package/dist/contracts/liquid_token/stonfi/LFStonfiJettonWallet.js +288 -0
- package/dist/contracts/oracle/composite-onchain-oracle/index.d.ts +108 -0
- package/dist/contracts/oracle/composite-onchain-oracle/index.js +185 -0
- package/dist/contracts/oracle/parser.d.ts +7 -0
- package/dist/contracts/oracle/parser.js +77 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/index.d.ts +56 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/index.js +159 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/serializer.d.ts +4 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/serializer.js +137 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/type.d.ts +57 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/type.js +18 -0
- package/dist/contracts/oracle/redstone-oracle/serializer.d.ts +3 -0
- package/dist/contracts/oracle/redstone-oracle/serializer.js +30 -0
- package/dist/contracts/oracle/redstone-oracle/type.d.ts +9 -0
- package/dist/contracts/oracle/redstone-oracle/type.js +2 -0
- package/dist/contracts/oracle/redstone-parser.d.ts +9 -0
- package/dist/contracts/oracle/redstone-parser.js +58 -0
- package/dist/contracts/rfq/rfq_auction/index.d.ts +216 -0
- package/dist/contracts/rfq/rfq_auction/index.js +334 -0
- package/dist/contracts/rfq/rfq_batch/index.d.ts +346 -0
- package/dist/contracts/rfq/rfq_batch/index.js +448 -0
- package/dist/contracts/rfq/rfq_event_emitter/index.d.ts +132 -0
- package/dist/contracts/rfq/rfq_event_emitter/index.js +143 -0
- package/dist/contracts/stonfi-farm/MockStonfiFarmItem.d.ts +41 -0
- package/dist/contracts/stonfi-farm/MockStonfiFarmItem.js +83 -0
- package/dist/contracts/stonfi-farm/MockStonfiFarmMinter.d.ts +45 -0
- package/dist/contracts/stonfi-farm/MockStonfiFarmMinter.js +92 -0
- package/dist/contracts/unknown-contract/index.d.ts +14 -0
- package/dist/contracts/unknown-contract/index.js +18 -0
- package/dist/contracts/vault/share-vault/index.d.ts +206 -0
- package/dist/contracts/vault/share-vault/index.js +373 -0
- package/dist/contracts/vault/strategy-vault/codec.d.ts +710 -0
- package/dist/contracts/vault/strategy-vault/codec.js +1256 -0
- package/dist/contracts/vault/strategy-vault/computation.d.ts +11 -0
- package/dist/contracts/vault/strategy-vault/computation.js +56 -0
- package/dist/contracts/vault/strategy-vault/constants.d.ts +163 -0
- package/dist/contracts/vault/strategy-vault/constants.js +170 -0
- package/dist/contracts/vault/strategy-vault/index.d.ts +587 -0
- package/dist/contracts/vault/strategy-vault/index.js +406 -0
- package/dist/contracts/vault/strategy-vault/type.d.ts +115 -0
- package/dist/contracts/vault/strategy-vault/type.js +2 -0
- package/dist/contracts/wton/jetton-minter.d.ts +35 -0
- package/dist/contracts/wton/jetton-minter.js +71 -0
- package/dist/contracts/wton/jetton-wallet.d.ts +90 -0
- package/dist/contracts/wton/jetton-wallet.js +153 -0
- package/dist/contracts/wton/type.d.ts +7 -0
- package/dist/contracts/wton/type.js +2 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +65 -0
- package/dist/lib/assert.d.ts +1 -0
- package/dist/lib/assert.js +9 -0
- package/dist/lib/query-cache.d.ts +5 -0
- package/dist/lib/query-cache.js +57 -0
- package/dist/lib/send-msg.d.ts +11 -0
- package/dist/lib/send-msg.js +9 -0
- package/dist/services/composite-oracle/computation.d.ts +55 -0
- package/dist/services/composite-oracle/computation.js +295 -0
- package/dist/services/composite-oracle/index.d.ts +45 -0
- package/dist/services/composite-oracle/index.js +110 -0
- package/dist/services/composite-oracle/query.d.ts +36 -0
- package/dist/services/composite-oracle/query.js +251 -0
- package/dist/services/composite-oracle/types.d.ts +82 -0
- package/dist/services/composite-oracle/types.js +11 -0
- package/dist/services/pool/computation.d.ts +75 -0
- package/dist/services/pool/computation.js +219 -0
- package/dist/services/pool/index.d.ts +94 -0
- package/dist/services/pool/index.js +139 -0
- package/dist/services/pool/oracle.d.ts +20 -0
- package/dist/services/pool/oracle.js +61 -0
- package/dist/services/pool/owner/index.d.ts +37 -0
- package/dist/services/pool/owner/index.js +76 -0
- package/dist/services/pool/owner/types.d.ts +18 -0
- package/dist/services/pool/owner/types.js +2 -0
- package/dist/services/pool/query.d.ts +64 -0
- package/dist/services/pool/query.js +282 -0
- package/dist/services/pool/user/index.d.ts +86 -0
- package/dist/services/pool/user/index.js +285 -0
- package/dist/services/pool/user/types.d.ts +44 -0
- package/dist/services/pool/user/types.js +2 -0
- package/dist/services/rfq-auction/index.d.ts +81 -0
- package/dist/services/rfq-auction/index.js +93 -0
- package/dist/services/rfq-auction/oracle.d.ts +19 -0
- package/dist/services/rfq-auction/oracle.js +60 -0
- package/dist/services/rfq-auction/query.d.ts +50 -0
- package/dist/services/rfq-auction/query.js +19 -0
- package/dist/services/rfq-auction/user/index.d.ts +63 -0
- package/dist/services/rfq-auction/user/index.js +218 -0
- package/dist/services/rfq-auction/user/types.d.ts +29 -0
- package/dist/services/rfq-auction/user/types.js +2 -0
- package/dist/services/rfq-batch/index.d.ts +78 -0
- package/dist/services/rfq-batch/index.js +132 -0
- package/dist/services/rfq-batch/oracle.d.ts +22 -0
- package/dist/services/rfq-batch/oracle.js +54 -0
- package/dist/services/rfq-batch/query.d.ts +46 -0
- package/dist/services/rfq-batch/query.js +34 -0
- package/dist/services/rfq-batch/user/index.d.ts +79 -0
- package/dist/services/rfq-batch/user/index.js +171 -0
- package/dist/services/rfq-batch/user/types.d.ts +37 -0
- package/dist/services/rfq-batch/user/types.js +2 -0
- package/dist/services/share-vault/computation.d.ts +24 -0
- package/dist/services/share-vault/computation.js +42 -0
- package/dist/services/share-vault/index.d.ts +90 -0
- package/dist/services/share-vault/index.js +128 -0
- package/dist/services/share-vault/manager/index.d.ts +40 -0
- package/dist/services/share-vault/manager/index.js +111 -0
- package/dist/services/share-vault/manager/types.d.ts +23 -0
- package/dist/services/share-vault/manager/types.js +2 -0
- package/dist/services/share-vault/owner/index.d.ts +64 -0
- package/dist/services/share-vault/owner/index.js +122 -0
- package/dist/services/share-vault/owner/types.d.ts +33 -0
- package/dist/services/share-vault/owner/types.js +2 -0
- package/dist/services/share-vault/query.d.ts +34 -0
- package/dist/services/share-vault/query.js +138 -0
- package/dist/services/share-vault/user/index.d.ts +33 -0
- package/dist/services/share-vault/user/index.js +106 -0
- package/dist/services/share-vault/user/types.d.ts +13 -0
- package/dist/services/share-vault/user/types.js +2 -0
- package/dist/services/strategy-vault/index.d.ts +2124 -0
- package/dist/services/strategy-vault/index.js +268 -0
- package/dist/services/strategy-vault/manager/index.d.ts +1968 -0
- package/dist/services/strategy-vault/manager/index.js +475 -0
- package/dist/services/strategy-vault/manager/types.d.ts +144 -0
- package/dist/services/strategy-vault/manager/types.js +2 -0
- package/dist/services/strategy-vault/oracle.d.ts +66 -0
- package/dist/services/strategy-vault/oracle.js +162 -0
- package/dist/services/strategy-vault/owner/index.d.ts +277 -0
- package/dist/services/strategy-vault/owner/index.js +333 -0
- package/dist/services/strategy-vault/owner/types.d.ts +146 -0
- package/dist/services/strategy-vault/owner/types.js +2 -0
- package/dist/services/strategy-vault/query.d.ts +138 -0
- package/dist/services/strategy-vault/query.js +59 -0
- package/dist/services/strategy-vault/user/index.d.ts +89 -0
- package/dist/services/strategy-vault/user/index.js +219 -0
- package/dist/services/strategy-vault/user/types.d.ts +46 -0
- package/dist/services/strategy-vault/user/types.js +2 -0
- package/dist/types/sender.d.ts +7 -0
- package/dist/types/sender.js +2 -0
- package/dist/utils/action-parser.d.ts +7 -0
- package/dist/utils/action-parser.js +20 -0
- package/dist/utils/external-message-hash.d.ts +45 -0
- package/dist/utils/external-message-hash.js +65 -0
- package/dist/utils/oracle/redstone/readonlyCachedRedstone.d.ts +3 -0
- package/dist/utils/oracle/redstone/readonlyCachedRedstone.js +25 -0
- package/dist/utils/oracle/redstone/redstoneHelper.d.ts +21 -0
- package/dist/utils/oracle/redstone/redstoneHelper.js +228 -0
- package/dist/utils/parser.d.ts +40 -0
- package/dist/utils/parser.js +580 -0
- package/dist/utils/pending-tracker/index.d.ts +14 -0
- package/dist/utils/pending-tracker/index.js +34 -0
- package/dist/utils/pending-tracker/trackable-sender.d.ts +16 -0
- package/dist/utils/pending-tracker/trackable-sender.js +87 -0
- package/dist/utils/pending-tracker/type.d.ts +78 -0
- package/dist/utils/pending-tracker/type.js +2 -0
- package/dist/utils/pending-tracker/v3-client.d.ts +31 -0
- package/dist/utils/pending-tracker/v3-client.js +104 -0
- package/dist/utils/risk_calculator/risk_calculator.d.ts +45 -0
- package/dist/utils/risk_calculator/risk_calculator.js +332 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/utils/utils.js +12 -0
- package/package.json +46 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Cell } from "@ton/core";
|
|
2
|
+
import { AddressInput, AddressLike } from "../../../contracts/common/type";
|
|
3
|
+
export type AddOrderParams = {
|
|
4
|
+
rfqBatchAddress: AddressInput;
|
|
5
|
+
assetAddress: AddressLike;
|
|
6
|
+
amount: bigint;
|
|
7
|
+
forwardTonAmount?: bigint;
|
|
8
|
+
forwardPayload?: Cell | null;
|
|
9
|
+
queryId?: bigint;
|
|
10
|
+
};
|
|
11
|
+
export type SettleParams = {
|
|
12
|
+
rfqBatchAddress: AddressInput;
|
|
13
|
+
assetAddress: AddressLike;
|
|
14
|
+
amount: bigint;
|
|
15
|
+
queryId?: bigint;
|
|
16
|
+
};
|
|
17
|
+
export type LockParams = {
|
|
18
|
+
rfqBatchAddress: AddressInput;
|
|
19
|
+
};
|
|
20
|
+
export type CancelOrderParams = {
|
|
21
|
+
rfqBatchAddress: AddressInput;
|
|
22
|
+
assetAddress: AddressLike;
|
|
23
|
+
};
|
|
24
|
+
export type PayoutParams = {
|
|
25
|
+
rfqBatchAddress: AddressInput;
|
|
26
|
+
assetAddress: AddressLike;
|
|
27
|
+
count: number;
|
|
28
|
+
};
|
|
29
|
+
export type BatchPayoutParams = {
|
|
30
|
+
rfqBatchAddress: AddressInput;
|
|
31
|
+
};
|
|
32
|
+
export type ReopenParams = {
|
|
33
|
+
rfqBatchAddress: AddressInput;
|
|
34
|
+
};
|
|
35
|
+
export type CollectFeeParams = {
|
|
36
|
+
rfqBatchAddress: AddressInput;
|
|
37
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ShareVaultState } from "../../contracts/vault/share-vault";
|
|
2
|
+
/**
|
|
3
|
+
* Pool info for ShareVault calculations
|
|
4
|
+
*/
|
|
5
|
+
export type PoolInfoForShareVault = {
|
|
6
|
+
cash: bigint;
|
|
7
|
+
totalSupplyAmount: bigint;
|
|
8
|
+
totalSupplyShare: bigint;
|
|
9
|
+
vaultSupplyAmount: bigint;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Pool tuple with calculated values for withdrawal ordering
|
|
13
|
+
*/
|
|
14
|
+
export type PoolTuple = {
|
|
15
|
+
poolAddress: string;
|
|
16
|
+
targetWeight: bigint;
|
|
17
|
+
targetWeightRatio: number;
|
|
18
|
+
supply: bigint;
|
|
19
|
+
withdrawableAmount: bigint;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Get pools sorted by target weight ratio for withdrawal ordering
|
|
23
|
+
*/
|
|
24
|
+
export declare function getPoolTupleSortedByTargetWeight(whitelistedPools: ShareVaultState["whitelistedPools"], totalAssetAmount: bigint, totalTargetWeight: bigint, poolInfoForShareVault: Record<string, PoolInfoForShareVault>): PoolTuple[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPoolTupleSortedByTargetWeight = getPoolTupleSortedByTargetWeight;
|
|
4
|
+
// ============================================================
|
|
5
|
+
// Pure Computation (no I/O)
|
|
6
|
+
// ============================================================
|
|
7
|
+
/**
|
|
8
|
+
* Get pools sorted by target weight ratio for withdrawal ordering
|
|
9
|
+
*/
|
|
10
|
+
function getPoolTupleSortedByTargetWeight(whitelistedPools, totalAssetAmount, totalTargetWeight, poolInfoForShareVault) {
|
|
11
|
+
const poolTuples = [];
|
|
12
|
+
for (const [poolAddress, poolData] of Object.entries(whitelistedPools)) {
|
|
13
|
+
if (!poolData.isWhitelisted)
|
|
14
|
+
continue;
|
|
15
|
+
const poolInfo = poolInfoForShareVault[poolAddress];
|
|
16
|
+
if (!poolInfo)
|
|
17
|
+
continue;
|
|
18
|
+
const targetWeightRatio = poolData.targetWeight === 0n
|
|
19
|
+
? -1
|
|
20
|
+
: totalTargetWeight > 0n
|
|
21
|
+
? Number((poolInfo.vaultSupplyAmount * 10000n) / totalAssetAmount) /
|
|
22
|
+
Number((poolData.targetWeight * 10000n) / totalTargetWeight)
|
|
23
|
+
: 0;
|
|
24
|
+
const withdrawableAmount = poolInfo.cash < poolInfo.vaultSupplyAmount ? poolInfo.cash : poolInfo.vaultSupplyAmount;
|
|
25
|
+
poolTuples.push({
|
|
26
|
+
poolAddress,
|
|
27
|
+
targetWeight: poolData.targetWeight,
|
|
28
|
+
targetWeightRatio,
|
|
29
|
+
supply: poolData.supply,
|
|
30
|
+
withdrawableAmount,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return poolTuples.sort((a, b) => {
|
|
34
|
+
if (a.targetWeightRatio === -1 && b.targetWeightRatio === -1)
|
|
35
|
+
return 0;
|
|
36
|
+
if (a.targetWeightRatio === -1)
|
|
37
|
+
return -1;
|
|
38
|
+
if (b.targetWeightRatio === -1)
|
|
39
|
+
return 1;
|
|
40
|
+
return b.targetWeightRatio - a.targetWeightRatio;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Address } from "@ton/core";
|
|
2
|
+
import { AffluentContext } from "../../context";
|
|
3
|
+
import { AddressInput, AddressLike } from "../../contracts/common/type";
|
|
4
|
+
import { AddressSender } from "../../types/sender";
|
|
5
|
+
import { ShareVaultState } from "../../contracts/vault/share-vault";
|
|
6
|
+
import * as query from "./query";
|
|
7
|
+
import * as owner from "./owner";
|
|
8
|
+
import * as manager from "./manager";
|
|
9
|
+
import * as user from "./user";
|
|
10
|
+
export { sendMsg } from "../../lib/send-msg";
|
|
11
|
+
export * from "./owner/types";
|
|
12
|
+
export * from "./manager/types";
|
|
13
|
+
export * from "./user/types";
|
|
14
|
+
export { owner, manager, user, query };
|
|
15
|
+
export { PoolInfoForShareVault, PoolTuple } from "./query";
|
|
16
|
+
export declare class ShareVaultServiceV1 {
|
|
17
|
+
private ctx;
|
|
18
|
+
constructor(ctx?: AffluentContext);
|
|
19
|
+
getVault(vaultAddress: AddressInput): import("@ton/core").OpenedContract<import("../../contracts/vault/share-vault").ShareVault>;
|
|
20
|
+
getVaultData(vaultAddress: AddressInput): Promise<ShareVaultState>;
|
|
21
|
+
getVaultWalletAddress(vaultAddress: AddressInput, userAddress: AddressLike): Promise<Address>;
|
|
22
|
+
getVaultWallet(vaultAddress: AddressInput, userAddress: AddressLike): Promise<import("@ton/core").OpenedContract<import("../..").JettonWallet>>;
|
|
23
|
+
getPoolInfoForShareVault(vaultData: ShareVaultState): Promise<Record<string, query.PoolInfoForShareVault>>;
|
|
24
|
+
getPoolTupleSortedByTargetWeight(whitelistedPools: ShareVaultState["whitelistedPools"], totalAssetAmount: bigint, totalTargetWeight: bigint, poolInfoForShareVault: Record<string, query.PoolInfoForShareVault>): query.PoolTuple[];
|
|
25
|
+
estimateWithdrawPoolCount(vaultData: ShareVaultState, requestedShares: bigint): Promise<{
|
|
26
|
+
count: number;
|
|
27
|
+
sortedPools: query.PoolTuple[];
|
|
28
|
+
}>;
|
|
29
|
+
/** @deprecated Use estimateWithdrawPoolCount instead */
|
|
30
|
+
estimateWithdrawLiquidityFulfillmentPoolCount(vaultData: ShareVaultState, requestedShares: bigint): Promise<{
|
|
31
|
+
count: number;
|
|
32
|
+
sortedPools: query.PoolTuple[];
|
|
33
|
+
}>;
|
|
34
|
+
sendSetWhitelistPools(sender: AddressSender, params: owner.SetWhitelistPoolsParams, value?: bigint): Promise<{
|
|
35
|
+
whitelists: [Address, 0 | 1][];
|
|
36
|
+
queryID: bigint | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
sendSetGasConfig(sender: AddressSender, params: owner.SetGasConfigParams, value?: bigint): Promise<{
|
|
39
|
+
gasFee: {
|
|
40
|
+
supply: bigint;
|
|
41
|
+
withdraw: bigint;
|
|
42
|
+
factorialSupply: bigint;
|
|
43
|
+
factorialWithdraw: bigint;
|
|
44
|
+
mintVaultShareTokens: bigint;
|
|
45
|
+
};
|
|
46
|
+
queryID: bigint | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
sendChangeManager(sender: AddressSender, params: owner.ChangeManagerParams, value?: bigint): Promise<{
|
|
49
|
+
manager: Address;
|
|
50
|
+
queryID: bigint | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
sendChangeAdmin(sender: AddressSender, params: owner.ChangeAdminParams, value?: bigint): Promise<{
|
|
53
|
+
address: Address;
|
|
54
|
+
queryID: number | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
sendUpgradeCode(sender: AddressSender, params: owner.UpgradeCodeParams, value?: bigint): Promise<{
|
|
57
|
+
newCode: import("@ton/core").Cell;
|
|
58
|
+
queryID: number | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
sendSupplyToPool(sender: AddressSender, params: manager.SupplyToPoolParams, value?: bigint): Promise<{
|
|
61
|
+
pool: Address;
|
|
62
|
+
amount: bigint;
|
|
63
|
+
queryID: number | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
sendWithdrawFromPool(sender: AddressSender, params: manager.WithdrawFromPoolParams, value?: bigint): Promise<{
|
|
66
|
+
pool: Address;
|
|
67
|
+
amount: bigint;
|
|
68
|
+
isShare: boolean;
|
|
69
|
+
queryID: number | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
sendSetTargetWeight(sender: AddressSender, params: manager.SetTargetWeightParams, value?: bigint): Promise<{
|
|
72
|
+
pool: Address;
|
|
73
|
+
targetWeight: number;
|
|
74
|
+
queryID: number | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
sendSupply(sender: AddressSender, params: user.SupplyParams, value?: bigint): Promise<{
|
|
77
|
+
recipient: Address;
|
|
78
|
+
response: Address;
|
|
79
|
+
amount: bigint;
|
|
80
|
+
forwardTonAmount: bigint;
|
|
81
|
+
forwardPayload: import("@ton/core").Cell;
|
|
82
|
+
queryId: bigint | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
sendWithdraw(sender: AddressSender, params: user.WithdrawParams, value?: bigint): Promise<{
|
|
85
|
+
amount: bigint;
|
|
86
|
+
response: Address;
|
|
87
|
+
forwardPayload: import("@ton/core").Cell;
|
|
88
|
+
queryId: bigint | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ShareVaultServiceV1 = exports.query = exports.user = exports.manager = exports.owner = exports.sendMsg = void 0;
|
|
40
|
+
const context_1 = require("../../context");
|
|
41
|
+
const send_msg_1 = require("../../lib/send-msg");
|
|
42
|
+
const query = __importStar(require("./query"));
|
|
43
|
+
exports.query = query;
|
|
44
|
+
const owner = __importStar(require("./owner"));
|
|
45
|
+
exports.owner = owner;
|
|
46
|
+
const manager = __importStar(require("./manager"));
|
|
47
|
+
exports.manager = manager;
|
|
48
|
+
const user = __importStar(require("./user"));
|
|
49
|
+
exports.user = user;
|
|
50
|
+
var send_msg_2 = require("../../lib/send-msg");
|
|
51
|
+
Object.defineProperty(exports, "sendMsg", { enumerable: true, get: function () { return send_msg_2.sendMsg; } });
|
|
52
|
+
__exportStar(require("./owner/types"), exports);
|
|
53
|
+
__exportStar(require("./manager/types"), exports);
|
|
54
|
+
__exportStar(require("./user/types"), exports);
|
|
55
|
+
class ShareVaultServiceV1 {
|
|
56
|
+
ctx;
|
|
57
|
+
constructor(ctx = context_1.AffluentContext.getInstance()) {
|
|
58
|
+
this.ctx = ctx;
|
|
59
|
+
}
|
|
60
|
+
// ============================================================
|
|
61
|
+
// Query
|
|
62
|
+
// ============================================================
|
|
63
|
+
getVault(vaultAddress) {
|
|
64
|
+
return query.getVault(this.ctx, vaultAddress);
|
|
65
|
+
}
|
|
66
|
+
async getVaultData(vaultAddress) {
|
|
67
|
+
return query.getVaultData(this.ctx, vaultAddress);
|
|
68
|
+
}
|
|
69
|
+
async getVaultWalletAddress(vaultAddress, userAddress) {
|
|
70
|
+
return query.getVaultWalletAddress(this.ctx, vaultAddress, userAddress);
|
|
71
|
+
}
|
|
72
|
+
async getVaultWallet(vaultAddress, userAddress) {
|
|
73
|
+
return query.getVaultWallet(this.ctx, vaultAddress, userAddress);
|
|
74
|
+
}
|
|
75
|
+
async getPoolInfoForShareVault(vaultData) {
|
|
76
|
+
return query.getPoolInfoForShareVault(this.ctx, vaultData);
|
|
77
|
+
}
|
|
78
|
+
getPoolTupleSortedByTargetWeight(whitelistedPools, totalAssetAmount, totalTargetWeight, poolInfoForShareVault) {
|
|
79
|
+
return query.getPoolTupleSortedByTargetWeight(whitelistedPools, totalAssetAmount, totalTargetWeight, poolInfoForShareVault);
|
|
80
|
+
}
|
|
81
|
+
async estimateWithdrawPoolCount(vaultData, requestedShares) {
|
|
82
|
+
return query.estimateWithdrawPoolCount(this.ctx, vaultData, requestedShares);
|
|
83
|
+
}
|
|
84
|
+
/** @deprecated Use estimateWithdrawPoolCount instead */
|
|
85
|
+
async estimateWithdrawLiquidityFulfillmentPoolCount(vaultData, requestedShares) {
|
|
86
|
+
return query.estimateWithdrawPoolCount(this.ctx, vaultData, requestedShares);
|
|
87
|
+
}
|
|
88
|
+
// ============================================================
|
|
89
|
+
// Owner
|
|
90
|
+
// ============================================================
|
|
91
|
+
async sendSetWhitelistPools(sender, params, value) {
|
|
92
|
+
return (0, send_msg_1.sendMsg)(sender, owner.createSetWhitelistPoolsMsg(this.ctx, params, value));
|
|
93
|
+
}
|
|
94
|
+
async sendSetGasConfig(sender, params, value) {
|
|
95
|
+
return (0, send_msg_1.sendMsg)(sender, owner.createSetGasConfigMsg(this.ctx, params, value));
|
|
96
|
+
}
|
|
97
|
+
async sendChangeManager(sender, params, value) {
|
|
98
|
+
return (0, send_msg_1.sendMsg)(sender, owner.createChangeManagerMsg(this.ctx, params, value));
|
|
99
|
+
}
|
|
100
|
+
async sendChangeAdmin(sender, params, value) {
|
|
101
|
+
return (0, send_msg_1.sendMsg)(sender, owner.createChangeAdminMsg(this.ctx, params, value));
|
|
102
|
+
}
|
|
103
|
+
async sendUpgradeCode(sender, params, value) {
|
|
104
|
+
return (0, send_msg_1.sendMsg)(sender, owner.createUpgradeCodeMsg(this.ctx, params, value));
|
|
105
|
+
}
|
|
106
|
+
// ============================================================
|
|
107
|
+
// Manager
|
|
108
|
+
// ============================================================
|
|
109
|
+
async sendSupplyToPool(sender, params, value) {
|
|
110
|
+
return (0, send_msg_1.sendMsg)(sender, manager.createSupplyToPoolMsg(this.ctx, params, value));
|
|
111
|
+
}
|
|
112
|
+
async sendWithdrawFromPool(sender, params, value) {
|
|
113
|
+
return (0, send_msg_1.sendMsg)(sender, manager.createWithdrawFromPoolMsg(this.ctx, params, value));
|
|
114
|
+
}
|
|
115
|
+
async sendSetTargetWeight(sender, params, value) {
|
|
116
|
+
return (0, send_msg_1.sendMsg)(sender, manager.createSetTargetWeightMsg(this.ctx, params, value));
|
|
117
|
+
}
|
|
118
|
+
// ============================================================
|
|
119
|
+
// User
|
|
120
|
+
// ============================================================
|
|
121
|
+
async sendSupply(sender, params, value) {
|
|
122
|
+
return (0, send_msg_1.sendMsg)(sender, user.createSupplyMsg(this.ctx, sender, params, value));
|
|
123
|
+
}
|
|
124
|
+
async sendWithdraw(sender, params, value) {
|
|
125
|
+
return (0, send_msg_1.sendMsg)(sender, user.createWithdrawMsg(this.ctx, sender, params, value));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.ShareVaultServiceV1 = ShareVaultServiceV1;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AffluentContext } from "../../../context";
|
|
2
|
+
import { SupplyToPoolParams, WithdrawFromPoolParams, SetTargetWeightParams } from "./types";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export declare function createSupplyToPoolMsg(ctx: AffluentContext, params: SupplyToPoolParams, value?: bigint): Promise<{
|
|
5
|
+
opts: {
|
|
6
|
+
pool: import("@ton/core").Address;
|
|
7
|
+
amount: bigint;
|
|
8
|
+
queryID: number | undefined;
|
|
9
|
+
};
|
|
10
|
+
input: {
|
|
11
|
+
to: import("@ton/core").Address;
|
|
12
|
+
value: bigint;
|
|
13
|
+
body: import("@ton/core").Cell;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
export declare function createWithdrawFromPoolMsg(ctx: AffluentContext, params: WithdrawFromPoolParams, value?: bigint): Promise<{
|
|
17
|
+
opts: {
|
|
18
|
+
pool: import("@ton/core").Address;
|
|
19
|
+
amount: bigint;
|
|
20
|
+
isShare: boolean;
|
|
21
|
+
queryID: number | undefined;
|
|
22
|
+
};
|
|
23
|
+
input: {
|
|
24
|
+
to: import("@ton/core").Address;
|
|
25
|
+
value: bigint;
|
|
26
|
+
body: import("@ton/core").Cell;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
export declare function createSetTargetWeightMsg(ctx: AffluentContext, params: SetTargetWeightParams, value?: bigint): Promise<{
|
|
30
|
+
opts: {
|
|
31
|
+
pool: import("@ton/core").Address;
|
|
32
|
+
targetWeight: number;
|
|
33
|
+
queryID: number | undefined;
|
|
34
|
+
};
|
|
35
|
+
input: {
|
|
36
|
+
to: import("@ton/core").Address;
|
|
37
|
+
value: bigint;
|
|
38
|
+
body: import("@ton/core").Cell;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createSupplyToPoolMsg = createSupplyToPoolMsg;
|
|
18
|
+
exports.createWithdrawFromPoolMsg = createWithdrawFromPoolMsg;
|
|
19
|
+
exports.createSetTargetWeightMsg = createSetTargetWeightMsg;
|
|
20
|
+
const core_1 = require("@ton/core");
|
|
21
|
+
const utils_1 = require("../../../contracts/common/utils");
|
|
22
|
+
const share_vault_1 = require("../../../contracts/vault/share-vault");
|
|
23
|
+
__exportStar(require("./types"), exports);
|
|
24
|
+
const DEFAULT_VALUE = (0, core_1.toNano)(0.5);
|
|
25
|
+
// ============================================================
|
|
26
|
+
// Supply To Pool
|
|
27
|
+
// ============================================================
|
|
28
|
+
async function createSupplyToPoolMsg(ctx, params, value) {
|
|
29
|
+
const vaultAddress = (0, utils_1.toAddress)(params.vaultAddress);
|
|
30
|
+
const poolAddress = (0, utils_1.toAddress)(params.poolAddress);
|
|
31
|
+
const vault = ctx.getByContract(share_vault_1.ShareVault, vaultAddress);
|
|
32
|
+
const vaultData = await vault.getVaultData();
|
|
33
|
+
const gas = share_vault_1.ShareVault.calculateGasFee(share_vault_1.ShareVault.Op.SupplyToPool, share_vault_1.ShareVault.Gas.baseFee, 1, vaultData.minimumGasFee);
|
|
34
|
+
const opts = {
|
|
35
|
+
pool: poolAddress,
|
|
36
|
+
amount: params.amount,
|
|
37
|
+
queryID: params.queryId ? Number(params.queryId) : undefined,
|
|
38
|
+
};
|
|
39
|
+
const body = (0, core_1.beginCell)()
|
|
40
|
+
.storeUint(share_vault_1.ShareVault.Op.SupplyToPool, 32)
|
|
41
|
+
.storeUint(opts.queryID ?? 0, 64)
|
|
42
|
+
.storeAddress(poolAddress)
|
|
43
|
+
.storeCoins(params.amount)
|
|
44
|
+
.endCell();
|
|
45
|
+
return {
|
|
46
|
+
opts,
|
|
47
|
+
input: {
|
|
48
|
+
to: vault.address,
|
|
49
|
+
value: value ?? gas,
|
|
50
|
+
body,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
// ============================================================
|
|
55
|
+
// Withdraw From Pool
|
|
56
|
+
// ============================================================
|
|
57
|
+
async function createWithdrawFromPoolMsg(ctx, params, value) {
|
|
58
|
+
const vaultAddress = (0, utils_1.toAddress)(params.vaultAddress);
|
|
59
|
+
const poolAddress = (0, utils_1.toAddress)(params.poolAddress);
|
|
60
|
+
const vault = ctx.getByContract(share_vault_1.ShareVault, vaultAddress);
|
|
61
|
+
const vaultData = await vault.getVaultData();
|
|
62
|
+
const gas = share_vault_1.ShareVault.calculateGasFee(share_vault_1.ShareVault.Op.WithdrawFromPool, share_vault_1.ShareVault.Gas.baseFee, 1, vaultData.minimumGasFee);
|
|
63
|
+
const opts = {
|
|
64
|
+
pool: poolAddress,
|
|
65
|
+
amount: params.amount,
|
|
66
|
+
isShare: params.isShare ?? false,
|
|
67
|
+
queryID: params.queryId ? Number(params.queryId) : undefined,
|
|
68
|
+
};
|
|
69
|
+
const body = (0, core_1.beginCell)()
|
|
70
|
+
.storeUint(share_vault_1.ShareVault.Op.WithdrawFromPool, 32)
|
|
71
|
+
.storeUint(opts.queryID ?? 0, 64)
|
|
72
|
+
.storeAddress(poolAddress)
|
|
73
|
+
.storeUint(opts.isShare ? 1 : 0, 1)
|
|
74
|
+
.storeCoins(params.amount)
|
|
75
|
+
.endCell();
|
|
76
|
+
return {
|
|
77
|
+
opts,
|
|
78
|
+
input: {
|
|
79
|
+
to: vault.address,
|
|
80
|
+
value: value ?? gas,
|
|
81
|
+
body,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
// ============================================================
|
|
86
|
+
// Set Target Weight
|
|
87
|
+
// ============================================================
|
|
88
|
+
async function createSetTargetWeightMsg(ctx, params, value) {
|
|
89
|
+
const vaultAddress = (0, utils_1.toAddress)(params.vaultAddress);
|
|
90
|
+
const poolAddress = (0, utils_1.toAddress)(params.poolAddress);
|
|
91
|
+
const vault = ctx.getByContract(share_vault_1.ShareVault, vaultAddress);
|
|
92
|
+
const opts = {
|
|
93
|
+
pool: poolAddress,
|
|
94
|
+
targetWeight: params.targetWeight,
|
|
95
|
+
queryID: params.queryId ? Number(params.queryId) : undefined,
|
|
96
|
+
};
|
|
97
|
+
const body = (0, core_1.beginCell)()
|
|
98
|
+
.storeUint(share_vault_1.ShareVault.Op.SetTargetWeight, 32)
|
|
99
|
+
.storeUint(opts.queryID ?? 0, 64)
|
|
100
|
+
.storeAddress(poolAddress)
|
|
101
|
+
.storeUint(params.targetWeight, 14)
|
|
102
|
+
.endCell();
|
|
103
|
+
return {
|
|
104
|
+
opts,
|
|
105
|
+
input: {
|
|
106
|
+
to: vault.address,
|
|
107
|
+
value: value ?? DEFAULT_VALUE,
|
|
108
|
+
body,
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AddressInput, AddressLike } from "../../../contracts/common/type";
|
|
2
|
+
export type SupplyToPoolParams = {
|
|
3
|
+
vaultAddress: AddressInput;
|
|
4
|
+
poolAddress: AddressLike;
|
|
5
|
+
amount: bigint;
|
|
6
|
+
queryId?: bigint;
|
|
7
|
+
value?: bigint;
|
|
8
|
+
};
|
|
9
|
+
export type WithdrawFromPoolParams = {
|
|
10
|
+
vaultAddress: AddressInput;
|
|
11
|
+
poolAddress: AddressLike;
|
|
12
|
+
amount: bigint;
|
|
13
|
+
isShare?: boolean;
|
|
14
|
+
queryId?: bigint;
|
|
15
|
+
value?: bigint;
|
|
16
|
+
};
|
|
17
|
+
export type SetTargetWeightParams = {
|
|
18
|
+
vaultAddress: AddressInput;
|
|
19
|
+
poolAddress: AddressLike;
|
|
20
|
+
targetWeight: number;
|
|
21
|
+
queryId?: bigint;
|
|
22
|
+
value?: bigint;
|
|
23
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { AffluentContext } from "../../../context";
|
|
2
|
+
import { SetWhitelistPoolsParams, SetGasConfigParams, ChangeManagerParams, ChangeAdminParams, UpgradeCodeParams } from "./types";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export declare function createSetWhitelistPoolsMsg(ctx: AffluentContext, params: SetWhitelistPoolsParams, value?: bigint): Promise<{
|
|
5
|
+
opts: {
|
|
6
|
+
whitelists: [import("@ton/core").Address, 0 | 1][];
|
|
7
|
+
queryID: bigint | undefined;
|
|
8
|
+
};
|
|
9
|
+
input: {
|
|
10
|
+
to: import("@ton/core").Address;
|
|
11
|
+
value: bigint;
|
|
12
|
+
body: import("@ton/core").Cell;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
export declare function createSetGasConfigMsg(ctx: AffluentContext, params: SetGasConfigParams, value?: bigint): Promise<{
|
|
16
|
+
opts: {
|
|
17
|
+
gasFee: {
|
|
18
|
+
supply: bigint;
|
|
19
|
+
withdraw: bigint;
|
|
20
|
+
factorialSupply: bigint;
|
|
21
|
+
factorialWithdraw: bigint;
|
|
22
|
+
mintVaultShareTokens: bigint;
|
|
23
|
+
};
|
|
24
|
+
queryID: bigint | undefined;
|
|
25
|
+
};
|
|
26
|
+
input: {
|
|
27
|
+
to: import("@ton/core").Address;
|
|
28
|
+
value: bigint;
|
|
29
|
+
body: import("@ton/core").Cell;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
export declare function createChangeManagerMsg(ctx: AffluentContext, params: ChangeManagerParams, value?: bigint): Promise<{
|
|
33
|
+
opts: {
|
|
34
|
+
manager: import("@ton/core").Address;
|
|
35
|
+
queryID: bigint | undefined;
|
|
36
|
+
};
|
|
37
|
+
input: {
|
|
38
|
+
to: import("@ton/core").Address;
|
|
39
|
+
value: bigint;
|
|
40
|
+
body: import("@ton/core").Cell;
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
export declare function createChangeAdminMsg(ctx: AffluentContext, params: ChangeAdminParams, value?: bigint): Promise<{
|
|
44
|
+
opts: {
|
|
45
|
+
address: import("@ton/core").Address;
|
|
46
|
+
queryID: number | undefined;
|
|
47
|
+
};
|
|
48
|
+
input: {
|
|
49
|
+
to: import("@ton/core").Address;
|
|
50
|
+
value: bigint;
|
|
51
|
+
body: import("@ton/core").Cell;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
export declare function createUpgradeCodeMsg(ctx: AffluentContext, params: UpgradeCodeParams, value?: bigint): Promise<{
|
|
55
|
+
opts: {
|
|
56
|
+
newCode: import("@ton/core").Cell;
|
|
57
|
+
queryID: number | undefined;
|
|
58
|
+
};
|
|
59
|
+
input: {
|
|
60
|
+
to: import("@ton/core").Address;
|
|
61
|
+
value: bigint;
|
|
62
|
+
body: import("@ton/core").Cell;
|
|
63
|
+
};
|
|
64
|
+
}>;
|