@waves/waves-transactions
Advanced tools
Comparing version 3.9.0 to 3.10.0
@@ -50,3 +50,3 @@ import { IDataEntry, TTx } from './transactions'; | ||
*/ | ||
export declare function accountDataByKey(key: string, address: string, nodeUrl: string): Promise<any>; | ||
export declare function accountDataByKey(key: string, address: string, nodeUrl: string): Promise<IDataEntry>; | ||
/** | ||
@@ -58,3 +58,17 @@ * Get account script info | ||
export declare function scriptInfo(address: string, nodeUrl: string): Promise<any>; | ||
export interface IStateChangeResponse { | ||
data: IDataEntry[]; | ||
transfers: { | ||
address: string; | ||
amount: number; | ||
assetId: string | null; | ||
}[]; | ||
} | ||
/** | ||
* Get invokeScript tx state changes | ||
* @param transactionId - invokeScript transaction id as base58 string | ||
* @param nodeUrl - node address to ask data from. E.g. https://nodes.wavesplatform.com/ | ||
*/ | ||
export declare function stateChanges(transactionId: string, nodeUrl: string): Promise<IStateChangeResponse>; | ||
/** | ||
* Sends transaction to waves node | ||
@@ -61,0 +75,0 @@ * @param tx - transaction to send |
@@ -199,2 +199,15 @@ "use strict"; | ||
/** | ||
* Get invokeScript tx state changes | ||
* @param transactionId - invokeScript transaction id as base58 string | ||
* @param nodeUrl - node address to ask data from. E.g. https://nodes.wavesplatform.com/ | ||
*/ | ||
function stateChanges(transactionId, nodeUrl) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return axios_1.default.get(`debug/stateChanges/info/${transactionId}`, { baseURL: nodeUrl, validateStatus: (status) => validateStatus(status) }) | ||
.then(process400) | ||
.then(resp => resp.data && resp.data.stateChanges); | ||
}); | ||
} | ||
exports.stateChanges = stateChanges; | ||
/** | ||
* Sends transaction to waves node | ||
@@ -201,0 +214,0 @@ * @param tx - transaction to send |
{ | ||
"name": "@waves/waves-transactions", | ||
"version": "3.9.0", | ||
"version": "3.10.0", | ||
"description": "Build and sign(multi-sign) transactions for Waves blockchain.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -180,3 +180,3 @@ import { IDataEntry, TTx } from './transactions' | ||
*/ | ||
export async function accountDataByKey(key: string, address: string, nodeUrl: string): Promise<any> { | ||
export async function accountDataByKey(key: string, address: string, nodeUrl: string): Promise<IDataEntry> { | ||
return axios.get(`addresses/data/${address}/${key}`, | ||
@@ -201,3 +201,25 @@ { baseURL: nodeUrl, validateStatus: (status) => status === 404 || validateStatus(status) }) | ||
export interface IStateChangeResponse { | ||
data: IDataEntry[], | ||
transfers: { | ||
address: string, | ||
amount: number, | ||
assetId: string | null | ||
}[] | ||
} | ||
/** | ||
* Get invokeScript tx state changes | ||
* @param transactionId - invokeScript transaction id as base58 string | ||
* @param nodeUrl - node address to ask data from. E.g. https://nodes.wavesplatform.com/ | ||
*/ | ||
export async function stateChanges(transactionId: string, nodeUrl: string): Promise<IStateChangeResponse> { | ||
return axios.get(`debug/stateChanges/info/${transactionId}`, | ||
{ baseURL: nodeUrl, validateStatus: (status) => validateStatus(status) }) | ||
.then(process400) | ||
.then(resp => resp.data && resp.data.stateChanges) | ||
} | ||
/** | ||
* Sends transaction to waves node | ||
@@ -204,0 +226,0 @@ * @param tx - transaction to send |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
740766
5927