@hawksightco/hawk-sdk 0.0.6 → 0.0.7

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.
@@ -0,0 +1,81 @@
1
+ import * as web3 from "@solana/web3.js";
2
+ import * as client from "@hawksightco/swagger-client";
3
+ import { HealthResponse, MeteoraDlmmActiveBin, ResponseWithStatus, TransactionMetadata, TransactionMetadataResponse, UserPortfolioOut } from "./types";
4
+ declare class Client {
5
+ readonly url: string;
6
+ readonly config: client.Configuration;
7
+ readonly healthCheck: client.HealthCheckApi;
8
+ readonly generalEndpoints: client.GeneralEndpointsApi;
9
+ readonly meteoraDLMMUtilityFunctionsApi: client.MeteoraDLMMUtilityFunctionsApi;
10
+ readonly meteoraDLMMInstructionsApi: client.MeteoraDLMMInstructionsApi;
11
+ readonly meteoraDLMMAutomationInstructionsApi: client.MeteoraDLMMAutomationInstructionsApi;
12
+ readonly orcaUtilityFunctionsApi: client.OrcaUtilityFunctionsApi;
13
+ readonly orcaCLMMInstructionsApi: client.OrcaCLMMInstructionsApi;
14
+ constructor(url?: string);
15
+ }
16
+ declare class Health {
17
+ private readonly client;
18
+ constructor(client: Client);
19
+ health(): Promise<ResponseWithStatus<HealthResponse>>;
20
+ }
21
+ declare class General {
22
+ private readonly client;
23
+ constructor(client: Client);
24
+ portfolio(params: {
25
+ wallet: string;
26
+ pool?: string;
27
+ }): Promise<ResponseWithStatus<UserPortfolioOut>>;
28
+ pools(): Promise<ResponseWithStatus<client.InlineResponse2002[]>>;
29
+ tokens(): Promise<ResponseWithStatus<client.InlineResponse2003[]>>;
30
+ register(connection: web3.Connection, payer: string, params: client.RegisterBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
31
+ }
32
+ declare class Util {
33
+ private readonly client;
34
+ constructor(client: Client);
35
+ meteoraDlmmPools(): Promise<ResponseWithStatus<client.InlineResponse2005[]>>;
36
+ meteoraDlmmPositions(params: {
37
+ wallet: string;
38
+ pool?: string;
39
+ }): Promise<ResponseWithStatus<any>>;
40
+ meteoraDlmmActiveBin(params: client.UtilActiveBinBody): Promise<ResponseWithStatus<MeteoraDlmmActiveBin>>;
41
+ orcaClmmPools(): Promise<ResponseWithStatus<any>>;
42
+ orcaPositions(params: {
43
+ wallet: string;
44
+ pool?: string;
45
+ }): Promise<ResponseWithStatus<any>>;
46
+ orcaGetPositionMint(params: {
47
+ position: string;
48
+ }): Promise<ResponseWithStatus<any>>;
49
+ }
50
+ declare class TxGenerator {
51
+ private readonly client;
52
+ constructor(client: Client);
53
+ meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: client.TxCreatePositionAndDepositBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
54
+ meteoraDeposit(connection: web3.Connection, payer: string, params: client.TxDepositBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
55
+ meteoraWithdraw(connection: web3.Connection, payer: string, params: client.TxWithdrawBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
56
+ meteoraClaim(connection: web3.Connection, payer: string, params: client.TxClaimBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
57
+ meteoraClosePosition(connection: web3.Connection, payer: string, params: client.TxClosePositionBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
58
+ orcaOpenPosition(connection: web3.Connection, payer: string, params: client.TxOpenPositionBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
59
+ orcaClosePosition(connection: web3.Connection, payer: string, params: client.TxClosePositionBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
60
+ orcaDeposit(connection: web3.Connection, payer: string, params: client.TxDepositBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
61
+ orcaWithdraw(connection: web3.Connection, payer: string, params: client.TxWithdrawBody1): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
62
+ orcaClaimRewards(connection: web3.Connection, payer: string, params: client.TxClaimRewardsBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
63
+ }
64
+ declare class TxGeneratorAutomations {
65
+ private readonly client;
66
+ constructor(client: Client);
67
+ meteoraClaimFeeAndRewards(connection: web3.Connection, payer: string, params: client.AutomationClaimFeeAndRewardsAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
68
+ meteoraFullWithdrawalAndClosePosition(connection: web3.Connection, payer: string, params: client.AutomationFullWithdrawAndClosePositionAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
69
+ meteoraCreatePositionAndDeposit(connection: web3.Connection, payer: string, params: client.AutomationCreatePositionAndDepositAutomationIxBody): Promise<ResponseWithStatus<TransactionMetadataResponse> | ResponseWithStatus<TransactionMetadata>>;
70
+ }
71
+ declare class HawkAPI {
72
+ protected readonly url: string;
73
+ readonly health: Health;
74
+ readonly general: General;
75
+ readonly util: Util;
76
+ readonly txGenerator: TxGenerator;
77
+ readonly txGeneratorAutomation: TxGeneratorAutomations;
78
+ constructor(url?: string);
79
+ }
80
+ export default HawkAPI;
81
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;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AO,EAAE,OAAO,CAAC;IACjC,SAAgB,IAAI,EAAE,IAAI,CAAC;IAC3B,SAAgB,WAAW,EAAE,WAAW,CAAC;IACzC,SAAgB,qBAAqB,EAAE,sBAAsB,CAAC;gBAEzC,GAAG,GAAE,MAAoC;CAS/D;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,253 @@
1
+ import * as web3 from "@solana/web3.js";
2
+ import BN from "bn.js";
3
+ export type AccountMeta = {
4
+ isSigner: boolean;
5
+ isWritable: boolean;
6
+ pubkey: string;
7
+ };
8
+ export type TransactionInstruction = {
9
+ programId: string;
10
+ keys: AccountMeta[];
11
+ data: string;
12
+ };
13
+ export type Transaction = TransactionInstruction[];
14
+ export type Web3Transaction = web3.TransactionInstruction[];
15
+ export type BinRange = {
16
+ lowerRange: number;
17
+ upperRange: number;
18
+ };
19
+ export type Distribution = "SPOT" | "CURVE" | "BID-ASK";
20
+ export type MeteoraCreatePositionAndDeposit = {
21
+ position: web3.PublicKey;
22
+ pool: string;
23
+ userWallet: web3.PublicKey;
24
+ totalXAmount: BN;
25
+ totalYAmount: BN;
26
+ binRange: BinRange;
27
+ distribution: Distribution;
28
+ };
29
+ export type MeteoraDeposit = {
30
+ position: web3.PublicKey;
31
+ pool: string;
32
+ userWallet: web3.PublicKey;
33
+ totalXAmount: BN;
34
+ totalYAmount: BN;
35
+ distribution: Distribution;
36
+ };
37
+ export type MeteoraPoolInfo = {
38
+ address: string;
39
+ name: string;
40
+ mint_x: string;
41
+ mint_y: string;
42
+ reserve_x: string;
43
+ reserve_y: string;
44
+ reserve_x_amount: number;
45
+ reserve_y_amount: number;
46
+ bin_step: number;
47
+ base_fee_percentage: string;
48
+ max_fee_percentage: string;
49
+ protocol_fee_percentage: string;
50
+ liquidity: string;
51
+ reward_mint_x: string;
52
+ reward_mint_y: string;
53
+ fees_24h: number;
54
+ today_fees: number;
55
+ trade_volume_24h: number;
56
+ cumulative_trade_volume: string;
57
+ cumulative_fee_volume: string;
58
+ current_price: number;
59
+ apr: number;
60
+ apy: number;
61
+ hide: boolean;
62
+ };
63
+ export declare enum Tags {
64
+ Stable = "stable",
65
+ Volatile = "volatile",
66
+ LiquidStaking = "liquid_staking",
67
+ Stablecoin = "stablecoins",
68
+ Deprecated = "deprecated"
69
+ }
70
+ export declare enum Protocol {
71
+ Saber = "saber",
72
+ Orca = "orca",
73
+ Meteora = "meteora"
74
+ }
75
+ interface BasePool {
76
+ id: string;
77
+ name: string;
78
+ url: string;
79
+ tags: Tags[];
80
+ hidden: boolean;
81
+ }
82
+ export type Pool = (BasePool & {
83
+ protocol: Protocol.Saber;
84
+ config: SaberPoolConfig;
85
+ }) | (BasePool & {
86
+ protocol: Protocol.Orca;
87
+ config: OrcaPoolConfig;
88
+ }) | (BasePool & {
89
+ protocol: Protocol.Meteora;
90
+ config: MeteoraPoolConfig;
91
+ });
92
+ export type SaberPoolConfig = {};
93
+ export type OrcaPoolConfig = OrcaPoolInfo;
94
+ export type MeteoraPoolConfig = {
95
+ address: string;
96
+ name: string;
97
+ mint_x: string;
98
+ mint_y: string;
99
+ reserve_x: string;
100
+ reserve_y: string;
101
+ reward_mint_x: string;
102
+ reward_mint_y: string;
103
+ bin_step: number;
104
+ };
105
+ export type Token = {
106
+ address: string;
107
+ name: string;
108
+ symbol: string;
109
+ decimals: number;
110
+ logo: string;
111
+ };
112
+ export type Instruction = {
113
+ accounts: {
114
+ isSigner: boolean;
115
+ isWritable: boolean;
116
+ pubkey: string;
117
+ }[];
118
+ data: string;
119
+ programId: string;
120
+ };
121
+ export type TransactionPriority = "Default" | "Low" | "Medium" | "High" | "VeryHigh" | "UnsafeMax" | "None";
122
+ export type Balance = {
123
+ amount: string;
124
+ mint: string;
125
+ };
126
+ export type UserPositionBalances = {
127
+ balances: Balance[];
128
+ fees: Balance[];
129
+ rewards: Balance[];
130
+ };
131
+ export type PoolOut = UserPositionBalances & {
132
+ positionAddress: string;
133
+ };
134
+ export type UserPortfolioOut = {
135
+ wallet: string;
136
+ userPda: string;
137
+ pools: Record<string, PoolOut[]>;
138
+ };
139
+ export type OrcaPoolInfo = {
140
+ address: string;
141
+ feeApr: {
142
+ day: number;
143
+ month: number;
144
+ week: number;
145
+ };
146
+ lpFeeRate: number;
147
+ modifiedTimeMs: number;
148
+ price: number;
149
+ priceRange: {
150
+ day: {
151
+ min: number;
152
+ max: number;
153
+ };
154
+ month: {
155
+ min: number;
156
+ max: number;
157
+ };
158
+ week: {
159
+ min: number;
160
+ max: number;
161
+ };
162
+ };
163
+ protocolFeeRate: number;
164
+ reward0Apr: {
165
+ day: number;
166
+ week: number;
167
+ month: number;
168
+ };
169
+ reward1Apr: {
170
+ day: number;
171
+ week: number;
172
+ month: number;
173
+ };
174
+ reward2Apr: {
175
+ day: number;
176
+ week: number;
177
+ month: number;
178
+ };
179
+ tickSpacing: number;
180
+ tokenA: {
181
+ coingeckoId: string;
182
+ decimals: number;
183
+ logoURI: string;
184
+ mint: string;
185
+ name: string;
186
+ poolToken: boolean;
187
+ symbol: string;
188
+ whitelisted: boolean;
189
+ };
190
+ tokenB: {
191
+ coingeckoId: string;
192
+ decimals: number;
193
+ logoURI: string;
194
+ mint: string;
195
+ name: string;
196
+ poolToken: boolean;
197
+ symbol: string;
198
+ whitelisted: boolean;
199
+ };
200
+ totalApr: {
201
+ day: number;
202
+ week: number;
203
+ month: number;
204
+ };
205
+ tvl: number;
206
+ volume: {
207
+ day: number;
208
+ week: number;
209
+ month: number;
210
+ };
211
+ volumeDenominatedA: {
212
+ day: number;
213
+ week: number;
214
+ month: number;
215
+ };
216
+ volumeDemonimatedB: {
217
+ day: number;
218
+ week: number;
219
+ month: number;
220
+ };
221
+ whirlpoolsConfig: string;
222
+ whitelisted: boolean;
223
+ };
224
+ export type OrcaPoolResponse = {
225
+ whirlpools: OrcaPoolInfo[];
226
+ };
227
+ export type OrcaPoolInfoIndexed = Record<string, OrcaPoolInfo>;
228
+ export type TokenAccountInfo = {
229
+ address: web3.PublicKey;
230
+ owner: web3.PublicKey;
231
+ mint: web3.PublicKey;
232
+ amount: BN;
233
+ };
234
+ export type ResponseWithStatus<T> = {
235
+ status: number;
236
+ data: T;
237
+ };
238
+ export type HealthResponse = Record<string, "OK" | "NOT OK">;
239
+ export type MeteoraDlmmActiveBin = Record<string, number>;
240
+ export type TransactionMetadataResponse = {
241
+ description: string;
242
+ estimatedFeeInSOL: string;
243
+ addressLookupTableAddresses: string[];
244
+ computeBudgetInstructions: Instruction[];
245
+ mainInstructions: Instruction[];
246
+ };
247
+ export type TransactionMetadata = {
248
+ description: string;
249
+ estimatedFeeInSOL: string;
250
+ transaction: Uint8Array;
251
+ };
252
+ export {};
253
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvB,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAExD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,IA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C;AAE1D,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2BAA2B,EAAE,MAAM,EAAE,CAAC;IACtC,yBAAyB,EAAE,WAAW,EAAE,CAAC;IACzC,gBAAgB,EAAE,WAAW,EAAE,CAAC;CACjC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,UAAU,CAAC;CACzB,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Protocol = exports.Tags = void 0;
4
+ var Tags;
5
+ (function (Tags) {
6
+ Tags["Stable"] = "stable";
7
+ Tags["Volatile"] = "volatile";
8
+ Tags["LiquidStaking"] = "liquid_staking";
9
+ Tags["Stablecoin"] = "stablecoins";
10
+ Tags["Deprecated"] = "deprecated";
11
+ })(Tags || (exports.Tags = Tags = {}));
12
+ var Protocol;
13
+ (function (Protocol) {
14
+ Protocol["Saber"] = "saber";
15
+ Protocol["Orca"] = "orca";
16
+ Protocol["Meteora"] = "meteora";
17
+ })(Protocol || (exports.Protocol = Protocol = {}));
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Hawksight v2 SDK",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",
7
7
  "homepage": "https://hawksight.co/",
8
8
  "author": "Hawksight",
9
9
  "license": "MIT",
10
+ "files": [
11
+ "dist"
12
+ ],
10
13
  "devDependencies": {
11
14
  "@types/bn.js": "^5.1.5",
12
15
  "@types/jest": "^29.5.11",
package/jest.config.js DELETED
@@ -1,5 +0,0 @@
1
- /** @type {import('ts-jest').JestConfigWithTsJest} */
2
- module.exports = {
3
- preset: 'ts-jest',
4
- testEnvironment: 'node',
5
- };