@no-witness-labs/midday-sdk 0.2.0 → 0.2.1

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.
Files changed (66) hide show
  1. package/README.md +145 -78
  2. package/dist/Client.d.ts +464 -72
  3. package/dist/Client.d.ts.map +1 -1
  4. package/dist/Client.js +526 -143
  5. package/dist/Client.js.map +1 -1
  6. package/dist/Config.d.ts +83 -1
  7. package/dist/Config.d.ts.map +1 -1
  8. package/dist/Config.js +72 -15
  9. package/dist/Config.js.map +1 -1
  10. package/dist/Providers.d.ts +99 -9
  11. package/dist/Providers.d.ts.map +1 -1
  12. package/dist/Providers.js +142 -39
  13. package/dist/Providers.js.map +1 -1
  14. package/dist/Wallet.d.ts +88 -1
  15. package/dist/Wallet.d.ts.map +1 -1
  16. package/dist/Wallet.js +162 -51
  17. package/dist/Wallet.js.map +1 -1
  18. package/dist/index.d.ts +63 -7
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +68 -4
  21. package/dist/index.js.map +1 -1
  22. package/dist/providers/HttpZkConfigProvider.d.ts +229 -0
  23. package/dist/providers/HttpZkConfigProvider.d.ts.map +1 -0
  24. package/dist/providers/HttpZkConfigProvider.js +275 -0
  25. package/dist/providers/HttpZkConfigProvider.js.map +1 -0
  26. package/dist/providers/IndexedDBPrivateStateProvider.d.ts +270 -0
  27. package/dist/providers/IndexedDBPrivateStateProvider.d.ts.map +1 -0
  28. package/dist/providers/IndexedDBPrivateStateProvider.js +513 -0
  29. package/dist/providers/IndexedDBPrivateStateProvider.js.map +1 -0
  30. package/dist/providers/errors.d.ts +50 -0
  31. package/dist/providers/errors.d.ts.map +1 -0
  32. package/dist/providers/errors.js +32 -0
  33. package/dist/providers/errors.js.map +1 -0
  34. package/dist/sdk/Type.d.ts +91 -0
  35. package/dist/sdk/Type.d.ts.map +1 -0
  36. package/dist/sdk/Type.js +8 -0
  37. package/dist/sdk/Type.js.map +1 -0
  38. package/dist/utils/address.d.ts +56 -0
  39. package/dist/utils/address.d.ts.map +1 -0
  40. package/dist/utils/address.js +135 -0
  41. package/dist/utils/address.js.map +1 -0
  42. package/dist/utils/coin.d.ts +55 -0
  43. package/dist/utils/coin.d.ts.map +1 -0
  44. package/dist/utils/coin.js +84 -0
  45. package/dist/utils/coin.js.map +1 -0
  46. package/dist/utils/effect-runtime.d.ts +66 -0
  47. package/dist/utils/effect-runtime.d.ts.map +1 -0
  48. package/dist/utils/effect-runtime.js +147 -0
  49. package/dist/utils/effect-runtime.js.map +1 -0
  50. package/dist/utils/hex.d.ts +62 -0
  51. package/dist/utils/hex.d.ts.map +1 -0
  52. package/dist/utils/hex.js +93 -0
  53. package/dist/utils/hex.js.map +1 -0
  54. package/dist/wallet/connector.d.ts +191 -0
  55. package/dist/wallet/connector.d.ts.map +1 -0
  56. package/dist/wallet/connector.js +183 -0
  57. package/dist/wallet/connector.js.map +1 -0
  58. package/dist/wallet/errors.d.ts +22 -0
  59. package/dist/wallet/errors.d.ts.map +1 -0
  60. package/dist/wallet/errors.js +16 -0
  61. package/dist/wallet/errors.js.map +1 -0
  62. package/dist/wallet/provider.d.ts +102 -0
  63. package/dist/wallet/provider.d.ts.map +1 -0
  64. package/dist/wallet/provider.js +139 -0
  65. package/dist/wallet/provider.js.map +1 -0
  66. package/package.json +10 -5
