cosmos-client
Advanced tools
Comparing version 0.39.11 to 0.39.12
{ | ||
"name": "cosmos-client", | ||
"description": "REST API Client for Cosmos SDK Blockchain", | ||
"version": "0.39.11", | ||
"version": "0.39.12", | ||
"author": "LCNEM, Inc.", | ||
@@ -6,0 +6,0 @@ "bugs": { |
import { CosmosSDK } from "../../cosmos-sdk"; | ||
import { PrivKey } from "../../tendermint"; | ||
import { StdTx } from "./types/std-tx"; | ||
import { DecodeReq, EncodeReq } from "../../api"; | ||
import { DecodeReq, EncodeReq, PaginatedQueryTxs, TxQuery } from "../../api"; | ||
import { AccAddress } from "../../types"; | ||
@@ -22,4 +22,4 @@ import { BaseAccount } from "./types"; | ||
export declare function txsEncodePost(sdk: CosmosSDK, req: EncodeReq): AxiosPromise<StdTx>; | ||
export declare function txsGet(sdk: CosmosSDK, messageAction?: string, messageSender?: string, page?: number, limit?: number, txMinHeight?: number, txMaxHeight?: number): AxiosPromise<import("../../api").PaginatedQueryTxs>; | ||
export declare function txsHashGet(sdk: CosmosSDK, hash: string): AxiosPromise<import("../../api").TxQuery>; | ||
export declare function txsGet(sdk: CosmosSDK, messageAction?: string, messageSender?: string, page?: number, limit?: number, txMinHeight?: number, txMaxHeight?: number): AxiosPromise<PaginatedQueryTxs>; | ||
export declare function txsHashGet(sdk: CosmosSDK, hash: string): AxiosPromise<TxQuery>; | ||
export declare function txsPost(sdk: CosmosSDK, tx: StdTx, mode: "sync" | "async" | "block"): AxiosPromise<import("../../api").BroadcastTxCommitResult>; |
import { StdTx } from "./types/std-tx"; | ||
import { AuthApi, TransactionsApi } from "../../api"; | ||
import { AuthApi, TransactionsApi, } from "../../api"; | ||
import { codec } from "../../codec"; | ||
@@ -45,6 +45,16 @@ /** | ||
export function txsGet(sdk, messageAction, messageSender, page, limit, txMinHeight, txMaxHeight) { | ||
return new TransactionsApi(undefined, sdk.url).txsGet(messageAction, messageSender, page, limit, txMinHeight, txMaxHeight); | ||
return new TransactionsApi(undefined, sdk.url) | ||
.txsGet(messageAction, messageSender, page, limit, txMinHeight, txMaxHeight) | ||
.then((res) => { | ||
res.data = codec.fromJSONString(JSON.stringify(res.data)); | ||
return res; | ||
}); | ||
} | ||
export function txsHashGet(sdk, hash) { | ||
return new TransactionsApi(undefined, sdk.url).txsHashGet(hash); | ||
return new TransactionsApi(undefined, sdk.url) | ||
.txsHashGet(hash) | ||
.then((res) => { | ||
res.data = codec.fromJSONString(JSON.stringify(res.data)); | ||
return res; | ||
}); | ||
} | ||
@@ -51,0 +61,0 @@ export function txsPost(sdk, tx, mode) { |
Sorry, the diff of this file is too big to display
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
705888
17232