@cardano-sdk/e2e 0.24.0 → 0.26.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/.env.example +1 -7
- package/CHANGELOG.md +24 -0
- package/README.md +0 -29
- package/dist/cjs/environment.d.ts.map +1 -1
- package/dist/cjs/environment.js.map +1 -1
- package/dist/cjs/factories.d.ts.map +1 -1
- package/dist/cjs/factories.js +7 -1
- package/dist/cjs/factories.js.map +1 -1
- package/dist/cjs/measurement-util.d.ts.map +1 -1
- package/dist/cjs/measurement-util.js.map +1 -1
- package/dist/cjs/scripts/is-local-network-ready.js.map +1 -1
- package/dist/cjs/scripts/mnemonic.js.map +1 -1
- package/dist/cjs/tools/multi-delegation-data-gen/utils/files.d.ts.map +1 -1
- package/dist/cjs/tools/multi-delegation-data-gen/utils/files.js.map +1 -1
- package/dist/cjs/tools/multi-delegation-data-gen/utils/terminal-progress-monitor.d.ts.map +1 -1
- package/dist/cjs/tools/multi-delegation-data-gen/utils/terminal-progress-monitor.js.map +1 -1
- package/dist/cjs/tools/multi-delegation-data-gen/utils/utils.d.ts.map +1 -1
- package/dist/cjs/tools/multi-delegation-data-gen/utils/utils.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/environment.d.ts.map +1 -1
- package/dist/esm/environment.js.map +1 -1
- package/dist/esm/factories.d.ts.map +1 -1
- package/dist/esm/factories.js +7 -1
- package/dist/esm/factories.js.map +1 -1
- package/dist/esm/measurement-util.d.ts.map +1 -1
- package/dist/esm/measurement-util.js.map +1 -1
- package/dist/esm/scripts/is-local-network-ready.js.map +1 -1
- package/dist/esm/scripts/mnemonic.js.map +1 -1
- package/dist/esm/tools/multi-delegation-data-gen/utils/files.d.ts.map +1 -1
- package/dist/esm/tools/multi-delegation-data-gen/utils/files.js.map +1 -1
- package/dist/esm/tools/multi-delegation-data-gen/utils/terminal-progress-monitor.d.ts.map +1 -1
- package/dist/esm/tools/multi-delegation-data-gen/utils/terminal-progress-monitor.js.map +1 -1
- package/dist/esm/tools/multi-delegation-data-gen/utils/utils.d.ts.map +1 -1
- package/dist/esm/tools/multi-delegation-data-gen/utils/utils.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/docker-compose.yml +4 -0
- package/jest.config.js +0 -1
- package/local-network/scripts/common.sh +19 -0
- package/local-network/scripts/make-babbage.sh +2 -1
- package/local-network/scripts/mint-handles.sh +2 -18
- package/local-network/scripts/mint-tokens.sh +2 -18
- package/local-network/scripts/mnemonic_keys.sh +0 -0
- package/local-network/scripts/setup-wallets.sh +2 -17
- package/local-network/templates/babbage/submit-api-config.json +115 -0
- package/package.json +27 -29
- package/src/environment.ts +2 -6
- package/src/factories.ts +11 -5
- package/src/measurement-util.ts +1 -4
- package/src/scripts/is-local-network-ready.ts +1 -3
- package/src/scripts/mnemonic.ts +1 -3
- package/src/tools/multi-delegation-data-gen/utils/files.ts +1 -3
- package/src/tools/multi-delegation-data-gen/utils/terminal-progress-monitor.ts +2 -6
- package/src/tools/multi-delegation-data-gen/utils/utils.ts +1 -3
- package/test/artillery/StakePoolSearch.ts +5 -16
- package/test/artillery/artillery.ts +20 -61
- package/test/artillery/wallet-restoration/WalletRestoration.ts +1 -3
- package/test/artillery/wallet-restoration/queries.ts +1 -3
- package/test/artillery/wallet-restoration/types.ts +1 -3
- package/test/load-test-custom/stake-pool-search/stake-pool-search.test.ts +1 -3
- package/test/load-test-custom/wallet-init/wallet-init.test.ts +10 -1
- package/test/load-test-custom/wallet-restoration/wallet-restoration.test.ts +1 -4
- package/test/local-network/register-pool.test.ts +24 -14
- package/test/long-running/cache-invalidation.test.ts +7 -4
- package/test/long-running/multisig-wallet/MultiSigTx.ts +117 -0
- package/test/long-running/multisig-wallet/MultiSigWallet.ts +491 -0
- package/test/long-running/multisig-wallet/multisig-delegation-rewards.test.ts +318 -0
- package/test/projection/offline-fork.test.ts +47 -20
- package/test/projection/single-tenant-utxo.test.ts +40 -27
- package/test/providers/StakePoolProvider.test.ts +22 -17
- package/test/tsconfig.json +3 -0
- package/test/wallet/PersonalWallet/delegation.test.ts +6 -3
- package/test/wallet/PersonalWallet/handle.test.ts +2 -1
- package/test/wallet/PersonalWallet/mint.test.ts +2 -1
- package/test/wallet/PersonalWallet/multiAddress.test.ts +2 -1
- package/test/wallet/PersonalWallet/multisignature.test.ts +4 -2
- package/test/wallet/PersonalWallet/nft.test.ts +2 -1
- package/test/web-extension/extension/ui.ts +2 -8
- package/test/load-testing/tx-submit-load.test.ts +0 -341
package/docker-compose.yml
CHANGED
package/jest.config.js
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
wait_tx_complete() {
|
|
4
|
+
utxo_to_check="$1"
|
|
5
|
+
timeout=0
|
|
6
|
+
max_timeout=30
|
|
7
|
+
while [ $timeout -lt $max_timeout ]; do
|
|
8
|
+
output=$(cardano-cli query utxo --tx-in "${utxo_to_check}" --testnet-magic 888)
|
|
9
|
+
line_count=$(echo "$output" | awk 'END {print NR}')
|
|
10
|
+
if [ $line_count -eq 2 ]; then
|
|
11
|
+
echo "Transaction completed"
|
|
12
|
+
return 0
|
|
13
|
+
fi
|
|
14
|
+
timeout=$((timeout + 1))
|
|
15
|
+
sleep 1
|
|
16
|
+
done
|
|
17
|
+
echo "Timeout: Transaction not completed in $max_timeout sec."
|
|
18
|
+
return 1
|
|
19
|
+
}
|
|
@@ -266,12 +266,13 @@ $SED -i -E "s/AlonzoGenesisHash: '.*'/AlonzoGenesisHash: '${alonzoGenesisHash}'/
|
|
|
266
266
|
# Create config folder
|
|
267
267
|
rm -rf ./config/*
|
|
268
268
|
mkdir -p ./config/network/cardano-db-sync/
|
|
269
|
-
mkdir -p ./config/network/cardano-db-sync/
|
|
270
269
|
mkdir -p ./config/network/cardano-node/genesis/
|
|
270
|
+
mkdir -p ./config/network/cardano-submit-api/
|
|
271
271
|
mkdir -p ./config/network/genesis/
|
|
272
272
|
|
|
273
273
|
cp ./templates/babbage/db-sync-config.json ./config/network/cardano-db-sync/config.json
|
|
274
274
|
cp ./templates/babbage/node-config.json ./config/network/cardano-node/config.json
|
|
275
|
+
cp ./templates/babbage/submit-api-config.json ./config/network/cardano-submit-api/config.json
|
|
275
276
|
|
|
276
277
|
$SED -i -E "s/\"ByronGenesisHash\": \".*\"/\"ByronGenesisHash\": \"${byronGenesisHash}\"/" ./config/network/cardano-node/config.json
|
|
277
278
|
$SED -i -E "s/\"ShelleyGenesisHash\": \".*\"/\"ShelleyGenesisHash\": \"${shelleyGenesisHash}\"/" ./config/network/cardano-node/config.json
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
+
source $(dirname $0)/common.sh
|
|
4
|
+
|
|
3
5
|
handleNames=("HelloHandle" "TestHandle" "DoubleHandle")
|
|
4
6
|
handleHexes=("48656c6c6f48616e646c65" "5465737448616e646c65" "446f75626c6548616e646c65")
|
|
5
7
|
|
|
@@ -46,24 +48,6 @@ cat >network-files/utxo-keys/handles-metadata.json <<EOL
|
|
|
46
48
|
}}
|
|
47
49
|
EOL
|
|
48
50
|
|
|
49
|
-
wait_tx_complete() {
|
|
50
|
-
utxo_to_check="$1"
|
|
51
|
-
timeout=0
|
|
52
|
-
max_timeout=10
|
|
53
|
-
while [ $timeout -lt $max_timeout ]; do
|
|
54
|
-
output=$(cardano-cli query utxo --tx-in "${utxo_to_check}" --testnet-magic 888)
|
|
55
|
-
line_count=$(echo "$output" | awk 'END {print NR}')
|
|
56
|
-
if [ $line_count -eq 2 ]; then
|
|
57
|
-
echo "Transaction completed"
|
|
58
|
-
return 0
|
|
59
|
-
fi
|
|
60
|
-
timeout=$((timeout + 1))
|
|
61
|
-
sleep 1
|
|
62
|
-
done
|
|
63
|
-
echo "Timeout: Transaction not completed in 10 sec."
|
|
64
|
-
return 1
|
|
65
|
-
}
|
|
66
|
-
|
|
67
51
|
echo $policyid >/sdk-ipc/handle_policy_ids
|
|
68
52
|
destAddr="addr_test1qr0c3frkem9cqn5f73dnvqpena27k2fgqew6wct9eaka03agfwkvzr0zyq7nqvcj24zehrshx63zzdxv24x3a4tcnfeq9zwmn7"
|
|
69
53
|
utxo=$(cardano-cli query utxo --address "$addr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
# This script mint native tokens to genesis address
|
|
4
4
|
set -euo pipefail
|
|
5
5
|
|
|
6
|
+
source $(dirname $0)/common.sh
|
|
7
|
+
|
|
6
8
|
here="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)"
|
|
7
9
|
root="$(cd "$here/.." && pwd)"
|
|
8
10
|
cd "$root"
|
|
@@ -23,24 +25,6 @@ while [ ! -S "$CARDANO_NODE_SOCKET_PATH" ]; do
|
|
|
23
25
|
sleep 2
|
|
24
26
|
done
|
|
25
27
|
|
|
26
|
-
wait_tx_complete() {
|
|
27
|
-
utxo_to_check="$1"
|
|
28
|
-
timeout=0
|
|
29
|
-
max_timeout=10
|
|
30
|
-
while [ $timeout -lt $max_timeout ]; do
|
|
31
|
-
output=$(cardano-cli query utxo --tx-in "${utxo_to_check}" --testnet-magic 888)
|
|
32
|
-
line_count=$(echo "$output" | awk 'END {print NR}')
|
|
33
|
-
if [ $line_count -eq 2 ]; then
|
|
34
|
-
echo "Transaction completed"
|
|
35
|
-
return 0
|
|
36
|
-
fi
|
|
37
|
-
timeout=$((timeout + 1))
|
|
38
|
-
sleep 1
|
|
39
|
-
done
|
|
40
|
-
echo "Timeout: Transaction not completed in 10 sec."
|
|
41
|
-
return 1
|
|
42
|
-
}
|
|
43
|
-
|
|
44
28
|
echo "Create Mary-era minting policy"
|
|
45
29
|
cat >network-files/utxo-keys/minting-policy.json <<EOL
|
|
46
30
|
{
|
|
File without changes
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
# This funds a set of fixed addresses to be used during testing.
|
|
4
4
|
set -euo pipefail
|
|
5
5
|
|
|
6
|
+
source $(dirname $0)/common.sh
|
|
7
|
+
|
|
6
8
|
here="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)"
|
|
7
9
|
root="$(cd "$here/.." && pwd)"
|
|
8
10
|
cd "$root"
|
|
@@ -23,23 +25,6 @@ while [ ! -S "$CARDANO_NODE_SOCKET_PATH" ]; do
|
|
|
23
25
|
sleep 2
|
|
24
26
|
done
|
|
25
27
|
|
|
26
|
-
wait_tx_complete() {
|
|
27
|
-
utxo_to_check="$1"
|
|
28
|
-
timeout=0
|
|
29
|
-
max_timeout=10
|
|
30
|
-
while [ $timeout -lt $max_timeout ]; do
|
|
31
|
-
output=$(cardano-cli query utxo --tx-in "${utxo_to_check}" --testnet-magic 888)
|
|
32
|
-
line_count=$(echo "$output" | awk 'END {print NR}')
|
|
33
|
-
if [ $line_count -eq 2 ]; then
|
|
34
|
-
echo "Transaction completed"
|
|
35
|
-
return 0
|
|
36
|
-
fi
|
|
37
|
-
timeout=$((timeout + 1))
|
|
38
|
-
sleep 1
|
|
39
|
-
done
|
|
40
|
-
echo "Timeout: Transaction not completed in 10 sec."
|
|
41
|
-
return 1
|
|
42
|
-
}
|
|
43
28
|
genesisAddr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo3.vkey --testnet-magic 888)
|
|
44
29
|
|
|
45
30
|
walletAddr1="addr_test1qpw0djgj0x59ngrjvqthn7enhvruxnsavsw5th63la3mjel3tkc974sr23jmlzgq5zda4gtv8k9cy38756r9y3qgmkqqjz6aa7"
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ByronGenesisFile": "genesis/byron.json",
|
|
3
|
+
"ShelleyGenesisFile": "genesis/shelley.json",
|
|
4
|
+
"AlonzoGenesisFile": "genesis/alonzo.json",
|
|
5
|
+
"ByronGenesisHash": "a300c7ae1b124f53a80d86c6e43ff28c8d0369d7aa5512d5a3328a668b0e15e8",
|
|
6
|
+
"ShelleyGenesisHash": "6baf33f913dffe311033bd7a7199060cb421234bf12cb99ef448bfd4fe47e305",
|
|
7
|
+
"AlonzoGenesisHash": "eaa32942a4f2b3028928cb47be679bb36fa128f6d7dddc04ae592d27f2818c16",
|
|
8
|
+
"MaxConcurrencyBulkSync": 1,
|
|
9
|
+
"MaxConcurrencyDeadline": 2,
|
|
10
|
+
"Protocol": "Cardano",
|
|
11
|
+
"RequiresNetworkMagic": "RequiresMagic",
|
|
12
|
+
"LastKnownBlockVersion-Major": 6,
|
|
13
|
+
"LastKnownBlockVersion-Minor": 0,
|
|
14
|
+
"LastKnownBlockVersion-Alt": 0,
|
|
15
|
+
"ApplicationName": "cardano-sl",
|
|
16
|
+
"ApplicationVersion": 1,
|
|
17
|
+
"TurnOnLogging": true,
|
|
18
|
+
"TurnOnLogMetrics": true,
|
|
19
|
+
"minSeverity": "Info",
|
|
20
|
+
"TracingVerbosity": "MinimalVerbosity",
|
|
21
|
+
"setupBackends": [
|
|
22
|
+
"KatipBK"
|
|
23
|
+
],
|
|
24
|
+
"defaultBackends": [
|
|
25
|
+
"KatipBK"
|
|
26
|
+
],
|
|
27
|
+
"setupScribes": [
|
|
28
|
+
{
|
|
29
|
+
"scKind": "FileSK",
|
|
30
|
+
"scName": "logs/testnet.log",
|
|
31
|
+
"scFormat": "ScText"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"scKind": "StdoutSK",
|
|
35
|
+
"scName": "stdout",
|
|
36
|
+
"scFormat": "ScText"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"defaultScribes": [
|
|
40
|
+
[
|
|
41
|
+
"FileSK",
|
|
42
|
+
"logs/testnet.log"
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"StdoutSK",
|
|
46
|
+
"stdout"
|
|
47
|
+
]
|
|
48
|
+
],
|
|
49
|
+
"rotation": {
|
|
50
|
+
"rpLogLimitBytes": 5000000,
|
|
51
|
+
"rpKeepFilesNum": 3,
|
|
52
|
+
"rpMaxAgeHours": 24
|
|
53
|
+
},
|
|
54
|
+
"TraceBlockFetchClient": false,
|
|
55
|
+
"TraceBlockFetchDecisions": false,
|
|
56
|
+
"TraceBlockFetchProtocol": false,
|
|
57
|
+
"TraceBlockFetchProtocolSerialised": false,
|
|
58
|
+
"TraceBlockFetchServer": false,
|
|
59
|
+
"TraceBlockchainTime": false,
|
|
60
|
+
"TraceChainDb": true,
|
|
61
|
+
"TraceChainSyncClient": false,
|
|
62
|
+
"TraceChainSyncBlockServer": false,
|
|
63
|
+
"TraceChainSyncHeaderServer": false,
|
|
64
|
+
"TraceChainSyncProtocol": false,
|
|
65
|
+
"TraceDNSResolver": true,
|
|
66
|
+
"TraceDNSSubscription": true,
|
|
67
|
+
"TraceErrorPolicy": true,
|
|
68
|
+
"TraceLocalErrorPolicy": true,
|
|
69
|
+
"TraceForge": false,
|
|
70
|
+
"TraceHandshake": false,
|
|
71
|
+
"TraceIpSubscription": true,
|
|
72
|
+
"TraceLocalRootPeers": true,
|
|
73
|
+
"TracePublicRootPeers": true,
|
|
74
|
+
"TracePeerSelection": true,
|
|
75
|
+
"TraceDebugPeerSelection": false,
|
|
76
|
+
"TracePeerSelectionActions": true,
|
|
77
|
+
"TraceConnectionManager": true,
|
|
78
|
+
"TraceServer": true,
|
|
79
|
+
"TraceLocalConnectionManager": false,
|
|
80
|
+
"TraceLocalServer": false,
|
|
81
|
+
"TraceLocalChainSyncProtocol": false,
|
|
82
|
+
"TraceLocalHandshake": false,
|
|
83
|
+
"TraceLocalTxSubmissionProtocol": false,
|
|
84
|
+
"TraceLocalTxSubmissionServer": false,
|
|
85
|
+
"TraceMempool": true,
|
|
86
|
+
"TraceMux": false,
|
|
87
|
+
"TraceTxInbound": false,
|
|
88
|
+
"TraceTxOutbound": false,
|
|
89
|
+
"TraceTxSubmissionProtocol": false,
|
|
90
|
+
"options": {
|
|
91
|
+
"mapBackends": {
|
|
92
|
+
"cardano.node.metrics": [
|
|
93
|
+
"EKGViewBK"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"mapScribes": {
|
|
97
|
+
"cardano.node.metrics": [
|
|
98
|
+
"FileSK::logs/testnet.log"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"mapSeverity": {
|
|
102
|
+
"cardano.node.ChainDB": "Notice",
|
|
103
|
+
"cardano.node.DnsSubscription": "Debug"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"PBftSignatureThreshold": 0.6,
|
|
107
|
+
"TestShelleyHardForkAtEpoch": 0,
|
|
108
|
+
"TestAllegraHardForkAtEpoch": 0,
|
|
109
|
+
"TestMaryHardForkAtEpoch": 0,
|
|
110
|
+
"TestAlonzoHardForkAtEpoch": 0,
|
|
111
|
+
"TestBabbageHardForkAtEpoch": 0,
|
|
112
|
+
"TestEnableDevelopmentNetworkProtocols": true,
|
|
113
|
+
"EnableLogMetrics": false,
|
|
114
|
+
"EnableLogging": true
|
|
115
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardano-sdk/e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "End to end tests for the cardano-js-sdk packages.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.20.2"
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
"load-test-custom:stake-pool-query": "ts-node test/load-test-custom/stake-pool-search/stake-pool-search.test.ts",
|
|
23
23
|
"load-test-custom:wallet-init": "ts-node test/load-test-custom/wallet-init/wallet-init.test.ts",
|
|
24
24
|
"load-test-custom:wallet-restoration": "ts-node test/load-test-custom/wallet-restoration/wallet-restoration.test.ts",
|
|
25
|
-
"test": "
|
|
25
|
+
"test": "echo 'test' command not implemented yet",
|
|
26
26
|
"test:blockfrost": "jest -c jest.config.js --forceExit --selectProjects blockfrost --runInBand --verbose",
|
|
27
27
|
"test:utils": "jest -c jest.config.js --forceExit --selectProjects utils --verbose",
|
|
28
|
-
"test:load-testing": "jest -c jest.config.js --forceExit --selectProjects load-testing --runInBand --verbose",
|
|
29
28
|
"test:long-running": "jest -c jest.config.js --forceExit --selectProjects long-running --runInBand --verbose",
|
|
30
29
|
"test:local-network": "jest -c jest.config.js --forceExit --selectProjects local-network --runInBand --verbose",
|
|
31
30
|
"test:projection": "jest -c jest.config.js --forceExit --selectProjects projection --runInBand --verbose",
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"test:web-extension:watch:run": "yarn test:web-extension:run --watch",
|
|
46
45
|
"test:web-extension:watch": "run-s test:web-extension:build test:web-extension:watch:bg",
|
|
47
46
|
"test:web-extension:watch:bg": "run-p test:web-extension:watch:build test:web-extension:watch:run",
|
|
48
|
-
"local-network:common": "DISABLE_DB_CACHE=${DISABLE_DB_CACHE:-true} USE_BLOCKFROST=false docker compose -p local-network-e2e -f docker-compose.yml -f ../../compose/common.yml $FILES up",
|
|
47
|
+
"local-network:common": "DISABLE_DB_CACHE=${DISABLE_DB_CACHE:-true} SUBMIT_API_ARGS='--testnet-magic 888' USE_BLOCKFROST=false docker compose -p local-network-e2e -f docker-compose.yml -f ../../compose/common.yml $FILES up",
|
|
49
48
|
"local-network:up": "FILES='' yarn local-network:common",
|
|
50
49
|
"local-network:dev": "FILES='-f ../../compose/dev.yml' yarn local-network:common",
|
|
51
50
|
"local-network:profile:up": "FILES='-f ../../compose/pg-agent.yml' yarn local-network:common",
|
|
@@ -57,12 +56,12 @@
|
|
|
57
56
|
"build:esm": "tsc -p src/tsconfig.json --outDir ./dist/esm --module es2020",
|
|
58
57
|
"build:cjs": "tsc --build src",
|
|
59
58
|
"build": "run-s build:cjs build:esm module-fixup",
|
|
60
|
-
"module-fixup": "
|
|
61
|
-
"tscNoEmit": "
|
|
62
|
-
"cleanup:dist": "
|
|
63
|
-
"cleanup:nm": "
|
|
59
|
+
"module-fixup": "cp ../../build/cjs-package.json ./dist/cjs/package.json && cp ../../build/esm-package.json ./dist/esm/package.json",
|
|
60
|
+
"tscNoEmit": "echo typescript --noEmit command not implemented yet",
|
|
61
|
+
"cleanup:dist": "rm -rf dist",
|
|
62
|
+
"cleanup:nm": "rm -rf node_modules",
|
|
64
63
|
"cleanup": "run-s cleanup:dist cleanup:nm",
|
|
65
|
-
"coverage": "yarn test --coverage",
|
|
64
|
+
"coverage": "yarn test --coverage || true",
|
|
66
65
|
"lint": "eslint --ignore-path ../../.eslintignore \"**/*.ts\"",
|
|
67
66
|
"lint:fix": "eslint --fix --ignore-path ../../.eslintignore \"**/*.ts\"",
|
|
68
67
|
"prepack": "yarn build",
|
|
@@ -81,20 +80,20 @@
|
|
|
81
80
|
"dependencies": {
|
|
82
81
|
"@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0",
|
|
83
82
|
"@cardano-ogmios/client": "5.6.0",
|
|
84
|
-
"@cardano-sdk/cardano-services": "~0.
|
|
85
|
-
"@cardano-sdk/cardano-services-client": "~0.
|
|
86
|
-
"@cardano-sdk/core": "~0.
|
|
87
|
-
"@cardano-sdk/crypto": "~0.1.
|
|
88
|
-
"@cardano-sdk/hardware-ledger": "~0.
|
|
89
|
-
"@cardano-sdk/hardware-trezor": "~0.
|
|
90
|
-
"@cardano-sdk/input-selection": "~0.12.
|
|
91
|
-
"@cardano-sdk/key-management": "~0.
|
|
92
|
-
"@cardano-sdk/ogmios": "~0.
|
|
93
|
-
"@cardano-sdk/tx-construction": "~0.
|
|
94
|
-
"@cardano-sdk/util": "~0.14.
|
|
95
|
-
"@cardano-sdk/util-dev": "~0.
|
|
96
|
-
"@cardano-sdk/util-rxjs": "~0.
|
|
97
|
-
"@cardano-sdk/wallet": "~0.
|
|
83
|
+
"@cardano-sdk/cardano-services": "~0.23.0",
|
|
84
|
+
"@cardano-sdk/cardano-services-client": "~0.15.0",
|
|
85
|
+
"@cardano-sdk/core": "~0.22.0",
|
|
86
|
+
"@cardano-sdk/crypto": "~0.1.16",
|
|
87
|
+
"@cardano-sdk/hardware-ledger": "~0.7.0",
|
|
88
|
+
"@cardano-sdk/hardware-trezor": "~0.3.0",
|
|
89
|
+
"@cardano-sdk/input-selection": "~0.12.5",
|
|
90
|
+
"@cardano-sdk/key-management": "~0.15.0",
|
|
91
|
+
"@cardano-sdk/ogmios": "~0.15.0",
|
|
92
|
+
"@cardano-sdk/tx-construction": "~0.15.0",
|
|
93
|
+
"@cardano-sdk/util": "~0.14.3",
|
|
94
|
+
"@cardano-sdk/util-dev": "~0.18.0",
|
|
95
|
+
"@cardano-sdk/util-rxjs": "~0.6.1",
|
|
96
|
+
"@cardano-sdk/wallet": "~0.26.0",
|
|
98
97
|
"@dcspark/cardano-multiplatform-lib-nodejs": "^3.1.1",
|
|
99
98
|
"@vespaiach/axios-fetch-adapter": "^0.3.0",
|
|
100
99
|
"axios": "^0.27.2",
|
|
@@ -124,10 +123,10 @@
|
|
|
124
123
|
"@babel/core": "^7.18.2",
|
|
125
124
|
"@babel/preset-env": "^7.18.2",
|
|
126
125
|
"@babel/preset-typescript": "^7.17.12",
|
|
127
|
-
"@cardano-sdk/dapp-connector": "~0.11.
|
|
128
|
-
"@cardano-sdk/projection": "~0.
|
|
129
|
-
"@cardano-sdk/projection-typeorm": "~0.
|
|
130
|
-
"@cardano-sdk/web-extension": "~0.16.
|
|
126
|
+
"@cardano-sdk/dapp-connector": "~0.11.2",
|
|
127
|
+
"@cardano-sdk/projection": "~0.10.0",
|
|
128
|
+
"@cardano-sdk/projection-typeorm": "~0.7.0",
|
|
129
|
+
"@cardano-sdk/web-extension": "~0.16.4",
|
|
131
130
|
"@dcspark/cardano-multiplatform-lib-browser": "^3.1.1",
|
|
132
131
|
"@emurgo/cardano-message-signing-asmjs": "^1.0.1",
|
|
133
132
|
"@types/bunyan": "^1.8.8",
|
|
@@ -166,7 +165,6 @@
|
|
|
166
165
|
"npm-run-all": "^4.1.5",
|
|
167
166
|
"null-loader": "^4.0.1",
|
|
168
167
|
"readable-stream": "^3.6.0",
|
|
169
|
-
"shx": "^0.3.3",
|
|
170
168
|
"source-map-loader": "^4.0.1",
|
|
171
169
|
"ts-jest": "^28.0.7",
|
|
172
170
|
"typeorm": "^0.3.15",
|
|
@@ -180,5 +178,5 @@
|
|
|
180
178
|
"webpack-cli": "^4.9.2",
|
|
181
179
|
"webpack-merge": "^5.8.0"
|
|
182
180
|
},
|
|
183
|
-
"gitHead": "
|
|
181
|
+
"gitHead": "02a0eff7b7b7a3b98b42fd19b2ae85cfc4e7d87f"
|
|
184
182
|
}
|
package/src/environment.ts
CHANGED
|
@@ -75,9 +75,7 @@ const providerParams = makeValidator((value) => {
|
|
|
75
75
|
return validated;
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Shared across all tests
|
|
80
|
-
*/
|
|
78
|
+
/** Shared across all tests */
|
|
81
79
|
const validators = {
|
|
82
80
|
ADDRESS_DISCOVERY: str({ default: 'HDSequentialDiscovery' }),
|
|
83
81
|
ARRIVAL_PHASE_DURATION_IN_SECS: num(),
|
|
@@ -139,9 +137,7 @@ export const getEnv = <V extends readonly Validator[]>(
|
|
|
139
137
|
[v in V[number]]: Validators[v] extends ValidatorSpec<infer T> ? T : never;
|
|
140
138
|
};
|
|
141
139
|
|
|
142
|
-
/**
|
|
143
|
-
* Collection of all the configuration variables required by `getWallet`
|
|
144
|
-
*/
|
|
140
|
+
/** Collection of all the configuration variables required by `getWallet` */
|
|
145
141
|
export const walletVariables = [
|
|
146
142
|
'ASSET_PROVIDER',
|
|
147
143
|
'ASSET_PROVIDER_PARAMS',
|
package/src/factories.ts
CHANGED
|
@@ -284,10 +284,7 @@ export type GetWalletProps = {
|
|
|
284
284
|
keyAgent?: AsyncKeyAgent;
|
|
285
285
|
};
|
|
286
286
|
|
|
287
|
-
/**
|
|
288
|
-
* Delays initializing tx when nearing the epoch boundary.
|
|
289
|
-
* Relies on system clock being accurate.
|
|
290
|
-
*/
|
|
287
|
+
/** Delays initializing tx when nearing the epoch boundary. Relies on system clock being accurate. */
|
|
291
288
|
const patchInitializeTxToRespectEpochBoundary = <T extends ObservableWallet>(
|
|
292
289
|
wallet: T,
|
|
293
290
|
maxPollInterval: Milliseconds
|
|
@@ -358,7 +355,16 @@ export const getWallet = async (props: GetWalletProps) => {
|
|
|
358
355
|
? () => Promise.resolve(keyAgent)
|
|
359
356
|
: await keyManagementFactory.create(env.KEY_MANAGEMENT_PROVIDER, keyManagementParams, logger),
|
|
360
357
|
createWallet: async (asyncKeyAgent: AsyncKeyAgent) =>
|
|
361
|
-
new PersonalWallet(
|
|
358
|
+
new PersonalWallet(
|
|
359
|
+
{ name, polling },
|
|
360
|
+
{
|
|
361
|
+
...providers,
|
|
362
|
+
addressManager: util.createBip32Ed25519AddressManager(asyncKeyAgent),
|
|
363
|
+
logger,
|
|
364
|
+
stores,
|
|
365
|
+
witnesser: util.createBip32Ed25519Witnesser(asyncKeyAgent)
|
|
366
|
+
}
|
|
367
|
+
),
|
|
362
368
|
logger
|
|
363
369
|
});
|
|
364
370
|
|
package/src/measurement-util.ts
CHANGED
|
@@ -28,10 +28,7 @@ export type MeasurementResults<T extends string> = Record<T, MeasurementData>;
|
|
|
28
28
|
export class MeasurementUtil<T extends string> {
|
|
29
29
|
#performanceObserver: PerformanceObserver;
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Starts observing performance measurements.
|
|
33
|
-
* Must be called before adding markers.
|
|
34
|
-
*/
|
|
31
|
+
/** Starts observing performance measurements. Must be called before adding markers. */
|
|
35
32
|
start(): void {
|
|
36
33
|
this.#performanceObserver = new PerformanceObserver(() => {
|
|
37
34
|
/* just an empty callback because we don't want to do anything when markers are added */
|
|
@@ -3,9 +3,7 @@ import { Pool, QueryResult } from 'pg';
|
|
|
3
3
|
|
|
4
4
|
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Waits until the local network is ready or the wait time expires.
|
|
8
|
-
*/
|
|
6
|
+
/** Waits until the local network is ready or the wait time expires. */
|
|
9
7
|
(async () => {
|
|
10
8
|
const { DB_SYNC_CONNECTION_STRING, LOCAL_NETWORK_READY_WAIT_TIME } = process.env;
|
|
11
9
|
|
package/src/scripts/mnemonic.ts
CHANGED
|
@@ -4,9 +4,7 @@ import * as Crypto from '@cardano-sdk/crypto';
|
|
|
4
4
|
import { AddressType, InMemoryKeyAgent, util } from '@cardano-sdk/key-management';
|
|
5
5
|
import { localNetworkChainId } from '../util';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Generates a new set of Mnemonic words and prints them to the console.
|
|
9
|
-
*/
|
|
7
|
+
/** Generates a new set of Mnemonic words and prints them to the console. */
|
|
10
8
|
(async () => {
|
|
11
9
|
let mnemonic = '';
|
|
12
10
|
const mnemonicArray = util.generateMnemonicWords();
|
|
@@ -6,9 +6,7 @@ export enum Paths {
|
|
|
6
6
|
WalletUtxos = 'utxos'
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Functions to create/delete and read/write files and folders.
|
|
11
|
-
*/
|
|
9
|
+
/** Functions to create/delete and read/write files and folders. */
|
|
12
10
|
export const Files = {
|
|
13
11
|
/**
|
|
14
12
|
* This method is intended to concatenate individual strings into a single string that represents a file path.
|
|
@@ -2,9 +2,7 @@ import chalk from 'chalk';
|
|
|
2
2
|
import cliSpinners from 'cli-spinners';
|
|
3
3
|
import ora from 'ora';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* The task result.
|
|
7
|
-
*/
|
|
5
|
+
/** The task result. */
|
|
8
6
|
export enum TaskResult {
|
|
9
7
|
Success = 0,
|
|
10
8
|
Fail = 1,
|
|
@@ -13,9 +11,7 @@ export enum TaskResult {
|
|
|
13
11
|
None = 4
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
/**
|
|
17
|
-
* Tracks progress of tasks in the terminal.
|
|
18
|
-
*/
|
|
14
|
+
/** Tracks progress of tasks in the terminal. */
|
|
19
15
|
export class TerminalProgressMonitor {
|
|
20
16
|
#currentTask: ora.Ora | null = null;
|
|
21
17
|
|
|
@@ -249,9 +249,7 @@ export const logState = async (
|
|
|
249
249
|
*/
|
|
250
250
|
export const randomFromInterval = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1) + min);
|
|
251
251
|
|
|
252
|
-
/**
|
|
253
|
-
* Creates a folder name using a timestamp.
|
|
254
|
-
*/
|
|
252
|
+
/** Creates a folder name using a timestamp. */
|
|
255
253
|
export const getOutputPathName = () =>
|
|
256
254
|
new Date().toISOString().replace(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).*/, '$1_$2_$3_$4_$5_$6');
|
|
257
255
|
|
|
@@ -9,19 +9,13 @@ import { stakePoolHttpProvider } from '@cardano-sdk/cardano-services-client';
|
|
|
9
9
|
* Hooks must record here the state of the session of current artillery virtual user
|
|
10
10
|
*/
|
|
11
11
|
interface StakePoolSearchVars extends Paginated<Cardano.StakePool> {
|
|
12
|
-
/**
|
|
13
|
-
* The arguments used for the query; to repeat the same query, but next page, on next iteration
|
|
14
|
-
*/
|
|
12
|
+
/** The arguments used for the query; to repeat the same query, but next page, on next iteration */
|
|
15
13
|
args: QueryStakePoolsArgs;
|
|
16
14
|
|
|
17
|
-
/**
|
|
18
|
-
* `performQuery()` stores here if it gets an error from the query to let `moreResults()` knows when exit on error
|
|
19
|
-
*/
|
|
15
|
+
/** `performQuery()` stores here if it gets an error from the query to let `moreResults()` knows when exit on error */
|
|
20
16
|
gotError?: boolean;
|
|
21
17
|
|
|
22
|
-
/**
|
|
23
|
-
* The result of the health check performed at the beginning of virtual user session
|
|
24
|
-
*/
|
|
18
|
+
/** The result of the health check performed at the beginning of virtual user session */
|
|
25
19
|
healthCheckResult: boolean;
|
|
26
20
|
}
|
|
27
21
|
|
|
@@ -30,15 +24,10 @@ const provider = stakePoolHttpProvider({ baseUrl: env.STAKE_POOL_PROVIDER_URL, l
|
|
|
30
24
|
|
|
31
25
|
const PAGE_SIZE = 20;
|
|
32
26
|
|
|
33
|
-
/**
|
|
34
|
-
* The set of pools id found while getting results
|
|
35
|
-
*/
|
|
27
|
+
/** The set of pools id found while getting results */
|
|
36
28
|
const poolIds: Cardano.PoolId[] = [];
|
|
37
29
|
|
|
38
|
-
/**
|
|
39
|
-
* The artillery uid of the first artillery virtual user.
|
|
40
|
-
* Used to track time of first request to measure cache efficiency
|
|
41
|
-
*/
|
|
30
|
+
/** The artillery uid of the first artillery virtual user. Used to track time of first request to measure cache efficiency */
|
|
42
31
|
let firstUser = '';
|
|
43
32
|
|
|
44
33
|
/**
|