@typus/typus-sdk 1.3.2 → 1.3.21
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/lib/config.json +30 -20
- package/lib/load_env.d.ts +1 -0
- package/lib/load_env.js +9 -0
- package/lib/utils/airdrop/user-entry.js +1 -1
- package/lib/utils/nft-staking/user-entry.d.ts +0 -84
- package/lib/utils/nft-staking/user-entry.js +591 -594
- package/lib/utils/tails-exp-dice/user-entry.d.ts +43 -0
- package/lib/utils/tails-exp-dice/user-entry.js +89 -1
- package/lib/utils/tails-staking/authorized-entry.d.ts +182 -0
- package/lib/utils/tails-staking/authorized-entry.js +248 -0
- package/lib/utils/tails-staking/user-entry.d.ts +155 -0
- package/lib/utils/tails-staking/user-entry.js +388 -0
- package/lib/utils/tails-staking/view-function.d.ts +21 -0
- package/lib/utils/tails-staking/view-function.js +118 -0
- package/lib/utils/typus-dov-single-v2/function/bidding.js +12 -13
- package/lib/utils/typus-dov-single-v2/user-history.js +51 -2
- package/lib/utils/typus-nft/fetch.d.ts +1 -1
- package/lib/utils/typus-nft/fetch.js +2 -2
- package/package.json +1 -1
package/lib/config.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"MAINNET": {
|
|
3
3
|
"RPC_ENDPOINT": "https://fullnode.mainnet.sui.io:443",
|
|
4
|
-
"TYPUS_VERSION": "0xd2882b992e986250b3304b59530700bc3850939f9a77e9e9dfa9cf1656f84b3d",
|
|
5
|
-
"TGLD_COIN_METADATA": "0x3a070c729606334a2be7c51ab28da9a1101b0de01452dd62c10cda0f7a5795d2",
|
|
6
|
-
"TGLD_TOKEN_POLICY": "0xd9461bd329f1df24be9698131b6e2c2b9eaac7c9cf6d76689112f2e57be12009",
|
|
7
|
-
"NFT_TRANSFER_POLICY": "0x55475b9e16d9a0176dcef37f83a1921b15f2cbd2711a5f30b9d952c0c8f5f957",
|
|
8
|
-
"STRATEGY_POOL": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c",
|
|
9
4
|
"PACKAGE_ORIGIN": {
|
|
10
5
|
"DOV_SINGLE": "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a",
|
|
11
6
|
"FRAMEWORK": "0xb4f25230ba74837d8299e92951306100c4a532e8c48cc3d8828abe9b91c8b274",
|
|
@@ -15,18 +10,19 @@
|
|
|
15
10
|
"TYPUS": "0x4b0f4ee1a40ce37ec81c987cc4e76a665419e74b863319492fc7d26f708b835a"
|
|
16
11
|
},
|
|
17
12
|
"PACKAGE": {
|
|
18
|
-
"DOV_SINGLE": "
|
|
19
|
-
"FRAMEWORK": "
|
|
13
|
+
"DOV_SINGLE": "0xad3173f38fda1949fd785f8b1c0ea5c8e086d6192905eca5340a6ca9e481a68a",
|
|
14
|
+
"FRAMEWORK": "0x083b89937db53d8dd797dee3ba431083fee43c6bf5993005886daba19e942fb2",
|
|
20
15
|
"MFUD": "0xd8f04cd2a16c19c17428c3b4c22b01dd06740423b93fb7ee88fbe2676a82849d",
|
|
21
16
|
"NFT": "0xba06aae31d9b7c9f651e783272c7e4f776fb5ae17e89d525b75a17b099f58202",
|
|
22
17
|
"ORACLE": "0x978f65df8570a075298598a9965c18de9087f9e888eb3430fe20334f5c554cfd",
|
|
23
|
-
"TYPUS": "
|
|
18
|
+
"TYPUS": "0xf5c7e61fd28d1ed38711f03e1c5ffc6c5b8435eff386132fc5822efe6d90b138"
|
|
24
19
|
},
|
|
25
20
|
"REGISTRY": {
|
|
26
21
|
"AIRDROP": "0x4b451f4632bd64af82d5e6fe46e20705c9468bd46d6758a0f7093fde2930d084",
|
|
27
22
|
"DOV_SINGLE": "0x3d70b09359e3ca8301ae0abeda4f2fdf72ce313ba58c919ce568e5f535fd2ea8",
|
|
28
23
|
"LEADERBOARD": "0xc515a3e7fd12ba902f7f1ebe52c676136e1b34cb614ae9c79a46b257ca7d5534",
|
|
29
24
|
"MFUD": "0xb8d7e7ab783e56700c0212bd9f0938bba9dd3e7241c149e6c52b21334ec45ece",
|
|
25
|
+
"TAILS_STAKING": "",
|
|
30
26
|
"TGLD": "0x8ee1af362fe9e0a29f6bad48d8ff44249ece5aaa77a4302c2ffcc90950e52ed2",
|
|
31
27
|
"USER": "0xb1b16eb4845b5ee1a29432b1f2bcfe8cbb33c234492baf31a706d82e28e18bce"
|
|
32
28
|
},
|
|
@@ -46,20 +42,22 @@
|
|
|
46
42
|
"SUI": "0xeb6b3e3300ff884604ead6172b0aeadee3854980cab65a7feb57300b04b74cc1",
|
|
47
43
|
"TURBOS": "0x819ff07b5768d7b9b428b69b123140f6a74b04eaa978a4cbab9055025bd1536d",
|
|
48
44
|
"WBTC": "0x61813dc2e46dba41b14507857827f0ed7e99b0be242548828769728b81c8fab5",
|
|
49
|
-
"WETH": "0x253bbaaa35275240cf6df03258489707ea059762831e4102ebaabafd442bc935"
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
"WETH": "0x253bbaaa35275240cf6df03258489707ea059762831e4102ebaabafd442bc935"
|
|
46
|
+
},
|
|
47
|
+
"OBJECT": {
|
|
48
|
+
"TYPUS_VERSION": "0xd2882b992e986250b3304b59530700bc3850939f9a77e9e9dfa9cf1656f84b3d",
|
|
49
|
+
"TGLD_COIN_METADATA": "0x3a070c729606334a2be7c51ab28da9a1101b0de01452dd62c10cda0f7a5795d2",
|
|
50
|
+
"TGLD_TOKEN_POLICY": "0xd9461bd329f1df24be9698131b6e2c2b9eaac7c9cf6d76689112f2e57be12009",
|
|
51
|
+
"NFT_TRANSFER_POLICY": "0x55475b9e16d9a0176dcef37f83a1921b15f2cbd2711a5f30b9d952c0c8f5f957",
|
|
52
|
+
"STRATEGY_POOL": "0x2c60ddd50d76beb00faa025962d566359a6ea05b1f7f19ac6bd050f4db8c885c",
|
|
53
|
+
"TAILS_IDS": ""
|
|
52
54
|
}
|
|
53
55
|
},
|
|
54
56
|
"TESTNET": {
|
|
55
57
|
"RPC_ENDPOINT": "https://sui-testnet.blastapi.io:443/7f446a12-c4ab-4e3c-b2d8-ebb0fcbe5cdd",
|
|
56
|
-
"TYPUS_VERSION": "0x2edc980f55e31ba3c660f4e2650e915fd47fb33b524b01a52a116719adac8be7",
|
|
57
|
-
"TGLD_COIN_METADATA": "0xf77f8aabe64dccef0e568f2ef58a6ca74bdfb31786507cc35b7626a4df0d0ebc",
|
|
58
|
-
"TGLD_TOKEN_POLICY": "0x17875c2f772053cd148bd2b8b8a40160db3f841825d8963192f8394d5c18974c",
|
|
59
|
-
"NFT_TRANSFER_POLICY": "0x1c62271ecc443c3d92a8fe8f5662e877856d26b971d967f66937a65f55160831",
|
|
60
|
-
"STRATEGY_POOL": "0x50b01081469d032e04bfcbd057614b1359376920f55c7bebd076e0e2af07a57f",
|
|
61
58
|
"PACKAGE_ORIGIN": {
|
|
62
59
|
"DOV_SINGLE": "0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f",
|
|
60
|
+
"TAILS_EXP": "0x9b43ee208a3b235810c145bca1161d1a71d08bfe76b1e55bb3db319ea95d0149",
|
|
63
61
|
"FRAMEWORK": "0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded",
|
|
64
62
|
"MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
|
|
65
63
|
"NFT": "0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828",
|
|
@@ -68,18 +66,21 @@
|
|
|
68
66
|
"LOCKED_VAULT": "0xe79b7ba69b750d30ac7ae171483a4064d0bb34090493fef3c844a11b05818d79"
|
|
69
67
|
},
|
|
70
68
|
"PACKAGE": {
|
|
71
|
-
"DOV_SINGLE": "
|
|
72
|
-
"
|
|
69
|
+
"DOV_SINGLE": "0x2e462aa0224bec76acaea81c51ca5b9ae4b27ec50281a764797c84148c8a463f",
|
|
70
|
+
"TAILS_EXP": "0x4aab9bfc3efe279981d73eca80129356238508d3f2ffdda38a4832faf94e0b9a",
|
|
71
|
+
"FRAMEWORK": "0x90ca6e2393e3adc91b4e9b70ab16c017e5f70f7094b6f09b913fef2833a656e9",
|
|
73
72
|
"MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
|
|
74
73
|
"NFT": "0x0f5162014f18686640b8d0adefd60c3fe5b377413ec4f1e77001c67d96f8501a",
|
|
75
74
|
"ORACLE": "0x71fbc7acaf513561dabdeb846e7dd5288108e56edb0b6de8d4999c4dfce21f66",
|
|
76
|
-
"TYPUS": "
|
|
75
|
+
"TYPUS": "0x88124ef8caf346cc19bf7447e72cf540fb6f228f16806effdc3dafccee747264"
|
|
77
76
|
},
|
|
78
77
|
"REGISTRY": {
|
|
79
78
|
"AIRDROP": "0xfb2fbf261f6050d100bcd026ffa0076e088506b1bec26313947239303e2a0224",
|
|
80
79
|
"DOV_SINGLE": "0x0285cbf4aa8585be6c978235d11d06fa35773266ede040d38d34e1d79b049460",
|
|
81
80
|
"LEADERBOARD": "0x4faabe5a4a509a145fc9bae95761d34c11571da4cb25d681f06ffcbadbc355e7",
|
|
82
81
|
"MFUD": "0x7ad87901531693f1baa541712947860dcc543617e11b14993ad70d20daf159c6",
|
|
82
|
+
"TAILS_EXP": "0x37e0c8c80a5099d5dfe1b0aeae62e3f01916be73935090efb9c95279b7bb1ce7",
|
|
83
|
+
"TAILS_STAKING": "0x989bd585b580dfc22d9d7656a5807b2f6c8fe36260a2003ef697adc8a38d21af",
|
|
83
84
|
"TGLD": "0x2118b4056c89d90a6dc40d198fbe239cb8e83f7ea20daaf4ea53341c7fdb043c",
|
|
84
85
|
"USER": "0x5f1894a3680949111a7530d63ceda6857d31521ab2de625e9f826cae17c9a7f3",
|
|
85
86
|
"LOCKED_VAULT": "0x50f1fc44c907f8738b098abf2b594e523739df7d40df8164154cfe6f60513302"
|
|
@@ -89,7 +90,8 @@
|
|
|
89
90
|
"MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c::mfud::MFUD",
|
|
90
91
|
"SUI": "0x2::sui::SUI",
|
|
91
92
|
"TGLD": "0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277::tgld::TGLD",
|
|
92
|
-
"USDT": "0xa38dad920880f81ea514de6db007d3a84e9116a29c60b3e69bbe418c2d9f553c::usdt::USDT"
|
|
93
|
+
"USDT": "0xa38dad920880f81ea514de6db007d3a84e9116a29c60b3e69bbe418c2d9f553c::usdt::USDT",
|
|
94
|
+
"AFSUI": "0xd31923b6821fb7ba32d23e514b43d307da6ef991f9ef1af2cc4e26a0992ac87a::afsui::AFSUI"
|
|
93
95
|
},
|
|
94
96
|
"ORACLE": {
|
|
95
97
|
"AFSUI": "0xacd75f051b8be445226f92d873fbf9bbc26fe25cec5708b1aeec44286dbbef5b",
|
|
@@ -107,6 +109,14 @@
|
|
|
107
109
|
"USDY": "0x604408004efddc03323cd6f6a72b98695dbdced57a630ca2622e6b96fc94a3f6",
|
|
108
110
|
"WBTC": "0xaa72a2b370cf45a7b1363a2b9e3f0c57c05863375b984e2ca0928973574404f2",
|
|
109
111
|
"WETH": "0x0ac9f9275eb0ac33b7f59741b1df67a6783af2db6d2a4e5aba8ce350d5b6b260"
|
|
112
|
+
},
|
|
113
|
+
"OBJECT": {
|
|
114
|
+
"TYPUS_VERSION": "0x2edc980f55e31ba3c660f4e2650e915fd47fb33b524b01a52a116719adac8be7",
|
|
115
|
+
"TGLD_COIN_METADATA": "0xf77f8aabe64dccef0e568f2ef58a6ca74bdfb31786507cc35b7626a4df0d0ebc",
|
|
116
|
+
"TGLD_TOKEN_POLICY": "0x17875c2f772053cd148bd2b8b8a40160db3f841825d8963192f8394d5c18974c",
|
|
117
|
+
"NFT_TRANSFER_POLICY": "0x1c62271ecc443c3d92a8fe8f5662e877856d26b971d967f66937a65f55160831",
|
|
118
|
+
"STRATEGY_POOL": "0x50b01081469d032e04bfcbd057614b1359376920f55c7bebd076e0e2af07a57f",
|
|
119
|
+
"TAILS_IDS": "0xf4ea1c4432823ebde3b0c1f0705a45b08571b48237db879502b8ba336ea5b916"
|
|
110
120
|
}
|
|
111
121
|
},
|
|
112
122
|
"MOVEMENT": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/load_env.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var path_1 = __importDefault(require("path"));
|
|
7
|
+
var dotenv_1 = __importDefault(require("dotenv"));
|
|
8
|
+
// import .env file if exists
|
|
9
|
+
dotenv_1.default.config({ path: path_1.default.resolve(__dirname, ".env") });
|
|
@@ -12,7 +12,7 @@ function getClaimAirdropTx(input) {
|
|
|
12
12
|
],
|
|
13
13
|
});
|
|
14
14
|
input.tx.moveCall({
|
|
15
|
-
target: "".concat(input.typusPackageId, "::
|
|
15
|
+
target: "".concat(input.typusPackageId, "::utility::transfer_balance_opt"),
|
|
16
16
|
typeArguments: [input.typeArguments[0]],
|
|
17
17
|
arguments: [input.tx.object(result[0]), input.tx.pure(input.user)],
|
|
18
18
|
});
|
|
@@ -1,87 +1,3 @@
|
|
|
1
1
|
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
2
2
|
import { KioskClient } from "@mysten/kiosk";
|
|
3
|
-
import { TailsId, kioskOwnerCap } from "../typus-nft/fetch";
|
|
4
|
-
/**
|
|
5
|
-
entry fun transfer_nft(
|
|
6
|
-
registry: &mut Registry,
|
|
7
|
-
from_kiosk: &mut Kiosk,
|
|
8
|
-
from_kiosk_cap: &KioskOwnerCap,
|
|
9
|
-
id: ID,
|
|
10
|
-
receiver: address,
|
|
11
|
-
ctx: &mut TxContext
|
|
12
|
-
)
|
|
13
|
-
*/
|
|
14
|
-
export declare function getTransferNftTx(gasBudget: number, nftPackageId: string, registry: string, personalKioskPackageId: string, tails_id: TailsId, receiver: string): Promise<TransactionBlock>;
|
|
15
|
-
export declare function getTransferNftsTx(gasBudget: number, nftPackageId: string, personalKioskPackageId: string, registry: string, tailsIds: TailsId[], receiver: string): Promise<TransactionBlock>;
|
|
16
|
-
/**
|
|
17
|
-
public fun stake_nft(
|
|
18
|
-
registry: &mut Registry,
|
|
19
|
-
kiosk: &mut Kiosk,
|
|
20
|
-
kiosk_cap: &KioskOwnerCap,
|
|
21
|
-
id: ID,
|
|
22
|
-
clock: &Clock,
|
|
23
|
-
ctx: &mut TxContext
|
|
24
|
-
)
|
|
25
|
-
*/
|
|
26
|
-
export declare function getStakeNftTx(gasBudget: number, nftPackageId: string, registry: string, personalKioskPackageId: string, tails_id: TailsId): Promise<TransactionBlock>;
|
|
27
|
-
export declare function getSwitchNftTx(gasBudget: number, nftPackageId: string, registry: string, personalKioskPackageId: string, tails_id: TailsId, typeArguments: string[]): Promise<TransactionBlock>;
|
|
28
3
|
export declare function getCreateKioskAndLockNftTx(kioskClient: KioskClient, gasBudget: number, nftPackageId: string, policy: string, nft_id: string, singer: string): Promise<TransactionBlock>;
|
|
29
|
-
/**
|
|
30
|
-
public fun unstake_nft(
|
|
31
|
-
registry: &mut Registry,
|
|
32
|
-
kiosk: &mut Kiosk,
|
|
33
|
-
kiosk_cap: &KioskOwnerCap,
|
|
34
|
-
coin: Coin<SUI>,
|
|
35
|
-
ctx: &mut TxContext
|
|
36
|
-
)
|
|
37
|
-
*/
|
|
38
|
-
export declare function getUnstakeNftTx(gasBudget: number, nftPackageId: string, registry: string, typeArguments: string[], kioskOwnerCap: kioskOwnerCap, personalKioskPackageId: string): Promise<TransactionBlock>;
|
|
39
|
-
/**
|
|
40
|
-
public fun daily_attend(
|
|
41
|
-
registry: &mut Registry,
|
|
42
|
-
clock: &Clock,
|
|
43
|
-
ctx: &mut TxContext
|
|
44
|
-
)
|
|
45
|
-
*/
|
|
46
|
-
export declare function getDailyAttendTx(gasBudget: number, nftPackageId: string, registry: string): Promise<TransactionBlock>;
|
|
47
|
-
/**
|
|
48
|
-
entry fun snapshot(
|
|
49
|
-
registry: &mut Registry,
|
|
50
|
-
clock: &Clock,
|
|
51
|
-
ctx: &mut TxContext
|
|
52
|
-
)
|
|
53
|
-
*/
|
|
54
|
-
export declare function getSnapshotTx(gasBudget: number, typusEcosystemVersion: string, typusUserRegistry: string, typusDovSinglePackageId: string, registry: string, amount: string): Promise<TransactionBlock>;
|
|
55
|
-
export declare function getNewBidTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string, priceOracle: string, coins: string[], size: string, premium_required: string, // fe float * b_token_decimal
|
|
56
|
-
usingSponsoredGasCoin?: boolean): Promise<TransactionBlock>;
|
|
57
|
-
export declare function getDepositTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string, coins: string[], amount: string, usingSponsoredGasCoin?: boolean): Promise<TransactionBlock>;
|
|
58
|
-
export declare function getCompoundTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string): Promise<TransactionBlock>;
|
|
59
|
-
export declare function getWithdrawTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string, share?: string): Promise<TransactionBlock>;
|
|
60
|
-
export declare function getUnsubscribeTx(gasBudget: number, packageId: string, typeArguments: string[], registry: string, additional_config_registry: string, index: string, share?: string): Promise<TransactionBlock>;
|
|
61
|
-
/**
|
|
62
|
-
public fun level_up(
|
|
63
|
-
registry: &mut Registry,
|
|
64
|
-
ctx: &mut TxContext
|
|
65
|
-
)
|
|
66
|
-
*/
|
|
67
|
-
export declare function getLevelUpTx(gasBudget: number, nftPackageId: string, registry: string): Promise<TransactionBlock>;
|
|
68
|
-
/**
|
|
69
|
-
entry fun consume_exp_coin_unstaked<EXP_COIN>(
|
|
70
|
-
registry: &mut Registry,
|
|
71
|
-
kiosk: &mut Kiosk,
|
|
72
|
-
kiosk_cap: &KioskOwnerCap,
|
|
73
|
-
id: ID,
|
|
74
|
-
exp_coin: Coin<EXP_COIN>,
|
|
75
|
-
ctx: &mut TxContext
|
|
76
|
-
)
|
|
77
|
-
*/
|
|
78
|
-
export declare function consumeExpCoinUnstakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, personalKioskPackageId: string, tails_id: TailsId, exp_coins: string[], amount: string): Promise<TransactionBlock>;
|
|
79
|
-
/**
|
|
80
|
-
entry fun consume_exp_coin_staked<EXP_COIN>(
|
|
81
|
-
registry: &mut Registry,
|
|
82
|
-
exp_coin: Coin<EXP_COIN>,
|
|
83
|
-
ctx: &mut TxContext
|
|
84
|
-
)
|
|
85
|
-
*/
|
|
86
|
-
export declare function consumeExpCoinStakedTx(gasBudget: number, nftPackageId: string, typeArguments: string[], registry: string, exp_coins: string[], amount: string): Promise<TransactionBlock>;
|
|
87
|
-
export declare function getClaimProfitSharingTx(gasBudget: number, packageId: string, registry: string, name: "dice_profit" | "exp_profit", typeArguments: string[]): Promise<TransactionBlock>;
|