@xyo-network/payment-payload-plugins 4.1.1 → 4.2.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 (32) hide show
  1. package/dist/neutral/Amount/Payload.d.ts +2 -2
  2. package/dist/neutral/Amount/Payload.d.ts.map +1 -1
  3. package/dist/neutral/Billing/Address/Address.d.ts +2 -2
  4. package/dist/neutral/Billing/Address/Address.d.ts.map +1 -1
  5. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +2 -2
  6. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -1
  7. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +2 -2
  8. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -1
  9. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +2 -2
  10. package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -1
  11. package/dist/neutral/Discount/Payload/Discount.d.ts +2 -2
  12. package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -1
  13. package/dist/neutral/Escrow/Outcome.d.ts +3 -3
  14. package/dist/neutral/Escrow/Outcome.d.ts.map +1 -1
  15. package/dist/neutral/Escrow/Terms/Terms.d.ts +2 -2
  16. package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -1
  17. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +2 -2
  18. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -1
  19. package/dist/neutral/Payment/Payload.d.ts +2 -2
  20. package/dist/neutral/Payment/Payload.d.ts.map +1 -1
  21. package/dist/neutral/Payment/Status/Payload.d.ts +2 -2
  22. package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -1
  23. package/dist/neutral/Purchase/Payload.d.ts +2 -2
  24. package/dist/neutral/Purchase/Payload.d.ts.map +1 -1
  25. package/dist/neutral/Receipt/Payload.d.ts +2 -2
  26. package/dist/neutral/Receipt/Payload.d.ts.map +1 -1
  27. package/dist/neutral/Subtotal/Diviner/Payload.d.ts +2 -2
  28. package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -1
  29. package/dist/neutral/Total/Diviner/Payload.d.ts +2 -2
  30. package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -1
  31. package/dist/neutral/index.d.ts +12 -850
  32. package/package.json +22 -23
