@midnight-ntwrk/wallet-sdk-utilities 1.1.1 → 1.2.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/EitherOps.d.ts +12 -0
- package/dist/EitherOps.js +13 -0
- package/dist/testing/test-containers.js +1 -1
- package/package.json +1 -1
package/dist/EitherOps.d.ts
CHANGED
|
@@ -16,4 +16,16 @@ export declare class LeftError<L> extends LeftError_base<{
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
export declare const getOrThrowLeft: <L, R>(either: Either.Either<R, L>) => R;
|
|
19
|
+
declare const RightError_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 & {
|
|
20
|
+
readonly _tag: "RightError";
|
|
21
|
+
} & Readonly<A>;
|
|
22
|
+
export declare class RightError<R> extends RightError_base<{
|
|
23
|
+
message: string;
|
|
24
|
+
cause: R;
|
|
25
|
+
}> {
|
|
26
|
+
constructor({ cause }: {
|
|
27
|
+
cause: R;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export declare const getOrThrowRight: <L, R>(either: Either.Either<R, L>) => L;
|
|
19
31
|
export {};
|
package/dist/EitherOps.js
CHANGED
|
@@ -37,3 +37,16 @@ export const getOrThrowLeft = (either) => {
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
+
export class RightError extends Data.TaggedError('RightError') {
|
|
41
|
+
constructor({ cause }) {
|
|
42
|
+
super({ message: 'Unexpected right value', cause });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export const getOrThrowRight = (either) => {
|
|
46
|
+
return Either.match(either, {
|
|
47
|
+
onLeft: (l) => l,
|
|
48
|
+
onRight: (r) => {
|
|
49
|
+
throw new RightError({ cause: r });
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
};
|
|
@@ -28,7 +28,7 @@ export const runNodeContainer = (adjustment = identity) => {
|
|
|
28
28
|
return startContainer(adjustment(container));
|
|
29
29
|
};
|
|
30
30
|
export const runProofServerContainer = (adjustment = identity) => {
|
|
31
|
-
const container = new GenericContainer('ghcr.io/midnight-ntwrk/proof-server:8.0
|
|
31
|
+
const container = new GenericContainer('ghcr.io/midnight-ntwrk/proof-server:8.1.0')
|
|
32
32
|
.withEnvironment({
|
|
33
33
|
RUST_BACKTRACE: 'full',
|
|
34
34
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnight-ntwrk/wallet-sdk-utilities",
|
|
3
3
|
"description": "Domain-agnostic utilities for the wallet SDK - common operations and types",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|