Package tbdex.sdk.resources
Class Offering
-
- All Implemented Interfaces:
public final class OfferingRepresents an Offering resource in the tbDEX protocol.
An Offering is created by a PFI to define the exchange parameters, such as payin/payout details, exchange rates, required credentials, and cancellation policies.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classOffering.Companion
-
Field Summary
Fields Modifier and Type Field Description private final ResourceMetadatametadataprivate final OfferingDatadataprivate final Stringsignaturepublic final static Offering.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final ResourceMetadatagetMetadata()Metadata about the resource, including sender and resource type. final OfferingDatagetData()The details of the offering, including payin/payout methods, required claims, and cancellation. final StringgetSignature()The signature verifying the authenticity and integrity of the Offering resource. final StringtoJsonString()Serializes the Offering resource to a JSON string. final Unitsign(BearerDid bearerDid)Signs the Offering resource using the provided Bearer DID. final Unitverify()Verifies the Offering resource's signature and validity. -
-
Method Detail
-
getMetadata
final ResourceMetadata getMetadata()
Metadata about the resource, including sender and resource type.
-
getData
final OfferingData getData()
The details of the offering, including payin/payout methods, required claims, and cancellation.
-
getSignature
final String getSignature()
The signature verifying the authenticity and integrity of the Offering resource.
-
toJsonString
final String toJsonString()
Serializes the Offering resource to a JSON string.
- Returns:
The serialized JSON string of the Offering resource.
-
sign
final Unit sign(BearerDid bearerDid)
Signs the Offering resource using the provided Bearer DID.
- Parameters:
bearerDid- The Bearer DID used to sign the Offering resource.
-
-
-
-