@nobulex/sdk 0.1.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.
Files changed (81) hide show
  1. package/dist/adapters/express.d.ts +322 -0
  2. package/dist/adapters/express.d.ts.map +1 -0
  3. package/dist/adapters/express.js +356 -0
  4. package/dist/adapters/express.js.map +1 -0
  5. package/dist/adapters/index.d.ts +15 -0
  6. package/dist/adapters/index.d.ts.map +1 -0
  7. package/dist/adapters/index.js +15 -0
  8. package/dist/adapters/index.js.map +1 -0
  9. package/dist/adapters/langchain.d.ts +183 -0
  10. package/dist/adapters/langchain.d.ts.map +1 -0
  11. package/dist/adapters/langchain.js +203 -0
  12. package/dist/adapters/langchain.js.map +1 -0
  13. package/dist/adapters/vercel-ai.d.ts +122 -0
  14. package/dist/adapters/vercel-ai.d.ts.map +1 -0
  15. package/dist/adapters/vercel-ai.js +128 -0
  16. package/dist/adapters/vercel-ai.js.map +1 -0
  17. package/dist/benchmarks.d.ts +164 -0
  18. package/dist/benchmarks.d.ts.map +1 -0
  19. package/dist/benchmarks.js +327 -0
  20. package/dist/benchmarks.js.map +1 -0
  21. package/dist/benchmarks.test.d.ts +2 -0
  22. package/dist/benchmarks.test.d.ts.map +1 -0
  23. package/dist/benchmarks.test.js +71 -0
  24. package/dist/benchmarks.test.js.map +1 -0
  25. package/dist/conformance.d.ts +160 -0
  26. package/dist/conformance.d.ts.map +1 -0
  27. package/dist/conformance.js +1242 -0
  28. package/dist/conformance.js.map +1 -0
  29. package/dist/events.d.ts +176 -0
  30. package/dist/events.d.ts.map +1 -0
  31. package/dist/events.js +208 -0
  32. package/dist/events.js.map +1 -0
  33. package/dist/index.d.ts +384 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +695 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/index.test.d.ts +2 -0
  38. package/dist/index.test.d.ts.map +1 -0
  39. package/dist/index.test.js +986 -0
  40. package/dist/index.test.js.map +1 -0
  41. package/dist/middleware.d.ts +104 -0
  42. package/dist/middleware.d.ts.map +1 -0
  43. package/dist/middleware.js +222 -0
  44. package/dist/middleware.js.map +1 -0
  45. package/dist/middleware.test.d.ts +5 -0
  46. package/dist/middleware.test.d.ts.map +1 -0
  47. package/dist/middleware.test.js +735 -0
  48. package/dist/middleware.test.js.map +1 -0
  49. package/dist/plugins/auth.d.ts +49 -0
  50. package/dist/plugins/auth.d.ts.map +1 -0
  51. package/dist/plugins/auth.js +82 -0
  52. package/dist/plugins/auth.js.map +1 -0
  53. package/dist/plugins/cache.d.ts +40 -0
  54. package/dist/plugins/cache.d.ts.map +1 -0
  55. package/dist/plugins/cache.js +191 -0
  56. package/dist/plugins/cache.js.map +1 -0
  57. package/dist/plugins/index.d.ts +16 -0
  58. package/dist/plugins/index.d.ts.map +1 -0
  59. package/dist/plugins/index.js +12 -0
  60. package/dist/plugins/index.js.map +1 -0
  61. package/dist/plugins/metrics-plugin.d.ts +32 -0
  62. package/dist/plugins/metrics-plugin.d.ts.map +1 -0
  63. package/dist/plugins/metrics-plugin.js +61 -0
  64. package/dist/plugins/metrics-plugin.js.map +1 -0
  65. package/dist/plugins/plugins.test.d.ts +8 -0
  66. package/dist/plugins/plugins.test.d.ts.map +1 -0
  67. package/dist/plugins/plugins.test.js +640 -0
  68. package/dist/plugins/plugins.test.js.map +1 -0
  69. package/dist/plugins/retry-plugin.d.ts +55 -0
  70. package/dist/plugins/retry-plugin.d.ts.map +1 -0
  71. package/dist/plugins/retry-plugin.js +133 -0
  72. package/dist/plugins/retry-plugin.js.map +1 -0
  73. package/dist/telemetry.d.ts +183 -0
  74. package/dist/telemetry.d.ts.map +1 -0
  75. package/dist/telemetry.js +241 -0
  76. package/dist/telemetry.js.map +1 -0
  77. package/dist/types.d.ts +200 -0
  78. package/dist/types.d.ts.map +1 -0
  79. package/dist/types.js +8 -0
  80. package/dist/types.js.map +1 -0
  81. package/package.json +52 -0
