@midnight-ntwrk/wallet-sdk-shielded 2.0.0-rc.3 → 2.0.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/dist/ShieldedWallet.js +1 -1
- package/dist/index.js +1 -1
- package/dist/v1/CoreWallet.js +1 -1
- package/dist/v1/Serialization.js +1 -1
- package/dist/v1/Simulator.js +1 -1
- package/dist/v1/Sync.d.ts +1 -0
- package/dist/v1/Sync.js +2 -2
- package/dist/v1/Transacting.js +1 -1
- package/dist/v1/TransactionImbalances.js +1 -1
- package/dist/v1/TransactionOps.js +1 -1
- package/dist/v1/V1Builder.js +1 -1
- package/dist/v1/WalletError.js +1 -1
- package/dist/v1/index.js +1 -1
- package/package.json +10 -35
package/dist/ShieldedWallet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/CoreWallet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/Serialization.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/Simulator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/Sync.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface SyncCapability<TState, TUpdate> {
|
|
|
13
13
|
export type IndexerClientConnection = {
|
|
14
14
|
indexerHttpUrl: string;
|
|
15
15
|
indexerWsUrl?: string;
|
|
16
|
+
keepAlive?: number;
|
|
16
17
|
};
|
|
17
18
|
export type DefaultSyncConfiguration = {
|
|
18
19
|
indexerClientConnection: IndexerClientConnection;
|
package/dist/v1/Sync.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
|
@@ -98,7 +98,7 @@ export const makeEventsSyncService = (config) => {
|
|
|
98
98
|
const indexerWsUrl = indexerWsUrlResult.right;
|
|
99
99
|
const appliedIndex = state.progress?.appliedIndex ?? 0n;
|
|
100
100
|
const batchSize = config.batchSize ?? 10;
|
|
101
|
-
return pipe(ZswapEvents.run({ id: Number(appliedIndex) }), Stream.provideLayer(WsSubscriptionClient.layer({ url: indexerWsUrl })), Stream.mapError((error) => new SyncWalletError(error)), Stream.mapEffect((subscription) => pipe(subscription.zswapLedgerEvents, Schema.decodeUnknownEither(EventsSyncUpdateFromPayload), Either.mapLeft((err) => new SyncWalletError(err)), EitherOps.toEffect)), Stream.groupedWithin(batchSize, Duration.millis(1)), Stream.map(Chunk.toArray), Stream.map((data) => WalletSyncUpdate.create(data, secretKeys)), Stream.schedule(Schedule.spaced(Duration.millis(4))));
|
|
101
|
+
return pipe(ZswapEvents.run({ id: Number(appliedIndex) }), Stream.provideLayer(WsSubscriptionClient.layer({ url: indexerWsUrl, keepAlive: config.indexerClientConnection.keepAlive })), Stream.mapError((error) => new SyncWalletError(error)), Stream.mapEffect((subscription) => pipe(subscription.zswapLedgerEvents, Schema.decodeUnknownEither(EventsSyncUpdateFromPayload), Either.mapLeft((err) => new SyncWalletError(err)), EitherOps.toEffect)), Stream.groupedWithin(batchSize, Duration.millis(1)), Stream.map(Chunk.toArray), Stream.map((data) => WalletSyncUpdate.create(data, secretKeys)), Stream.schedule(Schedule.spaced(Duration.millis(4))));
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
104
|
};
|
package/dist/v1/Transacting.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/V1Builder.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/WalletError.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/dist/v1/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
-
// Copyright (C)
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// You may not use this file except in compliance with the License.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnight-ntwrk/wallet-sdk-shielded",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -28,20 +28,15 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@midnight-ntwrk/ledger-v7": "7.0.
|
|
32
|
-
"@midnight-ntwrk/wallet-sdk-abstractions": "2.0.0
|
|
33
|
-
"@midnight-ntwrk/wallet-sdk-address-format": "3.0.
|
|
34
|
-
"@midnight-ntwrk/wallet-sdk-capabilities": "3.1.0
|
|
35
|
-
"@midnight-ntwrk/wallet-sdk-indexer-client": "1.1.0
|
|
36
|
-
"@midnight-ntwrk/wallet-sdk-runtime": "1.0.1
|
|
37
|
-
"@midnight-ntwrk/wallet-sdk-utilities": "1.0.1
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"isomorphic-ws": "^5.0.0",
|
|
41
|
-
"node-fetch": "3.3.2",
|
|
42
|
-
"rxjs": "^7.5",
|
|
43
|
-
"scale-ts": "^1.1.0",
|
|
44
|
-
"ws": "^8.18.3"
|
|
31
|
+
"@midnight-ntwrk/ledger-v7": "^7.0.2",
|
|
32
|
+
"@midnight-ntwrk/wallet-sdk-abstractions": "2.0.0",
|
|
33
|
+
"@midnight-ntwrk/wallet-sdk-address-format": "3.0.1",
|
|
34
|
+
"@midnight-ntwrk/wallet-sdk-capabilities": "3.1.0",
|
|
35
|
+
"@midnight-ntwrk/wallet-sdk-indexer-client": "1.1.0",
|
|
36
|
+
"@midnight-ntwrk/wallet-sdk-runtime": "1.0.1",
|
|
37
|
+
"@midnight-ntwrk/wallet-sdk-utilities": "1.0.1",
|
|
38
|
+
"effect": "^3.19.19",
|
|
39
|
+
"rxjs": "^7.8.2"
|
|
45
40
|
},
|
|
46
41
|
"scripts": {
|
|
47
42
|
"typecheck": "tsc -b ./tsconfig.json --noEmit --force",
|
|
@@ -53,25 +48,5 @@
|
|
|
53
48
|
"dist:publish": "tsc -b ./tsconfig.publish.json",
|
|
54
49
|
"clean": "rimraf --glob dist 'tsconfig.*.tsbuildinfo' && date +%s > .clean-timestamp",
|
|
55
50
|
"publint": "publint --strict"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@effect/cluster": "^0.46.2",
|
|
59
|
-
"@effect/experimental": "^0.54.2",
|
|
60
|
-
"@effect/platform": "^0.90.0",
|
|
61
|
-
"@effect/platform-node": "^0.94.0",
|
|
62
|
-
"@effect/rpc": "^0.68.0",
|
|
63
|
-
"@effect/sql": "^0.44.0",
|
|
64
|
-
"@effect/workflow": "^0.8.1",
|
|
65
|
-
"@midnight-ntwrk/wallet-sdk-prover-client": "1.1.0-rc.3",
|
|
66
|
-
"@polkadot/types": "^16.4.1",
|
|
67
|
-
"eslint": "^9.37.0",
|
|
68
|
-
"fast-check": "^4.2.0",
|
|
69
|
-
"prettier": "^3.7.0",
|
|
70
|
-
"publint": "~0.3.14",
|
|
71
|
-
"rimraf": "^6.0.1",
|
|
72
|
-
"testcontainers": "^11.10.0",
|
|
73
|
-
"to-words": "^4.5.1",
|
|
74
|
-
"typescript": "^5.9.3",
|
|
75
|
-
"vitest": "^4.0.16"
|
|
76
51
|
}
|
|
77
52
|
}
|