Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,5 @@ | ||
# 1.2.1 | ||
## Added | ||
- Support for GetTransactionByID | ||
- Handle the case of undeclared noteField | ||
# 1.2.0 | ||
@@ -2,0 +6,0 @@ ## Added |
{ | ||
"name": "algosdk", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "algosdk is Algorand's official javascript SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,3 +16,5 @@ const client = require('./client'); | ||
let requestHeaders = token; | ||
if (typeof (requestHeaders) == 'string') { requestHeaders = { 'X-Algo-API-Token': requestHeaders }; }; | ||
if (typeof (requestHeaders) == 'string') { | ||
requestHeaders = {'X-Algo-API-Token': requestHeaders}; | ||
} | ||
@@ -118,8 +120,9 @@ // Get client | ||
/** | ||
* accountInformation returns the passed account's information | ||
* @param addr string | ||
* transactionById returns the a transaction information of a specific txid [txId] | ||
* Note - This method is allowed only when Indexer is enabled. | ||
* @param txid | ||
* @returns {Promise<*>} | ||
*/ | ||
this.accountInformation = async function (addr) { | ||
let res = await c.get("/v1/account/" + addr); | ||
this.transactionById = async function (txid) { | ||
let res = await c.get("/v1/transaction/" + txid); | ||
return res.body; | ||
@@ -143,2 +146,12 @@ }; | ||
/** | ||
* accountInformation returns the passed account's information | ||
* @param addr string | ||
* @returns {Promise<*>} | ||
*/ | ||
this.accountInformation = async function (addr) { | ||
let res = await c.get("/v1/account/" + addr); | ||
return res.body; | ||
}; | ||
/** | ||
* suggestedFee gets the recommended transaction fee from the node | ||
@@ -145,0 +158,0 @@ * @returns {Promise<*>} |
@@ -35,2 +35,5 @@ const address = require("./encoding/address"); | ||
} | ||
else { | ||
note = new Uint8Array(0); | ||
} | ||
@@ -37,0 +40,0 @@ Object.assign(this, { |
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
318879
4209