@xyo-network/payment-payload-plugins 3.1.2 → 3.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/Amount/Payload.d.ts +0 -4
- package/dist/neutral/Amount/Payload.d.ts.map +1 -1
- package/dist/neutral/Billing/Address/Address.d.ts +46 -10
- package/dist/neutral/Billing/Address/Address.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +44 -8
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +40 -8
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +44 -8
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +101 -5
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +68 -9
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Discount.d.ts +7 -7
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -1
- package/dist/neutral/Escrow/Outcome.d.ts +0 -4
- package/dist/neutral/Escrow/Outcome.d.ts.map +1 -1
- package/dist/neutral/Escrow/Terms/Terms.d.ts +28 -10
- package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts +2 -2
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts +2 -2
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +32 -11
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts +3 -3
- package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +32 -11
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts +2 -2
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +4 -4
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +3 -3
- package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -1
- package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +3 -3
- package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -1
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +22 -10
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Payload.d.ts +0 -4
- package/dist/neutral/Payment/Payload.d.ts.map +1 -1
- package/dist/neutral/Payment/Status/Payload.d.ts +0 -4
- package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -1
- package/dist/neutral/Purchase/Payload.d.ts +0 -4
- package/dist/neutral/Purchase/Payload.d.ts.map +1 -1
- package/dist/neutral/Receipt/Payload.d.ts +0 -4
- package/dist/neutral/Receipt/Payload.d.ts.map +1 -1
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts +0 -4
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -1
- package/dist/neutral/Total/Diviner/Payload.d.ts +0 -4
- package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -1
- package/dist/neutral/index.mjs +39 -76
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +25 -23
- package/src/Amount/Payload.ts +0 -6
- package/src/Billing/Address/Address.ts +1 -8
- package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +6 -9
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +6 -9
- package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +6 -9
- package/src/Discount/Payload/Coupon/Payload.ts +5 -11
- package/src/Discount/Payload/Coupon/types/Condition.ts +6 -10
- package/src/Discount/Payload/Discount.ts +2 -8
- package/src/Escrow/Outcome.ts +0 -6
- package/src/Escrow/Terms/Terms.ts +1 -8
- package/src/Escrow/util/appraisal/getAppraisalsByAsset.ts +5 -7
- package/src/Escrow/util/appraisal/getSignaturesByAppraisal.ts +7 -7
- package/src/Escrow/util/secret/createEscrowIntent.ts +1 -1
- package/src/Escrow/util/secret/findEscrowPartySecretSignatures.ts +4 -5
- package/src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts +2 -4
- package/src/Escrow/validators/escrow/appraisal.ts +8 -9
- package/src/Escrow/validators/escrow/buyerSecret.ts +3 -3
- package/src/Escrow/validators/escrow/sellerSecret.ts +3 -3
- package/src/Payment/Instrument/Card/Payload.ts +1 -8
- package/src/Payment/Payload.ts +0 -6
- package/src/Payment/Status/Payload.ts +0 -6
- package/src/Purchase/Payload.ts +0 -6
- package/src/Receipt/Payload.ts +0 -6
- package/src/Subtotal/Diviner/Payload.ts +0 -6
- package/src/Total/Diviner/Payload.ts +0 -6
package/dist/neutral/index.mjs
CHANGED
|
@@ -185,20 +185,14 @@ var isIso4217CurrencyCode = (code) => Iso4217CurrencyCodes[code] ? true : false;
|
|
|
185
185
|
// src/Amount/Payload.ts
|
|
186
186
|
import {
|
|
187
187
|
isPayloadOfSchemaType,
|
|
188
|
-
isPayloadOfSchemaTypeWithMeta,
|
|
189
188
|
isPayloadOfSchemaTypeWithSources
|
|
190
189
|
} from "@xyo-network/payload-model";
|
|
191
190
|
var AmountSchema = "network.xyo.payments.amount";
|
|
192
191
|
var isAmount = isPayloadOfSchemaType(AmountSchema);
|
|
193
192
|
var isAmountWithSources = isPayloadOfSchemaTypeWithSources(AmountSchema);
|
|
194
|
-
var isAmountWithMeta = isPayloadOfSchemaTypeWithMeta(AmountSchema);
|
|
195
193
|
|
|
196
194
|
// src/Billing/Address/Address.ts
|
|
197
|
-
import {
|
|
198
|
-
isPayloadOfSchemaType as isPayloadOfSchemaType2,
|
|
199
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta2,
|
|
200
|
-
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2
|
|
201
|
-
} from "@xyo-network/payload-model";
|
|
195
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType2, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources2 } from "@xyo-network/payload-model";
|
|
202
196
|
|
|
203
197
|
// src/Schema.ts
|
|
204
198
|
var PaymentsSchema = "network.xyo.payments";
|
|
@@ -212,7 +206,6 @@ var BillingAddressSchema = `${BillingSchema}.address`;
|
|
|
212
206
|
// src/Billing/Address/Address.ts
|
|
213
207
|
var isBillingAddress = isPayloadOfSchemaType2(BillingAddressSchema);
|
|
214
208
|
var isBillingAddressWithSources = isPayloadOfSchemaTypeWithSources2(BillingAddressSchema);
|
|
215
|
-
var isBillingAddressWithMeta = isPayloadOfSchemaTypeWithMeta2(BillingAddressSchema);
|
|
216
209
|
|
|
217
210
|
// src/Discount/Config.ts
|
|
218
211
|
var PaymentDiscountDivinerConfigSchema = "network.xyo.diviner.payments.discount.config";
|
|
@@ -296,9 +289,9 @@ var createConditionForRequiredBuyer = (buyer) => {
|
|
|
296
289
|
};
|
|
297
290
|
|
|
298
291
|
// src/Discount/Payload/Coupon/Coupons/FixedAmount.ts
|
|
292
|
+
import { AsObjectFactory } from "@xylabs/object";
|
|
299
293
|
import {
|
|
300
294
|
isPayloadOfSchemaType as isPayloadOfSchemaType3,
|
|
301
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta3,
|
|
302
295
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources3
|
|
303
296
|
} from "@xyo-network/payload-model";
|
|
304
297
|
|
|
@@ -308,46 +301,49 @@ var CouponSchema = "network.xyo.payments.coupon";
|
|
|
308
301
|
// src/Discount/Payload/Coupon/Coupons/FixedAmount.ts
|
|
309
302
|
var FixedAmountCouponSchema = `${CouponSchema}.fixed.amount`;
|
|
310
303
|
var isFixedAmountCoupon = isPayloadOfSchemaType3(FixedAmountCouponSchema);
|
|
304
|
+
var asFixedAmountCoupon = AsObjectFactory.create(isFixedAmountCoupon);
|
|
311
305
|
var isFixedAmountCouponWithSources = isPayloadOfSchemaTypeWithSources3(FixedAmountCouponSchema);
|
|
312
|
-
var
|
|
306
|
+
var asFixedAmountCouponWithSources = AsObjectFactory.create(isFixedAmountCouponWithSources);
|
|
313
307
|
|
|
314
308
|
// src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts
|
|
309
|
+
import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/object";
|
|
315
310
|
import {
|
|
316
311
|
isPayloadOfSchemaType as isPayloadOfSchemaType4,
|
|
317
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta4,
|
|
318
312
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources4
|
|
319
313
|
} from "@xyo-network/payload-model";
|
|
320
314
|
var FixedPercentageCouponSchema = `${CouponSchema}.fixed.percentage`;
|
|
321
315
|
var isFixedPercentageCoupon = isPayloadOfSchemaType4(FixedPercentageCouponSchema);
|
|
316
|
+
var asFixedPercentageCoupon = AsObjectFactory2.create(isFixedPercentageCoupon);
|
|
322
317
|
var isFixedPercentageCouponWithSources = isPayloadOfSchemaTypeWithSources4(FixedPercentageCouponSchema);
|
|
323
|
-
var
|
|
318
|
+
var asFixedPercentageCouponWithSources = AsObjectFactory2.create(isFixedPercentageCouponWithSources);
|
|
324
319
|
|
|
325
320
|
// src/Discount/Payload/Coupon/Coupons/FixedPrice.ts
|
|
321
|
+
import { AsObjectFactory as AsObjectFactory3 } from "@xylabs/object";
|
|
326
322
|
import {
|
|
327
323
|
isPayloadOfSchemaType as isPayloadOfSchemaType5,
|
|
328
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta5,
|
|
329
324
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources5
|
|
330
325
|
} from "@xyo-network/payload-model";
|
|
331
326
|
var FixedPriceCouponSchema = `${CouponSchema}.fixed.price`;
|
|
332
327
|
var isFixedPriceCoupon = isPayloadOfSchemaType5(FixedPriceCouponSchema);
|
|
328
|
+
var asFixedPriceCoupon = AsObjectFactory3.create(isFixedPriceCoupon);
|
|
333
329
|
var isFixedPriceCouponWithSources = isPayloadOfSchemaTypeWithSources5(FixedPriceCouponSchema);
|
|
334
|
-
var
|
|
330
|
+
var asFixedPriceCouponWithSources = AsObjectFactory3.create(isFixedPriceCouponWithSources);
|
|
335
331
|
|
|
336
332
|
// src/Discount/Payload/Coupon/Payload.ts
|
|
333
|
+
import { AsObjectFactory as AsObjectFactory4 } from "@xylabs/object";
|
|
337
334
|
var isCoupon = (x) => isFixedAmountCoupon(x) || isFixedPercentageCoupon(x) || isFixedPriceCoupon(x);
|
|
335
|
+
var asCoupon = AsObjectFactory4.create(isCoupon);
|
|
338
336
|
var isCouponWithSources = (x) => isFixedAmountCouponWithSources(x) || isFixedPercentageCouponWithSources(x) || isFixedPriceCouponWithSources(x);
|
|
339
|
-
var
|
|
337
|
+
var asCouponWithSources = AsObjectFactory4.create(isCouponWithSources);
|
|
340
338
|
|
|
341
339
|
// src/Discount/Payload/Coupon/types/Condition.ts
|
|
342
|
-
import {
|
|
343
|
-
|
|
344
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta6,
|
|
345
|
-
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6
|
|
346
|
-
} from "@xyo-network/payload-model";
|
|
340
|
+
import { AsObjectFactory as AsObjectFactory5 } from "@xylabs/object";
|
|
341
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType6, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6 } from "@xyo-network/payload-model";
|
|
347
342
|
import { SchemaSchema as SchemaSchema4 } from "@xyo-network/schema-payload-plugin";
|
|
348
343
|
var isCondition = isPayloadOfSchemaType6(SchemaSchema4);
|
|
344
|
+
var asCondition = AsObjectFactory5.create(isCondition);
|
|
349
345
|
var isConditionWithSources = isPayloadOfSchemaTypeWithSources6(SchemaSchema4);
|
|
350
|
-
var
|
|
346
|
+
var asConditionWithSources = AsObjectFactory5.create(isConditionWithSources);
|
|
351
347
|
|
|
352
348
|
// src/Discount/Payload/Coupon/types/isStackable.ts
|
|
353
349
|
var isStackable = (x) => (x ?? { stackable: false })?.stackable;
|
|
@@ -355,13 +351,11 @@ var isStackable = (x) => (x ?? { stackable: false })?.stackable;
|
|
|
355
351
|
// src/Discount/Payload/Discount.ts
|
|
356
352
|
import {
|
|
357
353
|
isPayloadOfSchemaType as isPayloadOfSchemaType7,
|
|
358
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta7,
|
|
359
354
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources7
|
|
360
355
|
} from "@xyo-network/payload-model";
|
|
361
356
|
var DiscountSchema = "network.xyo.payments.discount";
|
|
362
357
|
var isDiscount = isPayloadOfSchemaType7(DiscountSchema);
|
|
363
358
|
var isDiscountWithSources = isPayloadOfSchemaTypeWithSources7(DiscountSchema);
|
|
364
|
-
var isDiscountWithMeta = isPayloadOfSchemaTypeWithMeta7(DiscountSchema);
|
|
365
359
|
|
|
366
360
|
// src/Discount/Payload/NoDiscount.ts
|
|
367
361
|
var NO_DISCOUNT = {
|
|
@@ -373,7 +367,6 @@ var NO_DISCOUNT = {
|
|
|
373
367
|
// src/Escrow/Outcome.ts
|
|
374
368
|
import {
|
|
375
369
|
isPayloadOfSchemaType as isPayloadOfSchemaType8,
|
|
376
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta8,
|
|
377
370
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources8
|
|
378
371
|
} from "@xyo-network/payload-model";
|
|
379
372
|
|
|
@@ -384,18 +377,12 @@ var EscrowSchema = "network.xyo.escrow";
|
|
|
384
377
|
var EscrowOutcomeSchema = `${EscrowSchema}.outcome`;
|
|
385
378
|
var isEscrowOutcome = isPayloadOfSchemaType8(EscrowOutcomeSchema);
|
|
386
379
|
var isEscrowOutcomeWithSources = isPayloadOfSchemaTypeWithSources8(EscrowOutcomeSchema);
|
|
387
|
-
var isEscrowOutcomeWithMeta = isPayloadOfSchemaTypeWithMeta8(EscrowOutcomeSchema);
|
|
388
380
|
|
|
389
381
|
// src/Escrow/Terms/Terms.ts
|
|
390
|
-
import {
|
|
391
|
-
isPayloadOfSchemaType as isPayloadOfSchemaType9,
|
|
392
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta9,
|
|
393
|
-
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources9
|
|
394
|
-
} from "@xyo-network/payload-model";
|
|
382
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType9, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources9 } from "@xyo-network/payload-model";
|
|
395
383
|
var EscrowTermsSchema = `${EscrowSchema}.terms`;
|
|
396
384
|
var isEscrowTerms = isPayloadOfSchemaType9(EscrowTermsSchema);
|
|
397
385
|
var isEscrowTermsWithSources = isPayloadOfSchemaTypeWithSources9(EscrowTermsSchema);
|
|
398
|
-
var isEscrowTermsWithMeta = isPayloadOfSchemaTypeWithMeta9(EscrowTermsSchema);
|
|
399
386
|
|
|
400
387
|
// src/Escrow/util/appraisal/getAppraisalsByAsset.ts
|
|
401
388
|
import { isHashLeaseEstimateWithSources } from "@xyo-network/diviner-hash-lease";
|
|
@@ -405,12 +392,12 @@ var getAppraisalsByAsset = (terms, dictionary) => {
|
|
|
405
392
|
const appraisals = Object.values(dictionary).filter(isHashLeaseEstimateWithSources);
|
|
406
393
|
const appraisalsByAsset = {};
|
|
407
394
|
for (const estimate of appraisals) {
|
|
408
|
-
const { sources } = estimate;
|
|
409
|
-
if (sources === void 0 || sources.length === 0) {
|
|
395
|
+
const { $sources } = estimate;
|
|
396
|
+
if ($sources === void 0 || $sources.length === 0) {
|
|
410
397
|
continue;
|
|
411
398
|
}
|
|
412
399
|
for (const asset of assets) {
|
|
413
|
-
if (sources.includes(asset)) {
|
|
400
|
+
if ($sources.includes(asset)) {
|
|
414
401
|
if (!appraisalsByAsset[asset]) appraisalsByAsset[asset] = [];
|
|
415
402
|
appraisalsByAsset[asset].push(estimate);
|
|
416
403
|
}
|
|
@@ -420,7 +407,7 @@ var getAppraisalsByAsset = (terms, dictionary) => {
|
|
|
420
407
|
};
|
|
421
408
|
|
|
422
409
|
// src/Escrow/util/appraisal/getSignaturesByAppraisal.ts
|
|
423
|
-
import {
|
|
410
|
+
import { isBoundWitness } from "@xyo-network/boundwitness-model";
|
|
424
411
|
var getSignaturesByAppraisal = (terms, dictionary) => {
|
|
425
412
|
const appraisals = terms.appraisals;
|
|
426
413
|
if (!appraisals || appraisals.length === 0) return {};
|
|
@@ -429,7 +416,7 @@ var getSignaturesByAppraisal = (terms, dictionary) => {
|
|
|
429
416
|
const appraisalBWsValid = Object.fromEntries(
|
|
430
417
|
appraisals.map((hash) => [hash, []])
|
|
431
418
|
);
|
|
432
|
-
for (const bw of Object.values(dictionary).filter(
|
|
419
|
+
for (const bw of Object.values(dictionary).filter(isBoundWitness)) {
|
|
433
420
|
for (const appraisal of appraisals) {
|
|
434
421
|
if (bw.payload_hashes.includes(appraisal) && bw.addresses.some((address) => appraisalAuthorities.includes(address))) {
|
|
435
422
|
appraisalBWsValid[appraisal].push(bw);
|
|
@@ -442,12 +429,12 @@ var getSignaturesByAppraisal = (terms, dictionary) => {
|
|
|
442
429
|
// src/Escrow/util/secret/createEscrowIntent.ts
|
|
443
430
|
import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
444
431
|
var createEscrowIntentWithSecret = async (terms, secret, account) => {
|
|
445
|
-
const result = await new BoundWitnessBuilder(
|
|
432
|
+
const result = await new BoundWitnessBuilder().signers([account]).payloads([terms, secret]).build();
|
|
446
433
|
return result;
|
|
447
434
|
};
|
|
448
435
|
|
|
449
436
|
// src/Escrow/util/secret/findEscrowPartySecretSignatures.ts
|
|
450
|
-
import {
|
|
437
|
+
import { isBoundWitness as isBoundWitness2 } from "@xyo-network/boundwitness-model";
|
|
451
438
|
var getLogPrefix = (party) => {
|
|
452
439
|
const partySecret = party === "seller" ? "sellerSecret" : "buyerSecret";
|
|
453
440
|
return `EscrowTerms.${partySecret}`;
|
|
@@ -464,7 +451,7 @@ var findEscrowPartySecretSignatures = (terms, dictionary, party) => {
|
|
|
464
451
|
console.log(`${getLogPrefix(party)}: No ${partySecret}: ${terms[partySecret]}`);
|
|
465
452
|
return [];
|
|
466
453
|
}
|
|
467
|
-
const partySignedBWs = Object.values(dictionary).filter(
|
|
454
|
+
const partySignedBWs = Object.values(dictionary).filter(isBoundWitness2).filter((bw) => bw.payload_hashes.includes(secretHash)).filter((bw) => partyAddresses.every((address) => bw.addresses.includes(address)));
|
|
468
455
|
return partySignedBWs;
|
|
469
456
|
};
|
|
470
457
|
|
|
@@ -552,7 +539,7 @@ var getEscrowAgentAllowedValidator = (allowedEscrowAgent) => {
|
|
|
552
539
|
|
|
553
540
|
// src/Escrow/validators/escrow/appraisal.ts
|
|
554
541
|
import { assertEx } from "@xylabs/assert";
|
|
555
|
-
import {
|
|
542
|
+
import { isBoundWitness as isBoundWitness3 } from "@xyo-network/boundwitness-model";
|
|
556
543
|
var name2 = "EscrowTerms.appraisal";
|
|
557
544
|
var appraisalsExistValidator = (terms) => {
|
|
558
545
|
const appraisals = terms.appraisals;
|
|
@@ -569,7 +556,7 @@ var getAppraisalsFromValidAuthoritiesValidator = (dictionary) => {
|
|
|
569
556
|
const appraisalBWsValid = Object.fromEntries(
|
|
570
557
|
appraisals.map((hash) => [hash, []])
|
|
571
558
|
);
|
|
572
|
-
for (const bw of Object.values(dictionary).filter(
|
|
559
|
+
for (const bw of Object.values(dictionary).filter(isBoundWitness3)) {
|
|
573
560
|
for (const appraisal of appraisals) {
|
|
574
561
|
if (bw.payload_hashes.includes(appraisal) && bw.addresses.some((address) => appraisalAuthorities.includes(address))) {
|
|
575
562
|
appraisalBWsValid[appraisal].push(bw);
|
|
@@ -767,11 +754,7 @@ var getSellerSecretSignedValidator = (dictionary) => {
|
|
|
767
754
|
};
|
|
768
755
|
|
|
769
756
|
// src/Payment/Instrument/Card/Payload.ts
|
|
770
|
-
import {
|
|
771
|
-
isPayloadOfSchemaType as isPayloadOfSchemaType10,
|
|
772
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta10,
|
|
773
|
-
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources10
|
|
774
|
-
} from "@xyo-network/payload-model";
|
|
757
|
+
import { isPayloadOfSchemaType as isPayloadOfSchemaType10, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources10 } from "@xyo-network/payload-model";
|
|
775
758
|
|
|
776
759
|
// src/Payment/Schema.ts
|
|
777
760
|
var PaymentSchema = `${PaymentsSchema}.payment`;
|
|
@@ -785,22 +768,18 @@ var PaymentCardSchema = `${PaymentInstrumentSchema}.card`;
|
|
|
785
768
|
// src/Payment/Instrument/Card/Payload.ts
|
|
786
769
|
var isPaymentCard = isPayloadOfSchemaType10(PaymentCardSchema);
|
|
787
770
|
var isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources10(PaymentCardSchema);
|
|
788
|
-
var isPaymentCardWithMeta = isPayloadOfSchemaTypeWithMeta10(PaymentCardSchema);
|
|
789
771
|
|
|
790
772
|
// src/Payment/Payload.ts
|
|
791
773
|
import {
|
|
792
774
|
isPayloadOfSchemaType as isPayloadOfSchemaType11,
|
|
793
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta11,
|
|
794
775
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources11
|
|
795
776
|
} from "@xyo-network/payload-model";
|
|
796
777
|
var isPayment = isPayloadOfSchemaType11(PaymentSchema);
|
|
797
778
|
var isPaymentWithSources = isPayloadOfSchemaTypeWithSources11(PaymentSchema);
|
|
798
|
-
var isPaymentWithMeta = isPayloadOfSchemaTypeWithMeta11(PaymentSchema);
|
|
799
779
|
|
|
800
780
|
// src/Payment/Status/Payload.ts
|
|
801
781
|
import {
|
|
802
782
|
isPayloadOfSchemaType as isPayloadOfSchemaType12,
|
|
803
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta12,
|
|
804
783
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources12
|
|
805
784
|
} from "@xyo-network/payload-model";
|
|
806
785
|
|
|
@@ -810,12 +789,10 @@ var PaymentStatusSchema = `${PaymentSchema}.status`;
|
|
|
810
789
|
// src/Payment/Status/Payload.ts
|
|
811
790
|
var isPaymentStatus = isPayloadOfSchemaType12(PaymentStatusSchema);
|
|
812
791
|
var isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources12(PaymentStatusSchema);
|
|
813
|
-
var isPaymentStatusWithMeta = isPayloadOfSchemaTypeWithMeta12(PaymentStatusSchema);
|
|
814
792
|
|
|
815
793
|
// src/Purchase/Payload.ts
|
|
816
794
|
import {
|
|
817
795
|
isPayloadOfSchemaType as isPayloadOfSchemaType13,
|
|
818
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta13,
|
|
819
796
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources13
|
|
820
797
|
} from "@xyo-network/payload-model";
|
|
821
798
|
|
|
@@ -825,12 +802,10 @@ var PurchaseSchema = `${PaymentsSchema}.purchase`;
|
|
|
825
802
|
// src/Purchase/Payload.ts
|
|
826
803
|
var isPurchase = isPayloadOfSchemaType13(PurchaseSchema);
|
|
827
804
|
var isPurchaseWithSources = isPayloadOfSchemaTypeWithSources13(PurchaseSchema);
|
|
828
|
-
var isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta13(PurchaseSchema);
|
|
829
805
|
|
|
830
806
|
// src/Receipt/Payload.ts
|
|
831
807
|
import {
|
|
832
808
|
isPayloadOfSchemaType as isPayloadOfSchemaType14,
|
|
833
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta14,
|
|
834
809
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources14
|
|
835
810
|
} from "@xyo-network/payload-model";
|
|
836
811
|
|
|
@@ -840,7 +815,6 @@ var ReceiptSchema = `${PaymentsSchema}.receipt`;
|
|
|
840
815
|
// src/Receipt/Payload.ts
|
|
841
816
|
var isReceipt = isPayloadOfSchemaType14(ReceiptSchema);
|
|
842
817
|
var isReceiptWithSources = isPayloadOfSchemaTypeWithSources14(ReceiptSchema);
|
|
843
|
-
var isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta14(ReceiptSchema);
|
|
844
818
|
|
|
845
819
|
// src/Subtotal/Diviner/Config.ts
|
|
846
820
|
var PaymentSubtotalDivinerConfigSchema = "network.xyo.diviner.payments.subtotal.config";
|
|
@@ -848,13 +822,11 @@ var PaymentSubtotalDivinerConfigSchema = "network.xyo.diviner.payments.subtotal.
|
|
|
848
822
|
// src/Subtotal/Diviner/Payload.ts
|
|
849
823
|
import {
|
|
850
824
|
isPayloadOfSchemaType as isPayloadOfSchemaType15,
|
|
851
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta15,
|
|
852
825
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources15
|
|
853
826
|
} from "@xyo-network/payload-model";
|
|
854
827
|
var SubtotalSchema = "network.xyo.payments.subtotal";
|
|
855
828
|
var isSubtotal = isPayloadOfSchemaType15(SubtotalSchema);
|
|
856
829
|
var isSubtotalWithSources = isPayloadOfSchemaTypeWithSources15(SubtotalSchema);
|
|
857
|
-
var isSubtotalWithMeta = isPayloadOfSchemaTypeWithMeta15(SubtotalSchema);
|
|
858
830
|
|
|
859
831
|
// src/Total/Diviner/Config.ts
|
|
860
832
|
var PaymentTotalDivinerConfigSchema = "network.xyo.diviner.payments.total.config";
|
|
@@ -862,13 +834,11 @@ var PaymentTotalDivinerConfigSchema = "network.xyo.diviner.payments.total.config
|
|
|
862
834
|
// src/Total/Diviner/Payload.ts
|
|
863
835
|
import {
|
|
864
836
|
isPayloadOfSchemaType as isPayloadOfSchemaType16,
|
|
865
|
-
isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta16,
|
|
866
837
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources16
|
|
867
838
|
} from "@xyo-network/payload-model";
|
|
868
839
|
var TotalSchema = "network.xyo.payments.total";
|
|
869
840
|
var isTotal = isPayloadOfSchemaType16(TotalSchema);
|
|
870
841
|
var isTotalWithSources = isPayloadOfSchemaTypeWithSources16(TotalSchema);
|
|
871
|
-
var isTotalWithMeta = isPayloadOfSchemaTypeWithMeta16(TotalSchema);
|
|
872
842
|
export {
|
|
873
843
|
AmountSchema,
|
|
874
844
|
BillingAddressSchema,
|
|
@@ -896,6 +866,16 @@ export {
|
|
|
896
866
|
TotalSchema,
|
|
897
867
|
appraisalAuthoritiesExistValidator,
|
|
898
868
|
appraisalsExistValidator,
|
|
869
|
+
asCondition,
|
|
870
|
+
asConditionWithSources,
|
|
871
|
+
asCoupon,
|
|
872
|
+
asCouponWithSources,
|
|
873
|
+
asFixedAmountCoupon,
|
|
874
|
+
asFixedAmountCouponWithSources,
|
|
875
|
+
asFixedPercentageCoupon,
|
|
876
|
+
asFixedPercentageCouponWithSources,
|
|
877
|
+
asFixedPriceCoupon,
|
|
878
|
+
asFixedPriceCouponWithSources,
|
|
899
879
|
assetsExistValidator,
|
|
900
880
|
buyerExistsValidator,
|
|
901
881
|
buyerSecretExistsValidator,
|
|
@@ -920,57 +900,40 @@ export {
|
|
|
920
900
|
getSellerSecretSuppliedValidator,
|
|
921
901
|
getSignaturesByAppraisal,
|
|
922
902
|
isAmount,
|
|
923
|
-
isAmountWithMeta,
|
|
924
903
|
isAmountWithSources,
|
|
925
904
|
isBillingAddress,
|
|
926
|
-
isBillingAddressWithMeta,
|
|
927
905
|
isBillingAddressWithSources,
|
|
928
906
|
isCondition,
|
|
929
|
-
isConditionWithMeta,
|
|
930
907
|
isConditionWithSources,
|
|
931
908
|
isCoupon,
|
|
932
|
-
isCouponWithMeta,
|
|
933
909
|
isCouponWithSources,
|
|
934
910
|
isDiscount,
|
|
935
|
-
isDiscountWithMeta,
|
|
936
911
|
isDiscountWithSources,
|
|
937
912
|
isEscrowOutcome,
|
|
938
|
-
isEscrowOutcomeWithMeta,
|
|
939
913
|
isEscrowOutcomeWithSources,
|
|
940
914
|
isEscrowTerms,
|
|
941
|
-
isEscrowTermsWithMeta,
|
|
942
915
|
isEscrowTermsWithSources,
|
|
943
916
|
isFixedAmountCoupon,
|
|
944
|
-
isFixedAmountCouponWithMeta,
|
|
945
917
|
isFixedAmountCouponWithSources,
|
|
946
918
|
isFixedPercentageCoupon,
|
|
947
|
-
isFixedPercentageCouponWithMeta,
|
|
948
919
|
isFixedPercentageCouponWithSources,
|
|
949
920
|
isFixedPriceCoupon,
|
|
950
|
-
isFixedPriceCouponWithMeta,
|
|
951
921
|
isFixedPriceCouponWithSources,
|
|
952
922
|
isIso4217CurrencyCode,
|
|
953
923
|
isPayment,
|
|
954
924
|
isPaymentCard,
|
|
955
|
-
isPaymentCardWithMeta,
|
|
956
925
|
isPaymentCardWithSources,
|
|
957
926
|
isPaymentStatus,
|
|
958
|
-
isPaymentStatusWithMeta,
|
|
959
927
|
isPaymentStatusWithSources,
|
|
960
|
-
isPaymentWithMeta,
|
|
961
928
|
isPaymentWithSources,
|
|
962
929
|
isPurchase,
|
|
963
|
-
isPurchaseWithMeta,
|
|
964
930
|
isPurchaseWithSources,
|
|
965
931
|
isReceipt,
|
|
966
|
-
isReceiptWithMeta,
|
|
967
932
|
isReceiptWithSources,
|
|
968
933
|
isStackable,
|
|
969
934
|
isSubtotal,
|
|
970
|
-
isSubtotalWithMeta,
|
|
971
935
|
isSubtotalWithSources,
|
|
972
936
|
isTotal,
|
|
973
|
-
isTotalWithMeta,
|
|
974
937
|
isTotalWithSources,
|
|
975
938
|
moduleIdentifiersContainsAllOf,
|
|
976
939
|
moduleIdentifiersContainsOneOf,
|