@xyo-network/payment-payload-plugins 3.0.23 → 3.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/neutral/Escrow/Terms/Party.d.ts +3 -0
  2. package/dist/neutral/Escrow/Terms/Party.d.ts.map +1 -0
  3. package/dist/neutral/Escrow/Terms/PartySecret.d.ts +3 -0
  4. package/dist/neutral/Escrow/Terms/PartySecret.d.ts.map +1 -0
  5. package/dist/neutral/Escrow/Terms/Terms.d.ts.map +1 -0
  6. package/dist/neutral/Escrow/Terms/index.d.ts +4 -0
  7. package/dist/neutral/Escrow/Terms/index.d.ts.map +1 -0
  8. package/dist/neutral/Escrow/index.d.ts +2 -3
  9. package/dist/neutral/Escrow/index.d.ts.map +1 -1
  10. package/dist/neutral/Escrow/util/index.d.ts +2 -0
  11. package/dist/neutral/Escrow/util/index.d.ts.map +1 -0
  12. package/dist/neutral/Escrow/{createEscrowIntent.d.ts → util/secret/createEscrowIntent.d.ts} +1 -1
  13. package/dist/neutral/Escrow/util/secret/createEscrowIntent.d.ts.map +1 -0
  14. package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts +6 -0
  15. package/dist/neutral/Escrow/util/secret/findEscrowPartySecretSignatures.d.ts.map +1 -0
  16. package/dist/neutral/Escrow/util/secret/getEscrowSecret.d.ts.map +1 -0
  17. package/dist/neutral/Escrow/util/secret/index.d.ts +4 -0
  18. package/dist/neutral/Escrow/util/secret/index.d.ts.map +1 -0
  19. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +1 -1
  20. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -1
  21. package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts +5 -0
  22. package/dist/neutral/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.d.ts.map +1 -0
  23. package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts +2 -0
  24. package/dist/neutral/Escrow/validators/common/SecretValidators/index.d.ts.map +1 -0
  25. package/dist/neutral/Escrow/validators/common/index.d.ts +1 -0
  26. package/dist/neutral/Escrow/validators/common/index.d.ts.map +1 -1
  27. package/dist/neutral/Escrow/validators/escrow/agent.d.ts +1 -1
  28. package/dist/neutral/Escrow/validators/escrow/agent.d.ts.map +1 -1
  29. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +1 -1
  30. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -1
  31. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts +1 -1
  32. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -1
  33. package/dist/neutral/Escrow/validators/escrow/assets.d.ts +1 -1
  34. package/dist/neutral/Escrow/validators/escrow/assets.d.ts.map +1 -1
  35. package/dist/neutral/Escrow/validators/escrow/buyer.d.ts +1 -1
  36. package/dist/neutral/Escrow/validators/escrow/buyer.d.ts.map +1 -1
  37. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +1 -1
  38. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -1
  39. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts +1 -1
  40. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts.map +1 -1
  41. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts +1 -1
  42. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -1
  43. package/dist/neutral/Escrow/validators/escrow/seller.d.ts +1 -1
  44. package/dist/neutral/Escrow/validators/escrow/seller.d.ts.map +1 -1
  45. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +1 -1
  46. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -1
  47. package/dist/neutral/index.mjs +71 -57
  48. package/dist/neutral/index.mjs.map +1 -1
  49. package/package.json +4 -2
  50. package/src/Escrow/Terms/Party.ts +6 -0
  51. package/src/Escrow/Terms/PartySecret.ts +6 -0
  52. package/src/Escrow/{Terms.ts → Terms/Terms.ts} +1 -1
  53. package/src/Escrow/Terms/index.ts +3 -0
  54. package/src/Escrow/index.ts +2 -3
  55. package/src/Escrow/util/index.ts +1 -0
  56. package/src/Escrow/{createEscrowIntent.ts → util/secret/createEscrowIntent.ts} +1 -1
  57. package/src/Escrow/util/secret/findEscrowPartySecretSignatures.ts +47 -0
  58. package/src/Escrow/util/secret/index.ts +3 -0
  59. package/src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts +1 -1
  60. package/src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts +48 -0
  61. package/src/Escrow/validators/common/SecretValidators/index.ts +1 -0
  62. package/src/Escrow/validators/common/index.ts +1 -0
  63. package/src/Escrow/validators/escrow/agent.ts +1 -1
  64. package/src/Escrow/validators/escrow/appraisal.ts +1 -1
  65. package/src/Escrow/validators/escrow/appraisalAuthorities.ts +1 -1
  66. package/src/Escrow/validators/escrow/assets.ts +1 -1
  67. package/src/Escrow/validators/escrow/buyer.ts +1 -1
  68. package/src/Escrow/validators/escrow/buyerSecret.ts +3 -30
  69. package/src/Escrow/validators/escrow/nbfExp.ts +1 -1
  70. package/src/Escrow/validators/escrow/paymentAuthorities.ts +1 -1
  71. package/src/Escrow/validators/escrow/seller.ts +1 -1
  72. package/src/Escrow/validators/escrow/sellerSecret.ts +3 -30
  73. package/dist/neutral/Escrow/Terms.d.ts.map +0 -1
  74. package/dist/neutral/Escrow/createEscrowIntent.d.ts.map +0 -1
  75. package/dist/neutral/Escrow/getEscrowSecret.d.ts.map +0 -1
  76. /package/dist/neutral/Escrow/{Terms.d.ts → Terms/Terms.d.ts} +0 -0
  77. /package/dist/neutral/Escrow/{getEscrowSecret.d.ts → util/secret/getEscrowSecret.d.ts} +0 -0
  78. /package/src/Escrow/{getEscrowSecret.ts → util/secret/getEscrowSecret.ts} +0 -0
