Instant Distribution Agreement V1 Helper Class

Description

A helper class to interact with the IDAV1 contract.

Hierarchy

  • default
    • InstantDistributionAgreementV1

Constructors

Properties

_getCallAgreementOperation: ((callAgreementOperation, forwarderPopulatedTransactionPromise?, shouldUseCallAgreement?) => Operation)

Returns the desired Operation based on shouldUseCallAgreement.

Type declaration

    • (callAgreementOperation, forwarderPopulatedTransactionPromise?, shouldUseCallAgreement?): Operation
    • Returns the desired Operation based on shouldUseCallAgreement.

      Parameters

      • callAgreementOperation: Operation

        the host.callAgreement created Operation

      • Optional forwarderPopulatedTransactionPromise: Promise<PopulatedTransaction>

        the populated forwarder transaction promise

      • Optional shouldUseCallAgreement: boolean

        whether or not to use host.callAgreement

      Returns Operation

Param: shouldUseCallAgreement

whether or not to use host.callAgreement

Param: callAgreementOperation

the host.callAgreement created Operation

Param: forwarderPopulatedTransactionPromise

the populated forwarder transaction promise

approveSubscription: ((params) => Operation)

Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.

Type declaration

    • (params): Operation
    • Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.

      Parameters

      Returns Operation

      An instance of Operation which can be executed or batched.

Param: indexId

The id of the index.

Param: superToken

The superToken of the index.

Param: publisher

The publisher of the index you want to approve.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

claim: ((params) => Operation)

Claims any pending tokens allocated to the Subscription (unapproved).

Type declaration

    • (params): Operation
    • Claims any pending tokens allocated to the Subscription (unapproved).

      Parameters

      Returns Operation

      An instance of Operation which can be executed or batched.

Param: indexId

The id of the index.

Param: superToken

The superToken of the index.

Param: subscriber

The subscriber address whose subscription you want to delete.

Param: publisher

The publisher address of the index you are targeting.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

createIndex: ((params) => Operation)

Creates an IDA Index.

Type declaration

Param: indexId

The id of the index.

Param: superToken

The address of the index superToken.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

deleteSubscription: ((params) => Operation)

Deletes a Subscription by setting the units allocated to the Subscriber to 0.

Type declaration

    • (params): Operation
    • Deletes a Subscription by setting the units allocated to the Subscriber to 0.

      Parameters

      Returns Operation

      An instance of Operation which can be executed or batched.

Param: indexId

The id of the index.

Param: superToken

The superToken of the index.

Param: subscriber

The subscriber address whose subscription you want to delete.

Param: publisher

The publisher address of the index you are targeting.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

distribute: ((params) => Operation)

Distributes amount of superToken to an index

Type declaration

    • (params): Operation
    • Distributes amount of superToken to an index

      Parameters

      Returns Operation

      An instance of Operation which can be executed or batched.

Param: indexId

The id of the index.

Param: amount

The amount of superToken to be distributed.

Param: superToken

The superToken to be distributed.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

getIndex: ((params) => Promise<IWeb3Index>)

Get the details of an Index.

Type declaration

Param: superToken

the superToken of the agreement

Param: publisher

the address of the publisher of the index

Param: indexId

the index id

Param: providerOrSigner

a provider or signer object

Returns

Web3 Index object

getSubscription: ((params) => Promise<IWeb3Subscription>)

Get the details of a Subscription.

Type declaration

Param: superToken

the superToken of the agreement

Param: publisher

the address of the publisher of the index

Param: indexId

the index id

Param: subscriber

the subscriber's address

Param: providerOrSigner

a provider or signer object

Returns

Web3 Subscription object

host: Host
revokeSubscription: ((params) => Operation)

Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributes.

Type declaration

    • (params): Operation
    • Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributes.

      Parameters

      Returns Operation

      An instance of Operation which can be executed or batched.

Param: indexId

The id of the index.

Param: superToken

The superToken of the index.

Param: subscriber

The subscriber address whose subscription you want to revoke.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

updateIndexValue: ((params) => Operation)

Updates the indexValue of an index.

Type declaration

    • (params): Operation
    • Updates the indexValue of an index.

      Parameters

      Returns Operation

      An instance of Operation which can be executed or batched.

      Description

      NOTE: It has the same effect as distribute, but is closer to the low level data structure of the index.

Description

NOTE: It has the same effect as distribute, but is closer to the low level data structure of the index.

Param: indexId

The id of the index.

Param: indexValue

The new indexValue.

Param: superToken

The superToken to be distributed.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

updateSubscriptionUnits: ((params) => Operation)

Updates the units allocated to a Subscription.

Type declaration

Param: indexId

The id of the index.

Param: superToken

The superToken of the index.

Param: subscriber

The subscriber address whose units you want to update.

Param: units

The amount of units you want to update to.

Param: userData

Extra user data provided.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

Generated using TypeDoc