@@ -173,6 +173,10 @@ func (m *Manifest) Save() error {
173173type Offer struct {
174174 // ID is the unique offer identifier used by the scheduler.
175175 ID string `yaml:"id" json:"id"`
176+ // Note contains one-line notification such as a discount or a warning.
177+ Note string `yaml:"note" json:"note"`
178+ // Description contains longer offer-specific description such as intended applications.
179+ Description string `yaml:"description" json:"description"`
176180 // Resources are the offered resources.
177181 Resources Resources `yaml:"resources" json:"resources"`
178182 // Payment is the payment for this offer.
@@ -205,6 +209,12 @@ const schedulerMetadataPrefix = "net.oasis.scheduler."
205209// SchedulerMetadataOfferKey is the metadata key used for the offer name.
206210const SchedulerMetadataOfferKey = schedulerMetadataPrefix + "offer"
207211
212+ // NoteMetadataKey is the metadata key for offer-specific one-line notification such as a discount or a warning.
213+ const NoteMetadataKey = "net.oasis.note"
214+
215+ // DescriptionMetadataKey is the metadata key for longer offer-specific description such as intended applications.
216+ const DescriptionMetadataKey = "net.oasis.description"
217+
208218// GetMetadata derives metadata from the attributes defined in the offer and combines it with the
209219// specified metadata.
210220func (o * Offer ) GetMetadata () map [string ]string {
@@ -221,6 +231,13 @@ func (o *Offer) GetMetadata() map[string]string {
221231 meta [schedulerMetadataPrefix + md .name ] = md .value
222232 }
223233
234+ if o .Description != "" {
235+ meta [DescriptionMetadataKey ] = o .Description
236+ }
237+ if o .Note != "" {
238+ meta [NoteMetadataKey ] = o .Note
239+ }
240+
224241 maps .Copy (meta , o .Metadata )
225242 return meta
226243}
@@ -250,15 +267,11 @@ const (
250267
251268// Payment is payment configuration for an offer.
252269type Payment struct {
253- Native * struct {
254- Denomination string `yaml:"denomination" json:"denomination"`
255- Terms map [string ]string `yaml:"terms" json:"terms"`
256- } `yaml:"native,omitempty" json:"native,omitempty"`
257-
258- EvmContract * struct {
259- Address string `json:"address"`
260- Data string `json:"data"`
261- } `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"`
262275}
263276
264277// Validate validates the payment configuration.
@@ -336,6 +349,24 @@ func (p *Payment) AsDescriptor(pt *config.ParaTime) (*roflmarket.Payment, error)
336349 return & dsc , nil
337350}
338351
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+
339370// Resources are describe the offered resources.
340371type Resources struct {
341372 // TEE is the type of TEE hardware.
0 commit comments