@@ -267,15 +267,11 @@ const (
267267
268268// Payment is payment configuration for an offer.
269269type Payment struct {
270- Native * struct {
271- Denomination string `yaml:"denomination" json:"denomination"`
272- Terms map [string ]string `yaml:"terms" json:"terms"`
273- } `yaml:"native,omitempty" json:"native,omitempty"`
274-
275- EvmContract * struct {
276- Address string `json:"address"`
277- Data string `json:"data"`
278- } `yaml:"evm,omitempty" json:"evm,omitempty"`
270+ // Native contains native payment terms.
271+ Native * NativePayment `yaml:"native,omitempty" json:"native,omitempty"`
272+
273+ // EvmContract contains payment terms defined in a smart contract.
274+ EvmContract * EVMContractPayment `yaml:"evm,omitempty" json:"evm,omitempty"`
279275}
280276
281277// Validate validates the payment configuration.
@@ -353,6 +349,24 @@ func (p *Payment) AsDescriptor(pt *config.ParaTime) (*roflmarket.Payment, error)
353349 return & dsc , nil
354350}
355351
352+ // NativePayment is payment configuration for native tokens.
353+ type NativePayment struct {
354+ // Denomination is the native token denomination.
355+ Denomination string `yaml:"denomination,omitempty" json:"denomination,omitempty"`
356+
357+ // Terms are payment terms in form of Term => amount in decimal.
358+ Terms map [string ]string `yaml:"terms" json:"terms"`
359+ }
360+
361+ // EVMContractPayment is payment configuration for EVM contract-based payments.
362+ type EVMContractPayment struct {
363+ // Address is hex-encoded address without leading 0x.
364+ Address string `json:"address"`
365+
366+ // Data is arbitrary Base-64 encoded payment information.
367+ Data string `json:"data"`
368+ }
369+
356370// Resources are describe the offered resources.
357371type Resources struct {
358372 // TEE is the type of TEE hardware.
0 commit comments