Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Adapter
    • MetahubAdapter

Index

Constructors

Properties

addressTranslator: AddressTranslator
contractResolver: ContractResolver

Methods

  • accountIdToAddress(accountId: AccountId): string
  • Parameters

    • accountId: AccountId

    Returns string

  • addressToAccountId(address: string): AccountId
  • Parameters

    • address: string

    Returns AccountId

  • addressToAssetType(address: string, namespace: string): AssetType
  • Parameters

    • address: string
    • namespace: string

    Returns AssetType

  • approveAllForListing(asset: Asset): Promise<ContractTransaction>
  • Approves Metahub to take any assets (from given collection) from lister account during listing process.

    Parameters

    • asset: Asset

      Some asset from requested for approval collection.

    Returns Promise<ContractTransaction>

  • approveForListing(asset: Asset): Promise<ContractTransaction>
  • Approves Metahub to take an asset from lister account during listing process.

    Parameters

    Returns Promise<ContractTransaction>

  • approveForRentalPayment(paymentToken: AssetType, amount: BigNumberish): Promise<ContractTransaction>
  • Sets payment token allowance. Allows Metahub to spend specified tokens to cover rental fees.

    Parameters

    • paymentToken: AssetType

      ERC20 payment token.

    • amount: BigNumberish

      Allowance amount.

    Returns Promise<ContractTransaction>

  • assetIdToAddress(assetId: AssetId): string
  • Parameters

    • assetId: AssetId

    Returns string

  • assetTypeToAddress(assetType: AssetType): string
  • Parameters

    • assetType: AssetType

    Returns string

  • balance(account: AccountId, token: AssetType): Promise<BigNumber>
  • Returns the amount of token, currently accumulated by the user.

    Parameters

    • account: AccountId

      The account to query the balance for.

    • token: AssetType

      The token in which the balance is nominated.

    Returns Promise<BigNumber>

  • Returns the list of user balances in various tokens.

    Parameters

    • account: AccountId

      The account to query the balance for.

    Returns Promise<AccountBalance[]>

  • decodeAgreementTerms(params: AgreementTermsStruct): AgreementTerms
  • Parameters

    • params: AgreementTermsStruct

    Returns AgreementTerms

  • decodeAsset(asset: AssetStructOutput): Asset
  • Parameters

    • asset: AssetStructOutput

    Returns Asset

  • encodeAsset(asset: Asset): AssetStruct
  • Parameters

    Returns AssetStruct

  • erc20AssetMetadata(assetType: AssetType): Promise<{ decimals: number; name: string; symbol: string }>
  • Parameters

    • assetType: AssetType

    Returns Promise<{ decimals: number; name: string; symbol: string }>

  • getChainId(): Promise<ChainId>
  • Returns Promise<ChainId>

  • isApprovedForListing(asset: Asset): Promise<boolean>
  • Checks whether the asset is approved for listing by the owner. Returns true if the asset can be listed, and false if the required approval is missing.

    Parameters

    Returns Promise<boolean>

  • optionalAccountIdToAddress(accountId?: AccountId): undefined | string
  • Parameters

    • Optional accountId: AccountId

    Returns undefined | string

  • paymentTokenAllowance(paymentToken: AssetType, payer: AccountId): Promise<BigNumber>
  • Returns current Metahub allowance in specified payment tokens for specific payer account.

    Parameters

    • paymentToken: AssetType

      ERC20 payment token.

    • payer: AccountId

      Payer account ID.

    Returns Promise<BigNumber>

  • supportedAssetCount(): Promise<BigNumber>
  • Returns the number of currently supported assets.

    Returns Promise<BigNumber>

    Asset count.

  • supportedAssets(offset: BigNumberish, limit: BigNumberish): Promise<AssetType[]>
  • Returns the list of all supported assets.

    Parameters

    • offset: BigNumberish

      Starting index.

    • limit: BigNumberish

      Max number of items.

    Returns Promise<AssetType[]>

  • universeBalance(universeId: BigNumberish, token: AssetType): Promise<BigNumber>
  • Returns the amount of token, currently accumulated by the universe.

    Parameters

    • universeId: BigNumberish

      The universe ID.

    • token: AssetType

      The token address.

    Returns Promise<BigNumber>

  • warperPresetFactory(): Promise<AccountId>
  • withdrawFunds(token: AssetType, amount: BigNumberish, to: AccountId): Promise<ContractTransaction>
  • Transfers the specific amount of token from a user balance to an arbitrary address.

    Parameters

    • token: AssetType

      The balance token.

    • amount: BigNumberish

      The amount to be withdrawn.

    • to: AccountId

      The payee account.

    Returns Promise<ContractTransaction>

  • withdrawUniverseFunds(universeId: BigNumberish, token: AssetType, amount: BigNumberish, to: AccountId): Promise<ContractTransaction>
  • Transfers the specific amount of token from a universe balance to an arbitrary address.

    Parameters

    • universeId: BigNumberish

      The universe ID.

    • token: AssetType

      The balance token.

    • amount: BigNumberish

      The amount to be withdrawn.

    • to: AccountId

      The payee account.

    Returns Promise<ContractTransaction>

Generated using TypeDoc