flash-sdk 2.16.2 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -84,6 +84,7 @@ export declare class PoolConfig {
84
84
  getMarketConfig(targetCustody: PublicKey, collateralCustody: PublicKey, side: Side): MarketConfig | null;
85
85
  getMarketPk(targetCustody: PublicKey, collateralCustody: PublicKey, side: Side): PublicKey;
86
86
  getPositionFromMarketPk(owner: PublicKey, marketAccount: PublicKey): PublicKey;
87
+ getOrderFromMarketPk(owner: PublicKey, marketAccount: PublicKey): PublicKey;
87
88
  getPositionFromCustodyPk(owner: PublicKey, targetCustody: PublicKey, collateralCustody: PublicKey, side: Side): PublicKey;
88
89
  doesMarketExist(pubkey: PublicKey): boolean;
89
90
  getAllMarketPks(): PublicKey[];
@@ -85,6 +85,13 @@ var PoolConfig = (function () {
85
85
  marketAccount.toBuffer(),
86
86
  ], this.programId)[0];
87
87
  };
88
+ PoolConfig.prototype.getOrderFromMarketPk = function (owner, marketAccount) {
89
+ return web3_js_1.PublicKey.findProgramAddressSync([
90
+ Buffer.from("order"),
91
+ owner.toBuffer(),
92
+ marketAccount.toBuffer(),
93
+ ], this.programId)[0];
94
+ };
88
95
  PoolConfig.prototype.getPositionFromCustodyPk = function (owner, targetCustody, collateralCustody, side) {
89
96
  return web3_js_1.PublicKey.findProgramAddressSync([
90
97
  Buffer.from("position"),