@molpha/sdk 0.2.0-dev-20261007162054 → 0.2.0-dev-20261008064918
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/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -680,7 +680,17 @@ function validateSuppliedTerms(terms, resource, assetDomain) {
|
|
|
680
680
|
return selectTerms(
|
|
681
681
|
{
|
|
682
682
|
x402Version: terms.x402Version,
|
|
683
|
-
accepts: [terms.requirements]
|
|
683
|
+
accepts: [terms.requirements],
|
|
684
|
+
// Re-validation rebuilds the terms from a bare envelope, so the source's payment-identifier
|
|
685
|
+
// declaration has to be carried through it or the supplied terms would pay without one.
|
|
686
|
+
...terms.paymentIdentifier ? {
|
|
687
|
+
extensions: {
|
|
688
|
+
"payment-identifier": {
|
|
689
|
+
info: terms.paymentIdentifier.info,
|
|
690
|
+
...terms.paymentIdentifier.schema !== void 0 ? { schema: terms.paymentIdentifier.schema } : {}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
} : {}
|
|
684
694
|
},
|
|
685
695
|
resource,
|
|
686
696
|
assetDomain
|