@hiveio/dhive 1.1.1 → 1.2.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/dhive.d.ts CHANGED
@@ -2597,7 +2597,7 @@ declare module 'dhive/helpers/key' {
2597
2597
  import { PublicKey } from 'dhive/crypto';
2598
2598
  import { Client } from 'dhive/client';
2599
2599
  export interface AccountsByKey {
2600
- accounts: [string[]];
2600
+ accounts: string[][];
2601
2601
  }
2602
2602
  export class AccountByKeyAPI {
2603
2603
  readonly client: Client;
@@ -2714,6 +2714,29 @@ declare module 'dhive/helpers/rc' {
2714
2714
  private _calculateManabar;
2715
2715
  }
2716
2716
 
2717
+ }
2718
+ declare module 'dhive/helpers/transaction' {
2719
+ /**
2720
+ * @file Transaction status API helpers.
2721
+ * @author Bartłomiej (@engrave) Górnicki
2722
+ */
2723
+ import { Client } from 'dhive/client';
2724
+ export type TransactionStatus = 'unknown' | 'within_mempool' | 'within_reversible_block' | 'within_irreversible_block' | 'expired_reversible' | 'expired_irreversible' | 'too_old';
2725
+ export class TransactionStatusAPI {
2726
+ readonly client: Client;
2727
+ constructor(client: Client);
2728
+ /**
2729
+ * Convenience for calling `transaction_status_api`.
2730
+ */
2731
+ call(method: string, params?: any): Promise<any>;
2732
+ /**
2733
+ * Returns the status of a given transaction id
2734
+ */
2735
+ findTransaction(transaction_id: string, expiration?: string): Promise<{
2736
+ status: TransactionStatus;
2737
+ }>;
2738
+ }
2739
+
2717
2740
  }
2718
2741
  declare module 'dhive/client' {
2719
2742
  /**
@@ -2757,6 +2780,7 @@ declare module 'dhive/client' {
2757
2780
  import { HivemindAPI } from 'dhive/helpers/hivemind';
2758
2781
  import { AccountByKeyAPI } from 'dhive/helpers/key';
2759
2782
  import { RCAPI } from 'dhive/helpers/rc';
2783
+ import { TransactionStatusAPI } from 'dhive/helpers/transaction';
2760
2784
  /**
2761
2785
  * Library version.
2762
2786
  */
@@ -2859,6 +2883,10 @@ declare module 'dhive/client' {
2859
2883
  * Accounts by key API helper.
2860
2884
  */
2861
2885
  readonly keys: AccountByKeyAPI;
2886
+ /**
2887
+ * Transaction status API helper.
2888
+ */
2889
+ readonly transaction: TransactionStatusAPI;
2862
2890
  /**
2863
2891
  * Chain ID for current network.
2864
2892
  */