@@ -1,850 +1,12 @@
1
- import * as _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package from '.store/@xylabs-promise-npm-4.13.23-cc6fbb2faf/package';
2
- import * as _xylabs_object from '@xylabs/object';
3
- import * as _xyo_network_payload_model from '@xyo-network/payload-model';
4
- import { PayloadWithSources, WithSources, Payload, PayloadValueExpression, AsyncPayloadValidationFunction, SyncPayloadValidationFunction } from '@xyo-network/payload-model';
5
- import { Address, Hash } from '@xylabs/hex';
6
- import { DivinerConfig, DivinerParams } from '@xyo-network/diviner-model';
7
- import { ModuleIdentifier, AnyConfigSchema } from '@xyo-network/module-model';
8
- import { SchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugin';
9
- import { DurationFields } from '@xyo-network/xns-record-payload-plugins';
10
- import { HashLeaseEstimate } from '@xyo-network/diviner-hash-lease';
11
- import * as _xyo_network_boundwitness_model from '@xyo-network/boundwitness-model';
12
- import { BoundWitness } from '@xyo-network/boundwitness-model';
13
- import { AccountInstance } from '@xyo-network/account-model';
14
- import { Id, IdPayload } from '@xyo-network/id-payload-plugin';
15
-
16
- /**
17
- * ISO 4217 currency codes
18
- */
19
- type Iso4217AlphabeticalCode = 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWG' | 'ZWL';
20
- /**
21
- * ISO 4217 numeric currency number codes
22
- */
23
- type Iso4217NumericCode = 784 | 971 | 8 | 51 | 532 | 973 | 32 | 36 | 533 | 944 | 977 | 52 | 50 | 975 | 48 | 108 | 60 | 96 | 68 | 984 | 986 | 44 | 64 | 72 | 933 | 84 | 124 | 976 | 947 | 756 | 948 | 990 | 152 | 156 | 170 | 970 | 188 | 192 | 132 | 203 | 262 | 208 | 214 | 12 | 818 | 232 | 230 | 978 | 242 | 238 | 826 | 981 | 936 | 292 | 270 | 324 | 320 | 328 | 344 | 340 | 332 | 348 | 360 | 376 | 356 | 368 | 364 | 352 | 388 | 400 | 392 | 404 | 417 | 116 | 174 | 408 | 410 | 414 | 136 | 398 | 418 | 422 | 144 | 430 | 426 | 434 | 504 | 498 | 969 | 807 | 104 | 496 | 446 | 929 | 480 | 462 | 454 | 484 | 979 | 458 | 943 | 516 | 566 | 558 | 578 | 524 | 554 | 512 | 590 | 604 | 598 | 608 | 586 | 985 | 600 | 634 | 946 | 941 | 643 | 646 | 682 | 90 | 690 | 938 | 752 | 702 | 654 | 925 | 706 | 968 | 728 | 930 | 222 | 760 | 748 | 764 | 972 | 934 | 788 | 776 | 949 | 780 | 901 | 834 | 980 | 800 | 840 | 997 | 940 | 858 | 927 | 860 | 926 | 928 | 704 | 548 | 882 | 950 | 961 | 959 | 955 | 956 | 957 | 958 | 951 | 960 | 952 | 964 | 953 | 962 | 994 | 963 | 965 | 999 | 886 | 710 | 967 | 924 | 932;
24
- /**
25
- * Dictionary of ISO 4217 alphabetical currency codes to numeric currency number codes
26
- */
27
- declare const Iso4217CurrencyCodes: Record<Iso4217AlphabeticalCode, Iso4217NumericCode>;
28
- declare const isIso4217CurrencyCode: (code: string) => code is Iso4217AlphabeticalCode;
29
-
30
- declare const AmountSchema: "network.xyo.payments.amount";
31
- type AmountSchema = typeof AmountSchema;
32
- interface AmountFields {
33
- amount: number;
34
- currency: Iso4217AlphabeticalCode;
35
- }
36
- /**
37
- * The result of a amount
38
- */
39
- type Amount = PayloadWithSources<AmountFields, AmountSchema>;
40
- /**
41
- * Identity function for determining if an object is an Amount
42
- */
43
- declare const isAmount: (x?: unknown | null) => x is Amount;
44
- declare const asAmount: _xylabs_object.AsTypeFunction<Amount>;
45
- declare const asOptionalAmount: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Amount | undefined;
46
- /**
47
- * Identity function for determining if an object is an Amount with sources
48
- */
49
- declare const isAmountWithSources: (x?: unknown | null) => x is WithSources<Amount>;
50
- declare const asAmountWithSources: _xylabs_object.AsTypeFunction<WithSources<Amount>>;
51
- declare const asOptionalAmountWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Amount> | undefined;
52
-
53
- declare const BillingAddressSchema = "network.xyo.payments.billing.address";
54
- type BillingAddressSchema = typeof BillingAddressSchema;
55
-
56
- /**
57
- * The fields describing a billing address.
58
- */
59
- interface BillingAddressFields {
60
- /** Street address line 1. */
61
- address?: string;
62
- /** Street address line 2. */
63
- address2?: string | null;
64
- /** City of the billing address. */
65
- city?: string;
66
- /** Country code of the billing address, ISO 3166-1 alpha-2 code. */
67
- country?: string;
68
- /** First name */
69
- firstName: string;
70
- /** Last name */
71
- lastName: string;
72
- /** Organization or company name associated with the billing address. */
73
- organization?: string | null;
74
- /** Postal or ZIP code of the billing address. */
75
- postalCode?: string;
76
- /** State or region of the billing address. */
77
- region?: string;
78
- }
79
- /**
80
- * A BillingAddress Payload
81
- */
82
- type BillingAddress = Payload<BillingAddressFields, BillingAddressSchema>;
83
- /**
84
- * Identity function for determine if an object is a BillingAddress
85
- */
86
- declare const isBillingAddress: (x?: unknown | null) => x is BillingAddress;
87
- declare const asBillingAddress: _xylabs_object.AsTypeFunction<BillingAddress>;
88
- declare const asOptionalBillingAddress: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => BillingAddress | undefined;
89
- /**
90
- * Identity function for determine if an object is a BillingAddress with sources
91
- */
92
- declare const isBillingAddressWithSources: (x?: unknown | null) => x is WithSources<BillingAddress>;
93
- declare const asBillingAddressWithSources: _xylabs_object.AsTypeFunction<WithSources<BillingAddress>>;
94
- declare const asOptionalBillingAddressWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<BillingAddress> | undefined;
95
-
96
- declare const BillingSchema = "network.xyo.payments.billing";
97
- type BillingSchema = typeof BillingSchema;
98
-
99
- type SupportedCurrency = 'USD';
100
-
101
- declare const PaymentDiscountDivinerConfigSchema = "network.xyo.diviner.payments.discount.config";
102
- type PaymentDiscountDivinerConfigSchema = typeof PaymentDiscountDivinerConfigSchema;
103
- /**
104
- * The configuration for the Payment Discount Diviner
105
- */
106
- type PaymentDiscountDivinerConfig = DivinerConfig<{
107
- /**
108
- * The boundwitness diviner used to query for payloads
109
- */
110
- boundWitnessDiviner?: ModuleIdentifier;
111
- /**
112
- * The list of coupon authorities that can be used to get a discount
113
- */
114
- couponAuthorities?: Address[];
115
- /**
116
- * The Diviner that can be used to determine the subtotal to apply discounts to
117
- */
118
- paymentSubtotalDiviner?: ModuleIdentifier;
119
- }, PaymentDiscountDivinerConfigSchema>;
120
-
121
- interface PaymentDiscountDivinerParams<TConfig extends AnyConfigSchema<PaymentDiscountDivinerConfig> = AnyConfigSchema<PaymentDiscountDivinerConfig>> extends DivinerParams<TConfig> {
122
- /**
123
- * The list of coupon authorities that can be used to get a discount
124
- */
125
- couponAuthorities?: Address[];
126
- }
127
-
128
- /**
129
- * The payloads that can be used as conditions for a coupon
130
- */
131
- type Condition = SchemaPayload;
132
- /**
133
- * Identity function for determining if an object is a Condition payload
134
- */
135
- declare const isCondition: (x?: unknown | null) => x is SchemaPayload;
136
- declare const asCondition: _xylabs_object.AsTypeFunction<SchemaPayload>;
137
- /**
138
- * Identity function for determining if an object is a Condition payload with sources
139
- */
140
- declare const isConditionWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<SchemaPayload>;
141
- declare const asConditionWithSources: _xylabs_object.AsTypeFunction<_xyo_network_payload_model.WithSources<SchemaPayload>>;
142
-
143
- /**
144
- * The fields that are common across all coupons
145
- */
146
- interface CouponFields extends DurationFields {
147
- /**
148
- * The conditions that must be met in order for this coupon to be applied
149
- */
150
- conditions?: Hash[];
151
- /**
152
- * Whether or not this discount can be stacked with other discounts
153
- */
154
- stackable?: boolean;
155
- }
156
-
157
- /**
158
- * Identity function for determining if coupon is stackable
159
- */
160
- declare const isStackable: (x?: unknown | null) => boolean | undefined;
161
-
162
- /**
163
- * Creates a coupon condition that requires an appraisal amount below a certain value
164
- * @param maximumAppraisalAmount The maximum appraisal amount
165
- * @returns A condition that requires an appraisal amount below a certain value
166
- */
167
- declare const createConditionForMaximumAppraisalAmount: (maximumAppraisalAmount: number) => Condition;
168
-
169
- /**
170
- * Returns a coupon condition that requires a minimum quantity of assets
171
- * @param minimumAssetQuantity The minimum quantity of assets required
172
- * @returns A condition that requires a minimum quantity of assets
173
- */
174
- declare const createConditionForMinimumAssetQuantity: (minimumAssetQuantity: number) => Condition;
175
-
176
- type BuyerCondition = Condition & {
177
- definition: {
178
- contains: {
179
- properties: {
180
- buyer: {
181
- items: {
182
- const: Address;
183
- type: 'string';
184
- };
185
- minItems: 1;
186
- type: 'array';
187
- };
188
- schema: {
189
- const: 'network.xyo.escrow.terms';
190
- type: 'string';
191
- };
192
- };
193
- required: ['schema', 'buyer'];
194
- type: 'object';
195
- };
196
- type: 'array';
197
- };
198
- schema: SchemaSchema;
199
- };
200
- /**
201
- * Creates a coupon condition that requires a specific buyer
202
- * @param buyer The buyer's address
203
- * @returns A coupon condition that requires a specific buyer
204
- */
205
- declare const createConditionForRequiredBuyer: (buyer: Address) => BuyerCondition;
206
-
207
- declare const FixedAmountCouponSchema: "network.xyo.payments.coupon.fixed.amount";
208
- type FixedAmountCouponSchema = typeof FixedAmountCouponSchema;
209
- interface FixedAmountCouponFields extends CouponFields, AmountFields {
210
- }
211
- /**
212
- * A coupon that provides a fixed discount amount
213
- */
214
- type FixedAmountCoupon = Payload<FixedAmountCouponFields, FixedAmountCouponSchema>;
215
- /**
216
- * Identity function for determining if an object is an FixedAmountCoupon
217
- */
218
- declare const isFixedAmountCoupon: (x?: unknown | null) => x is FixedAmountCoupon;
219
- declare const asFixedAmountCoupon: _xylabs_object.AsTypeFunction<FixedAmountCoupon>;
220
- declare const asOptionalFixedAmountCoupon: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => FixedAmountCoupon | undefined;
221
- /**
222
- * Identity function for determining if an object is an FixedAmountCoupon with sources
223
- */
224
- declare const isFixedAmountCouponWithSources: (x?: unknown | null) => x is WithSources<WithSources<FixedAmountCoupon>>;
225
- declare const asFixedAmountCouponWithSources: _xylabs_object.AsTypeFunction<WithSources<FixedAmountCoupon>>;
226
- declare const asOptionalFixedAmountCouponWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<FixedAmountCoupon> | undefined;
227
-
228
- declare const FixedPercentageCouponSchema: "network.xyo.payments.coupon.fixed.percentage";
229
- type FixedPercentageCouponSchema = typeof FixedPercentageCouponSchema;
230
- interface FixedPercentageCouponFields extends CouponFields {
231
- percentage: number;
232
- }
233
- /**
234
- * A coupon that provides a fixed discount amount
235
- */
236
- type FixedPercentageCoupon = Payload<FixedPercentageCouponFields, FixedPercentageCouponSchema>;
237
- /**
238
- * Identity function for determining if an object is an FixedPercentageCoupon
239
- */
240
- declare const isFixedPercentageCoupon: (x?: unknown | null) => x is FixedPercentageCoupon;
241
- declare const asFixedPercentageCoupon: _xylabs_object.AsTypeFunction<FixedPercentageCoupon>;
242
- declare const asOptionalFixedPercentageCoupon: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => FixedPercentageCoupon | undefined;
243
- /**
244
- * Identity function for determining if an object is an FixedPercentageCoupon with sources
245
- */
246
- declare const isFixedPercentageCouponWithSources: (x?: unknown | null) => x is WithSources<WithSources<FixedPercentageCoupon>>;
247
- declare const asFixedPercentageCouponWithSources: _xylabs_object.AsTypeFunction<WithSources<FixedPercentageCoupon>>;
248
- declare const asOptionalFixedPercentageCouponWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<FixedPercentageCoupon> | undefined;
249
-
250
- declare const FixedPriceCouponSchema: "network.xyo.payments.coupon.fixed.price";
251
- type FixedPriceCouponSchema = typeof FixedPriceCouponSchema;
252
- interface FixedPriceCouponFields extends CouponFields, AmountFields {
253
- }
254
- /**
255
- * A coupon that provides a fixed total price
256
- */
257
- type FixedPriceCoupon = Payload<FixedPriceCouponFields, FixedPriceCouponSchema>;
258
- /**
259
- * Identity function for determining if an object is an FixedPriceCoupon
260
- */
261
- declare const isFixedPriceCoupon: (x?: unknown | null) => x is FixedPriceCoupon;
262
- declare const asFixedPriceCoupon: _xylabs_object.AsTypeFunction<FixedPriceCoupon>;
263
- declare const asOptionalFixedPriceCoupon: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => FixedPriceCoupon | undefined;
264
- /**
265
- * Identity function for determining if an object is an FixedPriceCoupon with sources
266
- */
267
- declare const isFixedPriceCouponWithSources: (x?: unknown | null) => x is WithSources<WithSources<FixedPriceCoupon>>;
268
- declare const asFixedPriceCouponWithSources: _xylabs_object.AsTypeFunction<WithSources<FixedPriceCoupon>>;
269
- declare const asOptionalFixedPriceCouponWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<FixedPriceCoupon> | undefined;
270
-
271
- /**
272
- * The type of coupons
273
- */
274
- type Coupon = FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon;
275
- /**
276
- * Identity function for determining if an object is an Coupon
277
- */
278
- declare const isCoupon: (x?: unknown | null) => x is FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon;
279
- declare const asCoupon: _xylabs_object.AsTypeFunction<FixedAmountCoupon | FixedPercentageCoupon | FixedPriceCoupon>;
280
- /**
281
- * Identity function for determining if an object is an Coupon with sources
282
- */
283
- declare const isCouponWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<_xyo_network_payload_model.WithSources<FixedAmountCoupon>> | _xyo_network_payload_model.WithSources<_xyo_network_payload_model.WithSources<FixedPercentageCoupon>> | _xyo_network_payload_model.WithSources<_xyo_network_payload_model.WithSources<FixedPriceCoupon>>;
284
- declare const asCouponWithSources: _xylabs_object.AsTypeFunction<_xyo_network_payload_model.WithSources<_xyo_network_payload_model.WithSources<FixedAmountCoupon>> | _xyo_network_payload_model.WithSources<_xyo_network_payload_model.WithSources<FixedPercentageCoupon>> | _xyo_network_payload_model.WithSources<_xyo_network_payload_model.WithSources<FixedPriceCoupon>>>;
285
-
286
- declare const CouponSchema: "network.xyo.payments.coupon";
287
- type CouponSchema = typeof CouponSchema;
288
-
289
- declare const DiscountSchema: "network.xyo.payments.discount";
290
- type DiscountSchema = typeof DiscountSchema;
291
- interface DiscountFields extends AmountFields {
292
- }
293
- /**
294
- * The result of a discount
295
- */
296
- type Discount = Payload<DiscountFields, DiscountSchema>;
297
- /**
298
- * Identity function for determining if an object is an Discount
299
- */
300
- declare const isDiscount: (x?: unknown | null) => x is Discount;
301
- declare const asDiscount: _xylabs_object.AsTypeFunction<Discount>;
302
- declare const asOptionalDiscount: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Discount | undefined;
303
- /**
304
- * Identity function for determining if an object is an Discount with sources
305
- */
306
- declare const isDiscountWithSources: (x?: unknown | null) => x is WithSources<Discount>;
307
- declare const asDiscountWithSources: _xylabs_object.AsTypeFunction<WithSources<Discount>>;
308
- declare const asOptionalDiscountWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Discount> | undefined;
309
-
310
- declare const NO_DISCOUNT: Discount;
311
-
312
- declare const EscrowOutcomeSchema: "network.xyo.escrow.outcome";
313
- type EscrowOutcomeSchema = typeof EscrowOutcomeSchema;
314
- /**
315
- * The possible outcomes for an escrow
316
- */
317
- type EscrowOutcomes = 'fulfilled' | 'expired';
318
- interface EscrowOutcomeFields {
319
- outcome: EscrowOutcomes;
320
- terms: Hash;
321
- }
322
- /**
323
- * The terms of an escrow
324
- */
325
- type EscrowOutcome = PayloadWithSources<EscrowOutcomeFields, EscrowOutcomeSchema>;
326
- /**
327
- * Identity function for determining if an object is an EscrowOutcome
328
- */
329
- declare const isEscrowOutcome: (x?: unknown | null) => x is EscrowOutcome;
330
- declare const asEscrowOutcome: _xylabs_object.AsTypeFunction<EscrowOutcome>;
331
- declare const asOptionalEscrowOutcome: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => EscrowOutcome | undefined;
332
- /**
333
- * Identity function for determining if an object is an EscrowOutcome with sources
334
- */
335
- declare const isEscrowOutcomeWithSources: (x?: unknown | null) => x is WithSources<EscrowOutcome>;
336
- declare const asEscrowOutcomeWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<EscrowOutcome> | undefined;
337
- declare const asOptionalEscrowOutcomeWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<EscrowOutcome> | undefined;
338
-
339
- declare const EscrowSchema = "network.xyo.escrow";
340
- type EscrowSchema = typeof EscrowSchema;
341
-
342
- declare const EscrowTermsSchema: "network.xyo.escrow.terms";
343
- type EscrowTermsSchema = typeof EscrowTermsSchema;
344
- interface EscrowTermsFields {
345
- /**
346
- * The trusted estimators for the worth of the things being sold
347
- */
348
- appraisalAuthorities: Address[];
349
- /**
350
- * The estimated worths of the things being sold
351
- */
352
- appraisals: Hash[];
353
- /**
354
- * The things being sold
355
- */
356
- assets: Hash[];
357
- /**
358
- * The buyer
359
- */
360
- buyer: Address[];
361
- /**
362
- * The buyer
363
- */
364
- buyerSecret: Hash;
365
- /**
366
- * Any discounts (coupons, vouchers, credits, etc.) to be applied to the escrow
367
- */
368
- discounts: Hash[];
369
- /**
370
- * The escrow agent responsible for the escrow
371
- */
372
- escrowAgent: Address;
373
- /**
374
- * The time the escrow expires
375
- */
376
- exp: number;
377
- /**
378
- * The time the escrow starts
379
- */
380
- nbf: number;
381
- /**
382
- * The trusted payment authorities
383
- */
384
- paymentAuthorities: Address[];
385
- /**
386
- * The seller
387
- */
388
- seller: Address[];
389
- /**
390
- * The seller
391
- */
392
- sellerSecret: Hash;
393
- }
394
- /**
395
- * The terms of an escrow
396
- */
397
- type EscrowTerms = Payload<Partial<EscrowTermsFields>, EscrowTermsSchema>;
398
- /**
399
- * Identity function for determining if an object is an EscrowTerms
400
- */
401
- declare const isEscrowTerms: (x?: unknown | null) => x is EscrowTerms;
402
- declare const asEscrowTerms: _xylabs_object.AsTypeFunction<EscrowTerms>;
403
- declare const asOptionalEscrowTerms: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => EscrowTerms | undefined;
404
- /**
405
- * Identity function for determining if an object is an EscrowTerms with sources
406
- */
407
- declare const isEscrowTermsWithSources: (x?: unknown | null) => x is _xyo_network_payload_model.WithSources<EscrowTerms>;
408
- declare const asEscrowTermsWithSources: _xylabs_object.AsTypeFunction<EscrowTerms>;
409
- declare const asOptionalEscrowTermsWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => EscrowTerms | undefined;
410
-
411
- /**
412
- * The party in an escrow transaction
413
- */
414
- type EscrowParty = keyof Pick<EscrowTermsFields, 'buyer' | 'seller'>;
415
-
416
- /**
417
- * The party's secret in an escrow transaction
418
- */
419
- type EscrowPartySecret = keyof Pick<EscrowTermsFields, 'buyerSecret' | 'sellerSecret'>;
420
-
421
- /**
422
- * Returns a dictionary of asset hashes and their associated appraisals
423
- * @param terms The escrow terms
424
- * @param dictionary The dictionary of payloads associated with the escrow terms
425
- * @returns A dictionary of asset hashes and their associated appraisals
426
- */
427
- declare const getAppraisalsByAsset: (terms: EscrowTerms, dictionary: Record<Hash, Payload>) => Record<Hash, WithSources<HashLeaseEstimate>[]>;
428
-
429
- /**
430
- * Returns a dictionary of appraisals and their associated bound witnesses which are signed by
431
- * valid appraisal authorities from the escrow terms
432
- * @param terms The escrow terms
433
- * @param dictionary The diction of payloads associated with the escrow terms
434
- * @returns A dictionary of appraisals and their associated bound witnesses
435
- */
436
- declare const getSignaturesByAppraisal: (terms: EscrowTerms, dictionary: Record<Hash, Payload>) => Record<Hash, BoundWitness[]>;
437
-
438
- /**
439
- * Creates an escrow intent (for a buyer or seller) using the supplied secret
440
- * @param terms The payload describing the terms for the escrow
441
- * @param secret The secret for the escrow principal party to use for the escrow
442
- * @param account The account to create the escrow intent with
443
- * @returns The escrow intent
444
- */
445
- declare const createEscrowIntentWithSecret: (terms: EscrowTerms, secret: Id, account: AccountInstance) => Promise<[_xyo_network_boundwitness_model.Signed<_xyo_network_boundwitness_model.UnsignedBoundWitness>, _xyo_network_payload_model.Payload[], _xyo_network_payload_model.ModuleError[]]>;
446
-
447
- /**
448
- * Returns an array of BoundWitnesses containing the secret signed by all the parties
449
- * @param terms The escrow terms
450
- * @param dictionary A dictionary of all the payloads associated with the escrow
451
- * @param party The party to get the secret signatures for
452
- * @returns An array of BoundWitnesses containing the secret signed by all the parties
453
- */
454
- declare const findEscrowPartySecretSignatures: (terms: EscrowTerms, dictionary: Record<Hash, Payload>, party: EscrowParty) => BoundWitness[];
455
-
456
- /**
457
- * Returns a cryptographically random secret to use for escrow
458
- * @returns The escrow secret
459
- */
460
- declare const getEscrowSecret: () => IdPayload;
461
-
462
- /**
463
- * Creates an escrow intent (for a buyer or seller) using the supplied secret
464
- * @param terms The payload describing the terms for the escrow
465
- * @param escrowParty The party in the escrow transaction
466
- * @param account The account(s) to create the escrow intent with
467
- * @param secret The secret for the escrow principal party to use for the escrow. If
468
- * not provided, a cryptographically random secret will be generated.
469
- * @returns The escrow intent
470
- */
471
- declare const updateEscrowTermsWithSecret: (terms: EscrowTerms, escrowParty: EscrowParty, account: AccountInstance | AccountInstance[], secret?: IdPayload) => Promise<[_xyo_network_boundwitness_model.Signed<_xyo_network_boundwitness_model.UnsignedBoundWitness>, _xyo_network_payload_model.Payload[], _xyo_network_payload_model.ModuleError[]]>;
472
-
473
- /**
474
- * Checks if property value of the escrow terms contains one of the valid moduleIdentifiers
475
- * @param escrowTerms The escrow terms to validate
476
- * @param propertyExpression The selector to get the property containing the moduleIdentifier(s) from the escrow terms
477
- * @param moduleIdentifiers The list of allowed moduleIdentifiers
478
- * @param required Is the property required to be present
479
- * @returns True if the property value contains one of the valid moduleIdentifiers
480
- */
481
- declare const moduleIdentifiersContainsOneOf: (escrowTerms: EscrowTerms, propertyExpression: PayloadValueExpression<EscrowTerms, "appraisalAuthorities" | "buyer" | "escrowAgent" | "paymentAuthorities" | "seller">, moduleIdentifiers: ModuleIdentifier[], required?: boolean) => boolean;
482
- /**
483
- * Checks if property value of the escrow terms contains all of the valid moduleIdentifiers
484
- * @param escrowTerms The escrow terms to validate
485
- * @param selector The selector to get the property containing the moduleIdentifier(s) from the escrow terms
486
- * @param moduleIdentifiers The list of allowed moduleIdentifiers
487
- * @param required Is the property required to be present
488
- * @returns True if the property value contains all of the valid moduleIdentifiers
489
- */
490
- declare const moduleIdentifiersContainsAllOf: (escrowTerms: EscrowTerms, selector: PayloadValueExpression<EscrowTerms, "appraisalAuthorities" | "buyer" | "escrowAgent" | "paymentAuthorities" | "seller">, moduleIdentifiers: ModuleIdentifier[], required?: boolean) => boolean;
491
-
492
- /**
493
- * Returns a function that validates the escrow terms for the existence of the party secret signed by the party
494
- * @param dictionary Payload dictionary of the escrow terms
495
- * @returns A function that validates the escrow terms for the existence of the party secret signed by the party
496
- */
497
- declare const getPartySecretSignedValidator: (dictionary: Record<Hash, Payload>, party: EscrowParty) => AsyncPayloadValidationFunction<EscrowTerms>;
498
-
499
- type Windowed = {
500
- exp?: number;
501
- nbf?: number;
502
- };
503
- declare const validateWithinWindow: (value: Windowed, exp: number, nbf?: number) => boolean;
504
-
505
- declare const getEscrowAgentAllowedValidator: (allowedEscrowAgent: ModuleIdentifier) => SyncPayloadValidationFunction<EscrowTerms>;
506
-
507
- /**
508
- * A function that validates the escrow terms for tbe existence of appraisals
509
- * @returns True if the escrow terms contain appraisals, false otherwise
510
- */
511
- declare const appraisalsExistValidator: SyncPayloadValidationFunction<EscrowTerms>;
512
- /**
513
- * Returns a function that validates the escrow terms for appraisals which are from valid authorities
514
- * @param dictionary Payload dictionary of the escrow terms
515
- * @returns A function that validates the escrow terms for appraisals which are from valid authorities
516
- */
517
- declare const getAppraisalsFromValidAuthoritiesValidator: (dictionary: Record<Hash, Payload>) => SyncPayloadValidationFunction<EscrowTerms>;
518
- /**
519
- * Returns a function that validates the escrow terms for appraisals which are valid
520
- * @param dictionary Payload dictionary of the escrow terms
521
- * @param minimumExp The minium amount of time an estimate needs to be valid
522
- * for in the future (so as not to expire before the escrow is complete)
523
- * @returns A function that validates the escrow terms for appraisals which are valid
524
- */
525
- declare const getAppraisalsValidValidator: (dictionary: Record<Hash, Payload>, minimumExp: number) => SyncPayloadValidationFunction<EscrowTerms>;
526
- /**
527
- * Returns a function that validates the escrow terms to ensure that they contain an appraisal for each asset
528
- * @param dictionary Payload dictionary of the escrow terms
529
- * @returns A function that validates the escrow terms for appraisals
530
- */
531
- declare const getAppraisalsForAllAssetsValidator: (dictionary: Record<Hash, Payload>) => SyncPayloadValidationFunction<EscrowTerms>;
532
-
533
- /**
534
- * A function that validates the escrow terms for appraisalAuthorities
535
- * @returns True if the escrow terms contain appraisalAuthorities, false otherwise
536
- */
537
- declare const appraisalAuthoritiesExistValidator: SyncPayloadValidationFunction<EscrowTerms>;
538
- declare const getAppraisalAuthoritiesAllowedValidator: (allowed: ModuleIdentifier[]) => SyncPayloadValidationFunction<EscrowTerms>;
539
-
540
- /**
541
- * Returns a function that validates the escrow terms for assets
542
- * @returns A function that validates the escrow terms for assets
543
- */
544
- declare const assetsExistValidator: SyncPayloadValidationFunction<EscrowTerms>;
545
-
546
- /**
547
- * A function that validates the escrow terms for buyer
548
- * @returns True if the escrow terms contain buyer, false otherwise
549
- */
550
- declare const buyerExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
551
-
552
- /**
553
- * Returns a function that validates the escrow terms for buyerSecret
554
- * @returns A function that validates the escrow terms for buyerSecret
555
- */
556
- declare const buyerSecretExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
557
- /**
558
- * Returns a function that validates the escrow terms for the existence of the buyerSecret in the dictionary
559
- * @param dictionary Payload dictionary of the escrow terms
560
- * @returns A function that validates the escrow terms for the existence of the buyerSecret in the dictionary
561
- */
562
- declare const getBuyerSecretSuppliedValidator: (dictionary: Record<Hash, Payload>) => SyncPayloadValidationFunction<EscrowTerms>;
563
- /**
564
- * Returns a function that validates the escrow terms for the existence of the buyerSecret signed by the buyer
565
- * @param dictionary Payload dictionary of the escrow terms
566
- * @returns A function that validates the escrow terms for the existence of the buyerSecret signed by the buyer
567
- */
568
- declare const getBuyerSecretSignedValidator: (dictionary: Record<Hash, Payload>) => AsyncPayloadValidationFunction<EscrowTerms>;
569
-
570
- declare const getNbfExpValidator: (now: number, minRequiredDuration: number) => SyncPayloadValidationFunction<EscrowTerms>;
571
-
572
- declare const getPaymentAuthoritiesAllowedValidator: (allowed: ModuleIdentifier[]) => SyncPayloadValidationFunction<EscrowTerms>;
573
-
574
- /**
575
- * A function that validates the escrow terms for seller
576
- * @returns True if the escrow terms contain seller, false otherwise
577
- */
578
- declare const sellerExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
579
-
580
- /**
581
- * Returns a function that validates the escrow terms for sellerSecret
582
- * @returns A function that validates the escrow terms for sellerSecret
583
- */
584
- declare const sellerSecretExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
585
- /**
586
- * Returns a function that validates the escrow terms for the existence of the sellerSecret in the dictionary
587
- * @param dictionary Payload dictionary of the escrow terms
588
- * @returns A function that validates the escrow terms for the existence of the sellerSecret in the dictionary
589
- */
590
- declare const getSellerSecretSuppliedValidator: (dictionary: Record<Hash, Payload>) => SyncPayloadValidationFunction<EscrowTerms>;
591
- /**
592
- * Returns a function that validates the escrow terms for the existence of the sellerSecret signed by the seller
593
- * @param dictionary Payload dictionary of the escrow terms
594
- * @returns A function that validates the escrow terms for the existence of the sellerSecret signed by the seller
595
- */
596
- declare const getSellerSecretSignedValidator: (dictionary: Record<Hash, Payload>) => AsyncPayloadValidationFunction<EscrowTerms>;
597
-
598
- declare const PaymentCardSchema = "network.xyo.payments.payment.instrument.card";
599
- type PaymentCardSchema = typeof PaymentCardSchema;
600
-
601
- /**
602
- * The fields describing a payment card.
603
- */
604
- interface PaymentCardFields {
605
- /**
606
- * Card Number (PAN) of the payment card. This value is required to perform a payment.
607
- */
608
- cardNumber: string;
609
- /**
610
- * The name as it appears on the payment card.
611
- */
612
- cardholderName?: string;
613
- /**
614
- * Card Verification Value (CVV/CVC) of the payment card.
615
- */
616
- cvv: string;
617
- /**
618
- * Expiration month of the payment card.
619
- */
620
- expMonth: number;
621
- /**
622
- * Expiration year of the payment card.
623
- */
624
- expYear: number;
625
- }
626
- /**
627
- * A PaymentCard Payload
628
- */
629
- type PaymentCard = Payload<PaymentCardFields, PaymentCardSchema>;
630
- /**
631
- * Identity function for determine if an object is a PaymentCard
632
- */
633
- declare const isPaymentCard: (x?: unknown | null) => x is PaymentCard;
634
- declare const asPaymentCard: _xylabs_object.AsTypeFunction<PaymentCard>;
635
- declare const asOptionalPaymentCard: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => PaymentCard | undefined;
636
- /**
637
- * Identity function for determine if an object is a PaymentCard with sources
638
- */
639
- declare const isPaymentCardWithSources: (x?: unknown | null) => x is WithSources<PaymentCard>;
640
- declare const asPaymentCardWithSources: _xylabs_object.AsTypeFunction<WithSources<PaymentCard>>;
641
- declare const asOptionalPaymentCardWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<PaymentCard> | undefined;
642
-
643
- declare const PaymentInstrumentSchema = "network.xyo.payments.payment.instrument";
644
- type PaymentInstrumentSchema = typeof PaymentInstrumentSchema;
645
-
646
- declare const PaymentSchema = "network.xyo.payments.payment";
647
- type PaymentSchema = typeof PaymentSchema;
648
-
649
- interface PaymentFields {
650
- /**
651
- * The amount paid
652
- */
653
- amount: number;
654
- /**
655
- * The currency of the amount paid
656
- */
657
- currency: SupportedCurrency;
658
- }
659
- /**
660
- * A payment is a record of an amount to be paid
661
- */
662
- type Payment = PayloadWithSources<PaymentFields, PaymentSchema>;
663
- /**
664
- * Identity function for determine if an object is a Payment
665
- */
666
- declare const isPayment: (x?: unknown | null) => x is Payment;
667
- declare const asPayment: _xylabs_object.AsTypeFunction<Payment>;
668
- declare const asOptionalPayment: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Payment | undefined;
669
- /**
670
- * Identity function for determine if an object is a Payment with sources
671
- */
672
- declare const isPaymentWithSources: (x?: unknown | null) => x is WithSources<Payment>;
673
- declare const asPaymentWithSources: _xylabs_object.AsTypeFunction<WithSources<Payment>>;
674
- declare const asOptionalPaymentWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Payment> | undefined;
675
-
676
- declare const PaymentStatusSchema = "network.xyo.payments.payment.status";
677
- type PaymentStatusSchema = typeof PaymentStatusSchema;
678
-
679
- interface PaymentStatusFields {
680
- /**
681
- * The result of the payment (i.e. declined)
682
- */
683
- result?: string;
684
- /**
685
- * The status of the payment (i.e. completed)
686
- */
687
- status: string;
688
- }
689
- /**
690
- * A payment status is the outcome of a payment attempt
691
- */
692
- type PaymentStatus = PayloadWithSources<PaymentStatusFields, PaymentStatusSchema>;
693
- /**
694
- * Identity function for determine if an object is a PaymentStatus
695
- */
696
- declare const isPaymentStatus: (x?: unknown | null) => x is PaymentStatus;
697
- declare const asPaymentStatus: _xylabs_object.AsTypeFunction<PaymentStatus>;
698
- declare const asOptionalPaymentStatus: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => PaymentStatus | undefined;
699
- /**
700
- * Identity function for determine if an object is a PaymentStatus with sources
701
- */
702
- declare const isPaymentStatusWithSources: (x?: unknown | null) => x is WithSources<PaymentStatus>;
703
- declare const asPaymentStatusWithSources: _xylabs_object.AsTypeFunction<WithSources<PaymentStatus>>;
704
- declare const asOptionalPaymentStatusWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<PaymentStatus> | undefined;
705
-
706
- declare const PaymentSubtotalDivinerConfigSchema = "network.xyo.diviner.payments.subtotal.config";
707
- type PaymentSubtotalDivinerConfigSchema = typeof PaymentSubtotalDivinerConfigSchema;
708
- /**
709
- * The configuration for the Coupon Subtotal Diviner
710
- */
711
- type PaymentSubtotalDivinerConfig = DivinerConfig<{}, PaymentSubtotalDivinerConfigSchema>;
712
-
713
- type PaymentSubtotalDivinerParams<TConfig extends AnyConfigSchema<PaymentSubtotalDivinerConfig> = AnyConfigSchema<PaymentSubtotalDivinerConfig>> = DivinerParams<TConfig>;
714
-
715
- declare const SubtotalSchema: "network.xyo.payments.subtotal";
716
- type SubtotalSchema = typeof SubtotalSchema;
717
- interface SubtotalFields extends AmountFields {
718
- }
719
- /**
720
- * The result of a subtotal
721
- */
722
- type Subtotal = PayloadWithSources<SubtotalFields, SubtotalSchema>;
723
- /**
724
- * Identity function for determining if an object is an Subtotal
725
- */
726
- declare const isSubtotal: (x?: unknown | null) => x is Subtotal;
727
- declare const asSubtotal: _xylabs_object.AsTypeFunction<Subtotal>;
728
- declare const asOptionalSubtotal: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Subtotal | undefined;
729
- /**
730
- * Identity function for determining if an object is an Subtotal with sources
731
- */
732
- declare const isSubtotalWithSources: (x?: unknown | null) => x is WithSources<Subtotal>;
733
- declare const asSubtotalWithSources: _xylabs_object.AsTypeFunction<WithSources<Subtotal>>;
734
- declare const asOptionalSubtotalWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Subtotal> | undefined;
735
-
736
- declare const PaymentTotalDivinerConfigSchema = "network.xyo.diviner.payments.total.config";
737
- type PaymentTotalDivinerConfigSchema = typeof PaymentTotalDivinerConfigSchema;
738
- /**
739
- * The configuration for the Total Diviner
740
- */
741
- type PaymentTotalDivinerConfig = DivinerConfig<{
742
- /**
743
- * The Diviner that will be used to determine the discount
744
- */
745
- paymentDiscountDiviner?: ModuleIdentifier;
746
- /**
747
- * The Diviner that will be used to determine the subtotal
748
- */
749
- paymentSubtotalDiviner?: ModuleIdentifier;
750
- }, PaymentTotalDivinerConfigSchema>;
751
-
752
- type PaymentTotalDivinerParams<TConfig extends AnyConfigSchema<PaymentTotalDivinerConfig> = AnyConfigSchema<PaymentTotalDivinerConfig>> = DivinerParams<TConfig>;
753
-
754
- declare const TotalSchema: "network.xyo.payments.total";
755
- type TotalSchema = typeof TotalSchema;
756
- interface TotalFields extends AmountFields {
757
- }
758
- /**
759
- * The result of a total
760
- */
761
- type Total = PayloadWithSources<TotalFields, TotalSchema>;
762
- /**
763
- * Identity function for determining if an object is an Total
764
- */
765
- declare const isTotal: (x?: unknown | null) => x is Total;
766
- declare const asTotal: _xylabs_object.AsTypeFunction<Total>;
767
- declare const asOptionalTotal: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Total | undefined;
768
- /**
769
- * Identity function for determining if an object is an Total with sources
770
- */
771
- declare const isTotalWithSources: (x?: unknown | null) => x is WithSources<Total>;
772
- declare const asTotalWithSources: _xylabs_object.AsTypeFunction<WithSources<Total>>;
773
- declare const asOptionalTotalWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Total> | undefined;
774
-
775
- /**
776
- * A tuple containing the subtotal, total, and payment for an invoice.
777
- */
778
- type StandardInvoice = [Subtotal, Total, Payment];
779
- /**
780
- * A tuple containing the subtotal, total, payment, and discount for an invoice.
781
- */
782
- type DiscountedInvoice = [...StandardInvoice, Discount];
783
- /**
784
- * An invoice.
785
- */
786
- type Invoice = StandardInvoice | DiscountedInvoice;
787
-
788
- declare const PurchaseSchema = "network.xyo.payments.purchase";
789
- type PurchaseSchema = typeof PurchaseSchema;
790
-
791
- interface PurchaseFields {
792
- /**
793
- * The things that were purchased
794
- */
795
- assets: Hash[];
796
- /**
797
- * The receipts for payments for this purchase. Array to allow for multiple payments
798
- * for a single quote.
799
- */
800
- receipts: Hash[];
801
- }
802
- /**
803
- * A purchase ties a payment made to a quote
804
- */
805
- type Purchase = PayloadWithSources<PurchaseFields, PurchaseSchema>;
806
- /**
807
- * Identity function for determine if an object is a Purchase
808
- */
809
- declare const isPurchase: (x?: unknown | null) => x is Purchase;
810
- declare const asPurchase: _xylabs_object.AsTypeFunction<Purchase>;
811
- declare const asOptionalPurchase: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Purchase | undefined;
812
- /**
813
- * Identity function for determine if an object is a Purchase with sources
814
- */
815
- declare const isPurchaseWithSources: (x?: unknown | null) => x is WithSources<Purchase>;
816
- declare const asPurchaseWithSources: _xylabs_object.AsTypeFunction<WithSources<Purchase>>;
817
- declare const asOptionalPurchaseWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Purchase> | undefined;
818
-
819
- declare const ReceiptSchema = "network.xyo.payments.receipt";
820
- type ReceiptSchema = typeof ReceiptSchema;
821
-
822
- interface ReceiptFields {
823
- /**
824
- * The amount paid
825
- */
826
- amount: number;
827
- /**
828
- * The currency of the amount paid
829
- */
830
- currency: SupportedCurrency;
831
- }
832
- /**
833
- * A receipt is a record of a payment made
834
- */
835
- type Receipt = PayloadWithSources<ReceiptFields, ReceiptSchema>;
836
- /**
837
- * Identity function for determine if an object is a Receipt
838
- */
839
- declare const isReceipt: (x?: unknown | null) => x is Receipt;
840
- declare const asReceipt: _xylabs_object.AsTypeFunction<Receipt>;
841
- declare const asOptionalReceipt: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => Receipt | undefined;
842
- /**
843
- * Identity function for determine if an object is a Receipt with sources
844
- */
845
- declare const isReceiptWithSources: (x?: unknown | null) => x is WithSources<Receipt>;
846
- declare const asReceiptWithSources: _xylabs_object.AsTypeFunction<WithSources<Receipt>>;
847
- declare const asOptionalReceiptWithSources: (value: _store__xylabs_promise_npm_4_13_23_cc6fbb2faf_package.AnyNonPromise) => WithSources<Receipt> | undefined;
848
-
849
- export { AmountSchema, BillingAddressSchema, BillingSchema, CouponSchema, DiscountSchema, EscrowOutcomeSchema, EscrowSchema, EscrowTermsSchema, FixedAmountCouponSchema, FixedPercentageCouponSchema, FixedPriceCouponSchema, Iso4217CurrencyCodes, NO_DISCOUNT, PaymentCardSchema, PaymentDiscountDivinerConfigSchema, PaymentInstrumentSchema, PaymentSchema, PaymentStatusSchema, PaymentSubtotalDivinerConfigSchema, PaymentTotalDivinerConfigSchema, PurchaseSchema, ReceiptSchema, SubtotalSchema, TotalSchema, appraisalAuthoritiesExistValidator, appraisalsExistValidator, asAmount, asAmountWithSources, asBillingAddress, asBillingAddressWithSources, asCondition, asConditionWithSources, asCoupon, asCouponWithSources, asDiscount, asDiscountWithSources, asEscrowOutcome, asEscrowOutcomeWithSources, asEscrowTerms, asEscrowTermsWithSources, asFixedAmountCoupon, asFixedAmountCouponWithSources, asFixedPercentageCoupon, asFixedPercentageCouponWithSources, asFixedPriceCoupon, asFixedPriceCouponWithSources, asOptionalAmount, asOptionalAmountWithSources, asOptionalBillingAddress, asOptionalBillingAddressWithSources, asOptionalDiscount, asOptionalDiscountWithSources, asOptionalEscrowOutcome, asOptionalEscrowOutcomeWithSources, asOptionalEscrowTerms, asOptionalEscrowTermsWithSources, asOptionalFixedAmountCoupon, asOptionalFixedAmountCouponWithSources, asOptionalFixedPercentageCoupon, asOptionalFixedPercentageCouponWithSources, asOptionalFixedPriceCoupon, asOptionalFixedPriceCouponWithSources, asOptionalPayment, asOptionalPaymentCard, asOptionalPaymentCardWithSources, asOptionalPaymentStatus, asOptionalPaymentStatusWithSources, asOptionalPaymentWithSources, asOptionalPurchase, asOptionalPurchaseWithSources, asOptionalReceipt, asOptionalReceiptWithSources, asOptionalSubtotal, asOptionalSubtotalWithSources, asOptionalTotal, asOptionalTotalWithSources, asPayment, asPaymentCard, asPaymentCardWithSources, asPaymentStatus, asPaymentStatusWithSources, asPaymentWithSources, asPurchase, asPurchaseWithSources, asReceipt, asReceiptWithSources, asSubtotal, asSubtotalWithSources, asTotal, asTotalWithSources, assetsExistValidator, buyerExistsValidator, buyerSecretExistsValidator, createConditionForMaximumAppraisalAmount, createConditionForMinimumAssetQuantity, createConditionForRequiredBuyer, createEscrowIntentWithSecret, findEscrowPartySecretSignatures, getAppraisalAuthoritiesAllowedValidator, getAppraisalsByAsset, getAppraisalsForAllAssetsValidator, getAppraisalsFromValidAuthoritiesValidator, getAppraisalsValidValidator, getBuyerSecretSignedValidator, getBuyerSecretSuppliedValidator, getEscrowAgentAllowedValidator, getEscrowSecret, getNbfExpValidator, getPartySecretSignedValidator, getPaymentAuthoritiesAllowedValidator, getSellerSecretSignedValidator, getSellerSecretSuppliedValidator, getSignaturesByAppraisal, isAmount, isAmountWithSources, isBillingAddress, isBillingAddressWithSources, isCondition, isConditionWithSources, isCoupon, isCouponWithSources, isDiscount, isDiscountWithSources, isEscrowOutcome, isEscrowOutcomeWithSources, isEscrowTerms, isEscrowTermsWithSources, isFixedAmountCoupon, isFixedAmountCouponWithSources, isFixedPercentageCoupon, isFixedPercentageCouponWithSources, isFixedPriceCoupon, isFixedPriceCouponWithSources, isIso4217CurrencyCode, isPayment, isPaymentCard, isPaymentCardWithSources, isPaymentStatus, isPaymentStatusWithSources, isPaymentWithSources, isPurchase, isPurchaseWithSources, isReceipt, isReceiptWithSources, isStackable, isSubtotal, isSubtotalWithSources, isTotal, isTotalWithSources, moduleIdentifiersContainsAllOf, moduleIdentifiersContainsOneOf, sellerExistsValidator, sellerSecretExistsValidator, updateEscrowTermsWithSecret, validateWithinWindow };
850
- export type { Amount, AmountFields, BillingAddress, BillingAddressFields, BuyerCondition, Condition, Coupon, CouponFields, Discount, DiscountFields, DiscountedInvoice, EscrowOutcome, EscrowOutcomeFields, EscrowOutcomes, EscrowParty, EscrowPartySecret, EscrowTerms, EscrowTermsFields, FixedAmountCoupon, FixedAmountCouponFields, FixedPercentageCoupon, FixedPercentageCouponFields, FixedPriceCoupon, FixedPriceCouponFields, Invoice, Iso4217AlphabeticalCode, Iso4217NumericCode, Payment, PaymentCard, PaymentCardFields, PaymentDiscountDivinerConfig, PaymentDiscountDivinerParams, PaymentFields, PaymentStatus, PaymentStatusFields, PaymentSubtotalDivinerConfig, PaymentSubtotalDivinerParams, PaymentTotalDivinerConfig, PaymentTotalDivinerParams, Purchase, PurchaseFields, Receipt, ReceiptFields, StandardInvoice, Subtotal, SubtotalFields, SupportedCurrency, Total, TotalFields, Windowed };
1
+ export * from './Amount/index.ts';
2
+ export * from './Billing/index.ts';
3
+ export * from './Currency.ts';
4
+ export * from './Discount/index.ts';
5
+ export * from './Escrow/index.ts';
6
+ export * from './Invoice/index.ts';
7
+ export * from './Payment/index.ts';
8
+ export * from './Purchase/index.ts';
9
+ export * from './Receipt/index.ts';
10
+ export * from './Subtotal/index.ts';
11
+ export * from './Total/index.ts';
12
+ //# sourceMappingURL=index.d.ts.map