algosdk 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/client/urlTokenBaseHTTPClient.js +0 -3
- package/dist/cjs/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/cjs/client/v2/algod/models/types.js +240 -15
- package/dist/cjs/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js +2 -3
- package/dist/cjs/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetBalances.js +2 -1
- package/dist/cjs/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js +2 -4
- package/dist/cjs/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchAccounts.js +2 -1
- package/dist/cjs/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/cjs/client/v2/indexer/searchForTransactions.js +61 -62
- package/dist/cjs/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/cjs/nacl/naclWrappers.js +4 -0
- package/dist/cjs/nacl/naclWrappers.js.map +1 -1
- package/dist/cjs/utils/utils.js +13 -1
- package/dist/cjs/utils/utils.js.map +1 -1
- package/dist/esm/client/urlTokenBaseHTTPClient.js +0 -3
- package/dist/esm/client/urlTokenBaseHTTPClient.js.map +1 -1
- package/dist/esm/client/v2/algod/models/types.js +233 -13
- package/dist/esm/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAccountTransactions.js +2 -3
- package/dist/esm/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetBalances.js +2 -1
- package/dist/esm/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js +2 -4
- package/dist/esm/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchAccounts.js +2 -1
- package/dist/esm/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/client/v2/indexer/searchForTransactions.js +61 -62
- package/dist/esm/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/esm/nacl/naclWrappers.js +4 -0
- package/dist/esm/nacl/naclWrappers.js.map +1 -1
- package/dist/esm/utils/utils.js +11 -0
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/types/client/v2/algod/models/types.d.ts +194 -4
- package/dist/types/client/v2/indexer/lookupAccountTransactions.d.ts +0 -2
- package/dist/types/client/v2/indexer/lookupAssetTransactions.d.ts +0 -3
- package/dist/types/client/v2/indexer/searchForTransactions.d.ts +54 -56
- package/dist/types/utils/utils.d.ts +5 -0
- package/package.json +4 -4
- package/src/client/urlTokenBaseHTTPClient.ts +0 -3
- package/src/client/v2/algod/models/types.ts +430 -9
- package/src/client/v2/indexer/lookupAccountTransactions.ts +2 -3
- package/src/client/v2/indexer/lookupAssetBalances.ts +2 -1
- package/src/client/v2/indexer/lookupAssetTransactions.ts +2 -4
- package/src/client/v2/indexer/searchAccounts.ts +2 -1
- package/src/client/v2/indexer/searchForTransactions.ts +63 -64
- package/src/nacl/naclWrappers.ts +6 -0
- package/src/utils/utils.ts +12 -0
|
@@ -668,6 +668,35 @@ export declare class AssetParams extends BaseModel {
|
|
|
668
668
|
});
|
|
669
669
|
static from_obj_for_encoding(data: Record<string, any>): AssetParams;
|
|
670
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* Represents an AVM value.
|
|
673
|
+
*/
|
|
674
|
+
export declare class AvmValue extends BaseModel {
|
|
675
|
+
/**
|
|
676
|
+
* value type. Value `1` refers to **bytes**, value `2` refers to **uint64**
|
|
677
|
+
*/
|
|
678
|
+
type: number | bigint;
|
|
679
|
+
/**
|
|
680
|
+
* bytes value.
|
|
681
|
+
*/
|
|
682
|
+
bytes?: Uint8Array;
|
|
683
|
+
/**
|
|
684
|
+
* uint value.
|
|
685
|
+
*/
|
|
686
|
+
uint?: number | bigint;
|
|
687
|
+
/**
|
|
688
|
+
* Creates a new `AvmValue` object.
|
|
689
|
+
* @param type - value type. Value `1` refers to **bytes**, value `2` refers to **uint64**
|
|
690
|
+
* @param bytes - bytes value.
|
|
691
|
+
* @param uint - uint value.
|
|
692
|
+
*/
|
|
693
|
+
constructor({ type, bytes, uint, }: {
|
|
694
|
+
type: number | bigint;
|
|
695
|
+
bytes?: string | Uint8Array;
|
|
696
|
+
uint?: number | bigint;
|
|
697
|
+
});
|
|
698
|
+
static from_obj_for_encoding(data: Record<string, any>): AvmValue;
|
|
699
|
+
}
|
|
671
700
|
/**
|
|
672
701
|
* Hash of a block header.
|
|
673
702
|
*/
|
|
@@ -718,6 +747,10 @@ export declare class Box extends BaseModel {
|
|
|
718
747
|
* (name) box name, base64 encoded
|
|
719
748
|
*/
|
|
720
749
|
name: Uint8Array;
|
|
750
|
+
/**
|
|
751
|
+
* The round for which this information is relevant
|
|
752
|
+
*/
|
|
753
|
+
round: number | bigint;
|
|
721
754
|
/**
|
|
722
755
|
* (value) box value, base64 encoded.
|
|
723
756
|
*/
|
|
@@ -725,10 +758,12 @@ export declare class Box extends BaseModel {
|
|
|
725
758
|
/**
|
|
726
759
|
* Creates a new `Box` object.
|
|
727
760
|
* @param name - (name) box name, base64 encoded
|
|
761
|
+
* @param round - The round for which this information is relevant
|
|
728
762
|
* @param value - (value) box value, base64 encoded.
|
|
729
763
|
*/
|
|
730
|
-
constructor({ name, value, }: {
|
|
764
|
+
constructor({ name, round, value, }: {
|
|
731
765
|
name: string | Uint8Array;
|
|
766
|
+
round: number | bigint;
|
|
732
767
|
value: string | Uint8Array;
|
|
733
768
|
});
|
|
734
769
|
static from_obj_for_encoding(data: Record<string, any>): Box;
|
|
@@ -1539,6 +1574,29 @@ export declare class PostTransactionsResponse extends BaseModel {
|
|
|
1539
1574
|
});
|
|
1540
1575
|
static from_obj_for_encoding(data: Record<string, any>): PostTransactionsResponse;
|
|
1541
1576
|
}
|
|
1577
|
+
/**
|
|
1578
|
+
* A write operation into a scratch slot.
|
|
1579
|
+
*/
|
|
1580
|
+
export declare class ScratchChange extends BaseModel {
|
|
1581
|
+
/**
|
|
1582
|
+
* Represents an AVM value.
|
|
1583
|
+
*/
|
|
1584
|
+
newValue: AvmValue;
|
|
1585
|
+
/**
|
|
1586
|
+
* The scratch slot written.
|
|
1587
|
+
*/
|
|
1588
|
+
slot: number | bigint;
|
|
1589
|
+
/**
|
|
1590
|
+
* Creates a new `ScratchChange` object.
|
|
1591
|
+
* @param newValue - Represents an AVM value.
|
|
1592
|
+
* @param slot - The scratch slot written.
|
|
1593
|
+
*/
|
|
1594
|
+
constructor({ newValue, slot, }: {
|
|
1595
|
+
newValue: AvmValue;
|
|
1596
|
+
slot: number | bigint;
|
|
1597
|
+
});
|
|
1598
|
+
static from_obj_for_encoding(data: Record<string, any>): ScratchChange;
|
|
1599
|
+
}
|
|
1542
1600
|
/**
|
|
1543
1601
|
* Request type for simulation endpoint.
|
|
1544
1602
|
*/
|
|
@@ -1556,6 +1614,10 @@ export declare class SimulateRequest extends BaseModel {
|
|
|
1556
1614
|
* Lifts limits on log opcode usage during simulation.
|
|
1557
1615
|
*/
|
|
1558
1616
|
allowMoreLogging?: boolean;
|
|
1617
|
+
/**
|
|
1618
|
+
* An object that configures simulation execution trace.
|
|
1619
|
+
*/
|
|
1620
|
+
execTraceConfig?: SimulateTraceConfig;
|
|
1559
1621
|
/**
|
|
1560
1622
|
* Applies extra opcode budget during simulation for each transaction group.
|
|
1561
1623
|
*/
|
|
@@ -1566,12 +1628,14 @@ export declare class SimulateRequest extends BaseModel {
|
|
|
1566
1628
|
* @param allowEmptySignatures - Allow transactions without signatures to be simulated as if they had correct
|
|
1567
1629
|
* signatures.
|
|
1568
1630
|
* @param allowMoreLogging - Lifts limits on log opcode usage during simulation.
|
|
1631
|
+
* @param execTraceConfig - An object that configures simulation execution trace.
|
|
1569
1632
|
* @param extraOpcodeBudget - Applies extra opcode budget during simulation for each transaction group.
|
|
1570
1633
|
*/
|
|
1571
|
-
constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, extraOpcodeBudget, }: {
|
|
1634
|
+
constructor({ txnGroups, allowEmptySignatures, allowMoreLogging, execTraceConfig, extraOpcodeBudget, }: {
|
|
1572
1635
|
txnGroups: SimulateRequestTransactionGroup[];
|
|
1573
1636
|
allowEmptySignatures?: boolean;
|
|
1574
1637
|
allowMoreLogging?: boolean;
|
|
1638
|
+
execTraceConfig?: SimulateTraceConfig;
|
|
1575
1639
|
extraOpcodeBudget?: number | bigint;
|
|
1576
1640
|
});
|
|
1577
1641
|
static from_obj_for_encoding(data: Record<string, any>): SimulateRequest;
|
|
@@ -1616,6 +1680,10 @@ export declare class SimulateResponse extends BaseModel {
|
|
|
1616
1680
|
* evaluation in certain ways.
|
|
1617
1681
|
*/
|
|
1618
1682
|
evalOverrides?: SimulationEvalOverrides;
|
|
1683
|
+
/**
|
|
1684
|
+
* An object that configures simulation execution trace.
|
|
1685
|
+
*/
|
|
1686
|
+
execTraceConfig?: SimulateTraceConfig;
|
|
1619
1687
|
/**
|
|
1620
1688
|
* Creates a new `SimulateResponse` object.
|
|
1621
1689
|
* @param lastRound - The round immediately preceding this simulation. State changes through this
|
|
@@ -1625,15 +1693,50 @@ export declare class SimulateResponse extends BaseModel {
|
|
|
1625
1693
|
* @param evalOverrides - The set of parameters and limits override during simulation. If this set of
|
|
1626
1694
|
* parameters is present, then evaluation parameters may differ from standard
|
|
1627
1695
|
* evaluation in certain ways.
|
|
1696
|
+
* @param execTraceConfig - An object that configures simulation execution trace.
|
|
1628
1697
|
*/
|
|
1629
|
-
constructor({ lastRound, txnGroups, version, evalOverrides, }: {
|
|
1698
|
+
constructor({ lastRound, txnGroups, version, evalOverrides, execTraceConfig, }: {
|
|
1630
1699
|
lastRound: number | bigint;
|
|
1631
1700
|
txnGroups: SimulateTransactionGroupResult[];
|
|
1632
1701
|
version: number | bigint;
|
|
1633
1702
|
evalOverrides?: SimulationEvalOverrides;
|
|
1703
|
+
execTraceConfig?: SimulateTraceConfig;
|
|
1634
1704
|
});
|
|
1635
1705
|
static from_obj_for_encoding(data: Record<string, any>): SimulateResponse;
|
|
1636
1706
|
}
|
|
1707
|
+
/**
|
|
1708
|
+
* An object that configures simulation execution trace.
|
|
1709
|
+
*/
|
|
1710
|
+
export declare class SimulateTraceConfig extends BaseModel {
|
|
1711
|
+
/**
|
|
1712
|
+
* A boolean option for opting in execution trace features simulation endpoint.
|
|
1713
|
+
*/
|
|
1714
|
+
enable?: boolean;
|
|
1715
|
+
/**
|
|
1716
|
+
* A boolean option enabling returning scratch slot changes together with execution
|
|
1717
|
+
* trace during simulation.
|
|
1718
|
+
*/
|
|
1719
|
+
scratchChange?: boolean;
|
|
1720
|
+
/**
|
|
1721
|
+
* A boolean option enabling returning stack changes together with execution trace
|
|
1722
|
+
* during simulation.
|
|
1723
|
+
*/
|
|
1724
|
+
stackChange?: boolean;
|
|
1725
|
+
/**
|
|
1726
|
+
* Creates a new `SimulateTraceConfig` object.
|
|
1727
|
+
* @param enable - A boolean option for opting in execution trace features simulation endpoint.
|
|
1728
|
+
* @param scratchChange - A boolean option enabling returning scratch slot changes together with execution
|
|
1729
|
+
* trace during simulation.
|
|
1730
|
+
* @param stackChange - A boolean option enabling returning stack changes together with execution trace
|
|
1731
|
+
* during simulation.
|
|
1732
|
+
*/
|
|
1733
|
+
constructor({ enable, scratchChange, stackChange, }: {
|
|
1734
|
+
enable?: boolean;
|
|
1735
|
+
scratchChange?: boolean;
|
|
1736
|
+
stackChange?: boolean;
|
|
1737
|
+
});
|
|
1738
|
+
static from_obj_for_encoding(data: Record<string, any>): SimulateTraceConfig;
|
|
1739
|
+
}
|
|
1637
1740
|
/**
|
|
1638
1741
|
* Simulation result for an atomic transaction group
|
|
1639
1742
|
*/
|
|
@@ -1697,6 +1800,11 @@ export declare class SimulateTransactionResult extends BaseModel {
|
|
|
1697
1800
|
* budged used by inner app calls spawned by this transaction.
|
|
1698
1801
|
*/
|
|
1699
1802
|
appBudgetConsumed?: number | bigint;
|
|
1803
|
+
/**
|
|
1804
|
+
* The execution trace of calling an app or a logic sig, containing the inner app
|
|
1805
|
+
* call trace in a recursive way.
|
|
1806
|
+
*/
|
|
1807
|
+
execTrace?: SimulationTransactionExecTrace;
|
|
1700
1808
|
/**
|
|
1701
1809
|
* Budget used during execution of a logic sig transaction.
|
|
1702
1810
|
*/
|
|
@@ -1707,11 +1815,14 @@ export declare class SimulateTransactionResult extends BaseModel {
|
|
|
1707
1815
|
* includes confirmation details like the round and reward details.
|
|
1708
1816
|
* @param appBudgetConsumed - Budget used during execution of an app call transaction. This value includes
|
|
1709
1817
|
* budged used by inner app calls spawned by this transaction.
|
|
1818
|
+
* @param execTrace - The execution trace of calling an app or a logic sig, containing the inner app
|
|
1819
|
+
* call trace in a recursive way.
|
|
1710
1820
|
* @param logicSigBudgetConsumed - Budget used during execution of a logic sig transaction.
|
|
1711
1821
|
*/
|
|
1712
|
-
constructor({ txnResult, appBudgetConsumed, logicSigBudgetConsumed, }: {
|
|
1822
|
+
constructor({ txnResult, appBudgetConsumed, execTrace, logicSigBudgetConsumed, }: {
|
|
1713
1823
|
txnResult: PendingTransactionResponse;
|
|
1714
1824
|
appBudgetConsumed?: number | bigint;
|
|
1825
|
+
execTrace?: SimulationTransactionExecTrace;
|
|
1715
1826
|
logicSigBudgetConsumed?: number | bigint;
|
|
1716
1827
|
});
|
|
1717
1828
|
static from_obj_for_encoding(data: Record<string, any>): SimulateTransactionResult;
|
|
@@ -1755,6 +1866,85 @@ export declare class SimulationEvalOverrides extends BaseModel {
|
|
|
1755
1866
|
});
|
|
1756
1867
|
static from_obj_for_encoding(data: Record<string, any>): SimulationEvalOverrides;
|
|
1757
1868
|
}
|
|
1869
|
+
/**
|
|
1870
|
+
* The set of trace information and effect from evaluating a single opcode.
|
|
1871
|
+
*/
|
|
1872
|
+
export declare class SimulationOpcodeTraceUnit extends BaseModel {
|
|
1873
|
+
/**
|
|
1874
|
+
* The program counter of the current opcode being evaluated.
|
|
1875
|
+
*/
|
|
1876
|
+
pc: number | bigint;
|
|
1877
|
+
/**
|
|
1878
|
+
* The writes into scratch slots.
|
|
1879
|
+
*/
|
|
1880
|
+
scratchChanges?: ScratchChange[];
|
|
1881
|
+
/**
|
|
1882
|
+
* The indexes of the traces for inner transactions spawned by this opcode, if any.
|
|
1883
|
+
*/
|
|
1884
|
+
spawnedInners?: (number | bigint)[];
|
|
1885
|
+
/**
|
|
1886
|
+
* The values added by this opcode to the stack.
|
|
1887
|
+
*/
|
|
1888
|
+
stackAdditions?: AvmValue[];
|
|
1889
|
+
/**
|
|
1890
|
+
* The number of deleted stack values by this opcode.
|
|
1891
|
+
*/
|
|
1892
|
+
stackPopCount?: number | bigint;
|
|
1893
|
+
/**
|
|
1894
|
+
* Creates a new `SimulationOpcodeTraceUnit` object.
|
|
1895
|
+
* @param pc - The program counter of the current opcode being evaluated.
|
|
1896
|
+
* @param scratchChanges - The writes into scratch slots.
|
|
1897
|
+
* @param spawnedInners - The indexes of the traces for inner transactions spawned by this opcode, if any.
|
|
1898
|
+
* @param stackAdditions - The values added by this opcode to the stack.
|
|
1899
|
+
* @param stackPopCount - The number of deleted stack values by this opcode.
|
|
1900
|
+
*/
|
|
1901
|
+
constructor({ pc, scratchChanges, spawnedInners, stackAdditions, stackPopCount, }: {
|
|
1902
|
+
pc: number | bigint;
|
|
1903
|
+
scratchChanges?: ScratchChange[];
|
|
1904
|
+
spawnedInners?: (number | bigint)[];
|
|
1905
|
+
stackAdditions?: AvmValue[];
|
|
1906
|
+
stackPopCount?: number | bigint;
|
|
1907
|
+
});
|
|
1908
|
+
static from_obj_for_encoding(data: Record<string, any>): SimulationOpcodeTraceUnit;
|
|
1909
|
+
}
|
|
1910
|
+
/**
|
|
1911
|
+
* The execution trace of calling an app or a logic sig, containing the inner app
|
|
1912
|
+
* call trace in a recursive way.
|
|
1913
|
+
*/
|
|
1914
|
+
export declare class SimulationTransactionExecTrace extends BaseModel {
|
|
1915
|
+
/**
|
|
1916
|
+
* Program trace that contains a trace of opcode effects in an approval program.
|
|
1917
|
+
*/
|
|
1918
|
+
approvalProgramTrace?: SimulationOpcodeTraceUnit[];
|
|
1919
|
+
/**
|
|
1920
|
+
* Program trace that contains a trace of opcode effects in a clear state program.
|
|
1921
|
+
*/
|
|
1922
|
+
clearStateProgramTrace?: SimulationOpcodeTraceUnit[];
|
|
1923
|
+
/**
|
|
1924
|
+
* An array of SimulationTransactionExecTrace representing the execution trace of
|
|
1925
|
+
* any inner transactions executed.
|
|
1926
|
+
*/
|
|
1927
|
+
innerTrace?: SimulationTransactionExecTrace[];
|
|
1928
|
+
/**
|
|
1929
|
+
* Program trace that contains a trace of opcode effects in a logic sig.
|
|
1930
|
+
*/
|
|
1931
|
+
logicSigTrace?: SimulationOpcodeTraceUnit[];
|
|
1932
|
+
/**
|
|
1933
|
+
* Creates a new `SimulationTransactionExecTrace` object.
|
|
1934
|
+
* @param approvalProgramTrace - Program trace that contains a trace of opcode effects in an approval program.
|
|
1935
|
+
* @param clearStateProgramTrace - Program trace that contains a trace of opcode effects in a clear state program.
|
|
1936
|
+
* @param innerTrace - An array of SimulationTransactionExecTrace representing the execution trace of
|
|
1937
|
+
* any inner transactions executed.
|
|
1938
|
+
* @param logicSigTrace - Program trace that contains a trace of opcode effects in a logic sig.
|
|
1939
|
+
*/
|
|
1940
|
+
constructor({ approvalProgramTrace, clearStateProgramTrace, innerTrace, logicSigTrace, }: {
|
|
1941
|
+
approvalProgramTrace?: SimulationOpcodeTraceUnit[];
|
|
1942
|
+
clearStateProgramTrace?: SimulationOpcodeTraceUnit[];
|
|
1943
|
+
innerTrace?: SimulationTransactionExecTrace[];
|
|
1944
|
+
logicSigTrace?: SimulationOpcodeTraceUnit[];
|
|
1945
|
+
});
|
|
1946
|
+
static from_obj_for_encoding(data: Record<string, any>): SimulationTransactionExecTrace;
|
|
1947
|
+
}
|
|
1758
1948
|
/**
|
|
1759
1949
|
* Represents a state proof and its corresponding message
|
|
1760
1950
|
*/
|
|
@@ -238,8 +238,6 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
238
238
|
* .currencyGreaterThan(minBalance - 1)
|
|
239
239
|
* .do();
|
|
240
240
|
* ```
|
|
241
|
-
* @remarks
|
|
242
|
-
* If you are looking for transactions with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
|
|
243
241
|
*
|
|
244
242
|
* @param greater
|
|
245
243
|
* @category query
|
|
@@ -204,9 +204,6 @@ export default class LookupAssetTransactions extends JSONRequest {
|
|
|
204
204
|
* .do();
|
|
205
205
|
* ```
|
|
206
206
|
*
|
|
207
|
-
* @remarks
|
|
208
|
-
* If you are looking for transactions with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
|
|
209
|
-
*
|
|
210
207
|
* @param greater
|
|
211
208
|
* @category query
|
|
212
209
|
*/
|
|
@@ -192,62 +192,6 @@ export default class SearchForTransactions extends JSONRequest {
|
|
|
192
192
|
* @category query
|
|
193
193
|
*/
|
|
194
194
|
afterTime(after: string): this;
|
|
195
|
-
/**
|
|
196
|
-
* Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
197
|
-
*
|
|
198
|
-
* #### Example 1
|
|
199
|
-
* ```typescript
|
|
200
|
-
* const minBalance = 300000;
|
|
201
|
-
* const txns = await indexerClient
|
|
202
|
-
* .searchForTransactions()
|
|
203
|
-
* .currencyGreaterThan(minBalance - 1)
|
|
204
|
-
* .do();
|
|
205
|
-
* ```
|
|
206
|
-
*
|
|
207
|
-
* #### Example 2
|
|
208
|
-
* ```typescript
|
|
209
|
-
* const assetID = 163650;
|
|
210
|
-
* const minBalance = 300000;
|
|
211
|
-
* const txns = await indexerClient
|
|
212
|
-
* .searchForTransactions()
|
|
213
|
-
* .assetID(assetID)
|
|
214
|
-
* .currencyGreaterThan(minBalance - 1)
|
|
215
|
-
* .do();
|
|
216
|
-
* ```
|
|
217
|
-
* @remarks
|
|
218
|
-
* If you are looking for transactions with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
|
|
219
|
-
*
|
|
220
|
-
* @param greater
|
|
221
|
-
* @category query
|
|
222
|
-
*/
|
|
223
|
-
currencyGreaterThan(greater: number): this;
|
|
224
|
-
/**
|
|
225
|
-
* Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
226
|
-
*
|
|
227
|
-
* #### Example 1
|
|
228
|
-
* ```typescript
|
|
229
|
-
* const maxBalance = 500000;
|
|
230
|
-
* const txns = await indexerClient
|
|
231
|
-
* .searchForTransactions()
|
|
232
|
-
* .currencyLessThan(maxBalance + 1)
|
|
233
|
-
* .do();
|
|
234
|
-
* ```
|
|
235
|
-
*
|
|
236
|
-
* #### Example 2
|
|
237
|
-
* ```typescript
|
|
238
|
-
* const assetID = 163650;
|
|
239
|
-
* const maxBalance = 500000;
|
|
240
|
-
* const txns = await indexerClient
|
|
241
|
-
* .searchForTransactions()
|
|
242
|
-
* .assetID(assetID)
|
|
243
|
-
* .currencyLessThan(maxBalance + 1)
|
|
244
|
-
* .do();
|
|
245
|
-
* ```
|
|
246
|
-
*
|
|
247
|
-
* @param lesser
|
|
248
|
-
* @category query
|
|
249
|
-
*/
|
|
250
|
-
currencyLessThan(lesser: number): this;
|
|
251
195
|
/**
|
|
252
196
|
* Combined with address, defines what address to filter on, as string.
|
|
253
197
|
*
|
|
@@ -351,4 +295,58 @@ export default class SearchForTransactions extends JSONRequest {
|
|
|
351
295
|
* @category query
|
|
352
296
|
*/
|
|
353
297
|
applicationID(applicationID: number): this;
|
|
298
|
+
/**
|
|
299
|
+
* Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
300
|
+
*
|
|
301
|
+
* #### Example 1
|
|
302
|
+
* ```typescript
|
|
303
|
+
* const minBalance = 300000;
|
|
304
|
+
* const txns = await indexerClient
|
|
305
|
+
* .searchForTransactions()
|
|
306
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
307
|
+
* .do();
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* #### Example 2
|
|
311
|
+
* ```typescript
|
|
312
|
+
* const assetID = 163650;
|
|
313
|
+
* const minBalance = 300000;
|
|
314
|
+
* const txns = await indexerClient
|
|
315
|
+
* .searchForTransactions()
|
|
316
|
+
* .assetID(assetID)
|
|
317
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
318
|
+
* .do();
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* @param greater
|
|
322
|
+
* @category query
|
|
323
|
+
*/
|
|
324
|
+
currencyGreaterThan(greater: number): this;
|
|
325
|
+
/**
|
|
326
|
+
* Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
327
|
+
*
|
|
328
|
+
* #### Example 1
|
|
329
|
+
* ```typescript
|
|
330
|
+
* const maxBalance = 500000;
|
|
331
|
+
* const txns = await indexerClient
|
|
332
|
+
* .searchForTransactions()
|
|
333
|
+
* .currencyLessThan(maxBalance + 1)
|
|
334
|
+
* .do();
|
|
335
|
+
* ```
|
|
336
|
+
*
|
|
337
|
+
* #### Example 2
|
|
338
|
+
* ```typescript
|
|
339
|
+
* const assetID = 163650;
|
|
340
|
+
* const maxBalance = 500000;
|
|
341
|
+
* const txns = await indexerClient
|
|
342
|
+
* .searchForTransactions()
|
|
343
|
+
* .assetID(assetID)
|
|
344
|
+
* .currencyLessThan(maxBalance + 1)
|
|
345
|
+
* .do();
|
|
346
|
+
* ```
|
|
347
|
+
*
|
|
348
|
+
* @param lesser
|
|
349
|
+
* @category query
|
|
350
|
+
*/
|
|
351
|
+
currencyLessThan(lesser: number): this;
|
|
354
352
|
}
|
|
@@ -45,3 +45,8 @@ export declare function removeUndefinedProperties(obj: Record<string | number |
|
|
|
45
45
|
* @returns True if Node.js environment, false otherwise
|
|
46
46
|
*/
|
|
47
47
|
export declare function isNode(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Check whether the environment is ReactNative
|
|
50
|
+
* @returns True if ReactNative, false otherwise
|
|
51
|
+
*/
|
|
52
|
+
export declare function isReactNative(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "algosdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "The official JavaScript SDK for Algorand",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"algo-msgpack-with-bigint": "^2.1.1",
|
|
25
25
|
"buffer": "^6.0.3",
|
|
26
|
-
"cross-fetch": "^
|
|
26
|
+
"cross-fetch": "^4.0.0",
|
|
27
27
|
"hi-base32": "^0.5.1",
|
|
28
28
|
"js-sha256": "^0.9.0",
|
|
29
29
|
"js-sha3": "^0.8.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^4.26.1",
|
|
39
39
|
"@typescript-eslint/parser": "^4.26.1",
|
|
40
40
|
"assert": "^2.0.0",
|
|
41
|
-
"chromedriver": "^
|
|
41
|
+
"chromedriver": "^116.0.0",
|
|
42
42
|
"concurrently": "^6.2.0",
|
|
43
43
|
"cucumber": "^5.1.0",
|
|
44
44
|
"es-abstract": "^1.18.3",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"mocha": "^9.0.0",
|
|
55
55
|
"mock-http-server": "^1.4.3",
|
|
56
56
|
"prettier": "2.2.1",
|
|
57
|
-
"selenium-webdriver": "^4.
|
|
57
|
+
"selenium-webdriver": "^4.10.0",
|
|
58
58
|
"source-map-loader": "^2.0.2",
|
|
59
59
|
"ts-loader": "^9.3.1",
|
|
60
60
|
"ts-node": "^10.9.1",
|
|
@@ -163,7 +163,6 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient {
|
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
const res = await fetch(this.getURL(relativePath, query), {
|
|
166
|
-
mode: 'cors',
|
|
167
166
|
headers,
|
|
168
167
|
});
|
|
169
168
|
|
|
@@ -185,7 +184,6 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient {
|
|
|
185
184
|
|
|
186
185
|
const res = await fetch(this.getURL(relativePath, query), {
|
|
187
186
|
method: 'POST',
|
|
188
|
-
mode: 'cors',
|
|
189
187
|
body: data,
|
|
190
188
|
headers,
|
|
191
189
|
});
|
|
@@ -208,7 +206,6 @@ export class URLTokenBaseHTTPClient implements BaseHTTPClient {
|
|
|
208
206
|
|
|
209
207
|
const res = await fetch(this.getURL(relativePath, query), {
|
|
210
208
|
method: 'DELETE',
|
|
211
|
-
mode: 'cors',
|
|
212
209
|
body: data,
|
|
213
210
|
headers,
|
|
214
211
|
});
|