@degenerate/generic 0.2.6 → 0.3.2
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/application/audit-log/additional-ids/create-audit-log-additional-ids-with-query.d.ts.map +1 -1
- package/dist/application/audit-log/additional-ids/create-multiple-path-alai.d.ts.map +1 -1
- package/dist/application/audit-log/additional-ids/create-query-audit-log-for-alai.d.ts.map +1 -1
- package/dist/application/audit-log/create-application-audit-log.d.ts.map +1 -1
- package/dist/application/audit-log/create-application-audit-log.js +1 -1
- package/dist/application/database/firestore/generics/add-items-to-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/add-items-to-database.js +2 -2
- package/dist/application/database/firestore/generics/add-or-update-items-to-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/add-or-update-items-to-database.js +3 -3
- package/dist/application/database/firestore/generics/create-database-change-information.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/delete-items-on-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/delete-items-on-database.js +2 -2
- package/dist/application/database/firestore/generics/get-item-from-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/get-item-from-database.js +2 -2
- package/dist/application/database/firestore/generics/get-items-different-path-on-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/get-items-different-path-on-database.js +2 -2
- package/dist/application/database/firestore/generics/get-items-from-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/get-items-from-database.js +1 -1
- package/dist/application/database/firestore/generics/update-items-on-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/update-items-on-database.js +2 -2
- package/dist/application/database/firestore/generics/update-items-properties-on-database.d.ts.map +1 -1
- package/dist/application/database/firestore/generics/update-items-properties-on-database.js +2 -2
- package/dist/authorization/index.d.ts +1 -0
- package/dist/authorization/index.d.ts.map +1 -1
- package/dist/authorization/index.js +1 -0
- package/dist/authorization/jwt/keys/create-public-key-pem.d.ts.map +1 -1
- package/dist/authorization/jwt/keys/create-secret-key-pem.d.ts.map +1 -1
- package/dist/authorization/jwt/sign/create-authorization-issuer.d.ts.map +1 -1
- package/dist/authorization/jwt/sign/create-authorization-subject.d.ts.map +1 -1
- package/dist/authorization/jwt/sign/create-jwt-options.d.ts +7 -1
- package/dist/authorization/jwt/sign/create-jwt-options.d.ts.map +1 -1
- package/dist/authorization/jwt/sign/create-jwt-signed-token.d.ts.map +1 -1
- package/dist/authorization/jwt/transform/transform-token-payload-to-safe-payload.d.ts.map +1 -1
- package/dist/authorization/jwt/verify/get-decoded-jwt-header.d.ts.map +1 -1
- package/dist/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.d.ts.map +1 -1
- package/dist/authorization/jwt/verify/verify-jwt-signed-token.d.ts.map +1 -1
- package/dist/authorization/safe/request/decode-bearer-token.d.ts.map +1 -1
- package/dist/authorization/safe/request/decode-safe-request.d.ts.map +1 -1
- package/dist/authorization/safe/request/determine-issuer-from-request.d.ts.map +1 -1
- package/dist/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts.map +1 -1
- package/dist/authorization/safe/request/verify-jwt-bearer-token-for-audience.d.ts +31 -0
- package/dist/authorization/safe/request/verify-jwt-bearer-token-for-audience.d.ts.map +1 -0
- package/dist/authorization/safe/request/verify-jwt-bearer-token-for-audience.js +50 -0
- package/dist/authorization/safe/validation/jwt/payload/verify-authorization-audience.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/verify-token-header.d.ts.map +1 -1
- package/dist/authorization/safe/validation/jwt/verify-token-payload.d.ts.map +1 -1
- package/dist/crypto/calculate-combined-hash.d.ts.map +1 -1
- package/dist/crypto/calculate-hash.d.ts +1 -1
- package/dist/crypto/calculate-hash.d.ts.map +1 -1
- package/dist/crypto/calculate-hash.js +1 -1
- package/dist/crypto/index.d.ts +1 -0
- package/dist/crypto/index.d.ts.map +1 -1
- package/dist/crypto/index.js +1 -0
- package/dist/crypto/private-public-keys/create-key-pair-from-mnemonic.d.ts.map +1 -1
- package/dist/crypto/private-public-keys/create-key-pair-from-private-key.d.ts.map +1 -1
- package/dist/crypto/private-public-keys/create-key-pair-from-private-key.js +1 -1
- package/dist/crypto/private-public-keys/create-key-pair-from-public-key.d.ts +11 -0
- package/dist/crypto/private-public-keys/create-key-pair-from-public-key.d.ts.map +1 -0
- package/dist/crypto/private-public-keys/create-key-pair-from-public-key.js +51 -0
- package/dist/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.d.ts.map +1 -1
- package/dist/crypto/private-public-keys/generation/generate-key-pair.d.ts.map +1 -1
- package/dist/crypto/private-public-keys/generation/get-private-public-key-from-keypair.d.ts.map +1 -1
- package/dist/crypto/signature/create-crypto-signature.d.ts +11 -0
- package/dist/crypto/signature/create-crypto-signature.d.ts.map +1 -1
- package/dist/crypto/signature/create-crypto-signature.js +14 -1
- package/dist/crypto/signature/verify-crypto-signature-by-data.d.ts +4 -0
- package/dist/crypto/signature/verify-crypto-signature-by-data.d.ts.map +1 -1
- package/dist/crypto/signature/verify-crypto-signature-by-data.js +8 -2
- package/dist/crypto/signature/verify-crypto-signature-by-hash.d.ts +4 -0
- package/dist/crypto/signature/verify-crypto-signature-by-hash.d.ts.map +1 -1
- package/dist/crypto/signature/verify-crypto-signature-by-hash.js +7 -1
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +2 -0
- package/dist/errors/share-data/share-data-errors.d.ts +92 -1
- package/dist/errors/share-data/share-data-errors.d.ts.map +1 -1
- package/dist/errors/share-data/share-data-errors.js +130 -1
- package/dist/errors/shareblock/shareblock-errors.d.ts +40 -0
- package/dist/errors/shareblock/shareblock-errors.d.ts.map +1 -0
- package/dist/errors/shareblock/shareblock-errors.js +50 -0
- package/dist/errors/validation/crypto-validation-errors.d.ts +8 -0
- package/dist/errors/validation/crypto-validation-errors.d.ts.map +1 -0
- package/dist/errors/validation/crypto-validation-errors.js +15 -0
- package/dist/helpers/array/array-helpers.d.ts.map +1 -1
- package/dist/helpers/crypto/cryptography-helpers.d.ts.map +1 -1
- package/dist/helpers/data/data-helpers.d.ts.map +1 -1
- package/dist/helpers/file/file-helpers.d.ts.map +1 -1
- package/dist/helpers/id-helpers.d.ts.map +1 -1
- package/dist/helpers/lodash/lodash-helpers.d.ts.map +1 -1
- package/dist/helpers/object-helpers.d.ts.map +1 -1
- package/dist/helpers/object-validation-helpers.d.ts.map +1 -1
- package/dist/helpers/request/params-object-helpers.d.ts +6 -6
- package/dist/helpers/request/params-object-helpers.d.ts.map +1 -1
- package/dist/helpers/request/params-object-helpers.js +11 -11
- package/dist/helpers/request/query-object-helpers.d.ts.map +1 -1
- package/dist/helpers/request/request-object-helpers.d.ts.map +1 -1
- package/dist/models/application/audit-log/application-audit-log-models.d.ts +82 -92
- package/dist/models/application/audit-log/application-audit-log-models.d.ts.map +1 -1
- package/dist/models/application/database/firestore-models.d.ts +158 -307
- package/dist/models/application/database/firestore-models.d.ts.map +1 -1
- package/dist/models/authorization/authorization-models.d.ts +34 -44
- package/dist/models/authorization/authorization-models.d.ts.map +1 -1
- package/dist/models/authorization/authorization-models.js +2 -2
- package/dist/models/crypto/crypto-models.d.ts +1 -7
- package/dist/models/crypto/crypto-models.d.ts.map +1 -1
- package/dist/models/data/data-models.d.ts +27 -13
- package/dist/models/data/data-models.d.ts.map +1 -1
- package/dist/models/data/data-models.js +23 -2
- package/dist/models/dynamic-execution/dynamic-execution-models.d.ts +1 -9
- package/dist/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -1
- package/dist/models/events/share-event-models.d.ts +90 -119
- package/dist/models/events/share-event-models.d.ts.map +1 -1
- package/dist/models/events/share-event-models.js +34 -3
- package/dist/models/functions/share-data-function-models.d.ts +23 -193
- package/dist/models/functions/share-data-function-models.d.ts.map +1 -1
- package/dist/models/functions/share-data-function-models.js +1 -1
- package/dist/models/generic/request-response-models.d.ts +1 -7
- package/dist/models/generic/request-response-models.d.ts.map +1 -1
- package/dist/models/index.d.ts +7 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +7 -1
- package/dist/models/rules/share-rule-models.d.ts +759 -1116
- package/dist/models/rules/share-rule-models.d.ts.map +1 -1
- package/dist/models/rules/share-rule-models.js +6 -6
- package/dist/models/safe/safe-transaction-models.d.ts +28 -30
- package/dist/models/safe/safe-transaction-models.d.ts.map +1 -1
- package/dist/models/safe/transactions/authorities-transactions-models.d.ts +77 -419
- package/dist/models/safe/transactions/authorities-transactions-models.d.ts.map +1 -1
- package/dist/models/safe/transactions/authorities-transactions-models.js +3 -3
- package/dist/models/safe/transactions/events-transactions-models.d.ts +89 -0
- package/dist/models/safe/transactions/events-transactions-models.d.ts.map +1 -0
- package/dist/models/safe/transactions/events-transactions-models.js +53 -0
- package/dist/models/safe/transactions/functions-transactions-models.d.ts +89 -0
- package/dist/models/safe/transactions/functions-transactions-models.d.ts.map +1 -0
- package/dist/models/safe/transactions/functions-transactions-models.js +53 -0
- package/dist/models/safe/transactions/rules-transactions-models.d.ts +59 -603
- package/dist/models/safe/transactions/rules-transactions-models.d.ts.map +1 -1
- package/dist/models/safe/transactions/sharedata-transactions-models.d.ts +302 -0
- package/dist/models/safe/transactions/sharedata-transactions-models.d.ts.map +1 -0
- package/dist/models/safe/transactions/sharedata-transactions-models.js +79 -0
- package/dist/models/share-data/share-data-crypto-models.d.ts +307 -0
- package/dist/models/share-data/share-data-crypto-models.d.ts.map +1 -0
- package/dist/models/share-data/share-data-crypto-models.js +91 -0
- package/dist/models/share-data/share-data-models.d.ts +114 -0
- package/dist/models/share-data/share-data-models.d.ts.map +1 -0
- package/dist/models/share-data/{share-data.js → share-data-models.js} +1 -1
- package/dist/models/share-data/share-data-persistence-models.d.ts +158 -0
- package/dist/models/share-data/share-data-persistence-models.d.ts.map +1 -0
- package/dist/models/share-data/share-data-persistence-models.js +94 -0
- package/dist/models/shareblock/shareblock-models.d.ts +280 -0
- package/dist/models/shareblock/shareblock-models.d.ts.map +1 -0
- package/dist/models/shareblock/shareblock-models.js +222 -0
- package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts.map +1 -1
- package/dist/transactions/authority/create-safe-transaction-authority.d.ts.map +1 -1
- package/package.json +32 -21
- package/dist/models/share-data/share-data.d.ts +0 -181
- package/dist/models/share-data/share-data.d.ts.map +0 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* This contains the interface for the share data initial crypto data schema
|
|
4
|
+
*/
|
|
5
|
+
export declare const IShareDataInitialCryptoDataSchema: z.ZodObject<{
|
|
6
|
+
publicKey: z.ZodString;
|
|
7
|
+
shareDataHash: z.ZodString;
|
|
8
|
+
shareDataSignature: z.ZodString;
|
|
9
|
+
timestamp: z.ZodNumber;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type IShareDataInitialCryptoData = z.infer<typeof IShareDataInitialCryptoDataSchema>;
|
|
12
|
+
/**
|
|
13
|
+
* This contains the interface for the share data crypto proof schema.
|
|
14
|
+
*
|
|
15
|
+
* `purpose` identifies what this proof attests to (e.g. `'deposit'`,
|
|
16
|
+
* `'rule-balance'`, `'seed-function'`). It is folded into the canonical
|
|
17
|
+
* signed string so two proofs taken over the same share-data state at the
|
|
18
|
+
* same moment but tagged with different purposes produce different
|
|
19
|
+
* signatures. Verifiers consume `purpose` directly from the proof — the
|
|
20
|
+
* proof is self-describing, so the structural-add boundary
|
|
21
|
+
* (`addFunction` / `addRule`) does not need a separate purpose argument.
|
|
22
|
+
*/
|
|
23
|
+
export declare const IShareDataCryptoProofSchema: z.ZodObject<{
|
|
24
|
+
publicKey: z.ZodString;
|
|
25
|
+
shareDataHash: z.ZodString;
|
|
26
|
+
shareDataPreviousHash: z.ZodString;
|
|
27
|
+
shareDataSignature: z.ZodString;
|
|
28
|
+
timestamp: z.ZodNumber;
|
|
29
|
+
purpose: z.ZodString;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type IShareDataCryptoProof = z.infer<typeof IShareDataCryptoProofSchema>;
|
|
32
|
+
/**
|
|
33
|
+
* A bundle of structural proofs keyed by their `purpose`, used as the
|
|
34
|
+
* wire-format input to ShareBlock factories when the client (rather than
|
|
35
|
+
* the server) signs each registration. Matches how `_structuralProofs`
|
|
36
|
+
* end up shaped on a constructed ShareData — one proof per
|
|
37
|
+
* `addFunction` / `addRule` call.
|
|
38
|
+
*/
|
|
39
|
+
export declare const ShareDataProofsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
40
|
+
publicKey: z.ZodString;
|
|
41
|
+
shareDataHash: z.ZodString;
|
|
42
|
+
shareDataPreviousHash: z.ZodString;
|
|
43
|
+
shareDataSignature: z.ZodString;
|
|
44
|
+
timestamp: z.ZodNumber;
|
|
45
|
+
purpose: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
export type ShareDataProofs = z.infer<typeof ShareDataProofsSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* This contains the interface for the share data property config
|
|
50
|
+
* for creating strings from the object to ensure that signatures and
|
|
51
|
+
* hashes are consistent
|
|
52
|
+
*/
|
|
53
|
+
export declare const IShareDataPropertyConfigSchema: z.ZodObject<{
|
|
54
|
+
key: z.ZodString;
|
|
55
|
+
process: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodString>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type IShareDataPropertyConfig = z.infer<typeof IShareDataPropertyConfigSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* This contains the interface for the share data config array
|
|
60
|
+
* for creating strings from the object to ensure that signatures and
|
|
61
|
+
* hashes are consistent
|
|
62
|
+
*/
|
|
63
|
+
export declare const IShareDataConfigSchema: z.ZodArray<z.ZodObject<{
|
|
64
|
+
key: z.ZodString;
|
|
65
|
+
process: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodString>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
export type IShareDataConfig = z.infer<typeof IShareDataConfigSchema>;
|
|
68
|
+
/**
|
|
69
|
+
* This contains the interface for additional data to include in the share data string.
|
|
70
|
+
*
|
|
71
|
+
* `purpose` is required and identifies what this signed snapshot is attesting to
|
|
72
|
+
* (e.g. `'deposit'`, `'rule-balance'`, `'seed-function'`). It is folded into the
|
|
73
|
+
* canonical string `calculateShareDataString` produces, so two proofs taken
|
|
74
|
+
* over the same share-data state at the same moment but tagged with different
|
|
75
|
+
* purposes produce different hashes and therefore different signatures. This
|
|
76
|
+
* structurally prevents replaying a proof signed for one purpose as a proof
|
|
77
|
+
* for another.
|
|
78
|
+
*/
|
|
79
|
+
export declare const IShareDataAdditionalValuesToIncludeSchema: z.ZodObject<{
|
|
80
|
+
purpose: z.ZodString;
|
|
81
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
+
ruleId: z.ZodString;
|
|
83
|
+
currentDataConditions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
84
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
85
|
+
IS: "IS";
|
|
86
|
+
IS_NOT: "IS_NOT";
|
|
87
|
+
}>;
|
|
88
|
+
targettedProperty: z.ZodString;
|
|
89
|
+
conditionType: z.ZodLiteral<"TYPEOF">;
|
|
90
|
+
conditionValue: z.ZodEnum<{
|
|
91
|
+
NULL: "NULL";
|
|
92
|
+
STRING: "STRING";
|
|
93
|
+
NUMBER: "NUMBER";
|
|
94
|
+
INTEGER: "INTEGER";
|
|
95
|
+
BOOLEAN: "BOOLEAN";
|
|
96
|
+
OBJECT: "OBJECT";
|
|
97
|
+
ARRAY: "ARRAY";
|
|
98
|
+
UNDEFINED: "UNDEFINED";
|
|
99
|
+
FUNCTION: "FUNCTION";
|
|
100
|
+
BIGINT: "BIGINT";
|
|
101
|
+
}>;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
104
|
+
IS: "IS";
|
|
105
|
+
IS_NOT: "IS_NOT";
|
|
106
|
+
}>;
|
|
107
|
+
targettedProperty: z.ZodString;
|
|
108
|
+
conditionType: z.ZodLiteral<"EQUAL">;
|
|
109
|
+
conditionValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
112
|
+
IS: "IS";
|
|
113
|
+
IS_NOT: "IS_NOT";
|
|
114
|
+
}>;
|
|
115
|
+
targettedProperty: z.ZodString;
|
|
116
|
+
conditionType: z.ZodEnum<{
|
|
117
|
+
GREATER_THAN: "GREATER_THAN";
|
|
118
|
+
LESS_THAN: "LESS_THAN";
|
|
119
|
+
GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL";
|
|
120
|
+
LESS_THAN_OR_EQUAL: "LESS_THAN_OR_EQUAL";
|
|
121
|
+
}>;
|
|
122
|
+
conditionValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
125
|
+
IS: "IS";
|
|
126
|
+
IS_NOT: "IS_NOT";
|
|
127
|
+
}>;
|
|
128
|
+
targettedProperty: z.ZodString;
|
|
129
|
+
conditionType: z.ZodLiteral<"CONTAINS">;
|
|
130
|
+
conditionValue: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
133
|
+
IS: "IS";
|
|
134
|
+
IS_NOT: "IS_NOT";
|
|
135
|
+
}>;
|
|
136
|
+
targettedProperty: z.ZodString;
|
|
137
|
+
conditionType: z.ZodEnum<{
|
|
138
|
+
STARTS_WITH: "STARTS_WITH";
|
|
139
|
+
ENDS_WITH: "ENDS_WITH";
|
|
140
|
+
}>;
|
|
141
|
+
conditionValue: z.ZodString;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
144
|
+
IS: "IS";
|
|
145
|
+
IS_NOT: "IS_NOT";
|
|
146
|
+
}>;
|
|
147
|
+
targettedProperty: z.ZodString;
|
|
148
|
+
conditionType: z.ZodLiteral<"NULL">;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
151
|
+
IS: "IS";
|
|
152
|
+
IS_NOT: "IS_NOT";
|
|
153
|
+
}>;
|
|
154
|
+
targettedProperty: z.ZodString;
|
|
155
|
+
conditionType: z.ZodEnum<{
|
|
156
|
+
TRUE: "TRUE";
|
|
157
|
+
FALSE: "FALSE";
|
|
158
|
+
}>;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
161
|
+
IS: "IS";
|
|
162
|
+
IS_NOT: "IS_NOT";
|
|
163
|
+
}>;
|
|
164
|
+
targettedProperty: z.ZodString;
|
|
165
|
+
conditionType: z.ZodLiteral<"EMPTY">;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
168
|
+
IS: "IS";
|
|
169
|
+
IS_NOT: "IS_NOT";
|
|
170
|
+
}>;
|
|
171
|
+
targettedProperty: z.ZodString;
|
|
172
|
+
conditionType: z.ZodEnum<{
|
|
173
|
+
PATTERN: "PATTERN";
|
|
174
|
+
}>;
|
|
175
|
+
conditionValue: z.ZodString;
|
|
176
|
+
}, z.core.$strip>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
177
|
+
proposedDataConditions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
178
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
179
|
+
IS: "IS";
|
|
180
|
+
IS_NOT: "IS_NOT";
|
|
181
|
+
}>;
|
|
182
|
+
targettedProperty: z.ZodString;
|
|
183
|
+
conditionType: z.ZodLiteral<"TYPEOF">;
|
|
184
|
+
conditionValue: z.ZodEnum<{
|
|
185
|
+
NULL: "NULL";
|
|
186
|
+
STRING: "STRING";
|
|
187
|
+
NUMBER: "NUMBER";
|
|
188
|
+
INTEGER: "INTEGER";
|
|
189
|
+
BOOLEAN: "BOOLEAN";
|
|
190
|
+
OBJECT: "OBJECT";
|
|
191
|
+
ARRAY: "ARRAY";
|
|
192
|
+
UNDEFINED: "UNDEFINED";
|
|
193
|
+
FUNCTION: "FUNCTION";
|
|
194
|
+
BIGINT: "BIGINT";
|
|
195
|
+
}>;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
198
|
+
IS: "IS";
|
|
199
|
+
IS_NOT: "IS_NOT";
|
|
200
|
+
}>;
|
|
201
|
+
targettedProperty: z.ZodString;
|
|
202
|
+
conditionType: z.ZodLiteral<"EQUAL">;
|
|
203
|
+
conditionValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
204
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
205
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
206
|
+
IS: "IS";
|
|
207
|
+
IS_NOT: "IS_NOT";
|
|
208
|
+
}>;
|
|
209
|
+
targettedProperty: z.ZodString;
|
|
210
|
+
conditionType: z.ZodEnum<{
|
|
211
|
+
GREATER_THAN: "GREATER_THAN";
|
|
212
|
+
LESS_THAN: "LESS_THAN";
|
|
213
|
+
GREATER_THAN_OR_EQUAL: "GREATER_THAN_OR_EQUAL";
|
|
214
|
+
LESS_THAN_OR_EQUAL: "LESS_THAN_OR_EQUAL";
|
|
215
|
+
}>;
|
|
216
|
+
conditionValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
219
|
+
IS: "IS";
|
|
220
|
+
IS_NOT: "IS_NOT";
|
|
221
|
+
}>;
|
|
222
|
+
targettedProperty: z.ZodString;
|
|
223
|
+
conditionType: z.ZodLiteral<"CONTAINS">;
|
|
224
|
+
conditionValue: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>;
|
|
225
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
226
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
227
|
+
IS: "IS";
|
|
228
|
+
IS_NOT: "IS_NOT";
|
|
229
|
+
}>;
|
|
230
|
+
targettedProperty: z.ZodString;
|
|
231
|
+
conditionType: z.ZodEnum<{
|
|
232
|
+
STARTS_WITH: "STARTS_WITH";
|
|
233
|
+
ENDS_WITH: "ENDS_WITH";
|
|
234
|
+
}>;
|
|
235
|
+
conditionValue: z.ZodString;
|
|
236
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
237
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
238
|
+
IS: "IS";
|
|
239
|
+
IS_NOT: "IS_NOT";
|
|
240
|
+
}>;
|
|
241
|
+
targettedProperty: z.ZodString;
|
|
242
|
+
conditionType: z.ZodLiteral<"NULL">;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
245
|
+
IS: "IS";
|
|
246
|
+
IS_NOT: "IS_NOT";
|
|
247
|
+
}>;
|
|
248
|
+
targettedProperty: z.ZodString;
|
|
249
|
+
conditionType: z.ZodEnum<{
|
|
250
|
+
TRUE: "TRUE";
|
|
251
|
+
FALSE: "FALSE";
|
|
252
|
+
}>;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
255
|
+
IS: "IS";
|
|
256
|
+
IS_NOT: "IS_NOT";
|
|
257
|
+
}>;
|
|
258
|
+
targettedProperty: z.ZodString;
|
|
259
|
+
conditionType: z.ZodLiteral<"EMPTY">;
|
|
260
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
261
|
+
conditionTypeQualifier: z.ZodEnum<{
|
|
262
|
+
IS: "IS";
|
|
263
|
+
IS_NOT: "IS_NOT";
|
|
264
|
+
}>;
|
|
265
|
+
targettedProperty: z.ZodString;
|
|
266
|
+
conditionType: z.ZodEnum<{
|
|
267
|
+
PATTERN: "PATTERN";
|
|
268
|
+
}>;
|
|
269
|
+
conditionValue: z.ZodString;
|
|
270
|
+
}, z.core.$strip>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>]>>;
|
|
271
|
+
targettedProperty: z.ZodString;
|
|
272
|
+
}, z.core.$strip>>>;
|
|
273
|
+
functions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
274
|
+
id: z.ZodString;
|
|
275
|
+
groupingId: z.ZodString;
|
|
276
|
+
groupingName: z.ZodString;
|
|
277
|
+
name: z.ZodString;
|
|
278
|
+
description: z.ZodString;
|
|
279
|
+
hash: z.ZodString;
|
|
280
|
+
stringifiedFunction: z.ZodString;
|
|
281
|
+
}, z.core.$strip>>>;
|
|
282
|
+
transactionHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
283
|
+
ruleOutcome: z.ZodBoolean;
|
|
284
|
+
ruleFailures: z.ZodArray<z.ZodObject<{
|
|
285
|
+
ruleId: z.ZodString;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
transactionFunction: z.ZodObject<{
|
|
288
|
+
input: z.ZodAny;
|
|
289
|
+
func: z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
290
|
+
output: z.ZodAny;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
}, z.core.$strip>>>;
|
|
293
|
+
events: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
294
|
+
shareData: z.ZodArray<z.ZodObject<{
|
|
295
|
+
shareDataId: z.ZodString;
|
|
296
|
+
functionId: z.ZodString;
|
|
297
|
+
shareDataInputs: z.ZodArray<z.ZodString>;
|
|
298
|
+
inputs: z.ZodAny;
|
|
299
|
+
}, z.core.$strip>>;
|
|
300
|
+
processingType: z.ZodEnum<{
|
|
301
|
+
parallel: "parallel";
|
|
302
|
+
linear: "linear";
|
|
303
|
+
}>;
|
|
304
|
+
}, z.core.$strip>>>;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
export type IShareDataAdditionalValuesToInclude = z.infer<typeof IShareDataAdditionalValuesToIncludeSchema>;
|
|
307
|
+
//# sourceMappingURL=share-data-crypto-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-data-crypto-models.d.ts","sourceRoot":"","sources":["../../../src/models/share-data/share-data-crypto-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;;;iBAK5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;;;;;;;;GAUG;AASH,eAAO,MAAM,2BAA2B;;;;;;;iBAOtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;kBAAoD,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;iBAGzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;kBAA0C,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMpD,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IShareDataAdditionalValuesToIncludeSchema = exports.IShareDataConfigSchema = exports.IShareDataPropertyConfigSchema = exports.ShareDataProofsSchema = exports.IShareDataCryptoProofSchema = exports.IShareDataInitialCryptoDataSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const share_rule_models_1 = require("../rules/share-rule-models");
|
|
6
|
+
const share_data_models_1 = require("./share-data-models");
|
|
7
|
+
const share_event_models_1 = require("../events/share-event-models");
|
|
8
|
+
// This contains models that are used in the share data specifically around crypto
|
|
9
|
+
//#region Share Data Crypto Schemas
|
|
10
|
+
/**
|
|
11
|
+
* This contains the interface for the share data initial crypto data schema
|
|
12
|
+
*/
|
|
13
|
+
exports.IShareDataInitialCryptoDataSchema = zod_1.z.object({
|
|
14
|
+
publicKey: zod_1.z.string(), // the public key of the share data
|
|
15
|
+
shareDataHash: zod_1.z.string(), // the share data hash
|
|
16
|
+
shareDataSignature: zod_1.z.string(), // the share data signature
|
|
17
|
+
timestamp: zod_1.z.number(), // the timestamp of the initial crypto data (in milliseconds)
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* This contains the interface for the share data crypto proof schema.
|
|
21
|
+
*
|
|
22
|
+
* `purpose` identifies what this proof attests to (e.g. `'deposit'`,
|
|
23
|
+
* `'rule-balance'`, `'seed-function'`). It is folded into the canonical
|
|
24
|
+
* signed string so two proofs taken over the same share-data state at the
|
|
25
|
+
* same moment but tagged with different purposes produce different
|
|
26
|
+
* signatures. Verifiers consume `purpose` directly from the proof — the
|
|
27
|
+
* proof is self-describing, so the structural-add boundary
|
|
28
|
+
* (`addFunction` / `addRule`) does not need a separate purpose argument.
|
|
29
|
+
*/
|
|
30
|
+
// Field declaration order here is load-bearing, NOT cosmetic. Zod
|
|
31
|
+
// reconstructs a parsed object in *schema-declaration* order, and the
|
|
32
|
+
// canonical share-data hash folds structural proofs in via order-sensitive
|
|
33
|
+
// `JSON.stringify` (see `getArrayString` / `calculateShareDataString`). So a
|
|
34
|
+
// proof that round-trips through `.parse()` (wire load, HTTP create) must come
|
|
35
|
+
// back with the SAME key order a freshly-minted proof has, or its hash
|
|
36
|
+
// diverges and structural-proof verification fails. This order must therefore
|
|
37
|
+
// mirror the object literal in `createShareDataProposalProof` exactly.
|
|
38
|
+
exports.IShareDataCryptoProofSchema = zod_1.z.object({
|
|
39
|
+
publicKey: zod_1.z.string(), // the public key of the share data
|
|
40
|
+
shareDataHash: zod_1.z.string(), // the share data hash
|
|
41
|
+
shareDataPreviousHash: zod_1.z.string(), // the previous share data hash
|
|
42
|
+
shareDataSignature: zod_1.z.string(), // the share data signature
|
|
43
|
+
timestamp: zod_1.z.number(), // the timestamp of the initial crypto data (in milliseconds)
|
|
44
|
+
purpose: zod_1.z.string().min(1), // what this proof attests to (e.g. 'deposit', 'rule-balance')
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* A bundle of structural proofs keyed by their `purpose`, used as the
|
|
48
|
+
* wire-format input to ShareBlock factories when the client (rather than
|
|
49
|
+
* the server) signs each registration. Matches how `_structuralProofs`
|
|
50
|
+
* end up shaped on a constructed ShareData — one proof per
|
|
51
|
+
* `addFunction` / `addRule` call.
|
|
52
|
+
*/
|
|
53
|
+
exports.ShareDataProofsSchema = zod_1.z.record(zod_1.z.string(), exports.IShareDataCryptoProofSchema);
|
|
54
|
+
//#endregion Share Data Crypto Schemas
|
|
55
|
+
//#region Stringify Configurations
|
|
56
|
+
/**
|
|
57
|
+
* This contains the interface for the share data property config
|
|
58
|
+
* for creating strings from the object to ensure that signatures and
|
|
59
|
+
* hashes are consistent
|
|
60
|
+
*/
|
|
61
|
+
exports.IShareDataPropertyConfigSchema = zod_1.z.object({
|
|
62
|
+
key: zod_1.z.string(),
|
|
63
|
+
process: zod_1.z.function({ input: zod_1.z.tuple([zod_1.z.any()]), output: zod_1.z.string() }).optional(), // Simplified process type
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* This contains the interface for the share data config array
|
|
67
|
+
* for creating strings from the object to ensure that signatures and
|
|
68
|
+
* hashes are consistent
|
|
69
|
+
*/
|
|
70
|
+
exports.IShareDataConfigSchema = zod_1.z.array(exports.IShareDataPropertyConfigSchema);
|
|
71
|
+
//#endregion Stringify Configurations
|
|
72
|
+
//#region Additional Data to include
|
|
73
|
+
/**
|
|
74
|
+
* This contains the interface for additional data to include in the share data string.
|
|
75
|
+
*
|
|
76
|
+
* `purpose` is required and identifies what this signed snapshot is attesting to
|
|
77
|
+
* (e.g. `'deposit'`, `'rule-balance'`, `'seed-function'`). It is folded into the
|
|
78
|
+
* canonical string `calculateShareDataString` produces, so two proofs taken
|
|
79
|
+
* over the same share-data state at the same moment but tagged with different
|
|
80
|
+
* purposes produce different hashes and therefore different signatures. This
|
|
81
|
+
* structurally prevents replaying a proof signed for one purpose as a proof
|
|
82
|
+
* for another.
|
|
83
|
+
*/
|
|
84
|
+
exports.IShareDataAdditionalValuesToIncludeSchema = zod_1.z.object({
|
|
85
|
+
purpose: zod_1.z.string().min(1),
|
|
86
|
+
rules: zod_1.z.array(share_rule_models_1.IShareRuleAppliedSchema).optional(),
|
|
87
|
+
functions: zod_1.z.array(share_data_models_1.IShareFunctionRecordSchema).optional(),
|
|
88
|
+
transactionHistory: zod_1.z.array(share_data_models_1.IShareDataTransactionBaseSchema).optional(),
|
|
89
|
+
events: zod_1.z.array(share_event_models_1.IShareDataEventSchema).optional(),
|
|
90
|
+
});
|
|
91
|
+
//#endregion Additional Data to include
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import type { IShareDataCryptoProof } from './share-data-crypto-models';
|
|
3
|
+
/**
|
|
4
|
+
* This contains the data for the share data object
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ShareDataTypes {
|
|
7
|
+
AUTHORIZATION = "AUTHORIZATION",
|
|
8
|
+
RULE = "RULE",
|
|
9
|
+
FUNCTION = "FUNCTION",
|
|
10
|
+
TRANSACTION_HISTORY = "TRANSACTION_HISTORY",
|
|
11
|
+
DATA = "DATA"
|
|
12
|
+
}
|
|
13
|
+
export declare const ShareDataTypesSchema: z.ZodEnum<{
|
|
14
|
+
FUNCTION: "FUNCTION";
|
|
15
|
+
AUTHORIZATION: "AUTHORIZATION";
|
|
16
|
+
RULE: "RULE";
|
|
17
|
+
TRANSACTION_HISTORY: "TRANSACTION_HISTORY";
|
|
18
|
+
DATA: "DATA";
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* This contains the interface for a data in a share data object
|
|
22
|
+
*/
|
|
23
|
+
export declare const IShareDataSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
24
|
+
export type IShareData = z.infer<typeof IShareDataSchema>;
|
|
25
|
+
/**
|
|
26
|
+
* This contains the interface for a share function record in the share data object
|
|
27
|
+
*/
|
|
28
|
+
export declare const IShareFunctionRecordSchema: z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
groupingId: z.ZodString;
|
|
31
|
+
groupingName: z.ZodString;
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
description: z.ZodString;
|
|
34
|
+
hash: z.ZodString;
|
|
35
|
+
stringifiedFunction: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type IShareFunctionRecord = z.infer<typeof IShareFunctionRecordSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* This contains the interface for a share function in the share data object
|
|
40
|
+
*/
|
|
41
|
+
export declare const IShareFunctionSchema: z.ZodObject<{
|
|
42
|
+
input: z.ZodAny;
|
|
43
|
+
func: z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
44
|
+
output: z.ZodAny;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export interface IShareFunction<TInput, TFunction extends (...args: any[]) => any, TOutput> {
|
|
47
|
+
/**
|
|
48
|
+
* Stable identifier the host application can use to refer to this
|
|
49
|
+
* function from outside the runtime — e.g., when a client submits a
|
|
50
|
+
* `propose` over the realtime transport and needs to name which
|
|
51
|
+
* registered function should evaluate the proposal.
|
|
52
|
+
*
|
|
53
|
+
* Optional today for backwards compatibility with existing
|
|
54
|
+
* constructions that don't set it. Functions without an id are
|
|
55
|
+
* invisible to id-based lookup (see `createIdBasedFunctionResolver`
|
|
56
|
+
* in `@degenerate/realtime`); the host can still resolve them via a
|
|
57
|
+
* custom `FunctionResolver`.
|
|
58
|
+
*/
|
|
59
|
+
id?: string;
|
|
60
|
+
input: TInput;
|
|
61
|
+
func: TFunction;
|
|
62
|
+
output: TOutput;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* This contains the interface for the rule failures in the share data object
|
|
66
|
+
*/
|
|
67
|
+
export declare const IShareDataRuleFailuresSchema: z.ZodObject<{
|
|
68
|
+
ruleId: z.ZodString;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type IShareDataRuleFailures = z.infer<typeof IShareDataRuleFailuresSchema>;
|
|
71
|
+
/**
|
|
72
|
+
* This contains the interface for the share transaction history in the share data object
|
|
73
|
+
*/
|
|
74
|
+
export declare const IShareDataTransactionBaseSchema: z.ZodObject<{
|
|
75
|
+
ruleOutcome: z.ZodBoolean;
|
|
76
|
+
ruleFailures: z.ZodArray<z.ZodObject<{
|
|
77
|
+
ruleId: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
transactionFunction: z.ZodObject<{
|
|
80
|
+
input: z.ZodAny;
|
|
81
|
+
func: z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
82
|
+
output: z.ZodAny;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type IShareDataTransactionBase = z.infer<typeof IShareDataTransactionBaseSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* This contains the interface for the share transaction history in the share data object
|
|
88
|
+
* This is done for storage
|
|
89
|
+
*/
|
|
90
|
+
export declare const IShareDataTransactionHistorySchema: z.ZodObject<{
|
|
91
|
+
ruleOutcome: z.ZodBoolean;
|
|
92
|
+
ruleFailures: z.ZodArray<z.ZodObject<{
|
|
93
|
+
ruleId: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
transactionFunction: z.ZodObject<{
|
|
96
|
+
input: z.ZodAny;
|
|
97
|
+
func: z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
98
|
+
output: z.ZodAny;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
transactionId: z.ZodString;
|
|
101
|
+
transactionTime: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
/**
|
|
104
|
+
* `proof` is the transaction proposal proof that authorized this state change
|
|
105
|
+
* (present for transactions applied through the signed `addTransaction` path;
|
|
106
|
+
* absent for legacy/internal applies). It makes the audit log itself carry the
|
|
107
|
+
* signature, not just the function + rule outcome. Typed here rather than in
|
|
108
|
+
* the Zod schema to avoid a module load-time cycle — see the `import type` note
|
|
109
|
+
* at the top of this file.
|
|
110
|
+
*/
|
|
111
|
+
export type IShareDataTransactionHistory = z.infer<typeof IShareDataTransactionHistorySchema> & {
|
|
112
|
+
proof?: IShareDataCryptoProof;
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=share-data-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-data-models.d.ts","sourceRoot":"","sources":["../../../src/models/share-data/share-data-models.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAOpB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE;;GAEG;AACH,oBAAY,cAAc;IACtB,aAAa,kBAAkB;IAC/B,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,mBAAmB,wBAAwB;IAC3C,IAAI,SAAS;CAChB;AAED,eAAO,MAAM,oBAAoB;;;;;;EAM/B,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,gBAAgB,oCAAgC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;iBAQrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAGH,MAAM,WAAW,cAAc,CAAC,MAAM,EAAE,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,OAAO;IACtF;;;;;;;;;;;OAWG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACnB;AAGD;;GAEG;AACH,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAI1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;iBAG7C,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,GAAG;IAC5F,KAAK,CAAC,EAAE,qBAAqB,CAAC;CACjC,CAAC"}
|
|
@@ -29,7 +29,7 @@ exports.ShareDataTypesSchema = zod_1.default.enum([
|
|
|
29
29
|
/**
|
|
30
30
|
* This contains the interface for a data in a share data object
|
|
31
31
|
*/
|
|
32
|
-
exports.IShareDataSchema = zod_1.default.record(zod_1.default.any());
|
|
32
|
+
exports.IShareDataSchema = zod_1.default.record(zod_1.default.string(), zod_1.default.any());
|
|
33
33
|
/**
|
|
34
34
|
* This contains the interface for a share function record in the share data object
|
|
35
35
|
*/
|