package/dist/Client.d.ts CHANGED
@@ -1,80 +1,223 @@
1
1
  /**
2
2
  * High-level client for interacting with Midnight Network contracts.
3
3
  *
4
- * Provides a simple API for deploying, joining, and calling contracts.
4
+ * ## API Design
5
+ *
6
+ * This module uses a **module-function pattern**:
7
+ *
8
+ * - **Stateless**: Functions operate on Client/Contract data
9
+ * - **Module functions**: `Client.contractFrom(client, options)`, `Contract.deploy(builder)`
10
+ * - **Data-oriented**: Client/Contract are plain data, not instances with methods
11
+ *
12
+ * ### Usage Patterns
13
+ *
14
+ * ```typescript
15
+ * // Promise user
16
+ * const client = await Client.create(config);
17
+ * const builder = await Client.contractFrom(client, { module });
18
+ * const contract = await ContractBuilder.deploy(builder);
19
+ * const result = await Contract.call(contract, 'increment');
20
+ *
21
+ * // Effect user
22
+ * const client = yield* Client.effect.create(config);
23
+ * const builder = yield* Client.effect.contractFrom(client, { module });
24
+ * const contract = yield* ContractBuilder.effect.deploy(builder);
25
+ * const result = yield* Contract.effect.call(contract, 'increment');
26
+ * ```
5
27
  *
6
28
  * @since 0.1.0
7
29
  * @module
8
30
  */
9
- import { type Logger } from 'pino';
31
+ import { Context, Effect, Layer } from 'effect';
32
+ import type { ZKConfigProvider, PrivateStateProvider } from '@midnight-ntwrk/midnight-js-types';
10
33
  import type { NetworkConfig } from './Config.js';
11
34
  import type { ContractProviders, StorageConfig } from './Providers.js';
12
35
  import type { WalletContext } from './Wallet.js';
36
+ import type { WalletConnection } from './wallet/connector.js';
37
+ declare const ClientError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
38
+ readonly _tag: "ClientError";
39
+ } & Readonly<A>;
40
+ /**
41
+ * Error during client initialization or operation.
42
+ *
43
+ * @since 0.3.0
44
+ * @category errors
45
+ */
46
+ export declare class ClientError extends ClientError_base<{
47
+ readonly cause: unknown;
48
+ readonly message: string;
49
+ }> {
50
+ }
51
+ declare const ContractError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
52
+ readonly _tag: "ContractError";
53
+ } & Readonly<A>;
54
+ /**
55
+ * Error during contract deployment or calls.
56
+ *
57
+ * @since 0.3.0
58
+ * @category errors
59
+ */
60
+ export declare class ContractError extends ContractError_base<{
61
+ readonly cause: unknown;
62
+ readonly message: string;
63
+ }> {
64
+ }
65
+ /**
66
+ * Logger interface for client operations.
67
+ *
68
+ * @since 0.2.0
69
+ * @category model
70
+ */
71
+ export interface Logger {
72
+ info(message: string): void;
73
+ warn(message: string): void;
74
+ error(message: string): void;
75
+ debug(message: string): void;
76
+ }
77
+ /**
78
+ * Configuration for creating a client.
79
+ *
80
+ * @since 0.2.0
81
+ * @category model
82
+ */
13
83
  export interface ClientConfig {
14
84
  /** Network to connect to (default: 'local') */
15
85
  network?: string;
16
86
  /** Custom network configuration (overrides network preset) */
17
87
  networkConfig?: NetworkConfig;
18
- /** Wallet seed (defaults to dev wallet for local) */
88
+ /** Wallet seed (required for non-local networks) */
19
89
  seed?: string;
90
+ /** ZK configuration provider (required) */
91
+ zkConfigProvider: ZKConfigProvider<string>;
92
+ /** Private state provider (required) */
93
+ privateStateProvider: PrivateStateProvider;
20
94
  /** Storage configuration */
21
95
  storage?: StorageConfig;
22
96
  /** Enable logging (default: true) */
23
97
  logging?: boolean;
24
98
  }
