@midnightntwrk/wallet-sdk-capabilities 4.0.0-rc.1 → 4.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/README.md +10 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/liveness/livenessReads.js +11 -10
- package/dist/liveness/livenessService.js +4 -5
- package/dist/proving/index.d.ts +1 -0
- package/dist/proving/index.js +1 -0
- package/dist/proving/provingService.d.ts +16 -49
- package/dist/proving/provingService.js +1 -89
- package/dist/proving/v8ProvingService.d.ts +34 -7
- package/dist/proving/v8ProvingService.js +36 -6
- package/dist/proving/v9ProvingService.d.ts +108 -0
- package/dist/proving/v9ProvingService.js +146 -0
- package/dist/proving/versionedProving.d.ts +22 -4
- package/dist/proving/versionedProving.js +28 -2
- package/dist/signatures/v8Signatures.d.ts +1 -1
- package/dist/simulation/index.d.ts +4 -6
- package/dist/simulation/index.js +4 -7
- package/dist/simulation/v8/Simulator.d.ts +1 -3
- package/dist/simulation/v8/Simulator.js +1 -3
- package/dist/simulation/v8/SimulatorState.d.ts +1 -10
- package/dist/simulation/v8/SimulatorState.js +1 -9
- package/dist/simulation/v8/index.d.ts +1 -1
- package/dist/simulation/v8/index.js +1 -1
- package/dist/simulation/v9/Simulator.d.ts +0 -2
- package/dist/simulation/v9/Simulator.js +0 -2
- package/dist/simulation/v9/SimulatorState.d.ts +0 -9
- package/dist/simulation/v9/SimulatorState.js +0 -8
- package/dist/simulation/v9/index.d.ts +1 -1
- package/dist/simulation/v9/index.js +1 -1
- package/dist/submission/submissionService.d.ts +57 -9
- package/dist/submission/submissionService.js +61 -15
- package/dist/transactionLifecycle/SnapshotFormat.d.ts +51 -0
- package/dist/transactionLifecycle/SnapshotFormat.js +120 -0
- package/dist/transactionLifecycle/index.d.ts +4 -0
- package/dist/{pendingTransactions → transactionLifecycle}/index.js +4 -2
- package/dist/transactionLifecycle/lifecycle.d.ts +402 -0
- package/dist/transactionLifecycle/lifecycle.js +407 -0
- package/dist/transactionLifecycle/lifecycleService.d.ts +448 -0
- package/dist/transactionLifecycle/lifecycleService.js +350 -0
- package/dist/transactionLifecycle/transactionTraits.d.ts +106 -0
- package/dist/transactionLifecycle/transactionTraits.js +53 -0
- package/dist/validation/blockData.d.ts +23 -4
- package/dist/validation/blockData.js +34 -10
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +1 -0
- package/dist/validation/promiseBoundary.d.ts +10 -0
- package/dist/validation/promiseBoundary.js +30 -0
- package/dist/validation/v8ValidationService.d.ts +6 -5
- package/dist/validation/v8ValidationService.js +11 -4
- package/dist/validation/v9ValidationService.d.ts +30 -0
- package/dist/validation/v9ValidationService.js +61 -0
- package/dist/validation/validationService.d.ts +54 -32
- package/dist/validation/validationService.js +29 -49
- package/dist/validation/versionedValidation.d.ts +5 -3
- package/dist/validation/versionedValidation.js +5 -3
- package/package.json +12 -12
- package/dist/pendingTransactions/index.d.ts +0 -2
- package/dist/pendingTransactions/pendingTransactions.d.ts +0 -266
- package/dist/pendingTransactions/pendingTransactions.js +0 -302
- package/dist/pendingTransactions/pendingTransactionsService.d.ts +0 -108
- package/dist/pendingTransactions/pendingTransactionsService.js +0 -186
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// You may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import { Cause, Effect, Exit, Option } from 'effect';
|
|
14
|
+
/**
|
|
15
|
+
* Rejects a promise with the typed failure itself rather than the fiber wrapper around it, so a caller can `catch` the
|
|
16
|
+
* error class the signature names.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* `E extends Error` is what makes that rejection legitimate rather than a thrown bare value, and every failure on this
|
|
20
|
+
* surface is a `Data.TaggedError`, which is one.
|
|
21
|
+
*/
|
|
22
|
+
export const runPromiseThrowingFailure = async (effect) => {
|
|
23
|
+
const exit = await Effect.runPromiseExit(effect);
|
|
24
|
+
if (Exit.isSuccess(exit))
|
|
25
|
+
return exit.value;
|
|
26
|
+
const failure = Cause.failureOption(exit.cause);
|
|
27
|
+
if (Option.isSome(failure))
|
|
28
|
+
throw failure.value;
|
|
29
|
+
throw new Error(Cause.pretty(exit.cause));
|
|
30
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as ledger from '@
|
|
2
|
-
import type { V8UnboundTransaction } from '../proving/v8ProvingService.js';
|
|
1
|
+
import * as ledger from '@midnightntwrk/ledger-v8';
|
|
2
|
+
import type { V8UnboundTransaction, V8UnprovenTransaction } from '../proving/v8ProvingService.js';
|
|
3
3
|
import { type AnyLedgerParameters, type ValidationServiceDependencies, type ValidationServiceEffect, type WellFormedCheck } from './validationService.js';
|
|
4
4
|
/**
|
|
5
5
|
* Every ledger-v8 transaction shape well-formedness can be asked about — the ledger-v8 counterpart of
|
|
6
6
|
* `AnyV9ValidatableTransaction`, and a genuinely different type from it: these are the other ledger version's classes,
|
|
7
7
|
* and neither ledger can read the other's.
|
|
8
8
|
*/
|
|
9
|
-
export type AnyV8ValidatableTransaction = ledger.FinalizedTransaction | V8UnboundTransaction |
|
|
9
|
+
export type AnyV8ValidatableTransaction = ledger.FinalizedTransaction | V8UnboundTransaction | V8UnprovenTransaction;
|
|
10
10
|
/**
|
|
11
11
|
* The ledger-v8's well-formedness check.
|
|
12
12
|
*
|
|
@@ -15,14 +15,15 @@ export type AnyV8ValidatableTransaction = ledger.FinalizedTransaction | V8Unboun
|
|
|
15
15
|
* not the steps, that make this a separate check: a ledger-v8 transaction cannot be handed to ledger-v9's
|
|
16
16
|
* `wellFormed`, nor ledger-v9 parameters to this one.
|
|
17
17
|
*/
|
|
18
|
-
export declare const v8WellFormedCheck: WellFormedCheck<AnyV8ValidatableTransaction,
|
|
18
|
+
export declare const v8WellFormedCheck: WellFormedCheck<AnyV8ValidatableTransaction, ledger.LedgerParameters>;
|
|
19
19
|
/**
|
|
20
20
|
* Builds the validator for ledger-v8 transactions.
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
23
|
* Registered below the fork version by `makeDefaultValidationServices`, against a block-data fetcher whose codec
|
|
24
24
|
* registry is split at the same version — so a block reported from before the boundary reaches this validator as
|
|
25
|
-
* ledger-v8 parameters, which is the only kind its ledger version can build a state from.
|
|
25
|
+
* ledger-v8 parameters, which is the only kind its ledger version can build a state from. Once the chain's latest
|
|
26
|
+
* block is past the boundary, the fetcher yields ledger-v9's instead, and this validator refuses them.
|
|
26
27
|
* @param deps The network, clock, and the block-data fetcher, which decodes each block at the version it reports.
|
|
27
28
|
* @returns A validator to register in a `ValidationServices` registry for the version range before the v9 fork.
|
|
28
29
|
*/
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
-
import * as ledger from '@
|
|
14
|
-
import {
|
|
13
|
+
import * as ledger from '@midnightntwrk/ledger-v8';
|
|
14
|
+
import { Either } from 'effect';
|
|
15
|
+
import { LedgerParametersMismatchError, makeValidationServiceEffect, } from './validationService.js';
|
|
15
16
|
const buildStrictness = (flags) => {
|
|
16
17
|
const strictness = new ledger.WellFormedStrictness();
|
|
17
18
|
strictness.enforceBalancing = flags.enforceBalancing;
|
|
@@ -35,14 +36,20 @@ const buildBlankLedgerState = (networkId, parameters) => {
|
|
|
35
36
|
export const v8WellFormedCheck = (tx, { networkId, ledgerParameters, flags, now }) => {
|
|
36
37
|
tx.wellFormed(buildBlankLedgerState(networkId, ledgerParameters), buildStrictness(flags), now);
|
|
37
38
|
};
|
|
39
|
+
const v8LedgerParameters = (parameters) => parameters instanceof ledger.LedgerParameters
|
|
40
|
+
? Either.right(parameters)
|
|
41
|
+
: Either.left(new LedgerParametersMismatchError({
|
|
42
|
+
message: "ledger-v8's validator was handed another ledger version's parameters; it checks transactions only against ledger-v8's.",
|
|
43
|
+
}));
|
|
38
44
|
/**
|
|
39
45
|
* Builds the validator for ledger-v8 transactions.
|
|
40
46
|
*
|
|
41
47
|
* @remarks
|
|
42
48
|
* Registered below the fork version by `makeDefaultValidationServices`, against a block-data fetcher whose codec
|
|
43
49
|
* registry is split at the same version — so a block reported from before the boundary reaches this validator as
|
|
44
|
-
* ledger-v8 parameters, which is the only kind its ledger version can build a state from.
|
|
50
|
+
* ledger-v8 parameters, which is the only kind its ledger version can build a state from. Once the chain's latest
|
|
51
|
+
* block is past the boundary, the fetcher yields ledger-v9's instead, and this validator refuses them.
|
|
45
52
|
* @param deps The network, clock, and the block-data fetcher, which decodes each block at the version it reports.
|
|
46
53
|
* @returns A validator to register in a `ValidationServices` registry for the version range before the v9 fork.
|
|
47
54
|
*/
|
|
48
|
-
export const makeV8ValidationServiceEffect = (deps) => makeValidationServiceEffect(v8WellFormedCheck, deps);
|
|
55
|
+
export const makeV8ValidationServiceEffect = (deps) => makeValidationServiceEffect(v8WellFormedCheck, v8LedgerParameters, deps);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as ledger from '@midnightntwrk/ledger-v9';
|
|
2
|
+
import type { V9UnboundTransaction, V9UnprovenTransaction } from '../proving/v9ProvingService.js';
|
|
3
|
+
import { type AnyLedgerParameters, type ValidationService, type ValidationServiceDependencies, type ValidationServiceEffect, type WellFormedCheck } from './validationService.js';
|
|
4
|
+
/**
|
|
5
|
+
* Every ledger-v9 transaction shape well-formedness can be asked about — the ledger-v9 counterpart of
|
|
6
|
+
* `AnyV8ValidatableTransaction`, and a genuinely different type from it: these are the other ledger version's classes,
|
|
7
|
+
* and neither ledger can read the other's.
|
|
8
|
+
*/
|
|
9
|
+
export type AnyV9ValidatableTransaction = ledger.FinalizedTransaction | V9UnboundTransaction | V9UnprovenTransaction;
|
|
10
|
+
/** The ledger-v9's well-formedness check. */
|
|
11
|
+
export declare const v9WellFormedCheck: WellFormedCheck<AnyV9ValidatableTransaction, ledger.LedgerParameters>;
|
|
12
|
+
/**
|
|
13
|
+
* Builds the validator for ledger-v9 transactions.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Registered from the fork version by `makeDefaultValidationServices`, against a block-data fetcher whose codec
|
|
17
|
+
* registry is split at the same version — so a block reported from the boundary reaches this validator as ledger-v9
|
|
18
|
+
* parameters, which is the only kind its ledger version can build a state from. While the chain's latest block is
|
|
19
|
+
* below the boundary, the fetcher yields ledger-v8's instead, and this validator refuses them.
|
|
20
|
+
* @param deps The network, clock, and the block-data fetcher, which decodes each block at the version it reports.
|
|
21
|
+
* @returns A validator to register in a `ValidationServices` registry for the version range from the v9 fork.
|
|
22
|
+
*/
|
|
23
|
+
export declare const makeV9ValidationServiceEffect: (deps: ValidationServiceDependencies<AnyLedgerParameters>) => ValidationServiceEffect<AnyV9ValidatableTransaction, AnyLedgerParameters>;
|
|
24
|
+
/**
|
|
25
|
+
* The promise-facing surface of {@link makeV9ValidationServiceEffect}, rejecting with the typed failure itself.
|
|
26
|
+
*
|
|
27
|
+
* @param deps The network, clock, and the block-data fetcher, which decodes each block at the version it reports.
|
|
28
|
+
* @returns A validator for ledger-v9 transactions.
|
|
29
|
+
*/
|
|
30
|
+
export declare const makeV9ValidationService: (deps: ValidationServiceDependencies<AnyLedgerParameters>) => ValidationService<AnyV9ValidatableTransaction, AnyLedgerParameters>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// This file is part of MIDNIGHT-WALLET-SDK.
|
|
2
|
+
// Copyright (C) Midnight Foundation
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
// You may not use this file except in compliance with the License.
|
|
6
|
+
// You may obtain a copy of the License at
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
import * as ledger from '@midnightntwrk/ledger-v9';
|
|
14
|
+
import { Either } from 'effect';
|
|
15
|
+
import { runPromiseThrowingFailure } from './promiseBoundary.js';
|
|
16
|
+
import { LedgerParametersMismatchError, makeValidationServiceEffect, } from './validationService.js';
|
|
17
|
+
const buildStrictness = (flags) => {
|
|
18
|
+
const strictness = new ledger.WellFormedStrictness();
|
|
19
|
+
strictness.enforceBalancing = flags.enforceBalancing;
|
|
20
|
+
strictness.verifySignatures = flags.verifySignatures;
|
|
21
|
+
strictness.enforceLimits = flags.enforceLimits;
|
|
22
|
+
return strictness;
|
|
23
|
+
};
|
|
24
|
+
const buildBlankLedgerState = (networkId, parameters) => {
|
|
25
|
+
const state = ledger.LedgerState.blank(networkId);
|
|
26
|
+
state.parameters = parameters;
|
|
27
|
+
return state;
|
|
28
|
+
};
|
|
29
|
+
/** The ledger-v9's well-formedness check. */
|
|
30
|
+
export const v9WellFormedCheck = (tx, { networkId, ledgerParameters, flags, now }) => {
|
|
31
|
+
tx.wellFormed(buildBlankLedgerState(networkId, ledgerParameters), buildStrictness(flags), now);
|
|
32
|
+
};
|
|
33
|
+
const v9LedgerParameters = (parameters) => parameters instanceof ledger.LedgerParameters
|
|
34
|
+
? Either.right(parameters)
|
|
35
|
+
: Either.left(new LedgerParametersMismatchError({
|
|
36
|
+
message: "ledger-v9's validator was handed another ledger version's parameters; it checks transactions only against ledger-v9's.",
|
|
37
|
+
}));
|
|
38
|
+
/**
|
|
39
|
+
* Builds the validator for ledger-v9 transactions.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Registered from the fork version by `makeDefaultValidationServices`, against a block-data fetcher whose codec
|
|
43
|
+
* registry is split at the same version — so a block reported from the boundary reaches this validator as ledger-v9
|
|
44
|
+
* parameters, which is the only kind its ledger version can build a state from. While the chain's latest block is
|
|
45
|
+
* below the boundary, the fetcher yields ledger-v8's instead, and this validator refuses them.
|
|
46
|
+
* @param deps The network, clock, and the block-data fetcher, which decodes each block at the version it reports.
|
|
47
|
+
* @returns A validator to register in a `ValidationServices` registry for the version range from the v9 fork.
|
|
48
|
+
*/
|
|
49
|
+
export const makeV9ValidationServiceEffect = (deps) => makeValidationServiceEffect(v9WellFormedCheck, v9LedgerParameters, deps);
|
|
50
|
+
/**
|
|
51
|
+
* The promise-facing surface of {@link makeV9ValidationServiceEffect}, rejecting with the typed failure itself.
|
|
52
|
+
*
|
|
53
|
+
* @param deps The network, clock, and the block-data fetcher, which decodes each block at the version it reports.
|
|
54
|
+
* @returns A validator for ledger-v9 transactions.
|
|
55
|
+
*/
|
|
56
|
+
export const makeV9ValidationService = (deps) => {
|
|
57
|
+
const effectService = makeV9ValidationServiceEffect(deps);
|
|
58
|
+
return {
|
|
59
|
+
validateTx: (tx, options) => runPromiseThrowingFailure(effectService.validateTx(tx, options)),
|
|
60
|
+
};
|
|
61
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type * as ledgerV8 from '@
|
|
2
|
-
import * as ledgerV9 from '@midnightntwrk/ledger-v9';
|
|
1
|
+
import type * as ledgerV8 from '@midnightntwrk/ledger-v8';
|
|
2
|
+
import type * as ledgerV9 from '@midnightntwrk/ledger-v9';
|
|
3
3
|
import { ProtocolVersion } from '@midnightntwrk/wallet-sdk-abstractions';
|
|
4
|
-
import type
|
|
5
|
-
import {
|
|
6
|
-
import type { V9UnboundTransaction } from '../proving/provingService.js';
|
|
4
|
+
import { type Clock } from '@midnightntwrk/wallet-sdk-utilities';
|
|
5
|
+
import { Effect, type Either } from 'effect';
|
|
7
6
|
/**
|
|
8
7
|
* Ledger parameters as either ledger version reads them: what a block-data fetch spanning a protocol boundary yields.
|
|
9
8
|
*
|
|
@@ -11,8 +10,8 @@ import type { V9UnboundTransaction } from '../proving/provingService.js';
|
|
|
11
10
|
* The two ledger versions' `LedgerParameters` are structurally identical, so this union carries no information the
|
|
12
11
|
* compiler can act on — it names, at the one place a block's parameters cross into validation, that which ledger
|
|
13
12
|
* version produced them is a run-time fact settled by the block's reported protocol version. Each ledger's
|
|
14
|
-
* `LedgerState` still insists on its own class, so
|
|
15
|
-
*
|
|
13
|
+
* `LedgerState` still insists on its own class, so each ledger version's validator looks at the object it is handed
|
|
14
|
+
* and refuses the other's with a {@link LedgerParametersMismatchError}.
|
|
16
15
|
*/
|
|
17
16
|
export type AnyLedgerParameters = ledgerV8.LedgerParameters | ledgerV9.LedgerParameters;
|
|
18
17
|
/**
|
|
@@ -20,10 +19,11 @@ export type AnyLedgerParameters = ledgerV8.LedgerParameters | ledgerV9.LedgerPar
|
|
|
20
19
|
* — a separate declaration here keeps the validation service decoupled from dust-wallet. The two can be passed
|
|
21
20
|
* interchangeably via structural typing.
|
|
22
21
|
*
|
|
23
|
-
* @typeParam TParameters The `LedgerParameters` type of the ledger version the parameters were decoded at.
|
|
24
|
-
* ledger
|
|
22
|
+
* @typeParam TParameters The `LedgerParameters` type of the ledger version the parameters were decoded at. It has no
|
|
23
|
+
* default: the two ledger versions' parameters are indistinguishable to the compiler, so a default would label either
|
|
24
|
+
* ledger version's as ledger-v9's without a word of complaint.
|
|
25
25
|
*/
|
|
26
|
-
export interface BlockData<TParameters
|
|
26
|
+
export interface BlockData<TParameters> {
|
|
27
27
|
hash: string;
|
|
28
28
|
height: number;
|
|
29
29
|
/** The protocol version the indexer reported this block under, and so the ledger version its parameters are in. */
|
|
@@ -41,11 +41,11 @@ export type WellFormedStrictnessFlags = Pick<ledgerV9.WellFormedStrictness, 'enf
|
|
|
41
41
|
* @typeParam TParameters The `LedgerParameters` type of the ledger version `blockData` was decoded at — necessarily the
|
|
42
42
|
* version the validator being called speaks, since well-formedness is checked against a state built from them.
|
|
43
43
|
*/
|
|
44
|
-
export type ValidateTxOptions<TParameters
|
|
44
|
+
export type ValidateTxOptions<TParameters> = {
|
|
45
45
|
flags: WellFormedStrictnessFlags;
|
|
46
46
|
blockData?: BlockData<TParameters> | undefined;
|
|
47
47
|
};
|
|
48
|
-
declare const WellFormedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
48
|
+
declare const WellFormedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
49
49
|
readonly _tag: "@midnightntwrk/wallet-sdk-capabilities/validation/validationService/WellFormedError";
|
|
50
50
|
} & Readonly<A>;
|
|
51
51
|
/** Thrown when a transaction fails the structural well-formedness check. */
|
|
@@ -53,7 +53,7 @@ export declare class WellFormedError extends WellFormedError_base<{
|
|
|
53
53
|
cause: unknown;
|
|
54
54
|
}> {
|
|
55
55
|
}
|
|
56
|
-
declare const ValidationFetchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
56
|
+
declare const ValidationFetchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
57
57
|
readonly _tag: "@midnightntwrk/wallet-sdk-capabilities/validation/validationService/ValidationFetchError";
|
|
58
58
|
} & Readonly<A>;
|
|
59
59
|
/** Thrown when validation cannot complete because the block-data fetch failed. */
|
|
@@ -61,22 +61,42 @@ export declare class ValidationFetchError extends ValidationFetchError_base<{
|
|
|
61
61
|
cause: unknown;
|
|
62
62
|
}> {
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
declare const LedgerParametersMismatchError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
65
|
+
readonly _tag: "@midnightntwrk/wallet-sdk-capabilities/validation/validationService/LedgerParametersMismatchError";
|
|
66
|
+
} & Readonly<A>;
|
|
67
|
+
/**
|
|
68
|
+
* Raised when a validator gets block data whose parameters another ledger version decoded: the `blockData` it was
|
|
69
|
+
* given, or, with none given, the chain's latest block it fetched.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Both ledger versions declare `LedgerParameters` identically, so nothing in the types keeps one version's out of the
|
|
73
|
+
* other's validator, and each validator looks for itself. A transaction checked against the other ledger version's
|
|
74
|
+
* parameters is not malformed, which is why this is not a {@link WellFormedError}: the block data is from the other
|
|
75
|
+
* side of `forks.v9`. Without `blockData` that is every transaction authored on the side the chain's latest block is
|
|
76
|
+
* not on, and the message then says the block was fetched.
|
|
77
|
+
*/
|
|
78
|
+
export declare class LedgerParametersMismatchError extends LedgerParametersMismatchError_base<{
|
|
79
|
+
readonly message: string;
|
|
80
|
+
}> {
|
|
81
|
+
}
|
|
82
|
+
/** Everything a validator written against one ledger version can fail with. */
|
|
83
|
+
export type ValidationFailure = WellFormedError | ValidationFetchError | LedgerParametersMismatchError;
|
|
65
84
|
/**
|
|
66
85
|
* Checks a transaction for well-formedness.
|
|
67
86
|
*
|
|
68
|
-
* @typeParam TTransaction The transactions this validator accepts
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @typeParam TParameters The `LedgerParameters` type of that same ledger version.
|
|
87
|
+
* @typeParam TTransaction The transactions this validator accepts, and so the one ledger version it is written against.
|
|
88
|
+
* Choosing between validators for different ledger versions is {@link VersionedValidationServiceEffect}'s job, not
|
|
89
|
+
* this interface's.
|
|
90
|
+
* @typeParam TParameters The `LedgerParameters` type of that same ledger version. Neither has a default: a validator
|
|
91
|
+
* that left them out would be ledger-v9's without saying so.
|
|
72
92
|
*/
|
|
73
|
-
export interface ValidationServiceEffect<TTransaction
|
|
74
|
-
validateTx(tx: TTransaction, options: ValidateTxOptions<TParameters>): Effect.Effect<void,
|
|
93
|
+
export interface ValidationServiceEffect<TTransaction, TParameters> {
|
|
94
|
+
validateTx(tx: TTransaction, options: ValidateTxOptions<TParameters>): Effect.Effect<void, ValidationFailure>;
|
|
75
95
|
}
|
|
76
|
-
export interface ValidationService<TTransaction
|
|
96
|
+
export interface ValidationService<TTransaction, TParameters> {
|
|
77
97
|
validateTx(tx: TTransaction, options: ValidateTxOptions<TParameters>): Promise<void>;
|
|
78
98
|
}
|
|
79
|
-
declare const UnsupportedValidationVersionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Cause.YieldableError & {
|
|
99
|
+
declare const UnsupportedValidationVersionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
80
100
|
readonly _tag: "@midnightntwrk/wallet-sdk-capabilities/validation/validationService/UnsupportedValidationVersionError";
|
|
81
101
|
} & Readonly<A>;
|
|
82
102
|
/** Raised when no validator is registered for the protocol version a transaction was authored for. */
|
|
@@ -95,10 +115,10 @@ export declare class UnsupportedValidationVersionError extends UnsupportedValida
|
|
|
95
115
|
* fork landing between authoring and validation does not rewrite the bytes, so it cannot change the answer or who
|
|
96
116
|
* gives it.
|
|
97
117
|
*/
|
|
98
|
-
export interface VersionedValidationServiceEffect<TTransaction
|
|
99
|
-
validateTx(tx: TTransaction, protocolVersion: ProtocolVersion.ProtocolVersion, options: ValidateTxOptions<TParameters>): Effect.Effect<void,
|
|
118
|
+
export interface VersionedValidationServiceEffect<TTransaction, TParameters> {
|
|
119
|
+
validateTx(tx: TTransaction, protocolVersion: ProtocolVersion.ProtocolVersion, options: ValidateTxOptions<TParameters>): Effect.Effect<void, ValidationFailure | UnsupportedValidationVersionError>;
|
|
100
120
|
}
|
|
101
|
-
export interface VersionedValidationService<TTransaction
|
|
121
|
+
export interface VersionedValidationService<TTransaction, TParameters> {
|
|
102
122
|
validateTx(tx: TTransaction, protocolVersion: ProtocolVersion.ProtocolVersion, options: ValidateTxOptions<TParameters>): Promise<void>;
|
|
103
123
|
}
|
|
104
124
|
/**
|
|
@@ -111,7 +131,7 @@ export interface VersionedValidationService<TTransaction = AnyV9ValidatableTrans
|
|
|
111
131
|
* range therefore means "this transaction belongs to a different variant", and the router says so with
|
|
112
132
|
* {@link UnsupportedValidationVersionError} instead of handing the bytes to a checker that could only reject them.
|
|
113
133
|
*/
|
|
114
|
-
export type ValidationServices<TTransaction
|
|
134
|
+
export type ValidationServices<TTransaction, TParameters> = ProtocolVersion.Registry<ValidationServiceEffect<TTransaction, TParameters>>;
|
|
115
135
|
/**
|
|
116
136
|
* Builds a validation service that routes on the version a transaction was authored for.
|
|
117
137
|
*
|
|
@@ -137,7 +157,7 @@ export type DefaultValidationConfiguration = {
|
|
|
137
157
|
* @typeParam TParameters The `LedgerParameters` type of the ledger version this validator speaks, and so the version
|
|
138
158
|
* its `fetchBlockData` must decode at.
|
|
139
159
|
*/
|
|
140
|
-
export type ValidationServiceDependencies<TParameters
|
|
160
|
+
export type ValidationServiceDependencies<TParameters> = {
|
|
141
161
|
fetchBlockData: () => Promise<BlockData<TParameters>>;
|
|
142
162
|
networkId: string;
|
|
143
163
|
clock: Clock.Clock;
|
|
@@ -157,18 +177,20 @@ export type WellFormedCheck<TTransaction, TParameters> = (transaction: TTransact
|
|
|
157
177
|
flags: WellFormedStrictnessFlags;
|
|
158
178
|
now: Date;
|
|
159
179
|
}>) => void;
|
|
180
|
+
/**
|
|
181
|
+
* Reads block data's parameters as the ones a ledger version's well-formedness check takes, refusing another ledger
|
|
182
|
+
* version's: the two declare `LedgerParameters` identically, so only the object itself can say which made it.
|
|
183
|
+
*/
|
|
184
|
+
export type LedgerParametersReader<TParameters, TOwnParameters> = (parameters: TParameters) => Either.Either<TOwnParameters, LedgerParametersMismatchError>;
|
|
160
185
|
/**
|
|
161
186
|
* Builds a validation service for one ledger version from that version's well-formedness check.
|
|
162
187
|
*
|
|
163
188
|
* @param check The ledger version's well-formedness check.
|
|
189
|
+
* @param readParameters Reads block data's parameters as that ledger version's, refusing another's.
|
|
164
190
|
* @param deps The network, clock, and the block-data fetcher that decodes at the same ledger version.
|
|
165
191
|
* @returns A validator for that ledger version, ready to register in {@link ValidationServices}.
|
|
166
192
|
*/
|
|
167
|
-
export declare const makeValidationServiceEffect: <TTransaction, TParameters>(check: WellFormedCheck<TTransaction, TParameters>, deps: ValidationServiceDependencies<TParameters>) => ValidationServiceEffect<TTransaction, TParameters>;
|
|
168
|
-
/** The ledger-v9's well-formedness check. */
|
|
169
|
-
export declare const v9WellFormedCheck: WellFormedCheck<AnyV9ValidatableTransaction, AnyLedgerParameters>;
|
|
170
|
-
export declare const makeV9ValidationServiceEffect: (deps: ValidationServiceDependencies<AnyLedgerParameters>) => ValidationServiceEffect<AnyV9ValidatableTransaction, AnyLedgerParameters>;
|
|
171
|
-
export declare const makeV9ValidationService: (deps: ValidationServiceDependencies<AnyLedgerParameters>) => ValidationService<AnyV9ValidatableTransaction, AnyLedgerParameters>;
|
|
193
|
+
export declare const makeValidationServiceEffect: <TTransaction, TParameters, TOwnParameters>(check: WellFormedCheck<TTransaction, TOwnParameters>, readParameters: LedgerParametersReader<TParameters, TOwnParameters>, deps: ValidationServiceDependencies<TParameters>) => ValidationServiceEffect<TTransaction, TParameters>;
|
|
172
194
|
/** Adapts a version-routed validation service to the promise-facing surface the facade exposes. */
|
|
173
195
|
export declare const wrapVersionedValidationService: <TTransaction, TParameters>(effectService: VersionedValidationServiceEffect<TTransaction, TParameters>) => VersionedValidationService<TTransaction, TParameters>;
|
|
174
196
|
export {};
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
import * as ledgerV9 from '@midnightntwrk/ledger-v9';
|
|
2
1
|
import { ProtocolVersion } from '@midnightntwrk/wallet-sdk-abstractions';
|
|
3
|
-
import {
|
|
2
|
+
import { EitherOps } from '@midnightntwrk/wallet-sdk-utilities';
|
|
3
|
+
import { Data, Effect, Option, pipe } from 'effect';
|
|
4
|
+
import { runPromiseThrowingFailure } from './promiseBoundary.js';
|
|
4
5
|
/** Thrown when a transaction fails the structural well-formedness check. */
|
|
5
6
|
export class WellFormedError extends Data.TaggedError('@midnightntwrk/wallet-sdk-capabilities/validation/validationService/WellFormedError') {
|
|
6
7
|
}
|
|
7
8
|
/** Thrown when validation cannot complete because the block-data fetch failed. */
|
|
8
9
|
export class ValidationFetchError extends Data.TaggedError('@midnightntwrk/wallet-sdk-capabilities/validation/validationService/ValidationFetchError') {
|
|
9
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Raised when a validator gets block data whose parameters another ledger version decoded: the `blockData` it was
|
|
13
|
+
* given, or, with none given, the chain's latest block it fetched.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Both ledger versions declare `LedgerParameters` identically, so nothing in the types keeps one version's out of the
|
|
17
|
+
* other's validator, and each validator looks for itself. A transaction checked against the other ledger version's
|
|
18
|
+
* parameters is not malformed, which is why this is not a {@link WellFormedError}: the block data is from the other
|
|
19
|
+
* side of `forks.v9`. Without `blockData` that is every transaction authored on the side the chain's latest block is
|
|
20
|
+
* not on, and the message then says the block was fetched.
|
|
21
|
+
*/
|
|
22
|
+
export class LedgerParametersMismatchError extends Data.TaggedError('@midnightntwrk/wallet-sdk-capabilities/validation/validationService/LedgerParametersMismatchError') {
|
|
23
|
+
}
|
|
10
24
|
/** Raised when no validator is registered for the protocol version a transaction was authored for. */
|
|
11
25
|
export class UnsupportedValidationVersionError extends Data.TaggedError('@midnightntwrk/wallet-sdk-capabilities/validation/validationService/UnsupportedValidationVersionError') {
|
|
12
26
|
}
|
|
@@ -38,25 +52,31 @@ export const makeVersionedValidationServiceEffect = (services) => ({
|
|
|
38
52
|
export const singleVersionValidationServiceEffect = (service) => ({
|
|
39
53
|
validateTx: (tx, _protocolVersion, options) => service.validateTx(tx, options),
|
|
40
54
|
});
|
|
55
|
+
/** Names the block a refusal was about when the caller passed none: the chain's latest, which the validator fetched. */
|
|
56
|
+
const fetchedFromLatestBlock = (error) => new LedgerParametersMismatchError({
|
|
57
|
+
message: `${error.message} The parameters came from the chain's latest block, fetched because no \`blockData\` was passed; to check this transaction, pass \`blockData\` from a block of its own ledger version.`,
|
|
58
|
+
});
|
|
41
59
|
/**
|
|
42
60
|
* Builds a validation service for one ledger version from that version's well-formedness check.
|
|
43
61
|
*
|
|
44
62
|
* @param check The ledger version's well-formedness check.
|
|
63
|
+
* @param readParameters Reads block data's parameters as that ledger version's, refusing another's.
|
|
45
64
|
* @param deps The network, clock, and the block-data fetcher that decodes at the same ledger version.
|
|
46
65
|
* @returns A validator for that ledger version, ready to register in {@link ValidationServices}.
|
|
47
66
|
*/
|
|
48
|
-
export const makeValidationServiceEffect = (check, deps) => ({
|
|
67
|
+
export const makeValidationServiceEffect = (check, readParameters, deps) => ({
|
|
49
68
|
validateTx(tx, options) {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
69
|
+
const parametersOf = (blockData) => EitherOps.toEffect(readParameters(blockData.ledgerParameters));
|
|
70
|
+
const parameters = options.blockData
|
|
71
|
+
? parametersOf(options.blockData)
|
|
72
|
+
: pipe(Effect.tryPromise({
|
|
53
73
|
try: () => deps.fetchBlockData(),
|
|
54
74
|
catch: (cause) => new ValidationFetchError({ cause }),
|
|
55
|
-
});
|
|
56
|
-
return pipe(
|
|
75
|
+
}), Effect.flatMap((blockData) => Effect.mapError(parametersOf(blockData), fetchedFromLatestBlock)));
|
|
76
|
+
return pipe(parameters, Effect.flatMap((ledgerParameters) => Effect.try({
|
|
57
77
|
try: () => check(tx, {
|
|
58
78
|
networkId: deps.networkId,
|
|
59
|
-
ledgerParameters
|
|
79
|
+
ledgerParameters,
|
|
60
80
|
flags: options.flags,
|
|
61
81
|
now: deps.clock.now(),
|
|
62
82
|
}),
|
|
@@ -64,46 +84,6 @@ export const makeValidationServiceEffect = (check, deps) => ({
|
|
|
64
84
|
})));
|
|
65
85
|
},
|
|
66
86
|
});
|
|
67
|
-
const buildStrictness = (flags) => {
|
|
68
|
-
const strictness = new ledgerV9.WellFormedStrictness();
|
|
69
|
-
strictness.enforceBalancing = flags.enforceBalancing;
|
|
70
|
-
strictness.verifySignatures = flags.verifySignatures;
|
|
71
|
-
strictness.enforceLimits = flags.enforceLimits;
|
|
72
|
-
return strictness;
|
|
73
|
-
};
|
|
74
|
-
const buildBlankLedgerState = (networkId, parameters) => {
|
|
75
|
-
const state = ledgerV9.LedgerState.blank(networkId);
|
|
76
|
-
state.parameters = parameters;
|
|
77
|
-
return state;
|
|
78
|
-
};
|
|
79
|
-
/** The ledger-v9's well-formedness check. */
|
|
80
|
-
export const v9WellFormedCheck = (tx, { networkId, ledgerParameters, flags, now }) => {
|
|
81
|
-
tx.wellFormed(buildBlankLedgerState(networkId, ledgerParameters), buildStrictness(flags), now);
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Rejects a promise with the typed failure itself rather than the fiber wrapper around it, so a caller can `catch` the
|
|
85
|
-
* error class the signature names.
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* `E extends Error` is what makes that rejection legitimate rather than a thrown bare value, and every failure on this
|
|
89
|
-
* surface is a `Data.TaggedError`, which is one.
|
|
90
|
-
*/
|
|
91
|
-
const runPromiseThrowingFailure = async (effect) => {
|
|
92
|
-
const exit = await Effect.runPromiseExit(effect);
|
|
93
|
-
if (Exit.isSuccess(exit))
|
|
94
|
-
return exit.value;
|
|
95
|
-
const failure = Cause.failureOption(exit.cause);
|
|
96
|
-
if (Option.isSome(failure))
|
|
97
|
-
throw failure.value;
|
|
98
|
-
throw new Error(Cause.pretty(exit.cause));
|
|
99
|
-
};
|
|
100
|
-
export const makeV9ValidationServiceEffect = (deps) => makeValidationServiceEffect(v9WellFormedCheck, deps);
|
|
101
|
-
export const makeV9ValidationService = (deps) => {
|
|
102
|
-
const effectService = makeV9ValidationServiceEffect(deps);
|
|
103
|
-
return {
|
|
104
|
-
validateTx: (tx, options) => runPromiseThrowingFailure(effectService.validateTx(tx, options)),
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
87
|
/** Adapts a version-routed validation service to the promise-facing surface the facade exposes. */
|
|
108
88
|
export const wrapVersionedValidationService = (effectService) => ({
|
|
109
89
|
validateTx: (tx, protocolVersion, options) => runPromiseThrowingFailure(effectService.validateTx(tx, protocolVersion, options)),
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { ProtocolVersion } from '@midnightntwrk/wallet-sdk-abstractions';
|
|
11
11
|
import { type AnyV8ValidatableTransaction } from './v8ValidationService.js';
|
|
12
|
-
import { type
|
|
12
|
+
import { type AnyV9ValidatableTransaction } from './v9ValidationService.js';
|
|
13
|
+
import { type AnyLedgerParameters, type ValidationServiceDependencies, type ValidationServiceEffect, type ValidationServices, type VersionedValidationService, type VersionedValidationServiceEffect } from './validationService.js';
|
|
13
14
|
/**
|
|
14
15
|
* Every transaction shape either ledger version can be asked about.
|
|
15
16
|
*
|
|
@@ -27,8 +28,9 @@ export type VersionValidationServiceEffect = ValidationServiceEffect<AnyVersionV
|
|
|
27
28
|
* Both validators are handed the same block-data fetcher, and that is correct rather than a shortcut: the fetcher
|
|
28
29
|
* decodes a block's parameters with the codec registered for the version the block itself was reported under, so it
|
|
29
30
|
* already yields the ledger version whose validator will be chosen for a transaction authored in the same epoch. A
|
|
30
|
-
* transaction authored on the other side of the boundary from the chain's
|
|
31
|
-
*
|
|
31
|
+
* transaction authored on the other side of the boundary from the chain's latest block is the case neither can serve:
|
|
32
|
+
* its validator refuses the fetched parameters with a `LedgerParametersMismatchError` rather than checking against
|
|
33
|
+
* them, and only `blockData` from the transaction's own epoch gets it checked.
|
|
32
34
|
* @param deps The network, clock, and the block-data fetcher shared by both validators.
|
|
33
35
|
* @param forkVersion The protocol version at which the chain hands over to the ledger-v9.
|
|
34
36
|
* @returns The validators and the version ranges they serve.
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
import { ProtocolVersion } from '@midnightntwrk/wallet-sdk-abstractions';
|
|
23
23
|
import { Either } from 'effect';
|
|
24
24
|
import { makeV8ValidationServiceEffect } from './v8ValidationService.js';
|
|
25
|
-
import { makeV9ValidationServiceEffect
|
|
25
|
+
import { makeV9ValidationServiceEffect } from './v9ValidationService.js';
|
|
26
|
+
import { makeVersionedValidationServiceEffect, wrapVersionedValidationService, } from './validationService.js';
|
|
26
27
|
/**
|
|
27
28
|
* Registers a validator either side of the protocol boundary.
|
|
28
29
|
*
|
|
@@ -30,8 +31,9 @@ import { makeV9ValidationServiceEffect, makeVersionedValidationServiceEffect, wr
|
|
|
30
31
|
* Both validators are handed the same block-data fetcher, and that is correct rather than a shortcut: the fetcher
|
|
31
32
|
* decodes a block's parameters with the codec registered for the version the block itself was reported under, so it
|
|
32
33
|
* already yields the ledger version whose validator will be chosen for a transaction authored in the same epoch. A
|
|
33
|
-
* transaction authored on the other side of the boundary from the chain's
|
|
34
|
-
*
|
|
34
|
+
* transaction authored on the other side of the boundary from the chain's latest block is the case neither can serve:
|
|
35
|
+
* its validator refuses the fetched parameters with a `LedgerParametersMismatchError` rather than checking against
|
|
36
|
+
* them, and only `blockData` from the transaction's own epoch gets it checked.
|
|
35
37
|
* @param deps The network, clock, and the block-data fetcher shared by both validators.
|
|
36
38
|
* @param forkVersion The protocol version at which the chain hands over to the ledger-v9.
|
|
37
39
|
* @returns The validators and the version ranges they serve.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnightntwrk/wallet-sdk-capabilities",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"types": "./dist/submission/index.d.ts",
|
|
41
41
|
"import": "./dist/submission/index.js"
|
|
42
42
|
},
|
|
43
|
-
"./
|
|
44
|
-
"types": "./dist/
|
|
45
|
-
"import": "./dist/
|
|
43
|
+
"./transactionLifecycle": {
|
|
44
|
+
"types": "./dist/transactionLifecycle/index.d.ts",
|
|
45
|
+
"import": "./dist/transactionLifecycle/index.js"
|
|
46
46
|
},
|
|
47
47
|
"./proving": {
|
|
48
48
|
"types": "./dist/proving/index.d.ts",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@midnightntwrk/
|
|
68
|
-
"@midnightntwrk/wallet-sdk-
|
|
69
|
-
"@midnightntwrk/wallet-sdk-
|
|
70
|
-
"@midnightntwrk/wallet-sdk-
|
|
71
|
-
"@midnightntwrk/wallet-sdk-
|
|
72
|
-
"@midnightntwrk/
|
|
65
|
+
"@midnightntwrk/ledger-v8": "^8.1.3",
|
|
66
|
+
"@midnightntwrk/ledger-v9": "^1.0.0",
|
|
67
|
+
"@midnightntwrk/wallet-sdk-abstractions": "3.0.0",
|
|
68
|
+
"@midnightntwrk/wallet-sdk-indexer-client": "2.0.0",
|
|
69
|
+
"@midnightntwrk/wallet-sdk-node-client": "2.0.0",
|
|
70
|
+
"@midnightntwrk/wallet-sdk-prover-client": "2.0.0",
|
|
71
|
+
"@midnightntwrk/wallet-sdk-utilities": "1.3.0",
|
|
72
|
+
"@midnightntwrk/zkir-v2": "^2.2.0",
|
|
73
73
|
"effect": "^3.19.19",
|
|
74
74
|
"rxjs": "^7.8.2"
|
|
75
75
|
},
|