modules
@bosonprotocol/common / Exports
@bosonprotocol/common
Table of contents
Namespaces
Enumerations
Interfaces
Type Aliases
- AnyMetadata
- AuthTokenStruct
- ConditionStruct
- ContractAddresses
- CreateGroupArgs
- CreateOfferArgs
- CreateSellerArgs
- DisputeResolutionTermsStruct
- DisputeResolverStruct
- EnvironmentType
- GroupStruct
- Lens
- LensContracts
- Log
- MetaTxConfig
- MetadataStorage
- MetadataType
- OfferDatesStruct
- OfferDurationsStruct
- OfferStruct
- OptInToDisputeResolverUpdateArgs
- OptInToSellerUpdateArgs
- ProtocolConfig
- SellerStruct
- TransactionReceipt
- TransactionRequest
- TransactionResponse
- UpdateSellerArgs
- VoucherInitValuesStruct
Variables
Functions
Type Aliases
AnyMetadata
Ƭ AnyMetadata: _AnyMetadata
Defined in
AuthTokenStruct
Ƭ AuthTokenStruct: Object
Type declaration
| Name | Type |
|---|---|
tokenId | BigNumberish |
tokenType | number |
Defined in
ConditionStruct
Ƭ ConditionStruct: Object
Type declaration
| Name | Type |
|---|---|
maxCommits | BigNumberish |
method | number |
threshold | BigNumberish |
tokenAddress | string |
tokenId | BigNumberish |
tokenType | number |
Defined in
ContractAddresses
Ƭ ContractAddresses: Object
Type declaration
| Name | Type |
|---|---|
protocolDiamond | string |
testErc1155? | string |
testErc20? | string |
testErc721? | string |
Defined in
CreateGroupArgs
Ƭ CreateGroupArgs: ConditionStruct & { offerIds: BigNumberish[] }
Defined in
CreateOfferArgs
Ƭ CreateOfferArgs: Object
Type declaration
| Name | Type |
|---|---|
agentId | BigNumberish |
buyerCancelPenalty | BigNumberish |
disputePeriodDurationInMS | BigNumberish |
disputeResolverId | BigNumberish |
exchangeToken | string |
metadataHash | string |
metadataUri | string |
price | BigNumberish |
quantityAvailable | BigNumberish |
resolutionPeriodDurationInMS | BigNumberish |
sellerDeposit | BigNumberish |
validFromDateInMS | BigNumberish |
validUntilDateInMS | BigNumberish |
voucherRedeemableFromDateInMS | BigNumberish |
voucherRedeemableUntilDateInMS | BigNumberish |
voucherValidDurationInMS? | BigNumberish |
Defined in
CreateSellerArgs
Ƭ CreateSellerArgs: Object
Type declaration
| Name | Type |
|---|---|
admin | string |
authTokenId | BigNumberish |
authTokenType | number |
clerk | string |
contractUri | string |
operator | string |
royaltyPercentage | BigNumberish |
treasury | string |
Defined in
DisputeResolutionTermsStruct
Ƭ DisputeResolutionTermsStruct: Object
Type declaration
| Name | Type |
|---|---|
buyerEscalationDeposit | BigNumberish |
disputeResolverId | BigNumberish |
escalationResponsePeriod | BigNumberish |
feeAmount | BigNumberish |
Defined in
DisputeResolverStruct
Ƭ DisputeResolverStruct: Object
Type declaration
| Name | Type |
|---|---|
active | boolean |
admin | string |
clerk | string |
escalationResponsePeriod | BigNumberish |
id | BigNumberish |
metadataUri | string |
operator | string |
treasury | string |
Defined in
EnvironmentType
Ƭ EnvironmentType: "local" | "testing" | "staging" | "production"
Defined in
GroupStruct
Ƭ GroupStruct: Object
Type declaration
| Name | Type |
|---|---|
id | BigNumberish |
offerIds | BigNumberish[] |
sellerId | BigNumberish |
Defined in
Lens
Ƭ Lens: LensContracts & { apiLink?: string ; ipfsGateway?: string }
Defined in
LensContracts
Ƭ LensContracts: Object
Type declaration
| Name | Type |
|---|---|
LENS_HUB_CONTRACT? | string |
LENS_PERIPHERY_CONTRACT? | string |
LENS_PROFILES_CONTRACT_ADDRESS? | string |
LENS_PROFILES_CONTRACT_PARTIAL_ABI? | string |
Defined in
Log
Ƭ Log: Object
Type declaration
| Name | Type |
|---|---|
data | string |
topics | string[] |
Defined in
src/types/web3-lib-adapter.ts:3
MetaTxConfig
Ƭ MetaTxConfig: Object
Type declaration
| Name | Type |
|---|---|
apiIds | Record<string, Record<string, string>> |
apiKey | string |
relayerUrl | string |
Defined in
MetadataStorage
Ƭ MetadataStorage: _MetadataStorage
Defined in
MetadataType
Ƭ MetadataType: _MetadataType
Defined in
OfferDatesStruct
Ƭ OfferDatesStruct: Object
Type declaration
| Name | Type |
|---|---|
validFrom | BigNumberish |
validUntil | BigNumberish |
voucherRedeemableFrom | BigNumberish |
voucherRedeemableUntil | BigNumberish |
Defined in
OfferDurationsStruct
Ƭ OfferDurationsStruct: Object
Type declaration
| Name | Type |
|---|---|
disputePeriod | BigNumberish |
resolutionPeriod | BigNumberish |
voucherValid | BigNumberish |
Defined in
OfferStruct
Ƭ OfferStruct: Object
Type declaration
| Name | Type |
|---|---|
buyerCancelPenalty | BigNumberish |
exchangeToken | string |
id | BigNumberish |
metadataHash | string |
metadataUri | string |
price | BigNumberish |
quantityAvailable | BigNumberish |
sellerDeposit | BigNumberish |
sellerId | BigNumberish |
voided | boolean |
Defined in
OptInToDisputeResolverUpdateArgs
Ƭ OptInToDisputeResolverUpdateArgs: Object
Type declaration
| Name | Type |
|---|---|
fieldsToUpdate | { admin?: boolean ; clerk?: boolean ; operator?: boolean } |
fieldsToUpdate.admin? | boolean |
fieldsToUpdate.clerk? | boolean |
fieldsToUpdate.operator? | boolean |
id | BigNumberish |
Defined in
OptInToSellerUpdateArgs
Ƭ OptInToSellerUpdateArgs: Object
Type declaration
| Name | Type |
|---|---|
fieldsToUpdate | { admin?: boolean ; authToken?: boolean ; clerk?: boolean ; operator?: boolean } |
fieldsToUpdate.admin? | boolean |
fieldsToUpdate.authToken? | boolean |
fieldsToUpdate.clerk? | boolean |
fieldsToUpdate.operator? | boolean |
id | BigNumberish |
Defined in
ProtocolConfig
Ƭ ProtocolConfig: Object
Type declaration
| Name | Type |
|---|---|
chainId | number |
contracts | ContractAddresses |
envName | EnvironmentType |
getTxExplorerUrl | undefined | (txHash?: string, isAddress?: boolean) => string |
ipfsMetadataUrl | string |
jsonRpcUrl | string |
lens | Lens |
metaTx? | Partial<MetaTxConfig> |
nativeCoin | undefined | { decimals: string ; name: string ; symbol: string } |
subgraphUrl | string |
theGraphIpfsUrl? | string |
Defined in
SellerStruct
Ƭ SellerStruct: Object
Type declaration
| Name | Type |
|---|---|
active | boolean |
admin | string |
authTokenId | BigNumberish |
authTokenType | number |
clerk | string |
id | BigNumberish |
operator | string |
treasury | string |
voucherCloneAddress | string |
Defined in
TransactionReceipt
Ƭ TransactionReceipt: Object
Type declaration
| Name | Type |
|---|---|
effectiveGasPrice | BigNumberish |
from | string |
logs | Log[] |
status? | number |
to | string |
transactionHash | string |
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
| Name | Type |
|---|---|
hash | string |
wait | (confirmations?: number) => Promise<TransactionReceipt> |
Defined in
src/types/web3-lib-adapter.ts:18
UpdateSellerArgs
Ƭ UpdateSellerArgs: { id: BigNumberish } & Omit<CreateSellerArgs, "contractUri" | "royaltyPercentage">
Defined in
VoucherInitValuesStruct
Ƭ VoucherInitValuesStruct: Object
Type declaration
| Name | Type |
|---|---|
contractURI | string |
royaltyPercentage | BigNumberish |
Defined in
Variables
AuthTokenType
• Const AuthTokenType: Object
Type declaration
| Name | Type |
|---|---|
CUSTOM | number |
ENS | number |
LENS | number |
NONE | number |
Defined in
DisputeResolverUpdateFields
• Const DisputeResolverUpdateFields: Object
Type declaration
| Name | Type |
|---|---|
admin | number |
clerk | number |
operator | number |
Defined in
SellerUpdateFields
• Const SellerUpdateFields: Object
Type declaration
| Name | Type |
|---|---|
admin | number |
authToken | number |
clerk | number |
operator | number |
Defined in
defaultConfigs
• Const defaultConfigs: ProtocolConfig[]
Defined in
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
| Name | Type |
|---|---|
envName | EnvironmentType |
Returns
Default config.