@project-serum/serum
Advanced tools
Comparing version 0.13.48 to 0.13.49
@@ -17,2 +17,3 @@ import { PublicKey, TransactionInstruction } from '@solana/web3.js'; | ||
}); | ||
static marketAuthority(market: PublicKey, dexProgramId: PublicKey, proxyProgramId: PublicKey): Promise<PublicKey>; | ||
static openOrdersAddress(market: PublicKey, owner: PublicKey, dexProgramId: PublicKey, proxyProgramId: PublicKey): Promise<PublicKey>; | ||
@@ -19,0 +20,0 @@ initOpenOrders(ix: TransactionInstruction): void; |
@@ -11,2 +11,26 @@ "use strict"; | ||
} | ||
// PDA authorized to create open orders accounts. | ||
static async marketAuthority(market, dexProgramId, proxyProgramId) { | ||
// b"open-orders-init" | ||
const openOrdersStr = Buffer.from([ | ||
111, | ||
112, | ||
101, | ||
110, | ||
45, | ||
111, | ||
114, | ||
100, | ||
101, | ||
114, | ||
115, | ||
45, | ||
105, | ||
110, | ||
105, | ||
116, | ||
]); | ||
const [addr] = await web3_js_1.PublicKey.findProgramAddress([openOrdersStr, dexProgramId.toBuffer(), market.toBuffer()], proxyProgramId); | ||
return addr; | ||
} | ||
static async openOrdersAddress(market, owner, dexProgramId, proxyProgramId) { | ||
@@ -13,0 +37,0 @@ // b"open-orders". |
{ | ||
"name": "@project-serum/serum", | ||
"version": "0.13.48", | ||
"version": "0.13.49", | ||
"description": "Library for interacting with the serum dex", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
283581
4574