Constructors
constructor
- new OrderHashManager(__namedParameters: { address: string; network: Network; subaccountIndex?: number }): OrderHashManager
Parameters
__namedParameters: { address: string; network: Network; subaccountIndex?: number }
address: string
Optional subaccountIndex?: number
Properties
subaccountIndex
subaccountIndex: number
Methods
getDerivativeOrderHashFromMsg
getOrderHashes
- getOrderHashes(__namedParameters: { derivativeOrders: DerivativeOrder[]; spotOrders: SpotOrder[] }): internal.Promise<{ derivativeOrderHashes: string[]; spotOrderHashes: string[] }>
Parameters
__namedParameters: { derivativeOrders: DerivativeOrder[]; spotOrders: SpotOrder[] }
Returns internal.Promise<{ derivativeOrderHashes: string[]; spotOrderHashes: string[] }>
Private hashTypedData
- hashTypedData(eip712: any): string
Private incrementNonceAndReturn
- incrementNonceAndReturn<T>(result: T): T
Type Parameters
Parameters
Returns T
Private initSubaccountNonce
setNonce
- setNonce(nonce: number): void
Keep in mind that the order params have to be transformed in proper format that's supported on the chain