99
+ /**
100
+ * Options for loading a contract.
101
+ *
102
+ * @since 0.2.0
103
+ * @category model
104
+ */
25
105
  export interface ContractFromOptions {
26
- /**
27
- * Base for path resolution:
28
- * - undefined/'cwd': relative to process.cwd() (default)
29
- * - 'project': relative to project root (finds package.json)
30
- * - string (URL): relative to caller's import.meta.url
31
- */
32
- from?: string | 'project' | 'cwd';
106
+ /** Contract module (required in browser) */
107
+ module?: ContractModule;
108
+ /** URL to fetch ZK config from (for HttpZkConfigProvider) */
109
+ zkConfigUrl?: string;
33
110
  /** Witnesses for the contract */
34
111
  witnesses?: Record<string, unknown>;
35
- /** Override privateStateId (defaults to directory name) */
112
+ /** Override privateStateId (defaults to contract name) */
36
113
  privateStateId?: string;
37
114
  }
115
+ /**
116
+ * Options for deploying a contract.
117
+ *
118
+ * @since 0.2.0
119
+ * @category model
120
+ */
38
121
  export interface DeployOptions {
39
122
  /** Initial private state (defaults to {}) */
40
123
  initialPrivateState?: unknown;
41
124
  }
125
+ /**
126
+ * Options for joining a contract.
127
+ *
128
+ * @since 0.2.0
129
+ * @category model
130
+ */
42
131
  export interface JoinOptions {
43
132
  /** Initial private state (defaults to {}) */
44
133
  initialPrivateState?: unknown;
45
134
  }
46
- export interface MidnightClient {
47
- /** Raw wallet context for advanced use */
48
- readonly wallet: WalletContext;
49
- /** Network configuration */
50
- readonly networkConfig: NetworkConfig;
51
- /** Logger instance */
52
- readonly logger: Logger;
53
- /** Load a contract from a build directory path */
54
- contractFrom(basePath: string, options?: ContractFromOptions): Promise<ContractBuilder>;
55
- /** Wait for a transaction to be finalized on-chain by its hash */
56
- waitForTx(txHash: string): Promise<FinalizedTxData>;
57
- }
135
+ /**
136
+ * Data about a finalized transaction.
137
+ *
138
+ * @since 0.2.0
139
+ * @category model
140
+ */
58
141
  export interface FinalizedTxData {
59
142
  txHash: string;
60
143
  blockHeight: number;
61
144
  blockHash: string;
62
145
  }
