Comparing version 2.3.0 to 2.4.0
@@ -65,2 +65,5 @@ "use strict"; | ||
const unsetSyncRound_1 = __importDefault(require("./unsetSyncRound")); | ||
const getLedgerStateDeltaForTransactionGroup_1 = __importDefault(require("./getLedgerStateDeltaForTransactionGroup")); | ||
const getLedgerStateDelta_1 = __importDefault(require("./getLedgerStateDelta")); | ||
const getTransactionGroupLedgerStateDeltasForRound_1 = __importDefault(require("./getTransactionGroupLedgerStateDeltasForRound")); | ||
/** | ||
@@ -719,4 +722,52 @@ * Algod client connects an application to the Algorand blockchain. The algod client requires a valid algod REST endpoint IP address and algod token from an Algorand node that is connected to the network you plan to interact with. | ||
} | ||
/** | ||
* GetLedgerStateDeltaForTransactionGroup returns the ledger delta for the txn group identified by id | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const id = "ABC123"; | ||
* await client.getLedgerStateDeltaForTransactionGroup(id).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltastxngroupid) | ||
* @param id txn ID or group ID to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDeltaForTransactionGroup(id) { | ||
return new getLedgerStateDeltaForTransactionGroup_1.default(this.c, this.intDecoding, id); | ||
} | ||
/** | ||
* GetLedgerStateDelta returns the ledger delta for the entire round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getLedgerStateDelta(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasround) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDelta(round) { | ||
return new getLedgerStateDelta_1.default(this.c, this.intDecoding, round); | ||
} | ||
/** | ||
* GetTransactionGroupLedgerStateDeltasForRound returns all ledger deltas for txn groups in the provided round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getTransactionGroupLedgerStateDeltasForRound(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasroundtxngroup) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getTransactionGroupLedgerStateDeltasForRound(round) { | ||
return new getTransactionGroupLedgerStateDeltasForRound_1.default(this.c, this.intDecoding, round); | ||
} | ||
} | ||
exports.default = AlgodClient; | ||
//# sourceMappingURL=algod.js.map |
@@ -15,2 +15,5 @@ "use strict"; | ||
const tokenHeader = {}; | ||
if (token === '') { | ||
return tokenHeader; | ||
} | ||
tokenHeader[headerIdentifier] = token; | ||
@@ -17,0 +20,0 @@ return tokenHeader; |
@@ -204,3 +204,3 @@ "use strict"; | ||
!(0, abi_1.abiCheckTransactionType)(argType, argValue.txn)) { | ||
throw new Error(`Expected ${argType} transaction for argument at index ${i}`); | ||
throw new Error(`Expected ${argType} TransactionWithSigner for argument at index ${i}`); | ||
} | ||
@@ -207,0 +207,0 @@ if (argValue.txn.group && argValue.txn.group.some((v) => v !== 0)) { |
@@ -37,2 +37,5 @@ import ServiceClient from '../serviceClient'; | ||
import UnsetSyncRound from './unsetSyncRound'; | ||
import GetLedgerStateDeltaForTransactionGroup from './getLedgerStateDeltaForTransactionGroup'; | ||
import GetLedgerStateDelta from './getLedgerStateDelta'; | ||
import GetTransactionGroupLedgerStateDeltasForRound from './getTransactionGroupLedgerStateDeltasForRound'; | ||
/** | ||
@@ -691,3 +694,51 @@ * Algod client connects an application to the Algorand blockchain. The algod client requires a valid algod REST endpoint IP address and algod token from an Algorand node that is connected to the network you plan to interact with. | ||
} | ||
/** | ||
* GetLedgerStateDeltaForTransactionGroup returns the ledger delta for the txn group identified by id | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const id = "ABC123"; | ||
* await client.getLedgerStateDeltaForTransactionGroup(id).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltastxngroupid) | ||
* @param id txn ID or group ID to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDeltaForTransactionGroup(id) { | ||
return new GetLedgerStateDeltaForTransactionGroup(this.c, this.intDecoding, id); | ||
} | ||
/** | ||
* GetLedgerStateDelta returns the ledger delta for the entire round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getLedgerStateDelta(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasround) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDelta(round) { | ||
return new GetLedgerStateDelta(this.c, this.intDecoding, round); | ||
} | ||
/** | ||
* GetTransactionGroupLedgerStateDeltasForRound returns all ledger deltas for txn groups in the provided round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getTransactionGroupLedgerStateDeltasForRound(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasroundtxngroup) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getTransactionGroupLedgerStateDeltasForRound(round) { | ||
return new GetTransactionGroupLedgerStateDeltasForRound(this.c, this.intDecoding, round); | ||
} | ||
} | ||
//# sourceMappingURL=algod.js.map |
@@ -10,2 +10,5 @@ import HTTPClient from '../client'; | ||
const tokenHeader = {}; | ||
if (token === '') { | ||
return tokenHeader; | ||
} | ||
tokenHeader[headerIdentifier] = token; | ||
@@ -12,0 +15,0 @@ return tokenHeader; |
@@ -178,3 +178,3 @@ import { Buffer } from 'buffer'; | ||
!abiCheckTransactionType(argType, argValue.txn)) { | ||
throw new Error(`Expected ${argType} transaction for argument at index ${i}`); | ||
throw new Error(`Expected ${argType} TransactionWithSigner for argument at index ${i}`); | ||
} | ||
@@ -181,0 +181,0 @@ if (argValue.txn.group && argValue.txn.group.some((v) => v !== 0)) { |
@@ -38,2 +38,5 @@ import ServiceClient from '../serviceClient'; | ||
import UnsetSyncRound from './unsetSyncRound'; | ||
import GetLedgerStateDeltaForTransactionGroup from './getLedgerStateDeltaForTransactionGroup'; | ||
import GetLedgerStateDelta from './getLedgerStateDelta'; | ||
import GetTransactionGroupLedgerStateDeltasForRound from './getTransactionGroupLedgerStateDeltasForRound'; | ||
/** | ||
@@ -606,2 +609,44 @@ * Algod client connects an application to the Algorand blockchain. The algod client requires a valid algod REST endpoint IP address and algod token from an Algorand node that is connected to the network you plan to interact with. | ||
ready(): Ready; | ||
/** | ||
* GetLedgerStateDeltaForTransactionGroup returns the ledger delta for the txn group identified by id | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const id = "ABC123"; | ||
* await client.getLedgerStateDeltaForTransactionGroup(id).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltastxngroupid) | ||
* @param id txn ID or group ID to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDeltaForTransactionGroup(id: string): GetLedgerStateDeltaForTransactionGroup; | ||
/** | ||
* GetLedgerStateDelta returns the ledger delta for the entire round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getLedgerStateDelta(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasround) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDelta(round: bigint): GetLedgerStateDelta; | ||
/** | ||
* GetTransactionGroupLedgerStateDeltasForRound returns all ledger deltas for txn groups in the provided round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getTransactionGroupLedgerStateDeltasForRound(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasroundtxngroup) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getTransactionGroupLedgerStateDeltasForRound(round: bigint): GetTransactionGroupLedgerStateDeltasForRound; | ||
} |
{ | ||
"name": "algosdk", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "The official JavaScript SDK for Algorand", | ||
@@ -43,3 +43,2 @@ "main": "dist/cjs/index.js", | ||
"concurrently": "^6.2.0", | ||
"coveralls": "^3.1.0", | ||
"cucumber": "^5.1.0", | ||
@@ -57,3 +56,2 @@ "es-abstract": "^1.18.3", | ||
"mocha": "^9.0.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"mock-http-server": "^1.4.3", | ||
@@ -60,0 +58,0 @@ "prettier": "2.2.1", |
@@ -23,4 +23,4 @@ # js-algorand-sdk | ||
<script | ||
src="https://unpkg.com/algosdk@v2.3.0/dist/browser/algosdk.min.js" | ||
integrity="sha384-fgeAt2Eu1e4m+Ci+iZyaZGF3GrvtcavVyjUEFuHyhiRjMi60ape5AxIWR08Js1S9" | ||
src="https://unpkg.com/algosdk@v2.4.0/dist/browser/algosdk.min.js" | ||
integrity="sha384-vb9VngcgEwkDszQ4wPAsk/oiOfBcbEjNG+Icx9erSJMLZCDPNp0ncx22oBM+8Xji" | ||
crossorigin="anonymous" | ||
@@ -34,4 +34,4 @@ ></script> | ||
<script | ||
src="https://cdn.jsdelivr.net/npm/algosdk@v2.3.0/dist/browser/algosdk.min.js" | ||
integrity="sha384-fgeAt2Eu1e4m+Ci+iZyaZGF3GrvtcavVyjUEFuHyhiRjMi60ape5AxIWR08Js1S9" | ||
src="https://cdn.jsdelivr.net/npm/algosdk@v2.4.0/dist/browser/algosdk.min.js" | ||
integrity="sha384-vb9VngcgEwkDszQ4wPAsk/oiOfBcbEjNG+Icx9erSJMLZCDPNp0ncx22oBM+8Xji" | ||
crossorigin="anonymous" | ||
@@ -38,0 +38,0 @@ ></script> |
@@ -43,2 +43,5 @@ import ServiceClient from '../serviceClient'; | ||
import UnsetSyncRound from './unsetSyncRound'; | ||
import GetLedgerStateDeltaForTransactionGroup from './getLedgerStateDeltaForTransactionGroup'; | ||
import GetLedgerStateDelta from './getLedgerStateDelta'; | ||
import GetTransactionGroupLedgerStateDeltasForRound from './getTransactionGroupLedgerStateDeltasForRound'; | ||
@@ -755,2 +758,61 @@ /** | ||
} | ||
/** | ||
* GetLedgerStateDeltaForTransactionGroup returns the ledger delta for the txn group identified by id | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const id = "ABC123"; | ||
* await client.getLedgerStateDeltaForTransactionGroup(id).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltastxngroupid) | ||
* @param id txn ID or group ID to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDeltaForTransactionGroup(id: string) { | ||
return new GetLedgerStateDeltaForTransactionGroup( | ||
this.c, | ||
this.intDecoding, | ||
id | ||
); | ||
} | ||
/** | ||
* GetLedgerStateDelta returns the ledger delta for the entire round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getLedgerStateDelta(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasround) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getLedgerStateDelta(round: bigint) { | ||
return new GetLedgerStateDelta(this.c, this.intDecoding, round); | ||
} | ||
/** | ||
* GetTransactionGroupLedgerStateDeltasForRound returns all ledger deltas for txn groups in the provided round | ||
* | ||
* #### Example | ||
* ```typescript | ||
* const round = 12345; | ||
* await client.getTransactionGroupLedgerStateDeltasForRound(round).do(); | ||
* ``` | ||
* | ||
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/#get-v2deltasroundtxngroup) | ||
* @param round the round number to be searched for | ||
* @category GET | ||
*/ | ||
getTransactionGroupLedgerStateDeltasForRound(round: bigint) { | ||
return new GetTransactionGroupLedgerStateDeltasForRound( | ||
this.c, | ||
this.intDecoding, | ||
round | ||
); | ||
} | ||
} |
@@ -22,2 +22,5 @@ import HTTPClient from '../client'; | ||
const tokenHeader = {}; | ||
if (token === '') { | ||
return tokenHeader; | ||
} | ||
tokenHeader[headerIdentifier] = token; | ||
@@ -24,0 +27,0 @@ return tokenHeader as TokenHeader; |
@@ -354,3 +354,3 @@ import { Buffer } from 'buffer'; | ||
throw new Error( | ||
`Expected ${argType} transaction for argument at index ${i}` | ||
`Expected ${argType} TransactionWithSigner for argument at index ${i}` | ||
); | ||
@@ -357,0 +357,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
5481011
31
690
78072
5