@avow-finance/spec 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +119 -2
- package/dist/agent-connect.d.ts +82 -0
- package/dist/agent-connect.d.ts.map +1 -0
- package/dist/agent-connect.js +91 -0
- package/dist/agent-connect.js.map +1 -0
- package/dist/agent-session.d.ts +791 -0
- package/dist/agent-session.d.ts.map +1 -0
- package/dist/agent-session.js +176 -0
- package/dist/agent-session.js.map +1 -0
- package/dist/ap2.d.ts +79 -0
- package/dist/ap2.d.ts.map +1 -0
- package/dist/ap2.js +151 -0
- package/dist/ap2.js.map +1 -0
- package/dist/api-request.d.ts +144 -0
- package/dist/api-request.d.ts.map +1 -0
- package/dist/api-request.js +246 -0
- package/dist/api-request.js.map +1 -0
- package/dist/api.d.ts +288 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +332 -0
- package/dist/api.js.map +1 -0
- package/dist/canonical.d.ts +22 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +66 -0
- package/dist/canonical.js.map +1 -0
- package/dist/commitment-card.d.ts +78 -0
- package/dist/commitment-card.d.ts.map +1 -0
- package/dist/commitment-card.js +224 -0
- package/dist/commitment-card.js.map +1 -0
- package/dist/commitment.d.ts +185 -0
- package/dist/commitment.d.ts.map +1 -0
- package/dist/commitment.js +148 -0
- package/dist/commitment.js.map +1 -0
- package/dist/compute-offers.d.ts +128 -0
- package/dist/compute-offers.d.ts.map +1 -0
- package/dist/compute-offers.js +111 -0
- package/dist/compute-offers.js.map +1 -0
- package/dist/contest.d.ts +88 -0
- package/dist/contest.d.ts.map +1 -0
- package/dist/contest.js +131 -0
- package/dist/contest.js.map +1 -0
- package/dist/demo.d.ts +69 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/demo.js +152 -0
- package/dist/demo.js.map +1 -0
- package/dist/dependencies.d.ts +308 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +133 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/eip712.d.ts +1569 -0
- package/dist/eip712.d.ts.map +1 -0
- package/dist/eip712.js +550 -0
- package/dist/eip712.js.map +1 -0
- package/dist/elided-terms.d.ts +37 -0
- package/dist/elided-terms.d.ts.map +1 -0
- package/dist/elided-terms.js +48 -0
- package/dist/elided-terms.js.map +1 -0
- package/dist/erc8183.d.ts +78 -0
- package/dist/erc8183.d.ts.map +1 -0
- package/dist/erc8183.js +88 -0
- package/dist/erc8183.js.map +1 -0
- package/dist/facts.d.ts +70 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +33 -0
- package/dist/facts.js.map +1 -0
- package/dist/gpu-reservation.d.ts +79 -0
- package/dist/gpu-reservation.d.ts.map +1 -0
- package/dist/gpu-reservation.js +135 -0
- package/dist/gpu-reservation.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/job-session.d.ts +981 -0
- package/dist/job-session.d.ts.map +1 -0
- package/dist/job-session.js +170 -0
- package/dist/job-session.js.map +1 -0
- package/dist/job-verification.d.ts +244 -0
- package/dist/job-verification.d.ts.map +1 -0
- package/dist/job-verification.js +89 -0
- package/dist/job-verification.js.map +1 -0
- package/dist/job-wording.d.ts +48 -0
- package/dist/job-wording.d.ts.map +1 -0
- package/dist/job-wording.js +134 -0
- package/dist/job-wording.js.map +1 -0
- package/dist/job.d.ts +117 -0
- package/dist/job.d.ts.map +1 -0
- package/dist/job.js +166 -0
- package/dist/job.js.map +1 -0
- package/dist/json-fields.d.ts +13 -0
- package/dist/json-fields.d.ts.map +1 -0
- package/dist/json-fields.js +30 -0
- package/dist/json-fields.js.map +1 -0
- package/dist/keychain.d.ts +51 -0
- package/dist/keychain.d.ts.map +1 -0
- package/dist/keychain.js +133 -0
- package/dist/keychain.js.map +1 -0
- package/dist/mailbox.d.ts +1650 -0
- package/dist/mailbox.d.ts.map +1 -0
- package/dist/mailbox.js +87 -0
- package/dist/mailbox.js.map +1 -0
- package/dist/mandate.d.ts +53 -0
- package/dist/mandate.d.ts.map +1 -0
- package/dist/mandate.js +97 -0
- package/dist/mandate.js.map +1 -0
- package/dist/networks.d.ts +18 -0
- package/dist/networks.d.ts.map +1 -0
- package/dist/networks.js +24 -0
- package/dist/networks.js.map +1 -0
- package/dist/profiles.d.ts +31 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +33 -0
- package/dist/profiles.js.map +1 -0
- package/dist/rail.d.ts +48 -0
- package/dist/rail.d.ts.map +1 -0
- package/dist/rail.js +28 -0
- package/dist/rail.js.map +1 -0
- package/dist/reasons.d.ts +173 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +174 -0
- package/dist/reasons.js.map +1 -0
- package/dist/reference-link.d.ts +23 -0
- package/dist/reference-link.d.ts.map +1 -0
- package/dist/reference-link.js +56 -0
- package/dist/reference-link.js.map +1 -0
- package/dist/references.d.ts +125 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +108 -0
- package/dist/references.js.map +1 -0
- package/dist/replay.d.ts +30 -0
- package/dist/replay.d.ts.map +1 -0
- package/dist/replay.js +27 -0
- package/dist/replay.js.map +1 -0
- package/dist/sandbox-registration.d.ts +200 -0
- package/dist/sandbox-registration.d.ts.map +1 -0
- package/dist/sandbox-registration.js +172 -0
- package/dist/sandbox-registration.js.map +1 -0
- package/dist/sandbox.d.ts +3478 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +316 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/session-fields.d.ts +203 -0
- package/dist/session-fields.d.ts.map +1 -0
- package/dist/session-fields.js +43 -0
- package/dist/session-fields.js.map +1 -0
- package/dist/supplier-adapter.d.ts +65 -0
- package/dist/supplier-adapter.d.ts.map +1 -0
- package/dist/supplier-adapter.js +91 -0
- package/dist/supplier-adapter.js.map +1 -0
- package/dist/terms-v1.d.ts +74 -0
- package/dist/terms-v1.d.ts.map +1 -0
- package/dist/terms-v1.js +156 -0
- package/dist/terms-v1.js.map +1 -0
- package/dist/terms.d.ts +341 -0
- package/dist/terms.d.ts.map +1 -0
- package/dist/terms.js +715 -0
- package/dist/terms.js.map +1 -0
- package/dist/test-customer.d.ts +1525 -0
- package/dist/test-customer.d.ts.map +1 -0
- package/dist/test-customer.js +260 -0
- package/dist/test-customer.js.map +1 -0
- package/dist/types.d.ts +272 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +51 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +66 -0
- package/dist/version.js.map +1 -0
- package/dist/wire.d.ts +2698 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +678 -0
- package/dist/wire.js.map +1 -0
- package/package.json +37 -3
- package/vectors/api-request-v1.json +53 -0
- package/vectors/contest-statement-v1.json +42 -0
- package/vectors/terms-v2.json +398 -0
- package/vectors/terms-v3.json +2103 -0
package/dist/terms.d.ts
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { type Address, type Hex } from 'viem';
|
|
2
|
+
import { type DependencyCheck } from './dependencies.js';
|
|
3
|
+
import { type Approval, type Charge } from './eip712.js';
|
|
4
|
+
import type { TermsProfile } from './profiles.js';
|
|
5
|
+
import type { ReasonCode } from './reasons.js';
|
|
6
|
+
import { type ComputeTermsV1 } from './terms-v1.js';
|
|
7
|
+
import { AMOUNT_DECIMALS, CHAINED_TERMS_VERSION, type ChainedTerms, type Currency, type Mandate, type RemedyCharge, type Side, type SupplierProfile, TERMS_VERSION, type TemplateId, type Terms } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Terms of any version a plain booking takes: version 2, and version 1 for commitments made under
|
|
10
|
+
* it. Every check and mapping that takes these refuses version 3, which goes through its own.
|
|
11
|
+
*/
|
|
12
|
+
export type AnyTerms = Terms | ComputeTermsV1;
|
|
13
|
+
/** The five sections of version 2 terms, in the order the terms hash takes their hashes. */
|
|
14
|
+
export declare const TERMS_SECTIONS: readonly ['subject', 'consideration', 'remedies', 'resolution', 'backing'];
|
|
15
|
+
export type TermsSection = (typeof TERMS_SECTIONS)[number];
|
|
16
|
+
/** The six sections of version 3 terms, version 2's five and then `dependencies`, in hash order. */
|
|
17
|
+
export declare const CHAINED_TERMS_SECTIONS: readonly ["subject", "consideration", "remedies", "resolution", "backing", "dependencies"];
|
|
18
|
+
export type ChainedTermsSection = (typeof CHAINED_TERMS_SECTIONS)[number];
|
|
19
|
+
/** The label a version 2 terms hash starts from. No other Avow hash uses it. */
|
|
20
|
+
export declare const TERMS_LABEL = "avow:terms:v2";
|
|
21
|
+
/** The label a version 3 terms hash starts from. No other Avow hash uses it. */
|
|
22
|
+
export declare const CHAINED_TERMS_LABEL = "avow:terms:v3";
|
|
23
|
+
/**
|
|
24
|
+
* The label a section's hash starts from, such as `avow:terms:v2:remedies`, or
|
|
25
|
+
* `avow:terms:v3:dependencies` for the section version 3 adds.
|
|
26
|
+
*/
|
|
27
|
+
export declare function sectionLabel(section: ChainedTermsSection): string;
|
|
28
|
+
/**
|
|
29
|
+
* The HKDF info that derives a section's salt, such as `avow:terms:v2:salt:remedies`, or
|
|
30
|
+
* `avow:terms:v3:salt:dependencies` for the section version 3 adds.
|
|
31
|
+
*/
|
|
32
|
+
export declare function sectionSaltLabel(section: ChainedTermsSection): string;
|
|
33
|
+
/** The part of version 2 terms hashed in the clear. It says how to read the five sections. */
|
|
34
|
+
export interface TermsHeader {
|
|
35
|
+
version: typeof TERMS_VERSION;
|
|
36
|
+
template: TemplateId;
|
|
37
|
+
currency: Currency;
|
|
38
|
+
amountDecimals: typeof AMOUNT_DECIMALS;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The part of version 3 terms hashed in the clear. It says how to read the six sections and who
|
|
42
|
+
* checks the bookings the dependencies section names, so a buyer shown that section only as its
|
|
43
|
+
* digest still reads the setting and checks it against the terms hash.
|
|
44
|
+
*/
|
|
45
|
+
export interface ChainedTermsHeader extends Omit<TermsHeader, 'version'> {
|
|
46
|
+
version: typeof CHAINED_TERMS_VERSION;
|
|
47
|
+
dependencyCheck: DependencyCheck;
|
|
48
|
+
}
|
|
49
|
+
/** Anything that carries a version 3 header's fields, such as the terms or the buyer's view. */
|
|
50
|
+
type ChainedHeaderFields = Pick<ChainedTerms, keyof ChainedTermsHeader>;
|
|
51
|
+
export declare function termsHeader(t: Terms): TermsHeader;
|
|
52
|
+
export declare function termsHeader(t: ChainedHeaderFields): ChainedTermsHeader;
|
|
53
|
+
export declare function termsHeader(t: Terms | ChainedHeaderFields): TermsHeader | ChainedTermsHeader;
|
|
54
|
+
/** The five sections of version 2 terms by name, or version 3's six. */
|
|
55
|
+
export declare function termsSections(t: Terms): Record<TermsSection, unknown>;
|
|
56
|
+
export declare function termsSections(t: ChainedTerms): Record<ChainedTermsSection, unknown>;
|
|
57
|
+
export declare function termsSections(t: Terms | ChainedTerms): Partial<Record<ChainedTermsSection, unknown>>;
|
|
58
|
+
/** The versions that hash their terms in sections, so a section of them can be shown on its own. */
|
|
59
|
+
export declare const SECTIONED_TERMS_VERSIONS: readonly unknown[];
|
|
60
|
+
/**
|
|
61
|
+
* A section given only as its hash, under its label, in place of its content. Version 3 terms the
|
|
62
|
+
* buyer is shown when Avow checks the bookings relied on carry their dependencies section this way.
|
|
63
|
+
*/
|
|
64
|
+
export interface ElidedSection {
|
|
65
|
+
/** The section's label, such as `avow:terms:v3:dependencies`. */
|
|
66
|
+
label: string;
|
|
67
|
+
/** The section's hash, as `sectionHash` gives it. */
|
|
68
|
+
digest: Hex;
|
|
69
|
+
}
|
|
70
|
+
/** The label an elided dependencies section carries, the one its hash starts from. */
|
|
71
|
+
export declare const DEPENDENCIES_LABEL: string;
|
|
72
|
+
/**
|
|
73
|
+
* Whether a value stands in for a section by its digest. A reader that needs the section in clear
|
|
74
|
+
* refuses one with `dependency.elided`, and never reads it as a section with nothing in it.
|
|
75
|
+
*/
|
|
76
|
+
export declare function isElidedSection(value: unknown): value is ElidedSection;
|
|
77
|
+
/**
|
|
78
|
+
* What keeps terms from being hashed, or null when nothing does. Version 2 terms hold exactly
|
|
79
|
+
* their version, the header's other three fields and the five sections, each section an object,
|
|
80
|
+
* and every value has to be one canonical JSON can write. The terms hash covers only the header
|
|
81
|
+
* and the sections, so a field beside them is refused rather than left out of the hash. A field
|
|
82
|
+
* or section left out is `terms.incomplete`, another version is `terms.version_unknown` and
|
|
83
|
+
* anything else is `terms.invalid`. Terms with no `version` key are version 1, and any other field
|
|
84
|
+
* set to undefined counts as left out, as JSON leaves it out. Version 1 terms hash every field they
|
|
85
|
+
* hold, so `validateTerms` checks them on its own.
|
|
86
|
+
*
|
|
87
|
+
* Version 3 terms are refused as a version this reads, as are their checks, since a booking that
|
|
88
|
+
* relies on others is sound only once those bookings are read. `chainedTermsShapeProblem` reads
|
|
89
|
+
* version 3 alone, for a path that also runs that check.
|
|
90
|
+
*/
|
|
91
|
+
export declare function termsShapeProblem(terms: unknown): ReasonCode | null;
|
|
92
|
+
/**
|
|
93
|
+
* What keeps version 3 terms from being hashed, or null when nothing does. They hold version 2's
|
|
94
|
+
* fields, a `dependencyCheck` of `buyer` or `avow`, and the dependencies section, which is a list.
|
|
95
|
+
* Terms carrying that section only as its digest are `dependency.elided`, since these are the
|
|
96
|
+
* terms in full, and every other version is `terms.version_unknown`.
|
|
97
|
+
*/
|
|
98
|
+
export declare function chainedTermsShapeProblem(terms: unknown): ReasonCode | null;
|
|
99
|
+
/**
|
|
100
|
+
* A section's salt. It's HKDF-SHA256 (RFC 5869) with the commitment's 32-byte salt as the input
|
|
101
|
+
* keying material, no HKDF salt, the UTF-8 bytes of the section's salt label as the info, and 32
|
|
102
|
+
* bytes of output. The label is `avow:terms:v2:salt:<section>`, or
|
|
103
|
+
* `avow:terms:v3:salt:dependencies` for the section version 3 adds. Showing one section's salt
|
|
104
|
+
* reveals no other section's salt and not the commitment's.
|
|
105
|
+
*/
|
|
106
|
+
export declare function sectionSalt(salt: Hex, section: ChainedTermsSection): Hex;
|
|
107
|
+
/**
|
|
108
|
+
* A section's hash: keccak256 of the ABI encoding of the section's label, such as
|
|
109
|
+
* `avow:terms:v2:<section>` or `avow:terms:v3:dependencies`, the section's own salt as bytes32,
|
|
110
|
+
* and the section's canonical JSON as a string.
|
|
111
|
+
*/
|
|
112
|
+
export declare function sectionHash(section: ChainedTermsSection, content: unknown, ownSalt: Hex): Hex;
|
|
113
|
+
/**
|
|
114
|
+
* The terms hash from the header and the section hashes: keccak256 of the ABI encoding of the
|
|
115
|
+
* string `avow:terms:v2`, the header's canonical JSON as a string, and the hashes of subject,
|
|
116
|
+
* consideration, remedies, resolution and backing as five bytes32, in that order.
|
|
117
|
+
*/
|
|
118
|
+
export declare function termsHashFromSections(header: TermsHeader, hashes: Record<TermsSection, Hex>): Hex;
|
|
119
|
+
/**
|
|
120
|
+
* The version 3 terms hash from the header and the section hashes: keccak256 of the ABI encoding
|
|
121
|
+
* of the string `avow:terms:v3`, the header's canonical JSON as a string, and the hashes of
|
|
122
|
+
* subject, consideration, remedies, resolution, backing and dependencies as six bytes32, in that
|
|
123
|
+
* order.
|
|
124
|
+
*/
|
|
125
|
+
export declare function chainedTermsHashFromSections(header: ChainedTermsHeader, hashes: Record<ChainedTermsSection, Hex>): Hex;
|
|
126
|
+
/** Each section's hash under the commitment's salt, five for version 2 terms and six for version 3. */
|
|
127
|
+
export declare function sectionHashes(t: Terms, salt: Hex): Record<TermsSection, Hex>;
|
|
128
|
+
export declare function sectionHashes(t: ChainedTerms, salt: Hex): Record<ChainedTermsSection, Hex>;
|
|
129
|
+
export declare function sectionHashes(t: Terms | ChainedTerms, salt: Hex): Partial<Record<ChainedTermsSection, Hex>>;
|
|
130
|
+
/**
|
|
131
|
+
* The salted terms hash the lock stores and every signed message names. Version 2 and version 3
|
|
132
|
+
* terms hash their header and sections as above. Version 1 terms keep the hash they were signed
|
|
133
|
+
* under. Throws on version 1 or 2 terms `termsShapeProblem` refuses and on version 3 terms
|
|
134
|
+
* `chainedTermsShapeProblem` refuses, so no field ever sits outside the hash.
|
|
135
|
+
*/
|
|
136
|
+
export declare function termsHash(terms: AnyTerms | ChainedTerms, salt: Hex): Hex;
|
|
137
|
+
/** One section shown on its own, with what proves it belongs to a terms hash. */
|
|
138
|
+
export interface SectionDisclosure {
|
|
139
|
+
header: TermsHeader | ChainedTermsHeader;
|
|
140
|
+
/** One of the five sections of version 2 terms, or one of the six of version 3. */
|
|
141
|
+
section: ChainedTermsSection;
|
|
142
|
+
/** The section as the terms hold it. */
|
|
143
|
+
content: unknown;
|
|
144
|
+
/** This section's own salt. The commitment's salt never leaves the parties. */
|
|
145
|
+
salt: Hex;
|
|
146
|
+
/** The hashes of every other section the header's version holds. */
|
|
147
|
+
others: Partial<Record<ChainedTermsSection, Hex>>;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Shows one section of the terms, with its own salt and the hashes of every other section, four
|
|
151
|
+
* for version 2 terms and five for version 3.
|
|
152
|
+
*/
|
|
153
|
+
export declare function discloseSection(terms: Terms, salt: Hex, section: TermsSection): SectionDisclosure;
|
|
154
|
+
export declare function discloseSection(terms: ChainedTerms, salt: Hex, section: ChainedTermsSection): SectionDisclosure;
|
|
155
|
+
/**
|
|
156
|
+
* Checks a shown section against the terms hash a lock or a signed message holds. It needs only
|
|
157
|
+
* the section, its own salt and the hashes of the other sections its header's version holds.
|
|
158
|
+
* `parseSectionDisclosure` checks the section's shape before a reader relies on what it says.
|
|
159
|
+
*/
|
|
160
|
+
export declare function checkSectionDisclosure(d: SectionDisclosure, expected: Hex): ReasonCode | null;
|
|
161
|
+
/**
|
|
162
|
+
* Why terms can't be booked under this mandate category, or null when they can. A template with
|
|
163
|
+
* a category of its own, such as a job's, takes only that one, and any other is
|
|
164
|
+
* `terms.category_mismatch`.
|
|
165
|
+
*/
|
|
166
|
+
export declare function templateCategoryProblem(terms: {
|
|
167
|
+
template: string;
|
|
168
|
+
}, category: string): ReasonCode | null;
|
|
169
|
+
/**
|
|
170
|
+
* Checks terms on their own, before any mandate, and returns null when they're sound. Version 1
|
|
171
|
+
* terms keep the checks they were made under. Version 2 terms pass the core's checks of what a
|
|
172
|
+
* lock enforces, then their template's rules. A template whose bookings always rely on another,
|
|
173
|
+
* such as a job, is refused as `dependency.required`. The core refuses a backing, side or charge a lock
|
|
174
|
+
* can't enforce, and a template it doesn't know. Version 3 terms are refused as a version this
|
|
175
|
+
* reads, and `validateChainedTerms` checks them.
|
|
176
|
+
*/
|
|
177
|
+
export declare function validateTerms(terms: AnyTerms, profile: TermsProfile): ReasonCode | null;
|
|
178
|
+
/**
|
|
179
|
+
* Checks version 3 terms on their own and returns null when they're sound. They pass every check
|
|
180
|
+
* the version 2 terms they make pass, and their dependencies section passes
|
|
181
|
+
* `dependenciesProblem`. Whether each booking relied on stands is for a check that reads its lock,
|
|
182
|
+
* so a caller that commits to these terms runs that check too.
|
|
183
|
+
*/
|
|
184
|
+
export declare function validateChainedTerms(terms: ChainedTerms, profile: TermsProfile): ReasonCode | null;
|
|
185
|
+
/**
|
|
186
|
+
* Why version 3 terms can't use the setting they name for who checks their bookings, or null when
|
|
187
|
+
* they can. A setting the template doesn't allow is `terms.template_invalid`.
|
|
188
|
+
*/
|
|
189
|
+
export declare function dependencyCheckProblem(terms: Pick<ChainedTerms, 'template' | 'dependencyCheck'>): ReasonCode | null;
|
|
190
|
+
/**
|
|
191
|
+
* The version 2 terms that say what these version 3 terms say, without the bookings they rely on
|
|
192
|
+
* or who checks them. They pass the same checks and make the lock enforce the same values, and
|
|
193
|
+
* their terms hash differs, so they never stand for the version 3 terms in a signed message.
|
|
194
|
+
*/
|
|
195
|
+
export declare function plainTermsOf(terms: ChainedTerms): Terms;
|
|
196
|
+
/**
|
|
197
|
+
* What a lock enforces for a commitment under these terms, in micros of the terms' currency and
|
|
198
|
+
* unix seconds. Avow's approval carries exactly these values, so the API builds it from this and
|
|
199
|
+
* a verifier checks it against this. Each version's mapping is fixed. Version 2 takes the reserve
|
|
200
|
+
* and release date from the backing, the deadlines and charges from the remedies, and the contest
|
|
201
|
+
* window, arbiter and day-90 share from the resolution. Version 1 maps its flat fields as it always
|
|
202
|
+
* has, with a no-show chargeable from the window's start plus the grace period. Version 3 terms map
|
|
203
|
+
* as `plainTermsOf` gives them, since the lock enforces nothing in their dependencies section.
|
|
204
|
+
*/
|
|
205
|
+
export interface EnforceableTerms {
|
|
206
|
+
currency: Currency;
|
|
207
|
+
/** The side the reserve backs. Version 1 terms back the buyer. */
|
|
208
|
+
side: Side;
|
|
209
|
+
reserve: bigint;
|
|
210
|
+
acceptBy: bigint;
|
|
211
|
+
freeCancelBy: bigint;
|
|
212
|
+
chargeDeadline: bigint;
|
|
213
|
+
releaseDate: bigint;
|
|
214
|
+
contestWindow: bigint;
|
|
215
|
+
charges: readonly RemedyCharge[];
|
|
216
|
+
arbiter: Address;
|
|
217
|
+
day90SupplierShareBps: number;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* What the lock enforces of these terms. Version 3 terms are read as the version 2 terms they
|
|
221
|
+
* make, since the lock knows nothing of the bookings they rely on.
|
|
222
|
+
*/
|
|
223
|
+
export declare function enforceableTerms(given: AnyTerms | ChainedTerms): EnforceableTerms;
|
|
224
|
+
/** The fields of Avow's approval that come from the terms, with amounts in the token's base units. */
|
|
225
|
+
export interface LockTerms {
|
|
226
|
+
side: Side;
|
|
227
|
+
amount: bigint;
|
|
228
|
+
freeCancelBy: bigint;
|
|
229
|
+
acceptBy: bigint;
|
|
230
|
+
chargeDeadline: bigint;
|
|
231
|
+
releaseDate: bigint;
|
|
232
|
+
contestWindow: bigint;
|
|
233
|
+
charges: Charge[];
|
|
234
|
+
day90SupplierShareBps: number;
|
|
235
|
+
arbiter: Address;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* The enforceable fields in a token's base units, as Avow's approval carries them and the lock
|
|
239
|
+
* stores them. Throws when an amount can't be paid exactly in a token with these decimals.
|
|
240
|
+
*/
|
|
241
|
+
export declare function lockTerms(given: AnyTerms | ChainedTerms, decimals: number): LockTerms;
|
|
242
|
+
/**
|
|
243
|
+
* The charges a commitment under these terms carries, as Avow's approval names them. Version 1
|
|
244
|
+
* terms keep the function they were read with, which needs neither the dispute block nor a reserve
|
|
245
|
+
* the token can hold.
|
|
246
|
+
*/
|
|
247
|
+
export declare function termsCharges(terms: AnyTerms, decimals: number): Charge[];
|
|
248
|
+
/**
|
|
249
|
+
* Every field of `LockTerms`, the values a lock enforces for a commitment, in the order Avow's
|
|
250
|
+
* approval carries them. The build fails when `LockTerms` gains a field this list leaves out, and
|
|
251
|
+
* every comparison of lock-enforced values runs through `lockTermsDifferences`, so a new field is
|
|
252
|
+
* compared everywhere at once.
|
|
253
|
+
*/
|
|
254
|
+
export declare const LOCK_TERMS_FIELDS: readonly ['side', 'amount', 'freeCancelBy', 'acceptBy', 'chargeDeadline', 'releaseDate', 'contestWindow', 'charges', 'day90SupplierShareBps', 'arbiter'];
|
|
255
|
+
export type LockTermsField = (typeof LOCK_TERMS_FIELDS)[number];
|
|
256
|
+
/**
|
|
257
|
+
* The lock-enforced fields a lock's record of one side of a commitment holds: every field but
|
|
258
|
+
* `side`. The lock files each record under its side, so a record names its side by where it's
|
|
259
|
+
* read from rather than in a field.
|
|
260
|
+
*/
|
|
261
|
+
export declare const LOCK_RECORD_FIELDS: ("acceptBy" | "amount" | "arbiter" | "chargeDeadline" | "charges" | "contestWindow" | "day90SupplierShareBps" | "freeCancelBy" | "releaseDate")[];
|
|
262
|
+
export type LockRecordField = (typeof LOCK_RECORD_FIELDS)[number];
|
|
263
|
+
/**
|
|
264
|
+
* The lock-enforced fields Avow's supplier authorization carries: the reserve and three deadlines.
|
|
265
|
+
* Its EIP-712 type fixes them, and the build fails when that type and this list disagree about
|
|
266
|
+
* which lock-enforced fields it holds.
|
|
267
|
+
*/
|
|
268
|
+
export declare const AUTHORIZATION_TERMS_FIELDS: readonly ['amount', 'acceptBy', 'chargeDeadline', 'releaseDate'];
|
|
269
|
+
export type AuthorizationTermsField = (typeof AUTHORIZATION_TERMS_FIELDS)[number];
|
|
270
|
+
/** Lock-enforced values as a record, an approval or the terms hold them. */
|
|
271
|
+
export type LockTermsValues<F extends LockTermsField = LockTermsField> = {
|
|
272
|
+
readonly [K in F]: K extends 'charges' ? readonly Charge[] : LockTerms[K];
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Whether two lists of charges are the same: the same kinds in the same order, each equal in
|
|
276
|
+
* every field the signed `Charge` type holds.
|
|
277
|
+
*/
|
|
278
|
+
export declare function sameCharges(a: readonly Charge[], b: readonly Charge[]): boolean;
|
|
279
|
+
/**
|
|
280
|
+
* The fields where `actual` differs from `expected`, among `fields` and in their order, or an empty
|
|
281
|
+
* list when they agree. Amounts, times and the day-90 share compare exactly, the arbiter in any
|
|
282
|
+
* letter case, and charges kind by kind in order. Every check of lock-enforced values uses this,
|
|
283
|
+
* with `LOCK_TERMS_FIELDS`, `LOCK_RECORD_FIELDS` or `AUTHORIZATION_TERMS_FIELDS` as the fields.
|
|
284
|
+
*/
|
|
285
|
+
export declare function lockTermsDifferences<F extends LockTermsField>(actual: LockTermsValues<F>, expected: LockTermsValues<F>, fields: readonly F[]): F[];
|
|
286
|
+
/**
|
|
287
|
+
* The fields where a lock's record of one side of a commitment differs from the values expected of
|
|
288
|
+
* it, among `LOCK_RECORD_FIELDS`. The lock stores charges by kind, so their order means nothing to
|
|
289
|
+
* it, and both sides' charges are put in the order of the lock's codes before they're compared.
|
|
290
|
+
*/
|
|
291
|
+
export declare function lockRecordDifferences(record: LockTermsValues<LockRecordField>, expected: LockTermsValues<LockRecordField>): LockRecordField[];
|
|
292
|
+
/** The fields of Avow's approval that have to match the terms. */
|
|
293
|
+
export type ApprovalTermsFields = Pick<Approval, 'side' | 'amount' | 'freeCancelBy' | 'acceptBy' | 'chargeDeadline' | 'releaseDate' | 'contestWindow' | 'charges' | 'day90SupplierShareBps' | 'arbiter' | 'termsHash'>;
|
|
294
|
+
/**
|
|
295
|
+
* Checks that an approval carries exactly what the signed terms map to, and the terms hash both
|
|
296
|
+
* businesses signed. The API runs it before it signs an approval, and a supplier's verifier runs
|
|
297
|
+
* it before it accepts one, so an approval can't make a lock enforce anything the terms don't say.
|
|
298
|
+
* Returns the first difference, or null.
|
|
299
|
+
*/
|
|
300
|
+
export declare function approvalTermsProblem(approval: ApprovalTermsFields, expected: {
|
|
301
|
+
lock: LockTerms;
|
|
302
|
+
termsHash: Hex;
|
|
303
|
+
}): ReasonCode | null;
|
|
304
|
+
/** The supplier's own account, signing key and payout address, which its approvals have to name. */
|
|
305
|
+
export type ApprovalParties = Pick<SupplierProfile, 'account' | 'signingKey' | 'payee'>;
|
|
306
|
+
/**
|
|
307
|
+
* Checks that an approval names the supplier's own account, which consents to releases, its
|
|
308
|
+
* signing key, which accepts the reserve and reports charges, and its payout address. Returns
|
|
309
|
+
* `approval.parties_mismatch` when any of them differs, or null.
|
|
310
|
+
*/
|
|
311
|
+
export declare function approvalPartiesProblem(approval: Pick<Approval, 'supplier' | 'supplierSigner' | 'payee'>, parties: ApprovalParties): ReasonCode | null;
|
|
312
|
+
/**
|
|
313
|
+
* Checks that an approval names the token the buyer's lock holds reserves in. Returns
|
|
314
|
+
* `approval.terms_mismatch` when it names another, or null.
|
|
315
|
+
*/
|
|
316
|
+
export declare function approvalTokenProblem(approval: Pick<Approval, 'token'>, token: Address): ReasonCode | null;
|
|
317
|
+
/** A mandate's two caps as Avow's approval carries them. */
|
|
318
|
+
export type ApprovalCaps = Pick<Approval, 'capPerCommitment' | 'capOpenReserves'>;
|
|
319
|
+
/**
|
|
320
|
+
* A mandate's two caps in a token's base units, as Avow's approval carries them and the lock
|
|
321
|
+
* enforces them. Throws when a cap can't be paid exactly in a token with these decimals.
|
|
322
|
+
*/
|
|
323
|
+
export declare function approvalCaps(mandate: Pick<Mandate, 'capPerCommitment' | 'capOpenReserves'>, decimals: number): ApprovalCaps;
|
|
324
|
+
/** What an approval has to say about the buyer's mandate. */
|
|
325
|
+
export interface ApprovalMandate {
|
|
326
|
+
/** The mandate's hash under the buyer's lock. */
|
|
327
|
+
mandateHash: Hex;
|
|
328
|
+
/** The mandate's caps in the token's base units, from `approvalCaps`. */
|
|
329
|
+
caps: ApprovalCaps;
|
|
330
|
+
/** The keys the caller lets the reserve come from. The zero address is the account's root key. */
|
|
331
|
+
fundingKeys: readonly Address[];
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Checks that an approval names the buyer's mandate, that mandate's two caps and a funding key the
|
|
335
|
+
* caller allows. The lock enforces the caps and checks the key that funds the reserve against the
|
|
336
|
+
* one the approval names, so other values would let through a reserve the mandate doesn't allow.
|
|
337
|
+
* Returns `approval.mandate_mismatch` when any of them differs, or null.
|
|
338
|
+
*/
|
|
339
|
+
export declare function approvalMandateProblem(approval: Pick<Approval, 'mandateHash' | 'capPerCommitment' | 'capOpenReserves' | 'fundingKey'>, expected: ApprovalMandate): ReasonCode | null;
|
|
340
|
+
export {};
|
|
341
|
+
//# sourceMappingURL=terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../src/terms.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,OAAO,EAGZ,KAAK,GAAG,EAQT,MAAM,MAAM,CAAA;AAEb,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,MAAM,EAEZ,MAAM,aAAa,CAAA;AAGpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,eAAe,EACf,qBAAqB,E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