@orderly.network/core 0.2.4-alpha.2 → 0.2.4-experimental.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -87,11 +87,11 @@ type SignedMessagePayload = {
87
87
  * ```ts
88
88
  * const signer = new BaseSigner(keyStore);
89
89
  * const payload = await signer.sign({
90
- * url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=woofi_dex",
90
+ * url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=orderly",
91
91
  * method: "GET",
92
92
  * data: {
93
93
  * address: "0x1234567890",
94
- * brokerId: "woofi_pro",
94
+ * brokerId: "orderly",
95
95
  * },
96
96
  * });
97
97
  * ```
@@ -113,30 +113,6 @@ declare class BaseSigner implements Signer {
113
113
  }>;
114
114
  }
115
115
 
116
- type ConfigKey = "apiBaseUrl" | "klineDataUrl" | "privateWsUrl" | "publicWsUrl" | "operatorUrl" | "swapSupportApiUrl" | "domain" | "brokerId" | "networkId" | "env" | "PROD_URL" | "markets";
117
- interface ConfigStore {
118
- get<T>(key: ConfigKey): T;
119
- getOr<T>(key: ConfigKey, defaultValue: T): T;
120
- set<T>(key: ConfigKey, value: T): void;
121
- clear(): void;
122
- }
123
- declare class MemoryConfigStore implements ConfigStore {
124
- protected map: Map<ConfigKey, any>;
125
- constructor(init?: any);
126
- protected _restore(init?: Record<ConfigKey, any>): void;
127
- get<T>(key: ConfigKey): T;
128
- getOr<T>(key: ConfigKey, defaultValue: T): T;
129
- set<T>(key: ConfigKey, value: T): void;
130
- clear(): void;
131
- }
132
- /**
133
- *
134
- */
135
- declare class BaseConfigStore extends MemoryConfigStore {
136
- private readonly configMap;
137
- constructor(configMap: Record<string, any>);
138
- }
139
-
140
116
  type SignatureDomain = {
141
117
  name: string;
142
118
  version: string;
@@ -410,9 +386,16 @@ declare function generateSettleMessage(inputs: {
410
386
  };
411
387
  }];
412
388
 
389
+ type ConfigKey = "apiBaseUrl" | "klineDataUrl" | "privateWsUrl" | "publicWsUrl" | "operatorUrl" | "domain" | "brokerId" | "networkId" | "env" | "PROD_URL" | "markets";
390
+ interface ConfigStore {
391
+ get<T>(key: ConfigKey): T;
392
+ getOr<T>(key: ConfigKey, defaultValue: T): T;
393
+ set<T>(key: ConfigKey, value: T): void;
394
+ clear(): void;
395
+ }
396
+
413
397
  /**
414
398
  * Orderly contracts information
415
- * https://wootraders.atlassian.net/wiki/spaces/ORDER/pages/343441906/Orderly+V2+Contract+Information+Board
416
399
  */
