genlayer-js 1.1.1 → 1.1.2
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/dist/index.cjs +12 -1
- package/dist/index.js +12 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41,9 +41,20 @@ function accountActions(client) {
|
|
|
41
41
|
params: [address, amount]
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
|
+
/**
|
|
45
|
+
* Returns the transaction count (next nonce) for an address.
|
|
46
|
+
*
|
|
47
|
+
* Defaults to `"pending"` so that rapid sequential submissions from the
|
|
48
|
+
* same account receive distinct nonces. Two submissions issued before the
|
|
49
|
+
* first confirms would otherwise both see the same `"latest"` count and
|
|
50
|
+
* collide with an "already known" or "replacement underpriced" error.
|
|
51
|
+
*
|
|
52
|
+
* Pass `block: "latest"` explicitly for confirmed-only state
|
|
53
|
+
* (e.g. reconciliation tooling comparing against on-chain finality).
|
|
54
|
+
*/
|
|
44
55
|
getCurrentNonce: async ({
|
|
45
56
|
address,
|
|
46
|
-
block = "
|
|
57
|
+
block = "pending"
|
|
47
58
|
}) => {
|
|
48
59
|
const addressToUse = address || _optionalChain([client, 'access', _3 => _3.account, 'optionalAccess', _4 => _4.address]);
|
|
49
60
|
if (!addressToUse) {
|
package/dist/index.js
CHANGED
|
@@ -41,9 +41,20 @@ function accountActions(client) {
|
|
|
41
41
|
params: [address, amount]
|
|
42
42
|
});
|
|
43
43
|
},
|
|
44
|
+
/**
|
|
45
|
+
* Returns the transaction count (next nonce) for an address.
|
|
46
|
+
*
|
|
47
|
+
* Defaults to `"pending"` so that rapid sequential submissions from the
|
|
48
|
+
* same account receive distinct nonces. Two submissions issued before the
|
|
49
|
+
* first confirms would otherwise both see the same `"latest"` count and
|
|
50
|
+
* collide with an "already known" or "replacement underpriced" error.
|
|
51
|
+
*
|
|
52
|
+
* Pass `block: "latest"` explicitly for confirmed-only state
|
|
53
|
+
* (e.g. reconciliation tooling comparing against on-chain finality).
|
|
54
|
+
*/
|
|
44
55
|
getCurrentNonce: async ({
|
|
45
56
|
address,
|
|
46
|
-
block = "
|
|
57
|
+
block = "pending"
|
|
47
58
|
}) => {
|
|
48
59
|
const addressToUse = address || client.account?.address;
|
|
49
60
|
if (!addressToUse) {
|