63
- export interface ContractBuilder {
64
- /** The loaded contract module */
65
- readonly module: LoadedContractModule;
66
- /** Deploy a new instance */
67
- deploy(options?: DeployOptions): Promise<ConnectedContract>;
68
- /** Join an existing deployed contract */
69
- join(address: string, options?: JoinOptions): Promise<ConnectedContract>;
146
+ /**
147
+ * A contract module definition.
148
+ *
149
+ * @since 0.2.0
150
+ * @category model
151
+ */
152
+ export interface ContractModule {
153
+ Contract: new (witnesses: unknown) => unknown;
154
+ ledger: (state: unknown) => unknown;
70
155
  }
156
+ /**
157
+ * A loaded contract module with configuration.
158
+ *
159
+ * @since 0.2.0
160
+ * @category model
161
+ */
71
162
  export interface LoadedContractModule {
72
163
  Contract: new (witnesses: unknown) => unknown;
73
164
  ledger: (state: unknown) => unknown;
74
- zkConfigPath: string;
75
165
  privateStateId: string;
76
166
  witnesses: Record<string, unknown>;
77
167
  }
168
+ /**
169
+ * Result of a contract call.
170
+ *
171
+ * @since 0.2.0
172
+ * @category model
173
+ */
174
+ export interface CallResult {
175
+ txHash: string;
176
+ blockHeight: number;
177
+ status: string;
178
+ }
179
+ /**
180
+ * Represents a Midnight client.
181
+ *
182
+ * This is plain data - use module functions to operate on it.
183
+ *
184
+ * @since 0.2.0
185
+ * @category model
186
+ */
187
+ export interface MidnightClient {
188
+ /** Raw wallet context for advanced use (null if using wallet connector) */
189
+ readonly wallet: WalletContext | null;
190
+ /** Network configuration */
191
+ readonly networkConfig: NetworkConfig;
192
+ /** Logger instance */
193
+ readonly logger: Logger;
194
+ /** Contract providers */
195
+ readonly providers: ContractProviders;
196
+ }
197
+ /**
198
+ * Represents a contract builder for deploying or joining contracts.
199
+ *
200
+ * This is plain data - use module functions to operate on it.
201
+ *
202
+ * @since 0.2.0
203
+ * @category model
204
+ */
205
+ export interface ContractBuilder {
206
+ /** The loaded contract module */
207
+ readonly module: LoadedContractModule;
208
+ /** Contract providers */
209
+ readonly providers: ContractProviders;
210
+ /** Logger */
211
+ readonly logger: Logger;
212
+ }
213
+ /**
214
+ * Represents a connected contract.
215
+ *
216
+ * This is plain data - use module functions to operate on it.
217
+ *
218
+ * @since 0.2.0
219
+ * @category model
220
+ */
78
221
  export interface ConnectedContract {
79
222
  /** The deployed contract address */
80
223
  readonly address: string;
@@ -86,61 +229,310 @@ export interface ConnectedContract {
86
229
  readonly providers: ContractProviders;
87
230
  /** Logger */
88
231
  readonly logger: Logger;
89
- /** Call a contract circuit - waits for transaction to be finalized */
90
- call(action: string, ...args: unknown[]): Promise<CallResult>;
91
- /** Query contract public state (raw) - latest */
92
- state(): Promise<unknown>;
93
- /** Query contract public state at specific block height (raw) */
94
- stateAt(blockHeight: number): Promise<unknown>;
95
- /** Query contract public state (parsed via ledger) - latest */
96
- ledgerState(): Promise<unknown>;
97
- /** Query contract public state at specific block height (parsed via ledger) */
98
- ledgerStateAt(blockHeight: number): Promise<unknown>;
99
- }
100
- export interface CallResult {
101
- txHash: string;
102
- blockHeight: number;
103
- status: string;
104
232
  }
233
+ declare function createEffect(config: ClientConfig): Effect.Effect<MidnightClient, ClientError>;
234
+ declare function fromWalletEffect(connection: WalletConnection, config: {
235
+ zkConfigProvider: ZKConfigProvider<string>;
236
+ privateStateProvider: PrivateStateProvider;
237
+ logging?: boolean;
238
+ }): Effect.Effect<MidnightClient, ClientError>;
239
+ declare function contractFromEffect(client: MidnightClient, options: ContractFromOptions): Effect.Effect<ContractBuilder, ClientError>;
240
+ declare function waitForTxEffect(client: MidnightClient, txHash: string): Effect.Effect<FinalizedTxData, ClientError>;
105
241
  /**
106
- * Create a Midnight client for interacting with contracts
242
+ * Create a Midnight client for interacting with contracts using a seed.
107
243
  *
108
244
  * @example
109
245
  * ```typescript
110
- * import * as Midday from '@no-witness-labs/midday-sdk';
246
+ * const client = await Client.create({
247
+ * seed: 'your-64-char-hex-seed',
248
+ * networkConfig: Config.NETWORKS.local,
249
+ * zkConfigProvider,
250
+ * privateStateProvider,
251
+ * });
252
+ * ```
253
+ *
254
+ * @since 0.2.0
255
+ * @category constructors
256
+ */
257
+ export declare function create(config: ClientConfig): Promise<MidnightClient>;
258
+ /**
259
+ * Create a Midnight client from a connected wallet (browser).
111
260
  *
112
- * // Simple - local network with dev wallet
113
- * const client = await Midday.Client.create();
261
+ * @since 0.2.0
262
+ * @category constructors
263
+ */
264
+ export declare function fromWallet(connection: WalletConnection, config: {
265
+ zkConfigProvider: ZKConfigProvider<string>;
266
+ privateStateProvider: PrivateStateProvider;
267
+ logging?: boolean;
268
+ }): Promise<MidnightClient>;
269
+ /**
270
+ * Load a contract module for a client.
114
271
  *
115
- * // Custom seed
116
- * const client = await Midday.Client.create({
117
- * seed: 'your-64-char-hex-seed'
272
+ * @example
273
+ * ```typescript
274
+ * const builder = await Client.contractFrom(client, {
275
+ * module: await import('./contracts/counter/index.js'),
118
276
  * });
277
+ * ```
278
+ *
279
+ * @since 0.2.0
280
+ * @category operations
281
+ */
282
+ export declare function contractFrom(client: MidnightClient, options: ContractFromOptions): Promise<ContractBuilder>;
283
+ /**
284
+ * Wait for a transaction to be finalized.
285
+ *
286
+ * @since 0.2.0
287
+ * @category operations
288
+ */
289
+ export declare function waitForTx(client: MidnightClient, txHash: string): Promise<FinalizedTxData>;
290
+ /**
291
+ * Raw Effect APIs for advanced users.
292
+ *
293
+ * @example
294
+ * ```typescript
295
+ * const client = yield* Client.effect.create(config);
296
+ * const builder = yield* Client.effect.contractFrom(client, { module });
297
+ * ```
119
298
  *
120
- * // Custom network endpoints via env vars or config
121
- * const client = await Midday.Client.create({
122
- * networkConfig: {
123
- * networkId: 'testnet',
124
- * indexer: 'https://indexer.testnet.midnight.network/graphql',
125
- * indexerWS: 'wss://indexer.testnet.midnight.network/graphql/ws',
126
- * node: 'wss://node.testnet.midnight.network',
127
- * proofServer: 'https://proof.testnet.midnight.network',
128
- * }
299
+ * @since 0.2.0
300
+ * @category effect
301
+ */
302
+ export declare const effect: {
303
+ create: typeof createEffect;
304
+ fromWallet: typeof fromWalletEffect;
305
+ contractFrom: typeof contractFromEffect;
306
+ waitForTx: typeof waitForTxEffect;
307
+ };
308
+ declare function deployEffect(builder: ContractBuilder, options?: DeployOptions): Effect.Effect<ConnectedContract, ContractError>;
309
+ declare function joinEffect(builder: ContractBuilder, address: string, options?: JoinOptions): Effect.Effect<ConnectedContract, ContractError>;
310
+ /**
311
+ * ContractBuilder module functions.
312
+ *
313
+ * @since 0.2.0
314
+ * @category ContractBuilder
315
+ */
316
+ export declare const ContractBuilder: {
317
+ /**
318
+ * Deploy a new contract instance.
319
+ *
320
+ * @example
321
+ * ```typescript
322
+ * const contract = await ContractBuilder.deploy(builder);
323
+ * ```
324
+ *
325
+ * @since 0.2.0
326
+ * @category lifecycle
327
+ */
328
+ deploy: (builder: ContractBuilder, options?: DeployOptions) => Promise<ConnectedContract>;
329
+ /**
330
+ * Join an existing contract.
331
+ *
332
+ * @example
333
+ * ```typescript
334
+ * const contract = await ContractBuilder.join(builder, '0x...');
335
+ * ```
336
+ *
337
+ * @since 0.2.0
338
+ * @category lifecycle
339
+ */
340
+ join: (builder: ContractBuilder, address: string, options?: JoinOptions) => Promise<ConnectedContract>;
341
+ /**
342
+ * Raw Effect APIs for ContractBuilder.
343
+ *
344
+ * @since 0.2.0
345
+ * @category effect
346
+ */
347
+ effect: {
348
+ deploy: typeof deployEffect;
349
+ join: typeof joinEffect;
350
+ };
351
+ };
352
+ declare function callEffect(contract: ConnectedContract, action: string, ...args: unknown[]): Effect.Effect<CallResult, ContractError>;
353
+ declare function stateEffect(contract: ConnectedContract): Effect.Effect<unknown, ContractError>;
354
+ declare function stateAtEffect(contract: ConnectedContract, blockHeight: number): Effect.Effect<unknown, ContractError>;
355
+ declare function ledgerStateEffect(contract: ConnectedContract): Effect.Effect<unknown, ContractError>;
356
+ declare function ledgerStateAtEffect(contract: ConnectedContract, blockHeight: number): Effect.Effect<unknown, ContractError>;
357
+ /**
358
+ * Contract module functions.
359
+ *
360
+ * @since 0.2.0
361
+ * @category Contract
362
+ */
363
+ export declare const Contract: {
364
+ /**
365
+ * Call a contract action.
366
+ *
367
+ * @example
368
+ * ```typescript
369
+ * const result = await Contract.call(contract, 'increment');
370
+ * ```
371
+ *
372
+ * @since 0.2.0
373
+ * @category operations
374
+ */
375
+ call: (contract: ConnectedContract, action: string, ...args: unknown[]) => Promise<CallResult>;
376
+ /**
377
+ * Get contract state.
378
+ *
379
+ * @since 0.2.0
380
+ * @category inspection
381
+ */
382
+ state: (contract: ConnectedContract) => Promise<unknown>;
383
+ /**
384
+ * Get contract state at a specific block height.
385
+ *
386
+ * @since 0.2.0
387
+ * @category inspection
388
+ */
389
+ stateAt: (contract: ConnectedContract, blockHeight: number) => Promise<unknown>;
390
+ /**
391
+ * Get ledger state (parsed through ledger function).
392
+ *
393
+ * @since 0.2.0
394
+ * @category inspection
395
+ */
396
+ ledgerState: (contract: ConnectedContract) => Promise<unknown>;
397
+ /**
398
+ * Get ledger state at a specific block height.
399
+ *
400
+ * @since 0.2.0
401
+ * @category inspection
402
+ */
403
+ ledgerStateAt: (contract: ConnectedContract, blockHeight: number) => Promise<unknown>;
404
+ /**
405
+ * Raw Effect APIs for Contract.
406
+ *
407
+ * @since 0.2.0
408
+ * @category effect
409
+ */
410
+ effect: {
411
+ call: typeof callEffect;
412
+ state: typeof stateEffect;
413
+ stateAt: typeof stateAtEffect;
414
+ ledgerState: typeof ledgerStateEffect;
415
+ ledgerStateAt: typeof ledgerStateAtEffect;
416
+ };
417
+ };
418
+ /**
419
+ * Service interface for Client operations.
420
+ *
421
+ * @since 0.2.0
422
+ * @category service
423
+ */
424
+ export interface ClientServiceImpl {
425
+ readonly create: (config: ClientConfig) => Effect.Effect<MidnightClient, ClientError>;
426
+ readonly fromWallet: (connection: WalletConnection, config: {
427
+ zkConfigProvider: ZKConfigProvider<string>;
428
+ privateStateProvider: PrivateStateProvider;
429
+ logging?: boolean;
430
+ }) => Effect.Effect<MidnightClient, ClientError>;
431
+ readonly contractFrom: (client: MidnightClient, options: ContractFromOptions) => Effect.Effect<ContractBuilder, ClientError>;
432
+ readonly waitForTx: (client: MidnightClient, txHash: string) => Effect.Effect<FinalizedTxData, ClientError>;
433
+ }
434
+ declare const ClientService_base: Context.TagClass<ClientService, "ClientService", ClientServiceImpl>;
435
+ /**
436
+ * Context.Tag for ClientService dependency injection.
437
+ *
438
+ * @example
439
+ * ```typescript
440
+ * const program = Effect.gen(function* () {
441
+ * const clientService = yield* ClientService;
442
+ * const client = yield* clientService.create(config);
443
+ * return client;
129
444
  * });
130
445
  *
131
- * // Load and deploy a contract
132
- * const counter = await (await client.contractFrom('build/simple-counter')).deploy();
446
+ * Effect.runPromise(program.pipe(Effect.provide(ClientLive)));
447
+ * ```
133
448
  *
134
- * // Call actions
135
- * await counter.call('increment');
449
+ * @since 0.2.0
450
+ * @category service
451
+ */
452
+ export declare class ClientService extends ClientService_base {
453
+ }
454
+ /**
455
+ * Service interface for ContractBuilder operations.
136
456
  *
137
- * // Read state
138
- * const state = await counter.ledgerState();
139
- * console.log(state.counter);
457
+ * @since 0.2.0
458
+ * @category service
459
+ */
460
+ export interface ContractBuilderServiceImpl {
461
+ readonly deploy: (builder: ContractBuilder, options?: DeployOptions) => Effect.Effect<ConnectedContract, ContractError>;
462
+ readonly join: (builder: ContractBuilder, address: string, options?: JoinOptions) => Effect.Effect<ConnectedContract, ContractError>;
463
+ }
464
+ declare const ContractBuilderService_base: Context.TagClass<ContractBuilderService, "ContractBuilderService", ContractBuilderServiceImpl>;
465
+ /**
466
+ * Context.Tag for ContractBuilderService dependency injection.
140
467
  *
141
- * // Join existing contract
142
- * const existing = await (await client.contractFrom('build/simple-counter')).join(address);
468
+ * @since 0.2.0
469
+ * @category service
470
+ */
471
+ export declare class ContractBuilderService extends ContractBuilderService_base {
472
+ }
473
+ /**
474
+ * Service interface for Contract operations.
475
+ *
476
+ * @since 0.2.0
477
+ * @category service
478
+ */
479
+ export interface ContractServiceImpl {
480
+ readonly call: (contract: ConnectedContract, action: string, ...args: unknown[]) => Effect.Effect<CallResult, ContractError>;
481
+ readonly state: (contract: ConnectedContract) => Effect.Effect<unknown, ContractError>;
482
+ readonly stateAt: (contract: ConnectedContract, blockHeight: number) => Effect.Effect<unknown, ContractError>;
483
+ readonly ledgerState: (contract: ConnectedContract) => Effect.Effect<unknown, ContractError>;
484
+ readonly ledgerStateAt: (contract: ConnectedContract, blockHeight: number) => Effect.Effect<unknown, ContractError>;
485
+ }
486
+ declare const ContractService_base: Context.TagClass<ContractService, "ContractService", ContractServiceImpl>;
487
+ /**
488
+ * Context.Tag for ContractService dependency injection.
489
+ *
490
+ * @since 0.2.0
491
+ * @category service
492
+ */
493
+ export declare class ContractService extends ContractService_base {
494
+ }
495
+ /**
496
+ * Live Layer for ClientService.
497
+ *
498
+ * @since 0.2.0
499
+ * @category layer
500
+ */
501
+ export declare const ClientLive: Layer.Layer<ClientService>;
502
+ /**
503
+ * Live Layer for ContractBuilderService.
504
+ *
505
+ * @since 0.2.0
506
+ * @category layer
507
+ */
508
+ export declare const ContractBuilderLive: Layer.Layer<ContractBuilderService>;
509
+ /**
510
+ * Live Layer for ContractService.
511
+ *
512
+ * @since 0.2.0
513
+ * @category layer
514
+ */
515
+ export declare const ContractLive: Layer.Layer<ContractService>;
516
+ /**
517
+ * Create a Layer providing all Client-related services.
518
+ *
519
+ * @example
520
+ * ```typescript
521
+ * import { Effect } from 'effect';
522
+ * import * as Midday from '@no-witness-labs/midday-sdk';
523
+ *
524
+ * const program = Effect.gen(function* () {
525
+ * const clientService = yield* Midday.ClientService;
526
+ * const client = yield* clientService.create(config);
527
+ * return client;
528
+ * });
529
+ *
530
+ * await Effect.runPromise(program.pipe(Effect.provide(Midday.Client.layer())));
143
531
  * ```
532
+ *
533
+ * @since 0.3.0
534
+ * @category layer
144
535
  */
145
- export declare function create(config?: ClientConfig): Promise<MidnightClient>;
536
+ export declare function layer(): Layer.Layer<ClientService | ContractBuilderService | ContractService>;
537
+ export {};
146
538
  //# sourceMappingURL=Client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../src/Client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAa,EAAE,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AAMzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;IAClC,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,2DA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