@cardano-sdk/e2e 0.30.0 → 0.31.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/docker-compose.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardano-sdk/e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "End to end tests for the cardano-js-sdk packages.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.20.2"
|
|
@@ -80,20 +80,20 @@
|
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0",
|
|
82
82
|
"@cardano-ogmios/client": "5.6.0",
|
|
83
|
-
"@cardano-sdk/cardano-services": "~0.
|
|
84
|
-
"@cardano-sdk/cardano-services-client": "~0.16.
|
|
83
|
+
"@cardano-sdk/cardano-services": "~0.25.0",
|
|
84
|
+
"@cardano-sdk/cardano-services-client": "~0.16.6",
|
|
85
85
|
"@cardano-sdk/core": "~0.23.1",
|
|
86
86
|
"@cardano-sdk/crypto": "~0.1.19",
|
|
87
|
-
"@cardano-sdk/hardware-ledger": "~0.8.
|
|
88
|
-
"@cardano-sdk/hardware-trezor": "~0.4.
|
|
89
|
-
"@cardano-sdk/input-selection": "~0.12.
|
|
90
|
-
"@cardano-sdk/key-management": "~0.
|
|
91
|
-
"@cardano-sdk/ogmios": "~0.15.
|
|
92
|
-
"@cardano-sdk/tx-construction": "~0.17.
|
|
87
|
+
"@cardano-sdk/hardware-ledger": "~0.8.6",
|
|
88
|
+
"@cardano-sdk/hardware-trezor": "~0.4.6",
|
|
89
|
+
"@cardano-sdk/input-selection": "~0.12.13",
|
|
90
|
+
"@cardano-sdk/key-management": "~0.19.0",
|
|
91
|
+
"@cardano-sdk/ogmios": "~0.15.8",
|
|
92
|
+
"@cardano-sdk/tx-construction": "~0.17.3",
|
|
93
93
|
"@cardano-sdk/util": "~0.14.5",
|
|
94
|
-
"@cardano-sdk/util-dev": "~0.19.
|
|
95
|
-
"@cardano-sdk/util-rxjs": "~0.6.
|
|
96
|
-
"@cardano-sdk/wallet": "~0.
|
|
94
|
+
"@cardano-sdk/util-dev": "~0.19.6",
|
|
95
|
+
"@cardano-sdk/util-rxjs": "~0.6.9",
|
|
96
|
+
"@cardano-sdk/wallet": "~0.30.0",
|
|
97
97
|
"@dcspark/cardano-multiplatform-lib-nodejs": "^3.1.1",
|
|
98
98
|
"@vespaiach/axios-fetch-adapter": "^0.3.0",
|
|
99
99
|
"axios": "^0.27.2",
|
|
@@ -124,9 +124,9 @@
|
|
|
124
124
|
"@babel/preset-env": "^7.18.2",
|
|
125
125
|
"@babel/preset-typescript": "^7.17.12",
|
|
126
126
|
"@cardano-sdk/dapp-connector": "~0.12.2",
|
|
127
|
-
"@cardano-sdk/projection": "~0.10.
|
|
128
|
-
"@cardano-sdk/projection-typeorm": "~0.
|
|
129
|
-
"@cardano-sdk/web-extension": "~0.
|
|
127
|
+
"@cardano-sdk/projection": "~0.10.8",
|
|
128
|
+
"@cardano-sdk/projection-typeorm": "~0.8.0",
|
|
129
|
+
"@cardano-sdk/web-extension": "~0.22.0",
|
|
130
130
|
"@dcspark/cardano-multiplatform-lib-browser": "^3.1.1",
|
|
131
131
|
"@emurgo/cardano-message-signing-asmjs": "^1.0.1",
|
|
132
132
|
"@types/bunyan": "^1.8.8",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"webpack-cli": "^4.9.2",
|
|
180
180
|
"webpack-merge": "^5.8.0"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "69e4fe9f69a5354208d3f02c9829b4a0feb689b1"
|
|
183
183
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
WalletManagerActivateProps,
|
|
7
7
|
WalletRepository,
|
|
8
8
|
WalletType,
|
|
9
|
-
|
|
9
|
+
consumeSigningCoordinatorApi,
|
|
10
10
|
exposeApi,
|
|
11
11
|
observableWalletProperties,
|
|
12
12
|
repositoryChannel,
|
|
@@ -38,7 +38,7 @@ export interface WalletFactoryDependencies {
|
|
|
38
38
|
* @param accountIndex The account index to get the name from.
|
|
39
39
|
* @private
|
|
40
40
|
*/
|
|
41
|
-
const getWalletName = (wallet: AnyWallet<Metadata>, accountIndex?: number): string => {
|
|
41
|
+
const getWalletName = (wallet: AnyWallet<Metadata, Metadata>, accountIndex?: number): string => {
|
|
42
42
|
let name = '';
|
|
43
43
|
switch (wallet.type) {
|
|
44
44
|
case WalletType.InMemory:
|
|
@@ -68,10 +68,10 @@ const getWalletName = (wallet: AnyWallet<Metadata>, accountIndex?: number): stri
|
|
|
68
68
|
* to construct providers for different networks.
|
|
69
69
|
* Please check its documentation for examples.
|
|
70
70
|
*/
|
|
71
|
-
const walletFactory: WalletFactory<Metadata> = {
|
|
71
|
+
const walletFactory: WalletFactory<Metadata, Metadata> = {
|
|
72
72
|
create: async (
|
|
73
73
|
props: WalletManagerActivateProps,
|
|
74
|
-
wallet: AnyWallet<Metadata>,
|
|
74
|
+
wallet: AnyWallet<Metadata, Metadata>,
|
|
75
75
|
{ witnesser, stores }: WalletFactoryDependencies
|
|
76
76
|
) =>
|
|
77
77
|
(
|
|
@@ -89,20 +89,20 @@ const storesFactory: StoresFactory = {
|
|
|
89
89
|
create: ({ name }) => storage.createPouchDbWalletStores(name, { logger })
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
const walletRepository = new WalletRepository<Metadata>({
|
|
92
|
+
const walletRepository = new WalletRepository<Metadata, Metadata>({
|
|
93
93
|
logger,
|
|
94
94
|
store: new storage.InMemoryCollectionStore()
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
const
|
|
97
|
+
const signingCoordinatorApi = consumeSigningCoordinatorApi({ logger, runtime });
|
|
98
98
|
|
|
99
|
-
const walletManager = new WalletManager<Metadata>(
|
|
99
|
+
const walletManager = new WalletManager<Metadata, Metadata>(
|
|
100
100
|
{ name: walletName },
|
|
101
101
|
{
|
|
102
102
|
logger,
|
|
103
103
|
managerStorage: WebExtensionStorage.local,
|
|
104
104
|
runtime,
|
|
105
|
-
|
|
105
|
+
signingCoordinatorApi,
|
|
106
106
|
storesFactory,
|
|
107
107
|
walletFactory,
|
|
108
108
|
walletRepository
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from './util';
|
|
10
10
|
import {
|
|
11
11
|
RemoteApiPropertyType,
|
|
12
|
-
|
|
12
|
+
SigningCoordinator,
|
|
13
13
|
WalletType,
|
|
14
14
|
consumeRemoteApi,
|
|
15
15
|
consumeSupplyDistributionTracker,
|
|
16
16
|
createKeyAgentFactory,
|
|
17
17
|
exposeApi,
|
|
18
|
-
|
|
18
|
+
exposeSigningCoordinatorApi,
|
|
19
19
|
observableWalletProperties,
|
|
20
20
|
repositoryChannel,
|
|
21
21
|
walletChannel,
|
|
@@ -210,7 +210,7 @@ const cleanupMultidelegationInfo = (multiDelegationDiv: Element) => {
|
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
|
|
213
|
-
const
|
|
213
|
+
const signingCoordinator = new SigningCoordinator(
|
|
214
214
|
{
|
|
215
215
|
hwOptions: {
|
|
216
216
|
communicationType: CommunicationType.Web,
|
|
@@ -231,7 +231,7 @@ const signerManager = new SignerManager(
|
|
|
231
231
|
const passphraseByteArray = Uint8Array.from(
|
|
232
232
|
env.KEY_MANAGEMENT_PARAMS.passphrase.split('').map((letter) => letter.charCodeAt(0))
|
|
233
233
|
);
|
|
234
|
-
merge(
|
|
234
|
+
merge(signingCoordinator.signDataRequest$, signingCoordinator.transactionWitnessRequest$).subscribe((req) => {
|
|
235
235
|
logger.info('Sign request', req);
|
|
236
236
|
if (req.walletType === WalletType.InMemory) {
|
|
237
237
|
void req.sign(new Uint8Array(passphraseByteArray));
|
|
@@ -244,9 +244,9 @@ merge(signerManager.signDataRequest$, signerManager.transactionWitnessRequest$).
|
|
|
244
244
|
// Setup
|
|
245
245
|
|
|
246
246
|
// Expose local objects.
|
|
247
|
-
|
|
247
|
+
exposeSigningCoordinatorApi(
|
|
248
248
|
{
|
|
249
|
-
|
|
249
|
+
signingCoordinator
|
|
250
250
|
},
|
|
251
251
|
{ logger, runtime }
|
|
252
252
|
);
|
|
@@ -318,6 +318,7 @@ const createWalletIfNotExistsAndActivate = async (accountIndex: number) => {
|
|
|
318
318
|
rootPrivateKeyBytes: HexBlob.fromBytes(new Uint8Array(encryptedRootPrivateKey))
|
|
319
319
|
},
|
|
320
320
|
extendedAccountPublicKey: keyAgent.serializableData.extendedAccountPublicKey,
|
|
321
|
+
metadata: {},
|
|
321
322
|
type: WalletType.InMemory
|
|
322
323
|
});
|
|
323
324
|
await repository.addAccount({
|