mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-30 01:27:57 +03:00
add types export
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
export { default as signCancelOrder } from './signCancelOrder.js';
|
||||
export { default as signOrder } from './signOrder.js';
|
||||
export { signLockOrder } from './signLockOrder.js';
|
||||
export { signOrder, type SignOrderProps } from './signOrder.js';
|
||||
export { signLockOrder, type SignLockOrderProps } from './signLockOrder.js';
|
||||
|
||||
@@ -9,7 +9,7 @@ import { LOCK_ORDER_TYPES } from '../constants/lockOrderTypes';
|
||||
|
||||
const DEFAULT_EXPIRATION = 29 * 24 * 60 * 60 * 1000; // 29 days
|
||||
|
||||
export type LockOrderProps = {
|
||||
export type SignLockOrderProps = {
|
||||
userAddress: string // адрес юзера который хочет сделать лок
|
||||
senderAddress: string // broker
|
||||
asset: string
|
||||
@@ -27,7 +27,7 @@ export const signLockOrder = async ({
|
||||
targetChainId,
|
||||
asset,
|
||||
signer,
|
||||
}: LockOrderProps) => {
|
||||
}: SignLockOrderProps) => {
|
||||
const nonce = Date.now();
|
||||
const expiration = nonce + DEFAULT_EXPIRATION;
|
||||
const secret = generateSecret();
|
||||
|
||||
@@ -10,7 +10,7 @@ import generateSecret from '../utils/generateSecret';
|
||||
|
||||
const DEFAULT_EXPIRATION = 29 * 24 * 60 * 60 * 1000; // 29 days
|
||||
|
||||
type SignOrderProps = {
|
||||
export type SignOrderProps = {
|
||||
baseAssetAddress: string
|
||||
quoteAssetAddress: string
|
||||
side: 'BUY' | 'SELL'
|
||||
|
||||
Reference in New Issue
Block a user