@orderly.network/core 0.0.52 → 0.0.53

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
@@ -141,6 +141,7 @@ declare const getDefaultSigner: () => BaseSigner;
141
141
  type OrderlyContracts = {
142
142
  usdcAddress: string;
143
143
  usdcAbi: any;
144
+ erc20Abi: any;
144
145
  vaultAddress: string;
145
146
  vaultAbi: any;
146
147
  verifyContractAddress: string;
@@ -261,6 +262,45 @@ declare class BaseContract implements IContract {
261
262
  anonymous?: undefined;
262
263
  })[];
263
264
  verifyContractAddress: string;
265
+ erc20Abi: ({
266
+ inputs: {
267
+ internalType: string;
268
+ name: string;
269
+ type: string;
270
+ }[];
271
+ stateMutability: string;
272
+ type: string;
273
+ anonymous?: undefined;
274
+ name?: undefined;
275
+ outputs?: undefined;
276
+ } | {
277
+ anonymous: boolean;
278
+ inputs: {
279
+ indexed: boolean;
280
+ internalType: string;
281
+ name: string;
282
+ type: string;
283
+ }[];
284
+ name: string;
285
+ type: string;
286
+ stateMutability?: undefined;
287
+ outputs?: undefined;
288
+ } | {
289
+ inputs: {
290
+ internalType: string;
291
+ name: string;
292
+ type: string;
293
+ }[];
294
+ name: string;
295
+ outputs: {
296
+ internalType: string;
297
+ name: string;
298
+ type: string;
299
+ }[];
300
+ stateMutability: string;
301
+ type: string;
302
+ anonymous?: undefined;
303
+ })[];
264
304
  };
265
305
  }
266
306
 
@@ -283,9 +323,7 @@ interface WalletAdapter {
283
323
  fromUnits: (amount: string) => string;
284
324
  send: (method: string, params: Array<any> | Record<string, any>) => Promise<any>;
285
325
  signTypedData: (address: string, data: any) => Promise<string>;
286
- getBalance: (address: string, userAddress: string, options: {
287
- abi: any;
288
- }) => Promise<any>;
326
+ getBalance: (userAddress: string) => Promise<any>;
289
327
  call(address: string, method: string, params: any, options: {
290
328
  abi: any;
291
329
  }): Promise<any>;
@@ -318,8 +356,10 @@ declare class Assets {
318
356
  }): Promise<any>;
319
357
  private _generateWithdrawMessage;
320
358
  private getWithdrawalNonce;
321
- getBalance(): Promise<string>;
322
- getAllowance(): Promise<string>;
359
+ getNativeBalance(): Promise<string>;
360
+ getBalance(address?: string): Promise<string>;
361
+ getBalanceByAddress(address: string): Promise<string>;
362
+ getAllowance(address?: string): Promise<string>;
323
363
  approve(amount?: string): Promise<any>;
324
364
  deposit(amount: string): Promise<any>;
325
365
  private _simpleFetch;
@@ -412,9 +452,7 @@ declare class EtherAdapter implements WalletAdapter {
412
452
  constructor(options: WalletAdapterOptions);
413
453
  parseUnits(amount: string): string;
414
454
  fromUnits(amount: string): string;
415
- getBalance(contractId: string, userAddress: string, options: {
416
- abi: any;
417
- }): Promise<any>;
455
+ getBalance(userAddress: string): Promise<any>;
418
456
  deposit(from: string, to: string, amount: string): Promise<any>;
419
457
  call(address: string, method: string, params: any[], options: {
420
458
  abi: any;
package/dist/index.d.ts CHANGED
@@ -141,6 +141,7 @@ declare const getDefaultSigner: () => BaseSigner;
141
141
  type OrderlyContracts = {
142
142
  usdcAddress: string;
143
143
  usdcAbi: any;
144
+ erc20Abi: any;
144
145
  vaultAddress: string;
145
146
  vaultAbi: any;
146
147
  verifyContractAddress: string;
@@ -261,6 +262,45 @@ declare class BaseContract implements IContract {
261
262
  anonymous?: undefined;
262
263
  })[];
263
264
  verifyContractAddress: string;
265
+ erc20Abi: ({
266
+ inputs: {
267
+ internalType: string;
268
+ name: string;
269
+ type: string;
270
+ }[];
271
+ stateMutability: string;
272
+ type: string;
273
+ anonymous?: undefined;
274
+ name?: undefined;
275
+ outputs?: undefined;
276
+ } | {
277
+ anonymous: boolean;
278
+ inputs: {
279
+ indexed: boolean;
280
+ internalType: string;
281
+ name: string;
282
+ type: string;
283
+ }[];
284
+ name: string;
285
+ type: string;
286
+ stateMutability?: undefined;
287
+ outputs?: undefined;
288
+ } | {
289
+ inputs: {
290
+ internalType: string;
291
+ name: string;
292
+ type: string;
293
+ }[];
294
+ name: string;
295
+ outputs: {
296
+ internalType: string;
297
+ name: string;
298
+ type: string;
299
+ }[];
300
+ stateMutability: string;
301
+ type: string;
302
+ anonymous?: undefined;
303
+ })[];
264
304
  };
265
305
  }
266
306
 
@@ -283,9 +323,7 @@ interface WalletAdapter {
283
323
  fromUnits: (amount: string) => string;
284
324
  send: (method: string, params: Array<any> | Record<string, any>) => Promise<any>;
285
325
  signTypedData: (address: string, data: any) => Promise<string>;
286
- getBalance: (address: string, userAddress: string, options: {
287
- abi: any;
288
- }) => Promise<any>;
326
+ getBalance: (userAddress: string) => Promise<any>;
289
327
  call(address: string, method: string, params: any, options: {
290
328
  abi: any;
291
329
  }): Promise<any>;
@@ -318,8 +356,10 @@ declare class Assets {
318
356
  }): Promise<any>;
319
357
  private _generateWithdrawMessage;
320
358
  private getWithdrawalNonce;
321
- getBalance(): Promise<string>;
322
- getAllowance(): Promise<string>;
359
+ getNativeBalance(): Promise<string>;
360
+ getBalance(address?: string): Promise<string>;
361
+ getBalanceByAddress(address: string): Promise<string>;
362
+ getAllowance(address?: string): Promise<string>;
323
363
  approve(amount?: string): Promise<any>;
324
364
  deposit(amount: string): Promise<any>;
325
365
  private _simpleFetch;
@@ -412,9 +452,7 @@ declare class EtherAdapter implements WalletAdapter {
412
452
  constructor(options: WalletAdapterOptions);
413
453
  parseUnits(amount: string): string;
414
454
  fromUnits(amount: string): string;
415
- getBalance(contractId: string, userAddress: string, options: {
416
- abi: any;
417
- }): Promise<any>;
455
+ getBalance(userAddress: string): Promise<any>;
418
456
  deposit(from: string, to: string, amount: string): Promise<any>;
419
457
  call(address: string, method: string, params: any[], options: {
420
458
  abi: any;