@orderly.network/core 0.0.12 → 0.0.14
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 +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1 -2720
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -2674
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
1
|
import { AccountStatusEnum } from '@orderly.network/types';
|
|
2
|
+
import EventEmitter from 'eventemitter3';
|
|
3
3
|
|
|
4
4
|
interface OrderlyKeyPair {
|
|
5
5
|
getPublicKey(): Promise<string>;
|
|
@@ -178,7 +178,8 @@ declare class Account {
|
|
|
178
178
|
private readonly walletAdapterClass;
|
|
179
179
|
static instanceName: string;
|
|
180
180
|
private _singer?;
|
|
181
|
-
private
|
|
181
|
+
private _ee;
|
|
182
|
+
private _state;
|
|
182
183
|
private walletClient?;
|
|
183
184
|
constructor(configStore: ConfigStore, keyStore: OrderlyKeyStore, walletAdapterClass: {
|
|
184
185
|
new (options: any): WalletAdapter;
|
|
@@ -199,7 +200,6 @@ declare class Account {
|
|
|
199
200
|
};
|
|
200
201
|
[key: string]: any;
|
|
201
202
|
}): Promise<AccountStatusEnum>;
|
|
202
|
-
get state$(): BehaviorSubject<AccountState>;
|
|
203
203
|
get stateValue(): AccountState;
|
|
204
204
|
get accountId(): string | undefined;
|
|
205
205
|
/**
|
|
@@ -207,6 +207,7 @@ declare class Account {
|
|
|
207
207
|
*/
|
|
208
208
|
set position(position: string[]);
|
|
209
209
|
set orders(orders: string[]);
|
|
210
|
+
private _bindEvents;
|
|
210
211
|
private _checkAccount;
|
|
211
212
|
private _checkAccountExist;
|
|
212
213
|
createAccount(): Promise<any>;
|
|
@@ -218,6 +219,9 @@ declare class Account {
|
|
|
218
219
|
private getBalance;
|
|
219
220
|
private _getRegisterationNonce;
|
|
220
221
|
private _simpleFetch;
|
|
222
|
+
get on(): <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
|
|
223
|
+
get once(): <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
|
|
224
|
+
get off(): <T extends string | symbol>(event: T, fn?: ((...args: any[]) => void) | undefined, context?: any, once?: boolean | undefined) => EventEmitter<string | symbol, any>;
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
declare namespace API {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
1
|
import { AccountStatusEnum } from '@orderly.network/types';
|
|
2
|
+
import EventEmitter from 'eventemitter3';
|
|
3
3
|
|
|
4
4
|
interface OrderlyKeyPair {
|
|
5
5
|
getPublicKey(): Promise<string>;
|
|
@@ -178,7 +178,8 @@ declare class Account {
|
|
|
178
178
|
private readonly walletAdapterClass;
|
|
179
179
|
static instanceName: string;
|
|
180
180
|
private _singer?;
|
|
181
|
-
private
|
|
181
|
+
private _ee;
|
|
182
|
+
private _state;
|
|
182
183
|
private walletClient?;
|
|
183
184
|
constructor(configStore: ConfigStore, keyStore: OrderlyKeyStore, walletAdapterClass: {
|
|
184
185
|
new (options: any): WalletAdapter;
|
|
@@ -199,7 +200,6 @@ declare class Account {
|
|
|
199
200
|
};
|
|
200
201
|
[key: string]: any;
|
|
201
202
|
}): Promise<AccountStatusEnum>;
|
|
202
|
-
get state$(): BehaviorSubject<AccountState>;
|
|
203
203
|
get stateValue(): AccountState;
|
|
204
204
|
get accountId(): string | undefined;
|
|
205
205
|
/**
|
|
@@ -207,6 +207,7 @@ declare class Account {
|
|
|
207
207
|
*/
|
|
208
208
|
set position(position: string[]);
|
|
209
209
|
set orders(orders: string[]);
|
|
210
|
+
private _bindEvents;
|
|
210
211
|
private _checkAccount;
|
|
211
212
|
private _checkAccountExist;
|
|
212
213
|
createAccount(): Promise<any>;
|
|
@@ -218,6 +219,9 @@ declare class Account {
|
|
|
218
219
|
private getBalance;
|
|
219
220
|
private _getRegisterationNonce;
|
|
220
221
|
private _simpleFetch;
|
|
222
|
+
get on(): <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
|
|
223
|
+
get once(): <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
|
|
224
|
+
get off(): <T extends string | symbol>(event: T, fn?: ((...args: any[]) => void) | undefined, context?: any, once?: boolean | undefined) => EventEmitter<string | symbol, any>;
|
|
221
225
|
}
|
|
222
226
|
|
|
223
227
|
declare namespace API {
|