Skip to main content

modules

@bosonprotocol/common / Exports

@bosonprotocol/common

Table of contents

Namespaces

Enumerations

Interfaces

Type Aliases

Variables

Functions

Type Aliases

AnyMetadata

Ƭ AnyMetadata: _AnyMetadata

Defined in

src/types/index.ts:13


AuthTokenStruct

Ƭ AuthTokenStruct: Object

Type declaration

NameType
tokenIdBigNumberish
tokenTypenumber

Defined in

src/types/accounts.ts:70


ConditionStruct

Ƭ ConditionStruct: Object

Type declaration

NameType
maxCommitsBigNumberish
methodnumber
thresholdBigNumberish
tokenAddressstring
tokenIdBigNumberish
tokenTypenumber

Defined in

src/types/groups.ts:21


ContractAddresses

Ƭ ContractAddresses: Object

Type declaration

NameType
protocolDiamondstring
testErc1155?string
testErc20?string
testErc721?string

Defined in

src/types/configs.ts:1


CreateGroupArgs

Ƭ CreateGroupArgs: ConditionStruct & { offerIds: BigNumberish[] }

Defined in

src/types/groups.ts:30


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

src/types/offers.ts:3


CreateSellerArgs

Ƭ CreateSellerArgs: Object

Type declaration

NameType
adminstring
authTokenIdBigNumberish
authTokenTypenumber
clerkstring
contractUristring
operatorstring
royaltyPercentageBigNumberish
treasurystring

Defined in

src/types/accounts.ts:3


DisputeResolutionTermsStruct

Ƭ DisputeResolutionTermsStruct: Object

Type declaration

NameType
buyerEscalationDepositBigNumberish
disputeResolverIdBigNumberish
escalationResponsePeriodBigNumberish
feeAmountBigNumberish

Defined in

src/types/offers.ts:48


DisputeResolverStruct

Ƭ DisputeResolverStruct: Object

Type declaration

NameType
activeboolean
adminstring
clerkstring
escalationResponsePeriodBigNumberish
idBigNumberish
metadataUristring
operatorstring
treasurystring

Defined in

src/types/accounts.ts:80


EnvironmentType

Ƭ EnvironmentType: "local" | "testing" | "staging" | "production"

Defined in

src/types/configs.ts:8


GroupStruct

Ƭ GroupStruct: Object

Type declaration

NameType
idBigNumberish
offerIdsBigNumberish[]
sellerIdBigNumberish

Defined in

src/types/groups.ts:3


Lens

Ƭ Lens: LensContracts & { apiLink?: string ; ipfsGateway?: string }

Defined in

src/types/configs.ts:23


LensContracts

Ƭ LensContracts: Object

Type declaration

NameType
LENS_HUB_CONTRACT?string
LENS_PERIPHERY_CONTRACT?string
LENS_PROFILES_CONTRACT_ADDRESS?string
LENS_PROFILES_CONTRACT_PARTIAL_ABI?string

Defined in

src/types/configs.ts:16


Log

Ƭ Log: Object

Type declaration

NameType
datastring
topicsstring[]

Defined in

src/types/web3-lib-adapter.ts:3


MetaTxConfig

Ƭ MetaTxConfig: Object

Type declaration

NameType
apiIdsRecord<string, Record<string, string>>
apiKeystring
relayerUrlstring

Defined in

src/types/configs.ts:10


MetadataStorage

Ƭ MetadataStorage: _MetadataStorage

Defined in

src/types/index.ts:14


MetadataType

Ƭ MetadataType: _MetadataType

Defined in

src/types/index.ts:15


OfferDatesStruct

Ƭ OfferDatesStruct: Object

Type declaration

NameType
validFromBigNumberish
validUntilBigNumberish
voucherRedeemableFromBigNumberish
voucherRedeemableUntilBigNumberish

Defined in

src/types/offers.ts:35


OfferDurationsStruct

Ƭ OfferDurationsStruct: Object

Type declaration

NameType
disputePeriodBigNumberish
resolutionPeriodBigNumberish
voucherValidBigNumberish

Defined in

src/types/offers.ts:42


OfferStruct

Ƭ OfferStruct: Object

Type declaration

