Socket
Socket
Sign inDemoInstall

@project-serum/serum

Package Overview
Dependencies
Maintainers
2
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@project-serum/serum - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

3

lib/index.d.ts

@@ -1,4 +0,5 @@

export { DexInstructions } from "./instructions";
export * as TokenInstructions from "./token-instructions";
export { Market, Orderbook, OpenOrders } from "./market";
export { DexInstructions, DEX_PROGRAM_ID } from "./instructions";
export { decodeEventQueue, decodeRequestQueue } from "./queue";
//# sourceMappingURL=index.d.ts.map

@@ -28,3 +28,7 @@ "use strict";

Object.defineProperty(exports, "DexInstructions", { enumerable: true, get: function () { return instructions_1.DexInstructions; } });
Object.defineProperty(exports, "DEX_PROGRAM_ID", { enumerable: true, get: function () { return instructions_1.DEX_PROGRAM_ID; } });
var queue_1 = require("./queue");
Object.defineProperty(exports, "decodeEventQueue", { enumerable: true, get: function () { return queue_1.decodeEventQueue; } });
Object.defineProperty(exports, "decodeRequestQueue", { enumerable: true, get: function () { return queue_1.decodeRequestQueue; } });
exports.TokenInstructions = __importStar(require("./token-instructions"));
//# sourceMappingURL=index.js.map

@@ -37,2 +37,3 @@ /// <reference types="node" />

}>;
makePlaceOrderInstruction<T extends PublicKey | Account>(connection: Connection, { owner, payer, side, price, size, orderType, clientId, }: OrderParams<T>, openOrdersAddress: any): TransactionInstruction;
private _sendTransaction;

@@ -117,4 +118,5 @@ cancelOrderByClientId(connection: Connection, owner: Account, openOrders: PublicKey, clientId: BN): Promise<string>;

side: 'buy' | 'sell';
clientId?: BN;
}
export declare function getMintDecimals(connection: Connection, mint: PublicKey): Promise<number>;
//# sourceMappingURL=market.d.ts.map

@@ -150,2 +150,18 @@ "use strict";

}
const placeOrderInstruction = this.makePlaceOrderInstruction(connection, {
owner,
payer,
side,
price,
size,
orderType,
clientId,
}, openOrdersAddress);
transaction.add(placeOrderInstruction);
return { transaction, signers };
}
makePlaceOrderInstruction(connection, { owner, payer, side, price, size, orderType = 'limit', clientId, }, openOrdersAddress) {
var _a;
// @ts-ignore
const ownerAddress = (_a = owner.publicKey) !== null && _a !== void 0 ? _a : owner;
if (this.baseSizeNumberToLots(size).lte(new bn_js_1.default(0))) {

@@ -157,3 +173,3 @@ throw new Error('size too small');

}
transaction.add(instructions_1.DexInstructions.newOrder({
return instructions_1.DexInstructions.newOrder({
market: this.address,

@@ -171,4 +187,3 @@ requestQueue: this._decoded.requestQueue,

clientId,
}));
return { transaction, signers };
});
}

@@ -175,0 +190,0 @@ async _sendTransaction(connection, transaction, signers) {

{
"name": "@project-serum/serum",
"version": "0.6.4",
"version": "0.6.5",
"description": "Library for interacting with the serum dex",

@@ -54,3 +54,3 @@ "license": "MIT",

"dependencies": {
"@solana/web3.js": "^0.71.6",
"@solana/web3.js": "^0.71.9",
"bn.js": "^5.1.2",

@@ -57,0 +57,0 @@ "buffer-layout": "^1.2.0"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc