@degenerate/generic 0.2.7 → 0.4.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 (165) hide show
  1. package/dist/_settings/database-settings.d.ts +3 -0
  2. package/dist/_settings/database-settings.d.ts.map +1 -1
  3. package/dist/_settings/database-settings.js +3 -0
  4. package/dist/application/audit-log/additional-ids/create-audit-log-additional-ids-with-query.d.ts.map +1 -1
  5. package/dist/application/audit-log/additional-ids/create-multiple-path-alai.d.ts.map +1 -1
  6. package/dist/application/audit-log/additional-ids/create-query-audit-log-for-alai.d.ts.map +1 -1
  7. package/dist/application/audit-log/create-application-audit-log.d.ts.map +1 -1
  8. package/dist/application/audit-log/create-application-audit-log.js +1 -1
  9. package/dist/application/database/firestore/generics/add-items-to-database.d.ts.map +1 -1
  10. package/dist/application/database/firestore/generics/add-items-to-database.js +2 -2
  11. package/dist/application/database/firestore/generics/add-or-update-items-to-database.d.ts.map +1 -1
  12. package/dist/application/database/firestore/generics/add-or-update-items-to-database.js +3 -3
  13. package/dist/application/database/firestore/generics/create-database-change-information.d.ts.map +1 -1
  14. package/dist/application/database/firestore/generics/delete-items-on-database.d.ts.map +1 -1
  15. package/dist/application/database/firestore/generics/delete-items-on-database.js +2 -2
  16. package/dist/application/database/firestore/generics/get-item-from-database.d.ts.map +1 -1
  17. package/dist/application/database/firestore/generics/get-item-from-database.js +2 -2
  18. package/dist/application/database/firestore/generics/get-items-different-path-on-database.d.ts.map +1 -1
  19. package/dist/application/database/firestore/generics/get-items-different-path-on-database.js +2 -2
  20. package/dist/application/database/firestore/generics/get-items-from-database.d.ts.map +1 -1
  21. package/dist/application/database/firestore/generics/get-items-from-database.js +1 -1
  22. package/dist/application/database/firestore/generics/update-items-on-database.d.ts.map +1 -1
  23. package/dist/application/database/firestore/generics/update-items-on-database.js +2 -2
  24. package/dist/application/database/firestore/generics/update-items-properties-on-database.d.ts.map +1 -1
  25. package/dist/application/database/firestore/generics/update-items-properties-on-database.js +2 -2
  26. package/dist/authorization/index.d.ts +1 -0
  27. package/dist/authorization/index.d.ts.map +1 -1
  28. package/dist/authorization/index.js +1 -0
  29. package/dist/authorization/jwt/keys/create-public-key-pem.d.ts.map +1 -1
  30. package/dist/authorization/jwt/keys/create-secret-key-pem.d.ts.map +1 -1
  31. package/dist/authorization/jwt/sign/create-authorization-issuer.d.ts.map +1 -1
  32. package/dist/authorization/jwt/sign/create-authorization-subject.d.ts.map +1 -1
  33. package/dist/authorization/jwt/sign/create-jwt-options.d.ts +7 -1
  34. package/dist/authorization/jwt/sign/create-jwt-options.d.ts.map +1 -1
  35. package/dist/authorization/jwt/sign/create-jwt-signed-token.d.ts.map +1 -1
  36. package/dist/authorization/jwt/transform/transform-token-payload-to-safe-payload.d.ts.map +1 -1
  37. package/dist/authorization/jwt/verify/get-decoded-jwt-header.d.ts.map +1 -1
  38. package/dist/authorization/jwt/verify/get-decoded-jwt-signed-token-payload.d.ts.map +1 -1
  39. package/dist/authorization/jwt/verify/verify-jwt-signed-token.d.ts.map +1 -1
  40. package/dist/authorization/safe/request/decode-bearer-token.d.ts.map +1 -1
  41. package/dist/authorization/safe/request/decode-safe-request.d.ts.map +1 -1
  42. package/dist/authorization/safe/request/determine-issuer-from-request.d.ts.map +1 -1
  43. package/dist/authorization/safe/request/issuer/determine-issuer-from-bearer-token.d.ts.map +1 -1
  44. package/dist/authorization/safe/request/verify-jwt-bearer-token-for-audience.d.ts +31 -0
  45. package/dist/authorization/safe/request/verify-jwt-bearer-token-for-audience.d.ts.map +1 -0
  46. package/dist/authorization/safe/request/verify-jwt-bearer-token-for-audience.js +50 -0
  47. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-audience.d.ts.map +1 -1
  48. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-expiration-time.d.ts.map +1 -1
  49. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issued-at-time.d.ts.map +1 -1
  50. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-issuer.d.ts.map +1 -1
  51. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-not-before-time.d.ts.map +1 -1
  52. package/dist/authorization/safe/validation/jwt/payload/verify-authorization-subject.d.ts.map +1 -1
  53. package/dist/authorization/safe/validation/jwt/verify-token-header.d.ts.map +1 -1
  54. package/dist/authorization/safe/validation/jwt/verify-token-payload.d.ts.map +1 -1
  55. package/dist/crypto/calculate-combined-hash.d.ts.map +1 -1
  56. package/dist/crypto/calculate-hash.d.ts +1 -1
  57. package/dist/crypto/calculate-hash.d.ts.map +1 -1
  58. package/dist/crypto/calculate-hash.js +1 -1
  59. package/dist/crypto/index.d.ts +1 -0
  60. package/dist/crypto/index.d.ts.map +1 -1
  61. package/dist/crypto/index.js +1 -0
  62. package/dist/crypto/private-public-keys/create-key-pair-from-mnemonic.d.ts.map +1 -1
  63. package/dist/crypto/private-public-keys/create-key-pair-from-private-key.d.ts.map +1 -1
  64. package/dist/crypto/private-public-keys/create-key-pair-from-private-key.js +1 -1
  65. package/dist/crypto/private-public-keys/create-key-pair-from-public-key.d.ts +11 -0
  66. package/dist/crypto/private-public-keys/create-key-pair-from-public-key.d.ts.map +1 -0
  67. package/dist/crypto/private-public-keys/create-key-pair-from-public-key.js +51 -0
  68. package/dist/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.d.ts.map +1 -1
  69. package/dist/crypto/private-public-keys/generation/generate-key-pair.d.ts.map +1 -1
  70. package/dist/crypto/private-public-keys/generation/get-private-public-key-from-keypair.d.ts.map +1 -1
  71. package/dist/crypto/signature/create-crypto-signature.d.ts +11 -0
  72. package/dist/crypto/signature/create-crypto-signature.d.ts.map +1 -1
  73. package/dist/crypto/signature/create-crypto-signature.js +14 -1
  74. package/dist/crypto/signature/verify-crypto-signature-by-data.d.ts +4 -0
  75. package/dist/crypto/signature/verify-crypto-signature-by-data.d.ts.map +1 -1
  76. package/dist/crypto/signature/verify-crypto-signature-by-data.js +8 -2
  77. package/dist/crypto/signature/verify-crypto-signature-by-hash.d.ts +4 -0
  78. package/dist/crypto/signature/verify-crypto-signature-by-hash.d.ts.map +1 -1
  79. package/dist/crypto/signature/verify-crypto-signature-by-hash.js +7 -1
  80. package/dist/errors/index.d.ts +2 -0
  81. package/dist/errors/index.d.ts.map +1 -1
  82. package/dist/errors/index.js +2 -0
  83. package/dist/errors/share-data/share-data-errors.d.ts +105 -1
  84. package/dist/errors/share-data/share-data-errors.d.ts.map +1 -1
  85. package/dist/errors/share-data/share-data-errors.js +148 -1
  86. package/dist/errors/shareblock/shareblock-errors.d.ts +40 -0
  87. package/dist/errors/shareblock/shareblock-errors.d.ts.map +1 -0
  88. package/dist/errors/shareblock/shareblock-errors.js +50 -0
  89. package/dist/errors/validation/crypto-validation-errors.d.ts +8 -0
  90. package/dist/errors/validation/crypto-validation-errors.d.ts.map +1 -0
  91. package/dist/errors/validation/crypto-validation-errors.js +15 -0
  92. package/dist/helpers/array/array-helpers.d.ts.map +1 -1
  93. package/dist/helpers/crypto/cryptography-helpers.d.ts.map +1 -1
  94. package/dist/helpers/data/data-helpers.d.ts.map +1 -1
  95. package/dist/helpers/file/file-helpers.d.ts.map +1 -1
  96. package/dist/helpers/id-helpers.d.ts.map +1 -1
  97. package/dist/helpers/lodash/lodash-helpers.d.ts.map +1 -1
  98. package/dist/helpers/object-helpers.d.ts.map +1 -1
  99. package/dist/helpers/object-validation-helpers.d.ts.map +1 -1
  100. package/dist/helpers/request/params-object-helpers.d.ts +6 -13
  101. package/dist/helpers/request/params-object-helpers.d.ts.map +1 -1
  102. package/dist/helpers/request/params-object-helpers.js +11 -21
  103. package/dist/helpers/request/query-object-helpers.d.ts.map +1 -1
  104. package/dist/helpers/request/request-object-helpers.d.ts.map +1 -1
  105. package/dist/models/application/audit-log/application-audit-log-models.d.ts +82 -92
  106. package/dist/models/application/audit-log/application-audit-log-models.d.ts.map +1 -1
  107. package/dist/models/application/database/firestore-models.d.ts +158 -307
  108. package/dist/models/application/database/firestore-models.d.ts.map +1 -1
  109. package/dist/models/authorization/authorization-models.d.ts +34 -44
  110. package/dist/models/authorization/authorization-models.d.ts.map +1 -1
  111. package/dist/models/authorization/authorization-models.js +2 -2
  112. package/dist/models/crypto/crypto-models.d.ts +1 -7
  113. package/dist/models/crypto/crypto-models.d.ts.map +1 -1
  114. package/dist/models/data/data-models.d.ts +27 -13
  115. package/dist/models/data/data-models.d.ts.map +1 -1
  116. package/dist/models/data/data-models.js +23 -2
  117. package/dist/models/dynamic-execution/dynamic-execution-models.d.ts +1 -9
  118. package/dist/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -1
  119. package/dist/models/events/share-event-models.d.ts +91 -120
  120. package/dist/models/events/share-event-models.d.ts.map +1 -1
  121. package/dist/models/events/share-event-models.js +35 -4
  122. package/dist/models/functions/share-data-function-models.d.ts +23 -193
  123. package/dist/models/functions/share-data-function-models.d.ts.map +1 -1
  124. package/dist/models/functions/share-data-function-models.js +1 -1
  125. package/dist/models/generic/request-response-models.d.ts +1 -7
  126. package/dist/models/generic/request-response-models.d.ts.map +1 -1
  127. package/dist/models/index.d.ts +4 -1
  128. package/dist/models/index.d.ts.map +1 -1
  129. package/dist/models/index.js +4 -1
  130. package/dist/models/rules/share-rule-models.d.ts +759 -1116
  131. package/dist/models/rules/share-rule-models.d.ts.map +1 -1
  132. package/dist/models/rules/share-rule-models.js +6 -6
  133. package/dist/models/safe/safe-transaction-models.d.ts +28 -30
  134. package/dist/models/safe/safe-transaction-models.d.ts.map +1 -1
  135. package/dist/models/safe/transactions/authorities-transactions-models.d.ts +77 -419
  136. package/dist/models/safe/transactions/authorities-transactions-models.d.ts.map +1 -1
  137. package/dist/models/safe/transactions/authorities-transactions-models.js +3 -3
  138. package/dist/models/safe/transactions/events-transactions-models.d.ts +22 -372
  139. package/dist/models/safe/transactions/events-transactions-models.d.ts.map +1 -1
  140. package/dist/models/safe/transactions/events-transactions-models.js +1 -1
  141. package/dist/models/safe/transactions/functions-transactions-models.d.ts +22 -372
  142. package/dist/models/safe/transactions/functions-transactions-models.d.ts.map +1 -1
  143. package/dist/models/safe/transactions/functions-transactions-models.js +1 -1
  144. package/dist/models/safe/transactions/rules-transactions-models.d.ts +59 -603
  145. package/dist/models/safe/transactions/rules-transactions-models.d.ts.map +1 -1
  146. package/dist/models/safe/transactions/sharedata-transactions-models.d.ts +256 -388
  147. package/dist/models/safe/transactions/sharedata-transactions-models.d.ts.map +1 -1
  148. package/dist/models/safe/transactions/sharedata-transactions-models.js +30 -4
  149. package/dist/models/share-data/share-data-crypto-models.d.ts +344 -0
  150. package/dist/models/share-data/share-data-crypto-models.d.ts.map +1 -0
  151. package/dist/models/share-data/share-data-crypto-models.js +131 -0
  152. package/dist/models/share-data/share-data-models.d.ts +114 -0
  153. package/dist/models/share-data/share-data-models.d.ts.map +1 -0
  154. package/dist/models/share-data/{share-data.js → share-data-models.js} +1 -1
  155. package/dist/models/share-data/share-data-persistence-models.d.ts +165 -0
  156. package/dist/models/share-data/share-data-persistence-models.d.ts.map +1 -0
  157. package/dist/models/share-data/share-data-persistence-models.js +101 -0
  158. package/dist/models/shareblock/shareblock-models.d.ts +489 -0
  159. package/dist/models/shareblock/shareblock-models.d.ts.map +1 -0
  160. package/dist/models/shareblock/shareblock-models.js +395 -0
  161. package/dist/transactions/authority/create-safe-transaction-authority-data.d.ts.map +1 -1
  162. package/dist/transactions/authority/create-safe-transaction-authority.d.ts.map +1 -1
  163. package/package.json +30 -22
  164. package/dist/models/share-data/share-data.d.ts +0 -181
  165. package/dist/models/share-data/share-data.d.ts.map +0 -1
@@ -0,0 +1,395 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IShareBlockMarkDefaultedInputSchema = exports.IShareBlockMarkFullyRepaidInputSchema = exports.IShareBlockRecordRepaymentInputSchema = exports.IShareBlockSnapshotForRepaymentInputSchema = exports.IShareBlockSetLenderGraceDecisionInputSchema = exports.IShareBlockMarkFullyDistributedInputSchema = exports.IShareBlockDisburseInputSchema = exports.IShareBlockFundInputSchema = exports.IShareBlockRegisterLenderInputSchema = exports.IShareBlockCommitInputSchema = exports.IShareBlockCloseInputSchema = exports.IShareBlockWithdrawInputSchema = exports.IShareBlockDepositInputSchema = exports.IShareBlockInitialStateInputSchema = exports.IShareBlockMetadataSchema = exports.IGraceRepaymentShareBlockStateSchema = exports.IGraceRepaymentParticipantSchema = exports.IDistributionShareBlockStateSchema = exports.IFundingShareBlockStateSchema = exports.IShareBlockStateSchema = exports.IShareBlockParticipantSchema = exports.ShareBlockParticipantRoleSchema = exports.ShareBlockParticipantRole = exports.ShareBlockTypeSchema = exports.ShareBlockType = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ //#region Enums
9
+ /**
10
+ * The four ShareBlock specializations the platform uses to move money
11
+ * through a loan's lifecycle.
12
+ *
13
+ * - `Clearing` — neutral holding spot funds pass through before they're
14
+ * committed to either side of a deal. Used to net
15
+ * borrower and lender flows before settling.
16
+ * - `Funding` — the lender-funded pool that backs a specific loan.
17
+ * Holds principal between funding and disbursement.
18
+ * - `Distribution` — the destination ShareBlock that pays principal to a
19
+ * borrower or returns/interest to a lender.
20
+ * - `GraceRepayment` — the borrower-repayment block for Rapture's Grace
21
+ * product. Per-lender Grace-or-yield decisions are
22
+ * toggled while the loan is in flight, snapshotted at
23
+ * repayment-initiate, and drive the blended-rate
24
+ * allocation when the borrower pays. Terminal state is
25
+ * either `fullyRepaid: true` OR `defaulted: true`,
26
+ * mutually exclusive.
27
+ *
28
+ * New ShareBlock variants should be additive — never re-use a value with new
29
+ * semantics, since downstream rule libraries pattern-match on the literal.
30
+ */
31
+ var ShareBlockType;
32
+ (function (ShareBlockType) {
33
+ ShareBlockType["Clearing"] = "Clearing";
34
+ ShareBlockType["Funding"] = "Funding";
35
+ ShareBlockType["Distribution"] = "Distribution";
36
+ ShareBlockType["GraceRepayment"] = "GraceRepayment";
37
+ })(ShareBlockType || (exports.ShareBlockType = ShareBlockType = {}));
38
+ exports.ShareBlockTypeSchema = zod_1.default.enum([
39
+ 'Clearing',
40
+ 'Funding',
41
+ 'Distribution',
42
+ 'GraceRepayment',
43
+ ]);
44
+ //#endregion Enums
45
+ //#region Participant
46
+ /**
47
+ * Roles a participant plays inside a ShareBlock. A single party may hold
48
+ * multiple roles across different ShareBlocks (e.g. the same uid is `Lender`
49
+ * on a Funding block and `Recipient` on a Distribution block).
50
+ */
51
+ var ShareBlockParticipantRole;
52
+ (function (ShareBlockParticipantRole) {
53
+ ShareBlockParticipantRole["Borrower"] = "Borrower";
54
+ ShareBlockParticipantRole["Lender"] = "Lender";
55
+ ShareBlockParticipantRole["Platform"] = "Platform";
56
+ ShareBlockParticipantRole["Recipient"] = "Recipient";
57
+ })(ShareBlockParticipantRole || (exports.ShareBlockParticipantRole = ShareBlockParticipantRole = {}));
58
+ exports.ShareBlockParticipantRoleSchema = zod_1.default.enum([
59
+ 'Borrower',
60
+ 'Lender',
61
+ 'Platform',
62
+ 'Recipient',
63
+ ]);
64
+ /**
65
+ * A party in a ShareBlock with their associated role and committed amount.
66
+ * `committedAmount` is the headline contribution promised by the participant;
67
+ * `settledAmount` tracks how much has actually moved (so partial fills are
68
+ * representable). Both are in the ShareBlock's `currency`.
69
+ */
70
+ exports.IShareBlockParticipantSchema = zod_1.default.object({
71
+ userId: zod_1.default.string(),
72
+ role: exports.ShareBlockParticipantRoleSchema,
73
+ committedAmount: zod_1.default.number().nonnegative(),
74
+ settledAmount: zod_1.default.number().nonnegative(),
75
+ });
76
+ //#endregion Participant
77
+ //#region State
78
+ /**
79
+ * The mutable state carried inside a ShareBlock's `_currentState`. This is
80
+ * the canonical shape rules and functions inspect when proposing changes.
81
+ *
82
+ * - `balance` — funds currently held in the ShareBlock. Never negative.
83
+ * - `currency` — ISO-4217 code (e.g. `'USD'`, `'CAD'`). Pinned at creation.
84
+ * - `isOpen` — whether the ShareBlock will accept further transactions.
85
+ * Closing is irreversible; once `false`, all standard rules
86
+ * reject mutating proposals.
87
+ * - `participants` — committed parties keyed by `userId`. Adding a
88
+ * participant goes through a rule-gated function so the
89
+ * participant list itself is auditable.
90
+ */
91
+ exports.IShareBlockStateSchema = zod_1.default.object({
92
+ blockType: exports.ShareBlockTypeSchema,
93
+ balance: zod_1.default.number().nonnegative(),
94
+ currency: zod_1.default.string().min(3).max(3),
95
+ isOpen: zod_1.default.boolean(),
96
+ participants: zod_1.default.record(zod_1.default.string(), exports.IShareBlockParticipantSchema),
97
+ });
98
+ /**
99
+ * Funding-specific extension of `IShareBlockState`. Adds:
100
+ *
101
+ * - `committed` — once `true`, the block's funds are locked: deposits and
102
+ * withdrawals become no-ops, and a "committed-is-monotonic"
103
+ * rule blocks any proposal that flips it back to `false`.
104
+ * - `committedBy` / `committedAt` — audit attribution for the commit moment.
105
+ *
106
+ * Clearing ShareBlocks don't carry these fields; the discriminator is the
107
+ * `blockType` on the base state.
108
+ */
109
+ exports.IFundingShareBlockStateSchema = exports.IShareBlockStateSchema.extend({
110
+ blockType: zod_1.default.literal(exports.ShareBlockTypeSchema.enum.Funding),
111
+ committed: zod_1.default.boolean(),
112
+ committedBy: zod_1.default.string().optional(),
113
+ committedAt: zod_1.default.number().optional(),
114
+ });
115
+ /**
116
+ * Distribution-specific extension of `IShareBlockState`. Adds:
117
+ *
118
+ * - `distributed` — once `true`, the block is fully paid out and further
119
+ * disbursements become no-ops. Enforced as monotonic by
120
+ * a dedicated rule (mirrors Funding's `committed`).
121
+ * - `distributedAt` — audit attribution for the moment the block was
122
+ * marked fully distributed.
123
+ *
124
+ * Clearing ShareBlocks don't carry these fields; the discriminator is the
125
+ * `blockType` on the base state.
126
+ */
127
+ exports.IDistributionShareBlockStateSchema = exports.IShareBlockStateSchema.extend({
128
+ blockType: zod_1.default.literal(exports.ShareBlockTypeSchema.enum.Distribution),
129
+ distributed: zod_1.default.boolean(),
130
+ distributedBy: zod_1.default.string().optional(),
131
+ distributedAt: zod_1.default.number().optional(),
132
+ });
133
+ /**
134
+ * GraceRepayment-specific participant. Extends the base participant with
135
+ * three Grace-specific fields plus a denormalized ShareBlock count:
136
+ *
137
+ * - `graceDecision` — Lender-only field. The lender's current
138
+ * choice: take their yield, grant Grace, or
139
+ * undecided (the initial state when the
140
+ * GraceRepayment block is constructed).
141
+ * Borrower and Platform participants always
142
+ * carry `'undecided'` and never mutate it.
143
+ * - `decidedAtMs` — Unix-ms timestamp the lender last set their
144
+ * decision. `null` while undecided.
145
+ * - `snapshotDecision` — The locked-in decision at the moment the
146
+ * borrower initiated repayment. `null` until
147
+ * snapshot. After snapshot it's the
148
+ * authoritative value the per-lender
149
+ * settlement uses.
150
+ * - `shareBlockCount` — Derived count of $10 ShareBlocks held by
151
+ * this lender on this loan
152
+ * (`committedAmount / 1000` for cents-based
153
+ * committed amounts). Cached for fast UI
154
+ * queries; the canonical source is still
155
+ * `committedAmount`.
156
+ */
157
+ exports.IGraceRepaymentParticipantSchema = exports.IShareBlockParticipantSchema.extend({
158
+ graceDecision: zod_1.default.enum(['yield', 'grace', 'undecided']),
159
+ /** Unset until the lender first sets a decision. */
160
+ decidedAtMs: zod_1.default.number().int().nonnegative().optional(),
161
+ /** Unset until the borrower initiates repayment. */
162
+ snapshotDecision: zod_1.default.enum(['yield', 'grace']).optional(),
163
+ shareBlockCount: zod_1.default.number().int().nonnegative(),
164
+ });
165
+ /**
166
+ * GraceRepayment-specific extension of `IShareBlockState`. Adds:
167
+ *
168
+ * - `outstandingPrincipalCents` — running principal balance the
169
+ * borrower owes. Decrements as
170
+ * repayments land.
171
+ * - `outstandingInterestCents` — interest owed at the time of
172
+ * repayment snapshot. Computed
173
+ * atomically at snapshot from the
174
+ * blended rate; decrements as
175
+ * repayments land.
176
+ * - `repaymentSnapshotAtMs` — unix-ms timestamp the per-lender
177
+ * Grace decisions were locked in.
178
+ * `null` until the borrower
179
+ * initiates repayment.
180
+ * - `blendedRatePercent` — weighted-average effective rate
181
+ * computed at snapshot. `null` pre-
182
+ * snapshot.
183
+ * - `finalEffectiveRatePercent` — what the borrower actually pays;
184
+ * equal to `blendedRatePercent`
185
+ * under the standard formula. `null`
186
+ * pre-snapshot.
187
+ * - `fullyRepaid` / `defaulted` — mutually exclusive terminal flags.
188
+ * Both monotonic (once true, never
189
+ * back to false).
190
+ * - `defaultReason` / `defaultedAtMs` — audit attribution for the
191
+ * default moment.
192
+ *
193
+ * Participants are typed as `IGraceRepaymentParticipant` (extended
194
+ * with per-lender Grace decision fields).
195
+ */
196
+ exports.IGraceRepaymentShareBlockStateSchema = exports.IShareBlockStateSchema.extend({
197
+ blockType: zod_1.default.literal(exports.ShareBlockTypeSchema.enum.GraceRepayment),
198
+ participants: zod_1.default.record(zod_1.default.string(), exports.IGraceRepaymentParticipantSchema),
199
+ outstandingPrincipalCents: zod_1.default.number().int().nonnegative(),
200
+ outstandingInterestCents: zod_1.default.number().int().nonnegative(),
201
+ /** Unset until the borrower initiates repayment. */
202
+ repaymentSnapshotAtMs: zod_1.default.number().int().nonnegative().optional(),
203
+ /** Computed at snapshot; unset pre-snapshot. */
204
+ blendedRatePercent: zod_1.default.number().optional(),
205
+ /** Computed at snapshot; unset pre-snapshot. */
206
+ finalEffectiveRatePercent: zod_1.default.number().optional(),
207
+ /**
208
+ * Borrower's baseline rate at snapshot. Captured so the
209
+ * `recordRepayment` per-lender settlement can recompute the
210
+ * yield-side interest allocation without rolling the inputs back
211
+ * in through the call (the audit chain already carries
212
+ * `snapshotForRepayment`'s input, but the per-lender allocation
213
+ * function reads from current state, not the prior transaction).
214
+ */
215
+ snapshotBaselineRatePercent: zod_1.default.number().optional(),
216
+ /** Grace micro-interest at snapshot (e.g., 0.77). */
217
+ snapshotGraceMicroInterestPercent: zod_1.default.number().optional(),
218
+ /** Grace per-ShareBlock fee at snapshot (cents, e.g., 1 = $0.01). */
219
+ snapshotGracePerShareBlockFeeCents: zod_1.default.number().int().nonnegative().optional(),
220
+ fullyRepaid: zod_1.default.boolean(),
221
+ defaulted: zod_1.default.boolean(),
222
+ /** Set when the block transitions to `defaulted: true`. */
223
+ defaultReason: zod_1.default.string().optional(),
224
+ defaultedAtMs: zod_1.default.number().int().nonnegative().optional(),
225
+ });
226
+ //#endregion State
227
+ //#region Metadata
228
+ /**
229
+ * Static information about a ShareBlock — set at construction and never
230
+ * mutated through transactions. Lives outside `IShareBlockState` because
231
+ * the rule-evaluation engine compares state shapes, and including identity
232
+ * metadata in that comparison would treat any new ShareBlock as a "change."
233
+ */
234
+ exports.IShareBlockMetadataSchema = zod_1.default.object({
235
+ shareBlockId: zod_1.default.string(),
236
+ blockType: exports.ShareBlockTypeSchema,
237
+ relatedLoanApplicationId: zod_1.default.string().optional(),
238
+ description: zod_1.default.string().optional(),
239
+ createdAt: zod_1.default.number(),
240
+ createdBy: zod_1.default.string(),
241
+ });
242
+ /**
243
+ * Input shape every ShareBlock factory's `initialState` argument accepts.
244
+ * The factory layers the variant-specific defaults on top (`blockType`,
245
+ * `committed: false`, `distributed: false`, `isOpen: true`) — callers only
246
+ * supply the genuinely variant-agnostic fields.
247
+ *
248
+ * Used by the HTTP create route to validate the wire payload before
249
+ * dispatching to the matching factory.
250
+ */
251
+ exports.IShareBlockInitialStateInputSchema = zod_1.default.object({
252
+ currency: zod_1.default.string().min(3).max(3),
253
+ participants: zod_1.default.record(zod_1.default.string(), exports.IShareBlockParticipantSchema),
254
+ balance: zod_1.default.number().nonnegative().optional(),
255
+ });
256
+ //#endregion Metadata
257
+ //#region Transaction Function Inputs
258
+ /**
259
+ * Input shapes for the standard ShareBlock mutating functions. Each function
260
+ * the factory wires up takes one of these and proposes a new
261
+ * `IShareBlockState`. Rules judge the transition; the ShareData container
262
+ * applies it iff every rule passes.
263
+ */
264
+ exports.IShareBlockDepositInputSchema = zod_1.default.object({
265
+ userId: zod_1.default.string(),
266
+ amount: zod_1.default.number().positive(),
267
+ });
268
+ exports.IShareBlockWithdrawInputSchema = zod_1.default.object({
269
+ userId: zod_1.default.string(),
270
+ amount: zod_1.default.number().positive(),
271
+ });
272
+ exports.IShareBlockCloseInputSchema = zod_1.default.object({
273
+ userId: zod_1.default.string(), // Who is closing the block — used for audit attribution.
274
+ });
275
+ /**
276
+ * Input for the Funding-specific `commit` function. Records who pulled the
277
+ * trigger on locking the funded amount; the function itself stamps
278
+ * `committedAt` from the system clock.
279
+ */
280
+ exports.IShareBlockCommitInputSchema = zod_1.default.object({
281
+ userId: zod_1.default.string(),
282
+ });
283
+ /**
284
+ * Input for the Funding-specific `registerLender` function. Adds a new
285
+ * `Lender`-role participant to the block so they can subsequently
286
+ * `deposit` (deposit gates on participant.role === Lender).
287
+ *
288
+ * The caller (Rapture's authenticated endpoint) is responsible for
289
+ * authorizing the registration — i.e. for confirming that `userId` is the
290
+ * authenticated user pledging on this loan. The shareblock layer just
291
+ * enforces structural invariants (no duplicate userId, positive
292
+ * committedAmount, block must be open and not committed).
293
+ */
294
+ exports.IShareBlockRegisterLenderInputSchema = zod_1.default.object({
295
+ userId: zod_1.default.string(),
296
+ committedAmount: zod_1.default.number().positive().finite(),
297
+ });
298
+ /**
299
+ * Input for the Distribution-specific `fund` function. Distinct from
300
+ * `IShareBlockDepositInput` only at the type level: keeps the wire shape
301
+ * narrow to "money coming in from another block" semantics rather than the
302
+ * general-purpose deposit on Clearing.
303
+ */
304
+ exports.IShareBlockFundInputSchema = zod_1.default.object({
305
+ fromBlockId: zod_1.default.string().optional(), // upstream block id when known
306
+ amount: zod_1.default.number().positive(),
307
+ });
308
+ /**
309
+ * Input for the Distribution-specific `disburse` function. `userId` must
310
+ * resolve to a participant with role `Recipient`, or the function no-ops.
311
+ */
312
+ exports.IShareBlockDisburseInputSchema = zod_1.default.object({
313
+ userId: zod_1.default.string(),
314
+ amount: zod_1.default.number().positive(),
315
+ });
316
+ /**
317
+ * Input for the Distribution-specific `markFullyDistributed` function.
318
+ * Records who declared the block fully paid out; the function stamps
319
+ * `distributedAt`.
320
+ */
321
+ exports.IShareBlockMarkFullyDistributedInputSchema = zod_1.default.object({
322
+ userId: zod_1.default.string(),
323
+ });
324
+ /**
325
+ * Input for the GraceRepayment `setLenderGraceDecision` function.
326
+ * Lender-callable while the block is open and pre-snapshot. The block's
327
+ * rules also enforce that the calling userId matches the participant
328
+ * being mutated (lenders can only set their own decisions, not others').
329
+ */
330
+ exports.IShareBlockSetLenderGraceDecisionInputSchema = zod_1.default.object({
331
+ userId: zod_1.default.string(),
332
+ decision: zod_1.default.enum(['yield', 'grace']),
333
+ decidedAtMs: zod_1.default.number().int().nonnegative(),
334
+ });
335
+ /**
336
+ * Input for the GraceRepayment `snapshotForRepayment` function.
337
+ * Platform-only. Atomic: freezes every Lender participant's
338
+ * `snapshotDecision` from their current `graceDecision`, computes
339
+ * `blendedRatePercent` and `finalEffectiveRatePercent` from the
340
+ * weighted decisions, sets `outstandingInterestCents` to the final
341
+ * computed amount, and stamps `repaymentSnapshotAtMs`.
342
+ *
343
+ * `graceMicroInterestPercent` and `gracePerShareBlockFeeCents` are the
344
+ * platform-fee configuration values used in the math; passing them via
345
+ * the input keeps the variant function pure (no implicit config
346
+ * lookup).
347
+ */
348
+ exports.IShareBlockSnapshotForRepaymentInputSchema = zod_1.default.object({
349
+ userId: zod_1.default.string(),
350
+ baselineRatePercent: zod_1.default.number().positive(),
351
+ termDays: zod_1.default.number().int().positive(),
352
+ graceMicroInterestPercent: zod_1.default.number().nonnegative(),
353
+ gracePerShareBlockFeeCents: zod_1.default.number().int().nonnegative(),
354
+ snapshotAtMs: zod_1.default.number().int().nonnegative(),
355
+ });
356
+ /**
357
+ * Input for the GraceRepayment `recordRepayment` function. Platform-only.
358
+ * Applies an inbound borrower payment per the snapshot decisions:
359
+ * yield-ShareBlock lenders receive their share of `borrowerInterest`;
360
+ * grace-ShareBlock lenders receive only the micro-interest minus the
361
+ * per-ShareBlock fee. Decrements `outstandingInterestCents` first,
362
+ * then `outstandingPrincipalCents`. Auto-marks `fullyRepaid` when
363
+ * both reach zero.
364
+ *
365
+ * `paymentAttemptId` is the idempotency key — a second call with the
366
+ * same id is a no-op.
367
+ */
368
+ exports.IShareBlockRecordRepaymentInputSchema = zod_1.default.object({
369
+ userId: zod_1.default.string(),
370
+ paymentAttemptId: zod_1.default.string(),
371
+ amountCents: zod_1.default.number().int().positive(),
372
+ paidAtMs: zod_1.default.number().int().nonnegative(),
373
+ });
374
+ /**
375
+ * Input for the GraceRepayment `markFullyRepaid` function. Platform-only.
376
+ * Asserts `outstandingPrincipalCents === 0 && outstandingInterestCents
377
+ * === 0` before flipping. Mutually exclusive with `markDefaulted`.
378
+ */
379
+ exports.IShareBlockMarkFullyRepaidInputSchema = zod_1.default.object({
380
+ userId: zod_1.default.string(),
381
+ asOf: zod_1.default.number().int().nonnegative(),
382
+ });
383
+ /**
384
+ * Input for the GraceRepayment `markDefaulted` function. Platform-only.
385
+ * Mutually exclusive with `markFullyRepaid`. Sets the terminal default
386
+ * flag + audit metadata; the post-default flow (lender write-off,
387
+ * borrower loyalty reset, identity-reveal opt-ins) happens in Rapture's
388
+ * trigger layer, not here.
389
+ */
390
+ exports.IShareBlockMarkDefaultedInputSchema = zod_1.default.object({
391
+ userId: zod_1.default.string(),
392
+ reason: zod_1.default.string().min(1),
393
+ asOf: zod_1.default.number().int().nonnegative(),
394
+ });
395
+ //#endregion Transaction Function Inputs
@@ -1 +1 @@
1
- {"version":3,"file":"create-safe-transaction-authority-data.d.ts","sourceRoot":"","sources":["../../../src/transactions/authority/create-safe-transaction-authority-data.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,mBAAmB,EACtB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gEAAgE,CAAC;AAE/G;;;;;;;;GAQG;AACH,QAAA,MAAM,kCAAkC,wBACf,mBAAmB,0BAChB,MAAM,2BACL,uBAAuB,iBACjC,mBAAmB,EAAE,KACrC,6BAOF,CAAC;AAEF,OAAO,EAAE,kCAAkC,EAAE,CAAC"}
1
+ {"version":3,"file":"create-safe-transaction-authority-data.d.ts","sourceRoot":"","sources":["../../../src/transactions/authority/create-safe-transaction-authority-data.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,mBAAmB,EACtB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gEAAgE,CAAC;AAE/G;;;;;;;;GAQG;AACH,QAAA,MAAM,kCAAkC,GACpC,qBAAqB,mBAAmB,EACxC,wBAAwB,MAAM,EAC9B,yBAAyB,uBAAuB,EAChD,eAAe,mBAAmB,EAAE,KACrC,6BAOF,CAAC;AAEF,OAAO,EAAE,kCAAkC,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-safe-transaction-authority.d.ts","sourceRoot":"","sources":["../../../src/transactions/authority/create-safe-transaction-authority.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,yBAAyB,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACH,6BAA6B,EAC7B,yBAAyB,EAC5B,MAAM,gEAAgE,CAAC;AAExE;;;;;;;;;;GAUG;AACH,QAAA,MAAM,8BAA8B,uBACZ,MAAM,sBACN,MAAM,qBACP,yBAAyB,QACtC,6BAA6B,2CAGpC,yBAYF,CAAC;AAEF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
1
+ {"version":3,"file":"create-safe-transaction-authority.d.ts","sourceRoot":"","sources":["../../../src/transactions/authority/create-safe-transaction-authority.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,yBAAyB,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACH,6BAA6B,EAC7B,yBAAyB,EAC5B,MAAM,gEAAgE,CAAC;AAExE;;;;;;;;;;GAUG;AACH,QAAA,MAAM,8BAA8B,GAChC,oBAAoB,MAAM,EAC1B,oBAAoB,MAAM,EAC1B,mBAAmB,yBAAyB,EAC5C,MAAM,6BAA6B,EACnC,gBAAW,EACX,kBAAsB,KACvB,yBAYF,CAAC;AAEF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,23 @@
1
1
  {
2
2
  "name": "@degenerate/generic",
3
- "version": "0.2.7",
3
+ "version": "0.4.0",
4
4
  "description": "This contains the generic information needed for the ShareData Adaptive Framework Ecosystem (SAFE) network",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ }
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
7
16
  "scripts": {
8
17
  "build": "rm -rf dist/* && tsc -p tsconfig.pkg.json",
9
18
  "compile": "rm -rf dist/* && tsc -p tsconfig.pkg.json",
10
- "test": "jest --forceExit --detectOpenHandles --verbose --silent=false --env node --config tsconfig.pkg.json",
11
- "test:coverage": "jest --forceExit --coverage --detectOpenHandles --verbose --silent=false --env node --config tsconfig.pkg.json",
19
+ "test": "jest --forceExit --detectOpenHandles --verbose --silent=false --env node",
20
+ "test:coverage": "jest --forceExit --coverage --detectOpenHandles --verbose --silent=false --env node ",
12
21
  "test:clearCache": "jest --clearCache"
13
22
  },
14
23
  "repository": {
@@ -32,30 +41,29 @@
32
41
  "@types/elliptic": "^6.4.18",
33
42
  "bip39": "^3.1.0",
34
43
  "elliptic": "^6.6.1",
35
- "firebase-admin": "^13.0.1",
36
- "firebase-functions": "^6.1.2",
37
- "jsonwebtoken": "^9.0.2",
38
- "zod": "^3.24.1"
44
+ "firebase-admin": "^13.9.0",
45
+ "jsonwebtoken": "^9.0.3",
46
+ "zod": "^4.4.3"
39
47
  },
40
- "gitHead": "29034ad37b42e7ec71a842e679b6c8a257d7cb6a",
48
+ "gitHead": "9453d9ab785e03fd01eb5b408ed0e3ca22baefd5",
41
49
  "devDependencies": {
42
- "@eslint/js": "^9.17.0",
50
+ "@eslint/js": "^10.0.1",
43
51
  "@types/eslint__js": "^8.42.3",
44
- "@types/jest": "^29.5.14",
45
- "@types/node": "^22.10.2",
46
- "@typescript-eslint/eslint-plugin": "^8.18.1",
47
- "@typescript-eslint/parser": "^8.18.1",
48
- "eslint": "^9.17.0",
49
- "eslint-import-resolver-typescript": "^3.7.0",
50
- "eslint-plugin-import": "^2.31.0",
51
- "jest": "^29.7.0",
52
- "jest-environment-jsdom": "^29.7.0",
53
- "ts-jest": "^29.2.5",
52
+ "@types/jest": "^30.0.0",
53
+ "@types/node": "^22.19.18",
54
+ "@typescript-eslint/eslint-plugin": "^8.59.3",
55
+ "@typescript-eslint/parser": "^8.59.3",
56
+ "eslint": "^10.3.0",
57
+ "eslint-import-resolver-typescript": "^4.4.4",
58
+ "eslint-plugin-import": "^2.32.0",
59
+ "jest": "^30.4.2",
60
+ "jest-environment-jsdom": "^30.4.1",
61
+ "ts-jest": "^29.4.9",
54
62
  "ts-node": "^10.9.2",
55
- "typescript": "^5.7.2",
56
- "typescript-eslint": "^8.18.1"
63
+ "typescript": "^6.0.3",
64
+ "typescript-eslint": "^8.59.3"
57
65
  },
58
66
  "engines": {
59
- "node": "22.x"
67
+ "node": ">=22"
60
68
  }
61
69
  }
@@ -1,181 +0,0 @@
1
- import z from 'zod';
2
- /**
3
- * This contains the data for the share data object
4
- */
5
- export declare enum ShareDataTypes {
6
- AUTHORIZATION = "AUTHORIZATION",
7
- RULE = "RULE",
8
- FUNCTION = "FUNCTION",
9
- TRANSACTION_HISTORY = "TRANSACTION_HISTORY",
10
- DATA = "DATA"
11
- }
12
- export declare const ShareDataTypesSchema: z.ZodEnum<["AUTHORIZATION", "RULE", "FUNCTION", "TRANSACTION_HISTORY", "DATA"]>;
13
- /**
14
- * This contains the interface for a data in a share data object
15
- */
16
- export declare const IShareDataSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
17
- export type IShareData = z.infer<typeof IShareDataSchema>;
18
- /**
19
- * This contains the interface for a share function record in the share data object
20
- */
21
- export declare const IShareFunctionRecordSchema: z.ZodObject<{
22
- id: z.ZodString;
23
- groupingId: z.ZodString;
24
- groupingName: z.ZodString;
25
- name: z.ZodString;
26
- description: z.ZodString;
27
- hash: z.ZodString;
28
- stringifiedFunction: z.ZodString;
29
- }, "strip", z.ZodTypeAny, {
30
- stringifiedFunction: string;
31
- id: string;
32
- name: string;
33
- description: string;
34
- groupingId: string;
35
- groupingName: string;
36
- hash: string;
37
- }, {
38
- stringifiedFunction: string;
39
- id: string;
40
- name: string;
41
- description: string;
42
- groupingId: string;
43
- groupingName: string;
44
- hash: string;
45
- }>;
46
- export type IShareFunctionRecord = z.infer<typeof IShareFunctionRecordSchema>;
47
- /**
48
- * This contains the interface for a share function in the share data object
49
- */
50
- export declare const IShareFunctionSchema: z.ZodObject<{
51
- input: z.ZodAny;
52
- func: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
53
- output: z.ZodAny;
54
- }, "strip", z.ZodTypeAny, {
55
- func: (...args: unknown[]) => unknown;
56
- output?: any;
57
- input?: any;
58
- }, {
59
- func: (...args: unknown[]) => unknown;
60
- output?: any;
61
- input?: any;
62
- }>;
63
- export interface IShareFunction<TInput, TFunction extends (...args: any[]) => any, TOutput> {
64
- input: TInput;
65
- func: TFunction;
66
- output: TOutput;
67
- }
68
- /**
69
- * This contains the interface for the rule failures in the share data object
70
- */
71
- export declare const IShareDataRuleFailuresSchema: z.ZodObject<{
72
- ruleId: z.ZodString;
73
- }, "strip", z.ZodTypeAny, {
74
- ruleId: string;
75
- }, {
76
- ruleId: string;
77
- }>;
78
- export type IShareDataRuleFailures = z.infer<typeof IShareDataRuleFailuresSchema>;
79
- /**
80
- * This contains the interface for the share transaction history in the share data object
81
- */
82
- export declare const IShareDataTransactionBaseSchema: z.ZodObject<{
83
- ruleOutcome: z.ZodBoolean;
84
- ruleFailures: z.ZodArray<z.ZodObject<{
85
- ruleId: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- ruleId: string;
88
- }, {
89
- ruleId: string;
90
- }>, "many">;
91
- transactionFunction: z.ZodObject<{
92
- input: z.ZodAny;
93
- func: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
94
- output: z.ZodAny;
95
- }, "strip", z.ZodTypeAny, {
96
- func: (...args: unknown[]) => unknown;
97
- output?: any;
98
- input?: any;
99
- }, {
100
- func: (...args: unknown[]) => unknown;
101
- output?: any;
102
- input?: any;
103
- }>;
104
- }, "strip", z.ZodTypeAny, {
105
- ruleOutcome: boolean;
106
- ruleFailures: {
107
- ruleId: string;
108
- }[];
109
- transactionFunction: {
110
- func: (...args: unknown[]) => unknown;
111
- output?: any;
112
- input?: any;
113
- };
114
- }, {
115
- ruleOutcome: boolean;
116
- ruleFailures: {
117
- ruleId: string;
118
- }[];
119
- transactionFunction: {
120
- func: (...args: unknown[]) => unknown;
121
- output?: any;
122
- input?: any;
123
- };
124
- }>;
125
- export type IShareDataTransactionBase = z.infer<typeof IShareDataTransactionBaseSchema>;
126
- /**
127
- * This contains the interface for the share transaction history in the share data object
128
- * This is done for storage
129
- */
130
- export declare const IShareDataTransactionHistorySchema: z.ZodObject<z.objectUtil.extendShape<{
131
- ruleOutcome: z.ZodBoolean;
132
- ruleFailures: z.ZodArray<z.ZodObject<{
133
- ruleId: z.ZodString;
134
- }, "strip", z.ZodTypeAny, {
135
- ruleId: string;
136
- }, {
137
- ruleId: string;
138
- }>, "many">;
139
- transactionFunction: z.ZodObject<{
140
- input: z.ZodAny;
141
- func: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
142
- output: z.ZodAny;
143
- }, "strip", z.ZodTypeAny, {
144
- func: (...args: unknown[]) => unknown;
145
- output?: any;
146
- input?: any;
147
- }, {
148
- func: (...args: unknown[]) => unknown;
149
- output?: any;
150
- input?: any;
151
- }>;
152
- }, {
153
- transactionId: z.ZodString;
154
- transactionTime: z.ZodNumber;
155
- }>, "strip", z.ZodTypeAny, {
156
- ruleOutcome: boolean;
157
- ruleFailures: {
158
- ruleId: string;
159
- }[];
160
- transactionFunction: {
161
- func: (...args: unknown[]) => unknown;
162
- output?: any;
163
- input?: any;
164
- };
165
- transactionId: string;
166
- transactionTime: number;
167
- }, {
168
- ruleOutcome: boolean;
169
- ruleFailures: {
170
- ruleId: string;
171
- }[];
172
- transactionFunction: {
173
- func: (...args: unknown[]) => unknown;
174
- output?: any;
175
- input?: any;
176
- };
177
- transactionId: string;
178
- transactionTime: number;
179
- }>;
180
- export type IShareDataTransactionHistory = z.infer<typeof IShareDataTransactionHistorySchema>;
181
- //# sourceMappingURL=share-data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"share-data.d.ts","sourceRoot":"","sources":["../../../src/models/share-data/share-data.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;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,iFAM/B,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,gBAAgB,oCAAoB,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;EAQrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAGH,MAAM,WAAW,cAAc,CAAC,MAAM,EAAE,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,OAAO;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACnB;AAGD;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}