@hawksightco/hawk-sdk 1.2.129 → 1.2.131

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.
@@ -4967,6 +4967,72 @@ exports.IDL = {
4967
4967
  ],
4968
4968
  "args": []
4969
4969
  },
4970
+ {
4971
+ "name": "orcaAutoClosePositionWithTokenExtension",
4972
+ "docs": [
4973
+ "Orca whirlpool - Auto close position with Token2022 (Automation)"
4974
+ ],
4975
+ "discriminator": [
4976
+ 184,
4977
+ 162,
4978
+ 77,
4979
+ 124,
4980
+ 203,
4981
+ 145,
4982
+ 143,
4983
+ 112
4984
+ ],
4985
+ "accounts": [
4986
+ {
4987
+ "name": "userPda",
4988
+ "docs": [
4989
+ "Hawksight user pda (FIRST account - required by iyf_extension_execute_v2)"
4990
+ ]
4991
+ },
4992
+ {
4993
+ "name": "hawksightAuthority",
4994
+ "docs": [
4995
+ "Hawksight authority (SECOND account - required by iyf_extension_execute_v2)"
4996
+ ],
4997
+ "signer": true
4998
+ },
4999
+ {
5000
+ "name": "position",
5001
+ "docs": [
5002
+ "Position account to be closed"
5003
+ ],
5004
+ "writable": true
5005
+ },
5006
+ {
5007
+ "name": "positionMint",
5008
+ "docs": [
5009
+ "Position mint"
5010
+ ],
5011
+ "writable": true
5012
+ },
5013
+ {
5014
+ "name": "positionTokenAccount",
5015
+ "docs": [
5016
+ "Position token account to be closed"
5017
+ ],
5018
+ "writable": true
5019
+ },
5020
+ {
5021
+ "name": "token2022Program",
5022
+ "docs": [
5023
+ "Token2022 program"
5024
+ ]
5025
+ },
5026
+ {
5027
+ "name": "orcaWhirlpoolProgram",
5028
+ "docs": [
5029
+ "Orca Whirlpool program"
5030
+ ],
5031
+ "address": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
5032
+ }
5033
+ ],
5034
+ "args": []
5035
+ },
4970
5036
  {
4971
5037
  "name": "orcaAutoDeposit",
4972
5038
  "docs": [
@@ -5593,6 +5659,113 @@ exports.IDL = {
5593
5659
  }
5594
5660
  ]
5595
5661
  },