NameType
buyerCancelPenaltyBigNumberish
exchangeTokenstring
idBigNumberish
metadataHashstring
metadataUristring
priceBigNumberish
quantityAvailableBigNumberish
sellerDepositBigNumberish
sellerIdBigNumberish
voidedboolean

Defined in

src/types/offers.ts:22


OptInToDisputeResolverUpdateArgs

Ƭ OptInToDisputeResolverUpdateArgs: Object

Type declaration

NameType
fieldsToUpdate{ admin?: boolean ; clerk?: boolean ; operator?: boolean }
fieldsToUpdate.admin?boolean
fieldsToUpdate.clerk?boolean
fieldsToUpdate.operator?boolean
idBigNumberish

Defined in

src/types/accounts.ts:42


OptInToSellerUpdateArgs

Ƭ OptInToSellerUpdateArgs: Object

Type declaration

NameType
fieldsToUpdate{ admin?: boolean ; authToken?: boolean ; clerk?: boolean ; operator?: boolean }
fieldsToUpdate.admin?boolean
fieldsToUpdate.authToken?boolean
fieldsToUpdate.clerk?boolean
fieldsToUpdate.operator?boolean
idBigNumberish

Defined in

src/types/accounts.ts:26


ProtocolConfig

Ƭ ProtocolConfig: Object

Type declaration

NameType
chainIdnumber
contractsContractAddresses
envNameEnvironmentType
getTxExplorerUrlundefined | (txHash?: string, isAddress?: boolean) => string
ipfsMetadataUrlstring
jsonRpcUrlstring
lensLens
metaTx?Partial<MetaTxConfig>
nativeCoinundefined | { decimals: string ; name: string ; symbol: string }
subgraphUrlstring
theGraphIpfsUrl?string

Defined in

src/types/configs.ts:28


SellerStruct

Ƭ SellerStruct: Object

Type declaration

NameType
activeboolean
adminstring
authTokenIdBigNumberish
authTokenTypenumber
clerkstring
idBigNumberish
operatorstring
treasurystring
voucherCloneAddressstring

Defined in

src/types/accounts.ts:58


TransactionReceipt

Ƭ TransactionReceipt: Object

Type declaration

NameType
effectiveGasPriceBigNumberish
fromstring
logsLog[]
status?number
tostring
transactionHashstring

Defined in

src/types/web3-lib-adapter.ts:23


TransactionRequest

Ƭ TransactionRequest: Partial<{ data: string ; from: string ; gasLimit: BigNumberish ; gasPrice: BigNumberish ; nonce: number ; to: string ; value: BigNumberish }>

Defined in

src/types/web3-lib-adapter.ts:8


TransactionResponse

Ƭ TransactionResponse: Object

Type declaration

NameType
hashstring
wait(confirmations?: number) => Promise<TransactionReceipt>

Defined in

src/types/web3-lib-adapter.ts:18


UpdateSellerArgs

Ƭ UpdateSellerArgs: { id: BigNumberish } & Omit<CreateSellerArgs, "contractUri" | "royaltyPercentage">

Defined in

src/types/accounts.ts:14


VoucherInitValuesStruct

Ƭ VoucherInitValuesStruct: Object

Type declaration

NameType
contractURIstring
royaltyPercentageBigNumberish

Defined in

src/types/accounts.ts:75

Variables

AuthTokenType

Const AuthTokenType: Object

Type declaration

NameType
CUSTOMnumber
ENSnumber
LENSnumber
NONEnumber

Defined in

src/types/accounts.ts:51


DisputeResolverUpdateFields

Const DisputeResolverUpdateFields: Object

Type declaration

NameType
adminnumber
clerknumber
operatornumber

Defined in

src/types/accounts.ts:36


SellerUpdateFields

Const SellerUpdateFields: Object

Type declaration

NameType
adminnumber
authTokennumber
clerknumber
operatornumber

Defined in

src/types/accounts.ts:19


defaultConfigs

Const defaultConfigs: ProtocolConfig[]

Defined in

src/configs.ts:84

Functions

getDefaultConfig

getDefaultConfig(envName): ProtocolConfig

Returns default config values based on provided envName or chainId that can be used to instantiate a CoreSDK instance. The argument envName has a higher specificity than chainId.

Parameters

NameType
envNameEnvironmentType

Returns

ProtocolConfig

Default config.

Defined in

src/configs.ts:183