@@ -0,0 +1,3 @@
1
+ import type { EscrowTermsFields } from './Terms.ts';
2
+ export type EscrowParty = keyof Pick<EscrowTermsFields, 'buyer' | 'seller'>;
3
+ //# sourceMappingURL=Party.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Party.d.ts","sourceRoot":"","sources":["../../../../src/Escrow/Terms/Party.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAKnD,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { EscrowTermsFields } from './Terms.ts';
2
+ export type EscrowPartySecret = keyof Pick<EscrowTermsFields, 'buyerSecret' | 'sellerSecret'>;
3
+ //# sourceMappingURL=PartySecret.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartySecret.d.ts","sourceRoot":"","sources":["../../../../src/Escrow/Terms/PartySecret.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAKnD,MAAM,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,aAAa,GAAG,cAAc,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Terms.d.ts","sourceRoot":"","sources":["../../../../src/Escrow/Terms/Terms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAOzD,eAAO,MAAM,iBAAiB,4BAAmC,CAAA;AACjE,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAGxD,MAAM,WAAW,iBAAiB;IAIhC,oBAAoB,EAAE,OAAO,EAAE,CAAA;IAI/B,UAAU,EAAE,IAAI,EAAE,CAAA;IAIlB,MAAM,EAAE,IAAI,EAAE,CAAA;IAId,KAAK,EAAE,OAAO,EAAE,CAAA;IAIhB,WAAW,EAAE,IAAI,CAAA;IAIjB,SAAS,EAAE,IAAI,EAAE,CAAA;IAIjB,WAAW,EAAE,OAAO,CAAA;IAIpB,GAAG,EAAE,MAAM,CAAA;IAIX,GAAG,EAAE,MAAM,CAAA;IAIX,kBAAkB,EAAE,OAAO,EAAE,CAAA;IAI7B,MAAM,EAAE,OAAO,EAAE,CAAA;IAIjB,YAAY,EAAE,IAAI,CAAA;CACnB;AAKD,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,CAAA;AAKhF,eAAO,MAAM,aAAa;;CAAwD,CAAA;AAKlF,eAAO,MAAM,wBAAwB;;EAAmE,CAAA;AAKxG,eAAO,MAAM,qBAAqB;;EAAgE,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './Party.ts';
2
+ export * from './PartySecret.ts';
3
+ export * from './Terms.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Escrow/Terms/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
@@ -1,7 +1,6 @@
1
- export * from './createEscrowIntent.ts';
2
- export * from './getEscrowSecret.ts';
3
1
  export * from './Outcome.ts';
4
2
  export * from './Schema.ts';
5
- export * from './Terms.ts';
3
+ export * from './Terms/index.ts';
4
+ export * from './util/index.ts';
6
5
  export * from './validators/index.ts';
7
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Escrow/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Escrow/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './secret/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Escrow/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { AccountInstance } from '@xyo-network/account-model';
2
2
  import type { IdPayload } from '@xyo-network/id-payload-plugin';
3
- import type { EscrowTerms } from './Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const createEscrowIntent: (terms: EscrowTerms[], account: AccountInstance) => Promise<[import("@xyo-network/payload-model").WithMeta<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & import("@xyo-network/boundwitness-model").BoundWitnessFields & {
5
5
  schema: "network.xyo.boundwitness";