5662
+ {
5663
+ "name": "orcaAutoOpenPositionWithTokenExtension",
5664
+ "docs": [
5665
+ "Orca whirlpool - Auto open position with Token2022 (Automation)"
5666
+ ],
5667
+ "discriminator": [
5668
+ 109,
5669
+ 130,
5670
+ 108,
5671
+ 211,
5672
+ 187,
5673
+ 233,
5674
+ 251,
5675
+ 196
5676
+ ],
5677
+ "accounts": [
5678
+ {
5679
+ "name": "userPda",
5680
+ "docs": [
5681
+ "Hawksight user pda (FIRST account - required by iyf_extension_execute_v2)"
5682
+ ]
5683
+ },
5684
+ {
5685
+ "name": "hawksightAuthority",
5686
+ "docs": [
5687
+ "Hawksight authority (for automation instructions)"
5688
+ ],
5689
+ "signer": true
5690
+ },
5691
+ {
5692
+ "name": "position",
5693
+ "docs": [
5694
+ "Position account to be created"
5695
+ ],
5696
+ "writable": true
5697
+ },
5698
+ {
5699
+ "name": "positionMint",
5700
+ "docs": [
5701
+ "Position mint (signer for creation)"
5702
+ ],
5703
+ "writable": true,
5704
+ "signer": true
5705
+ },
5706
+ {
5707
+ "name": "positionTokenAccount",
5708
+ "docs": [
5709
+ "Position token account to be created (uninitialized)"
5710
+ ],
5711
+ "writable": true
5712
+ },
5713
+ {
5714
+ "name": "whirlpool",
5715
+ "docs": [
5716
+ "Whirlpool account"
5717
+ ]
5718
+ },
5719
+ {
5720
+ "name": "token2022Program",
5721
+ "docs": [
5722
+ "Token2022 program"
5723
+ ]
5724
+ },
5725
+ {
5726
+ "name": "systemProgram",
5727
+ "docs": [
5728
+ "System program"
5729
+ ],
5730
+ "address": "11111111111111111111111111111111"
5731
+ },
5732
+ {
5733
+ "name": "associatedTokenProgram",
5734
+ "docs": [
5735
+ "Associated token program"
5736
+ ],
5737
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
5738
+ },
5739
+ {
5740
+ "name": "metadataUpdateAuth",
5741
+ "docs": [
5742
+ "Metadata update authority"
5743
+ ],
5744
+ "address": "3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"
5745
+ },
5746
+ {
5747
+ "name": "orcaWhirlpoolProgram",
5748
+ "docs": [
5749
+ "Orca Whirlpool program"
5750
+ ],
5751
+ "address": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
5752
+ }
5753
+ ],
5754
+ "args": [
5755
+ {
5756
+ "name": "tickLowerIndex",
5757
+ "type": "i32"
5758
+ },
5759
+ {
5760
+ "name": "tickUpperIndex",
5761
+ "type": "i32"
5762
+ },
5763
+ {
5764
+ "name": "withTokenMetadata",
5765
+ "type": "bool"
5766
+ }
5767
+ ]
5768
+ },
5596
5769
  {
5597
5770
  "name": "orcaAutoWithdraw",
5598
5771
  "docs": [
@@ -6243,6 +6416,75 @@ exports.IDL = {
6243
6416
  ],
6244
6417
  "args": []
6245
6418
  },
6419
+ {
6420
+ "name": "orcaClosePositionWithTokenExtension",
6421
+ "docs": [
6422
+ "Orca whirlpool - Close position with Token2022 (User)"
6423
+ ],
6424
+ "discriminator": [
6425
+ 37,
6426
+ 88,
6427
+ 149,
6428
+ 116,
6429
+ 68,
6430
+ 45,
6431
+ 159,
6432
+ 64
6433
+ ],
6434
+ "accounts": [
6435
+ {
6436
+ "name": "userPda",
6437
+ "docs": [
6438
+ "Hawksight user pda (FIRST account - required by iyf_extension_execute_v2)"
6439
+ ]
6440
+ },
6441
+ {
6442
+ "name": "authority",
6443
+ "docs": [
6444
+ "Authority (SECOND account - required by iyf_extension_execute_v2)"
6445
+ ],
6446
+ "signer": true,
6447
+ "relations": [
6448
+ "userPda"
6449
+ ]
6450
+ },
6451
+ {
6452
+ "name": "position",
6453
+ "docs": [
6454
+ "Position account to be closed"
6455
+ ],
6456
+ "writable": true
6457
+ },
6458
+ {
6459
+ "name": "positionMint",
6460
+ "docs": [
6461
+ "Position mint"
6462
+ ],
6463
+ "writable": true
6464
+ },
6465
+ {
6466
+ "name": "positionTokenAccount",
6467
+ "docs": [
6468
+ "Position token account to be closed"
6469
+ ],
6470
+ "writable": true
6471
+ },
6472
+ {
6473
+ "name": "token2022Program",
6474
+ "docs": [
6475
+ "Token2022 program"
6476
+ ]
6477
+ },
6478
+ {
6479
+ "name": "orcaWhirlpoolProgram",
6480
+ "docs": [
6481
+ "Orca Whirlpool program"
6482
+ ],
6483
+ "address": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
6484
+ }
6485
+ ],
6486
+ "args": []
6487
+ },
6246
6488
  {
6247
6489
  "name": "orcaCompound",
6248
6490
  "docs": [
@@ -8123,6 +8365,116 @@ exports.IDL = {
8123
8365
  }
8124
8366
  ]
8125
8367
  },
8368
+ {
8369
+ "name": "orcaOpenPositionWithTokenExtension",
8370
+ "docs": [
8371
+ "Orca whirlpool - Open position with Token2022 (User)"
8372
+ ],
8373
+ "discriminator": [
8374
+ 89,
8375
+ 88,
8376
+ 26,
8377
+ 171,
8378
+ 10,
8379
+ 192,
8380
+ 49,
8381
+ 250
8382
+ ],
8383
+ "accounts": [
8384
+ {
8385
+ "name": "userPda",
8386
+ "docs": [
8387
+ "Hawksight user pda (FIRST account - required by iyf_extension_execute_v2)"
8388
+ ]
8389
+ },
8390
+ {
8391
+ "name": "authority",
8392
+ "docs": [
8393
+ "Authority (SECOND account - required by iyf_extension_execute_v2)"
8394
+ ],
8395
+ "signer": true,
8396
+ "relations": [
8397
+ "userPda"
8398
+ ]
8399
+ },
8400
+ {
8401
+ "name": "position",
8402
+ "docs": [
8403
+ "Position account to be created"
8404
+ ],
8405
+ "writable": true
8406
+ },
8407
+ {
8408
+ "name": "positionMint",
8409
+ "docs": [
8410
+ "Position mint (signer for creation)"
8411
+ ],
8412
+ "writable": true,
8413
+ "signer": true
8414
+ },
8415
+ {
8416
+ "name": "positionTokenAccount",
8417
+ "docs": [
8418
+ "Position token account to be created (uninitialized)"
8419
+ ],
8420
+ "writable": true
8421
+ },
8422
+ {
8423
+ "name": "whirlpool",
8424
+ "docs": [
8425
+ "Whirlpool account"
8426
+ ]
8427
+ },
8428
+ {
8429
+ "name": "token2022Program",
8430
+ "docs": [
8431
+ "Token2022 program"
8432
+ ]
8433
+ },
8434
+ {
8435
+ "name": "systemProgram",
8436
+ "docs": [
8437
+ "System program"
8438
+ ],
8439
+ "address": "11111111111111111111111111111111"
8440
+ },
8441
+ {
8442
+ "name": "associatedTokenProgram",
8443
+ "docs": [
8444
+ "Associated token program"
8445
+ ],
8446
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
8447
+ },
8448
+ {
8449
+ "name": "metadataUpdateAuth",
8450
+ "docs": [
8451
+ "Metadata update authority"
8452
+ ],
8453
+ "address": "3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"
8454
+ },
8455
+ {
8456
+ "name": "orcaWhirlpoolProgram",
8457
+ "docs": [
8458
+ "Orca Whirlpool program"
8459
+ ],
8460
+ "address": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"
8461
+ }
8462
+ ],
8463
+ "args": [
8464
+ {
8465
+ "name": "tickLowerIndex",
8466
+ "type": "i32"
8467
+ },
8468
+ {
8469
+ "name": "tickUpperIndex",
8470
+ "type": "i32"
8471
+ },
8472
+ {
8473
+ "name": "withTokenMetadata",
8474
+ "type": "bool"
8475
+ }
8476
+ ]
8477
+ },
8126
8478
  {
8127
8479
  "name": "orcaRebalance",
8128
8480
  "docs": [
@@ -9582,8 +9934,7 @@ exports.IDL = {
9582
9934
  "name": "protocolPosition",
9583
9935
  "docs": [
9584
9936
  "Raydium protocol position"
9585
- ],
9586
- "writable": true
9937
+ ]
9587
9938
  },
9588
9939
  {
9589
9940
  "name": "tokenVault0",
@@ -9776,8 +10127,7 @@ exports.IDL = {
9776
10127
  "name": "protocolPosition",
9777
10128
  "docs": [
9778
10129
  "Raydium protocol position"
9779
- ],
9780
- "writable": true
10130
+ ]
9781
10131
  },
9782
10132
  {
9783
10133
  "name": "tokenVault0",
@@ -9951,8 +10301,7 @@ exports.IDL = {
9951
10301
  "name": "protocolPosition",
9952
10302
  "docs": [
9953
10303
  "Raydium protocol position"
9954
- ],
9955
- "writable": true
10304
+ ]
9956
10305
  },
9957
10306
  {
9958
10307
  "name": "personalPosition",
@@ -10150,8 +10499,7 @@ exports.IDL = {
10150
10499
  "name": "protocolPosition",
10151
10500
  "docs": [
10152
10501
  "Protocol position which may be already initialized, or to be initialized by user."
10153
- ],
10154
- "writable": true
10502
+ ]
10155
10503
  },
10156
10504
  {
10157
10505
  "name": "tickArrayLower",
@@ -10421,8 +10769,7 @@ exports.IDL = {
10421
10769
  "writable": true
10422
10770
  },
10423
10771
  {
10424
- "name": "protocolPosition",
10425
- "writable": true
10772
+ "name": "protocolPosition"
10426
10773
  },
10427
10774
  {
10428
10775
  "name": "poolState",
@@ -1,6 +1,7 @@
1
1
  /// <reference types="@meteora-ag/dlmm/node_modules/@solana/web3.js" />
2
2
  import * as web3 from "@solana/web3.js";
3
3
  import { IyfMainIxGenerator } from "./IyfMainIxGenerator";
4
+ import { SimplePdaGenerator } from "../classes/SimplePdaGenerator";
4
5
  type OrcaLimitClosePositionAutomation = {
5
6
  connection: web3.Connection;
6
7
  userWallet: web3.PublicKey;
@@ -8,17 +9,67 @@ type OrcaLimitClosePositionAutomation = {
8
9
  minBinId: number;
9
10
  maxBinId: number;
10
11
  useAta?: boolean;
12
+ is2022Position?: boolean;
13
+ };
14
+ type OrcaAutoOpenPositionWithTokenExtension = {
15
+ connection: web3.Connection;
16
+ userWallet: web3.PublicKey;
17
+ positionMint: web3.PublicKey;
18
+ whirlpool: web3.PublicKey;
19
+ tickLowerIndex: number;
20
+ tickUpperIndex: number;
21
+ withTokenMetadata: boolean;
22
+ is2022Position?: boolean;
23
+ };
24
+ type OrcaAutoClosePositionWithTokenExtension = {
25
+ connection: web3.Connection;
26
+ userWallet: web3.PublicKey;
27
+ positionMint: web3.PublicKey;
28
+ is2022Position?: boolean;
29
+ };
30
+ type OrcaOpenPositionWithTokenExtension = {
31
+ connection: web3.Connection;
32
+ userWallet: web3.PublicKey;
33
+ positionMint: web3.PublicKey;
34
+ whirlpool: web3.PublicKey;
35
+ tickLowerIndex: number;
36
+ tickUpperIndex: number;
37
+ withTokenMetadata: boolean;
38
+ is2022Position?: boolean;
39
+ };
40
+ type OrcaClosePositionWithTokenExtension = {
41
+ connection: web3.Connection;
42
+ userWallet: web3.PublicKey;
43
+ positionMint: web3.PublicKey;
44
+ is2022Position?: boolean;
11
45
  };
12
46
  /**
13
47
  * Orca IX Generator
14
48
  */
15
49
  export declare class OrcaIxGenerator {
16
50
  private iyfMain;
17
- constructor(iyfMain: IyfMainIxGenerator);
51
+ private pda;
52
+ constructor(iyfMain: IyfMainIxGenerator, pda: SimplePdaGenerator);
18
53
  /**
19
54
  * Orca limit close position automation
20
55
  */
21
- orcaLimitClosePositionAutomation({ connection, userWallet, position, minBinId, maxBinId, useAta, }: OrcaLimitClosePositionAutomation): Promise<web3.TransactionInstruction>;
56
+ orcaLimitClosePositionAutomation({ connection, userWallet, position, minBinId, maxBinId, useAta, is2022Position, }: OrcaLimitClosePositionAutomation): Promise<web3.TransactionInstruction>;
57
+ /**
58
+ * Orca auto open position with Token2022 (Automation)
59
+ */
60
+ orcaAutoOpenPositionWithTokenExtension({ connection, userWallet, positionMint, whirlpool, tickLowerIndex, tickUpperIndex, withTokenMetadata, is2022Position, }: OrcaAutoOpenPositionWithTokenExtension): Promise<web3.TransactionInstruction>;
61
+ /**
62
+ * Orca auto close position with Token2022 (Automation)
63
+ */
64
+ orcaAutoClosePositionWithTokenExtension({ connection, userWallet, positionMint, is2022Position, }: OrcaAutoClosePositionWithTokenExtension): Promise<web3.TransactionInstruction>;
65
+ /**
66
+ * Orca open position with Token2022 (User)
67
+ */
68
+ orcaOpenPositionWithTokenExtension({ connection, userWallet, positionMint, whirlpool, tickLowerIndex, tickUpperIndex, withTokenMetadata, is2022Position, }: OrcaOpenPositionWithTokenExtension): Promise<web3.TransactionInstruction>;
69
+ /**
70
+ * Orca close position with Token2022 (User)
71
+ */
72
+ orcaClosePositionWithTokenExtension({ connection, userWallet, positionMint, is2022Position, }: OrcaClosePositionWithTokenExtension): Promise<web3.TransactionInstruction>;
22
73
  }
23
74
  export {};
24
75
  //# sourceMappingURL=OrcaIxGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrcaIxGenerator.d.ts","sourceRoot":"","sources":["../../../src/ixGenerator/OrcaIxGenerator.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,KAAK,gCAAgC,GAAG;IACtC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;IAC5B,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED;;GAEG;AACH,qBAAa,eAAe;IAGxB,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,kBAAkB;IAGrC;;OAEG;IACG,gCAAgC,CAAC,EACrC,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,MAAa,GACd,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;CAsE3E"}
1
+ {"version":3,"file":"OrcaIxGenerator.d.ts","sourceRoot":"","sources":["../../../src/ixGenerator/OrcaIxGenerator.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,KAAK,gCAAg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