@typus/typus-perp-sdk 1.1.32-codegen-exp5 → 1.1.32-codegen-exp8
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/src/client.d.ts +2 -1
- package/dist/src/client.js +41 -5
- package/dist/src/fetch.d.ts +3 -91
- package/dist/src/fetch.js +43 -41
- package/dist/src/generated/typus_perp/admin.d.ts +158 -1
- package/dist/src/generated/typus_perp/admin.js +211 -0
- package/dist/src/generated/typus_perp/competition.d.ts +39 -1
- package/dist/src/generated/typus_perp/competition.js +46 -0
- package/dist/src/generated/typus_perp/deps/sui/table.d.ts +31 -0
- package/dist/src/generated/typus_perp/{tlp.js → deps/sui/table.js} +28 -13
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +0 -8
- package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +3 -11
- package/dist/src/generated/typus_perp/error.d.ts +443 -0
- package/dist/src/generated/typus_perp/error.js +788 -0
- package/dist/src/generated/typus_perp/escrow.d.ts +51 -1
- package/dist/src/generated/typus_perp/escrow.js +63 -0
- package/dist/src/generated/typus_perp/lp_pool.d.ts +2 -476
- package/dist/src/generated/typus_perp/lp_pool.js +19 -492
- package/dist/src/generated/typus_perp/position.d.ts +1016 -1
- package/dist/src/generated/typus_perp/position.js +1187 -0
- package/dist/src/generated/typus_perp/profit_vault.d.ts +272 -0
- package/dist/src/generated/typus_perp/profit_vault.js +321 -0
- package/dist/src/generated/typus_perp/symbol.d.ts +30 -1
- package/dist/src/generated/typus_perp/symbol.js +42 -0
- package/dist/src/generated/typus_perp/trading.d.ts +56 -418
- package/dist/src/generated/typus_perp/trading.js +124 -552
- package/dist/src/generated/typus_perp/treasury_caps.d.ts +32 -1
- package/dist/src/generated/typus_perp/treasury_caps.js +40 -0
- package/dist/src/generated/typus_perp/user_account.d.ts +107 -1
- package/dist/src/generated/typus_perp/user_account.js +149 -0
- package/dist/src/generated/typus_stake_pool/admin.d.ts +9 -25
- package/dist/src/generated/typus_stake_pool/admin.js +11 -36
- package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +56 -4
- package/dist/src/generated/typus_stake_pool/stake_pool.js +68 -4
- package/dist/src/generated/utils/index.js +3 -0
- package/dist/src/grpc/graphql.d.ts +6 -6
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +13 -19
- package/dist/src/user/order.js +1 -6
- package/dist/src/user/orderWithBidReceipt.js +3 -3
- package/package.json +2 -2
- package/dist/src/generated/typus_perp/lending.d.ts +0 -47
- package/dist/src/generated/typus_perp/lending.js +0 -50
- package/dist/src/generated/typus_perp/tlp.d.ts +0 -13
package/dist/src/client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
|
3
3
|
import { DevInspectTransactionBlockParams, ExecuteTransactionBlockParams, GetCoinsParams, GetDynamicFieldsParams, GetObjectParams, GetOwnedObjectsParams, MultiGetObjectsParams, QueryEventsParams, SuiClient } from "@mysten/sui/client";
|
|
4
4
|
import { PythClient, TypusConfig } from "@typus/typus-sdk/dist/src/utils";
|
|
5
5
|
import type { Experimental_SuiClientTypes } from "@mysten/sui/experimental";
|
|
6
|
+
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
6
7
|
export type Network = "MAINNET" | "TESTNET";
|
|
7
8
|
export declare class TypusClient {
|
|
8
9
|
jsonRpcClient: SuiClient;
|
|
@@ -10,7 +11,7 @@ export declare class TypusClient {
|
|
|
10
11
|
graphQLClient: SuiGraphQLClient;
|
|
11
12
|
pythClient: PythClient;
|
|
12
13
|
config: TypusConfig;
|
|
13
|
-
constructor(config: TypusConfig);
|
|
14
|
+
constructor(config: TypusConfig, grpcTransport?: RpcTransport);
|
|
14
15
|
getCoins(params: GetCoinsParams): Promise<import("@mysten/sui/client").PaginatedCoins>;
|
|
15
16
|
getObject(params: GetObjectParams): Promise<import("@mysten/sui/client").SuiObjectResponse>;
|
|
16
17
|
getOwnedObjects(params: GetOwnedObjectsParams): Promise<import("@mysten/sui/client").PaginatedObjectsResponse>;
|
package/dist/src/client.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TypusClient = void 0;
|
|
4
|
+
const latest_1 = require("@mysten/sui/graphql/schemas/latest");
|
|
4
5
|
const graphql_1 = require("@mysten/sui/graphql");
|
|
5
6
|
const grpc_1 = require("@mysten/sui/grpc");
|
|
6
7
|
const client_1 = require("@mysten/sui/client");
|
|
7
8
|
const utils_1 = require("@typus/typus-sdk/dist/src/utils");
|
|
8
|
-
const
|
|
9
|
+
const grpcweb_transport_1 = require("@protobuf-ts/grpcweb-transport");
|
|
9
10
|
class TypusClient {
|
|
10
11
|
// user: string;
|
|
11
12
|
// mvr?: Experimental_SuiClientTypes.MvrOptions
|
|
12
|
-
constructor(config) {
|
|
13
|
+
constructor(config, grpcTransport) {
|
|
13
14
|
this.config = config;
|
|
14
15
|
const network = config.network.toLowerCase();
|
|
15
16
|
const mvr = {
|
|
16
17
|
overrides: {
|
|
17
18
|
packages: {
|
|
18
|
-
"@typus/perp":
|
|
19
|
-
"@typus/stake-pool":
|
|
19
|
+
"@typus/perp": config.package.perp.perp,
|
|
20
|
+
"@typus/stake-pool": config.package.perp.stakePool,
|
|
20
21
|
},
|
|
21
22
|
// types: {
|
|
22
23
|
// "@typus/perp": PERP_PACKAGE_ID,
|
|
@@ -31,7 +32,11 @@ class TypusClient {
|
|
|
31
32
|
});
|
|
32
33
|
this.gRpcClient = new grpc_1.SuiGrpcClient({
|
|
33
34
|
network: network,
|
|
34
|
-
|
|
35
|
+
transport: grpcTransport ??
|
|
36
|
+
new grpcweb_transport_1.GrpcWebFetchTransport({
|
|
37
|
+
baseUrl: `https://fullnode.${network}.sui.io:443`,
|
|
38
|
+
// Additional transport options
|
|
39
|
+
}),
|
|
35
40
|
});
|
|
36
41
|
this.graphQLClient = new graphql_1.SuiGraphQLClient({
|
|
37
42
|
network: network,
|
|
@@ -133,3 +138,34 @@ class TypusClient {
|
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
140
|
exports.TypusClient = TypusClient;
|
|
141
|
+
const dynamicFieldsQuery = (0, latest_1.graphql)(`
|
|
142
|
+
query ($id: SuiAddress!) {
|
|
143
|
+
address(address: $id) {
|
|
144
|
+
dynamicFields {
|
|
145
|
+
nodes {
|
|
146
|
+
name {
|
|
147
|
+
...Value
|
|
148
|
+
}
|
|
149
|
+
value {
|
|
150
|
+
__typename
|
|
151
|
+
... on MoveValue {
|
|
152
|
+
...Value
|
|
153
|
+
}
|
|
154
|
+
... on MoveObject {
|
|
155
|
+
contents {
|
|
156
|
+
...Value
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
fragment Value on MoveValue {
|
|
166
|
+
type {
|
|
167
|
+
repr
|
|
168
|
+
}
|
|
169
|
+
json
|
|
170
|
+
}
|
|
171
|
+
`);
|
package/dist/src/fetch.d.ts
CHANGED
|
@@ -1,95 +1,7 @@
|
|
|
1
1
|
import { TOKEN } from "@typus/typus-sdk/dist/src/constants";
|
|
2
2
|
import { TradingOrder, Position } from "./generated/typus_perp/position";
|
|
3
3
|
import { TypusClient } from "../src/client";
|
|
4
|
-
export declare function getLpPools(client: TypusClient): Promise<
|
|
5
|
-
id: {
|
|
6
|
-
id: string;
|
|
7
|
-
};
|
|
8
|
-
index: string;
|
|
9
|
-
lp_token_type: {
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
12
|
-
liquidity_tokens: {
|
|
13
|
-
name: string;
|
|
14
|
-
}[];
|
|
15
|
-
token_pools: {
|
|
16
|
-
token_type: {
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
19
|
-
config: {
|
|
20
|
-
oracle_id: string;
|
|
21
|
-
liquidity_token_decimal: string;
|
|
22
|
-
spot_config: {
|
|
23
|
-
min_deposit: string;
|
|
24
|
-
max_capacity: string;
|
|
25
|
-
target_weight_bp: string;
|
|
26
|
-
basic_mint_fee_bp: string;
|
|
27
|
-
additional_mint_fee_bp: string;
|
|
28
|
-
basic_burn_fee_bp: string;
|
|
29
|
-
additional_burn_fee_bp: string;
|
|
30
|
-
swap_fee_bp: string;
|
|
31
|
-
swap_fee_protocol_share_bp: string;
|
|
32
|
-
lending_protocol_share_bp: string;
|
|
33
|
-
u64_padding: string[];
|
|
34
|
-
};
|
|
35
|
-
margin_config: {
|
|
36
|
-
basic_borrow_rate_0: string;
|
|
37
|
-
basic_borrow_rate_1: string;
|
|
38
|
-
basic_borrow_rate_2: string;
|
|
39
|
-
utilization_threshold_bp_0: string;
|
|
40
|
-
utilization_threshold_bp_1: string;
|
|
41
|
-
borrow_interval_ts_ms: string;
|
|
42
|
-
max_order_reserve_ratio_bp: string;
|
|
43
|
-
u64_padding: string[];
|
|
44
|
-
};
|
|
45
|
-
u64_padding: string[];
|
|
46
|
-
};
|
|
47
|
-
state: {
|
|
48
|
-
liquidity_amount: string;
|
|
49
|
-
value_in_usd: string;
|
|
50
|
-
reserved_amount: string;
|
|
51
|
-
update_ts_ms: string;
|
|
52
|
-
is_active: boolean;
|
|
53
|
-
last_borrow_rate_ts_ms: string;
|
|
54
|
-
cumulative_borrow_rate: string;
|
|
55
|
-
previous_last_borrow_rate_ts_ms: string;
|
|
56
|
-
previous_cumulative_borrow_rate: string;
|
|
57
|
-
current_lending_amount: string[];
|
|
58
|
-
u64_padding: string[];
|
|
59
|
-
};
|
|
60
|
-
}[];
|
|
61
|
-
pool_info: {
|
|
62
|
-
lp_token_decimal: string;
|
|
63
|
-
total_share_supply: string;
|
|
64
|
-
tvl_usd: string;
|
|
65
|
-
is_active: boolean;
|
|
66
|
-
};
|
|
67
|
-
liquidated_unsettled_receipts: {
|
|
68
|
-
receipt: {
|
|
69
|
-
id: {
|
|
70
|
-
id: string;
|
|
71
|
-
};
|
|
72
|
-
vid: string;
|
|
73
|
-
index: string;
|
|
74
|
-
metadata: string;
|
|
75
|
-
u64_padding: string[];
|
|
76
|
-
}[];
|
|
77
|
-
position_id: string;
|
|
78
|
-
user: string;
|
|
79
|
-
token_types: {
|
|
80
|
-
name: string;
|
|
81
|
-
}[];
|
|
82
|
-
unrealized_pnl_sign: boolean;
|
|
83
|
-
unrealized_pnl: string;
|
|
84
|
-
unrealized_trading_fee: string;
|
|
85
|
-
unrealized_borrow_fee: string;
|
|
86
|
-
unrealized_funding_fee_sign: boolean;
|
|
87
|
-
unrealized_funding_fee: string;
|
|
88
|
-
unrealized_liquidator_fee: string;
|
|
89
|
-
}[];
|
|
90
|
-
u64_padding: string[];
|
|
91
|
-
bcs_padding: number[];
|
|
92
|
-
}[]>;
|
|
4
|
+
export declare function getLpPools(client: TypusClient): Promise<Uint8Array<ArrayBufferLike>[]>;
|
|
93
5
|
export declare function getLpPool(client: TypusClient, objectId: string): Promise<{
|
|
94
6
|
id: {
|
|
95
7
|
id: string;
|
|
@@ -341,7 +253,7 @@ export declare function getMarkets(client: TypusClient, input: {
|
|
|
341
253
|
u64_padding: string[];
|
|
342
254
|
};
|
|
343
255
|
}[]][]>;
|
|
344
|
-
export type TradingOrder =
|
|
256
|
+
export type TradingOrder = typeof TradingOrder.$inferType;
|
|
345
257
|
export type TradingOrderWithMarketIndex = TradingOrder & {
|
|
346
258
|
marketIndex: number;
|
|
347
259
|
};
|
|
@@ -349,7 +261,7 @@ export declare function getUserOrders(client: TypusClient, input: {
|
|
|
349
261
|
user: string;
|
|
350
262
|
indexes: string[];
|
|
351
263
|
}): Promise<TradingOrderWithMarketIndex[]>;
|
|
352
|
-
export type Position =
|
|
264
|
+
export type Position = typeof Position.$inferType;
|
|
353
265
|
export type PositionWithMarketIndex = Position & {
|
|
354
266
|
marketIndex: number;
|
|
355
267
|
};
|
package/dist/src/fetch.js
CHANGED
|
@@ -35,54 +35,56 @@ async function getLpPools(client) {
|
|
|
35
35
|
// // console.log(lpPool);
|
|
36
36
|
// lpPools.push(lpPool);
|
|
37
37
|
// }
|
|
38
|
-
// return lpPools;
|
|
39
|
-
return
|
|
38
|
+
// return lpPools.sort((a, b) => Number(a.index) - Number(b.index));
|
|
39
|
+
return await client.getDynamicObjectFieldsBcs(_1.LIQUIDITY_POOL);
|
|
40
40
|
}
|
|
41
41
|
async function getLpPool(client, objectId) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
const bcs = await client.getObjectBcs(objectId);
|
|
55
|
-
return
|
|
42
|
+
const data = await client.getObject({
|
|
43
|
+
id: objectId,
|
|
44
|
+
options: {
|
|
45
|
+
// request the bcs data when loading your object
|
|
46
|
+
showBcs: true,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
if (data.data?.bcs?.dataType !== "moveObject") {
|
|
50
|
+
throw new Error("Expected a move object");
|
|
51
|
+
}
|
|
52
|
+
// console.log(data.data.bcs.bcsBytes);
|
|
53
|
+
return lp_pool_2.LiquidityPool.fromBase64(data.data.bcs.bcsBytes);
|
|
54
|
+
// const bcs = await client.getObjectBcs(objectId);
|
|
55
|
+
// return LiquidityPool.parse(bcs!);
|
|
56
56
|
}
|
|
57
57
|
// getLpPool(client).then((x) => console.log(x));
|
|
58
58
|
async function getStakePools(client) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return (await client.getDynamicObjectFieldsBcs(
|
|
59
|
+
let dynamicFields = await client.getDynamicFields({
|
|
60
|
+
parentId: _1.STAKE_POOL,
|
|
61
|
+
});
|
|
62
|
+
let stakePools = [];
|
|
63
|
+
for (const field of dynamicFields.data) {
|
|
64
|
+
let stakePool = await getStakePool(client, field.objectId);
|
|
65
|
+
// console.log(stakePool);
|
|
66
|
+
stakePools.push(stakePool);
|
|
67
|
+
}
|
|
68
|
+
return stakePools.sort((a, b) => Number(a.pool_info.index) - Number(b.pool_info.index));
|
|
69
|
+
// return (await client.getDynamicObjectFieldsBcs(STAKE_POOL).then((x) => x.map((x) => StakePool.parse(x)))).sort(
|
|
70
|
+
// (a, b) => Number(a.pool_info.index) - Number(b.pool_info.index)
|
|
71
|
+
// );
|
|
70
72
|
}
|
|
71
73
|
async function getStakePool(client, objectId) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
const bcs = await client.getObjectBcs(objectId);
|
|
85
|
-
return
|
|
74
|
+
const data = await client.getObject({
|
|
75
|
+
id: objectId,
|
|
76
|
+
options: {
|
|
77
|
+
// request the bcs data when loading your object
|
|
78
|
+
showBcs: true,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
if (data.data?.bcs?.dataType !== "moveObject") {
|
|
82
|
+
throw new Error("Expected a move object");
|
|
83
|
+
}
|
|
84
|
+
// console.log(data.data.bcs.bcsBytes);
|
|
85
|
+
return stake_pool_1.StakePool.fromBase64(data.data.bcs.bcsBytes);
|
|
86
|
+
// const bcs = await client.getObjectBcs(objectId);
|
|
87
|
+
// return StakePool.parse(bcs!);
|
|
86
88
|
}
|
|
87
89
|
/**
|
|
88
90
|
* @returns [Markets, SymbolMarket[]][]
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Perpetual Protocol. It includes version management, authority control, and fee
|
|
7
7
|
* handling.
|
|
8
8
|
*/
|
|
9
|
-
import { MoveStruct } from "../utils/index";
|
|
9
|
+
import { MoveStruct, type RawTransactionArgument } from "../utils/index";
|
|
10
|
+
import { type Transaction } from "@mysten/sui/transactions";
|
|
10
11
|
export declare const FeeInfo: MoveStruct<{
|
|
11
12
|
/** The type name of the token. */
|
|
12
13
|
token: MoveStruct<{
|
|
@@ -115,3 +116,159 @@ export declare const PutInsuranceFundEvent: MoveStruct<{
|
|
|
115
116
|
/** The amount of funds put into the insurance fund. */
|
|
116
117
|
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
117
118
|
}, "@typus/perp::admin::PutInsuranceFundEvent">;
|
|
119
|
+
export interface VersionCheckArguments {
|
|
120
|
+
version: RawTransactionArgument<string>;
|
|
121
|
+
}
|
|
122
|
+
export interface VersionCheckOptions {
|
|
123
|
+
package?: string;
|
|
124
|
+
arguments: VersionCheckArguments | [version: RawTransactionArgument<string>];
|
|
125
|
+
}
|
|
126
|
+
/** Checks if the contract version is valid. */
|
|
127
|
+
export declare function versionCheck(options: VersionCheckOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
128
|
+
export interface UpgradeArguments {
|
|
129
|
+
version: RawTransactionArgument<string>;
|
|
130
|
+
}
|
|
131
|
+
export interface UpgradeOptions {
|
|
132
|
+
package?: string;
|
|
133
|
+
arguments: UpgradeArguments | [version: RawTransactionArgument<string>];
|
|
134
|
+
}
|
|
135
|
+
/** Upgrades the contract version. WARNING: no authority check inside */
|
|
136
|
+
export declare function upgrade(options: UpgradeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
137
|
+
export interface InitOptions {
|
|
138
|
+
package?: string;
|
|
139
|
+
arguments?: [];
|
|
140
|
+
}
|
|
141
|
+
export declare function init(options?: InitOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
142
|
+
export interface VerifyArguments {
|
|
143
|
+
version: RawTransactionArgument<string>;
|
|
144
|
+
}
|
|
145
|
+
export interface VerifyOptions {
|
|
146
|
+
package?: string;
|
|
147
|
+
arguments: VerifyArguments | [version: RawTransactionArgument<string>];
|
|
148
|
+
}
|
|
149
|
+
/** [Authorized Function] Verifies if the sender is an authorized user. */
|
|
150
|
+
export declare function verify(options: VerifyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
151
|
+
export interface AddAuthorizedUserArguments {
|
|
152
|
+
version: RawTransactionArgument<string>;
|
|
153
|
+
userAddress: RawTransactionArgument<string>;
|
|
154
|
+
}
|
|
155
|
+
export interface AddAuthorizedUserOptions {
|
|
156
|
+
package?: string;
|
|
157
|
+
arguments: AddAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
158
|
+
}
|
|
159
|
+
/** [Authorized Function] Adds an authorized user. */
|
|
160
|
+
export declare function addAuthorizedUser(options: AddAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
161
|
+
export interface RemoveAuthorizedUserArguments {
|
|
162
|
+
version: RawTransactionArgument<string>;
|
|
163
|
+
userAddress: RawTransactionArgument<string>;
|
|
164
|
+
}
|
|
165
|
+
export interface RemoveAuthorizedUserOptions {
|
|
166
|
+
package?: string;
|
|
167
|
+
arguments: RemoveAuthorizedUserArguments | [version: RawTransactionArgument<string>, userAddress: RawTransactionArgument<string>];
|
|
168
|
+
}
|
|
169
|
+
/** [Authorized Function] Removes an authorized user. */
|
|
170
|
+
export declare function removeAuthorizedUser(options: RemoveAuthorizedUserOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
171
|
+
export interface InstallEcosystemManagerCapEntryArguments {
|
|
172
|
+
version: RawTransactionArgument<string>;
|
|
173
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
174
|
+
}
|
|
175
|
+
export interface InstallEcosystemManagerCapEntryOptions {
|
|
176
|
+
package?: string;
|
|
177
|
+
arguments: InstallEcosystemManagerCapEntryArguments | [version: RawTransactionArgument<string>, typusEcosystemVersion: RawTransactionArgument<string>];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* [Authorized Function] Installs the ecosystem manager cap. TODO: can be remove
|
|
181
|
+
* after install
|
|
182
|
+
*/
|
|
183
|
+
export declare function installEcosystemManagerCapEntry(options: InstallEcosystemManagerCapEntryOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
184
|
+
export interface AddTailsExpAndLeaderboardArguments {
|
|
185
|
+
version: RawTransactionArgument<string>;
|
|
186
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
187
|
+
typusUserRegistry: RawTransactionArgument<string>;
|
|
188
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>;
|
|
189
|
+
user: RawTransactionArgument<string>;
|
|
190
|
+
tradingFeeUsd: RawTransactionArgument<number | bigint>;
|
|
191
|
+
expMultiplier: RawTransactionArgument<number | bigint>;
|
|
192
|
+
}
|
|
193
|
+
export interface AddTailsExpAndLeaderboardOptions {
|
|
194
|
+
package?: string;
|
|
195
|
+
arguments: AddTailsExpAndLeaderboardArguments | [
|
|
196
|
+
version: RawTransactionArgument<string>,
|
|
197
|
+
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
198
|
+
typusUserRegistry: RawTransactionArgument<string>,
|
|
199
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>,
|
|
200
|
+
user: RawTransactionArgument<string>,
|
|
201
|
+
tradingFeeUsd: RawTransactionArgument<number | bigint>,
|
|
202
|
+
expMultiplier: RawTransactionArgument<number | bigint>
|
|
203
|
+
];
|
|
204
|
+
}
|
|
205
|
+
export declare function addTailsExpAndLeaderboard(options: AddTailsExpAndLeaderboardOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
206
|
+
export interface AddCompetitionLeaderboardArguments {
|
|
207
|
+
version: RawTransactionArgument<string>;
|
|
208
|
+
typusEcosystemVersion: RawTransactionArgument<string>;
|
|
209
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>;
|
|
210
|
+
leaderboardKey: RawTransactionArgument<string>;
|
|
211
|
+
user: RawTransactionArgument<string>;
|
|
212
|
+
score: RawTransactionArgument<number | bigint>;
|
|
213
|
+
}
|
|
214
|
+
export interface AddCompetitionLeaderboardOptions {
|
|
215
|
+
package?: string;
|
|
216
|
+
arguments: AddCompetitionLeaderboardArguments | [
|
|
217
|
+
version: RawTransactionArgument<string>,
|
|
218
|
+
typusEcosystemVersion: RawTransactionArgument<string>,
|
|
219
|
+
typusLeaderboardRegistry: RawTransactionArgument<string>,
|
|
220
|
+
leaderboardKey: RawTransactionArgument<string>,
|
|
221
|
+
user: RawTransactionArgument<string>,
|
|
222
|
+
score: RawTransactionArgument<number | bigint>
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
/** Adds a score to the competition leaderboard. */
|
|
226
|
+
export declare function addCompetitionLeaderboard(options: AddCompetitionLeaderboardOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
227
|
+
export interface SendFeeArguments {
|
|
228
|
+
version: RawTransactionArgument<string>;
|
|
229
|
+
}
|
|
230
|
+
export interface SendFeeOptions {
|
|
231
|
+
package?: string;
|
|
232
|
+
arguments: SendFeeArguments | [version: RawTransactionArgument<string>];
|
|
233
|
+
typeArguments: [string];
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Sends the collected fees to the fee address. Safe with constant address as
|
|
237
|
+
* receiver
|
|
238
|
+
*/
|
|
239
|
+
export declare function sendFee(options: SendFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
240
|
+
export interface ChargeFeeArguments {
|
|
241
|
+
version: RawTransactionArgument<string>;
|
|
242
|
+
balance: RawTransactionArgument<string>;
|
|
243
|
+
}
|
|
244
|
+
export interface ChargeFeeOptions {
|
|
245
|
+
package?: string;
|
|
246
|
+
arguments: ChargeFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
247
|
+
typeArguments: [string];
|
|
248
|
+
}
|
|
249
|
+
/** Charges a protocol fee. */
|
|
250
|
+
export declare function chargeFee(options: ChargeFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
251
|
+
export interface SendLiquidatorFeeArguments {
|
|
252
|
+
version: RawTransactionArgument<string>;
|
|
253
|
+
}
|
|
254
|
+
export interface SendLiquidatorFeeOptions {
|
|
255
|
+
package?: string;
|
|
256
|
+
arguments: SendLiquidatorFeeArguments | [version: RawTransactionArgument<string>];
|
|
257
|
+
typeArguments: [string];
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Sends the liquidator fees to the fee address. Safe with constant address as
|
|
261
|
+
* receiver
|
|
262
|
+
*/
|
|
263
|
+
export declare function sendLiquidatorFee(options: SendLiquidatorFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
264
|
+
export interface ChargeLiquidatorFeeArguments {
|
|
265
|
+
version: RawTransactionArgument<string>;
|
|
266
|
+
balance: RawTransactionArgument<string>;
|
|
267
|
+
}
|
|
268
|
+
export interface ChargeLiquidatorFeeOptions {
|
|
269
|
+
package?: string;
|
|
270
|
+
arguments: ChargeLiquidatorFeeArguments | [version: RawTransactionArgument<string>, balance: RawTransactionArgument<string>];
|
|
271
|
+
typeArguments: [string];
|
|
272
|
+
}
|
|
273
|
+
/** Charges a liquidator fee. */
|
|
274
|
+
export declare function chargeLiquidatorFee(options: ChargeLiquidatorFeeOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|