6
6
  }>, import("@xyo-network/payload-model").WithMeta<{
@@ -0,0 +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;AASvD,eAAO,MAAM,kBAAkB,UAAiB,WAAW,EAAE,WAAW,eAAe;;;;;;;;;;;MAGtF,CAAA;AASD,eAAO,MAAM,4BAA4B,UAAiB,WAAW,UAAU,SAAS,WAAW,eAAe;;;;;;;;;;;MAGjH,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { Hash } from '@xylabs/hex';
2
+ import type { BoundWitness } from '@xyo-network/boundwitness-model';
3
+ import type { Payload, WithMeta } from '@xyo-network/payload-model';
4
+ import type { EscrowParty, EscrowTerms } from '../../Terms/index.ts';
5
+ export declare const findEscrowPartySecretSignatures: (terms: EscrowTerms, dictionary: Record<Hash, WithMeta<Payload>>, party: EscrowParty) => BoundWitness[];
6
+ //# sourceMappingURL=findEscrowPartySecretSignatures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findEscrowPartySecretSignatures.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/findEscrowPartySecretSignatures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAEnE,OAAO,KAAK,EACV,WAAW,EAAqB,WAAW,EAC5C,MAAM,sBAAsB,CAAA;AAkB7B,eAAO,MAAM,+BAA+B,UAAW,WAAW,cAAc,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,WAAW,KAAG,YAAY,EAqBjJ,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEscrowSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/getEscrowSecret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAO/D,eAAO,MAAM,eAAe,QAAO,SAElC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './createEscrowIntent.ts';
2
+ export * from './findEscrowPartySecretSignatures.ts';
3
+ export * from './getEscrowSecret.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/util/secret/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,sCAAsC,CAAA;AACpD,cAAc,sBAAsB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { PayloadValueExpression } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../../Terms.ts';
3
+ import type { EscrowTerms } from '../../../Terms/index.ts';
4
4
  export declare const moduleIdentifiersContainsOneOf: (escrowTerms: EscrowTerms, propertyExpression: PayloadValueExpression<EscrowTerms, "appraisalAuthorities" | "buyer" | "escrowAgent" | "paymentAuthorities" | "seller">, moduleIdentifiers: ModuleIdentifier[], required?: boolean) => boolean;
5
5
  export declare const moduleIdentifiersContainsAllOf: (escrowTerms: EscrowTerms, selector: PayloadValueExpression<EscrowTerms, "appraisalAuthorities" | "buyer" | "escrowAgent" | "paymentAuthorities" | "seller">, moduleIdentifiers: ModuleIdentifier[], required?: boolean) => boolean;
6
6
  //# sourceMappingURL=moduleInstanceValidators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"moduleInstanceValidators.d.ts","sourceRoot":"","sources":["../../../../../../src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAUpD,eAAO,MAAM,8BAA8B,gBAC5B,WAAW,sBACJ,sBAAsB,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,GAAG,QAAQ,CAAC,qBACxH,gBAAgB,EAAE,aAC3B,OAAO,YAQlB,CAAA;AAUD,eAAO,MAAM,8BAA8B,gBAC5B,WAAW,YACd,sBAAsB,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,GAAG,QAAQ,CAAC,qBAC9G,gBAAgB,EAAE,aAC3B,OAAO,YAQlB,CAAA"}
1
+ {"version":3,"file":"moduleInstanceValidators.d.ts","sourceRoot":"","sources":["../../../../../../src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAU1D,eAAO,MAAM,8BAA8B,gBAC5B,WAAW,sBACJ,sBAAsB,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,GAAG,QAAQ,CAAC,qBACxH,gBAAgB,EAAE,aAC3B,OAAO,YAQlB,CAAA;AAUD,eAAO,MAAM,8BAA8B,gBAC5B,WAAW,YACd,sBAAsB,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,GAAG,aAAa,GAAG,oBAAoB,GAAG,QAAQ,CAAC,qBAC9G,gBAAgB,EAAE,aAC3B,OAAO,YAQlB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Hash } from '@xylabs/hex';
2
+ import type { AsyncPayloadValidationFunction, Payload, WithMeta } from '@xyo-network/payload-model';
3
+ import type { EscrowParty, EscrowTerms } from '../../../Terms/index.ts';
4
+ export declare const getPartySecretSignedValidator: (dictionary: Record<Hash, WithMeta<Payload>>, party: EscrowParty) => AsyncPayloadValidationFunction<EscrowTerms>;
5
+ //# sourceMappingURL=getPartySecretSignedValidator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPartySecretSignedValidator.d.ts","sourceRoot":"","sources":["../../../../../../src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EACV,8BAA8B,EAAE,OAAO,EAAE,QAAQ,EAClD,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EACV,WAAW,EAAqB,WAAW,EAC5C,MAAM,yBAAyB,CAAA;AAkBhC,eAAO,MAAM,6BAA6B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,WAAW,KAAG,8BAA8B,CAAC,WAAW,CAqBzJ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './getPartySecretSignedValidator.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Escrow/validators/common/SecretValidators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export * from './ModuleInstanceValidators/index.ts';
2
+ export * from './SecretValidators/index.ts';
2
3
  export * from './TemporalValidators/index.ts';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const getEscrowAgentAllowedValidator: (allowedEscrowAgent: ModuleIdentifier) => SyncPayloadValidationFunction<EscrowTerms>;
5
5
  //# sourceMappingURL=agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAKjD,eAAO,MAAM,8BAA8B,uBAAwB,gBAAgB,KAAG,6BAA6B,CAAC,WAAW,CAQ9H,CAAA"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKvD,eAAO,MAAM,8BAA8B,uBAAwB,gBAAgB,KAAG,6BAA6B,CAAC,WAAW,CAQ9H,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex';
2
2
  import type { Payload, SyncPayloadValidationFunction, WithMeta } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const appraisalsExistValidator: SyncPayloadValidationFunction<EscrowTerms>;
5
5
  export declare const getAppraisalsFromValidAuthoritiesValidator: (dictionary: Record<Hash, WithMeta<Payload>>) => SyncPayloadValidationFunction<EscrowTerms>;
6
6
  export declare const getAppraisalsValidValidator: (dictionary: Record<Hash, WithMeta<Payload>>, minimumExp: number) => SyncPayloadValidationFunction<EscrowTerms>;
@@ -1 +1 @@
1
- {"version":3,"file":"appraisal.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/appraisal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAKvC,OAAO,KAAK,EACV,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EACjD,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AASjD,eAAO,MAAM,wBAAwB,EAAE,6BAA6B,CAAC,WAAW,CAQ/E,CAAA;AAOD,eAAO,MAAM,0CAA0C,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CA0BjJ,CAAA;AASD,eAAO,MAAM,2BAA2B,eAC1B,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,cAC/B,MAAM,KACjB,6BAA6B,CAAC,WAAW,CAiB3C,CAAA;AAOD,eAAO,MAAM,kCAAkC,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CAWzI,CAAA"}
1
+ {"version":3,"file":"appraisal.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/appraisal.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAKvC,OAAO,KAAK,EACV,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EACjD,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASvD,eAAO,MAAM,wBAAwB,EAAE,6BAA6B,CAAC,WAAW,CAQ/E,CAAA;AAOD,eAAO,MAAM,0CAA0C,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CA0BjJ,CAAA;AASD,eAAO,MAAM,2BAA2B,eAC1B,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,cAC/B,MAAM,KACjB,6BAA6B,CAAC,WAAW,CAiB3C,CAAA;AAOD,eAAO,MAAM,kCAAkC,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CAWzI,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const appraisalAuthoritiesExistValidator: SyncPayloadValidationFunction<EscrowTerms>;
5
5
  export declare const getAppraisalAuthoritiesAllowedValidator: (allowed: ModuleIdentifier[]) => SyncPayloadValidationFunction<EscrowTerms>;
6
6
  //# sourceMappingURL=appraisalAuthorities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appraisalAuthorities.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/appraisalAuthorities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AASjD,eAAO,MAAM,kCAAkC,EAAE,6BAA6B,CAAC,WAAW,CAazF,CAAA;AAED,eAAO,MAAM,uCAAuC,YAAa,gBAAgB,EAAE,KAAG,6BAA6B,CAAC,WAAW,CAQ9H,CAAA"}
1
+ {"version":3,"file":"appraisalAuthorities.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/appraisalAuthorities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASvD,eAAO,MAAM,kCAAkC,EAAE,6BAA6B,CAAC,WAAW,CAazF,CAAA;AAED,eAAO,MAAM,uCAAuC,YAAa,gBAAgB,EAAE,KAAG,6BAA6B,CAAC,WAAW,CAQ9H,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
2
- import type { EscrowTerms } from '../../Terms.ts';
2
+ import type { EscrowTerms } from '../../Terms/index.ts';
3
3
  export declare const assetsExistValidator: SyncPayloadValidationFunction<EscrowTerms>;
4
4
  //# sourceMappingURL=assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAQjD,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,WAAW,CAQ3E,CAAA"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAQvD,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,WAAW,CAQ3E,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
2
- import type { EscrowTerms } from '../../Terms.ts';
2
+ import type { EscrowTerms } from '../../Terms/index.ts';
3
3
  export declare const buyerExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
4
4
  //# sourceMappingURL=buyer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buyer.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/buyer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAQjD,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,WAAW,CAa3E,CAAA"}
1
+ {"version":3,"file":"buyer.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/buyer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAQvD,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,WAAW,CAa3E,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex';
2
2
  import type { AsyncPayloadValidationFunction, Payload, SyncPayloadValidationFunction, WithMeta } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const buyerSecretExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
5
5
  export declare const getBuyerSecretSuppliedValidator: (dictionary: Record<Hash, WithMeta<Payload>>) => SyncPayloadValidationFunction<EscrowTerms>;
6
6
  export declare const getBuyerSecretSignedValidator: (dictionary: Record<Hash, WithMeta<Payload>>) => AsyncPayloadValidationFunction<EscrowTerms>;
@@ -1 +1 @@
1
- {"version":3,"file":"buyerSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/buyerSecret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGvC,OAAO,KAAK,EACV,8BAA8B,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EACjF,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAQjD,eAAO,MAAM,0BAA0B,EAAE,6BAA6B,CAAC,WAAW,CAQjF,CAAA;AAOD,eAAO,MAAM,+BAA+B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CAStI,CAAA;AAOD,eAAO,MAAM,6BAA6B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,8BAA8B,CAAC,WAAW,CA4BrI,CAAA"}
1
+ {"version":3,"file":"buyerSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/buyerSecret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EACV,8BAA8B,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EACjF,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASvD,eAAO,MAAM,0BAA0B,EAAE,6BAA6B,CAAC,WAAW,CAQjF,CAAA;AAOD,eAAO,MAAM,+BAA+B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CAStI,CAAA;AAOD,eAAO,MAAM,6BAA6B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,8BAA8B,CAAC,WAAW,CAErI,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
2
- import type { EscrowTerms } from '../../Terms.ts';
2
+ import type { EscrowTerms } from '../../Terms/index.ts';
3
3
  export declare const getNbfExpValidator: (now: number, minRequiredDuration: number) => SyncPayloadValidationFunction<EscrowTerms>;
4
4
  //# sourceMappingURL=nbfExp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nbfExp.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/nbfExp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,eAAO,MAAM,kBAAkB,QAAS,MAAM,uBAAuB,MAAM,KAAG,6BAA6B,CAAC,WAAW,CActH,CAAA"}
1
+ {"version":3,"file":"nbfExp.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/nbfExp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEvD,eAAO,MAAM,kBAAkB,QAAS,MAAM,uBAAuB,MAAM,KAAG,6BAA6B,CAAC,WAAW,CActH,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { ModuleIdentifier } from '@xyo-network/module-model';
2
2
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const getPaymentAuthoritiesAllowedValidator: (allowed: ModuleIdentifier[]) => SyncPayloadValidationFunction<EscrowTerms>;
5
5
  //# sourceMappingURL=paymentAuthorities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"paymentAuthorities.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/paymentAuthorities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAKjD,eAAO,MAAM,qCAAqC,YAAa,gBAAgB,EAAE,KAAG,6BAA6B,CAAC,WAAW,CAQ5H,CAAA"}
1
+ {"version":3,"file":"paymentAuthorities.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/paymentAuthorities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAKvD,eAAO,MAAM,qCAAqC,YAAa,gBAAgB,EAAE,KAAG,6BAA6B,CAAC,WAAW,CAQ5H,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import type { SyncPayloadValidationFunction } from '@xyo-network/payload-model';
2
- import type { EscrowTerms } from '../../Terms.ts';
2
+ import type { EscrowTerms } from '../../Terms/index.ts';
3
3
  export declare const sellerExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
4
4
  //# sourceMappingURL=seller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seller.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/seller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAQjD,eAAO,MAAM,qBAAqB,EAAE,6BAA6B,CAAC,WAAW,CAa5E,CAAA"}
1
+ {"version":3,"file":"seller.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/seller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAQvD,eAAO,MAAM,qBAAqB,EAAE,6BAA6B,CAAC,WAAW,CAa5E,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { Hash } from '@xylabs/hex';
2
2
  import type { AsyncPayloadValidationFunction, Payload, SyncPayloadValidationFunction, WithMeta } from '@xyo-network/payload-model';
3
- import type { EscrowTerms } from '../../Terms.ts';
3
+ import type { EscrowTerms } from '../../Terms/index.ts';
4
4
  export declare const sellerSecretExistsValidator: SyncPayloadValidationFunction<EscrowTerms>;
5
5
  export declare const getSellerSecretSuppliedValidator: (dictionary: Record<Hash, WithMeta<Payload>>) => SyncPayloadValidationFunction<EscrowTerms>;
6
6
  export declare const getSellerSecretSignedValidator: (dictionary: Record<Hash, WithMeta<Payload>>) => AsyncPayloadValidationFunction<EscrowTerms>;
@@ -1 +1 @@
1
- {"version":3,"file":"sellerSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/sellerSecret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGvC,OAAO,KAAK,EACV,8BAA8B,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EACjF,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAQjD,eAAO,MAAM,2BAA2B,EAAE,6BAA6B,CAAC,WAAW,CAQlF,CAAA;AAOD,eAAO,MAAM,gCAAgC,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CASvI,CAAA;AAOD,eAAO,MAAM,8BAA8B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,8BAA8B,CAAC,WAAW,CA4BtI,CAAA"}
1
+ {"version":3,"file":"sellerSecret.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/escrow/sellerSecret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EACV,8BAA8B,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EACjF,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AASvD,eAAO,MAAM,2BAA2B,EAAE,6BAA6B,CAAC,WAAW,CAQlF,CAAA;AAOD,eAAO,MAAM,gCAAgC,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,6BAA6B,CAAC,WAAW,CASvI,CAAA;AAOD,eAAO,MAAM,8BAA8B,eAAgB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAG,8BAA8B,CAAC,WAAW,CAEtI,CAAA"}
@@ -370,24 +370,6 @@ var NO_DISCOUNT = {
370
370
  currency: "USD"
371
371
  };
372
372
 
373
- // src/Escrow/createEscrowIntent.ts
374
- import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
375
- var createEscrowIntent = async (terms, account) => {
376
- const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([...terms]).build();
377
- return result;
378
- };
379
- var createEscrowIntentWithSecret = async (terms, secret, account) => {
380
- const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([terms, secret]).build();
381
- return result;
382
- };
383
-
384
- // src/Escrow/getEscrowSecret.ts
385
- import { Crypto } from "@xylabs/crypto";
386
- import { IdSchema } from "@xyo-network/id-payload-plugin";
387
- var getEscrowSecret = () => {
388
- return { salt: Crypto.randomUUID(), schema: IdSchema };
389
- };
390
-
391
373
  // src/Escrow/Outcome.ts
392
374
  import {
393
375
  isPayloadOfSchemaType as isPayloadOfSchemaType8,
@@ -404,7 +386,7 @@ var isEscrowOutcome = isPayloadOfSchemaType8(EscrowOutcomeSchema);
404
386
  var isEscrowOutcomeWithSources = isPayloadOfSchemaTypeWithSources8(EscrowOutcomeSchema);
405
387
  var isEscrowOutcomeWithMeta = isPayloadOfSchemaTypeWithMeta8(EscrowOutcomeSchema);
406
388
 
407
- // src/Escrow/Terms.ts
389
+ // src/Escrow/Terms/Terms.ts
408
390
  import {
409
391
  isPayloadOfSchemaType as isPayloadOfSchemaType9,
410
392
  isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta9,
@@ -415,6 +397,46 @@ var isEscrowTerms = isPayloadOfSchemaType9(EscrowTermsSchema);
415
397
  var isEscrowTermsWithSources = isPayloadOfSchemaTypeWithSources9(EscrowTermsSchema);
416
398
  var isEscrowTermsWithMeta = isPayloadOfSchemaTypeWithMeta9(EscrowTermsSchema);
417
399
 
400
+ // src/Escrow/util/secret/createEscrowIntent.ts
401
+ import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
402
+ var createEscrowIntent = async (terms, account) => {
403
+ const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([...terms]).build();
404
+ return result;
405
+ };
406
+ var createEscrowIntentWithSecret = async (terms, secret, account) => {
407
+ const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([terms, secret]).build();
408
+ return result;
409
+ };
410
+
411
+ // src/Escrow/util/secret/findEscrowPartySecretSignatures.ts
412
+ import { isBoundWitnessWithMeta } from "@xyo-network/boundwitness-model";
413
+ var getLogPrefix = (party) => {
414
+ const partySecret = party === "seller" ? "sellerSecret" : "buyerSecret";
415
+ return `EscrowTerms.${partySecret}`;
416
+ };
417
+ var findEscrowPartySecretSignatures = (terms, dictionary, party) => {
418
+ const partyAddresses = terms[party];
419
+ if (partyAddresses === void 0 || partyAddresses.length === 0) {
420
+ console.log(`${getLogPrefix(party)}: No ${party}: ${terms[party]}`);
421
+ return [];
422
+ }
423
+ const partySecret = party === "seller" ? "sellerSecret" : "buyerSecret";
424
+ const secretHash = terms[partySecret];
425
+ if (secretHash === void 0) {
426
+ console.log(`${getLogPrefix(party)}: No ${partySecret}: ${terms[partySecret]}`);
427
+ return [];
428
+ }
429
+ const partySignedBWs = Object.values(dictionary).filter(isBoundWitnessWithMeta).filter((bw) => bw.payload_hashes.includes(secretHash)).filter((bw) => partyAddresses.every((address) => bw.addresses.includes(address)));
430
+ return partySignedBWs;
431
+ };
432
+
433
+ // src/Escrow/util/secret/getEscrowSecret.ts
434
+ import { Crypto } from "@xylabs/crypto";
435
+ import { IdSchema } from "@xyo-network/id-payload-plugin";
436
+ var getEscrowSecret = () => {
437
+ return { salt: Crypto.randomUUID(), schema: IdSchema };
438
+ };
439
+
418
440
  // src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts
419
441
  var moduleIdentifiersContainsOneOf = (escrowTerms, propertyExpression, moduleIdentifiers, required = true) => {
420
442
  const termsValue = propertyExpression(escrowTerms);
@@ -433,6 +455,30 @@ var moduleIdentifiersContainsAllOf = (escrowTerms, selector, moduleIdentifiers,
433
455
  }
434
456
  };
435
457
 
458
+ // src/Escrow/validators/common/SecretValidators/getPartySecretSignedValidator.ts
459
+ import { BoundWitnessValidator } from "@xyo-network/boundwitness-validator";
460
+ var getLogPrefix2 = (party) => {
461
+ const partySecret = party === "seller" ? "sellerSecret" : "buyerSecret";
462
+ return `EscrowTerms.${partySecret}`;
463
+ };
464
+ var getPartySecretSignedValidator = (dictionary, party) => {
465
+ const partySecret = party === "seller" ? "sellerSecret" : "buyerSecret";
466
+ return async (terms) => {
467
+ const buyerSecretBWs = findEscrowPartySecretSignatures(terms, dictionary, party);
468
+ if (buyerSecretBWs.length === 0) {
469
+ console.log(`${getLogPrefix2(party)}: No BoundWitnesses supplied for ${partySecret}: ${terms[partySecret]}`);
470
+ return false;
471
+ }
472
+ const errors = await Promise.all(buyerSecretBWs.map((bw) => new BoundWitnessValidator(bw).validate()));
473
+ const validBoundWitnesses = errors.every((errors2) => errors2.length === 0);
474
+ if (!validBoundWitnesses) {
475
+ console.log(`${getLogPrefix2(party)}: Invalid BoundWitnesses supplied for ${partySecret}: ${terms[partySecret]}`);
476
+ return false;
477
+ }
478
+ return true;
479
+ };
480
+ };
481
+
436
482
  // src/Escrow/validators/common/TemporalValidators/validateWithinWindow.ts
437
483
  var validateWithinWindow = (value, exp, nbf = Date.now()) => {
438
484
  if (value.nbf === void 0 || value.nbf > nbf) return false;
@@ -454,7 +500,7 @@ var getEscrowAgentAllowedValidator = (allowedEscrowAgent) => {
454
500
 
455
501
  // src/Escrow/validators/escrow/appraisal.ts
456
502
  import { assertEx } from "@xylabs/assert";
457
- import { isBoundWitnessWithMeta } from "@xyo-network/boundwitness-model";
503
+ import { isBoundWitnessWithMeta as isBoundWitnessWithMeta2 } from "@xyo-network/boundwitness-model";
458
504
  import { isHashLeaseEstimateWithSources } from "@xyo-network/diviner-hash-lease";
459
505
  var name2 = "EscrowTerms.appraisal";
460
506
  var appraisalsExistValidator = (terms) => {
@@ -472,7 +518,7 @@ var getAppraisalsFromValidAuthoritiesValidator = (dictionary) => {
472
518
  const appraisalBWsValid = Object.fromEntries(
473
519
  appraisals.map((hash) => [hash, []])
474
520
  );
475
- for (const bw of Object.values(dictionary).filter(isBoundWitnessWithMeta)) {
521
+ for (const bw of Object.values(dictionary).filter(isBoundWitnessWithMeta2)) {
476
522
  for (const appraisal of appraisals) {
477
523
  if (bw.payload_hashes.includes(appraisal) && bw.addresses.some((address) => appraisalAuthorities.includes(address))) {
478
524
  appraisalBWsValid[appraisal].push(bw);
@@ -595,8 +641,6 @@ var buyerExistsValidator = (terms) => {
595
641
 
596
642
  // src/Escrow/validators/escrow/buyerSecret.ts
597
643
  import { assertEx as assertEx2 } from "@xylabs/assert";
598
- import { isBoundWitnessWithMeta as isBoundWitnessWithMeta2 } from "@xyo-network/boundwitness-model";
599
- import { BoundWitnessValidator } from "@xyo-network/boundwitness-validator";
600
644
  var name6 = "EscrowTerms.buyerSecret";
601
645
  var buyerSecretExistsValidator = (terms) => {
602
646
  const buyerSecret = terms.buyerSecret;
@@ -617,22 +661,7 @@ var getBuyerSecretSuppliedValidator = (dictionary) => {
617
661
  };
618
662
  };
619
663
  var getBuyerSecretSignedValidator = (dictionary) => {
620
- return async (terms) => {
621
- const buyer = assertEx2(terms.buyer, () => `${name6}: No buyer: ${terms.buyer}`);
622
- const buyerSecret = assertEx2(terms.buyerSecret, () => `${name6}: No buyerSecret: ${terms.buyerSecret}`);
623
- const buyerSecretBWs = Object.values(dictionary).filter(isBoundWitnessWithMeta2).filter((bw) => bw.payload_hashes.includes(buyerSecret)).filter((bw) => buyer.every((buyerAddress) => bw.addresses.includes(buyerAddress)));
624
- if (buyerSecretBWs.length === 0) {
625
- console.log(`${name6}: No BoundWitnesses supplied for buyerSecret: ${buyerSecret}`);
626
- return false;
627
- }
628
- const errors = await Promise.all(buyerSecretBWs.map((bw) => new BoundWitnessValidator(bw).validate()));
629
- const validBoundWitnesses = errors.every((errors2) => errors2.length === 0);
630
- if (!validBoundWitnesses) {
631
- console.log(`${name6}: Invalid BoundWitnesses supplied for buyerSecret: ${buyerSecret}`);
632
- return false;
633
- }
634
- return true;
635
- };
664
+ return getPartySecretSignedValidator(dictionary, "buyer");
636
665
  };
637
666
 
638
667
  // src/Escrow/validators/escrow/nbfExp.ts
@@ -682,8 +711,6 @@ var sellerExistsValidator = (terms) => {
682
711
 
683
712
  // src/Escrow/validators/escrow/sellerSecret.ts
684
713
  import { assertEx as assertEx3 } from "@xylabs/assert";
685
- import { isBoundWitnessWithMeta as isBoundWitnessWithMeta3 } from "@xyo-network/boundwitness-model";
686
- import { BoundWitnessValidator as BoundWitnessValidator2 } from "@xyo-network/boundwitness-validator";
687
714
  var name9 = "EscrowTerms.sellerSecret";
688
715
  var sellerSecretExistsValidator = (terms) => {
689
716
  const sellerSecret = terms.sellerSecret;
@@ -704,22 +731,7 @@ var getSellerSecretSuppliedValidator = (dictionary) => {
704
731
  };
705
732
  };
706
733
  var getSellerSecretSignedValidator = (dictionary) => {
707
- return async (terms) => {
708
- const seller = assertEx3(terms.seller, () => `${name9}: No seller: ${terms.seller}`);
709
- const sellerSecret = assertEx3(terms.sellerSecret, () => `${name9}: No sellerSecret: ${terms.sellerSecret}`);
710
- const sellerSecretBWs = Object.values(dictionary).filter(isBoundWitnessWithMeta3).filter((bw) => bw.payload_hashes.includes(sellerSecret)).filter((bw) => seller.every((sellerAddress) => bw.addresses.includes(sellerAddress)));
711
- if (sellerSecretBWs.length === 0) {
712
- console.log(`${name9}: No BoundWitnesses supplied for sellerSecret: ${sellerSecret}`);
713
- return false;
714
- }
715
- const errors = await Promise.all(sellerSecretBWs.map((bw) => new BoundWitnessValidator2(bw).validate()));
716
- const validBoundWitnesses = errors.every((errors2) => errors2.length === 0);
717
- if (!validBoundWitnesses) {
718
- console.log(`${name9}: Invalid BoundWitnesses supplied for sellerSecret: ${sellerSecret}`);
719
- return false;
720
- }
721
- return true;
722
- };
734
+ return getPartySecretSignedValidator(dictionary, "seller");
723
735
  };
724
736
 
725
737
  // src/Payment/Instrument/Card/Payload.ts
@@ -860,6 +872,7 @@ export {
860
872
  createConditionForRequiredBuyer,
861
873
  createEscrowIntent,
862
874
  createEscrowIntentWithSecret,
875
+ findEscrowPartySecretSignatures,
863
876
  getAppraisalAuthoritiesAllowedValidator,
864
877
  getAppraisalsForAllAssetsValidator,
865
878
  getAppraisalsFromValidAuthoritiesValidator,
@@ -869,6 +882,7 @@ export {
869
882
  getEscrowAgentAllowedValidator,
870
883
  getEscrowSecret,
871
884
  getNbfExpValidator,
885
+ getPartySecretSignedValidator,
872
886
  getPaymentAuthoritiesAllowedValidator,
873
887
  getSellerSecretSignedValidator,
874
888
  getSellerSecretSuppliedValidator,