@hawksightco/hawk-sdk 1.3.10 → 1.3.11
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/CHANGELOG.md +135 -0
- package/README.md +306 -10
- package/dist/src/addresses.d.ts +3 -0
- package/dist/src/addresses.d.ts.map +1 -1
- package/dist/src/addresses.js +21 -8
- package/dist/src/anchor.d.ts +1 -0
- package/dist/src/anchor.d.ts.map +1 -1
- package/dist/src/anchor.js +17 -7
- package/dist/src/classes/Atomicity.d.ts.map +1 -1
- package/dist/src/classes/Client.js +17 -7
- package/dist/src/classes/CombineTransactions.js +17 -7
- package/dist/src/classes/CreateTxMetadata.js +17 -7
- package/dist/src/classes/General.js +17 -7
- package/dist/src/classes/HawkAPI.d.ts.map +1 -1
- package/dist/src/classes/JupiterAlts.js +17 -7
- package/dist/src/classes/Logging.js +2 -3
- package/dist/src/classes/MultiTransaction.js +19 -9
- package/dist/src/classes/RaydiumSDK.js +3 -3
- package/dist/src/classes/SimpleIxGenerator.d.ts.map +1 -1
- package/dist/src/classes/SimpleIxGenerator.js +1 -1
- package/dist/src/classes/Transaction.js +17 -7
- package/dist/src/classes/Transaction2.js +17 -7
- package/dist/src/classes/Transaction3.js +17 -7
- package/dist/src/classes/TransactionBatchExecute.d.ts.map +1 -1
- package/dist/src/classes/TransactionBatchExecute.js +17 -7
- package/dist/src/classes/TransactionBatchExecute2.js +17 -7
- package/dist/src/classes/Transactions.d.ts +4 -0
- package/dist/src/classes/Transactions.d.ts.map +1 -1
- package/dist/src/classes/Transactions.js +53 -27
- package/dist/src/classes/TxGenerator.d.ts.map +1 -1
- package/dist/src/classes/TxGenerator.js +20 -7
- package/dist/src/classes/TxGeneratorAutomations.js +17 -7
- package/dist/src/classes/account-cache/AccountCache.d.ts +0 -1
- package/dist/src/classes/account-cache/AccountCache.d.ts.map +1 -1
- package/dist/src/classes/account-cache/AccountCache.js +17 -7
- package/dist/src/functions.d.ts +5 -6
- package/dist/src/functions.d.ts.map +1 -1
- package/dist/src/functions.js +76 -72
- package/dist/src/hawksight.js +24 -15
- package/dist/src/hsToMeteora.js +429 -13
- package/dist/src/idl/iyf-extension-idl.d.ts +1582 -571
- package/dist/src/idl/iyf-extension-idl.d.ts.map +1 -1
- package/dist/src/idl/iyf-extension-idl.js +1582 -571
- package/dist/src/idl/iyf-main-idl.d.ts +121 -0
- package/dist/src/idl/iyf-main-idl.d.ts.map +1 -1
- package/dist/src/idl/iyf-main-idl.js +121 -0
- package/dist/src/idl/jupiter-idl.d.ts +58 -5
- package/dist/src/idl/jupiter-idl.d.ts.map +1 -1
- package/dist/src/idl/jupiter-idl.js +58 -5
- package/dist/src/ixGenerator/IyfExtensionIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/IyfExtensionIxGenerator.js +17 -7
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts +7 -1
- package/dist/src/ixGenerator/IyfMainIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/IyfMainIxGenerator.js +40 -7
- package/dist/src/ixGenerator/MeteoraDlmmIxGenerator.js +17 -7
- package/dist/src/ixGenerator/OrcaIxGenerator.d.ts +67 -2
- package/dist/src/ixGenerator/OrcaIxGenerator.d.ts.map +1 -1
- package/dist/src/ixGenerator/OrcaIxGenerator.js +232 -10
- package/dist/src/ixGenerator/RaydiumIxGenerator.js +20 -10
- package/dist/src/meteora.d.ts +1 -1
- package/dist/src/meteora.js +17 -7
- package/dist/src/orca.js +23 -13
- package/dist/src/pdaGenerator/HawksightPdaGenerator.js +17 -7
- package/dist/src/pdaGenerator/OrcaPdaGenerator.d.ts +8 -0
- package/dist/src/pdaGenerator/OrcaPdaGenerator.d.ts.map +1 -1
- package/dist/src/pdaGenerator/OrcaPdaGenerator.js +30 -7
- package/dist/src/pdaGenerator/RaydiumPdaGenerator.js +17 -7
- package/dist/src/pdaGenerator/UtilPdaGenerator.js +17 -7
- package/dist/src/types.d.ts +4 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +20 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the HawkSight SDK will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2025-01-27] - Orca Token2022 Position Management Support
|
|
11
|
+
|
|
12
|
+
**Important**: This update adds support for **Token2022 position tokens** (NFT position tokens), not Token2022 vault/liquidity tokens. Position tokens represent ownership of liquidity positions, while vault tokens are the actual tokens being provided as liquidity.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **Four new Orca Token2022 position management methods in OrcaIxGenerator:**
|
|
16
|
+
- `orcaAutoOpenPositionWithTokenExtension` - Automation-driven position opening with Token2022 support
|
|
17
|
+
- `orcaAutoClosePositionWithTokenExtension` - Automation-driven position closing with Token2022 support
|
|
18
|
+
- `orcaOpenPositionWithTokenExtension` - User-initiated position opening with Token2022 support
|
|
19
|
+
- `orcaClosePositionWithTokenExtension` - User-initiated position closing with Token2022 support
|
|
20
|
+
|
|
21
|
+
- **New TypeScript type definitions:**
|
|
22
|
+
- `OrcaAutoOpenPositionWithTokenExtension` - Parameters for automated position opening
|
|
23
|
+
- `OrcaAutoClosePositionWithTokenExtension` - Parameters for automated position closing
|
|
24
|
+
- `OrcaOpenPositionWithTokenExtension` - Parameters for user position opening
|
|
25
|
+
- `OrcaClosePositionWithTokenExtension` - Parameters for user position closing
|
|
26
|
+
|
|
27
|
+
- **New address constant:**
|
|
28
|
+
- `ORCA_METADATA_UPDATE_AUTH` - Orca metadata update authority for Token2022 operations
|
|
29
|
+
|
|
30
|
+
### Enhanced
|
|
31
|
+
- **Token2022 Position Support:** All Orca methods now support both regular SPL position tokens and Token2022 position tokens
|
|
32
|
+
- **Position Token Flexibility:** Optional `is2022Position` parameter allows choosing between position token standards
|
|
33
|
+
- **Automatic Position ATA Generation:** Conditional Associated Token Account generation for position tokens based on token program type
|
|
34
|
+
- **Automation Support:** Automation methods use `HS_AUTHORITY` for HawkFi automation system
|
|
35
|
+
- **User Control:** User methods allow direct position management with user wallet authority
|
|
36
|
+
- **Metadata Support:** Open position methods include `withTokenMetadata` parameter for enhanced token features
|
|
37
|
+
- **Token2022 Position Default:** New Token Extension methods default to Token2022 position tokens (`is2022Position: true`)
|
|
38
|
+
- **Backward Compatibility:** Existing methods maintain regular SPL position token behavior (`is2022Position: false`)
|
|
39
|
+
|
|
40
|
+
### Technical Details
|
|
41
|
+
- **Account Handling:** Methods automatically generate and manage required accounts including:
|
|
42
|
+
- User PDA generation using existing `generateUserPda` utility
|
|
43
|
+
- Position accounts automatically derived from position mint using `generateOrcaPositionPDA`
|
|
44
|
+
- Position mint accounts (provided as parameters - the position NFT mint)
|
|
45
|
+
- **Position token accounts** (NOT vault tokens) generated using new `generatePositionTokenAccount` helper:
|
|
46
|
+
- `generateAta(userPda, positionMint)` for regular SPL position tokens when `is2022Position === false`
|
|
47
|
+
- `generateAta2022(userPda, positionMint)` for Token2022 position tokens when `is2022Position === true`
|
|
48
|
+
- Whirlpool accounts (provided as parameters for open position operations)
|
|
49
|
+
- System and associated token program accounts
|
|
50
|
+
- Orca metadata update authority
|
|
51
|
+
|
|
52
|
+
- **Instruction Wrapping:** All methods use `iyfExtensionExecuteV2` wrapper for proper execution
|
|
53
|
+
- **Parameter Validation:** Type-safe parameter handling with TypeScript interfaces
|
|
54
|
+
- **Program Integration:** Seamless integration with existing Anchor program instances
|
|
55
|
+
|
|
56
|
+
- **Position Token Program Flexibility:** New `is2022Position` parameter enables:
|
|
57
|
+
- **Legacy Support**: `is2022Position: false` or omitted uses regular SPL position token ATAs
|
|
58
|
+
- **Token2022 Position Support**: `is2022Position: true` uses Token2022 position token ATAs
|
|
59
|
+
- **Method-Specific Defaults**: Token Extension methods default to `true` (Token2022 positions), existing methods default to `false` (SPL positions)
|
|
60
|
+
- **Centralized Logic**: Single helper function manages conditional position ATA generation
|
|
61
|
+
- **Important**: This only affects position NFT tokens, not vault/liquidity tokens
|
|
62
|
+
|
|
63
|
+
### Integration
|
|
64
|
+
- **Existing Utilities:** Leverages existing Orca utilities (`getTickArray`, `getStartTickIndex`, etc.)
|
|
65
|
+
- **Address Constants:** Uses centralized address management system
|
|
66
|
+
- **PDA Generation:** Utilizes existing PDA generation patterns from the SDK
|
|
67
|
+
- **Error Handling:** Consistent error handling with existing SDK patterns
|
|
68
|
+
|
|
69
|
+
### Breaking Changes
|
|
70
|
+
- None - All additions are backward compatible
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## [2025-01-28] - Enhanced Token2022 Position Account Support for Core Orca Functions
|
|
75
|
+
|
|
76
|
+
### Enhanced
|
|
77
|
+
- **Token2022 Position Account Support:** Extended Token2022 position token account support to all core Orca functions in `Transactions.ts`:
|
|
78
|
+
- `orcaSweepDust()` - Dust sweeping with Token2022 position NFTs
|
|
79
|
+
- `orcaDeposit()` - Position deposits with Token2022 position NFTs
|
|
80
|
+
- `orcaWithdraw()` - Position withdrawals with Token2022 position NFTs
|
|
81
|
+
- `orcaWithdrawPda()` - PDA-based position withdrawals with Token2022 position NFTs
|
|
82
|
+
- `orcaClaimRewards()` - Rewards claiming with Token2022 position NFTs
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
- **Enhanced Type Definitions:** Added optional `is2022Position?: boolean` parameter to existing types:
|
|
86
|
+
- `OrcaDeposit` - Supports Token2022 position tokens for deposits
|
|
87
|
+
- `OrcaWithdraw` - Supports Token2022 position tokens for withdrawals
|
|
88
|
+
- `OrcaClaimRewards` - Supports Token2022 position tokens for rewards claiming
|
|
89
|
+
- `OrcaSweepDust` - Already supported, included for completeness
|
|
90
|
+
|
|
91
|
+
### Technical Improvements
|
|
92
|
+
- **Optimized Architecture:** Refactored from per-function instantiation to singleton pattern:
|
|
93
|
+
- Added `orcaPda: OrcaPdaGenerator` as private class property in `Transactions` constructor
|
|
94
|
+
- Eliminated repeated `new OrcaPdaGenerator()` instantiation across functions
|
|
95
|
+
- All functions now use `this.orcaPda.generatePositionTokenAccount()` for consistent, efficient position token account generation
|
|
96
|
+
|
|
97
|
+
- **Unified Position Token Account Generation:** All updated functions use the modern approach:
|
|
98
|
+
- `this.orcaPda.generatePositionTokenAccount(userPda, positionMint, is2022Position || false)`
|
|
99
|
+
- Automatic selection between `generateAta()` (SPL) and `generateAta2022()` (Token2022) based on `is2022Position` parameter
|
|
100
|
+
- Maintains backward compatibility with existing integrations (defaults to SPL position tokens)
|
|
101
|
+
|
|
102
|
+
### Integration Notes
|
|
103
|
+
- **Seamless Migration:** Existing code continues to work without changes (defaults to SPL position tokens)
|
|
104
|
+
- **Enhanced Functionality:** New integrations can opt-in to Token2022 position support by setting `is2022Position: true`
|
|
105
|
+
- **Consistent API:** All Orca functions now follow the same pattern for position token account handling
|
|
106
|
+
- **Performance Optimized:** Single PDA generator instance shared across all operations in the class lifecycle
|
|
107
|
+
|
|
108
|
+
### Breaking Changes
|
|
109
|
+
- None - All changes are backward compatible with existing integrations
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Template for Future Entries
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
## [YYYY-MM-DD] - Brief Description
|
|
117
|
+
|
|
118
|
+
### Added
|
|
119
|
+
- New features
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
- Changes in existing functionality
|
|
123
|
+
|
|
124
|
+
### Deprecated
|
|
125
|
+
- Soon-to-be removed features
|
|
126
|
+
|
|
127
|
+
### Removed
|
|
128
|
+
- Now removed features
|
|
129
|
+
|
|
130
|
+
### Fixed
|
|
131
|
+
- Any bug fixes
|
|
132
|
+
|
|
133
|
+
### Security
|
|
134
|
+
- In case of vulnerabilities
|
|
135
|
+
```
|
package/README.md
CHANGED
|
@@ -1,23 +1,319 @@
|
|
|
1
|
-
#
|
|
1
|
+
# HawkFi SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A comprehensive TypeScript SDK for interacting with HawkFi's blockchain APIs and DeFi protocols on Solana. This SDK provides a unified interface for managing liquidity positions, executing transactions, and interacting with multiple DeFi protocols including Meteora, Orca, Raydium, and Jupiter.
|
|
4
4
|
|
|
5
|
-
## Features
|
|
5
|
+
## 🚀 Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
7
|
+
- **Multi-Protocol Support**: Full integration with Meteora DLMM, Orca Whirlpools, Raydium V2, and Jupiter
|
|
8
|
+
- **Transaction Management**: Comprehensive transaction generation, signing, and execution
|
|
9
|
+
- **Position Management**: Create, deposit, withdraw, and close liquidity positions
|
|
10
|
+
- **Automation**: Automated workflows for compounding, rebalancing, and limit orders
|
|
11
|
+
- **Account Management**: PDA generation, token account handling, and caching
|
|
12
|
+
- **Health Monitoring**: API health checks and system status monitoring
|
|
13
|
+
- **Portfolio Management**: User portfolio tracking and position analytics
|
|
10
14
|
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
To install the Hawksight SDK, you need to have Node.js and npm installed on your machine. Then, you can add it to your project with the following command:
|
|
15
|
+
## 📦 Installation
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
18
|
npm install @hawksightco/hawk-sdk
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
or
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
24
|
yarn add @hawksightco/hawk-sdk
|
|
23
25
|
```
|
|
26
|
+
|
|
27
|
+
## 🏗️ Architecture
|
|
28
|
+
|
|
29
|
+
The SDK is built around a modular architecture with the following key components:
|
|
30
|
+
|
|
31
|
+
### Core Classes
|
|
32
|
+
|
|
33
|
+
#### `HawkAPI` - Main Entry Point
|
|
34
|
+
The central orchestrator that provides access to all SDK functionality:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { HawkAPI } from '@hawksightco/hawk-sdk';
|
|
38
|
+
|
|
39
|
+
const hawkAPI = new HawkAPI('https://api2.hawksight.co');
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### `TxGenerator` - Transaction Management
|
|
43
|
+
Handles creation and management of blockchain transactions for all supported protocols.
|
|
44
|
+
|
|
45
|
+
#### `Client` - HTTP Client
|
|
46
|
+
Wrapper around the Swagger client for API communication with error handling.
|
|
47
|
+
|
|
48
|
+
### Protocol Modules
|
|
49
|
+
|
|
50
|
+
- **Meteora**: DLMM position management, automation, fast generation
|
|
51
|
+
- **Orca**: Whirlpools position management, reward claiming
|
|
52
|
+
- **Raydium**: V2 position management, NFT handling
|
|
53
|
+
- **Jupiter**: Token swaps, routing optimization
|
|
54
|
+
|
|
55
|
+
## 🔧 Quick Start
|
|
56
|
+
|
|
57
|
+
### Basic Setup
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { HawkAPI } from '@hawksightco/hawk-sdk';
|
|
61
|
+
import { Connection, PublicKey } from '@solana/web3.js';
|
|
62
|
+
|
|
63
|
+
// Initialize connection and SDK
|
|
64
|
+
const connection = new Connection('https://api.mainnet-beta.solana.com');
|
|
65
|
+
const hawkAPI = new HawkAPI('https://api2.hawksight.co');
|
|
66
|
+
|
|
67
|
+
// Check API health
|
|
68
|
+
const health = await hawkAPI.health.check();
|
|
69
|
+
console.log('API Health:', health);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Get User Portfolio
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
const portfolio = await hawkAPI.general.getPortfolio({
|
|
76
|
+
wallet: 'user_wallet_address'
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
console.log('User Portfolio:', portfolio);
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Create a Meteora Position
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
import { BN } from 'bn.js';
|
|
86
|
+
|
|
87
|
+
const position = await hawkAPI.txGenerator.meteora.createPositionAndDeposit({
|
|
88
|
+
connection,
|
|
89
|
+
params: {
|
|
90
|
+
position: new PublicKey('position_address'),
|
|
91
|
+
pool: new PublicKey('pool_address'),
|
|
92
|
+
userWallet: new PublicKey('user_wallet'),
|
|
93
|
+
totalXAmount: new BN(1000000), // 1 token with 6 decimals
|
|
94
|
+
totalYAmount: new BN(1000000), // 1 token with 6 decimals
|
|
95
|
+
binRange: { lowerRange: 100, upperRange: 200 },
|
|
96
|
+
distribution: 'SPOT',
|
|
97
|
+
slippage: 0.01 // 1%
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
console.log('Position Created:', position);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Execute Batch Transactions
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
const result = await hawkAPI.batchExecute({
|
|
108
|
+
connection,
|
|
109
|
+
payer: new PublicKey('payer_address'),
|
|
110
|
+
instructions: [...], // Array of instructions
|
|
111
|
+
signers: [...], // Array of signers
|
|
112
|
+
lookupTableAddresses: [...] // Address lookup tables
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
console.log('Batch Execution Result:', result);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 📚 API Reference
|
|
119
|
+
|
|
120
|
+
### HawkAPI Class
|
|
121
|
+
|
|
122
|
+
#### Constructor
|
|
123
|
+
```typescript
|
|
124
|
+
new HawkAPI(url?: string, options?: HawkApiOptions)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Properties
|
|
128
|
+
- `health`: Health check utilities
|
|
129
|
+
- `general`: General API operations
|
|
130
|
+
- `generalUtility`: General utility endpoints
|
|
131
|
+
- `util`: Utility functions
|
|
132
|
+
- `txGenerator`: Transaction generation
|
|
133
|
+
- `txGeneratorAutomation`: Automated transaction workflows
|
|
134
|
+
- `search`: Token search functionality
|
|
135
|
+
- `ix`: Simple instruction generator
|
|
136
|
+
- `jupAlts`: Jupiter alternatives
|
|
137
|
+
- `jupiterSwap`: Jupiter swap functionality
|
|
138
|
+
- `pda`: Simple PDA generator
|
|
139
|
+
|
|
140
|
+
#### Methods
|
|
141
|
+
- `anchor(connection)`: Get Anchor program instance
|
|
142
|
+
- `mintCache(connection)`: Get mint cache instance
|
|
143
|
+
- `tokenCache(connection)`: Get token cache instance
|
|
144
|
+
- `combine(params)`: Combine multiple transactions
|
|
145
|
+
- `batchExecute(params)`: Execute batch transactions
|
|
146
|
+
- `atomicity(params)`: Execute atomic transactions
|
|
147
|
+
- `logging(flag)`: Enable/disable logging
|
|
148
|
+
- `raydiumSDK(connection)`: Get Raydium SDK instance
|
|
149
|
+
|
|
150
|
+
### Transaction Generation
|
|
151
|
+
|
|
152
|
+
#### Meteora Operations
|
|
153
|
+
```typescript
|
|
154
|
+
// Create position and deposit
|
|
155
|
+
await hawkAPI.txGenerator.meteora.createPositionAndDeposit(params);
|
|
156
|
+
|
|
157
|
+
// Deposit to existing position
|
|
158
|
+
await hawkAPI.txGenerator.meteora.deposit(params);
|
|
159
|
+
|
|
160
|
+
// Withdraw from position
|
|
161
|
+
await hawkAPI.txGenerator.meteora.withdraw(params);
|
|
162
|
+
|
|
163
|
+
// Close position
|
|
164
|
+
await hawkAPI.txGenerator.meteora.close(params);
|
|
165
|
+
|
|
166
|
+
// Claim rewards
|
|
167
|
+
await hawkAPI.txGenerator.meteora.claim(params);
|
|
168
|
+
|
|
169
|
+
// Compound rewards
|
|
170
|
+
await hawkAPI.txGenerator.meteora.compound(params);
|
|
171
|
+
|
|
172
|
+
// Rebalance position
|
|
173
|
+
await hawkAPI.txGenerator.meteora.rebalance(params);
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### Orca Operations
|
|
177
|
+
```typescript
|
|
178
|
+
// Open position
|
|
179
|
+
await hawkAPI.txGenerator.orca.openPosition(params);
|
|
180
|
+
|
|
181
|
+
// Close position
|
|
182
|
+
await hawkAPI.txGenerator.orca.closePosition(params);
|
|
183
|
+
|
|
184
|
+
// Deposit to position
|
|
185
|
+
await hawkAPI.txGenerator.orca.deposit(params);
|
|
186
|
+
|
|
187
|
+
// Withdraw from position
|
|
188
|
+
await hawkAPI.txGenerator.orca.withdraw(params);
|
|
189
|
+
|
|
190
|
+
// Claim rewards
|
|
191
|
+
await hawkAPI.txGenerator.orca.claimRewards(params);
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### Raydium Operations
|
|
195
|
+
```typescript
|
|
196
|
+
// Open position
|
|
197
|
+
await hawkAPI.txGenerator.raydium.openPosition(params);
|
|
198
|
+
|
|
199
|
+
// Close position
|
|
200
|
+
await hawkAPI.txGenerator.raydium.closePosition(params);
|
|
201
|
+
|
|
202
|
+
// Increase liquidity
|
|
203
|
+
await hawkAPI.txGenerator.raydium.increaseLiquidity(params);
|
|
204
|
+
|
|
205
|
+
// Decrease liquidity
|
|
206
|
+
await hawkAPI.txGenerator.raydium.decreaseLiquidity(params);
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Utility Functions
|
|
210
|
+
|
|
211
|
+
#### PDA Generation
|
|
212
|
+
```typescript
|
|
213
|
+
import { generateUserPda, generateAta, generateLimitToken } from '@hawksightco/hawk-sdk';
|
|
214
|
+
|
|
215
|
+
const userPda = generateUserPda(userWallet);
|
|
216
|
+
const ata = generateAta(owner, mint);
|
|
217
|
+
const limitToken = generateLimitToken(userPda, mint);
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
#### Transaction Utilities
|
|
221
|
+
```typescript
|
|
222
|
+
import { createTxMetadata, resultOrError } from '@hawksightco/hawk-sdk';
|
|
223
|
+
|
|
224
|
+
const metadata = await createTxMetadata(generalUtility, connection, payer, data);
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## 🧪 Testing
|
|
228
|
+
|
|
229
|
+
Run the test suite:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
yarn test
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The test suite includes:
|
|
236
|
+
- Unit tests for all major components
|
|
237
|
+
- Integration tests for protocol interactions
|
|
238
|
+
- Transaction generation tests
|
|
239
|
+
- Error handling tests
|
|
240
|
+
|
|
241
|
+
## 📦 Building
|
|
242
|
+
|
|
243
|
+
Build the TypeScript source to JavaScript:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
yarn build
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
This creates the `dist/` directory with compiled JavaScript files.
|
|
250
|
+
|
|
251
|
+
## 🔗 Dependencies
|
|
252
|
+
|
|
253
|
+
### Core Dependencies
|
|
254
|
+
- `@solana/web3.js` - Solana blockchain interaction
|
|
255
|
+
- `@coral-xyz/anchor` - Solana program interaction
|
|
256
|
+
- `@meteora-ag/dlmm` - Meteora protocol SDK
|
|
257
|
+
- `@orca-so/whirlpools-sdk` - Orca protocol SDK
|
|
258
|
+
- `@raydium-io/raydium-sdk-v2` - Raydium protocol SDK
|
|
259
|
+
- `@hawksightco/swagger-client` - Auto-generated API client
|
|
260
|
+
|
|
261
|
+
### Development Dependencies
|
|
262
|
+
- `typescript` - TypeScript compilation
|
|
263
|
+
- `jest` - Testing framework
|
|
264
|
+
- `@types/*` - TypeScript type definitions
|
|
265
|
+
|
|
266
|
+
## 🏛️ Protocol Support
|
|
267
|
+
|
|
268
|
+
| Protocol | Features | Status |
|
|
269
|
+
|----------|----------|--------|
|
|
270
|
+
| **Meteora** | DLMM positions, automation, fast generation | ✅ Full Support |
|
|
271
|
+
| **Orca** | Whirlpools, position management, rewards | ✅ Full Support |
|
|
272
|
+
| **Raydium** | V2 positions, NFT handling, automation | ✅ Full Support |
|
|
273
|
+
| **Jupiter** | Token swaps, routing, alternatives | ✅ Full Support |
|
|
274
|
+
|
|
275
|
+
## 🔄 Version Management
|
|
276
|
+
|
|
277
|
+
- **Current Version**: `1.3.9`
|
|
278
|
+
- **Dependencies**: Use semantic versioning with appropriate ranges
|
|
279
|
+
- `~` for patch-only updates (e.g., `~1.0.51`)
|
|
280
|
+
- `^` for minor updates (e.g., `^0.29.0`)
|
|
281
|
+
|
|
282
|
+
## 🛠️ Development
|
|
283
|
+
|
|
284
|
+
### Adding New Protocols
|
|
285
|
+
1. Create instruction generator in `src/ixGenerator/`
|
|
286
|
+
2. Add PDA generator in `src/pdaGenerator/`
|
|
287
|
+
3. Include IDL definitions in `src/idl/`
|
|
288
|
+
4. Add types in `src/types.ts`
|
|
289
|
+
5. Integrate with `TxGenerator` class
|
|
290
|
+
6. Add comprehensive tests
|
|
291
|
+
|
|
292
|
+
### Error Handling
|
|
293
|
+
- Use `AppError` class for consistent error handling
|
|
294
|
+
- Include proper error messages and codes
|
|
295
|
+
- Handle network failures gracefully
|
|
296
|
+
- Provide meaningful error responses
|
|
297
|
+
|
|
298
|
+
## 📚 Additional Resources
|
|
299
|
+
|
|
300
|
+
- [HawkFi Website](https://hawkfi.ag/)
|
|
301
|
+
- [API Documentation](https://api2.hawksight.co)
|
|
302
|
+
- [Solana Documentation](https://docs.solana.com/)
|
|
303
|
+
- [Meteora Documentation](https://docs.meteora.ag/)
|
|
304
|
+
- [Orca Documentation](https://docs.orca.so/)
|
|
305
|
+
- [Raydium Documentation](https://raydium.io/docs/)
|
|
306
|
+
|
|
307
|
+
## 🤝 Contributing
|
|
308
|
+
|
|
309
|
+
When contributing to this SDK:
|
|
310
|
+
|
|
311
|
+
1. Follow TypeScript best practices
|
|
312
|
+
2. Add comprehensive tests for new features
|
|
313
|
+
3. Update documentation for API changes
|
|
314
|
+
4. Ensure all tests pass before submitting
|
|
315
|
+
5. Use semantic commit messages
|
|
316
|
+
|
|
317
|
+
## 📄 License
|
|
318
|
+
|
|
319
|
+
MIT License - see LICENSE file for details.
|
package/dist/src/addresses.d.ts
CHANGED
|
@@ -9,15 +9,18 @@ export declare const TOKEN_2022_PROGRAM_ID: web3.PublicKey;
|
|
|
9
9
|
export declare const ASSOCIATED_TOKEN_PROGRAM: web3.PublicKey;
|
|
10
10
|
export declare const SITE_FEE_OWNER: web3.PublicKey;
|
|
11
11
|
export declare const USDC_FARM: web3.PublicKey;
|
|
12
|
+
export declare const SOL_FARM: web3.PublicKey;
|
|
12
13
|
export declare const SOME_METEORA_DLMM_POOL: web3.PublicKey;
|
|
13
14
|
export declare const METEORA_DLMM_PROGRAM: web3.PublicKey;
|
|
14
15
|
export declare const METEORA_EVENT_AUTHORITY: web3.PublicKey;
|
|
15
16
|
export declare const COMPUTE_BUDGET: web3.PublicKey;
|
|
16
17
|
export declare const HS_AUTHORITY: web3.PublicKey;
|
|
17
18
|
export declare const ORCA_WHIRLPOOL_PROGRAM: web3.PublicKey;
|
|
19
|
+
export declare const ORCA_METADATA_UPDATE_AUTH: web3.PublicKey;
|
|
18
20
|
export declare const WSOL_MINT: web3.PublicKey;
|
|
19
21
|
export declare const JUPITER_PROGRAM: web3.PublicKey;
|
|
20
22
|
export declare const RAYDIUM_PROGRAM: web3.PublicKey;
|
|
21
23
|
export declare const TOKEN_2022: web3.PublicKey;
|
|
22
24
|
export declare const MEMO_PROGRAM: web3.PublicKey;
|
|
25
|
+
export declare const PUMP_FUN_AMM_PROGRAM: web3.PublicKey;
|
|
23
26
|
//# sourceMappingURL=addresses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,eAAO,MAAM,UAAU,UAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,gBAAqE,CAAC;AAC3F,eAAO,MAAM,aAAa,gBAAqE,CAAC;AAChG,eAAO,MAAM,YAAY,gBAAqE,CAAC;AAC/F,eAAO,MAAM,YAAY,gBAAqE,CAAC;AAC/F,eAAO,MAAM,gBAAgB,gBAAoE,CAAC;AAClG,eAAO,MAAM,qBAAqB,gBAAoE,CAAC;AACvG,eAAO,MAAM,wBAAwB,gBAAqE,CAAC;AAC3G,eAAO,MAAM,cAAc,gBAAqE,CAAC;AACjG,eAAO,MAAM,SAAS,gBAAqE,CAAC;AAC5F,eAAO,MAAM,sBAAsB,gBAAqE,CAAC;AACzG,eAAO,MAAM,oBAAoB,gBAAoE,CAAC;AACtG,eAAO,MAAM,uBAAuB,gBAAqE,CAAC;AAC1G,eAAO,MAAM,cAAc,gBAAoE,CAAC;AAChG,eAAO,MAAM,YAAY,gBAAoE,CAAC;AAC9F,eAAO,MAAM,sBAAsB,gBAAoE,CAAC;AACxG,eAAO,MAAM,SAAS,gBAAoE,CAAC;AAC3F,eAAO,MAAM,eAAe,gBAAoE,CAAC;AACjG,eAAO,MAAM,eAAe,gBAAqE,CAAC;AAClG,eAAO,MAAM,UAAU,gBAAoE,CAAC;AAC5F,eAAO,MAAM,YAAY,gBAAoE,CAAC"}
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,eAAO,MAAM,UAAU,UAYtB,CAAC;AAEF,eAAO,MAAM,QAAQ,gBAAqE,CAAC;AAC3F,eAAO,MAAM,aAAa,gBAAqE,CAAC;AAChG,eAAO,MAAM,YAAY,gBAAqE,CAAC;AAC/F,eAAO,MAAM,YAAY,gBAAqE,CAAC;AAC/F,eAAO,MAAM,gBAAgB,gBAAoE,CAAC;AAClG,eAAO,MAAM,qBAAqB,gBAAoE,CAAC;AACvG,eAAO,MAAM,wBAAwB,gBAAqE,CAAC;AAC3G,eAAO,MAAM,cAAc,gBAAqE,CAAC;AACjG,eAAO,MAAM,SAAS,gBAAqE,CAAC;AAC5F,eAAO,MAAM,QAAQ,gBAAqE,CAAC;AAC3F,eAAO,MAAM,sBAAsB,gBAAqE,CAAC;AACzG,eAAO,MAAM,oBAAoB,gBAAoE,CAAC;AACtG,eAAO,MAAM,uBAAuB,gBAAqE,CAAC;AAC1G,eAAO,MAAM,cAAc,gBAAoE,CAAC;AAChG,eAAO,MAAM,YAAY,gBAAoE,CAAC;AAC9F,eAAO,MAAM,sBAAsB,gBAAoE,CAAC;AACxG,eAAO,MAAM,yBAAyB,gBAAqE,CAAC;AAC5G,eAAO,MAAM,SAAS,gBAAoE,CAAC;AAC3F,eAAO,MAAM,eAAe,gBAAoE,CAAC;AACjG,eAAO,MAAM,eAAe,gBAAqE,CAAC;AAClG,eAAO,MAAM,UAAU,gBAAoE,CAAC;AAC5F,eAAO,MAAM,YAAY,gBAAoE,CAAC;AAC9F,eAAO,MAAM,oBAAoB,gBAAoE,CAAC"}
|
package/dist/src/addresses.js
CHANGED
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.MEMO_PROGRAM = exports.TOKEN_2022 = exports.RAYDIUM_PROGRAM = exports.JUPITER_PROGRAM = exports.WSOL_MINT = exports.ORCA_WHIRLPOOL_PROGRAM = exports.HS_AUTHORITY = exports.COMPUTE_BUDGET = exports.METEORA_EVENT_AUTHORITY = exports.METEORA_DLMM_PROGRAM = exports.SOME_METEORA_DLMM_POOL = exports.USDC_FARM = exports.SITE_FEE_OWNER = exports.ASSOCIATED_TOKEN_PROGRAM = exports.TOKEN_2022_PROGRAM_ID = exports.TOKEN_PROGRAM_ID = exports.STABLEMINT_2 = exports.STABLEMINT_1 = exports.IYF_EXTENSION = exports.IYF_MAIN = exports.GLOBAL_ALT = void 0;
|
|
36
|
+
exports.PUMP_FUN_AMM_PROGRAM = exports.MEMO_PROGRAM = exports.TOKEN_2022 = exports.RAYDIUM_PROGRAM = exports.JUPITER_PROGRAM = exports.WSOL_MINT = exports.ORCA_METADATA_UPDATE_AUTH = exports.ORCA_WHIRLPOOL_PROGRAM = exports.HS_AUTHORITY = exports.COMPUTE_BUDGET = exports.METEORA_EVENT_AUTHORITY = exports.METEORA_DLMM_PROGRAM = exports.SOME_METEORA_DLMM_POOL = exports.SOL_FARM = exports.USDC_FARM = exports.SITE_FEE_OWNER = exports.ASSOCIATED_TOKEN_PROGRAM = exports.TOKEN_2022_PROGRAM_ID = exports.TOKEN_PROGRAM_ID = exports.STABLEMINT_2 = exports.STABLEMINT_1 = exports.IYF_EXTENSION = exports.IYF_MAIN = exports.GLOBAL_ALT = void 0;
|
|
27
37
|
const web3 = __importStar(require("@solana/web3.js"));
|
|
28
38
|
exports.GLOBAL_ALT = [
|
|
29
39
|
"AC3t5k5PUTJirxGEHgGGQStafu1vXkvddPyqVNDrRQDt",
|
|
@@ -47,14 +57,17 @@ exports.TOKEN_2022_PROGRAM_ID = new web3.PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC
|
|
|
47
57
|
exports.ASSOCIATED_TOKEN_PROGRAM = new web3.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
|
48
58
|
exports.SITE_FEE_OWNER = new web3.PublicKey("4K3a2ucXiGvuMJMPNneRDyzmNp6i4RdzXJmBdWwGwPEh");
|
|
49
59
|
exports.USDC_FARM = new web3.PublicKey("7jLQhREMxXjKdpwVuN6gwsWt3BNfAg9WqbepffPbi4ww");
|
|
60
|
+
exports.SOL_FARM = new web3.PublicKey("CY6qutkyek6hh5UCQbbNyEXKoD4tFLFb2tjM3AHnhJcR");
|
|
50
61
|
exports.SOME_METEORA_DLMM_POOL = new web3.PublicKey("7eexH14UjhNxJe6zTT3f1Vb1E8iACsBMVaWheDEmxdT2");
|
|
51
62
|
exports.METEORA_DLMM_PROGRAM = new web3.PublicKey("LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo");
|
|
52
63
|
exports.METEORA_EVENT_AUTHORITY = new web3.PublicKey("D1ZN9Wj1fRSUQfCjhvnu1hqDMT7hzjzBBpi12nVniYD6");
|
|
53
64
|
exports.COMPUTE_BUDGET = new web3.PublicKey("ComputeBudget111111111111111111111111111111");
|
|
54
65
|
exports.HS_AUTHORITY = new web3.PublicKey("dche7M2764e8AxNihBdn7uffVzZvTBNeL8x4LZg5E2c");
|
|
55
66
|
exports.ORCA_WHIRLPOOL_PROGRAM = new web3.PublicKey("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc");
|
|
67
|
+
exports.ORCA_METADATA_UPDATE_AUTH = new web3.PublicKey("3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr");
|
|
56
68
|
exports.WSOL_MINT = new web3.PublicKey("So11111111111111111111111111111111111111112");
|
|
57
69
|
exports.JUPITER_PROGRAM = new web3.PublicKey("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");
|
|
58
70
|
exports.RAYDIUM_PROGRAM = new web3.PublicKey("CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK");
|
|
59
71
|
exports.TOKEN_2022 = new web3.PublicKey("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
|
|
60
72
|
exports.MEMO_PROGRAM = new web3.PublicKey("MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr");
|
|
73
|
+
exports.PUMP_FUN_AMM_PROGRAM = new web3.PublicKey("pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA");
|
package/dist/src/anchor.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { LbClmm } from "./idl/meteora-idl";
|
|
|
5
5
|
import { Raydium } from "./idl/raydium-idl";
|
|
6
6
|
import { IyfExtension } from "./idl/iyf-extension-wrapper";
|
|
7
7
|
import { IndexYieldFarming } from "./idl/iyf-main-wrapper";
|
|
8
|
+
export { IyfExtension };
|
|
8
9
|
export declare class Anchor {
|
|
9
10
|
connection: web3.Connection;
|
|
10
11
|
private static _instance;
|
package/dist/src/anchor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/anchor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAqB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAkB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAmB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAS7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/anchor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAqB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAkB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAmB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAS7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAK3D,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,qBAAa,MAAM;IAeR,UAAU,EAAE,IAAI,CAAC,UAAU;IAbpC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAS;IACjC,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC;IAGhC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAG3C,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACvC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC,OAAO;IA6DP,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IAI7C,MAAM,CAAC,QAAQ,IAAI,MAAM;CAO1B"}
|
package/dist/src/anchor.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Atomicity.d.ts","sourceRoot":"","sources":["../../../src/classes/Atomicity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,SAAU,SAAQ,uBAAuB;IAclD,OAAO,CAAC,WAAW;IAZrB;;OAEG;IACH,OAAO,CAAC,UAAU,CAAC,CAAiB;gBAGlC,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE,EACtC,YAAY,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAC3C,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"Atomicity.d.ts","sourceRoot":"","sources":["../../../src/classes/Atomicity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,SAAU,SAAQ,uBAAuB;IAclD,OAAO,CAAC,WAAW;IAZrB;;OAEG;IACH,OAAO,CAAC,UAAU,CAAC,CAAiB;gBAGlC,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE,EACtC,YAAY,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAC3C,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,YAAK,EAC5B,WAAW,EAAE,WAAW,EAChB,WAAW,EAAE,iBAAiB;IAYxC;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS;IAIxC;;;OAGG;IACH,OAAO,CAAC,aAAa;IAIrB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC;IA4B5D;;;;;;OAMG;cACa,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,CAAC;CAiDxJ"}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.Client = void 0;
|
|
27
37
|
const client = __importStar(require("@hawksightco/swagger-client"));
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|