@xyo-network/payment-payload-plugins 3.4.2 → 3.4.3
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/Iso4217Currency.d.ts +14 -0
- package/dist/neutral/Amount/Iso4217Currency.d.ts.map +1 -0
- package/dist/neutral/Amount/Payload.d.ts +31 -0
- package/dist/neutral/Amount/Payload.d.ts.map +1 -0
- package/dist/neutral/Amount/index.d.ts +3 -0
- package/dist/neutral/Amount/index.d.ts.map +1 -0
- package/dist/neutral/Billing/Address/Address.d.ts +48 -0
- package/dist/neutral/Billing/Address/Address.d.ts.map +1 -0
- package/dist/neutral/Billing/Address/Schema.d.ts +3 -0
- package/dist/neutral/Billing/Address/Schema.d.ts.map +1 -0
- package/dist/neutral/Billing/Address/index.d.ts +3 -0
- package/dist/neutral/Billing/Address/index.d.ts.map +1 -0
- package/dist/neutral/Billing/Schema.d.ts +3 -0
- package/dist/neutral/Billing/Schema.d.ts.map +1 -0
- package/dist/neutral/Billing/index.d.ts +3 -0
- package/dist/neutral/Billing/index.d.ts.map +1 -0
- package/dist/neutral/Currency.d.ts +2 -0
- package/dist/neutral/Currency.d.ts.map +1 -0
- package/dist/neutral/Discount/Config.d.ts +23 -0
- package/dist/neutral/Discount/Config.d.ts.map +1 -0
- package/dist/neutral/Discount/Params.d.ts +11 -0
- package/dist/neutral/Discount/Params.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.d.ts +8 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.d.ts +8 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/BuyerCondition.d.ts +34 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/BuyerCondition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/Conditions/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +30 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +30 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +30 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/Coupons/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +22 -0
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts +3 -0
- package/dist/neutral/Discount/Payload/Coupon/Schema.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/index.d.ts +6 -0
- package/dist/neutral/Discount/Payload/Coupon/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +22 -0
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts +16 -0
- package/dist/neutral/Discount/Payload/Coupon/types/CouponFields.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/Coupon/types/index.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts +5 -0
- package/dist/neutral/Discount/Payload/Coupon/types/isStackable.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/Discount.d.ts +37 -0
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/NoDiscount.d.ts +3 -0
- package/dist/neutral/Discount/Payload/NoDiscount.d.ts.map +1 -0
- package/dist/neutral/Discount/Payload/index.d.ts +4 -0
- package/dist/neutral/Discount/Payload/index.d.ts.map +1 -0
- package/dist/neutral/Discount/index.d.ts +4 -0
- package/dist/neutral/Discount/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/Outcome.d.ts +36 -0
- package/dist/neutral/Escrow/Outcome.d.ts.map +1 -0
- package/dist/neutral/Escrow/Schema.d.ts +3 -0
- package/dist/neutral/Escrow/Schema.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/Party.d.ts +6 -0
- package/dist/neutral/Escrow/Terms/Party.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/PartySecret.d.ts +6 -0
- package/dist/neutral/Escrow/Terms/PartySecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/Terms.d.ts +77 -0
- package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -0
- package/dist/neutral/Escrow/Terms/index.d.ts +4 -0
- package/dist/neutral/Escrow/Terms/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/index.d.ts +6 -0
- package/dist/neutral/Escrow/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts +12 -0
- package/dist/neutral/Escrow/util/appraisal/getAppraisalsByAsset.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts +13 -0
- package/dist/neutral/Escrow/util/appraisal/getSignaturesByAppraisal.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/appraisal/index.d.ts +3 -0
- package/dist/neutral/Escrow/util/appraisal/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/index.d.ts +3 -0
- package/dist/neutral/Escrow/util/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +12 -0
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts +13 -0
- package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts +7 -0
- package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/index.d.ts +5 -0
- package/dist/neutral/Escrow/util/secret/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +14 -0
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts +2 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +22 -0
- package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts +10 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts +2 -0
- package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts +2 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts +6 -0
- package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/common/index.d.ts +4 -0
- package/dist/neutral/Escrow/validators/common/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/agent.d.ts +5 -0
- package/dist/neutral/Escrow/validators/escrow/agent.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +29 -0
- package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts +10 -0
- package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/assets.d.ts +8 -0
- package/dist/neutral/Escrow/validators/escrow/assets.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/buyer.d.ts +8 -0
- package/dist/neutral/Escrow/validators/escrow/buyer.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +21 -0
- package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/index.d.ts +11 -0
- package/dist/neutral/Escrow/validators/escrow/index.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts +4 -0
- package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts +5 -0
- package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/seller.d.ts +8 -0
- package/dist/neutral/Escrow/validators/escrow/seller.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +21 -0
- package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -0
- package/dist/neutral/Escrow/validators/index.d.ts +3 -0
- package/dist/neutral/Escrow/validators/index.d.ts.map +1 -0
- package/dist/neutral/Invoice/Invoice.d.ts +17 -0
- package/dist/neutral/Invoice/Invoice.d.ts.map +1 -0
- package/dist/neutral/Invoice/index.d.ts +2 -0
- package/dist/neutral/Invoice/index.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +50 -0
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Card/Schema.d.ts +3 -0
- package/dist/neutral/Payment/Instrument/Card/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Card/index.d.ts +3 -0
- package/dist/neutral/Payment/Instrument/Card/index.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/Schema.d.ts +3 -0
- package/dist/neutral/Payment/Instrument/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Instrument/index.d.ts +3 -0
- package/dist/neutral/Payment/Instrument/index.d.ts.map +1 -0
- package/dist/neutral/Payment/Payload.d.ts +40 -0
- package/dist/neutral/Payment/Payload.d.ts.map +1 -0
- package/dist/neutral/Payment/Schema.d.ts +3 -0
- package/dist/neutral/Payment/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Status/Payload.d.ts +35 -0
- package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -0
- package/dist/neutral/Payment/Status/Schema.d.ts +3 -0
- package/dist/neutral/Payment/Status/Schema.d.ts.map +1 -0
- package/dist/neutral/Payment/Status/index.d.ts +3 -0
- package/dist/neutral/Payment/Status/index.d.ts.map +1 -0
- package/dist/neutral/Payment/index.d.ts +5 -0
- package/dist/neutral/Payment/index.d.ts.map +1 -0
- package/dist/neutral/Purchase/Payload.d.ts +37 -0
- package/dist/neutral/Purchase/Payload.d.ts.map +1 -0
- package/dist/neutral/Purchase/Schema.d.ts +3 -0
- package/dist/neutral/Purchase/Schema.d.ts.map +1 -0
- package/dist/neutral/Purchase/index.d.ts +3 -0
- package/dist/neutral/Purchase/index.d.ts.map +1 -0
- package/dist/neutral/Receipt/Payload.d.ts +40 -0
- package/dist/neutral/Receipt/Payload.d.ts.map +1 -0
- package/dist/neutral/Receipt/Schema.d.ts +3 -0
- package/dist/neutral/Receipt/Schema.d.ts.map +1 -0
- package/dist/neutral/Receipt/index.d.ts +3 -0
- package/dist/neutral/Receipt/index.d.ts.map +1 -0
- package/dist/neutral/Schema.d.ts +3 -0
- package/dist/neutral/Schema.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Config.d.ts +8 -0
- package/dist/neutral/Subtotal/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Subtotal/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts +29 -0
- package/dist/neutral/Subtotal/Diviner/Payload.d.ts.map +1 -0
- package/dist/neutral/Subtotal/Diviner/index.d.ts +4 -0
- package/dist/neutral/Subtotal/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Subtotal/index.d.ts +2 -0
- package/dist/neutral/Subtotal/index.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Config.d.ts +18 -0
- package/dist/neutral/Total/Diviner/Config.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Params.d.ts +5 -0
- package/dist/neutral/Total/Diviner/Params.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/Payload.d.ts +29 -0
- package/dist/neutral/Total/Diviner/Payload.d.ts.map +1 -0
- package/dist/neutral/Total/Diviner/index.d.ts +4 -0
- package/dist/neutral/Total/Diviner/index.d.ts.map +1 -0
- package/dist/neutral/Total/index.d.ts +2 -0
- package/dist/neutral/Total/index.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +12 -561
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs +12 -3
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +19 -19
- package/src/Amount/Payload.ts +2 -3
- package/src/Billing/Address/Address.ts +3 -2
- package/src/Discount/Config.ts +3 -3
- package/src/Discount/Params.ts +4 -4
- package/src/Discount/Payload/Coupon/Conditions/AppraisalAmountCondition.ts +1 -1
- package/src/Discount/Payload/Coupon/Conditions/AssetQuantityCondition.ts +1 -1
- package/src/Discount/Payload/Coupon/Conditions/BuyerCondition.ts +2 -2
- package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +4 -5
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +3 -5
- package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +4 -5
- package/src/Discount/Payload/Coupon/Payload.ts +1 -1
- package/src/Discount/Payload/Coupon/types/Condition.ts +1 -1
- package/src/Discount/Payload/Coupon/types/CouponFields.ts +2 -2
- package/src/Discount/Payload/Coupon/types/isStackable.ts +1 -1
- package/src/Discount/Payload/Discount.ts +3 -4
- package/src/Discount/Payload/NoDiscount.ts +1 -2
- package/src/Escrow/Outcome.ts +2 -3
- package/src/Escrow/Terms/Party.ts +1 -1
- package/src/Escrow/Terms/PartySecret.ts +1 -1
- package/src/Escrow/Terms/Terms.ts +4 -3
- package/src/Escrow/util/appraisal/getAppraisalsByAsset.ts +4 -4
- package/src/Escrow/util/appraisal/getSignaturesByAppraisal.ts +4 -4
- package/src/Escrow/util/secret/createEscrowIntent.ts +4 -4
- package/src/Escrow/util/secret/findEscrowPartySecretSignatures.ts +4 -4
- package/src/Escrow/util/secret/getEscrowSecret.ts +1 -2
- package/src/Escrow/util/secret/updateEscrowTermsWithSecret.ts +3 -3
- package/src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts +3 -3
- package/src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts +3 -3
- package/src/Escrow/validators/escrow/agent.ts +3 -3
- package/src/Escrow/validators/escrow/appraisal.ts +5 -5
- package/src/Escrow/validators/escrow/appraisalAuthorities.ts +3 -3
- package/src/Escrow/validators/escrow/assets.ts +2 -2
- package/src/Escrow/validators/escrow/buyer.ts +2 -2
- package/src/Escrow/validators/escrow/buyerSecret.ts +3 -3
- package/src/Escrow/validators/escrow/nbfExp.ts +2 -2
- package/src/Escrow/validators/escrow/paymentAuthorities.ts +3 -3
- package/src/Escrow/validators/escrow/seller.ts +2 -2
- package/src/Escrow/validators/escrow/sellerSecret.ts +3 -3
- package/src/Invoice/Invoice.ts +4 -4
- package/src/Payment/Instrument/Card/Payload.ts +3 -2
- package/src/Payment/Payload.ts +2 -3
- package/src/Payment/Status/Payload.ts +1 -2
- package/src/Purchase/Payload.ts +2 -3
- package/src/Receipt/Payload.ts +2 -3
- package/src/Subtotal/Diviner/Config.ts +1 -1
- package/src/Subtotal/Diviner/Params.ts +3 -3
- package/src/Subtotal/Diviner/Payload.ts +2 -3
- package/src/Total/Diviner/Config.ts +2 -2
- package/src/Total/Diviner/Params.ts +3 -3
- package/src/Total/Diviner/Payload.ts +2 -3
- package/xy.config.ts +1 -1
package/src/Discount/Config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// import type { Hash } from '@xylabs/hex'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { Address } from '@xylabs/hex'
|
|
3
|
+
import { DivinerConfig } from '@xyo-network/diviner-model'
|
|
4
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
5
5
|
|
|
6
6
|
export const PaymentDiscountDivinerConfigSchema = 'network.xyo.diviner.payments.discount.config'
|
|
7
7
|
export type PaymentDiscountDivinerConfigSchema = typeof PaymentDiscountDivinerConfigSchema
|
package/src/Discount/Params.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { Address } from '@xylabs/hex'
|
|
2
|
+
import { DivinerParams } from '@xyo-network/diviner-model'
|
|
3
|
+
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { PaymentDiscountDivinerConfig } from './Config.ts'
|
|
6
6
|
|
|
7
7
|
export type PaymentDiscountDivinerParams<
|
|
8
8
|
TConfig extends AnyConfigSchema<PaymentDiscountDivinerConfig> = AnyConfigSchema<PaymentDiscountDivinerConfig>,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-thenable */
|
|
2
2
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { Condition } from '../types/index.ts'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Creates a coupon condition that requires an appraisal amount below a certain value
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Address } from '@xylabs/hex'
|
|
2
2
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { Condition } from '../types/index.ts'
|
|
5
5
|
|
|
6
6
|
export type BuyerCondition = Condition & {
|
|
7
7
|
definition: {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithOptionalSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, Payload, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
|
-
import
|
|
7
|
+
import { AmountFields } from '../../../../Amount/index.ts'
|
|
9
8
|
import { CouponSchema } from '../Schema.ts'
|
|
10
|
-
import
|
|
9
|
+
import { CouponFields } from '../types/index.ts'
|
|
11
10
|
|
|
12
11
|
export const FixedAmountCouponSchema = `${CouponSchema}.fixed.amount` as const
|
|
13
12
|
export type FixedAmountCouponSchema = typeof FixedAmountCouponSchema
|
|
@@ -17,7 +16,7 @@ export interface FixedAmountCouponFields extends CouponFields, AmountFields {}
|
|
|
17
16
|
/**
|
|
18
17
|
* A coupon that provides a fixed discount amount
|
|
19
18
|
*/
|
|
20
|
-
export type FixedAmountCoupon =
|
|
19
|
+
export type FixedAmountCoupon = Payload<FixedAmountCouponFields, FixedAmountCouponSchema>
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* Identity function for determining if an object is an FixedAmountCoupon
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type {
|
|
3
|
-
Payload, PayloadWithOptionalSources, WithSources,
|
|
4
|
-
} from '@xyo-network/payload-model'
|
|
5
2
|
import {
|
|
6
3
|
isPayloadOfSchemaType,
|
|
7
4
|
isPayloadOfSchemaTypeWithSources,
|
|
5
|
+
Payload, WithSources,
|
|
8
6
|
} from '@xyo-network/payload-model'
|
|
9
7
|
|
|
10
8
|
import { CouponSchema } from '../Schema.ts'
|
|
11
|
-
import
|
|
9
|
+
import { CouponFields } from '../types/index.ts'
|
|
12
10
|
|
|
13
11
|
export const FixedPercentageCouponSchema = `${CouponSchema}.fixed.percentage` as const
|
|
14
12
|
export type FixedPercentageCouponSchema = typeof FixedPercentageCouponSchema
|
|
@@ -20,7 +18,7 @@ export interface FixedPercentageCouponFields extends CouponFields {
|
|
|
20
18
|
/**
|
|
21
19
|
* A coupon that provides a fixed discount amount
|
|
22
20
|
*/
|
|
23
|
-
export type FixedPercentageCoupon =
|
|
21
|
+
export type FixedPercentageCoupon = Payload<FixedPercentageCouponFields, FixedPercentageCouponSchema>
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* Identity function for determining if an object is an FixedPercentageCoupon
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithOptionalSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, Payload, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
|
-
import
|
|
7
|
+
import { AmountFields } from '../../../../Amount/index.ts'
|
|
9
8
|
import { CouponSchema } from '../Schema.ts'
|
|
10
|
-
import
|
|
9
|
+
import { CouponFields } from '../types/index.ts'
|
|
11
10
|
|
|
12
11
|
export const FixedPriceCouponSchema = `${CouponSchema}.fixed.price` as const
|
|
13
12
|
export type FixedPriceCouponSchema = typeof FixedPriceCouponSchema
|
|
@@ -17,7 +16,7 @@ export interface FixedPriceCouponFields extends CouponFields, AmountFields { }
|
|
|
17
16
|
/**
|
|
18
17
|
* A coupon that provides a fixed total price
|
|
19
18
|
*/
|
|
20
|
-
export type FixedPriceCoupon =
|
|
19
|
+
export type FixedPriceCoupon = Payload<FixedPriceCouponFields, FixedPriceCouponSchema>
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* Identity function for determining if an object is an FixedPriceCoupon
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
FixedAmountCoupon, FixedPercentageCoupon, FixedPriceCoupon,
|
|
5
5
|
isFixedAmountCoupon, isFixedAmountCouponWithSources, isFixedPercentageCoupon,
|
|
6
6
|
isFixedPercentageCouponWithSources,
|
|
7
7
|
isFixedPriceCoupon,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
2
|
import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources } from '@xyo-network/payload-model'
|
|
3
|
-
import {
|
|
3
|
+
import { SchemaPayload, SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The payloads that can be used as conditions for a coupon
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
|
+
import { DurationFields } from '@xyo-network/xns-record-payload-plugins'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The fields that are common across all coupons
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithOptionalSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, Payload, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
|
-
import
|
|
7
|
+
import { AmountFields } from '../../Amount/index.ts'
|
|
9
8
|
|
|
10
9
|
export const DiscountSchema = 'network.xyo.payments.discount' as const
|
|
11
10
|
export type DiscountSchema = typeof DiscountSchema
|
|
@@ -15,7 +14,7 @@ export interface DiscountFields extends AmountFields { }
|
|
|
15
14
|
/**
|
|
16
15
|
* The result of a discount
|
|
17
16
|
*/
|
|
18
|
-
export type Discount =
|
|
17
|
+
export type Discount = Payload<DiscountFields, DiscountSchema>
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* Identity function for determining if an object is an Discount
|
package/src/Escrow/Outcome.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
4
3
|
import {
|
|
5
4
|
isPayloadOfSchemaType,
|
|
6
|
-
isPayloadOfSchemaTypeWithSources,
|
|
5
|
+
isPayloadOfSchemaTypeWithSources, PayloadWithSources, WithSources,
|
|
7
6
|
} from '@xyo-network/payload-model'
|
|
8
7
|
|
|
9
8
|
import { EscrowSchema } from './Schema.ts'
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Address, Hash } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, Payload,
|
|
5
|
+
} from '@xyo-network/payload-model'
|
|
5
6
|
|
|
6
7
|
import { EscrowSchema } from '../Schema.ts'
|
|
7
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
|
+
import { HashLeaseEstimate, isHashLeaseEstimateWithSources } from '@xyo-network/diviner-hash-lease'
|
|
3
|
+
import { Payload, WithSources } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Returns a dictionary of asset hashes and their associated appraisals
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
|
+
import { BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Returns a dictionary of appraisals and their associated bound witnesses which are signed by
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AccountInstance } from '@xyo-network/account-model'
|
|
2
2
|
import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
3
|
-
import
|
|
3
|
+
import { Id } from '@xyo-network/id-payload-plugin'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates an escrow intent (for a buyer or seller) using the supplied secret
|
|
@@ -11,7 +11,7 @@ import type { EscrowTerms } from '../../Terms/index.ts'
|
|
|
11
11
|
* @param account The account to create the escrow intent with
|
|
12
12
|
* @returns The escrow intent
|
|
13
13
|
*/
|
|
14
|
-
export const createEscrowIntentWithSecret = async (terms: EscrowTerms, secret:
|
|
14
|
+
export const createEscrowIntentWithSecret = async (terms: EscrowTerms, secret: Id, account: AccountInstance) => {
|
|
15
15
|
const result = await new BoundWitnessBuilder().signers([account]).payloads([terms, secret]).build()
|
|
16
16
|
return result
|
|
17
17
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
|
+
import { BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'
|
|
3
|
+
import { Payload } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
6
|
EscrowParty, EscrowPartySecret, EscrowTerms,
|
|
7
7
|
} from '../../Terms/index.ts'
|
|
8
8
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Crypto } from '@xylabs/crypto'
|
|
2
|
-
import
|
|
3
|
-
import { IdSchema } from '@xyo-network/id-payload-plugin'
|
|
2
|
+
import { IdPayload, IdSchema } from '@xyo-network/id-payload-plugin'
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Returns a cryptographically random secret to use for escrow
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AccountInstance } from '@xyo-network/account-model'
|
|
2
2
|
import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
3
|
-
import
|
|
3
|
+
import { IdPayload } from '@xyo-network/id-payload-plugin'
|
|
4
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import {
|
|
7
7
|
EscrowParty, EscrowPartySecret, EscrowTerms,
|
|
8
8
|
} from '../../Terms/index.ts'
|
|
9
9
|
import { getEscrowSecret } from './getEscrowSecret.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
+
import { PayloadValueExpression } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { EscrowTerms } from '../../../Terms/index.ts'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Checks if property value of the escrow terms contains one of the valid moduleIdentifiers
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
2
|
import { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'
|
|
3
|
-
import
|
|
3
|
+
import { AsyncPayloadValidationFunction, Payload } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
6
|
EscrowParty, EscrowPartySecret, EscrowTerms,
|
|
7
7
|
} from '../../../Terms/index.ts'
|
|
8
8
|
import { findEscrowPartySecretSignatures } from '../../../util/index.ts'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
5
5
|
import { moduleIdentifiersContainsOneOf } from '../common/index.ts'
|
|
6
6
|
|
|
7
7
|
const name = 'EscrowTerms.escrowAgent'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { Hash } from '@xylabs/hex'
|
|
3
|
+
import { BoundWitness, isBoundWitness } from '@xyo-network/boundwitness-model'
|
|
4
|
+
import { HashLeaseEstimate } from '@xyo-network/diviner-hash-lease'
|
|
5
|
+
import {
|
|
6
6
|
Payload, SyncPayloadValidationFunction, WithSources,
|
|
7
7
|
} from '@xyo-network/payload-model'
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
10
10
|
import { getAppraisalsByAsset } from '../../util/index.ts'
|
|
11
11
|
import { validateWithinWindow } from '../common/index.ts'
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { asAddress } from '@xylabs/hex'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
3
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
6
6
|
import { moduleIdentifiersContainsAllOf } from '../common/index.ts'
|
|
7
7
|
|
|
8
8
|
const name = 'EscrowTerms.appraisalAuthorities'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
4
4
|
|
|
5
5
|
const name = 'EscrowTerms.assets'
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { asAddress } from '@xylabs/hex'
|
|
2
|
-
import
|
|
2
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
5
5
|
|
|
6
6
|
const name = 'EscrowTerms.buyer'
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { Hash } from '@xylabs/hex'
|
|
3
|
+
import {
|
|
4
4
|
AsyncPayloadValidationFunction, Payload, SyncPayloadValidationFunction,
|
|
5
5
|
} from '@xyo-network/payload-model'
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
8
8
|
import { getPartySecretSignedValidator } from '../common/index.ts'
|
|
9
9
|
|
|
10
10
|
const name = 'EscrowTerms.buyerSecret'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
4
4
|
|
|
5
5
|
export const getNbfExpValidator = (now: number, minRequiredDuration: number): SyncPayloadValidationFunction<EscrowTerms> => {
|
|
6
6
|
const minExp = now + minRequiredDuration
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
2
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
5
5
|
import { moduleIdentifiersContainsAllOf } from '../common/index.ts'
|
|
6
6
|
|
|
7
7
|
const name = 'EscrowTerms.paymentAuthorities'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { asAddress } from '@xylabs/hex'
|
|
2
|
-
import
|
|
2
|
+
import { SyncPayloadValidationFunction } from '@xyo-network/payload-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
5
5
|
|
|
6
6
|
const name = 'EscrowTerms.seller'
|
|
7
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { assertEx } from '@xylabs/assert'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { Hash } from '@xylabs/hex'
|
|
3
|
+
import {
|
|
4
4
|
AsyncPayloadValidationFunction, Payload, SyncPayloadValidationFunction,
|
|
5
5
|
} from '@xyo-network/payload-model'
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { EscrowTerms } from '../../Terms/index.ts'
|
|
8
8
|
import { getPartySecretSignedValidator } from '../common/index.ts'
|
|
9
9
|
|
|
10
10
|
const name = 'EscrowTerms.sellerSecret'
|
package/src/Invoice/Invoice.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { Discount } from '../Discount/index.ts'
|
|
2
|
+
import { Payment } from '../Payment/index.ts'
|
|
3
|
+
import { Subtotal } from '../Subtotal/index.ts'
|
|
4
|
+
import { Total } from '../Total/index.ts'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A tuple containing the subtotal, total, and payment for an invoice.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, Payload, WithSources,
|
|
4
|
+
} from '@xyo-network/payload-model'
|
|
4
5
|
|
|
5
6
|
import { PaymentCardSchema } from './Schema.ts'
|
|
6
7
|
|
package/src/Payment/Payload.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, PayloadWithSources, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
|
-
import
|
|
7
|
+
import { SupportedCurrency } from '../Currency.ts'
|
|
9
8
|
import { PaymentSchema } from './Schema.ts'
|
|
10
9
|
|
|
11
10
|
export interface PaymentFields {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, PayloadWithSources, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
7
|
import { PaymentStatusSchema } from './Schema.ts'
|
package/src/Purchase/Payload.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Hash } from '@xylabs/hex'
|
|
2
2
|
import { AsObjectFactory } from '@xylabs/object'
|
|
3
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
4
3
|
import {
|
|
5
4
|
isPayloadOfSchemaType,
|
|
6
|
-
isPayloadOfSchemaTypeWithSources,
|
|
5
|
+
isPayloadOfSchemaTypeWithSources, PayloadWithSources, WithSources,
|
|
7
6
|
} from '@xyo-network/payload-model'
|
|
8
7
|
|
|
9
8
|
import { PurchaseSchema } from './Schema.ts'
|
package/src/Receipt/Payload.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, PayloadWithSources, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
|
-
import
|
|
7
|
+
import { SupportedCurrency } from '../Currency.ts'
|
|
9
8
|
import { ReceiptSchema } from './Schema.ts'
|
|
10
9
|
|
|
11
10
|
export interface ReceiptFields {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// import type { Hash } from '@xylabs/hex'
|
|
2
|
-
import
|
|
2
|
+
import { DivinerConfig } from '@xyo-network/diviner-model'
|
|
3
3
|
|
|
4
4
|
export const PaymentSubtotalDivinerConfigSchema = 'network.xyo.diviner.payments.subtotal.config'
|
|
5
5
|
export type PaymentSubtotalDivinerConfigSchema = typeof PaymentSubtotalDivinerConfigSchema
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { DivinerParams } from '@xyo-network/diviner-model'
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { PaymentSubtotalDivinerConfig } from './Config.ts'
|
|
5
5
|
|
|
6
6
|
export type PaymentSubtotalDivinerParams<
|
|
7
7
|
TConfig extends AnyConfigSchema<PaymentSubtotalDivinerConfig> = AnyConfigSchema<PaymentSubtotalDivinerConfig>,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { AsObjectFactory } from '@xylabs/object'
|
|
2
|
-
import type { PayloadWithSources, WithSources } from '@xyo-network/payload-model'
|
|
3
2
|
import {
|
|
4
3
|
isPayloadOfSchemaType,
|
|
5
|
-
isPayloadOfSchemaTypeWithSources,
|
|
4
|
+
isPayloadOfSchemaTypeWithSources, PayloadWithSources, WithSources,
|
|
6
5
|
} from '@xyo-network/payload-model'
|
|
7
6
|
|
|
8
|
-
import
|
|
7
|
+
import { AmountFields } from '../../Amount/index.ts'
|
|
9
8
|
|
|
10
9
|
export const SubtotalSchema = 'network.xyo.payments.subtotal' as const
|
|
11
10
|
export type SubtotalSchema = typeof SubtotalSchema
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import type { Hash } from '@xylabs/hex'
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { DivinerConfig } from '@xyo-network/diviner-model'
|
|
3
|
+
import { ModuleIdentifier } from '@xyo-network/module-model'
|
|
4
4
|
|
|
5
5
|
export const PaymentTotalDivinerConfigSchema = 'network.xyo.diviner.payments.total.config'
|
|
6
6
|
export type PaymentTotalDivinerConfigSchema = typeof PaymentTotalDivinerConfigSchema
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { DivinerParams } from '@xyo-network/diviner-model'
|
|
2
|
+
import { AnyConfigSchema } from '@xyo-network/module-model'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import { PaymentTotalDivinerConfig } from './Config.ts'
|
|
5
5
|
|
|
6
6
|
export type PaymentTotalDivinerParams<
|
|
7
7
|
TConfig extends AnyConfigSchema<PaymentTotalDivinerConfig> = AnyConfigSchema<PaymentTotalDivinerConfig>,
|