@orderly.network/core 0.2.4-experimental.0 → 0.2.4-rc.4
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 +28 -11
- package/dist/index.d.ts +28 -11
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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=
|
|
90
|
+
* url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=woofi_dex",
|
|
91
91
|
* method: "GET",
|
|
92
92
|
* data: {
|
|
93
93
|
* address: "0x1234567890",
|
|
94
|
-
* brokerId: "
|
|
94
|
+
* brokerId: "woofi_pro",
|
|
95
95
|
* },
|
|
96
96
|
* });
|
|
97
97
|
* ```
|
|
@@ -113,6 +113,30 @@ 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
|
+
|
|
116
140
|
type SignatureDomain = {
|
|
117
141
|
name: string;
|
|
118
142
|
version: string;
|
|
@@ -386,16 +410,9 @@ declare function generateSettleMessage(inputs: {
|
|
|
386
410
|
};
|
|
387
411
|
}];
|
|
388
412
|
|
|
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
|
-
|
|
397
413
|
/**
|
|
398
414
|
* Orderly contracts information
|
|
415
|
+
* https://wootraders.atlassian.net/wiki/spaces/ORDER/pages/343441906/Orderly+V2+Contract+Information+Board
|
|
399
416
|
*/
|
|
400
417
|
type OrderlyContracts = {
|
|
401
418
|
usdcAddress: string;
|
|
@@ -766,4 +783,4 @@ declare class EtherAdapter implements IWalletAdapter {
|
|
|
766
783
|
getContract(address: string, abi: any): ethers.Contract;
|
|
767
784
|
}
|
|
768
785
|
|
|
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 };
|
|
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 };
|
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=
|
|
90
|
+
* url: "https://api.orderly.io/get_account?address=0x1234567890&brokerId=woofi_dex",
|
|
91
91
|
* method: "GET",
|
|
92
92
|
* data: {
|
|
93
93
|
* address: "0x1234567890",
|
|
94
|
-
* brokerId: "
|
|
94
|
+
* brokerId: "woofi_pro",
|
|
95
95
|
* },
|
|
96
96
|
* });
|
|
97
97
|
* ```
|
|
@@ -113,6 +113,30 @@ 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
|
+
|
|
116
140
|
type SignatureDomain = {
|
|
117
141
|
name: string;
|
|
118
142
|
version: string;
|
|
@@ -386,16 +410,9 @@ declare function generateSettleMessage(inputs: {
|
|
|
386
410
|
};
|
|
387
411
|
}];
|
|
388
412
|
|
|
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
|
-
|
|
397
413
|
/**
|
|
398
414
|
* Orderly contracts information
|
|
415
|
+
* https://wootraders.atlassian.net/wiki/spaces/ORDER/pages/343441906/Orderly+V2+Contract+Information+Board
|
|
399
416
|
*/
|
|
400
417
|
type OrderlyContracts = {
|
|
401
418
|
usdcAddress: string;
|
|
@@ -766,4 +783,4 @@ declare class EtherAdapter implements IWalletAdapter {
|
|
|
766
783
|
getContract(address: string, abi: any): ethers.Contract;
|
|
767
784
|
}
|
|
768
785
|
|
|
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 };
|
|
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 };
|