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

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
@@ -569,6 +569,10 @@ declare class SimpleDI {
569
569
  interface IWalletAdapter {
570
570
  get chainId(): number;
571
571
  get addresses(): string;
572
+ /**
573
+ * Set the chain id
574
+ */
575
+ set chainId(chainId: number);
572
576
  parseUnits: (amount: string) => string;
573
577
  formatUnits: (amount: string) => string;
574
578
  send: (method: string, params: Array<any> | Record<string, any>) => Promise<any>;
@@ -580,7 +584,9 @@ interface IWalletAdapter {
580
584
  }, options: {
581
585
  abi: any;
582
586
  }): Promise<TransactionResponse>;
587
+ getTransactionRecipect: (txHash: string) => Promise<any>;
583
588
  signTypedData: (address: string, data: any) => Promise<string>;
589
+ pollTransactionReceiptWithBackoff: (txHash: string, baseInterval?: number, maxInterval?: number, maxRetries?: number) => Promise<any>;
584
590
  getBalance: (userAddress: string) => Promise<any>;
585
591
  call(address: string, method: string, params: any, options: {
586
592
  abi: any;
@@ -707,6 +713,8 @@ declare class Account {
707
713
  createOrderlyKey(expiration?: number): Promise<any>;
708
714
  settle(): Promise<any>;
709
715
  disconnect(): Promise<void>;
716
+ switchChainId(chainId: number | string): void;
717
+ private parseChainId;
710
718
  private _checkOrderlyKeyState;
711
719
  get signer(): Signer;
712
720
  get wallet(): IWalletAdapter | undefined;
@@ -744,6 +752,7 @@ declare class EtherAdapter implements IWalletAdapter {
744
752
  abi: any;
745
753
  }): Promise<any>;
746
754
  get chainId(): number;
755
+ set chainId(chainId: number);
747
756
  get addresses(): string;
748
757
  send(method: string, params: Array<any> | Record<string, any>): Promise<any>;
749
758
  sendTransaction(contractAddress: string, method: string, payload: {
@@ -754,6 +763,8 @@ declare class EtherAdapter implements IWalletAdapter {
754
763
  }, options: {
755
764
  abi: any;
756
765
  }): Promise<ethers.TransactionResponse>;
766
+ getTransactionRecipect(txHash: string): Promise<void>;
767
+ pollTransactionReceiptWithBackoff(txHash: string, baseInterval?: number, maxInterval?: number, maxRetries?: number): Promise<ethers.TransactionReceipt>;
757
768
  private estimateGas;
758
769
  signTypedData(address: string, data: any): Promise<any>;
759
770
  verify(data: {
package/dist/index.d.ts CHANGED
@@ -569,6 +569,10 @@ declare class SimpleDI {
569
569
  interface IWalletAdapter {
570
570
  get chainId(): number;
571
571
  get addresses(): string;
572
+ /**
573
+ * Set the chain id
574
+ */
575
+ set chainId(chainId: number);
572
576
  parseUnits: (amount: string) => string;
573
577
  formatUnits: (amount: string) => string;
574
578
  send: (method: string, params: Array<any> | Record<string, any>) => Promise<any>;
@@ -580,7 +584,9 @@ interface IWalletAdapter {
580
584
  }, options: {
581
585
  abi: any;
582
586
  }): Promise<TransactionResponse>;
587
+ getTransactionRecipect: (txHash: string) => Promise<any>;
583
588
  signTypedData: (address: string, data: any) => Promise<string>;
589
+ pollTransactionReceiptWithBackoff: (txHash: string, baseInterval?: number, maxInterval?: number, maxRetries?: number) => Promise<any>;
584
590
  getBalance: (userAddress: string) => Promise<any>;
585
591
  call(address: string, method: string, params: any, options: {
586
592
  abi: any;
@@ -707,6 +713,8 @@ declare class Account {
707
713
  createOrderlyKey(expiration?: number): Promise<any>;
708
714
  settle(): Promise<any>;
709
715
  disconnect(): Promise<void>;
716
+ switchChainId(chainId: number | string): void;
717
+ private parseChainId;
710
718
  private _checkOrderlyKeyState;
711
719
  get signer(): Signer;
712
720
  get wallet(): IWalletAdapter | undefined;
@@ -744,6 +752,7 @@ declare class EtherAdapter implements IWalletAdapter {
744
752
  abi: any;
745
753
  }): Promise<any>;
746
754
  get chainId(): number;
755
+ set chainId(chainId: number);
747
756
  get addresses(): string;
748
757
  send(method: string, params: Array<any> | Record<string, any>): Promise<any>;
749
758
  sendTransaction(contractAddress: string, method: string, payload: {
@@ -754,6 +763,8 @@ declare class EtherAdapter implements IWalletAdapter {
754
763
  }, options: {
755
764
  abi: any;
756
765
  }): Promise<ethers.TransactionResponse>;
766
+ getTransactionRecipect(txHash: string): Promise<void>;
767
+ pollTransactionReceiptWithBackoff(txHash: string, baseInterval?: number, maxInterval?: number, maxRetries?: number): Promise<ethers.TransactionReceipt>;
757
768
  private estimateGas;
758
769
  signTypedData(address: string, data: any): Promise<any>;
759
770
  verify(data: {