@xyo-network/payment-payload-plugins 3.2.0-rc.1 → 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/Billing/Address/Address.d.ts +46 -4
- package/dist/neutral/Billing/Address/Address.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts +44 -4
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedAmount.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts +40 -4
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPercentage.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts +44 -4
- package/dist/neutral/Discount/Payload/Coupon/Coupons/FixedPrice.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts +101 -1
- package/dist/neutral/Discount/Payload/Coupon/Payload.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts +63 -15
- package/dist/neutral/Discount/Payload/Coupon/types/Condition.d.ts.map +1 -1
- package/dist/neutral/Discount/Payload/Discount.d.ts +7 -3
- package/dist/neutral/Discount/Payload/Discount.d.ts.map +1 -1
- package/dist/neutral/Escrow/Terms/Terms.d.ts +28 -4
- package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts +33 -12
- package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -1
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts +33 -12
- package/dist/neutral/Escrow/util/secret/updateEscrowTermsWithSecret.d.ts.map +1 -1
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +22 -4
- package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -1
- package/dist/neutral/index.mjs +29 -4
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +22 -21
- package/src/Discount/Payload/Coupon/Coupons/FixedAmount.ts +6 -3
- package/src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts +6 -3
- package/src/Discount/Payload/Coupon/Coupons/FixedPrice.ts +6 -3
- package/src/Discount/Payload/Coupon/Payload.ts +4 -0
- package/src/Discount/Payload/Coupon/types/Condition.ts +4 -1
- package/src/Discount/Payload/Discount.ts +2 -2
- package/src/Escrow/util/appraisal/getAppraisalsByAsset.ts +3 -3
- package/src/Escrow/util/secret/createEscrowIntent.ts +1 -1
|
@@ -8,16 +8,37 @@ import type { EscrowTerms } from '../../Terms/index.ts';
|
|
|
8
8
|
* @param account The account to create the escrow intent with
|
|
9
9
|
* @returns The escrow intent
|
|
10
10
|
*/
|
|
11
|
-
export declare const createEscrowIntentWithSecret: (terms: EscrowTerms, secret: IdPayload, account: AccountInstance) => Promise<[import("@xyo-network/boundwitness-model").Signed<import("@xyo-network/
|
|
12
|
-
schema: "network.
|
|
13
|
-
}
|
|
14
|
-
schema:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
export declare const createEscrowIntentWithSecret: (terms: EscrowTerms, secret: IdPayload, account: AccountInstance) => Promise<[import("@xyo-network/boundwitness-model").Signed<import("@xyo-network/boundwitness-model").UnsignedBoundWitness>, import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
12
|
+
schema: import("@xyo-network/payload-model").Schema;
|
|
13
|
+
}>[], import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
14
|
+
schema: "network.xyo.error.module";
|
|
15
|
+
details?: string | number | boolean | {
|
|
16
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
17
|
+
} | (string | number | boolean | {
|
|
18
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
19
|
+
} | (string | number | boolean | {
|
|
20
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
21
|
+
} | (string | number | boolean | {
|
|
22
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
23
|
+
} | (string | number | boolean | {
|
|
24
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
25
|
+
} | (string | number | boolean | {
|
|
26
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
27
|
+
} | (string | number | boolean | {
|
|
28
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
29
|
+
} | (string | number | boolean | {
|
|
30
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
|
|
31
|
+
} | (string | number | boolean | {
|
|
32
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
|
|
33
|
+
} | (string | number | boolean | {
|
|
34
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
|
|
35
|
+
} | (string | number | boolean | {
|
|
36
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
|
|
37
|
+
} | (string | number | boolean | {
|
|
38
|
+
[x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
39
|
+
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null | undefined;
|
|
40
|
+
message?: string | undefined;
|
|
41
|
+
name?: string | undefined;
|
|
42
|
+
query?: import("@xylabs/hex").Hash | undefined;
|
|
43
|
+
}>[]]>;
|
|
23
44
|
//# sourceMappingURL=createEscrowIntent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEscrowIntent.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/createEscrowIntent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,UAAiB,WAAW,UAAU,SAAS,WAAW,eAAe
|
|
1
|
+
{"version":3,"file":"createEscrowIntent.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/createEscrowIntent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,UAAiB,WAAW,UAAU,SAAS,WAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGjH,CAAA"}
|
|
@@ -10,16 +10,37 @@ import type { EscrowParty, EscrowTerms } from '../../Terms/index.ts';
|
|
|
10
10
|
* not provided, a cryptographically random secret will be generated.
|
|
11
11
|
* @returns The escrow intent
|
|
12
12
|
*/
|
|
13
|
-
export declare const updateEscrowTermsWithSecret: (terms: EscrowTerms, escrowParty: EscrowParty, account: AccountInstance | AccountInstance[], secret?: IdPayload) => Promise<[import("@xyo-network/boundwitness-model").Signed<import("@xyo-network/
|
|
14
|
-
schema: "network.
|
|
15
|
-
}
|
|
16
|
-
schema:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
export declare const updateEscrowTermsWithSecret: (terms: EscrowTerms, escrowParty: EscrowParty, account: AccountInstance | AccountInstance[], secret?: IdPayload) => Promise<[import("@xyo-network/boundwitness-model").Signed<import("@xyo-network/boundwitness-model").UnsignedBoundWitness>, import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
14
|
+
schema: import("@xyo-network/payload-model").Schema;
|
|
15
|
+
}>[], import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
16
|
+
schema: "network.xyo.error.module";
|
|
17
|
+
details?: string | number | boolean | {
|
|
18
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
19
|
+
} | (string | number | boolean | {
|
|
20
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
21
|
+
} | (string | number | boolean | {
|
|
22
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
23
|
+
} | (string | number | boolean | {
|
|
24
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
25
|
+
} | (string | number | boolean | {
|
|
26
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
27
|
+
} | (string | number | boolean | {
|
|
28
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
29
|
+
} | (string | number | boolean | {
|
|
30
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
31
|
+
} | (string | number | boolean | {
|
|
32
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null;
|
|
33
|
+
} | (string | number | boolean | {
|
|
34
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null)[] | null;
|
|
35
|
+
} | (string | number | boolean | {
|
|
36
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null)[] | null;
|
|
37
|
+
} | (string | number | boolean | {
|
|
38
|
+
[x: string]: string | number | boolean | /*elided*/ any | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | null;
|
|
39
|
+
} | (string | number | boolean | {
|
|
40
|
+
[x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
41
|
+
} | /*elided*/ any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null | undefined;
|
|
42
|
+
message?: string | undefined;
|
|
43
|
+
name?: string | undefined;
|
|
44
|
+
query?: import("@xylabs/hex").Hash | undefined;
|
|
45
|
+
}>[]]>;
|
|
25
46
|
//# sourceMappingURL=updateEscrowTermsWithSecret.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateEscrowTermsWithSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/updateEscrowTermsWithSecret.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAG/D,OAAO,KAAK,EACV,WAAW,EAAqB,WAAW,EAC5C,MAAM,sBAAsB,CAAA;AAG7B;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,UAC/B,WAAW,eACL,WAAW,WACf,eAAe,GAAG,eAAe,EAAE,WACnC,SAAS
|
|
1
|
+
{"version":3,"file":"updateEscrowTermsWithSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/updateEscrowTermsWithSecret.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAG/D,OAAO,KAAK,EACV,WAAW,EAAqB,WAAW,EAC5C,MAAM,sBAAsB,CAAA;AAG7B;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,UAC/B,WAAW,eACL,WAAW,WACf,eAAe,GAAG,eAAe,EAAE,WACnC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAanB,CAAA"}
|
|
@@ -32,13 +32,31 @@ export type PaymentCard = Payload<PaymentCardFields, PaymentCardSchema>;
|
|
|
32
32
|
/**
|
|
33
33
|
* Identity function for determine if an object is a PaymentCard
|
|
34
34
|
*/
|
|
35
|
-
export declare const isPaymentCard: (x?: unknown | null) => x is import("@
|
|
35
|
+
export declare const isPaymentCard: (x?: unknown | null) => x is import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
36
36
|
schema: "network.xyo.payments.payment.instrument.card";
|
|
37
|
-
|
|
37
|
+
cardNumber: string;
|
|
38
|
+
cardholderName?: string
|
|
39
|
+
/**
|
|
40
|
+
* Card Verification Value (CVV/CVC) of the payment card.
|
|
41
|
+
*/
|
|
42
|
+
| undefined;
|
|
43
|
+
cvv: string;
|
|
44
|
+
expMonth: number;
|
|
45
|
+
expYear: number;
|
|
46
|
+
}>;
|
|
38
47
|
/**
|
|
39
48
|
* Identity function for determine if an object is a PaymentCard with sources
|
|
40
49
|
*/
|
|
41
|
-
export declare const isPaymentCardWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<import("@
|
|
50
|
+
export declare const isPaymentCardWithSources: (x?: unknown | null) => x is import("@xyo-network/payload-model").WithSources<import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
42
51
|
schema: "network.xyo.payments.payment.instrument.card";
|
|
43
|
-
|
|
52
|
+
cardNumber: string;
|
|
53
|
+
cardholderName?: string
|
|
54
|
+
/**
|
|
55
|
+
* Card Verification Value (CVV/CVC) of the payment card.
|
|
56
|
+
*/
|
|
57
|
+
| undefined;
|
|
58
|
+
cvv: string;
|
|
59
|
+
expMonth: number;
|
|
60
|
+
expYear: number;
|
|
61
|
+
}>>;
|
|
44
62
|
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../../src/Payment/Instrument/Card/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../../src/Payment/Instrument/Card/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,aAAa;;gBA3BZ,MAAM;qBAID,MAAM;IACvB;;OAEG;;SACE,MAAM;cAID,MAAM;aAIP,MAAM;EAWiE,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;gBAhCvB,MAAM;qBAID,MAAM;IACvB;;OAEG;;SACE,MAAM;cAID,MAAM;aAIP,MAAM;GAgBuF,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -289,6 +289,7 @@ var createConditionForRequiredBuyer = (buyer) => {
|
|
|
289
289
|
};
|
|
290
290
|
|
|
291
291
|
// src/Discount/Payload/Coupon/Coupons/FixedAmount.ts
|
|
292
|
+
import { AsObjectFactory } from "@xylabs/object";
|
|
292
293
|
import {
|
|
293
294
|
isPayloadOfSchemaType as isPayloadOfSchemaType3,
|
|
294
295
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources3
|
|
@@ -300,35 +301,49 @@ var CouponSchema = "network.xyo.payments.coupon";
|
|
|
300
301
|
// src/Discount/Payload/Coupon/Coupons/FixedAmount.ts
|
|
301
302
|
var FixedAmountCouponSchema = `${CouponSchema}.fixed.amount`;
|
|
302
303
|
var isFixedAmountCoupon = isPayloadOfSchemaType3(FixedAmountCouponSchema);
|
|
304
|
+
var asFixedAmountCoupon = AsObjectFactory.create(isFixedAmountCoupon);
|
|
303
305
|
var isFixedAmountCouponWithSources = isPayloadOfSchemaTypeWithSources3(FixedAmountCouponSchema);
|
|
306
|
+
var asFixedAmountCouponWithSources = AsObjectFactory.create(isFixedAmountCouponWithSources);
|
|
304
307
|
|
|
305
308
|
// src/Discount/Payload/Coupon/Coupons/FixedPercentage.ts
|
|
309
|
+
import { AsObjectFactory as AsObjectFactory2 } from "@xylabs/object";
|
|
306
310
|
import {
|
|
307
311
|
isPayloadOfSchemaType as isPayloadOfSchemaType4,
|
|
308
312
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources4
|
|
309
313
|
} from "@xyo-network/payload-model";
|
|
310
314
|
var FixedPercentageCouponSchema = `${CouponSchema}.fixed.percentage`;
|
|
311
315
|
var isFixedPercentageCoupon = isPayloadOfSchemaType4(FixedPercentageCouponSchema);
|
|
316
|
+
var asFixedPercentageCoupon = AsObjectFactory2.create(isFixedPercentageCoupon);
|
|
312
317
|
var isFixedPercentageCouponWithSources = isPayloadOfSchemaTypeWithSources4(FixedPercentageCouponSchema);
|
|
318
|
+
var asFixedPercentageCouponWithSources = AsObjectFactory2.create(isFixedPercentageCouponWithSources);
|
|
313
319
|
|
|
314
320
|
// src/Discount/Payload/Coupon/Coupons/FixedPrice.ts
|
|
321
|
+
import { AsObjectFactory as AsObjectFactory3 } from "@xylabs/object";
|
|
315
322
|
import {
|
|
316
323
|
isPayloadOfSchemaType as isPayloadOfSchemaType5,
|
|
317
324
|
isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources5
|
|
318
325
|
} from "@xyo-network/payload-model";
|
|
319
326
|
var FixedPriceCouponSchema = `${CouponSchema}.fixed.price`;
|
|
320
327
|
var isFixedPriceCoupon = isPayloadOfSchemaType5(FixedPriceCouponSchema);
|
|
328
|
+
var asFixedPriceCoupon = AsObjectFactory3.create(isFixedPriceCoupon);
|
|
321
329
|
var isFixedPriceCouponWithSources = isPayloadOfSchemaTypeWithSources5(FixedPriceCouponSchema);
|
|
330
|
+
var asFixedPriceCouponWithSources = AsObjectFactory3.create(isFixedPriceCouponWithSources);
|
|
322
331
|
|
|
323
332
|
// src/Discount/Payload/Coupon/Payload.ts
|
|
333
|
+
import { AsObjectFactory as AsObjectFactory4 } from "@xylabs/object";
|
|
324
334
|
var isCoupon = (x) => isFixedAmountCoupon(x) || isFixedPercentageCoupon(x) || isFixedPriceCoupon(x);
|
|
335
|
+
var asCoupon = AsObjectFactory4.create(isCoupon);
|
|
325
336
|
var isCouponWithSources = (x) => isFixedAmountCouponWithSources(x) || isFixedPercentageCouponWithSources(x) || isFixedPriceCouponWithSources(x);
|
|
337
|
+
var asCouponWithSources = AsObjectFactory4.create(isCouponWithSources);
|
|
326
338
|
|
|
327
339
|
// src/Discount/Payload/Coupon/types/Condition.ts
|
|
340
|
+
import { AsObjectFactory as AsObjectFactory5 } from "@xylabs/object";
|
|
328
341
|
import { isPayloadOfSchemaType as isPayloadOfSchemaType6, isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6 } from "@xyo-network/payload-model";
|
|
329
342
|
import { SchemaSchema as SchemaSchema4 } from "@xyo-network/schema-payload-plugin";
|
|
330
343
|
var isCondition = isPayloadOfSchemaType6(SchemaSchema4);
|
|
344
|
+
var asCondition = AsObjectFactory5.create(isCondition);
|
|
331
345
|
var isConditionWithSources = isPayloadOfSchemaTypeWithSources6(SchemaSchema4);
|
|
346
|
+
var asConditionWithSources = AsObjectFactory5.create(isConditionWithSources);
|
|
332
347
|
|
|
333
348
|
// src/Discount/Payload/Coupon/types/isStackable.ts
|
|
334
349
|
var isStackable = (x) => (x ?? { stackable: false })?.stackable;
|
|
@@ -377,12 +392,12 @@ var getAppraisalsByAsset = (terms, dictionary) => {
|
|
|
377
392
|
const appraisals = Object.values(dictionary).filter(isHashLeaseEstimateWithSources);
|
|
378
393
|
const appraisalsByAsset = {};
|
|
379
394
|
for (const estimate of appraisals) {
|
|
380
|
-
const { sources } = estimate;
|
|
381
|
-
if (sources === void 0 || sources.length === 0) {
|
|
395
|
+
const { $sources } = estimate;
|
|
396
|
+
if ($sources === void 0 || $sources.length === 0) {
|
|
382
397
|
continue;
|
|
383
398
|
}
|
|
384
399
|
for (const asset of assets) {
|
|
385
|
-
if (sources.includes(asset)) {
|
|
400
|
+
if ($sources.includes(asset)) {
|
|
386
401
|
if (!appraisalsByAsset[asset]) appraisalsByAsset[asset] = [];
|
|
387
402
|
appraisalsByAsset[asset].push(estimate);
|
|
388
403
|
}
|
|
@@ -414,7 +429,7 @@ var getSignaturesByAppraisal = (terms, dictionary) => {
|
|
|
414
429
|
// src/Escrow/util/secret/createEscrowIntent.ts
|
|
415
430
|
import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
|
|
416
431
|
var createEscrowIntentWithSecret = async (terms, secret, account) => {
|
|
417
|
-
const result = await new BoundWitnessBuilder(
|
|
432
|
+
const result = await new BoundWitnessBuilder().signers([account]).payloads([terms, secret]).build();
|
|
418
433
|
return result;
|
|
419
434
|
};
|
|
420
435
|
|
|
@@ -851,6 +866,16 @@ export {
|
|
|
851
866
|
TotalSchema,
|
|
852
867
|
appraisalAuthoritiesExistValidator,
|
|
853
868
|
appraisalsExistValidator,
|
|
869
|
+
asCondition,
|
|
870
|
+
asConditionWithSources,
|
|
871
|
+
asCoupon,
|
|
872
|
+
asCouponWithSources,
|
|
873
|
+
asFixedAmountCoupon,
|
|
874
|
+
asFixedAmountCouponWithSources,
|
|
875
|
+
asFixedPercentageCoupon,
|
|
876
|
+
asFixedPercentageCouponWithSources,
|
|
877
|
+
asFixedPriceCoupon,
|
|
878
|
+
asFixedPriceCouponWithSources,
|
|
854
879
|
assetsExistValidator,
|
|
855
880
|
buyerExistsValidator,
|
|
856
881
|
buyerSecretExistsValidator,
|