@lucid-evolution/provider 0.1.29 → 0.1.30
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/index.cjs +556 -361
- package/dist/index.d.cts +47 -4
- package/dist/index.d.ts +47 -4
- package/dist/index.js +564 -361
- package/package.json +6 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Provider, ProtocolParameters, Address, Credential, UTxO, Unit, OutRef, RewardAddress, Delegation, DatumHash, Datum, TxHash, Transaction } from '@lucid-evolution/core-types';
|
|
2
|
+
import * as effect_Cause from 'effect/Cause';
|
|
3
|
+
import * as effect_Types from 'effect/Types';
|
|
4
|
+
import { Effect } from 'effect';
|
|
2
5
|
|
|
3
6
|
declare class Blockfrost implements Provider {
|
|
4
7
|
url: string;
|
|
@@ -32,12 +35,20 @@ type DatumJson = {
|
|
|
32
35
|
[constructor: string]: unknown;
|
|
33
36
|
};
|
|
34
37
|
|
|
38
|
+
declare const KupmiosError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
39
|
+
readonly _tag: "KupmiosError";
|
|
40
|
+
} & Readonly<A>;
|
|
41
|
+
declare class KupmiosError extends KupmiosError_base<{
|
|
42
|
+
cause?: unknown;
|
|
43
|
+
message?: string;
|
|
44
|
+
}> {
|
|
45
|
+
}
|
|
35
46
|
declare class Kupmios implements Provider {
|
|
36
47
|
kupoUrl: string;
|
|
37
48
|
ogmiosUrl: string;
|
|
38
49
|
/**
|
|
39
50
|
* @param kupoUrl: http(s)://localhost:1442
|
|
40
|
-
* @param ogmiosUrl:
|
|
51
|
+
* @param ogmiosUrl: http(s)://localhost:1337
|
|
41
52
|
*/
|
|
42
53
|
constructor(kupoUrl: string, ogmiosUrl: string);
|
|
43
54
|
getProtocolParameters(): Promise<ProtocolParameters>;
|
|
@@ -49,8 +60,6 @@ declare class Kupmios implements Provider {
|
|
|
49
60
|
getDatum(datumHash: DatumHash): Promise<Datum>;
|
|
50
61
|
awaitTx(txHash: TxHash, checkInterval?: number): Promise<boolean>;
|
|
51
62
|
submitTx(cbor: Transaction): Promise<TxHash>;
|
|
52
|
-
private kupmiosUtxosToUtxos;
|
|
53
|
-
private ogmiosWsp;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
type MaestroSupportedNetworks = "Mainnet" | "Preprod" | "Preview";
|
|
@@ -97,4 +106,38 @@ declare class Koios implements Provider {
|
|
|
97
106
|
submitTx(tx: Transaction): Promise<TxHash>;
|
|
98
107
|
}
|
|
99
108
|
|
|
100
|
-
|
|
109
|
+
declare const FetchError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
110
|
+
readonly _tag: "FetchError";
|
|
111
|
+
} & Readonly<A>;
|
|
112
|
+
declare class FetchError extends FetchError_base<{
|
|
113
|
+
readonly message: string;
|
|
114
|
+
}> {
|
|
115
|
+
}
|
|
116
|
+
declare const ResponseError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
117
|
+
readonly _tag: "ResponseError";
|
|
118
|
+
} & Readonly<A>;
|
|
119
|
+
declare class ResponseError extends ResponseError_base<{
|
|
120
|
+
readonly message: string;
|
|
121
|
+
}> {
|
|
122
|
+
}
|
|
123
|
+
declare const JsonError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
124
|
+
readonly _tag: "JsonError";
|
|
125
|
+
} & Readonly<A>;
|
|
126
|
+
declare class JsonError extends JsonError_base<{
|
|
127
|
+
readonly message: string;
|
|
128
|
+
}> {
|
|
129
|
+
}
|
|
130
|
+
declare const fetchEffect: (input: string | URL | globalThis.Request, requestInit?: RequestInit) => Effect.Effect<any, FetchError | ResponseError | JsonError, never>;
|
|
131
|
+
|
|
132
|
+
type fetch_FetchError = FetchError;
|
|
133
|
+
declare const fetch_FetchError: typeof FetchError;
|
|
134
|
+
type fetch_JsonError = JsonError;
|
|
135
|
+
declare const fetch_JsonError: typeof JsonError;
|
|
136
|
+
type fetch_ResponseError = ResponseError;
|
|
137
|
+
declare const fetch_ResponseError: typeof ResponseError;
|
|
138
|
+
declare const fetch_fetchEffect: typeof fetchEffect;
|
|
139
|
+
declare namespace fetch {
|
|
140
|
+
export { fetch_FetchError as FetchError, fetch_JsonError as JsonError, fetch_ResponseError as ResponseError, fetch_fetchEffect as fetchEffect };
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { Blockfrost, fetch as FetchProvider, Koios, Kupmios, KupmiosError, Maestro, type MaestroConfig, type MaestroSupportedNetworks, datumJsonToCbor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Provider, ProtocolParameters, Address, Credential, UTxO, Unit, OutRef, RewardAddress, Delegation, DatumHash, Datum, TxHash, Transaction } from '@lucid-evolution/core-types';
|
|
2
|
+
import * as effect_Cause from 'effect/Cause';
|
|
3
|
+
import * as effect_Types from 'effect/Types';
|
|
4
|
+
import { Effect } from 'effect';
|
|
2
5
|
|
|
3
6
|
declare class Blockfrost implements Provider {
|
|
4
7
|
url: string;
|
|
@@ -32,12 +35,20 @@ type DatumJson = {
|
|
|
32
35
|
[constructor: string]: unknown;
|
|
33
36
|
};
|
|
34
37
|
|
|
38
|
+
declare const KupmiosError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
39
|
+
readonly _tag: "KupmiosError";
|
|
40
|
+
} & Readonly<A>;
|
|
41
|
+
declare class KupmiosError extends KupmiosError_base<{
|
|
42
|
+
cause?: unknown;
|
|
43
|
+
message?: string;
|
|
44
|
+
}> {
|
|
45
|
+
}
|
|
35
46
|
declare class Kupmios implements Provider {
|
|
36
47
|
kupoUrl: string;
|
|
37
48
|
ogmiosUrl: string;
|
|
38
49
|
/**
|
|
39
50
|
* @param kupoUrl: http(s)://localhost:1442
|
|
40
|
-
* @param ogmiosUrl:
|
|
51
|
+
* @param ogmiosUrl: http(s)://localhost:1337
|
|
41
52
|
*/
|
|
42
53
|
constructor(kupoUrl: string, ogmiosUrl: string);
|
|
43
54
|
getProtocolParameters(): Promise<ProtocolParameters>;
|
|
@@ -49,8 +60,6 @@ declare class Kupmios implements Provider {
|
|
|
49
60
|
getDatum(datumHash: DatumHash): Promise<Datum>;
|
|
50
61
|
awaitTx(txHash: TxHash, checkInterval?: number): Promise<boolean>;
|
|
51
62
|
submitTx(cbor: Transaction): Promise<TxHash>;
|
|
52
|
-
private kupmiosUtxosToUtxos;
|
|
53
|
-
private ogmiosWsp;
|
|
54
63
|
}
|
|
55
64
|
|
|
56
65
|
type MaestroSupportedNetworks = "Mainnet" | "Preprod" | "Preview";
|
|
@@ -97,4 +106,38 @@ declare class Koios implements Provider {
|
|
|
97
106
|
submitTx(tx: Transaction): Promise<TxHash>;
|
|
98
107
|
}
|
|
99
108
|
|
|
100
|
-
|
|
109
|
+
declare const FetchError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
110
|
+
readonly _tag: "FetchError";
|
|
111
|
+
} & Readonly<A>;
|
|
112
|
+
declare class FetchError extends FetchError_base<{
|
|
113
|
+
readonly message: string;
|
|
114
|
+
}> {
|
|
115
|
+
}
|
|
116
|
+
declare const ResponseError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
117
|
+
readonly _tag: "ResponseError";
|
|
118
|
+
} & Readonly<A>;
|
|
119
|
+
declare class ResponseError extends ResponseError_base<{
|
|
120
|
+
readonly message: string;
|
|
121
|
+
}> {
|
|
122
|
+
}
|
|
123
|
+
declare const JsonError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
124
|
+
readonly _tag: "JsonError";
|
|
125
|
+
} & Readonly<A>;
|
|
126
|
+
declare class JsonError extends JsonError_base<{
|
|
127
|
+
readonly message: string;
|
|
128
|
+
}> {
|
|
129
|
+
}
|
|
130
|
+
declare const fetchEffect: (input: string | URL | globalThis.Request, requestInit?: RequestInit) => Effect.Effect<any, FetchError | ResponseError | JsonError, never>;
|
|
131
|
+
|
|
132
|
+
type fetch_FetchError = FetchError;
|
|
133
|
+
declare const fetch_FetchError: typeof FetchError;
|
|
134
|
+
type fetch_JsonError = JsonError;
|
|
135
|
+
declare const fetch_JsonError: typeof JsonError;
|
|
136
|
+
type fetch_ResponseError = ResponseError;
|
|
137
|
+
declare const fetch_ResponseError: typeof ResponseError;
|
|
138
|
+
declare const fetch_fetchEffect: typeof fetchEffect;
|
|
139
|
+
declare namespace fetch {
|
|
140
|
+
export { fetch_FetchError as FetchError, fetch_JsonError as JsonError, fetch_ResponseError as ResponseError, fetch_fetchEffect as fetchEffect };
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { Blockfrost, fetch as FetchProvider, Koios, Kupmios, KupmiosError, Maestro, type MaestroConfig, type MaestroSupportedNetworks, datumJsonToCbor };
|