@hiveio/dhive 1.0.0-beta.0 → 1.1.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 +35 -4
- 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 +7 -2
- package/lib/client.js +4 -4
- package/lib/crypto.d.ts +1 -1
- package/lib/crypto.js +2 -2
- package/lib/helpers/broadcast.js +2 -1
- package/lib/helpers/key.d.ts +21 -0
- package/lib/helpers/key.js +35 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/version.js +1 -1
- package/package.json +1 -1
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';
|
|
@@ -2731,6 +2755,7 @@ declare module 'dhive/client' {
|
|
|
2731
2755
|
import { BroadcastAPI } from 'dhive/helpers/broadcast';
|
|
2732
2756
|
import { DatabaseAPI } from 'dhive/helpers/database';
|
|
2733
2757
|
import { HivemindAPI } from 'dhive/helpers/hivemind';
|
|
2758
|
+
import { AccountByKeyAPI } from 'dhive/helpers/key';
|
|
2734
2759
|
import { RCAPI } from 'dhive/helpers/rc';
|
|
2735
2760
|
/**
|
|
2736
2761
|
* Library version.
|
|
@@ -2827,13 +2852,17 @@ declare module 'dhive/client' {
|
|
|
2827
2852
|
*/
|
|
2828
2853
|
readonly blockchain: Blockchain;
|
|
2829
2854
|
/**
|
|
2830
|
-
*
|
|
2855
|
+
* Hivemind helper.
|
|
2831
2856
|
*/
|
|
2832
2857
|
readonly hivemind: HivemindAPI;
|
|
2858
|
+
/**
|
|
2859
|
+
* Accounts by key API helper.
|
|
2860
|
+
*/
|
|
2861
|
+
readonly keys: AccountByKeyAPI;
|
|
2833
2862
|
/**
|
|
2834
2863
|
* Chain ID for current network.
|
|
2835
2864
|
*/
|
|
2836
|
-
chainId: Buffer;
|
|
2865
|
+
readonly chainId: Buffer;
|
|
2837
2866
|
/**
|
|
2838
2867
|
* Address prefix for current network.
|
|
2839
2868
|
*/
|
|
@@ -2906,6 +2935,8 @@ declare module 'dhive' {
|
|
|
2906
2935
|
export * from 'dhive/helpers/blockchain';
|
|
2907
2936
|
export * from 'dhive/helpers/database';
|
|
2908
2937
|
export * from 'dhive/helpers/rc';
|
|
2938
|
+
export * from 'dhive/helpers/key';
|
|
2939
|
+
export * from 'dhive/helpers/hivemind';
|
|
2909
2940
|
export * from 'dhive/chain/account';
|
|
2910
2941
|
export * from 'dhive/chain/asset';
|
|
2911
2942
|
export * from 'dhive/chain/block';
|