@proto-kit/module 0.1.1-develop.211 → 0.1.1-develop.2137
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/factories/MethodIdFactory.d.ts +6 -6
- package/dist/factories/MethodIdFactory.d.ts.map +1 -1
- package/dist/factories/MethodIdFactory.js +10 -34
- package/dist/factories/MethodIdFactory.js.map +1 -0
- package/dist/index.d.ts +4 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -0
- package/dist/messages/OutgoingMessage.d.ts +96 -0
- package/dist/messages/OutgoingMessage.d.ts.map +1 -0
- package/dist/messages/OutgoingMessage.js +68 -0
- package/dist/messages/OutgoingMessage.js.map +1 -0
- package/dist/messages/OutgoingMessages.d.ts +231 -0
- package/dist/messages/OutgoingMessages.d.ts.map +1 -0
- package/dist/messages/OutgoingMessages.js +67 -0
- package/dist/messages/OutgoingMessages.js.map +1 -0
- package/dist/method/MethodParameterEncoder.d.ts +26 -0
- package/dist/method/MethodParameterEncoder.d.ts.map +1 -0
- package/dist/method/MethodParameterEncoder.js +169 -0
- package/dist/method/MethodParameterEncoder.js.map +1 -0
- package/dist/method/runtimeMethod.d.ts +21 -5
- package/dist/method/runtimeMethod.d.ts.map +1 -1
- package/dist/method/runtimeMethod.js +69 -25
- package/dist/method/runtimeMethod.js.map +1 -0
- package/dist/module/decorator.js +1 -0
- package/dist/module/decorator.js.map +1 -0
- package/dist/runtime/MethodIdResolver.d.ts +10 -8
- package/dist/runtime/MethodIdResolver.d.ts.map +1 -1
- package/dist/runtime/MethodIdResolver.js +75 -33
- package/dist/runtime/MethodIdResolver.js.map +1 -0
- package/dist/runtime/Runtime.d.ts +20 -26
- package/dist/runtime/Runtime.d.ts.map +1 -1
- package/dist/runtime/Runtime.js +117 -62
- package/dist/runtime/Runtime.js.map +1 -0
- package/dist/runtime/RuntimeEnvironment.d.ts +10 -0
- package/dist/runtime/RuntimeEnvironment.d.ts.map +1 -0
- package/dist/runtime/RuntimeEnvironment.js +2 -0
- package/dist/runtime/RuntimeEnvironment.js.map +1 -0
- package/dist/runtime/RuntimeModule.d.ts +18 -15
- package/dist/runtime/RuntimeModule.d.ts.map +1 -1
- package/dist/runtime/RuntimeModule.js +33 -8
- package/dist/runtime/RuntimeModule.js.map +1 -0
- package/dist/state/InMemoryStateService.d.ts +11 -10
- package/dist/state/InMemoryStateService.d.ts.map +1 -1
- package/dist/state/InMemoryStateService.js +11 -8
- package/dist/state/InMemoryStateService.js.map +1 -0
- package/dist/state/decorator.d.ts.map +1 -1
- package/dist/state/decorator.js +2 -4
- package/dist/state/decorator.js.map +1 -0
- package/dist/testing/TestingRuntime.d.ts +8 -0
- package/dist/testing/TestingRuntime.d.ts.map +1 -0
- package/dist/testing/TestingRuntime.js +31 -0
- package/dist/testing/TestingRuntime.js.map +1 -0
- package/jest.config.cjs +12 -1
- package/package.json +9 -9
- package/src/factories/MethodIdFactory.ts +10 -17
- package/src/index.ts +4 -4
- package/src/messages/OutgoingMessages.ts +124 -0
- package/src/method/MethodParameterEncoder.ts +262 -0
- package/src/method/runtimeMethod.ts +131 -33
- package/src/runtime/MethodIdResolver.ts +85 -46
- package/src/runtime/Runtime.ts +187 -96
- package/src/runtime/RuntimeEnvironment.ts +16 -0
- package/src/runtime/RuntimeModule.ts +58 -27
- package/src/state/InMemoryStateService.ts +14 -14
- package/test/Runtime.test.ts +68 -42
- package/test/TestingRuntime.ts +43 -0
- package/test/messages/message.test.ts +42 -0
- package/test/method/MethodParameterEncoder.test.ts +124 -0
- package/test/method/runtimeMethod-fail.test.ts +53 -0
- package/{src/method/decorator.test.ts → test/method/runtimeMethod.test.ts} +3 -3
- package/test/modules/Admin.ts +4 -4
- package/test/modules/Balances.test.ts +88 -79
- package/test/modules/Balances.ts +15 -21
- package/test/modules/{methodId.test.ts → MethodIdResolver.test.ts} +24 -35
- package/test/modules/State.test.ts +46 -53
- package/test/runtimeMethod.test.ts +192 -20
- package/test/tsconfig.json +7 -0
- package/tsconfig.json +2 -2
- package/LICENSE.md +0 -201
- package/dist/method/MethodParameterDecoder.d.ts +0 -22
- package/dist/method/MethodParameterDecoder.d.ts.map +0 -1
- package/dist/method/MethodParameterDecoder.js +0 -33
- package/dist/method/RuntimeMethodExecutionContext.d.ts +0 -57
- package/dist/method/RuntimeMethodExecutionContext.d.ts.map +0 -1
- package/dist/method/RuntimeMethodExecutionContext.js +0 -92
- package/dist/method/assert.d.ts +0 -12
- package/dist/method/assert.d.ts.map +0 -1
- package/dist/method/assert.js +0 -23
- package/dist/module/src/factories/MethodIdFactory.d.ts +0 -9
- package/dist/module/src/factories/MethodIdFactory.d.ts.map +0 -1
- package/dist/module/src/factories/MethodIdFactory.js +0 -36
- package/dist/module/src/index.d.ts +0 -11
- package/dist/module/src/index.d.ts.map +0 -1
- package/dist/module/src/index.js +0 -10
- package/dist/module/src/method/MethodParameterDecoder.d.ts +0 -22
- package/dist/module/src/method/MethodParameterDecoder.d.ts.map +0 -1
- package/dist/module/src/method/MethodParameterDecoder.js +0 -33
- package/dist/module/src/method/runtimeMethod.d.ts +0 -19
- package/dist/module/src/method/runtimeMethod.d.ts.map +0 -1
- package/dist/module/src/method/runtimeMethod.js +0 -123
- package/dist/module/src/module/decorator.d.ts +0 -8
- package/dist/module/src/module/decorator.d.ts.map +0 -1
- package/dist/module/src/module/decorator.js +0 -15
- package/dist/module/src/runtime/MethodIdResolver.d.ts +0 -18
- package/dist/module/src/runtime/MethodIdResolver.d.ts.map +0 -1
- package/dist/module/src/runtime/MethodIdResolver.js +0 -50
- package/dist/module/src/runtime/Runtime.d.ts +0 -72
- package/dist/module/src/runtime/Runtime.d.ts.map +0 -1
- package/dist/module/src/runtime/Runtime.js +0 -184
- package/dist/module/src/runtime/RuntimeModule.d.ts +0 -35
- package/dist/module/src/runtime/RuntimeModule.d.ts.map +0 -1
- package/dist/module/src/runtime/RuntimeModule.js +0 -56
- package/dist/module/src/state/InMemoryStateService.d.ts +0 -11
- package/dist/module/src/state/InMemoryStateService.d.ts.map +0 -1
- package/dist/module/src/state/InMemoryStateService.js +0 -21
- package/dist/module/src/state/decorator.d.ts +0 -7
- package/dist/module/src/state/decorator.d.ts.map +0 -1
- package/dist/module/src/state/decorator.js +0 -42
- package/dist/protocol/src/model/Option.d.ts +0 -98
- package/dist/protocol/src/model/Option.d.ts.map +0 -1
- package/dist/protocol/src/model/Option.js +0 -98
- package/dist/protocol/src/model/StateTransition.d.ts +0 -96
- package/dist/protocol/src/model/StateTransition.d.ts.map +0 -1
- package/dist/protocol/src/model/StateTransition.js +0 -65
- package/dist/protocol/src/model/network/NetworkState.d.ts +0 -64
- package/dist/protocol/src/model/network/NetworkState.d.ts.map +0 -1
- package/dist/protocol/src/model/network/NetworkState.js +0 -12
- package/dist/protocol/src/model/transaction/ProtocolTransaction.d.ts +0 -70
- package/dist/protocol/src/model/transaction/ProtocolTransaction.d.ts.map +0 -1
- package/dist/protocol/src/model/transaction/ProtocolTransaction.js +0 -18
- package/dist/protocol/src/model/transaction/RuntimeTransaction.d.ts +0 -63
- package/dist/protocol/src/model/transaction/RuntimeTransaction.d.ts.map +0 -1
- package/dist/protocol/src/model/transaction/RuntimeTransaction.js +0 -29
- package/dist/protocol/src/state/assert/assert.d.ts +0 -12
- package/dist/protocol/src/state/assert/assert.d.ts.map +0 -1
- package/dist/protocol/src/state/assert/assert.js +0 -23
- package/dist/protocol/src/state/context/RuntimeMethodExecutionContext.d.ts +0 -60
- package/dist/protocol/src/state/context/RuntimeMethodExecutionContext.d.ts.map +0 -1
- package/dist/protocol/src/state/context/RuntimeMethodExecutionContext.js +0 -105
- package/dist/state/State.d.ts +0 -65
- package/dist/state/State.d.ts.map +0 -1
- package/dist/state/State.js +0 -114
- package/dist/state/StateMap.d.ts +0 -37
- package/dist/state/StateMap.d.ts.map +0 -1
- package/dist/state/StateMap.js +0 -56
- package/dist/state/StateServiceProvider.d.ts +0 -10
- package/dist/state/StateServiceProvider.d.ts.map +0 -1
- package/dist/state/StateServiceProvider.js +0 -34
- package/src/method/MethodParameterDecoder.ts +0 -70
- package/src/state/decorator.ts +0 -63
- package/test/state/MerkleTree.test.ts +0 -95
- package/test/state/MockAsyncMerkleStore.ts +0 -28
- package/test/transaction.test.ts +0 -82
- package/tsconfig.test.json +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/method/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,UAAU,CAAC;AAM1C;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,QAWvD"}
|
package/dist/method/assert.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Bool, Provable } from "snarkyjs";
|
|
2
|
-
import { container } from "tsyringe";
|
|
3
|
-
import { RuntimeMethodExecutionContext } from "./RuntimeMethodExecutionContext";
|
|
4
|
-
import { log } from "@proto-kit/common";
|
|
5
|
-
/**
|
|
6
|
-
* Maintains an execution status of the current runtime module method,
|
|
7
|
-
* while prioritizing one-time failures. The assertion won't change the
|
|
8
|
-
* execution status if it has previously failed at least once within the
|
|
9
|
-
* same method execution context.
|
|
10
|
-
*
|
|
11
|
-
* @param condition - Result of the assertion made about the execution status
|
|
12
|
-
* @param message - Optional message describing the prior status
|
|
13
|
-
*/
|
|
14
|
-
export function assert(condition, message) {
|
|
15
|
-
const executionContext = container.resolve(RuntimeMethodExecutionContext);
|
|
16
|
-
const previousStatus = executionContext.current().result.status;
|
|
17
|
-
const status = Provable.if(previousStatus, Bool, condition, previousStatus);
|
|
18
|
-
if (!condition.toBoolean()) {
|
|
19
|
-
log.debug("Assertion failed: ", message);
|
|
20
|
-
executionContext.setStatusMessage(message);
|
|
21
|
-
}
|
|
22
|
-
executionContext.setStatus(status);
|
|
23
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DependencyFactory } from "@proto-kit/common";
|
|
2
|
-
import { MethodIdResolver } from "../runtime/MethodIdResolver";
|
|
3
|
-
import type { Runtime, RuntimeModulesRecord } from "../runtime/Runtime";
|
|
4
|
-
export declare class MethodIdFactory extends DependencyFactory {
|
|
5
|
-
private readonly runtime;
|
|
6
|
-
constructor(runtime: Runtime<RuntimeModulesRecord>);
|
|
7
|
-
methodIdResolver(): MethodIdResolver;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=MethodIdFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MethodIdFactory.d.ts","sourceRoot":"","sources":["../../../../src/factories/MethodIdFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAExE,qBACa,eAAgB,SAAQ,iBAAiB;IAE/B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAMrE,gBAAgB,IAAI,gBAAgB;CAG5C"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
-
};
|
|
13
|
-
import { dependency, dependencyFactory, DependencyFactory } from "@proto-kit/common";
|
|
14
|
-
import { inject } from "tsyringe";
|
|
15
|
-
import { MethodIdResolver } from "../runtime/MethodIdResolver";
|
|
16
|
-
let MethodIdFactory = class MethodIdFactory extends DependencyFactory {
|
|
17
|
-
constructor(runtime) {
|
|
18
|
-
super();
|
|
19
|
-
this.runtime = runtime;
|
|
20
|
-
}
|
|
21
|
-
methodIdResolver() {
|
|
22
|
-
return new MethodIdResolver(this.runtime, this.runtime.definition.modules);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
__decorate([
|
|
26
|
-
dependency(),
|
|
27
|
-
__metadata("design:type", Function),
|
|
28
|
-
__metadata("design:paramtypes", []),
|
|
29
|
-
__metadata("design:returntype", MethodIdResolver)
|
|
30
|
-
], MethodIdFactory.prototype, "methodIdResolver", null);
|
|
31
|
-
MethodIdFactory = __decorate([
|
|
32
|
-
dependencyFactory(),
|
|
33
|
-
__param(0, inject("Runtime")),
|
|
34
|
-
__metadata("design:paramtypes", [Function])
|
|
35
|
-
], MethodIdFactory);
|
|
36
|
-
export { MethodIdFactory };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from "../../protocol/src/state/assert/assert";
|
|
2
|
-
export * from "./method/runtimeMethod";
|
|
3
|
-
export * from "./module/decorator";
|
|
4
|
-
export * from "./runtime/RuntimeModule";
|
|
5
|
-
export * from "./runtime/Runtime";
|
|
6
|
-
export * from "./state/InMemoryStateService";
|
|
7
|
-
export * from "@proto-kit/protocol/src/state/StateServiceProvider";
|
|
8
|
-
export * from "./state/decorator";
|
|
9
|
-
export * from "./method/MethodParameterDecoder";
|
|
10
|
-
export * from "./runtime/MethodIdResolver";
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oDAAoD,CAAC;AACnE,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
|
package/dist/module/src/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from "../../protocol/src/state/assert/assert";
|
|
2
|
-
export * from "./method/runtimeMethod";
|
|
3
|
-
export * from "./module/decorator";
|
|
4
|
-
export * from "./runtime/RuntimeModule";
|
|
5
|
-
export * from "./runtime/Runtime";
|
|
6
|
-
export * from "./state/InMemoryStateService";
|
|
7
|
-
export * from "@proto-kit/protocol/src/state/StateServiceProvider";
|
|
8
|
-
export * from "./state/decorator";
|
|
9
|
-
export * from "./method/MethodParameterDecoder";
|
|
10
|
-
export * from "./runtime/MethodIdResolver";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Field } from "snarkyjs";
|
|
2
|
-
import { RuntimeModule } from "../runtime/RuntimeModule";
|
|
3
|
-
export interface Fieldable {
|
|
4
|
-
toFields: () => Field[];
|
|
5
|
-
}
|
|
6
|
-
export interface FromFieldClass {
|
|
7
|
-
new: (...args: any[]) => any;
|
|
8
|
-
fromFields: (fields: Field[]) => Fieldable;
|
|
9
|
-
name: string;
|
|
10
|
-
prototype: {
|
|
11
|
-
_fields?: any[];
|
|
12
|
-
};
|
|
13
|
-
sizeInFields?: () => number;
|
|
14
|
-
}
|
|
15
|
-
export declare class MethodParameterDecoder {
|
|
16
|
-
private readonly types;
|
|
17
|
-
static fromMethod(target: RuntimeModule<unknown>, methodName: string): MethodParameterDecoder;
|
|
18
|
-
private constructor();
|
|
19
|
-
fromFields(fields: Field[]): Fieldable[];
|
|
20
|
-
get fieldSize(): number;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=MethodParameterDecoder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MethodParameterDecoder.d.ts","sourceRoot":"","sources":["../../../../src/method/MethodParameterDecoder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,KAAK,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,SAAS,CAAC;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,EAAE;QACT,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;KACjB,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,MAAM,CAAC;CAC7B;AAYD,qBAAa,sBAAsB;IAWb,OAAO,CAAC,QAAQ,CAAC,KAAK;WAV5B,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,MAAM;IAU3E,OAAO;IAEA,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE;IAmB/C,IAAW,SAAS,IAAI,MAAM,CAM7B;CACF"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const errors = {
|
|
2
|
-
fieldLengthNotMatching: (expected, actual) => new Error(`Expected ${expected} field elements, got ${actual}`),
|
|
3
|
-
typeNotCompatible: (name) => new Error(`Cannot decode type ${name}, it has to be either a Struct, CircuitValue or built-in snarkyjs type`),
|
|
4
|
-
};
|
|
5
|
-
export class MethodParameterDecoder {
|
|
6
|
-
static fromMethod(target, methodName) {
|
|
7
|
-
const paramtypes = Reflect.getMetadata("design:paramtypes", target, methodName);
|
|
8
|
-
return new MethodParameterDecoder(paramtypes);
|
|
9
|
-
}
|
|
10
|
-
constructor(types) {
|
|
11
|
-
this.types = types;
|
|
12
|
-
}
|
|
13
|
-
fromFields(fields) {
|
|
14
|
-
if (fields.length < this.fieldSize) {
|
|
15
|
-
throw errors.fieldLengthNotMatching(this.fieldSize, fields.length);
|
|
16
|
-
}
|
|
17
|
-
let stack = fields.slice();
|
|
18
|
-
return this.types.map((type) => {
|
|
19
|
-
const numberFieldsNeeded = type.prototype._fields?.length ?? type.sizeInFields?.() ?? -1;
|
|
20
|
-
if (numberFieldsNeeded === -1) {
|
|
21
|
-
throw errors.typeNotCompatible(type.name);
|
|
22
|
-
}
|
|
23
|
-
const structFields = stack.slice(0, numberFieldsNeeded);
|
|
24
|
-
stack = stack.slice(numberFieldsNeeded);
|
|
25
|
-
return type.fromFields(structFields);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
get fieldSize() {
|
|
29
|
-
return this.types
|
|
30
|
-
.map((type) => type.prototype._fields?.length ?? type.sizeInFields?.() ?? 0)
|
|
31
|
-
.reduce((a, b) => a + b, 0);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { StateTransition, MethodPublicOutput } from "@proto-kit/protocol";
|
|
2
|
-
import type { RuntimeModule } from "../runtime/RuntimeModule.js";
|
|
3
|
-
export declare function toStateTransitionsHash(stateTransitions: StateTransition<any>[]): import("snarkyjs/dist/node/lib/field.js").Field;
|
|
4
|
-
export type WrappedMethod = (...args: unknown[]) => MethodPublicOutput;
|
|
5
|
-
export declare function toWrappedMethod(this: RuntimeModule<unknown>, methodName: string, moduleMethod: (...args: unknown[]) => unknown): WrappedMethod;
|
|
6
|
-
export declare function combineMethodName(runtimeModuleName: string, methodName: string): string;
|
|
7
|
-
export declare const runtimeMethodMetadataKey = "yab-method";
|
|
8
|
-
export declare const runtimeMethodNamesMetadataKey = "proto-kit-runtime-methods";
|
|
9
|
-
/**
|
|
10
|
-
* Checks the metadata of the provided runtime module and its method,
|
|
11
|
-
* to see if it has been decorated with @runtimeMethod()
|
|
12
|
-
*
|
|
13
|
-
* @param target - Runtime module to check
|
|
14
|
-
* @param propertyKey - Name of the method to check in the prior runtime module
|
|
15
|
-
* @returns - If the provided method name is a runtime method or not
|
|
16
|
-
*/
|
|
17
|
-
export declare function isRuntimeMethod(target: RuntimeModule<unknown>, propertyKey: string): boolean;
|
|
18
|
-
export declare function runtimeMethod(): (target: RuntimeModule<unknown>, methodName: string, descriptor: PropertyDescriptor) => void;
|
|
19
|
-
//# sourceMappingURL=runtimeMethod.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeMethod.d.ts","sourceRoot":"","sources":["../../../../src/method/runtimeMethod.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EAGf,kBAAkB,EAEnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAYjE,wBAAgB,sBAAsB,CAEpC,gBAAgB,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,mDAczC;AAGD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,kBAAkB,CAAC;AAEvE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,EAC5B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,iBAoC9C;AAED,wBAAgB,iBAAiB,CAC/B,iBAAiB,EAAE,MAAM,EACzB,UAAU,EAAE,MAAM,UAGnB;AAED,eAAO,MAAM,wBAAwB,eAAe,CAAC;AACrD,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AAEzE;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAC9B,WAAW,EAAE,MAAM,WAKpB;AAED,wBAAgB,aAAa,aAEjB,cAAc,OAAO,CAAC,cAClB,MAAM,cACN,kBAAkB,UAuFjC"}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { container } from "tsyringe";
|
|
2
|
-
import { DefaultProvableHashList, ProvableStateTransition, MethodPublicOutput, RuntimeMethodExecutionContext } from "@proto-kit/protocol";
|
|
3
|
-
import { toProver } from "@proto-kit/common";
|
|
4
|
-
const errors = {
|
|
5
|
-
runtimeNotProvided: (name) => new Error(`Runtime was not provided for module: ${name}`),
|
|
6
|
-
methodInputsNotProvided: () => new Error("Method execution inputs not provided, provide them via context.inputs"),
|
|
7
|
-
};
|
|
8
|
-
export function toStateTransitionsHash(
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
stateTransitions) {
|
|
11
|
-
const stateTransitionsHashList = new DefaultProvableHashList(ProvableStateTransition);
|
|
12
|
-
return stateTransitions
|
|
13
|
-
.map((stateTransition) => stateTransition.toProvable())
|
|
14
|
-
.reduce((allStateTransitionsHashList, stateTransition) => allStateTransitionsHashList.push(stateTransition), stateTransitionsHashList)
|
|
15
|
-
.toField();
|
|
16
|
-
}
|
|
17
|
-
export function toWrappedMethod(methodName, moduleMethod) {
|
|
18
|
-
const executionContext = container.resolve(RuntimeMethodExecutionContext);
|
|
19
|
-
const wrappedMethod = (...args) => {
|
|
20
|
-
Reflect.apply(moduleMethod, this, args);
|
|
21
|
-
const { result: { stateTransitions, status }, input, } = executionContext.current();
|
|
22
|
-
const stateTransitionsHash = toStateTransitionsHash(stateTransitions);
|
|
23
|
-
if (input === undefined) {
|
|
24
|
-
throw errors.methodInputsNotProvided();
|
|
25
|
-
}
|
|
26
|
-
const transactionHash = input.transaction.hash();
|
|
27
|
-
const networkStateHash = input.networkState.hash();
|
|
28
|
-
return new MethodPublicOutput({
|
|
29
|
-
stateTransitionsHash,
|
|
30
|
-
status,
|
|
31
|
-
transactionHash,
|
|
32
|
-
networkStateHash,
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(wrappedMethod, "name", {
|
|
36
|
-
value: `wrapped_${methodName}`,
|
|
37
|
-
writable: false,
|
|
38
|
-
});
|
|
39
|
-
return wrappedMethod;
|
|
40
|
-
}
|
|
41
|
-
export function combineMethodName(runtimeModuleName, methodName) {
|
|
42
|
-
return `${runtimeModuleName}.${methodName}`;
|
|
43
|
-
}
|
|
44
|
-
export const runtimeMethodMetadataKey = "yab-method";
|
|
45
|
-
export const runtimeMethodNamesMetadataKey = "proto-kit-runtime-methods";
|
|
46
|
-
/**
|
|
47
|
-
* Checks the metadata of the provided runtime module and its method,
|
|
48
|
-
* to see if it has been decorated with @runtimeMethod()
|
|
49
|
-
*
|
|
50
|
-
* @param target - Runtime module to check
|
|
51
|
-
* @param propertyKey - Name of the method to check in the prior runtime module
|
|
52
|
-
* @returns - If the provided method name is a runtime method or not
|
|
53
|
-
*/
|
|
54
|
-
export function isRuntimeMethod(target, propertyKey) {
|
|
55
|
-
return Boolean(Reflect.getMetadata(runtimeMethodMetadataKey, target, propertyKey));
|
|
56
|
-
}
|
|
57
|
-
export function runtimeMethod() {
|
|
58
|
-
return (target, methodName, descriptor) => {
|
|
59
|
-
const executionContext = container.resolve(RuntimeMethodExecutionContext);
|
|
60
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
61
|
-
let data = Reflect.getMetadata(runtimeMethodNamesMetadataKey, target);
|
|
62
|
-
if (data !== undefined) {
|
|
63
|
-
data.push(methodName);
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
data = [methodName];
|
|
67
|
-
}
|
|
68
|
-
Reflect.defineMetadata(runtimeMethodNamesMetadataKey, data, target);
|
|
69
|
-
Reflect.defineMetadata(runtimeMethodMetadataKey, true, target, methodName);
|
|
70
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
71
|
-
const simulatedMethod = descriptor.value;
|
|
72
|
-
descriptor.value = function value(...args) {
|
|
73
|
-
const constructorName = this.constructor.name;
|
|
74
|
-
/**
|
|
75
|
-
* If its a top level method call, wrap it into a wrapped method,
|
|
76
|
-
* since it'll be turned into a real/mock prover in provableMethod().
|
|
77
|
-
*
|
|
78
|
-
* Otherwise provableMethod() will just call the originalMethod provided
|
|
79
|
-
* if method is not called at the top level.
|
|
80
|
-
*/
|
|
81
|
-
const simulatedWrappedMethod = Reflect.apply(toWrappedMethod, this, [
|
|
82
|
-
methodName,
|
|
83
|
-
simulatedMethod,
|
|
84
|
-
]);
|
|
85
|
-
/**
|
|
86
|
-
* Before the prover runs, make sure it is operating on the correct
|
|
87
|
-
* RuntimeMethodExecutionContext state, meaning it enters and exits
|
|
88
|
-
* the context properly.
|
|
89
|
-
*/
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
91
|
-
async function prover() {
|
|
92
|
-
executionContext.beforeMethod(constructorName, methodName, args);
|
|
93
|
-
const innerProver = toProver(combineMethodName(constructorName, methodName), simulatedWrappedMethod, false, ...args).bind(this);
|
|
94
|
-
// eslint-disable-next-line @typescript-eslint/init-declarations
|
|
95
|
-
let result;
|
|
96
|
-
try {
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
98
|
-
result = await Reflect.apply(innerProver, this, args);
|
|
99
|
-
}
|
|
100
|
-
finally {
|
|
101
|
-
executionContext.afterMethod();
|
|
102
|
-
}
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
executionContext.beforeMethod(constructorName, methodName, args);
|
|
106
|
-
if (executionContext.isTopLevel) {
|
|
107
|
-
if (!this.runtime) {
|
|
108
|
-
throw errors.runtimeNotProvided(constructorName);
|
|
109
|
-
}
|
|
110
|
-
executionContext.setProver(prover.bind(this.runtime.zkProgrammable));
|
|
111
|
-
}
|
|
112
|
-
// eslint-disable-next-line @typescript-eslint/init-declarations
|
|
113
|
-
let result;
|
|
114
|
-
try {
|
|
115
|
-
result = Reflect.apply(simulatedMethod, this, args);
|
|
116
|
-
}
|
|
117
|
-
finally {
|
|
118
|
-
executionContext.afterMethod();
|
|
119
|
-
}
|
|
120
|
-
return result;
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { StaticConfigurableModule, TypedClass } from "@proto-kit/common";
|
|
2
|
-
import { RuntimeModule } from "../runtime/RuntimeModule.js";
|
|
3
|
-
/**
|
|
4
|
-
* Marks the decorated class as a runtime module, while also
|
|
5
|
-
* making it injectable with our dependency injection solution.
|
|
6
|
-
*/
|
|
7
|
-
export declare function runtimeModule(): (target: StaticConfigurableModule<unknown> & TypedClass<RuntimeModule<unknown>>) => void;
|
|
8
|
-
//# sourceMappingURL=decorator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../../src/module/decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,aAAa,aAMjB,yBAAyB,OAAO,CAAC,GACvC,WAAW,cAAc,OAAO,CAAC,CAAC,UAIvC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { injectable } from "tsyringe";
|
|
2
|
-
/**
|
|
3
|
-
* Marks the decorated class as a runtime module, while also
|
|
4
|
-
* making it injectable with our dependency injection solution.
|
|
5
|
-
*/
|
|
6
|
-
export function runtimeModule() {
|
|
7
|
-
return (
|
|
8
|
-
/**
|
|
9
|
-
* Check if the target class extends RuntimeModule, while
|
|
10
|
-
* also providing static config presets
|
|
11
|
-
*/
|
|
12
|
-
target) => {
|
|
13
|
-
injectable()(target);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Runtime, RuntimeModulesRecord } from "./Runtime";
|
|
2
|
-
/**
|
|
3
|
-
* How do we encode MethodIds
|
|
4
|
-
* A MethodId is defined as the following in little-endian
|
|
5
|
-
* [0
|
|
6
|
-
* ...hash(stringToField(moduleName))[0..128],
|
|
7
|
-
* ...hash(stringToField(methodName))[0..128]
|
|
8
|
-
* ]
|
|
9
|
-
*/
|
|
10
|
-
export declare class MethodIdResolver {
|
|
11
|
-
private readonly runtime;
|
|
12
|
-
private readonly modules;
|
|
13
|
-
private readonly dictionary;
|
|
14
|
-
constructor(runtime: Runtime<RuntimeModulesRecord>, modules: RuntimeModulesRecord);
|
|
15
|
-
getMethodNameFromId(methodId: bigint): [string, string] | undefined;
|
|
16
|
-
getMethodId(moduleName: string, methodName: string): bigint;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=MethodIdResolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MethodIdResolver.d.ts","sourceRoot":"","sources":["../../../../src/runtime/MethodIdResolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAM/D;;;;;;;GAOG;AACH,qBAAa,gBAAgB;IAIzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJ1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiC;gBAGzC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACtC,OAAO,EAAE,oBAAoB;IAmBzC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAsBnE,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM;CAQnE"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { singleFieldToString, stringToField } from "@proto-kit/protocol";
|
|
2
|
-
const offset = 128n;
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
4
|
-
const modulus = 2n ** (offset - 1n);
|
|
5
|
-
/**
|
|
6
|
-
* How do we encode MethodIds
|
|
7
|
-
* A MethodId is defined as the following in little-endian
|
|
8
|
-
* [0
|
|
9
|
-
* ...hash(stringToField(moduleName))[0..128],
|
|
10
|
-
* ...hash(stringToField(methodName))[0..128]
|
|
11
|
-
* ]
|
|
12
|
-
*/
|
|
13
|
-
export class MethodIdResolver {
|
|
14
|
-
constructor(runtime, modules) {
|
|
15
|
-
this.runtime = runtime;
|
|
16
|
-
this.modules = modules;
|
|
17
|
-
this.dictionary = {};
|
|
18
|
-
this.dictionary = runtime.runtimeModuleNames.reduce((dict, moduleName) => {
|
|
19
|
-
this.runtime.assertIsValidModuleName(modules, moduleName);
|
|
20
|
-
dict[(stringToField(moduleName).toBigInt() % modulus).toString()] =
|
|
21
|
-
moduleName;
|
|
22
|
-
runtime.resolve(moduleName).runtimeMethodNames.forEach((methodName) => {
|
|
23
|
-
dict[(stringToField(methodName).toBigInt() % modulus).toString()] =
|
|
24
|
-
methodName;
|
|
25
|
-
});
|
|
26
|
-
return dict;
|
|
27
|
-
}, {});
|
|
28
|
-
}
|
|
29
|
-
getMethodNameFromId(methodId) {
|
|
30
|
-
const moduleNameHash = singleFieldToString(methodId >> offset);
|
|
31
|
-
const methodNameHash = singleFieldToString(methodId % modulus);
|
|
32
|
-
const moduleName = this.dictionary[moduleNameHash];
|
|
33
|
-
// eslint-disable-next-line no-warning-comments
|
|
34
|
-
// TODO Replace by throwing exception?
|
|
35
|
-
if (moduleName === undefined) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
this.runtime.assertIsValidModuleName(this.modules, moduleName);
|
|
39
|
-
const methodName = this.dictionary[methodNameHash];
|
|
40
|
-
if (methodName === undefined) {
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
return [moduleName, methodName];
|
|
44
|
-
}
|
|
45
|
-
getMethodId(moduleName, methodName) {
|
|
46
|
-
this.runtime.assertIsValidModuleName(this.modules, moduleName);
|
|
47
|
-
return ((stringToField(moduleName).toBigInt() % modulus << offset) +
|
|
48
|
-
(stringToField(methodName).toBigInt() % modulus));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { Experimental } from "snarkyjs";
|
|
2
|
-
import { DependencyContainer } from "tsyringe";
|
|
3
|
-
import { StringKeyOf, ModuleContainer, ModulesConfig, ModulesRecord, TypedClass, ZkProgrammable, PlainZkProgram, WithZkProgrammable, AreProofsEnabled } from "@proto-kit/common";
|
|
4
|
-
import { MethodPublicOutput, StateServiceProvider, StateService } from "@proto-kit/protocol";
|
|
5
|
-
import { RuntimeModule } from "./RuntimeModule";
|
|
6
|
-
/**
|
|
7
|
-
* Record of modules accepted by the Runtime module container.
|
|
8
|
-
*
|
|
9
|
-
* We have to use TypedClass since RuntimeModule
|
|
10
|
-
* is an abstract class
|
|
11
|
-
*/
|
|
12
|
-
export type RuntimeModulesRecord = ModulesRecord<TypedClass<RuntimeModule<unknown>>>;
|
|
13
|
-
/**
|
|
14
|
-
* Definition / required arguments for the Runtime class
|
|
15
|
-
*/
|
|
16
|
-
export interface RuntimeDefinition<Modules extends RuntimeModulesRecord> {
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated
|
|
19
|
-
*/
|
|
20
|
-
state?: StateService;
|
|
21
|
-
modules: Modules;
|
|
22
|
-
config?: ModulesConfig<Modules>;
|
|
23
|
-
}
|
|
24
|
-
export declare class RuntimeZkProgrammable<Modules extends RuntimeModulesRecord> extends ZkProgrammable<undefined, MethodPublicOutput> {
|
|
25
|
-
runtime: Runtime<Modules>;
|
|
26
|
-
constructor(runtime: Runtime<Modules>);
|
|
27
|
-
get appChain(): AreProofsEnabled | undefined;
|
|
28
|
-
zkProgramFactory(): PlainZkProgram<undefined, MethodPublicOutput>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Wrapper for an application specific runtime, which helps orchestrate
|
|
32
|
-
* runtime modules into an interoperable runtime.
|
|
33
|
-
*/
|
|
34
|
-
export declare class Runtime<Modules extends RuntimeModulesRecord> extends ModuleContainer<Modules> implements WithZkProgrammable<undefined, MethodPublicOutput> {
|
|
35
|
-
static from<Modules extends RuntimeModulesRecord>(definition: RuntimeDefinition<Modules>): Runtime<Modules>;
|
|
36
|
-
program?: ReturnType<typeof Experimental.ZkProgram>;
|
|
37
|
-
definition: RuntimeDefinition<Modules>;
|
|
38
|
-
zkProgrammable: ZkProgrammable<undefined, MethodPublicOutput>;
|
|
39
|
-
private readonly stateServiceProviderInstance;
|
|
40
|
-
/**
|
|
41
|
-
* Creates a new Runtime from the provided config
|
|
42
|
-
*
|
|
43
|
-
* @param modules - Configuration object for the constructed Runtime
|
|
44
|
-
*/
|
|
45
|
-
constructor(definition: RuntimeDefinition<Modules>);
|
|
46
|
-
start(): void;
|
|
47
|
-
get appChain(): AreProofsEnabled | undefined;
|
|
48
|
-
get stateService(): StateService;
|
|
49
|
-
get stateServiceProvider(): StateServiceProvider;
|
|
50
|
-
/**
|
|
51
|
-
* @returns The dependency injection container of this runtime
|
|
52
|
-
*/
|
|
53
|
-
get dependencyContainer(): DependencyContainer;
|
|
54
|
-
/**
|
|
55
|
-
* @param methodId The encoded name of the method to call.
|
|
56
|
-
* Encoding: "stringToField(module.name) << 128 + stringToField(method-name)"
|
|
57
|
-
*/
|
|
58
|
-
getMethodById(methodId: bigint): ((...args: unknown[]) => unknown) | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* Add a name and other respective properties required by RuntimeModules,
|
|
61
|
-
* that come from the current Runtime
|
|
62
|
-
*
|
|
63
|
-
* @param moduleName - Name of the runtime module to decorate
|
|
64
|
-
* @param containedModule
|
|
65
|
-
*/
|
|
66
|
-
decorateModule(moduleName: StringKeyOf<Modules>, containedModule: InstanceType<Modules[StringKeyOf<Modules>]>): void;
|
|
67
|
-
/**
|
|
68
|
-
* @returns A list of names of all the registered module names
|
|
69
|
-
*/
|
|
70
|
-
get runtimeModuleNames(): string[];
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=Runtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Runtime.d.ts","sourceRoot":"","sources":["../../../../src/runtime/Runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAc,MAAM,UAAU,CAAC;AAC3D,OAAO,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACb,MAAM,qBAAqB,CAAC;AAU7B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAC9C,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CACnC,CAAC;AAOF;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,oBAAoB;IACrE;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACjC;AAED,qBAAa,qBAAqB,CAChC,OAAO,SAAS,oBAAoB,CACpC,SAAQ,cAAc,CAAC,SAAS,EAAE,kBAAkB,CAAC;IAE3B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;gBAAzB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;IAInD,IAAW,QAAQ,iCAElB;IAEM,gBAAgB,IAAI,cAAc,CAAC,SAAS,EAAE,kBAAkB,CAAC;CAgHzE;AAED;;;GAGG;AACH,qBACa,OAAO,CAAC,OAAO,SAAS,oBAAoB,CACvD,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,kBAAkB,CAAC,SAAS,EAAE,kBAAkB,CAAC;WAE9C,IAAI,CAAC,OAAO,SAAS,oBAAoB,EACrD,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAMjC,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;IAEpD,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEvC,cAAc,EAAE,cAAc,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAErE,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAG3C;IAEF;;;;OAIG;gBACgB,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAQlD,KAAK;IAOZ,IAAW,QAAQ,IAAI,gBAAgB,GAAG,SAAS,CAElD;IAED,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED,IAAW,oBAAoB,IAAI,oBAAoB,CAEtD;IAED;;OAEG;IACH,IAAW,mBAAmB,IAAI,mBAAmB,CAEpD;IAED;;;OAGG;IACI,aAAa,CAClB,QAAQ,EAAE,MAAM,GACf,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,SAAS;IAwBhD;;;;;;OAMG;IACI,cAAc,CACnB,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,EAChC,eAAe,EAAE,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IAQ9D;;OAEG;IACH,IAAW,kBAAkB,aAE5B;CACF"}
|