@typus/typus-sdk 1.2.85 → 1.2.86-tails-exp

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.
@@ -1,143 +0,0 @@
1
- import BigNumber from "bignumber.js";
2
- import { PublicKey } from "@solana/web3.js";
3
- import { PriceData } from "@pythnetwork/client";
4
- import { SuiClient } from "@mysten/sui.js/dist/cjs/client";
5
- import { Auction, BidShare, Vault } from "../view-function";
6
- export declare const ASSET_INFO: {
7
- BTC: {
8
- product: PublicKey;
9
- price: PublicKey;
10
- };
11
- ETH: {
12
- product: PublicKey;
13
- price: PublicKey;
14
- };
15
- SUI: {
16
- product: PublicKey;
17
- price: PublicKey;
18
- };
19
- CETUS: {
20
- product: PublicKey;
21
- price: PublicKey;
22
- };
23
- SEI: {
24
- product: PublicKey;
25
- price: PublicKey;
26
- };
27
- USDC: {
28
- product: PublicKey;
29
- price: PublicKey;
30
- };
31
- USDT: {
32
- product: PublicKey;
33
- price: PublicKey;
34
- };
35
- TURBOS: {
36
- product: PublicKey;
37
- price: PublicKey;
38
- };
39
- APT: {
40
- product: PublicKey;
41
- price: PublicKey;
42
- };
43
- SOL: {
44
- product: PublicKey;
45
- price: PublicKey;
46
- };
47
- INJ: {
48
- product: PublicKey;
49
- price: PublicKey;
50
- };
51
- JUP: {
52
- product: PublicKey;
53
- price: PublicKey;
54
- };
55
- };
56
- export declare const tokenOrder: {
57
- [key: string]: number;
58
- };
59
- export declare const optionTypeOrder: {
60
- [key: string]: number;
61
- };
62
- export declare const periodOrder: {
63
- [key: string]: number;
64
- };
65
- export type Receipt = {
66
- id: string;
67
- index: string;
68
- name: string;
69
- description: string;
70
- vid: string;
71
- };
72
- export type TokenAmount = {
73
- value: string;
74
- token: string;
75
- };
76
- export type BidVaultInfo = {
77
- vaultInfo: Vault;
78
- receipt: Receipt;
79
- };
80
- export interface Bid {
81
- vaultIndex: string;
82
- expiry: string;
83
- auctionName: string;
84
- strikes: string[];
85
- bidSize: TokenAmount;
86
- breakEvenPrice: string;
87
- estPnls: TokenAmount[];
88
- receiptsId: string[];
89
- receiptsVid: string[];
90
- settlePrice: string;
91
- isAutoBid: boolean;
92
- }
93
- export interface OrderBy {
94
- tokenOrder: number;
95
- optionTypeOrder: number;
96
- periodOrder: number;
97
- }
98
- export interface CoinInfo {
99
- price: string;
100
- decimal: string;
101
- quote: string;
102
- }
103
- export declare const IncentiveRateBp = 4;
104
- export declare const parsePythOracleData: (data: PriceData[], decimals: {
105
- [key: string]: string;
106
- }) => {
107
- [key: string]: CoinInfo;
108
- };
109
- export declare const fetchPrices: (provider: SuiClient, network: string) => Promise<{
110
- [key: string]: CoinInfo;
111
- }>;
112
- export declare const calcIncentiveRate: (incentiveBp: any) => number;
113
- export declare const calcDeliveryPrice: (bidShare: BidShare, vaultInfo: Vault) => BigNumber;
114
- export declare const calcBreakEvenPrice: (optionType: string, period: string, strikes: string[], bToken: string, price: string, incentive: number) => number;
115
- export declare const calcEstPnl: (live: boolean, incentive: number, bidSize: string, optionType: string, assets: string[], strikes: string[], bidShare: BidShare, deliveryPrice: string, oTokenPrice: string) => TokenAmount[];
116
- export declare const parseStrikes: (period: string, optionType: string, metadata: string) => string[];
117
- export declare const parseBidReceipt: (vaults: Vault[], bidReceipts: {
118
- [key: string]: Receipt[];
119
- }) => {
120
- sortedBidReceipts: string[];
121
- bidVaultsInfo: BidVaultInfo[];
122
- };
123
- export declare const parseBid: (bidVaultInfo: BidVaultInfo, bidShare: BidShare, auction: Auction | null, oTokenPrice: string, isAutoBid: boolean) => Bid & OrderBy;
124
- export declare const getUserBidReceipts: (provider: SuiClient, network: string, originFramworkAddress: string, userAddress: string) => Promise<{
125
- [key: string]: Receipt[];
126
- }>;
127
- /**
128
- * Fetch user's bids info
129
- *
130
- * @param provider - Sui Client instance.
131
- * @param network - network type in lowercase.
132
- * @param packageAddress - Typus main package address.
133
- * @param framworkAddress - Typus framwork package address.
134
- * @param originFramworkAddress - Typus intial framwork package address.
135
- * @param registryAddress - Typus registry package address.
136
- * @param strategyPoolAddress - strategy pool package address.
137
- * @param userAddress - user's wallet address.
138
- * @param prices - tokens prices (usd pair on Pyth)
139
- * @return User Bids.
140
- */
141
- export declare const fetchUserBids: (provider: SuiClient, network: string, packageAddress: string, framworkAddress: string, originFramworkAddress: string, registryAddress: string, strategyPoolAddress: string, userAddress: string, prices?: {
142
- [key: string]: CoinInfo;
143
- } | undefined) => Promise<any>;