Skip to main content

offers

@bosonprotocol/core-sdk / Exports / offers

Namespace: offers

Table of contents

Namespaces

Enumerations

Classes

Type Aliases

Variables

Functions

Type Aliases

AdditionalOfferMetadata

Ƭ AdditionalOfferMetadata: Object

Type declaration

NameType
disputeResolverContactMethodstring
escalationDepositBigNumberish
escalationResponsePeriodInSecBigNumberish
returnPeriodInDaysnumber
sellerContactMethodstring
sellerTradingNamestring

Defined in

src/offers/renderContractualAgreement.ts:16


BaseOfferData

Ƭ BaseOfferData: Object

Type declaration

NameType
agentIdBigNumberish
buyerCancelPenaltyBigNumberish
disputePeriodDurationInMSBigNumberish
disputeResolverIdBigNumberish
exchangeTokenstring
metadataHashstring
metadataUristring
priceBigNumberish
quantityAvailableBigNumberish
resolutionPeriodDurationInMSBigNumberish
sellerDepositBigNumberish
validFromDateInMSBigNumberish
validUntilDateInMSBigNumberish
voucherRedeemableFromDateInMSBigNumberish
voucherRedeemableUntilDateInMSBigNumberish

Defined in

src/offers/renderContractualAgreement.ts:73


CreateOfferArgs

Ƭ CreateOfferArgs: Object

Type declaration

NameType
agentIdBigNumberish
buyerCancelPenaltyBigNumberish
disputePeriodDurationInMSBigNumberish
disputeResolverIdBigNumberish
exchangeTokenstring
metadataHashstring
metadataUristring
priceBigNumberish
quantityAvailableBigNumberish
resolutionPeriodDurationInMSBigNumberish
sellerDepositBigNumberish
validFromDateInMSBigNumberish
validUntilDateInMSBigNumberish
voucherRedeemableFromDateInMSBigNumberish
voucherRedeemableUntilDateInMSBigNumberish
voucherValidDurationInMS?BigNumberish

Defined in

node_modules/@bosonprotocol/common/dist/cjs/types/offers.d.ts:2


TemplateRenderingData

Ƭ TemplateRenderingData: CreateOfferArgs & AdditionalOfferMetadata & { buyerCancelPenaltyValue: string ; escalationDepositValue: string ; exchangeTokenSymbol: string ; msecToDay: () => void ; priceValue: string ; secToDay: () => void ; sellerDepositValue: string ; toISOString: () => void }

Defined in

src/offers/renderContractualAgreement.ts:25

Variables

baseOfferDataSchema

Const baseOfferDataSchema: yup.SchemaOf<BaseOfferData>

Defined in

src/offers/renderContractualAgreement.ts:55


baseOfferMetadataSchema

Const baseOfferMetadataSchema: yup.SchemaOf<AdditionalOfferMetadata>

Defined in

src/offers/renderContractualAgreement.ts:91


validation

Const validation: Object

Type declaration

NameType
createOfferArgsSchematypeof createOfferArgsSchema

Defined in

src/offers/index.ts:11

Functions

getOfferStatus

getOfferStatus(offer): OfferState

Parameters

NameType
offerOfferFieldsFragment

Returns

OfferState

Defined in

src/offers/getOfferStatus.ts:10


prepareRenderingData

prepareRenderingData(offerData, offerMetadata, tokenInfo): Promise<TemplateRenderingData>

Parameters

NameType
offerDataCreateOfferArgs
offerMetadataAdditionalOfferMetadata
tokenInfoITokenInfo

Returns

Promise<TemplateRenderingData>

Defined in

src/offers/renderContractualAgreement.ts:207


renderContractualAgreement

renderContractualAgreement(template, offerData, offerMetadata, tokenInfo): Promise<string>

Parameters

NameType
templatestring
offerDataCreateOfferArgs
offerMetadataAdditionalOfferMetadata
tokenInfoITokenInfo

Returns

Promise<string>

Defined in

src/offers/renderContractualAgreement.ts:264


renderContractualAgreementForOffer

renderContractualAgreementForOffer(existingOfferData): Promise<string>

Parameters

NameType
existingOfferDataOfferFieldsFragment

Returns

Promise<string>

Defined in

src/offers/renderContractualAgreement.ts:281