@algorandfoundation/algokit-utils 9.2.0 → 9.2.1-beta.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/_virtual/_rolldown/runtime.js +33 -0
- package/_virtual/_rolldown/runtime.mjs +13 -0
- package/account/account.d.ts +25 -30
- package/account/account.js +151 -146
- package/account/account.js.map +1 -1
- package/account/account.mjs +149 -144
- package/account/account.mjs.map +1 -1
- package/account/get-account-config-from-environment.d.ts +7 -2
- package/account/get-account-config-from-environment.js +19 -21
- package/account/get-account-config-from-environment.js.map +1 -1
- package/account/get-account-config-from-environment.mjs +19 -19
- package/account/get-account-config-from-environment.mjs.map +1 -1
- package/account/get-account.d.ts +14 -12
- package/account/get-account.js +56 -59
- package/account/get-account.js.map +1 -1
- package/account/get-account.mjs +56 -57
- package/account/get-account.mjs.map +1 -1
- package/account/get-dispenser-account.d.ts +9 -5
- package/account/get-dispenser-account.js +20 -18
- package/account/get-dispenser-account.js.map +1 -1
- package/account/get-dispenser-account.mjs +20 -16
- package/account/get-dispenser-account.mjs.map +1 -1
- package/account/mnemonic-account.d.ts +7 -3
- package/account/mnemonic-account.js +17 -17
- package/account/mnemonic-account.js.map +1 -1
- package/account/mnemonic-account.mjs +15 -15
- package/account/mnemonic-account.mjs.map +1 -1
- package/amount.d.ts +40 -35
- package/amount.js +33 -34
- package/amount.js.map +1 -1
- package/amount.mjs +33 -32
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +10 -6
- package/app-client.js +91 -86
- package/app-client.js.map +1 -1
- package/app-client.mjs +91 -84
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts +26 -24
- package/app-deploy.js +235 -253
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +233 -251
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +45 -46
- package/app.js +253 -271
- package/app.js.map +1 -1
- package/app.mjs +249 -267
- package/app.mjs.map +1 -1
- package/asset.d.ts +16 -12
- package/asset.js +116 -122
- package/asset.js.map +1 -1
- package/asset.mjs +116 -120
- package/asset.mjs.map +1 -1
- package/config.d.ts +7 -2
- package/config.js +5 -7
- package/config.js.map +1 -1
- package/config.mjs +5 -4
- package/config.mjs.map +1 -1
- package/debugging/debugging.d.ts +5 -1
- package/debugging/debugging.js +11 -11
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +11 -9
- package/debugging/debugging.mjs.map +1 -1
- package/dispenser-client.d.ts +7 -2
- package/dispenser-client.js +23 -24
- package/dispenser-client.js.map +1 -1
- package/dispenser-client.mjs +23 -22
- package/dispenser-client.mjs.map +1 -1
- package/index.d.ts +27 -18
- package/index.js +140 -143
- package/index.mjs +27 -29
- package/indexer-lookup.d.ts +18 -11
- package/indexer-lookup.js +112 -120
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs +105 -118
- package/indexer-lookup.mjs.map +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +9 -7
- package/localnet/get-kmd-wallet-account.js +28 -26
- package/localnet/get-kmd-wallet-account.js.map +1 -1
- package/localnet/get-kmd-wallet-account.mjs +28 -24
- package/localnet/get-kmd-wallet-account.mjs.map +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +7 -5
- package/localnet/get-localnet-dispenser-account.js +17 -15
- package/localnet/get-localnet-dispenser-account.js.map +1 -1
- package/localnet/get-localnet-dispenser-account.mjs +17 -13
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +10 -8
- package/localnet/get-or-create-kmd-wallet-account.js +28 -26
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs +28 -24
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
- package/localnet/is-localnet.d.ts +7 -3
- package/localnet/is-localnet.js +9 -10
- package/localnet/is-localnet.js.map +1 -1
- package/localnet/is-localnet.mjs +9 -8
- package/localnet/is-localnet.mjs.map +1 -1
- package/network-client.d.ts +17 -15
- package/network-client.js +115 -116
- package/network-client.js.map +1 -1
- package/network-client.mjs +115 -114
- package/network-client.mjs.map +1 -1
- package/package.json +12 -3
- package/testing/account.d.ts +11 -9
- package/testing/account.js +31 -33
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +29 -31
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +7 -2
- package/testing/fixtures/algokit-log-capture-fixture.js +36 -41
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs +36 -39
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +9 -4
- package/testing/fixtures/algorand-fixture.js +67 -62
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +66 -59
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/index.d.ts +7 -5
- package/testing/index.js +13 -18
- package/testing/index.mjs +7 -7
- package/testing/indexer.d.ts +5 -1
- package/testing/indexer.js +28 -37
- package/testing/indexer.js.map +1 -1
- package/testing/indexer.mjs +28 -35
- package/testing/indexer.mjs.map +1 -1
- package/testing/test-logger.d.ts +41 -36
- package/testing/test-logger.js +71 -76
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +71 -74
- package/testing/test-logger.mjs.map +1 -1
- package/testing/transaction-logger.d.ts +30 -27
- package/testing/transaction-logger.js +77 -93
- package/testing/transaction-logger.js.map +1 -1
- package/testing/transaction-logger.mjs +74 -90
- package/testing/transaction-logger.mjs.map +1 -1
- package/transaction/legacy-bridge.js +100 -111
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +97 -108
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +7 -5
- package/transaction/perform-atomic-transaction-composer-simulate.js +31 -36
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs +28 -33
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
- package/transaction/transaction.d.ts +34 -35
- package/transaction/transaction.js +716 -914
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +713 -911
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/transfer-algos.d.ts +9 -5
- package/transfer/transfer-algos.js +26 -27
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +26 -25
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +11 -8
- package/transfer/transfer.js +94 -100
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +94 -98
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +432 -429
- package/types/account-manager.js +591 -602
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +587 -599
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +192 -202
- package/types/account.js +91 -88
- package/types/account.js.map +1 -1
- package/types/account.mjs +88 -86
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +15 -10
- package/types/algo-http-client-with-retry.js +70 -92
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs +69 -90
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +778 -771
- package/types/algorand-client-transaction-creator.js +733 -732
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +732 -730
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +1090 -1360
- package/types/algorand-client-transaction-sender.js +930 -961
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +927 -959
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +239 -236
- package/types/algorand-client.js +322 -320
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +321 -318
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +47 -43
- package/types/amount.js +66 -70
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +63 -68
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +235 -272
- package/types/app-arc56.js +124 -170
- package/types/app-arc56.js.map +1 -1
- package/types/app-arc56.mjs +121 -168
- package/types/app-arc56.mjs.map +1 -1
- package/types/app-client.d.ts +1128 -2009
- package/types/app-client.js +1633 -1791
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1624 -1783
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +139 -141
- package/types/app-deployer.js +344 -384
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +341 -382
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +762 -932
- package/types/app-factory.js +496 -488
- package/types/app-factory.js.map +1 -1
- package/types/app-factory.mjs +491 -484
- package/types/app-factory.mjs.map +1 -1
- package/types/app-manager.d.ts +304 -310
- package/types/app-manager.js +422 -475
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +419 -473
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.d.ts +118 -117
- package/types/app-spec.js +125 -135
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +121 -132
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +229 -241
- package/types/app.js +36 -28
- package/types/app.js.map +1 -1
- package/types/app.mjs +33 -26
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +204 -199
- package/types/asset-manager.js +165 -174
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +164 -172
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +95 -91
- package/types/asset.js +0 -3
- package/types/asset.mjs +0 -2
- package/types/async-event-emitter.d.ts +18 -13
- package/types/async-event-emitter.js +37 -49
- package/types/async-event-emitter.js.map +1 -1
- package/types/async-event-emitter.mjs +36 -47
- package/types/async-event-emitter.mjs.map +1 -1
- package/types/client-manager.d.ts +453 -451
- package/types/client-manager.js +602 -598
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +597 -594
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +1211 -1258
- package/types/composer.js +1436 -1498
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +1430 -1493
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +53 -48
- package/types/config.js +78 -77
- package/types/config.js.map +1 -1
- package/types/config.mjs +77 -75
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +25 -23
- package/types/debugging.js +9 -11
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +8 -9
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +57 -52
- package/types/dispenser-client.js +120 -141
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +119 -139
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +5 -3
- package/types/expand.js +0 -3
- package/types/expand.mjs +0 -2
- package/types/indexer.d.ts +104 -100
- package/types/indexer.js +36 -31
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs +32 -30
- package/types/indexer.mjs.map +1 -1
- package/types/instance-of.d.ts +5 -3
- package/types/instance-of.js +0 -3
- package/types/instance-of.mjs +0 -2
- package/types/kmd-account-manager.d.ts +75 -70
- package/types/kmd-account-manager.js +150 -184
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +147 -182
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +13 -8
- package/types/lifecycle-events.js +10 -7
- package/types/lifecycle-events.js.map +1 -1
- package/types/lifecycle-events.mjs +9 -7
- package/types/lifecycle-events.mjs.map +1 -1
- package/types/logging.d.ts +15 -11
- package/types/logging.js +30 -31
- package/types/logging.js.map +1 -1
- package/types/logging.mjs +29 -29
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +33 -29
- package/types/logic-error.js +50 -49
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs +49 -47
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +32 -27
- package/types/network-client.js +10 -9
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs +9 -7
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +131 -132
- package/types/testing.js +0 -3
- package/types/testing.mjs +0 -2
- package/types/transaction.d.ts +110 -110
- package/types/transaction.js +0 -3
- package/types/transaction.mjs +0 -2
- package/types/transfer.d.ts +70 -66
- package/types/transfer.js +0 -3
- package/types/transfer.mjs +0 -2
- package/util.js +73 -118
- package/util.js.map +1 -1
- package/util.mjs +73 -116
- package/util.mjs.map +1 -1
- package/account/index.d.ts +0 -5
- package/debugging/index.d.ts +0 -1
- package/index.js.map +0 -1
- package/index.mjs.map +0 -1
- package/localnet/index.d.ts +0 -4
- package/testing/_asset.d.ts +0 -3
- package/testing/fixtures/index.d.ts +0 -2
- package/testing/index.js.map +0 -1
- package/testing/index.mjs.map +0 -1
- package/transaction/index.d.ts +0 -2
- package/transaction/legacy-bridge.d.ts +0 -35
- package/transfer/index.d.ts +0 -2
- package/types/asset.js.map +0 -1
- package/types/asset.mjs.map +0 -1
- package/types/expand.js.map +0 -1
- package/types/expand.mjs.map +0 -1
- package/types/instance-of.js.map +0 -1
- package/types/instance-of.mjs.map +0 -1
- package/types/testing.js.map +0 -1
- package/types/testing.mjs.map +0 -1
- package/types/transaction.js.map +0 -1
- package/types/transaction.mjs.map +0 -1
- package/types/transfer.js.map +0 -1
- package/types/transfer.mjs.map +0 -1
- package/util.d.ts +0 -48
|
@@ -1,95 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var decodeSignedTransaction = algosdk.decodeSignedTransaction;
|
|
1
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.js");
|
|
2
|
+
const require_config = require("../config.js");
|
|
3
|
+
const require_indexer = require("./indexer.js");
|
|
4
|
+
let algosdk = require("algosdk");
|
|
5
|
+
algosdk = require_runtime.__toESM(algosdk);
|
|
6
|
+
//#region src/testing/transaction-logger.ts
|
|
7
|
+
var decodeSignedTransaction = algosdk.default.decodeSignedTransaction;
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class TransactionLoggingAlgodv2ProxyHandler {
|
|
78
|
-
constructor(transactionLogger) {
|
|
79
|
-
this.transactionLogger = transactionLogger;
|
|
80
|
-
}
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
-
get(target, property, receiver) {
|
|
83
|
-
if (property === 'sendRawTransaction') {
|
|
84
|
-
return (stxOrStxs) => {
|
|
85
|
-
this.transactionLogger.logRawTransaction(stxOrStxs);
|
|
86
|
-
return target[property].call(receiver, stxOrStxs);
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90
|
-
return target[property];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
9
|
+
* Allows you to keep track of Algorand transaction IDs by wrapping an `Algodv2` in a proxy.
|
|
10
|
+
* Useful for automated tests.
|
|
11
|
+
*/
|
|
12
|
+
var TransactionLogger = class {
|
|
13
|
+
_sentTransactionIds = [];
|
|
14
|
+
_latestLastValidRound;
|
|
15
|
+
_pushTxn(stxn) {
|
|
16
|
+
const decoded = decodeSignedTransaction(stxn);
|
|
17
|
+
if (decoded.txn.lastValid > (this._latestLastValidRound ?? BigInt(0))) this._latestLastValidRound = BigInt(decoded.txn.lastValid);
|
|
18
|
+
this._sentTransactionIds.push(decoded.txn.txID());
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The list of transaction IDs that has been logged thus far.
|
|
22
|
+
*/
|
|
23
|
+
get sentTransactionIds() {
|
|
24
|
+
return this._sentTransactionIds;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Clear all logged IDs.
|
|
28
|
+
*/
|
|
29
|
+
clear() {
|
|
30
|
+
this._sentTransactionIds = [];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The method that captures raw transactions and stores the transaction IDs.
|
|
34
|
+
*/
|
|
35
|
+
logRawTransaction(signedTransactions) {
|
|
36
|
+
if (Array.isArray(signedTransactions)) signedTransactions.forEach((stxn) => this._pushTxn(stxn));
|
|
37
|
+
else this._pushTxn(signedTransactions);
|
|
38
|
+
}
|
|
39
|
+
/** Return a proxy that wraps the given Algodv2 with this transaction logger.
|
|
40
|
+
*
|
|
41
|
+
* @param algod The `Algodv2` to wrap
|
|
42
|
+
* @returns The wrapped `Algodv2`, any transactions sent using this algod instance will be logged by this transaction logger
|
|
43
|
+
*/
|
|
44
|
+
capture(algod) {
|
|
45
|
+
return new Proxy(algod, new TransactionLoggingAlgodv2ProxyHandler(this));
|
|
46
|
+
}
|
|
47
|
+
/** Wait until all logged transactions IDs appear in the given `Indexer`. */
|
|
48
|
+
async waitForIndexer(indexer) {
|
|
49
|
+
if (this._sentTransactionIds.length === 0) return;
|
|
50
|
+
const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1];
|
|
51
|
+
await require_indexer.runWhenIndexerCaughtUp(async () => {
|
|
52
|
+
try {
|
|
53
|
+
await indexer.lookupTransactionByID(lastTxId).do();
|
|
54
|
+
} catch (e) {
|
|
55
|
+
if (this._latestLastValidRound) {
|
|
56
|
+
await indexer.lookupBlock(this._latestLastValidRound).do();
|
|
57
|
+
require_config.Config.getLogger().debug(`waitForIndexer has waited until the last valid round ${this._latestLastValidRound} was indexed, but did not find transaction ${lastTxId} in the indexer.`);
|
|
58
|
+
} else throw e;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var TransactionLoggingAlgodv2ProxyHandler = class {
|
|
64
|
+
transactionLogger;
|
|
65
|
+
constructor(transactionLogger) {
|
|
66
|
+
this.transactionLogger = transactionLogger;
|
|
67
|
+
}
|
|
68
|
+
get(target, property, receiver) {
|
|
69
|
+
if (property === "sendRawTransaction") return (stxOrStxs) => {
|
|
70
|
+
this.transactionLogger.logRawTransaction(stxOrStxs);
|
|
71
|
+
return target[property].call(receiver, stxOrStxs);
|
|
72
|
+
};
|
|
73
|
+
return target[property];
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
94
77
|
exports.TransactionLogger = TransactionLogger;
|
|
95
|
-
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=transaction-logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-logger.js","sources":["../../src/testing/transaction-logger.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { Config } from '../config'\nimport { runWhenIndexerCaughtUp } from './indexer'\nimport Algodv2 = algosdk.Algodv2\nimport decodeSignedTransaction = algosdk.decodeSignedTransaction\nimport Indexer = algosdk.Indexer\n\n/**\n * Allows you to keep track of Algorand transaction IDs by wrapping an `Algodv2` in a proxy.\n * Useful for automated tests.\n */\nexport class TransactionLogger {\n private _sentTransactionIds: string[] = []\n private _latestLastValidRound?: bigint\n\n private _pushTxn(stxn: Uint8Array) {\n const decoded = decodeSignedTransaction(stxn)\n if (decoded.txn.lastValid > (this._latestLastValidRound ?? BigInt(0))) {\n this._latestLastValidRound = BigInt(decoded.txn.lastValid)\n }\n this._sentTransactionIds.push(decoded.txn.txID())\n }\n\n /**\n * The list of transaction IDs that has been logged thus far.\n */\n get sentTransactionIds(): Readonly<string[]> {\n return this._sentTransactionIds\n }\n\n /**\n * Clear all logged IDs.\n */\n clear() {\n this._sentTransactionIds = []\n }\n\n /**\n * The method that captures raw transactions and stores the transaction IDs.\n */\n logRawTransaction(signedTransactions: Uint8Array | Uint8Array[]) {\n if (Array.isArray(signedTransactions)) {\n signedTransactions.forEach((stxn) => this._pushTxn(stxn))\n } else {\n this._pushTxn(signedTransactions)\n }\n }\n\n /** Return a proxy that wraps the given Algodv2 with this transaction logger.\n *\n * @param algod The `Algodv2` to wrap\n * @returns The wrapped `Algodv2`, any transactions sent using this algod instance will be logged by this transaction logger\n */\n capture(algod: Algodv2): Algodv2 {\n return new Proxy<Algodv2>(algod, new TransactionLoggingAlgodv2ProxyHandler(this))\n }\n\n /** Wait until all logged transactions IDs appear in the given `Indexer`. */\n async waitForIndexer(indexer: Indexer) {\n if (this._sentTransactionIds.length === 0) return\n const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1]\n await runWhenIndexerCaughtUp(async () => {\n try {\n await indexer.lookupTransactionByID(lastTxId).do()\n } catch (e) {\n // If the txid lookup failed, then try to look up the last valid round\n // If that round exists, then we know indexer is caught up\n if (this._latestLastValidRound) {\n await indexer.lookupBlock(this._latestLastValidRound).do()\n Config.getLogger().debug(\n `waitForIndexer has waited until the last valid round ${this._latestLastValidRound} was indexed, but did not find transaction ${lastTxId} in the indexer.`,\n )\n } else {\n throw e\n }\n }\n })\n }\n}\n\nclass TransactionLoggingAlgodv2ProxyHandler implements ProxyHandler<Algodv2> {\n private transactionLogger: TransactionLogger\n\n constructor(transactionLogger: TransactionLogger) {\n this.transactionLogger = transactionLogger\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Algodv2, property: string | symbol, receiver: any) {\n if (property === 'sendRawTransaction') {\n return (stxOrStxs: Uint8Array | Uint8Array[]) => {\n this.transactionLogger.logRawTransaction(stxOrStxs)\n return target[property].call(receiver, stxOrStxs)\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[property]\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"transaction-logger.js","names":["runWhenIndexerCaughtUp"],"sources":["../../src/testing/transaction-logger.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { Config } from '../config'\nimport { runWhenIndexerCaughtUp } from './indexer'\nimport Algodv2 = algosdk.Algodv2\nimport decodeSignedTransaction = algosdk.decodeSignedTransaction\nimport Indexer = algosdk.Indexer\n\n/**\n * Allows you to keep track of Algorand transaction IDs by wrapping an `Algodv2` in a proxy.\n * Useful for automated tests.\n */\nexport class TransactionLogger {\n private _sentTransactionIds: string[] = []\n private _latestLastValidRound?: bigint\n\n private _pushTxn(stxn: Uint8Array) {\n const decoded = decodeSignedTransaction(stxn)\n if (decoded.txn.lastValid > (this._latestLastValidRound ?? BigInt(0))) {\n this._latestLastValidRound = BigInt(decoded.txn.lastValid)\n }\n this._sentTransactionIds.push(decoded.txn.txID())\n }\n\n /**\n * The list of transaction IDs that has been logged thus far.\n */\n get sentTransactionIds(): Readonly<string[]> {\n return this._sentTransactionIds\n }\n\n /**\n * Clear all logged IDs.\n */\n clear() {\n this._sentTransactionIds = []\n }\n\n /**\n * The method that captures raw transactions and stores the transaction IDs.\n */\n logRawTransaction(signedTransactions: Uint8Array | Uint8Array[]) {\n if (Array.isArray(signedTransactions)) {\n signedTransactions.forEach((stxn) => this._pushTxn(stxn))\n } else {\n this._pushTxn(signedTransactions)\n }\n }\n\n /** Return a proxy that wraps the given Algodv2 with this transaction logger.\n *\n * @param algod The `Algodv2` to wrap\n * @returns The wrapped `Algodv2`, any transactions sent using this algod instance will be logged by this transaction logger\n */\n capture(algod: Algodv2): Algodv2 {\n return new Proxy<Algodv2>(algod, new TransactionLoggingAlgodv2ProxyHandler(this))\n }\n\n /** Wait until all logged transactions IDs appear in the given `Indexer`. */\n async waitForIndexer(indexer: Indexer) {\n if (this._sentTransactionIds.length === 0) return\n const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1]\n await runWhenIndexerCaughtUp(async () => {\n try {\n await indexer.lookupTransactionByID(lastTxId).do()\n } catch (e) {\n // If the txid lookup failed, then try to look up the last valid round\n // If that round exists, then we know indexer is caught up\n if (this._latestLastValidRound) {\n await indexer.lookupBlock(this._latestLastValidRound).do()\n Config.getLogger().debug(\n `waitForIndexer has waited until the last valid round ${this._latestLastValidRound} was indexed, but did not find transaction ${lastTxId} in the indexer.`,\n )\n } else {\n throw e\n }\n }\n })\n }\n}\n\nclass TransactionLoggingAlgodv2ProxyHandler implements ProxyHandler<Algodv2> {\n private transactionLogger: TransactionLogger\n\n constructor(transactionLogger: TransactionLogger) {\n this.transactionLogger = transactionLogger\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Algodv2, property: string | symbol, receiver: any) {\n if (property === 'sendRawTransaction') {\n return (stxOrStxs: Uint8Array | Uint8Array[]) => {\n this.transactionLogger.logRawTransaction(stxOrStxs)\n return target[property].call(receiver, stxOrStxs)\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[property]\n }\n}\n"],"mappings":";;;;;;AAIO,IAAA,0BAA0B,QAAA,QAAQ;;;;;AAOzC,IAAa,oBAAb,MAA+B;CAC7B,sBAAwC,CAAC;CACzC;CAEA,SAAiB,MAAkB;EACjC,MAAM,UAAU,wBAAwB,IAAI;EAC5C,IAAI,QAAQ,IAAI,aAAa,KAAK,yBAAyB,OAAO,CAAC,IACjE,KAAK,wBAAwB,OAAO,QAAQ,IAAI,SAAS;EAE3D,KAAK,oBAAoB,KAAK,QAAQ,IAAI,KAAK,CAAC;CAClD;;;;CAKA,IAAI,qBAAyC;EAC3C,OAAO,KAAK;CACd;;;;CAKA,QAAQ;EACN,KAAK,sBAAsB,CAAC;CAC9B;;;;CAKA,kBAAkB,oBAA+C;EAC/D,IAAI,MAAM,QAAQ,kBAAkB,GAClC,mBAAmB,SAAS,SAAS,KAAK,SAAS,IAAI,CAAC;OAExD,KAAK,SAAS,kBAAkB;CAEpC;;;;;;CAOA,QAAQ,OAAyB;EAC/B,OAAO,IAAI,MAAe,OAAO,IAAI,sCAAsC,IAAI,CAAC;CAClF;;CAGA,MAAM,eAAe,SAAkB;EACrC,IAAI,KAAK,oBAAoB,WAAW,GAAG;EAC3C,MAAM,WAAW,KAAK,oBAAoB,KAAK,oBAAoB,SAAS;EAC5E,MAAMA,gBAAAA,uBAAuB,YAAY;GACvC,IAAI;IACF,MAAM,QAAQ,sBAAsB,QAAQ,CAAC,CAAC,GAAG;GACnD,SAAS,GAAG;IAGV,IAAI,KAAK,uBAAuB;KAC9B,MAAM,QAAQ,YAAY,KAAK,qBAAqB,CAAC,CAAC,GAAG;KACzD,eAAA,OAAO,UAAU,CAAC,CAAC,MACjB,wDAAwD,KAAK,sBAAsB,6CAA6C,SAAS,iBAC3I;IACF,OACE,MAAM;GAEV;EACF,CAAC;CACH;AACF;AAEA,IAAM,wCAAN,MAA6E;CAC3E;CAEA,YAAY,mBAAsC;EAChD,KAAK,oBAAoB;CAC3B;CAGA,IAAI,QAAiB,UAA2B,UAAe;EAC7D,IAAI,aAAa,sBACf,QAAQ,cAAyC;GAC/C,KAAK,kBAAkB,kBAAkB,SAAS;GAClD,OAAO,OAAO,SAAS,CAAC,KAAK,UAAU,SAAS;EAClD;EAGF,OAAQ,OAAe;CACzB;AACF"}
|
|
@@ -1,93 +1,77 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { Config } from "../config.mjs";
|
|
2
|
+
import { runWhenIndexerCaughtUp } from "./indexer.mjs";
|
|
3
|
+
import algosdk from "algosdk";
|
|
4
|
+
//#region src/testing/transaction-logger.ts
|
|
5
5
|
var decodeSignedTransaction = algosdk.decodeSignedTransaction;
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class TransactionLoggingAlgodv2ProxyHandler {
|
|
76
|
-
constructor(transactionLogger) {
|
|
77
|
-
this.transactionLogger = transactionLogger;
|
|
78
|
-
}
|
|
79
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
|
-
get(target, property, receiver) {
|
|
81
|
-
if (property === 'sendRawTransaction') {
|
|
82
|
-
return (stxOrStxs) => {
|
|
83
|
-
this.transactionLogger.logRawTransaction(stxOrStxs);
|
|
84
|
-
return target[property].call(receiver, stxOrStxs);
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
88
|
-
return target[property];
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
7
|
+
* Allows you to keep track of Algorand transaction IDs by wrapping an `Algodv2` in a proxy.
|
|
8
|
+
* Useful for automated tests.
|
|
9
|
+
*/
|
|
10
|
+
var TransactionLogger = class {
|
|
11
|
+
_sentTransactionIds = [];
|
|
12
|
+
_latestLastValidRound;
|
|
13
|
+
_pushTxn(stxn) {
|
|
14
|
+
const decoded = decodeSignedTransaction(stxn);
|
|
15
|
+
if (decoded.txn.lastValid > (this._latestLastValidRound ?? BigInt(0))) this._latestLastValidRound = BigInt(decoded.txn.lastValid);
|
|
16
|
+
this._sentTransactionIds.push(decoded.txn.txID());
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The list of transaction IDs that has been logged thus far.
|
|
20
|
+
*/
|
|
21
|
+
get sentTransactionIds() {
|
|
22
|
+
return this._sentTransactionIds;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Clear all logged IDs.
|
|
26
|
+
*/
|
|
27
|
+
clear() {
|
|
28
|
+
this._sentTransactionIds = [];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The method that captures raw transactions and stores the transaction IDs.
|
|
32
|
+
*/
|
|
33
|
+
logRawTransaction(signedTransactions) {
|
|
34
|
+
if (Array.isArray(signedTransactions)) signedTransactions.forEach((stxn) => this._pushTxn(stxn));
|
|
35
|
+
else this._pushTxn(signedTransactions);
|
|
36
|
+
}
|
|
37
|
+
/** Return a proxy that wraps the given Algodv2 with this transaction logger.
|
|
38
|
+
*
|
|
39
|
+
* @param algod The `Algodv2` to wrap
|
|
40
|
+
* @returns The wrapped `Algodv2`, any transactions sent using this algod instance will be logged by this transaction logger
|
|
41
|
+
*/
|
|
42
|
+
capture(algod) {
|
|
43
|
+
return new Proxy(algod, new TransactionLoggingAlgodv2ProxyHandler(this));
|
|
44
|
+
}
|
|
45
|
+
/** Wait until all logged transactions IDs appear in the given `Indexer`. */
|
|
46
|
+
async waitForIndexer(indexer) {
|
|
47
|
+
if (this._sentTransactionIds.length === 0) return;
|
|
48
|
+
const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1];
|
|
49
|
+
await runWhenIndexerCaughtUp(async () => {
|
|
50
|
+
try {
|
|
51
|
+
await indexer.lookupTransactionByID(lastTxId).do();
|
|
52
|
+
} catch (e) {
|
|
53
|
+
if (this._latestLastValidRound) {
|
|
54
|
+
await indexer.lookupBlock(this._latestLastValidRound).do();
|
|
55
|
+
Config.getLogger().debug(`waitForIndexer has waited until the last valid round ${this._latestLastValidRound} was indexed, but did not find transaction ${lastTxId} in the indexer.`);
|
|
56
|
+
} else throw e;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var TransactionLoggingAlgodv2ProxyHandler = class {
|
|
62
|
+
transactionLogger;
|
|
63
|
+
constructor(transactionLogger) {
|
|
64
|
+
this.transactionLogger = transactionLogger;
|
|
65
|
+
}
|
|
66
|
+
get(target, property, receiver) {
|
|
67
|
+
if (property === "sendRawTransaction") return (stxOrStxs) => {
|
|
68
|
+
this.transactionLogger.logRawTransaction(stxOrStxs);
|
|
69
|
+
return target[property].call(receiver, stxOrStxs);
|
|
70
|
+
};
|
|
71
|
+
return target[property];
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
92
75
|
export { TransactionLogger };
|
|
93
|
-
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=transaction-logger.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-logger.mjs","sources":["../../src/testing/transaction-logger.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { Config } from '../config'\nimport { runWhenIndexerCaughtUp } from './indexer'\nimport Algodv2 = algosdk.Algodv2\nimport decodeSignedTransaction = algosdk.decodeSignedTransaction\nimport Indexer = algosdk.Indexer\n\n/**\n * Allows you to keep track of Algorand transaction IDs by wrapping an `Algodv2` in a proxy.\n * Useful for automated tests.\n */\nexport class TransactionLogger {\n private _sentTransactionIds: string[] = []\n private _latestLastValidRound?: bigint\n\n private _pushTxn(stxn: Uint8Array) {\n const decoded = decodeSignedTransaction(stxn)\n if (decoded.txn.lastValid > (this._latestLastValidRound ?? BigInt(0))) {\n this._latestLastValidRound = BigInt(decoded.txn.lastValid)\n }\n this._sentTransactionIds.push(decoded.txn.txID())\n }\n\n /**\n * The list of transaction IDs that has been logged thus far.\n */\n get sentTransactionIds(): Readonly<string[]> {\n return this._sentTransactionIds\n }\n\n /**\n * Clear all logged IDs.\n */\n clear() {\n this._sentTransactionIds = []\n }\n\n /**\n * The method that captures raw transactions and stores the transaction IDs.\n */\n logRawTransaction(signedTransactions: Uint8Array | Uint8Array[]) {\n if (Array.isArray(signedTransactions)) {\n signedTransactions.forEach((stxn) => this._pushTxn(stxn))\n } else {\n this._pushTxn(signedTransactions)\n }\n }\n\n /** Return a proxy that wraps the given Algodv2 with this transaction logger.\n *\n * @param algod The `Algodv2` to wrap\n * @returns The wrapped `Algodv2`, any transactions sent using this algod instance will be logged by this transaction logger\n */\n capture(algod: Algodv2): Algodv2 {\n return new Proxy<Algodv2>(algod, new TransactionLoggingAlgodv2ProxyHandler(this))\n }\n\n /** Wait until all logged transactions IDs appear in the given `Indexer`. */\n async waitForIndexer(indexer: Indexer) {\n if (this._sentTransactionIds.length === 0) return\n const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1]\n await runWhenIndexerCaughtUp(async () => {\n try {\n await indexer.lookupTransactionByID(lastTxId).do()\n } catch (e) {\n // If the txid lookup failed, then try to look up the last valid round\n // If that round exists, then we know indexer is caught up\n if (this._latestLastValidRound) {\n await indexer.lookupBlock(this._latestLastValidRound).do()\n Config.getLogger().debug(\n `waitForIndexer has waited until the last valid round ${this._latestLastValidRound} was indexed, but did not find transaction ${lastTxId} in the indexer.`,\n )\n } else {\n throw e\n }\n }\n })\n }\n}\n\nclass TransactionLoggingAlgodv2ProxyHandler implements ProxyHandler<Algodv2> {\n private transactionLogger: TransactionLogger\n\n constructor(transactionLogger: TransactionLogger) {\n this.transactionLogger = transactionLogger\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Algodv2, property: string | symbol, receiver: any) {\n if (property === 'sendRawTransaction') {\n return (stxOrStxs: Uint8Array | Uint8Array[]) => {\n this.transactionLogger.logRawTransaction(stxOrStxs)\n return target[property].call(receiver, stxOrStxs)\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[property]\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"transaction-logger.mjs","names":[],"sources":["../../src/testing/transaction-logger.ts"],"sourcesContent":["import algosdk from 'algosdk'\nimport { Config } from '../config'\nimport { runWhenIndexerCaughtUp } from './indexer'\nimport Algodv2 = algosdk.Algodv2\nimport decodeSignedTransaction = algosdk.decodeSignedTransaction\nimport Indexer = algosdk.Indexer\n\n/**\n * Allows you to keep track of Algorand transaction IDs by wrapping an `Algodv2` in a proxy.\n * Useful for automated tests.\n */\nexport class TransactionLogger {\n private _sentTransactionIds: string[] = []\n private _latestLastValidRound?: bigint\n\n private _pushTxn(stxn: Uint8Array) {\n const decoded = decodeSignedTransaction(stxn)\n if (decoded.txn.lastValid > (this._latestLastValidRound ?? BigInt(0))) {\n this._latestLastValidRound = BigInt(decoded.txn.lastValid)\n }\n this._sentTransactionIds.push(decoded.txn.txID())\n }\n\n /**\n * The list of transaction IDs that has been logged thus far.\n */\n get sentTransactionIds(): Readonly<string[]> {\n return this._sentTransactionIds\n }\n\n /**\n * Clear all logged IDs.\n */\n clear() {\n this._sentTransactionIds = []\n }\n\n /**\n * The method that captures raw transactions and stores the transaction IDs.\n */\n logRawTransaction(signedTransactions: Uint8Array | Uint8Array[]) {\n if (Array.isArray(signedTransactions)) {\n signedTransactions.forEach((stxn) => this._pushTxn(stxn))\n } else {\n this._pushTxn(signedTransactions)\n }\n }\n\n /** Return a proxy that wraps the given Algodv2 with this transaction logger.\n *\n * @param algod The `Algodv2` to wrap\n * @returns The wrapped `Algodv2`, any transactions sent using this algod instance will be logged by this transaction logger\n */\n capture(algod: Algodv2): Algodv2 {\n return new Proxy<Algodv2>(algod, new TransactionLoggingAlgodv2ProxyHandler(this))\n }\n\n /** Wait until all logged transactions IDs appear in the given `Indexer`. */\n async waitForIndexer(indexer: Indexer) {\n if (this._sentTransactionIds.length === 0) return\n const lastTxId = this._sentTransactionIds[this._sentTransactionIds.length - 1]\n await runWhenIndexerCaughtUp(async () => {\n try {\n await indexer.lookupTransactionByID(lastTxId).do()\n } catch (e) {\n // If the txid lookup failed, then try to look up the last valid round\n // If that round exists, then we know indexer is caught up\n if (this._latestLastValidRound) {\n await indexer.lookupBlock(this._latestLastValidRound).do()\n Config.getLogger().debug(\n `waitForIndexer has waited until the last valid round ${this._latestLastValidRound} was indexed, but did not find transaction ${lastTxId} in the indexer.`,\n )\n } else {\n throw e\n }\n }\n })\n }\n}\n\nclass TransactionLoggingAlgodv2ProxyHandler implements ProxyHandler<Algodv2> {\n private transactionLogger: TransactionLogger\n\n constructor(transactionLogger: TransactionLogger) {\n this.transactionLogger = transactionLogger\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(target: Algodv2, property: string | symbol, receiver: any) {\n if (property === 'sendRawTransaction') {\n return (stxOrStxs: Uint8Array | Uint8Array[]) => {\n this.transactionLogger.logRawTransaction(stxOrStxs)\n return target[property].call(receiver, stxOrStxs)\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (target as any)[property]\n }\n}\n"],"mappings":";;;;AAIO,IAAA,0BAA0B,QAAQ;;;;;AAOzC,IAAa,oBAAb,MAA+B;CAC7B,sBAAwC,CAAC;CACzC;CAEA,SAAiB,MAAkB;EACjC,MAAM,UAAU,wBAAwB,IAAI;EAC5C,IAAI,QAAQ,IAAI,aAAa,KAAK,yBAAyB,OAAO,CAAC,IACjE,KAAK,wBAAwB,OAAO,QAAQ,IAAI,SAAS;EAE3D,KAAK,oBAAoB,KAAK,QAAQ,IAAI,KAAK,CAAC;CAClD;;;;CAKA,IAAI,qBAAyC;EAC3C,OAAO,KAAK;CACd;;;;CAKA,QAAQ;EACN,KAAK,sBAAsB,CAAC;CAC9B;;;;CAKA,kBAAkB,oBAA+C;EAC/D,IAAI,MAAM,QAAQ,kBAAkB,GAClC,mBAAmB,SAAS,SAAS,KAAK,SAAS,IAAI,CAAC;OAExD,KAAK,SAAS,kBAAkB;CAEpC;;;;;;CAOA,QAAQ,OAAyB;EAC/B,OAAO,IAAI,MAAe,OAAO,IAAI,sCAAsC,IAAI,CAAC;CAClF;;CAGA,MAAM,eAAe,SAAkB;EACrC,IAAI,KAAK,oBAAoB,WAAW,GAAG;EAC3C,MAAM,WAAW,KAAK,oBAAoB,KAAK,oBAAoB,SAAS;EAC5E,MAAM,uBAAuB,YAAY;GACvC,IAAI;IACF,MAAM,QAAQ,sBAAsB,QAAQ,CAAC,CAAC,GAAG;GACnD,SAAS,GAAG;IAGV,IAAI,KAAK,uBAAuB;KAC9B,MAAM,QAAQ,YAAY,KAAK,qBAAqB,CAAC,CAAC,GAAG;KACzD,OAAO,UAAU,CAAC,CAAC,MACjB,wDAAwD,KAAK,sBAAsB,6CAA6C,SAAS,iBAC3I;IACF,OACE,MAAM;GAEV;EACF,CAAC;CACH;AACF;AAEA,IAAM,wCAAN,MAA6E;CAC3E;CAEA,YAAY,mBAAsC;EAChD,KAAK,oBAAoB;CAC3B;CAGA,IAAI,QAAiB,UAA2B,UAAe;EAC7D,IAAI,aAAa,sBACf,QAAQ,cAAyC;GAC/C,KAAK,kBAAkB,kBAAkB,SAAS;GAClD,OAAO,OAAO,SAAS,CAAC,KAAK,UAAU,SAAS;EAClD;EAGF,OAAQ,OAAe;CACzB;AACF"}
|