UNPKG

@d8x/perpetuals-sdk

Version:

Node TypeScript SDK for D8X Perpetual Futures

23 lines (22 loc) 847 B
import { BigNumberish } from "ethers"; import { type SmartContractOrder } from "./nodeSDKTypes"; export default class TraderDigests { /** * Creates an order-id from the digest. Order-id is the 'digest' used in the smart contract. * @param digest created with _createDigest * @returns orderId string * @ignore */ createOrderId(digest: string): string; /** * Creates a digest (order-id) * @param order smart-contract-type order * @param chainId chainId of network * @param isNewOrder true unless we cancel * @param signer ethereum-type wallet * @param proxyAddress address of the contract * @returns digest * @ignore */ createDigest(order: SmartContractOrder, chainId: BigNumberish, isNewOrder: boolean, proxyAddress: string): string; }