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