Skip to main content

ElvContracts

Constructor

new ElvContracts({
  configUrl,
  mainObjectId
})

Instantiate the ElvContract SDK

Parameters

NameTypeRequiredDescription
configUrlstring

The Content Fabric configuration URL

mainObjectIdstring

The top-level Eluvio Live object ID

ClaimerAddAuthAddr

ClaimerAddAuthAddr(address)

Call the method addAuthorizedAdr of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
addressstring

: the address to add to the list

ClaimerAllocate

ClaimerAllocate(
  address,
  amount,
  expirationDate
)

Call the method allocate of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
addressstring

: address to allocate

amountstring

: amount to allocate

expirationDatestring

: the expiration date of the new allocation

ClaimerBalanceOf

ClaimerBalanceOf(address)

Call the method getClaim of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
addressstring

: get the balance of this address

ClaimerBurn

ClaimerBurn(amount)

Call the method burn of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
amountstring

: amount to burn

ClaimerBurnOf

ClaimerBurnOf(address)

Call the method getBurn of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
addressstring

: get the burn balance of this address

ClaimerClaim

ClaimerClaim(amount)

Call the method claim of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
amountstring

: amount to claim

ClaimerClearAllocations

ClaimerClearAllocations(address)

Call the method clearAllocations of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
addressstring

: clear the allocations of this address

ClaimerListAllocations

ClaimerListAllocations(address)

First clear the list and then create a list by pushing all the allocations into it

Parameters

NameTypeRequiredDescription
addressstring

: list the allocations of this list

ClaimerRmAuthAddr

ClaimerRmAuthAddr(address)

Call the method rmAuthorizedAdr of the smart contract Claimer.sol

Parameters

NameTypeRequiredDescription
addressstring

: the address to remove from the list

CleanupObjects

CleanupObjects(
  objectAddr:,
  objectType:
)

cleanUp objects to remove references to dead objects

Parameters

NameTypeRequiredDescription
objectAddr:string

address of the object

objectType:string

object type (library | content_object | group | content_type)

DeleteLibrary

DeleteLibrary(libraryAddr:)

delete library and to remove references to dead objects for the signer and groups

Parameters

NameTypeRequiredDescription
libraryAddr:string

address of the library

ListContentObjects

ListContentObjects(objectAddr:)

list content objects for user or group address provided

Parameters

NameTypeRequiredDescription
objectAddr:string

address of the user or group

PaymentDeploy

PaymentDeploy(
  addresses,
  shares:
)

Deploy Payment contract (revenue splitter - commerce/Payment.sol)

Parameters

NameTypeRequiredDescription
addressesstring

: list of stakeholder addresses

shares:string

list of stakeholder shares, in the order of addresses

PaymentRelease

PaymentRelease(
  addr:,
  tokenContractAddress:,
  payeeAddress:
)

Retrieve funds from payment splitter contract, as a payee or for payee address provided

Parameters

NameTypeRequiredDescription
addr:string

address of the payment contract

tokenContractAddress:string

address of the token contract (ERC20)

payeeAddress:string

address of the payee

PaymentShow

PaymentShow(
  addr:,
  tokenContractAddress:
)

Show status of payment contract stakeholders

Parameters

NameTypeRequiredDescription
addr:string

address of the payment contract

tokenContractAddress:string

address of the token contract (ERC20)