@hiveio/dhive 1.1.0 → 1.2.1
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 +28 -28
- package/dist/dhive.js +1 -1
- package/dist/dhive.js.gz +0 -0
- package/dist/dhive.js.map +1 -1
- package/lib/chain/operation.d.ts +1 -1
- package/lib/chain/serializer.js +1 -1
- package/lib/client.d.ts +6 -1
- package/lib/client.js +2 -0
- package/lib/helpers/key.d.ts +1 -1
- package/lib/helpers/key.js +1 -1
- package/lib/helpers/transaction.d.ts +20 -0
- package/lib/helpers/transaction.js +41 -0
- package/lib/utils.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -2
package/dist/dhive.d.ts
CHANGED
|
@@ -787,13 +787,13 @@ declare module 'dhive/crypto' {
|
|
|
787
787
|
doubleSha256: typeof doubleSha256;
|
|
788
788
|
encodePrivate: typeof encodePrivate;
|
|
789
789
|
encodePublic: typeof encodePublic;
|
|
790
|
+
generateTrxId: typeof generateTrxId;
|
|
790
791
|
isCanonicalSignature: typeof isCanonicalSignature;
|
|
791
792
|
isWif: typeof isWif;
|
|
792
793
|
ripemd160: typeof ripemd160;
|
|
793
794
|
sha256: typeof sha256;
|
|
794
795
|
signTransaction: typeof signTransaction;
|
|
795
796
|
transactionDigest: typeof transactionDigest;
|
|
796
|
-
generateTrxId: typeof generateTrxId;
|
|
797
797
|
};
|
|
798
798
|
export {};
|
|
799
799
|
|
|
@@ -1412,8 +1412,8 @@ declare module 'dhive/chain/operation' {
|
|
|
1412
1412
|
owner: string;
|
|
1413
1413
|
orderid: number;
|
|
1414
1414
|
amount_to_sell: Asset | string;
|
|
1415
|
-
fill_or_kill: boolean;
|
|
1416
1415
|
exchange_rate: PriceType;
|
|
1416
|
+
fill_or_kill: boolean;
|
|
1417
1417
|
expiration: string;
|
|
1418
1418
|
};
|
|
1419
1419
|
}
|
|
@@ -2588,6 +2588,30 @@ declare module 'dhive/helpers/hivemind' {
|
|
|
2588
2588
|
}
|
|
2589
2589
|
export {};
|
|
2590
2590
|
|
|
2591
|
+
}
|
|
2592
|
+
declare module 'dhive/helpers/key' {
|
|
2593
|
+
/**
|
|
2594
|
+
* @file Account by key API helpers.
|
|
2595
|
+
* @author Bartłomiej (@engrave) Górnicki
|
|
2596
|
+
*/
|
|
2597
|
+
import { PublicKey } from 'dhive/crypto';
|
|
2598
|
+
import { Client } from 'dhive/client';
|
|
2599
|
+
export interface AccountsByKey {
|
|
2600
|
+
accounts: [string[]];
|
|
2601
|
+
}
|
|
2602
|
+
export class AccountByKeyAPI {
|
|
2603
|
+
readonly client: Client;
|
|
2604
|
+
constructor(client: Client);
|
|
2605
|
+
/**
|
|
2606
|
+
* Convenience for calling `account_by_key_api`.
|
|
2607
|
+
*/
|
|
2608
|
+
call(method: string, params?: any): Promise<any>;
|
|
2609
|
+
/**
|
|
2610
|
+
* Returns all accounts that have the key associated with their owner or active authorities.
|
|
2611
|
+
*/
|
|
2612
|
+
getKeyReferences(keys: (PublicKey | string)[]): Promise<AccountsByKey>;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2591
2615
|
}
|
|
2592
2616
|
declare module 'dhive/chain/rc' {
|
|
2593
2617
|
import { SMTAsset } from 'dhive/chain/asset';
|
|
@@ -2690,30 +2714,6 @@ declare module 'dhive/helpers/rc' {
|
|
|
2690
2714
|
private _calculateManabar;
|
|
2691
2715
|
}
|
|
2692
2716
|
|
|
2693
|
-
}
|
|
2694
|
-
declare module 'dhive/helpers/key' {
|
|
2695
|
-
/**
|
|
2696
|
-
* @file Account by key API helpers.
|
|
2697
|
-
* @author Bartłomiej (@engrave) Górnicki
|
|
2698
|
-
*/
|
|
2699
|
-
import { PublicKey } from 'dhive/crypto';
|
|
2700
|
-
import { Client } from 'dhive/client';
|
|
2701
|
-
export interface AccountsByKey {
|
|
2702
|
-
accounts: [string[]];
|
|
2703
|
-
}
|
|
2704
|
-
export class AccountByKeyAPI {
|
|
2705
|
-
readonly client: Client;
|
|
2706
|
-
constructor(client: Client);
|
|
2707
|
-
/**
|
|
2708
|
-
* Convenience for calling `account_by_key_api`.
|
|
2709
|
-
*/
|
|
2710
|
-
call(method: string, params?: any): Promise<any>;
|
|
2711
|
-
/**
|
|
2712
|
-
* Returns all accounts that have the key associated with their owner or active authorities.
|
|
2713
|
-
*/
|
|
2714
|
-
getKeyReferences(keys: (PublicKey | string)[]): Promise<AccountsByKey>;
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
2717
|
}
|
|
2718
2718
|
declare module 'dhive/client' {
|
|
2719
2719
|
/**
|
|
@@ -2755,8 +2755,8 @@ declare module 'dhive/client' {
|
|
|
2755
2755
|
import { BroadcastAPI } from 'dhive/helpers/broadcast';
|
|
2756
2756
|
import { DatabaseAPI } from 'dhive/helpers/database';
|
|
2757
2757
|
import { HivemindAPI } from 'dhive/helpers/hivemind';
|
|
2758
|
-
import { RCAPI } from 'dhive/helpers/rc';
|
|
2759
2758
|
import { AccountByKeyAPI } from 'dhive/helpers/key';
|
|
2759
|
+
import { RCAPI } from 'dhive/helpers/rc';
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Library version.
|
|
2762
2762
|
*/
|
|
@@ -2871,7 +2871,7 @@ declare module 'dhive/client' {
|
|
|
2871
2871
|
private backoff;
|
|
2872
2872
|
private failoverThreshold;
|
|
2873
2873
|
private consoleOnFailover;
|
|
2874
|
-
|
|
2874
|
+
currentAddress: string;
|
|
2875
2875
|
/**
|
|
2876
2876
|
* @param address The address to the Hive RPC server,
|
|
2877
2877
|
* e.g. `https://api.hive.blog`. or [`https://api.hive.blog`, `https://another.api.com`]
|