Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions v4-client-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion v4-client-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@cosmjs/stargate": "^0.32.1",
"@cosmjs/tendermint-rpc": "^0.32.1",
"@cosmjs/utils": "^0.32.1",
"@dydxprotocol/v4-proto": "9.4.0-rc.0",
"@dydxprotocol/v4-proto": "9.5.0",
"@osmonauts/lcd": "^0.6.0",
"@scure/bip32": "^1.1.5",
"@scure/bip39": "^1.1.1",
Expand Down
17 changes: 16 additions & 1 deletion v4-client-js/src/clients/composite-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { UserError } from './lib/errors';
import { generateRegistry } from './lib/registry';
import LocalWallet from './modules/local-wallet';
import { SubaccountInfo } from './subaccount';
import { BroadcastMode, OrderBatch } from './types';
import { BroadcastMode, IBuilderCodeParameters, ITwapParameters, OrderBatch } from './types';
import { ValidatorClient } from './validator-client';

// Required for encoding and decoding queries that are of type Long.
Expand Down Expand Up @@ -86,6 +86,9 @@ export type PlaceOrderPayload = {
marketInfo?: MarketInfo;
currentHeight?: number;
goodTilBlock?: number;
twapParameters?: ITwapParameters;
builderCodeParameters?: IBuilderCodeParameters;
orderRouterAddress?: string;
};

export type CancelRawOrderPayload = {
Expand Down Expand Up @@ -422,6 +425,9 @@ export class CompositeClient {
goodTilBlock?: number,
memo?: string,
broadcastMode?: BroadcastMode,
twapParameters?: ITwapParameters,
builderCodeParameters?: IBuilderCodeParameters,
orderRouterAddress?: string,
): Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
const msgs: Promise<EncodeObject[]> = new Promise((resolve) => {
const msg = this.placeOrderMessage(
Expand All @@ -441,6 +447,9 @@ export class CompositeClient {
marketInfo,
currentHeight,
goodTilBlock,
twapParameters,
builderCodeParameters,
orderRouterAddress,
);
msg
.then((it) => resolve([it]))
Expand Down Expand Up @@ -506,6 +515,9 @@ export class CompositeClient {
marketInfo?: MarketInfo,
currentHeight?: number,
goodTilBlock?: number,
twapParameters?: ITwapParameters,
builderCodeParameters?: IBuilderCodeParameters,
orderRouterAddress?: string,
): Promise<EncodeObject> {
const orderFlags = calculateOrderFlags(type, timeInForce);

Expand Down Expand Up @@ -561,6 +573,9 @@ export class CompositeClient {
clientMetadata,
conditionalType,
conditionalOrderTriggerSubticks,
twapParameters,
builderCodeParameters,
orderRouterAddress,
);
}

Expand Down
Loading