@@ -0,0 +1,384 @@
1
+ /**
2
+ * @nobulex/sdk -- High-level TypeScript SDK that unifies the entire Stele protocol.
3
+ *
4
+ * Provides a single entry point (SteleClient) for key management, covenant
5
+ * lifecycle, identity management, chain operations, and CCL utilities.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import { KeyManager } from '@nobulex/crypto';
10
+ import type { KeyPair } from '@nobulex/crypto';
11
+ import type { CovenantDocument, VerificationResult, Issuer, Beneficiary, PartyRole } from '@nobulex/core';
12
+ import type { CCLDocument, EvaluationContext } from '@nobulex/ccl';
13
+ import type { AgentIdentity } from '@nobulex/identity';
14
+ import type { SteleClientOptions, CreateCovenantOptions, EvaluationResult, CreateIdentityOptions, EvolveOptions, ChainValidationResult, SteleEventType, SteleEventHandler } from './types.js';
15
+ export { runConformanceSuite, cryptoConformance, cclConformance, covenantConformance, interopConformance, } from './conformance.js';
16
+ export type { ConformanceResult, ConformanceFailure, ConformanceTarget, } from './conformance.js';
17
+ export { MiddlewarePipeline, loggingMiddleware, validationMiddleware, timingMiddleware, rateLimitMiddleware } from './middleware.js';
18
+ export type { MiddlewareContext, MiddlewareResult, MiddlewareFn, SteleMiddleware } from './middleware.js';
19
+ export * from './plugins/index.js';
20
+ export { telemetryMiddleware, SteleMetrics, NoopTracer, NoopMeter, NoopSpan, NoopCounter, NoopHistogram, createTelemetry, SpanStatusCode, } from './telemetry.js';
21
+ export type { Span, Tracer, Meter, Counter, Histogram, TelemetryMiddlewareOptions, CreateTelemetryOptions, EventSource, } from './telemetry.js';
22
+ export type { SteleClientOptions, CreateCovenantOptions, EvaluationResult, CreateIdentityOptions, EvolveOptions, ChainValidationResult, NarrowingViolationEntry, SteleEventType, SteleEventMap, SteleEventHandler, CovenantCreatedEvent, CovenantVerifiedEvent, CovenantCountersignedEvent, IdentityCreatedEvent, IdentityEvolvedEvent, ChainResolvedEvent, ChainValidatedEvent, EvaluationCompletedEvent, KeyRotatedEvent, SteleEvent, } from './types.js';
23
+ export type { CovenantDocument, CovenantBuilderOptions, VerificationResult, VerificationCheck, Issuer, Beneficiary, Party, ChainReference, EnforcementConfig, ProofConfig, RevocationConfig, CovenantMetadata, Obligation, PartyRole, Countersignature, ChainRelation, EnforcementType, ProofType, RevocationMethod, Severity, } from '@nobulex/core';
24
+ export { PROTOCOL_VERSION, MAX_CONSTRAINTS, MAX_CHAIN_DEPTH, MAX_DOCUMENT_SIZE, CovenantBuildError, CovenantVerificationError, MemoryChainResolver, canonicalForm, computeId, buildCovenant, verifyCovenant as verifyCovenant_core, countersignCovenant, resignCovenant, serializeCovenant, deserializeCovenant, resolveChain as resolveChain_core, computeEffectiveConstraints, validateChainNarrowing, } from '@nobulex/core';
25
+ export type { ChainResolver } from '@nobulex/core';
26
+ export type { KeyPair, HashHex, Base64Url, PrivateKey, PublicKey, Signature, DetachedSignature, Nonce, KeyRotationPolicy, ManagedKeyPair, } from '@nobulex/crypto';
27
+ export { generateKeyPair, sign, signString, verify, sha256, sha256String, sha256Object, canonicalizeJson, toHex, fromHex, base64urlEncode, base64urlDecode, generateNonce, generateId, constantTimeEqual, timestamp, keyPairFromPrivateKey, keyPairFromPrivateKeyHex, KeyManager, } from '@nobulex/crypto';
28
+ export type { CCLDocument, EvaluationContext, EvaluationResult as CCLEvaluationResult, Statement, PermitDenyStatement, RequireStatement, LimitStatement, Condition, CompoundCondition, NarrowingViolation, } from '@nobulex/ccl';
29
+ export { parse as parseCCL, evaluate as evaluateCCL, matchAction, matchResource, specificity, evaluateCondition, checkRateLimit, merge as mergeCCL, validateNarrowing, serialize as serializeCCL, validateCCL, tokenize, parseTokens, CCLSyntaxError, CCLValidationError, } from '@nobulex/ccl';
30
+ export type { AgentIdentity, ModelAttestation, DeploymentContext, LineageEntry, EvolutionPolicy, CreateIdentityOptions as CoreCreateIdentityOptions, EvolveIdentityOptions as CoreEvolveIdentityOptions, RuntimeType, } from '@nobulex/identity';
31
+ export { createIdentity as createIdentity_core, evolveIdentity as evolveIdentity_core, verifyIdentity, computeCapabilityManifestHash, computeIdentityHash, computeCarryForward, getLineage, shareAncestor, serializeIdentity, deserializeIdentity, DEFAULT_EVOLUTION_POLICY, } from '@nobulex/identity';
32
+ /**
33
+ * The main entry point for the Stele SDK.
34
+ *
35
+ * Provides a unified, high-level API for the entire Stele protocol:
36
+ * key management, covenant lifecycle, identity management, chain
37
+ * operations, and CCL utilities.
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const client = new SteleClient();
42
+ * await client.generateKeyPair();
43
+ *
44
+ * const doc = await client.createCovenant({
45
+ * issuer: { id: 'alice', publicKey: client.keyPair!.publicKeyHex, role: 'issuer' },
46
+ * beneficiary: { id: 'bob', publicKey: bobPubHex, role: 'beneficiary' },
47
+ * constraints: "permit read on '/data/**'",
48
+ * });
49
+ *
50
+ * const result = await client.verifyCovenant(doc);
51
+ * console.log(result.valid); // true
52
+ * ```
53
+ */
54
+ export declare class SteleClient {
55
+ private _keyPair;
56
+ private readonly _agentId;
57
+ private readonly _strictMode;
58
+ private readonly _listeners;
59
+ private _keyManager;
60
+ constructor(options?: SteleClientOptions);
61
+ /** The currently configured key pair, if any. */
62
+ get keyPair(): KeyPair | undefined;
63
+ /** The currently configured agent ID, if any. */
64
+ get agentId(): string | undefined;
65
+ /** Whether strict mode is enabled. */
66
+ get strictMode(): boolean;
67
+ /** Get the key manager instance, if key rotation is configured. */
68
+ get keyManager(): KeyManager | undefined;
69
+ /**
70
+ * Generate a new Ed25519 key pair and set it as the client's active key pair.
71
+ *
72
+ * Subsequent operations (createCovenant, countersign, etc.) will use this
73
+ * key pair automatically unless overridden per-call.
74
+ *
75
+ * If key rotation is configured and initialized, returns the current
76
+ * managed key pair instead of generating a new one.
77
+ *
78
+ * @returns The generated key pair.
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * const kp = await client.generateKeyPair();
83
+ * console.log(kp.publicKeyHex); // 64-char hex
84
+ * ```
85
+ */
86
+ generateKeyPair(): Promise<KeyPair>;
87
+ /**
88
+ * Initialize key rotation. Generates the first key and starts lifecycle management.
89
+ *
90
+ * Requires that the client was constructed with a `keyRotation` policy.
91
+ * After initialization, the managed key becomes the client's active key pair.
92
+ *
93
+ * @throws {Error} When key rotation is not configured.
94
+ */
95
+ initializeKeyRotation(): Promise<void>;
96
+ /**
97
+ * Check if the current key needs rotation and rotate if necessary.
98
+ *
99
+ * If the key manager determines that the current key has exceeded its
100
+ * maximum age, a new key is generated and the old key enters the overlap
101
+ * period. Emits a `key:rotated` event on rotation.
102
+ *
103
+ * @returns `true` if rotation occurred, `false` otherwise.
104
+ * @throws {Error} When key rotation is not configured.
105
+ */
106
+ rotateKeyIfNeeded(): Promise<boolean>;
107
+ /**
108
+ * Create a new, signed covenant document.
109
+ *
110
+ * If `options.privateKey` is not provided, the client's key pair is used.
111
+ * Emits a `covenant:created` event on success.
112
+ *
113
+ * @param options - Covenant creation options including parties and constraints.
114
+ * @returns A complete, signed CovenantDocument.
115
+ * @throws {CovenantBuildError} When validation of inputs or CCL parsing fails.
116
+ * @throws {Error} When no private key is available.
117
+ *
118
+ * @example
119
+ * ```typescript
120
+ * const doc = await client.createCovenant({
121
+ * issuer: { id: 'alice', publicKey: pubHex, role: 'issuer' },
122
+ * beneficiary: { id: 'bob', publicKey: bobHex, role: 'beneficiary' },
123
+ * constraints: "permit read on '/data/**'",
124
+ * });
125
+ * ```
126
+ */
127
+ createCovenant(options: CreateCovenantOptions): Promise<CovenantDocument>;
128
+ /**
129
+ * Verify a covenant document by running all specification checks.
130
+ *
131
+ * Checks include signature validity, ID integrity, protocol version,
132
+ * party roles, expiry, and constraint syntax. In strict mode, throws
133
+ * `CovenantVerificationError` on failure. Emits a `covenant:verified` event.
134
+ *
135
+ * @param doc - The covenant document to verify.
136
+ * @returns A VerificationResult with `valid` and detailed `checks` array.
137
+ * @throws {CovenantVerificationError} In strict mode when verification fails.
138
+ *
139
+ * @example
140
+ * ```typescript
141
+ * const result = await client.verifyCovenant(doc);
142
+ * if (!result.valid) {
143
+ * console.log(result.checks.filter(c => !c.passed));
144
+ * }
145
+ * ```
146
+ */
147
+ verifyCovenant(doc: CovenantDocument): Promise<VerificationResult>;
148
+ /**
149
+ * Add a countersignature to a covenant document.
150
+ *
151
+ * If no key pair is provided, the client's key pair is used.
152
+ * Emits a `covenant:countersigned` event on success. Returns a
153
+ * new document; the original is not mutated.
154
+ *
155
+ * @param doc - The covenant document to countersign.
156
+ * @param signerRole - Role of the countersigner (default: `'auditor'`).
157
+ * @param signerKeyPair - Optional key pair override.
158
+ * @returns A new CovenantDocument with the countersignature appended.
159
+ * @throws {Error} When no key pair is available.
160
+ *
161
+ * @example
162
+ * ```typescript
163
+ * const audited = await client.countersign(doc, 'auditor');
164
+ * ```
165
+ */
166
+ countersign(doc: CovenantDocument, signerRole?: PartyRole, signerKeyPair?: KeyPair): Promise<CovenantDocument>;
167
+ /**
168
+ * Evaluate an action/resource pair against a covenant's CCL constraints.
169
+ *
170
+ * Parses the covenant's constraints and runs the CCL evaluator.
171
+ * Uses default-deny semantics: if no rules match, the result is
172
+ * `permitted: false`. Emits an `evaluation:completed` event.
173
+ *
174
+ * @param doc - The covenant document containing CCL constraints.
175
+ * @param action - The action to evaluate (e.g. `"read"`, `"api.call"`).
176
+ * @param resource - The target resource (e.g. `"/data/users"`).
177
+ * @param context - Optional evaluation context for condition checking.
178
+ * @returns An EvaluationResult with the access decision.
179
+ *
180
+ * @example
181
+ * ```typescript
182
+ * const result = await client.evaluateAction(doc, 'read', '/data/users');
183
+ * console.log(result.permitted); // true or false
184
+ * ```
185
+ */
186
+ evaluateAction(doc: CovenantDocument, action: string, resource: string, context?: EvaluationContext): Promise<EvaluationResult>;
187
+ /**
188
+ * Create a new agent identity.
189
+ *
190
+ * If `options.operatorKeyPair` is not provided, the client's key pair is used.
191
+ * Emits an `identity:created` event on success.
192
+ *
193
+ * @param options - Identity creation options including model and capabilities.
194
+ * @returns A signed AgentIdentity object.
195
+ * @throws {Error} When no key pair is available.
196
+ *
197
+ * @example
198
+ * ```typescript
199
+ * const identity = await client.createIdentity({
200
+ * model: { provider: 'anthropic', modelId: 'claude-3' },
201
+ * capabilities: ['read', 'write'],
202
+ * deployment: { runtime: 'container' },
203
+ * });
204
+ * ```
205
+ */
206
+ createIdentity(options: CreateIdentityOptions): Promise<AgentIdentity>;
207
+ /**
208
+ * Evolve an existing agent identity with updates.
209
+ *
210
+ * Creates a new lineage entry recording the change. If
211
+ * `options.operatorKeyPair` is not provided, the client's key pair
212
+ * is used. Emits an `identity:evolved` event on success.
213
+ *
214
+ * @param identity - The current agent identity to evolve.
215
+ * @param options - Evolution options describing the change.
216
+ * @returns The updated AgentIdentity with a new lineage entry.
217
+ * @throws {Error} When no key pair is available.
218
+ *
219
+ * @example
220
+ * ```typescript
221
+ * const evolved = await client.evolveIdentity(identity, {
222
+ * changeType: 'model_update',
223
+ * description: 'Upgraded to v2',
224
+ * updates: { model: { provider: 'anthropic', modelId: 'claude-4' } },
225
+ * });
226
+ * ```
227
+ */
228
+ evolveIdentity(identity: AgentIdentity, options: EvolveOptions): Promise<AgentIdentity>;
229
+ /**
230
+ * Resolve the ancestor chain of a covenant document.
231
+ *
232
+ * Uses a MemoryChainResolver seeded with the provided documents.
233
+ * If no additional documents are provided, only the document's
234
+ * immediate chain reference is followed.
235
+ * Emits a `chain:resolved` event.
236
+ *
237
+ * @param doc - The covenant document whose chain to resolve.
238
+ * @param knownDocuments - Optional array of documents that may be ancestors.
239
+ * @returns An array of ancestor documents, parent-first.
240
+ *
241
+ * @example
242
+ * ```typescript
243
+ * const ancestors = await client.resolveChain(childDoc, [parentDoc]);
244
+ * ```
245
+ */
246
+ resolveChain(doc: CovenantDocument, knownDocuments?: CovenantDocument[]): Promise<CovenantDocument[]>;
247
+ /**
248
+ * Validate a chain of covenant documents.
249
+ *
250
+ * Verifies each document individually and checks that each child
251
+ * only narrows (restricts) its parent's constraints. Documents
252
+ * should be ordered from root (index 0) to leaf (last index).
253
+ * Emits a `chain:validated` event.
254
+ *
255
+ * @param docs - The chain of documents, ordered root-first.
256
+ * @returns A ChainValidationResult with per-document and narrowing results.
257
+ *
258
+ * @example
259
+ * ```typescript
260
+ * const result = await client.validateChain([rootDoc, childDoc]);
261
+ * console.log(result.valid); // true if all docs valid and narrowing holds
262
+ * ```
263
+ */
264
+ validateChain(docs: CovenantDocument[]): Promise<ChainValidationResult>;
265
+ /**
266
+ * Parse CCL source text into a CCLDocument.
267
+ *
268
+ * @param source - CCL source text.
269
+ * @returns A parsed CCLDocument.
270
+ * @throws {CCLSyntaxError} When the source has syntax errors.
271
+ *
272
+ * @example
273
+ * ```typescript
274
+ * const cclDoc = client.parseCCL("permit read on '/data/**'");
275
+ * ```
276
+ */
277
+ parseCCL(source: string): CCLDocument;
278
+ /**
279
+ * Merge two CCL documents using deny-wins semantics.
280
+ *
281
+ * @param a - The first (parent) CCL document.
282
+ * @param b - The second (child) CCL document.
283
+ * @returns A new merged CCLDocument.
284
+ */
285
+ mergeCCL(a: CCLDocument, b: CCLDocument): CCLDocument;
286
+ /**
287
+ * Serialize a CCLDocument back to human-readable CCL source text.
288
+ *
289
+ * @param doc - The CCL document to serialize.
290
+ * @returns Multi-line CCL source string.
291
+ */
292
+ serializeCCL(doc: CCLDocument): string;
293
+ /**
294
+ * Register an event handler for a specific event type.
295
+ *
296
+ * @param event - The event type to listen for.
297
+ * @param handler - The callback function.
298
+ * @returns A disposal function that removes the handler when called.
299
+ *
300
+ * @example
301
+ * ```typescript
302
+ * const off = client.on('covenant:created', (e) => {
303
+ * console.log('Created:', e.document.id);
304
+ * });
305
+ * // later: off() to unsubscribe
306
+ * ```
307
+ */
308
+ on<T extends SteleEventType>(event: T, handler: SteleEventHandler<T>): () => void;
309
+ /**
310
+ * Remove a previously registered event handler.
311
+ *
312
+ * @param event - The event type.
313
+ * @param handler - The handler function to remove.
314
+ */
315
+ off<T extends SteleEventType>(event: T, handler: SteleEventHandler<T>): void;
316
+ /**
317
+ * Remove all event handlers for a specific event type, or all events if
318
+ * no type is specified.
319
+ *
320
+ * @param event - Optional event type. If omitted, removes all handlers.
321
+ */
322
+ removeAllListeners(event?: SteleEventType): void;
323
+ /** Emit an event to all registered handlers. */
324
+ private _emit;
325
+ }
326
+ /**
327
+ * Convenience builders for creating common covenant patterns quickly.
328
+ *
329
+ * These produce CovenantDocument instances with minimal configuration.
330
+ * All methods require an issuer key pair, issuer party, and beneficiary party.
331
+ */
332
+ export declare class QuickCovenant {
333
+ /**
334
+ * Create a simple permit covenant that allows a specific action on a resource.
335
+ *
336
+ * @param action - The action to permit (e.g., `"read"`, `"file.read"`).
337
+ * @param resource - The resource to permit on (e.g., `"/data"`, `"/files/**"`).
338
+ * @param issuer - The issuing party.
339
+ * @param beneficiary - The beneficiary party.
340
+ * @param privateKey - Issuer's private key for signing.
341
+ * @returns A signed CovenantDocument with a single permit rule.
342
+ *
343
+ * @example
344
+ * ```typescript
345
+ * const doc = await QuickCovenant.permit('read', '/data/**', issuer, beneficiary, kp.privateKey);
346
+ * ```
347
+ */
348
+ static permit(action: string, resource: string, issuer: Issuer, beneficiary: Beneficiary, privateKey: Uint8Array): Promise<CovenantDocument>;
349
+ /**
350
+ * Create a simple deny covenant that denies a specific action on a resource.
351
+ *
352
+ * @param action - The action to deny.
353
+ * @param resource - The resource to deny on.
354
+ * @param issuer - The issuing party.
355
+ * @param beneficiary - The beneficiary party.
356
+ * @param privateKey - Issuer's private key for signing.
357
+ * @returns A signed CovenantDocument with a single deny rule.
358
+ *
359
+ * @example
360
+ * ```typescript
361
+ * const doc = await QuickCovenant.deny('delete', '/system/**', issuer, beneficiary, kp.privateKey);
362
+ * ```
363
+ */
364
+ static deny(action: string, resource: string, issuer: Issuer, beneficiary: Beneficiary, privateKey: Uint8Array): Promise<CovenantDocument>;
365
+ /**
366
+ * Create a standard covenant with common constraints:
367
+ * - Permits read on all resources
368
+ * - Denies write on system resources
369
+ * - Limits API calls to 1000 per 1 hour
370
+ *
371
+ * @param issuer - The issuing party.
372
+ * @param beneficiary - The beneficiary party.
373
+ * @param privateKey - Issuer's private key for signing.
374
+ * @returns A signed CovenantDocument with standard constraints.
375
+ *
376
+ * @example
377
+ * ```typescript
378
+ * const doc = await QuickCovenant.standard(issuer, beneficiary, kp.privateKey);
379
+ * ```
380
+ */
381
+ static standard(issuer: Issuer, beneficiary: Beneficiary, privateKey: Uint8Array): Promise<CovenantDocument>;
382
+ }
383
+ export * from './adapters/index.js';
384
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAGL,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,OAAO,EAAqC,MAAM,iBAAiB,CAAC;AAsBlF,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAElB,MAAM,EACN,WAAW,EACX,SAAS,EACV,MAAM,eAAe,CAAC;AAYvB,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAOnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,qBAAqB,EAErB,cAAc,EAEd,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAKpB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrI,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAG1G,cAAc,oBA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