@interest-protocol/blast-migrators-sdk 0.1.2 → 0.2.0
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/aborts.d.ts +12 -0
- package/dist/aborts.d.ts.map +1 -0
- package/dist/aborts.js +21 -0
- package/dist/aborts.js.map +1 -0
- package/dist/client.d.ts +8 -11
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +12 -14
- package/dist/client.js.map +1 -1
- package/dist/events.d.ts +30 -160
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +33 -168
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/reducer.d.ts +20 -132
- package/dist/reducer.d.ts.map +1 -1
- package/dist/reducer.js +28 -361
- package/dist/reducer.js.map +1 -1
- package/dist/state.d.ts +32 -152
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +61 -167
- package/dist/state.js.map +1 -1
- package/dist/transactions.d.ts +204 -259
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +347 -449
- package/dist/transactions.js.map +1 -1
- package/package.json +7 -10
- package/src/aborts.ts +24 -0
- package/src/client.ts +19 -34
- package/src/events.ts +54 -261
- package/src/index.ts +1 -3
- package/src/reducer.ts +46 -538
- package/src/state.ts +88 -282
- package/src/transactions.ts +569 -838
- package/dist/bluefin-pool.d.ts +0 -57
- package/dist/bluefin-pool.d.ts.map +0 -1
- package/dist/bluefin-pool.js +0 -102
- package/dist/bluefin-pool.js.map +0 -1
- package/dist/cetus-pool.d.ts +0 -44
- package/dist/cetus-pool.d.ts.map +0 -1
- package/dist/cetus-pool.js +0 -57
- package/dist/cetus-pool.js.map +0 -1
- package/src/bluefin-pool.ts +0 -180
- package/src/cetus-pool.ts +0 -107
package/dist/transactions.d.ts
CHANGED
|
@@ -1,314 +1,259 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { BlastFunAdminRole, LaunchpadDeployment, LaunchSettings, LaunchTypes, PreShareBuyInput } from "@interest-protocol/blast-launchpad-sdk/transactions";
|
|
6
|
-
import { LaunchpadCalls } from "@interest-protocol/blast-launchpad-sdk/transactions";
|
|
7
|
-
import type { TransactionObjectArgument, TransactionObjectInput, TransactionResult } from "@mysten/sui/transactions";
|
|
1
|
+
import { AdminCalls } from "@interest-protocol/blast-admin-sdk/transactions";
|
|
2
|
+
import type { SharedObjectIdentity } from "@interest-protocol/blast-core/sui";
|
|
3
|
+
import type { VaultDeployment } from "@interest-protocol/blast-vault-sdk/transactions";
|
|
4
|
+
import type { TransactionArgument, TransactionObjectInput, TransactionResult } from "@mysten/sui/transactions";
|
|
8
5
|
import { Transaction } from "@mysten/sui/transactions";
|
|
9
|
-
import type { MigratorVenue } from "./state.ts";
|
|
10
6
|
/**
|
|
11
|
-
* The
|
|
12
|
-
*
|
|
7
|
+
* The product-agnostic `blast_migrators` package: its shared
|
|
8
|
+
* `PackageVersion<BLAST_MIGRATORS>`, `PackageAdmin<BLAST_MIGRATORS>` and
|
|
9
|
+
* `venue_config::VenueConfig`, and the vault deployment (with core and admin)
|
|
10
|
+
* every venue call reads.
|
|
13
11
|
*/
|
|
14
|
-
export type LpFeePartner = {
|
|
15
|
-
partner?: SharedObjectReference<false> | null;
|
|
16
|
-
};
|
|
17
12
|
export type MigratorsDeployment = {
|
|
18
13
|
packageId: string;
|
|
19
14
|
originalPackageId: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
migratorsVersion: SharedObjectIdentity;
|
|
23
|
-
/** Migrators `lp_fee_policy::LpFeePolicy` read by every LP-fee collection. */
|
|
24
|
-
lpFeePolicy: SharedObjectIdentity;
|
|
25
|
-
/** Migrators `venue_config::VenueConfig`, holding each Meme's Cetus `PoolCreationCap`. */
|
|
15
|
+
packageVersion: SharedObjectIdentity;
|
|
16
|
+
packageAdmin: SharedObjectIdentity;
|
|
26
17
|
venueConfig: SharedObjectIdentity;
|
|
18
|
+
vault: VaultDeployment;
|
|
19
|
+
};
|
|
20
|
+
/** The venues `blast_migrators` defines, one module each. */
|
|
21
|
+
export declare const MIGRATOR_VENUES: readonly ["bluefin", "cetus"];
|
|
22
|
+
export type MigratorVenue = (typeof MIGRATOR_VENUES)[number];
|
|
23
|
+
/** `constants::bluefin_max_tick_spacing`: Bluefin pool creation's own bound. */
|
|
24
|
+
export declare const BLUEFIN_MAX_TICK_SPACING = 400;
|
|
25
|
+
/** `constants::bluefin_max_fee_rate`: Bluefin pool creation's own bound (1,000,000 is 100%). */
|
|
26
|
+
export declare const BLUEFIN_MAX_FEE_RATE = 20000n;
|
|
27
|
+
export declare function normalizeMigratorsDeployment(deployment: MigratorsDeployment): MigratorsDeployment;
|
|
28
|
+
/**
|
|
29
|
+
* `<migrators original>::<venue>::Venue`: the witness a venue seals tickets
|
|
30
|
+
* and redeems migrations under, and that a product and the vault registry
|
|
31
|
+
* admit.
|
|
32
|
+
*/
|
|
33
|
+
export declare function venueWitnessType(migrators: Pick<MigratorsDeployment, "originalPackageId">, venue: MigratorVenue): string;
|
|
34
|
+
/**
|
|
35
|
+
* The migrators venue a `Launch.venue` or `Presale.venue` `TypeName`
|
|
36
|
+
* (original-ID form) names, or null for any other venue.
|
|
37
|
+
*/
|
|
38
|
+
export declare function venueOf(migrators: Pick<MigratorsDeployment, "originalPackageId">, typeName: string): MigratorVenue | null;
|
|
39
|
+
/** A vault's `Meme` and `Quote`; pass original (defining) type addresses. */
|
|
40
|
+
type PairTypes = {
|
|
41
|
+
memeType: string;
|
|
42
|
+
quoteType: string;
|
|
43
|
+
};
|
|
44
|
+
/** The Cetus `config::GlobalConfig` and LP Burn `lp_burn::BurnManager` fee routes read. */
|
|
45
|
+
type CetusFeeObjects = {
|
|
46
|
+
config: SharedObjectIdentity;
|
|
47
|
+
burnManager: SharedObjectIdentity;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* One Cetus vault: `vault` is the `Vault<Meme, Quote>` and `pool` its own
|
|
51
|
+
* `Pool<CoinA, CoinB>`; `currency` is the Meme's Coin Registry
|
|
52
|
+
* `Currency<Meme>`, which the burn route burns through.
|
|
53
|
+
*/
|
|
54
|
+
type CetusVaultInput = PairTypes & {
|
|
55
|
+
vault: SharedObjectIdentity;
|
|
56
|
+
currency: SharedObjectIdentity;
|
|
57
|
+
cetus: CetusFeeObjects;
|
|
58
|
+
pool: SharedObjectIdentity;
|
|
27
59
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
60
|
+
/** One Bluefin vault: its `Vault<Meme, Quote>`, `Pool<Meme, Quote>` and `Currency<Meme>`. */
|
|
61
|
+
type BluefinVaultInput = PairTypes & {
|
|
62
|
+
vault: SharedObjectIdentity;
|
|
63
|
+
currency: SharedObjectIdentity;
|
|
64
|
+
bluefinConfig: SharedObjectIdentity;
|
|
65
|
+
pool: SharedObjectIdentity;
|
|
34
66
|
};
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
memeCurrency: SharedObjectReference<true>;
|
|
41
|
-
/** `LaunchConfig.creation_fee` in MIST, paid as an exact SUI coin. */
|
|
42
|
-
creationFee: bigint;
|
|
43
|
-
preShareBuy?: PreShareBuyInput;
|
|
67
|
+
/** A buyback's admin witness and swap bounds; `quoteIn` is atomic Quote. */
|
|
68
|
+
type BuybackInput = {
|
|
69
|
+
adminWitness: TransactionObjectInput;
|
|
70
|
+
quoteIn: bigint;
|
|
71
|
+
minMemeOut: bigint;
|
|
44
72
|
};
|
|
45
|
-
/**
|
|
46
|
-
|
|
73
|
+
/**
|
|
74
|
+
* `blast_migrators` venue calls, in Move argument order; `&mut TxContext` is
|
|
75
|
+
* implicit and the `Clock` is `0x6`. The migrators and vault package
|
|
76
|
+
* versions, the `VenueConfig`, the `VaultRegistry` and the core treasury
|
|
77
|
+
* come from the deployment. `prepare*` return the `VenueTicket<Meme, Quote>`
|
|
78
|
+
* the product's `new` consumes; `migrate*` consume the product's
|
|
79
|
+
* `Migration<Meme, Quote>` in the same PTB. Cetus calls take
|
|
80
|
+
* `<Meme, Quote, CoinA, CoinB>` with the pool's coin order from
|
|
81
|
+
* `cetusMemeSide`, so pass original (defining) type addresses.
|
|
82
|
+
*/
|
|
47
83
|
export declare class MigratorCalls {
|
|
48
84
|
#private;
|
|
49
85
|
readonly deployment: MigratorsDeployment;
|
|
50
|
-
|
|
86
|
+
/** `blast_migrators::BLAST_MIGRATORS`, the package's OTW. */
|
|
87
|
+
readonly otw: string;
|
|
51
88
|
constructor(deployment: MigratorsDeployment);
|
|
52
|
-
/** The adapter witness type a launch stores as its `migration_witness`. */
|
|
53
|
-
migrationWitnessType(venue: MigratorVenue): string;
|
|
54
|
-
signIn(options: {
|
|
55
|
-
adminCap: TransactionObjectInput;
|
|
56
|
-
role: BlastFunAdminRole;
|
|
57
|
-
}): (tx: Transaction) => TransactionObjectArgument;
|
|
58
89
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
90
|
+
* `cetus::prepare<Meme, Quote>(migrators_version, venue_config,
|
|
91
|
+
* cetus_config, pools, &mut sealed_treasury_cap, admission, tick_spacing)`:
|
|
92
|
+
* borrows the coin's sealed `TreasuryCap` with the product's `VenueAdmission`
|
|
93
|
+
* of this venue (`launch_config::venue_admission` or
|
|
94
|
+
* `creation_policy::venue_admission`, built earlier in the same PTB),
|
|
95
|
+
* reserves the Meme's Cetus pool and returns its `VenueTicket`.
|
|
62
96
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
97
|
+
prepareCetus(options: {
|
|
98
|
+
memeType: string;
|
|
99
|
+
quoteType: string;
|
|
100
|
+
cetus: {
|
|
101
|
+
config: SharedObjectIdentity;
|
|
102
|
+
pools: SharedObjectIdentity;
|
|
103
|
+
};
|
|
104
|
+
sealedTreasuryCap: TransactionObjectInput;
|
|
105
|
+
admission: TransactionArgument;
|
|
66
106
|
tickSpacing: number;
|
|
67
107
|
}): (tx: Transaction) => TransactionResult;
|
|
68
108
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
109
|
+
* `bluefin::prepare<Meme, Quote>(migrators_version, venue_config,
|
|
110
|
+
* &sealed_treasury_cap, ¤cy, tick_spacing, fee_rate)`: records the
|
|
111
|
+
* Meme's Bluefin tier and returns its `VenueTicket`. The sealed cap only
|
|
112
|
+
* proves control of the coin; Bluefin reserves nothing, so it is never
|
|
113
|
+
* borrowed. Rejects a tier outside
|
|
114
|
+
* Bluefin's own bounds (`EInvalidTier`: tick spacing 1..=400, fee rate
|
|
115
|
+
* 1..=20,000); the contract also aborts with `ESymbolTooLong` when the
|
|
116
|
+
* Meme symbol exceeds 32 bytes.
|
|
71
117
|
*/
|
|
72
|
-
|
|
73
|
-
|
|
118
|
+
prepareBluefin(options: {
|
|
119
|
+
memeType: string;
|
|
120
|
+
quoteType: string;
|
|
121
|
+
sealedTreasuryCap: TransactionObjectInput;
|
|
122
|
+
currency: SharedObjectIdentity;
|
|
74
123
|
tickSpacing: number;
|
|
75
124
|
feeRate: bigint;
|
|
76
125
|
}): (tx: Transaction) => TransactionResult;
|
|
77
126
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
127
|
+
* `cetus::migrate<Meme, Quote, CoinA, CoinB>(migration, migrators_version,
|
|
128
|
+
* venue_config, cetus_config, pools, burn_manager, registry, vault_version,
|
|
129
|
+
* treasury, clock)`; `CoinA`/`CoinB` follow `cetusMemeSide`. Cetus writes
|
|
130
|
+
* a clock-dependent amount of storage, so the PTB is budgeted at gross
|
|
131
|
+
* cost (`grossGasBudget`).
|
|
81
132
|
*/
|
|
82
|
-
migrateCetus(options:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
133
|
+
migrateCetus(options: {
|
|
134
|
+
migration: TransactionArgument;
|
|
135
|
+
memeType: string;
|
|
136
|
+
quoteType: string;
|
|
137
|
+
cetus: {
|
|
138
|
+
config: SharedObjectIdentity;
|
|
139
|
+
pools: SharedObjectIdentity;
|
|
140
|
+
burnManager: SharedObjectIdentity;
|
|
141
|
+
};
|
|
89
142
|
}): (tx: Transaction) => void;
|
|
90
143
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
144
|
+
* `bluefin::migrate<Meme, Quote>(migration, migrators_version,
|
|
145
|
+
* venue_config, currency, quote_currency, bluefin_config, registry,
|
|
146
|
+
* vault_version, treasury, creation_fee, clock)`; `creationFee` is a
|
|
147
|
+
* `Coin<SUI>` of Bluefin's pool creation fee.
|
|
93
148
|
*/
|
|
94
|
-
migrateBluefin(options:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
149
|
+
migrateBluefin(options: {
|
|
150
|
+
migration: TransactionArgument;
|
|
151
|
+
memeType: string;
|
|
152
|
+
quoteType: string;
|
|
153
|
+
currency: SharedObjectIdentity;
|
|
154
|
+
quoteCurrency: SharedObjectIdentity;
|
|
155
|
+
bluefinConfig: SharedObjectIdentity;
|
|
156
|
+
creationFee: TransactionArgument;
|
|
100
157
|
}): (tx: Transaction) => void;
|
|
101
158
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
159
|
+
* `cetus::collect_fees<Meme, Quote, CoinA, CoinB>(vault, migrators_version,
|
|
160
|
+
* vault_version, treasury, currency, cetus_config, burn_manager, pool)`:
|
|
161
|
+
* collects both positions' fees, splits them and burns the burn share's
|
|
162
|
+
* Meme; the auto-LP share waits in the vault for `compoundCetusAutoLp`.
|
|
163
|
+
* Anyone may call it.
|
|
105
164
|
*/
|
|
106
|
-
collectCetusFees(options:
|
|
107
|
-
memeSide: CetusMemeSide;
|
|
108
|
-
vault: SharedObjectReference<true>;
|
|
109
|
-
memeCurrency: SharedObjectReference<true>;
|
|
110
|
-
burnManager: SharedObjectReference<false>;
|
|
111
|
-
pool: SharedObjectReference<true>;
|
|
112
|
-
}): (tx: Transaction) => void;
|
|
113
|
-
/** Collects, splits, burns, and adds auto-LP for a Bluefin vault. Anyone may call it. */
|
|
114
|
-
collectBluefinFees(options: LaunchTypes & {
|
|
115
|
-
vault: SharedObjectReference<true>;
|
|
116
|
-
memeCurrency: SharedObjectReference<true>;
|
|
117
|
-
bluefinConfig: SharedObjectReference<false>;
|
|
118
|
-
pool: SharedObjectReference<true>;
|
|
119
|
-
}): (tx: Transaction) => void;
|
|
165
|
+
collectCetusFees(options: CetusVaultInput): (tx: Transaction) => void;
|
|
120
166
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
167
|
+
* `cetus::settle_and_apply_fee_split(..., pool, clock)`: `collectCetusFees`
|
|
168
|
+
* under the current split, then applies the ready scheduled split. Anyone
|
|
169
|
+
* may call it.
|
|
124
170
|
*/
|
|
125
|
-
|
|
126
|
-
memeSide: CetusMemeSide;
|
|
127
|
-
vault: SharedObjectReference<true>;
|
|
128
|
-
launch: SharedObjectReference;
|
|
129
|
-
curveFeeCap: TransactionObjectInput;
|
|
130
|
-
memeCurrency: SharedObjectReference<true>;
|
|
131
|
-
burnManager: SharedObjectReference<false>;
|
|
132
|
-
pool: SharedObjectReference<true>;
|
|
133
|
-
feeSplit: FeeSplit;
|
|
134
|
-
}): (tx: Transaction) => void;
|
|
135
|
-
/** Bluefin counterpart of `settleAndUpdateCetusFeeSplit`. */
|
|
136
|
-
settleAndUpdateBluefinFeeSplit(options: LaunchTypes & {
|
|
137
|
-
vault: SharedObjectReference<true>;
|
|
138
|
-
launch: SharedObjectReference;
|
|
139
|
-
curveFeeCap: TransactionObjectInput;
|
|
140
|
-
memeCurrency: SharedObjectReference<true>;
|
|
141
|
-
bluefinConfig: SharedObjectReference<false>;
|
|
142
|
-
pool: SharedObjectReference<true>;
|
|
143
|
-
feeSplit: FeeSplit;
|
|
144
|
-
}): (tx: Transaction) => void;
|
|
171
|
+
settleAndApplyCetusFeeSplit(options: CetusVaultInput): (tx: Transaction) => void;
|
|
145
172
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* an off-chain price, since anyone can move the pool's price within a
|
|
151
|
-
* transaction. Unspent Quote waits for the next buyback.
|
|
173
|
+
* `bluefin::collect_fees<Meme, Quote>(vault, migrators_version,
|
|
174
|
+
* vault_version, treasury, currency, bluefin_config, pool, clock)`: the
|
|
175
|
+
* auto-LP share waits in the vault for `compoundBluefinAutoLp`. Anyone may
|
|
176
|
+
* call it.
|
|
152
177
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
178
|
+
collectBluefinFees(options: BluefinVaultInput): (tx: Transaction) => void;
|
|
179
|
+
/** `bluefin::settle_and_apply_fee_split`, same arguments as `collectBluefinFees`. */
|
|
180
|
+
settleAndApplyBluefinFeeSplit(options: BluefinVaultInput): (tx: Transaction) => void;
|
|
181
|
+
/** Adds waiting auto-LP balances under AutoLpAdmin and keeper price bounds.
|
|
182
|
+
* The private entry consumes and re-shares the pool, so put it last in a PTB.
|
|
183
|
+
* Bounds are inclusive Q64.64 sqrt prices in venue pool coin order.
|
|
184
|
+
*/
|
|
185
|
+
compoundCetusAutoLp(options: PairTypes & AutoLpInput & {
|
|
186
|
+
vault: SharedObjectIdentity;
|
|
187
|
+
cetus: {
|
|
188
|
+
config: SharedObjectIdentity;
|
|
189
|
+
};
|
|
190
|
+
pool: SharedObjectIdentity;
|
|
161
191
|
}): (tx: Transaction) => void;
|
|
162
|
-
/** Bluefin
|
|
163
|
-
|
|
164
|
-
vault:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
bluefinConfig: SharedObjectReference<false>;
|
|
168
|
-
pool: SharedObjectReference<true>;
|
|
169
|
-
quoteIn: bigint;
|
|
170
|
-
minMemeOut: bigint;
|
|
192
|
+
/** Bluefin's private AutoLpAdmin entry; see compoundCetusAutoLp. */
|
|
193
|
+
compoundBluefinAutoLp(options: PairTypes & AutoLpInput & {
|
|
194
|
+
vault: SharedObjectIdentity;
|
|
195
|
+
bluefinConfig: SharedObjectIdentity;
|
|
196
|
+
pool: SharedObjectIdentity;
|
|
171
197
|
}): (tx: Transaction) => void;
|
|
172
198
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
curveFeeCap: TransactionObjectInput;
|
|
180
|
-
}): (tx: Transaction) => TransactionResult;
|
|
181
|
-
/**
|
|
182
|
-
* `vault::claim_protocol_lp_fees_with_partner`: pays a partnered vault's held
|
|
183
|
-
* Blast LP fees, the launch's partner its cut in force of each asset, rounded
|
|
184
|
-
* down, and the `LpFeePolicy` destination the rest. Anyone may call it;
|
|
185
|
-
* holding nothing pays nothing.
|
|
199
|
+
* `cetus::buyback_and_burn<Meme, Quote, CoinA, CoinB>(vault,
|
|
200
|
+
* migrators_version, vault_version, admin_witness, currency, cetus_config,
|
|
201
|
+
* pool, quote_in, min_meme_out, clock)` under a `BuybackAdmin` witness.
|
|
202
|
+
* Swaps `quoteIn` of the vault's burn Quote and burns the Meme bought;
|
|
203
|
+
* aborts unless the swap returns at least `minMemeOut`, which the admin
|
|
204
|
+
* sets from an off-chain price.
|
|
186
205
|
*/
|
|
187
|
-
|
|
188
|
-
vault:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
adminWitness: TransactionObjectInput;
|
|
195
|
-
}): (tx: Transaction) => TransactionResult;
|
|
196
|
-
/** Changes Blast's default Meme and Quote LP-fee shares for coins without their own pair (`FeeAdmin`). */
|
|
197
|
-
setLpFeeDefaultShares(options: {
|
|
198
|
-
adminWitness: TransactionObjectInput;
|
|
199
|
-
memeBps: bigint;
|
|
200
|
-
quoteBps: bigint;
|
|
201
|
-
}): (tx: Transaction) => void;
|
|
202
|
-
/** Sets Blast's LP-fee shares for one original Meme type (`FeeAdmin`). */
|
|
203
|
-
setLpFeeCoinShares(options: {
|
|
204
|
-
memeType: string;
|
|
205
|
-
adminWitness: TransactionObjectInput;
|
|
206
|
-
memeBps: bigint;
|
|
207
|
-
quoteBps: bigint;
|
|
208
|
-
}): (tx: Transaction) => void;
|
|
209
|
-
/** Removes one Meme type's own pair so its collections use the defaults again (`FeeAdmin`). */
|
|
210
|
-
clearLpFeeCoinShares(options: {
|
|
211
|
-
memeType: string;
|
|
212
|
-
adminWitness: TransactionObjectInput;
|
|
213
|
-
}): (tx: Transaction) => void;
|
|
214
|
-
/** Redirects every later protocol LP-fee payout (`TreasuryAdmin`). */
|
|
215
|
-
setLpFeeProtocolDestination(options: {
|
|
216
|
-
adminWitness: TransactionObjectInput;
|
|
217
|
-
destination: string;
|
|
206
|
+
buybackAndBurnCetus(options: PairTypes & BuybackInput & {
|
|
207
|
+
vault: SharedObjectIdentity;
|
|
208
|
+
currency: SharedObjectIdentity;
|
|
209
|
+
cetus: {
|
|
210
|
+
config: SharedObjectIdentity;
|
|
211
|
+
};
|
|
212
|
+
pool: SharedObjectIdentity;
|
|
218
213
|
}): (tx: Transaction) => void;
|
|
219
214
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
215
|
+
* `bluefin::buyback_and_burn<Meme, Quote>(vault, migrators_version,
|
|
216
|
+
* vault_version, admin_witness, currency, bluefin_config, pool, quote_in,
|
|
217
|
+
* min_meme_out, clock)`; see `buybackAndBurnCetus`.
|
|
223
218
|
*/
|
|
224
|
-
|
|
225
|
-
vault:
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
/** Relays one allocation's proof; the round pays its committed beneficiary. */
|
|
230
|
-
claimHolderReward(options: LaunchTypes & {
|
|
231
|
-
round: SharedObjectReference<true>;
|
|
232
|
-
allocation: RewardProof;
|
|
219
|
+
buybackAndBurnBluefin(options: PairTypes & BuybackInput & {
|
|
220
|
+
vault: SharedObjectIdentity;
|
|
221
|
+
currency: SharedObjectIdentity;
|
|
222
|
+
bluefinConfig: SharedObjectIdentity;
|
|
223
|
+
pool: SharedObjectIdentity;
|
|
233
224
|
}): (tx: Transaction) => void;
|
|
234
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* One-call PTBs for a migrated vault's venue routes: fee collection,
|
|
228
|
+
* settlement and auto-LP compounding (anyone) and buybacks (an `AdminCap` holding
|
|
229
|
+
* `blast_domain::BuybackAdmin`). Preparation and migration are composed
|
|
230
|
+
* with the product's own calls by the launchpad and presale packages.
|
|
231
|
+
*/
|
|
235
232
|
export declare class MigratorTransactions {
|
|
236
233
|
#private;
|
|
237
234
|
readonly call: MigratorCalls;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/** Bluefin counterpart of `createCetusLaunch`. */
|
|
248
|
-
createBluefinLaunch(options: CreateLaunchOptions & {
|
|
249
|
-
tickSpacing: number;
|
|
250
|
-
feeRate: bigint;
|
|
251
|
-
}): Transaction;
|
|
252
|
-
migrateCetus(options: Parameters<MigratorCalls["migrateCetus"]>[0]): Transaction;
|
|
253
|
-
/** Pays Bluefin's SUI pool-creation fee as an exact-balance coin. */
|
|
254
|
-
migrateBluefin(options: Omit<Parameters<MigratorCalls["migrateBluefin"]>[0], "creationFee"> & {
|
|
255
|
-
creationFee: bigint;
|
|
256
|
-
} & CoinSourceOptions): Transaction;
|
|
257
|
-
/** Then pays the vault's partner when `partner` is given; see `claimProtocolLpFeesWithPartner`. */
|
|
258
|
-
collectCetusFees(options: Parameters<MigratorCalls["collectCetusFees"]>[0] & LpFeePartner): Transaction;
|
|
259
|
-
/** Then pays the vault's partner when `partner` is given; see `claimProtocolLpFeesWithPartner`. */
|
|
260
|
-
collectBluefinFees(options: Parameters<MigratorCalls["collectBluefinFees"]>[0] & LpFeePartner): Transaction;
|
|
261
|
-
/** Pays a partnered vault's partner and Blast the LP fees its collections held. */
|
|
262
|
-
claimProtocolLpFeesWithPartner(options: Parameters<MigratorCalls["claimProtocolLpFeesWithPartner"]>[0]): Transaction;
|
|
263
|
-
settleAndUpdateCetusFeeSplit(options: Omit<Parameters<MigratorCalls["settleAndUpdateCetusFeeSplit"]>[0], "curveFeeCap"> & {
|
|
264
|
-
curveFeeCapId: string;
|
|
265
|
-
}): Transaction;
|
|
266
|
-
settleAndUpdateBluefinFeeSplit(options: Omit<Parameters<MigratorCalls["settleAndUpdateBluefinFeeSplit"]>[0], "curveFeeCap"> & {
|
|
267
|
-
curveFeeCapId: string;
|
|
268
|
-
}): Transaction;
|
|
269
|
-
claimCreatorFees(options: LaunchTypes & {
|
|
270
|
-
vault: SharedObjectReference<true>;
|
|
271
|
-
launch: SharedObjectReference;
|
|
272
|
-
curveFeeCapId: string;
|
|
273
|
-
recipient: string;
|
|
274
|
-
}): Transaction;
|
|
275
|
-
claimProtocolFees(options: LaunchTypes & {
|
|
276
|
-
vault: SharedObjectReference<true>;
|
|
277
|
-
adminCapId: string;
|
|
278
|
-
recipient: string;
|
|
279
|
-
}): Transaction;
|
|
280
|
-
setLpFeeDefaultShares(options: {
|
|
281
|
-
adminCapId: string;
|
|
282
|
-
memeBps: bigint;
|
|
283
|
-
quoteBps: bigint;
|
|
284
|
-
}): Transaction;
|
|
285
|
-
setLpFeeCoinShares(options: {
|
|
286
|
-
memeType: string;
|
|
287
|
-
adminCapId: string;
|
|
288
|
-
memeBps: bigint;
|
|
289
|
-
quoteBps: bigint;
|
|
290
|
-
}): Transaction;
|
|
291
|
-
clearLpFeeCoinShares(options: {
|
|
292
|
-
memeType: string;
|
|
293
|
-
adminCapId: string;
|
|
294
|
-
}): Transaction;
|
|
295
|
-
setLpFeeProtocolDestination(options: {
|
|
296
|
-
adminCapId: string;
|
|
297
|
-
destination: string;
|
|
298
|
-
}): Transaction;
|
|
235
|
+
readonly admin: AdminCalls;
|
|
236
|
+
constructor(deployment: MigratorsDeployment);
|
|
237
|
+
collectCetusFees(options: CetusVaultInput): Transaction;
|
|
238
|
+
settleAndApplyCetusFeeSplit(options: CetusVaultInput): Transaction;
|
|
239
|
+
collectBluefinFees(options: BluefinVaultInput): Transaction;
|
|
240
|
+
settleAndApplyBluefinFeeSplit(options: BluefinVaultInput): Transaction;
|
|
241
|
+
compoundCetusAutoLp(options: Parameters<MigratorCalls["compoundCetusAutoLp"]>[0]): Transaction;
|
|
242
|
+
compoundBluefinAutoLp(options: Parameters<MigratorCalls["compoundBluefinAutoLp"]>[0]): Transaction;
|
|
243
|
+
/** Signs in as `BuybackAdmin` with `adminCapId`, then `buybackAndBurnCetus`. */
|
|
299
244
|
buybackAndBurnCetus(options: Omit<Parameters<MigratorCalls["buybackAndBurnCetus"]>[0], "adminWitness"> & {
|
|
300
245
|
adminCapId: string;
|
|
301
246
|
}): Transaction;
|
|
247
|
+
/** Signs in as `BuybackAdmin` with `adminCapId`, then `buybackAndBurnBluefin`. */
|
|
302
248
|
buybackAndBurnBluefin(options: Omit<Parameters<MigratorCalls["buybackAndBurnBluefin"]>[0], "adminWitness"> & {
|
|
303
249
|
adminCapId: string;
|
|
304
250
|
}): Transaction;
|
|
305
|
-
publishHolderRewardRound(options: Omit<Parameters<MigratorCalls["publishHolderRewardRound"]>[0], "adminWitness"> & {
|
|
306
|
-
adminCapId: string;
|
|
307
|
-
}): Transaction;
|
|
308
|
-
/** Relays up to `allocations.length` proofs of one round in a single PTB. */
|
|
309
|
-
claimHolderRewards(options: LaunchTypes & {
|
|
310
|
-
round: SharedObjectReference<true>;
|
|
311
|
-
allocations: readonly RewardProof[];
|
|
312
|
-
}): Transaction;
|
|
313
251
|
}
|
|
252
|
+
/** Authority and inclusive pool-order Q64.64 bounds for a private auto-LP entry. */
|
|
253
|
+
export type AutoLpInput = {
|
|
254
|
+
adminCap: TransactionObjectInput;
|
|
255
|
+
minSqrtPrice: bigint;
|
|
256
|
+
maxSqrtPrice: bigint;
|
|
257
|
+
};
|
|
258
|
+
export {};
|
|
314
259
|
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAU7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAK9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAEvF,OAAO,KAAK,EACV,mBAAmB,EAEnB,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,oBAAoB,CAAC;IACrC,YAAY,EAAE,oBAAoB,CAAC;IACnC,WAAW,EAAE,oBAAoB,CAAC;IAClC,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,eAAe,YAAI,SAAS,EAAE,OAAO,CAAU,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,SAAU,CAAC;AAE5C,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,mBAAmB,GAC9B,mBAAmB,CAiBrB;AAED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