417
400
  type OrderlyContracts = {
418
401
  usdcAddress: string;
@@ -783,4 +766,4 @@ declare class EtherAdapter implements IWalletAdapter {
783
766
  getContract(address: string, abi: any): ethers.Contract;
784
767
  }
785
768
 
786
- export { Account, AccountState, BaseConfigStore, BaseContract as BaseContractManager, BaseKeyStore, BaseOrderlyKeyPair, BaseSigner, ConfigKey, ConfigStore, DefaultConfigStore, EtherAdapter, IContract, LocalStorageStore, MemoryConfigStore, MessageFactor, MockKeyStore, OrderlyKeyPair, OrderlyKeyStore, SignedMessagePayload, Signer, SimpleDI, IWalletAdapter as WalletAdapter, WalletAdapterOptions, generateAddOrderlyKeyMessage, generateRegisterAccountMessage, generateSettleMessage, getDefaultSigner, getMockSigner, getWalletAdapterFunc, utils };
769
+ export { Account, AccountState, BaseContract as BaseContractManager, BaseKeyStore, BaseOrderlyKeyPair, BaseSigner, ConfigKey, ConfigStore, DefaultConfigStore, EtherAdapter, IContract, LocalStorageStore, MessageFactor, MockKeyStore, OrderlyKeyPair, OrderlyKeyStore, SignedMessagePayload, Signer, SimpleDI, IWalletAdapter as WalletAdapter, WalletAdapterOptions, generateAddOrderlyKeyMessage, generateRegisterAccountMessage, generateSettleMessage, getDefaultSigner, getMockSigner, getWalletAdapterFunc, utils };
package/dist/index.d.ts CHANGED
@@ -87,11 +87,11 @@ type SignedMessagePayload = {
87
87
  * ```ts
88
88
  * const signer = new BaseSigner(keyStore);
89
89
  * const payload = await signer.sign({
90
- * url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=woofi_dex",
90
+ * url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=orderly",
91
91
  * method: "GET",
92
92
  * data: {
93
93
  * address: "0x1234567890",
94
- * brokerId: "woofi_pro",
94
+ * brokerId: "orderly",
95
95
  * },
96
96
  * });
97
97
  * ```
@@ -113,30 +113,6 @@ declare class BaseSigner implements Signer {
113
113
  }>;
114
114
  }
115
115
 
116
- type ConfigKey = "apiBaseUrl" | "klineDataUrl" | "privateWsUrl" | "publicWsUrl" | "operatorUrl" | "swapSupportApiUrl" | "domain" | "brokerId" | "networkId" | "env" | "PROD_URL" | "markets";
117
- interface ConfigStore {
118
- get<T>(key: ConfigKey): T;
119
- getOr<T>(key: ConfigKey, defaultValue: T): T;
120
- set<T>(key: ConfigKey, value: T): void;
121
- clear(): void;
122
- }
123
- declare class MemoryConfigStore implements ConfigStore {
124
- protected map: Map<ConfigKey, any>;
125
- constructor(init?: any);
126
- protected _restore(init?: Record<ConfigKey, any>): void;
127
- get<T>(key: ConfigKey): T;
128
- getOr<T>(key: ConfigKey, defaultValue: T): T;
129
- set<T>(key: ConfigKey, value: T): void;
130
- clear(): void;
131
- }
132
- /**
133
- *
134
- */
135
- declare class BaseConfigStore extends MemoryConfigStore {
136
- private readonly configMap;
137
- constructor(configMap: Record<string, any>);
138
- }
139
-
140
116
  type SignatureDomain = {
141
117
  name: string;
142
118
  version: string;
@@ -410,9 +386,16 @@ declare function generateSettleMessage(inputs: {
410
386
  };
411
387
  }];
412
388
 
389
+ type ConfigKey = "apiBaseUrl" | "klineDataUrl" | "privateWsUrl" | "publicWsUrl" | "operatorUrl" | "domain" | "brokerId" | "networkId" | "env" | "PROD_URL" | "markets";
390
+ interface ConfigStore {
391
+ get<T>(key: ConfigKey): T;
392
+ getOr<T>(key: ConfigKey, defaultValue: T): T;
393
+ set<T>(key: ConfigKey, value: T): void;
394
+ clear(): void;
395
+ }
396
+
413
397
  /**
414
398
  * Orderly contracts information
415
- * https://wootraders.atlassian.net/wiki/spaces/ORDER/pages/343441906/Orderly+V2+Contract+Information+Board
416
399
  */
417
400
  type OrderlyContracts = {
418
401
  usdcAddress: string;
@@ -783,4 +766,4 @@ declare class EtherAdapter implements IWalletAdapter {
783
766
  getContract(address: string, abi: any): ethers.Contract;
784
767
  }
785
768
 
786
- export { Account, AccountState, BaseConfigStore, BaseContract as BaseContractManager, BaseKeyStore, BaseOrderlyKeyPair, BaseSigner, ConfigKey, ConfigStore, DefaultConfigStore, EtherAdapter, IContract, LocalStorageStore, MemoryConfigStore, MessageFactor, MockKeyStore, OrderlyKeyPair, OrderlyKeyStore, SignedMessagePayload, Signer, SimpleDI, IWalletAdapter as WalletAdapter, WalletAdapterOptions, generateAddOrderlyKeyMessage, generateRegisterAccountMessage, generateSettleMessage, getDefaultSigner, getMockSigner, getWalletAdapterFunc, utils };
769
+ export { Account, AccountState, BaseContract as BaseContractManager, BaseKeyStore, BaseOrderlyKeyPair, BaseSigner, ConfigKey, ConfigStore, DefaultConfigStore, EtherAdapter, IContract, LocalStorageStore, MessageFactor, MockKeyStore, OrderlyKeyPair, OrderlyKeyStore, SignedMessagePayload, Signer, SimpleDI, IWalletAdapter as WalletAdapter, WalletAdapterOptions, generateAddOrderlyKeyMessage, generateRegisterAccountMessage, generateSettleMessage, getDefaultSigner, getMockSigner, getWalletAdapterFunc, utils };