adamant-api
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -24,5 +24,5 @@ import { NodeManager, NodeManagerOptions } from '../helpers/healthCheck'; | ||
export type UsernameOrPublicKeyObject = UsernameObject | PublicKeyObject; | ||
export type TransactionQuery<T extends {}> = T & { | ||
or: T; | ||
and: T; | ||
export type TransactionQuery<T extends {}> = Partial<T> & { | ||
or?: Partial<T>; | ||
and?: Partial<T>; | ||
}; | ||
@@ -302,2 +302,2 @@ export interface GetBlocksOptions { | ||
export * from './generated'; | ||
export * from './votes'; | ||
export * from './utils'; |
@@ -38,3 +38,3 @@ "use strict"; | ||
const encryptor_1 = require("../helpers/encryptor"); | ||
const votes_1 = require("./votes"); | ||
const utils_1 = require("./utils"); | ||
const publicKeysCache = {}; | ||
@@ -267,3 +267,3 @@ class AdamantApi extends healthCheck_1.NodeManager { | ||
for (const vote of votes) { | ||
const [name, direction] = (0, votes_1.parseVote)(vote); | ||
const [name, direction] = (0, utils_1.parseVote)(vote); | ||
const cachedPublicKey = publicKeysCache[name]; | ||
@@ -338,3 +338,3 @@ if (cachedPublicKey) { | ||
async getChats(address, options) { | ||
return this.get(`chatrooms/${address}`, options); | ||
return this.get(`chatrooms/${address}`, (0, utils_1.transformTransactionQuery)(options)); | ||
} | ||
@@ -345,3 +345,3 @@ /** | ||
async getChatMessages(address1, address2, query) { | ||
return this.get(`chatrooms/${address1}/${address2}`, query); | ||
return this.get(`chatrooms/${address1}/${address2}`, (0, utils_1.transformTransactionQuery)(query)); | ||
} | ||
@@ -511,3 +511,3 @@ /** | ||
async getTransactions(options) { | ||
return this.get('transactions', options); | ||
return this.get('transactions', (0, utils_1.transformTransactionQuery)(options)); | ||
} | ||
@@ -520,3 +520,3 @@ /** | ||
id, | ||
...options, | ||
...(0, utils_1.transformTransactionQuery)(options), | ||
}); | ||
@@ -559,2 +559,2 @@ } | ||
__exportStar(require("./generated"), exports); | ||
__exportStar(require("./votes"), exports); | ||
__exportStar(require("./utils"), exports); |
{ | ||
"name": "adamant-api", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "JavaScript API library for the ADAMANT Blockchain", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183710
56
3885