@lucid-evolution/provider 0.1.82 → 0.1.83

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.d.cts CHANGED
@@ -27,14 +27,44 @@ declare class KupmiosError extends KupmiosError_base<{
27
27
  }> {
28
28
  get message(): string;
29
29
  }
30
+ /**
31
+ * Provides support for interacting with both Kupo and Ogmios APIs.
32
+ *
33
+ * @example Using Local URLs (No Authentication):
34
+ * ```typescript
35
+ * const kupmios = new Kupmios(
36
+ * "http://localhost:1442", // Kupo API URL
37
+ * "http://localhost:1337" // Ogmios API URL
38
+ * );
39
+ * ```
40
+ *
41
+ * @example Using Authenticated URLs (No Custom Headers):
42
+ * ```typescript
43
+ * const kupmios = new Kupmios(
44
+ * "https://dmtr_kupoXXX.preprod-v2.kupo-m1.demeter.run", // Kupo Authenticated URL
45
+ * "https://dmtr_ogmiosXXX.preprod-v6.ogmios-m1.demeter.run" // Ogmios Authenticated URL
46
+ * );
47
+ * ```
48
+ *
49
+ * @example Using Public URLs with Custom Headers:
50
+ * ```typescript
51
+ * const kupmios = new Kupmios(
52
+ * "https://preprod-v2.kupo-m1.demeter.run", // Kupo API URL
53
+ * "https://preprod-v6.ogmios-m1.demeter.run", // Ogmios API URL
54
+ * {
55
+ * kupoHeader: { "dmtr-api-key": "dmtr_kupoXXX" }, // Custom header for Kupo
56
+ * ogmiosHeader: { "dmtr-api-key": "dmtr_ogmiosXXX" } // Custom header for Ogmios
57
+ * }
58
+ * );
59
+ */
30
60
  declare class Kupmios implements Provider {
31
- kupoUrl: string;
32
- ogmiosUrl: string;
33
- /**
34
- * @param kupoUrl: http(s)://localhost:1442
35
- * @param ogmiosUrl: http(s)://localhost:1337
36
- */
37
- constructor(kupoUrl: string, ogmiosUrl: string);
61
+ private readonly kupoUrl;
62
+ private readonly ogmiosUrl;
63
+ private readonly headers?;
64
+ constructor(kupoUrl: string, ogmiosUrl: string, headers?: {
65
+ ogmiosHeader?: Record<string, string>;
66
+ kupoHeader?: Record<string, string>;
67
+ });
38
68
  getProtocolParameters(): Promise<ProtocolParameters>;
39
69
  getUtxos(addressOrCredential: Address | Credential): Promise<UTxO[]>;
40
70
  getUtxosWithUnit(addressOrCredential: Address | Credential, unit: Unit): Promise<UTxO[]>;
@@ -139,11 +169,37 @@ declare class KoiosError extends KoiosError_base<{
139
169
  get message(): string;
140
170
  }
141
171
  /**
142
- * @description This class supports Koios API v1.2a
172
+ * Provides support for interacting with the Koios API
173
+ *
174
+ * @example Using the Preprod API URL:
175
+ * ```typescript
176
+ * const koios = new Koios(
177
+ * "https://preview.koios.rest/api/v1", // Preprod Preview Environment
178
+ * "optional-bearer-token" // Optional Bearer Token for authentication
179
+ * );
180
+ * ```
181
+ *
182
+ * @example Using the Preprod Stable API URL:
183
+ * ```typescript
184
+ * const koios = new Koios(
185
+ * "https://preprod.koios.rest/api/v1", // Preprod Stable Environment
186
+ * "optional-bearer-token" // Optional Bearer Token for authentication
187
+ * );
188
+ * ```
189
+ *
190
+ * @example Using the Mainnet API URL:
191
+ * ```typescript
192
+ * const koios = new Koios(
193
+ * "https://api.koios.rest/api/v1", // Mainnet Environment
194
+ * "optional-bearer-token" // Optional Bearer Token for authentication
195
+ * );
196
+ * ```
197
+ *
143
198
  */
144
199
  declare class Koios implements Provider {
145
200
  private readonly baseUrl;
146
- constructor(baseUrl: string);
201
+ private readonly token?;
202
+ constructor(baseUrl: string, token?: string);
147
203
  getProtocolParameters(): Promise<ProtocolParameters>;
148
204
  getUtxos(addressOrCredential: Address | Credential): Promise<UTxO[]>;
149
205
  getUtxosWithUnit(addressOrCredential: Address | Credential, unit: Unit): Promise<UTxO[]>;
package/dist/index.d.ts CHANGED
@@ -27,14 +27,44 @@ declare class KupmiosError extends KupmiosError_base<{
27
27
  }> {
28
28
  get message(): string;
29
29
  }
30
+ /**
31
+ * Provides support for interacting with both Kupo and Ogmios APIs.
32
+ *
33
+ * @example Using Local URLs (No Authentication):
34
+ * ```typescript
35
+ * const kupmios = new Kupmios(
36
+ * "http://localhost:1442", // Kupo API URL
37
+ * "http://localhost:1337" // Ogmios API URL
38
+ * );
39
+ * ```
40
+ *
41
+ * @example Using Authenticated URLs (No Custom Headers):
42
+ * ```typescript
43
+ * const kupmios = new Kupmios(
44
+ * "https://dmtr_kupoXXX.preprod-v2.kupo-m1.demeter.run", // Kupo Authenticated URL
45
+ * "https://dmtr_ogmiosXXX.preprod-v6.ogmios-m1.demeter.run" // Ogmios Authenticated URL
46
+ * );
47
+ * ```
48
+ *
49
+ * @example Using Public URLs with Custom Headers:
50
+ * ```typescript
51
+ * const kupmios = new Kupmios(
52
+ * "https://preprod-v2.kupo-m1.demeter.run", // Kupo API URL
53
+ * "https://preprod-v6.ogmios-m1.demeter.run", // Ogmios API URL
54
+ * {
55
+ * kupoHeader: { "dmtr-api-key": "dmtr_kupoXXX" }, // Custom header for Kupo
56
+ * ogmiosHeader: { "dmtr-api-key": "dmtr_ogmiosXXX" } // Custom header for Ogmios
57
+ * }
58
+ * );
59
+ */
30
60
  declare class Kupmios implements Provider {
31
- kupoUrl: string;
32
- ogmiosUrl: string;
33
- /**
34
- * @param kupoUrl: http(s)://localhost:1442
35
- * @param ogmiosUrl: http(s)://localhost:1337
36
- */
37
- constructor(kupoUrl: string, ogmiosUrl: string);
61
+ private readonly kupoUrl;
62
+ private readonly ogmiosUrl;
63
+ private readonly headers?;
64
+ constructor(kupoUrl: string, ogmiosUrl: string, headers?: {
65
+ ogmiosHeader?: Record<string, string>;
66
+ kupoHeader?: Record<string, string>;
67
+ });
38
68
  getProtocolParameters(): Promise<ProtocolParameters>;
39
69
  getUtxos(addressOrCredential: Address | Credential): Promise<UTxO[]>;
40
70
  getUtxosWithUnit(addressOrCredential: Address | Credential, unit: Unit): Promise<UTxO[]>;
@@ -139,11 +169,37 @@ declare class KoiosError extends KoiosError_base<{
139
169
  get message(): string;
140
170
  }
141
171
  /**
142
- * @description This class supports Koios API v1.2a
172
+ * Provides support for interacting with the Koios API
173
+ *
174
+ * @example Using the Preprod API URL:
175
+ * ```typescript
176
+ * const koios = new Koios(
177
+ * "https://preview.koios.rest/api/v1", // Preprod Preview Environment
178
+ * "optional-bearer-token" // Optional Bearer Token for authentication
179
+ * );
180
+ * ```
181
+ *
182
+ * @example Using the Preprod Stable API URL:
183
+ * ```typescript
184
+ * const koios = new Koios(
185
+ * "https://preprod.koios.rest/api/v1", // Preprod Stable Environment
186
+ * "optional-bearer-token" // Optional Bearer Token for authentication
187
+ * );
188
+ * ```
189
+ *
190
+ * @example Using the Mainnet API URL:
191
+ * ```typescript
192
+ * const koios = new Koios(
193
+ * "https://api.koios.rest/api/v1", // Mainnet Environment
194
+ * "optional-bearer-token" // Optional Bearer Token for authentication
195
+ * );
196
+ * ```
197
+ *
143
198
  */
144
199
  declare class Koios implements Provider {
145
200
  private readonly baseUrl;
146
- constructor(baseUrl: string);
201
+ private readonly token?;
202
+ constructor(baseUrl: string, token?: string);
147
203
  getProtocolParameters(): Promise<ProtocolParameters>;
148
204
  getUtxos(addressOrCredential: Address | Credential): Promise<UTxO[]>;
149
205
  getUtxosWithUnit(addressOrCredential: Address | Credential, unit: Unit): Promise<UTxO[]>;