NativeAssetSuperToken wraps the native asset of the network.

Hierarchy (view full)

Constructors

  • Parameters

    • options: ITokenOptions
    • settings: ITokenSettings
    • nativeTokenSymbol: string
    • nftAddresses: NFTAddresses

    Returns NativeAssetSuperToken

Properties

address: string
allowance: ((__namedParameters) => Promise<string>)

Returns the allowance the owner has granted the spender.

Type declaration

    • (__namedParameters): Promise<string>
    • Returns the allowance the owner has granted the spender.

      Parameters

      Returns Promise<string>

      the allowance amount

Param: owner

the owner who has allotted the allowance

Param: spender

the spender who has received the allowance

Param: providerOrSigner

a provider or signer for executing a web3 call

Returns

the allowance amount

approve: ((params) => Operation)

Approve receiver to spend amount tokens.

Type declaration

Param: receiver

The receiver approved.

Param: amount

The amount approved.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

approveSubscription: ((params) => Operation)

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

Type declaration

Param: indexId

The id of the index.

Param: publisher

The publisher address whose subscription 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.

balanceOf: ((__namedParameters) => Promise<string>)

Returns the ERC20 balanceOf the account, this can't be negative and will just display 0.

Type declaration

    • (__namedParameters): Promise<string>
    • Returns the ERC20 balanceOf the account, this can't be negative and will just display 0.

      Parameters

      Returns Promise<string>

      the token balance of account

Param: account

the account you would like to query

Param: providerOrSigner

a provider or signer for executing a web3 call

Returns

the token balance of account

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: subscriber

The subscriber address who you are claiming for.

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.

connectPool: ((params) => Operation)

Connects a pool to the contract.

Type declaration

Param: pool

The pool address.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

constantInflowNFTLogic?: string
constantInflowNFTProxy: default
constantOutflowNFTLogic?: string
constantOutflowNFTProxy: default
contract: ISuperToken
createFlow: ((params) => Operation)

Create a flow of the token of this class.

Type declaration

Param: receiver

The receiver of the flow.

Param: flowRate

The specified flow rate.

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.

createFlowByOperator: ((params) => Operation)

Create a flow as an operator

Type declaration

Param: flowRate

The specified flow rate.

Param: sender

The sender of the flow.

Param: receiver

The receiver of the flow.

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: 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.

createPool: ((params) => Promise<{
    createPoolTxn: ContractTransaction;
    pool: SuperfluidPoolClass;
}>)

Creates a new pool with the given token and admin.

Type declaration

    • (params): Promise<{
          createPoolTxn: ContractTransaction;
          pool: SuperfluidPoolClass;
      }>
    • Creates a new pool with the given token and admin.

      Parameters

      Returns Promise<{
          createPoolTxn: ContractTransaction;
          pool: SuperfluidPoolClass;
      }>

      The contract transaction and the pool address

Param: admin

The admin address.

Param: overrides

The transaction overrides.

Returns

The contract transaction and the pool address

decreaseAllowance: ((params) => Operation)

Decreases the allowance of spender by amount.

Type declaration

Param: spender

the spender

Param: amount

the amount to decrease the allowance by

Returns

An instance of Operation which can be executed or batched.

deleteFlow: ((params) => Operation)

Delete a flow of the token of this class.

Type declaration

Param: sender

The sender of the flow.

Param: receiver

The receiver of the flow.

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.

deleteFlowByOperator: ((params) => Operation)

Delete a flow as an operator.

Type declaration

Param: sender

The sender of the flow.

Param: receiver

The receiver of the flow.

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: 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.

disconnectPool: ((params) => Operation)

Disconnects a pool from the contract.

Type declaration

Param: pool

The pool address.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

distribute: ((params) => Operation)

Distributes amount of token to an index

Type declaration

Param: indexId

The id of the index.

Param: amount

The amount of tokens 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.

distributeFlow: ((params) => Operation)

Distributes the flow from the sender's account to the specified pool.

Type declaration

Param: from

The sender's address.

Param: pool

The pool address.

Param: requestedFlowRate

The requested flow rate.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

distributeWithGDA: ((params) => Operation)

Distributes funds from the sender's account to the specified pool.

Type declaration

Param: from

The sender's address.

Param: pool

The pool address.

Param: requestedAmount

The requested amount to distribute.

Param: userData

The user data.

Param: overrides

The transaction overrides.

Returns

The call agreement operation result.

downgrade: ((__namedParameters) => Operation)

Downgrade amount of a native asset super token to the underlying native asset.

Type declaration

    • (__namedParameters): Operation
    • Downgrade amount of a native asset super token to the underlying native asset.

      Parameters

      • __namedParameters: {
            amount: string;
            overrides?: Overrides & {
                from?: string;
            };
        }
        • amount: string
        • Optional overrides?: Overrides & {
              from?: string;
          }

      Returns Operation

      An instance of Operation which can be executed.

Param: amount

The amount to be upgraded.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed.

estimateDistributionActualAmount: ((params) => Promise<string>)

Estimates the distribution's actual amount for a specific token, sender, and pool.

Type declaration

    • (params): Promise<string>
    • Estimates the distribution's actual amount for a specific token, sender, and pool.

      Returns Promise<string>

      The actual amount that will be distributed.

Param: from

The sender address.

Param: pool

The pool address.

Param: requestedAmount

The requested amount.

Param: providerOrSigner

A provider or signer object

Returns

The actual amount that will be distributed.

estimateFlowDistributionActualFlowRate: ((params) => Promise<FlowDistributionActualFlowRateData>)

Estimates the flow distribution's actual flow rate for a specific token, sender, and pool.

Type declaration

Param: from

The sender address.

Param: pool

The pool address.

Param: requestedFlowRate

The requested flow rate.

Param: providerOrSigner

A provider or signer object

Returns

The flow distribution's actual flow rate and the total distribution flow rate for the pool.

getAccountFlowInfo: ((params) => Promise<IWeb3FlowInfo>)

Get the flow info of an account (net flow).

Type declaration

Param: account

the account we're querying

Param: providerOrSigner

a provider or signer object

Returns

Web3 Flow info object

getFlow: ((params) => Promise<IWeb3FlowInfo>)

Get the details of a flow.

Type declaration

Param: sender

the sender of the flow

Param: receiver

the receiver of the flow

Param: providerOrSigner

a provider or signer object

Returns

Web3 Flow info object

getFlowOperatorData: ((params) => Promise<IWeb3FlowOperatorData>)

Get flow operator data.

Type declaration

Param: sender

the sender

Param: flowOperator

the flowOperator

Param: providerOrSigner

a provider or signer object

Returns

Web3 Flow info object

getFlowOperatorDataByID: ((params) => Promise<IWeb3FlowOperatorData>)

Get flow operator data using the flowOperatorId.

Type declaration

Param: flowOperatorId

The keccak256 hash of encoded string "flowOperator", sender and flowOperator

Param: providerOrSigner

a provider or signer object

Returns

Web3 Flow info object

getFlowRate: ((params) => Promise<string>)

Retrieves the flow rate for a specific token, sender, and pool.

Type declaration

    • (params): Promise<string>
    • Retrieves the flow rate for a specific token, sender, and pool.

      Returns Promise<string>

      The flow rate from the sender to the pool for the token.

Param: from

The sender address.

Param: pool

The pool address.

Param: providerOrSigner

A provider or signer object

Returns

The flow rate from the sender to the pool for the token.

getGDANetFlow: ((params) => Promise<string>)

Retrieves the net flow for a specific token and account.

Type declaration

    • (params): Promise<string>
    • Retrieves the net flow for a specific token and account.

      Returns Promise<string>

      The net flow of the account for the token.

Param: account

The account address.

Param: providerOrSigner

A provider or signer object

Returns

The net flow of the account for the token.

getGovernanceParameters: ((providerOrSigner) => Promise<IWeb3GovernanceParams>)

Type declaration

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

Get the details of an Index.

Type declaration

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

getNetFlow: ((params) => Promise<string>)

Get the net flow of an account.

Type declaration

    • (params): Promise<string>
    • Get the net flow of an account.

      Returns Promise<string>

      Web3 Flow info object

Param: account

the account we're querying

Param: providerOrSigner

a provider or signer object

Returns

Web3 Flow info object

getPoolAdjustmentFlowInfo: ((params) => Promise<PoolAdjustmentFlowInfo>)

Retrieves the pool adjustment flow information for a specific pool.

Type declaration

Param: poolAddress

The address of the pool.

Param: providerOrSigner

A provider or signer object

Returns

The recipient of the pool adjustment flow, the flow hash and the rate of the adjustment flow.

getPoolAdjustmentFlowRate: ((params) => Promise<string>)

Retrieves the pool adjustment flow rate for a specific token and pool.

Type declaration

    • (params): Promise<string>
    • Retrieves the pool adjustment flow rate for a specific token and pool.

      Returns Promise<string>

      The pool adjustment flow rate for the token and pool.

Param: pool

The pool address.

Param: providerOrSigner

A provider or signer object

Returns

The pool adjustment flow rate for the token and pool.

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

Get the details of a Subscription.

Type declaration

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

governance: Governance
increaseAllowance: ((params) => Operation)

Increases the allowance of spender by amount.

Type declaration

Param: spender

the spender

Param: amount

the amount to increase the allowance by

Returns

An instance of Operation which can be executed or batched.

isMemberConnected: ((params) => Promise<boolean>)

Checks if a member is connected to a specific pool.

Type declaration

    • (params): Promise<boolean>
    • Checks if a member is connected to a specific pool.

      Parameters

      Returns Promise<boolean>

      Whether the member is connected to the pool.

Param: pool

The pool address.

Param: member

The member address.

Param: providerOrSigner

A provider or signer object

Returns

Whether the member is connected to the pool.

isPool: ((params) => Promise<boolean>)

Checks if a given token and account form a pool.

Type declaration

    • (params): Promise<boolean>
    • Checks if a given token and account form a pool.

      Parameters

      Returns Promise<boolean>

      Whether the account is a pool for the token.

Param: account

The account address.

Param: providerOrSigner

A provider or signer object

Returns

Whether the account is a pool for the token.

name: ((providerOrSigner) => Promise<string>)

Returns the token name

Type declaration

    • (providerOrSigner): Promise<string>
    • Returns the token name

      Parameters

      Returns Promise<string>

      the token name

Param: providerOrSigner

a provider or signer for executing a web3 call

Returns

the token name

nativeTokenSymbol: string
options: ITokenOptions
realtimeBalanceOf: ((__namedParameters) => Promise<IWeb3RealTimeBalanceOf>)

Returns the real time balance of address.

Type declaration

Param: account

the target address

Param: timestamp

the timestamp you'd like to see the data

Param: providerOrSigner

a provider or signer for executing a web3 call

Returns

real time balance of data

revokeSubscription: ((params) => Operation)

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

Type declaration

Param: indexId

The id of the index.

Param: publisher

The index publisher address you want to revoke for the subscriber.

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.

send: ((params) => Operation)

Send amount tokens to recipient from transaction signer.

Type declaration

Param: recipient

the recipient of the tokens

Param: amount

the amount of tokens to send

Param: userData

Extra user data provided.

settings: ITokenSettings
symbol: ((providerOrSigner) => Promise<string>)

Returns the token symbol

Type declaration

    • (providerOrSigner): Promise<string>
    • Returns the token symbol

      Parameters

      Returns Promise<string>

      the token symbol

Param: providerOrSigner

a provider or signer for executing a web3 call

Returns

the token symbol

totalSupply: ((providerOrSigner) => Promise<string>)

Returns the total supply of the token.

Type declaration

    • (providerOrSigner): Promise<string>
    • Returns the total supply of the token.

      Parameters

      Returns Promise<string>

      the total supply of the token

Param: providerOrSigner

a provider or signer for executing a web3 call

Returns

the total supply of the token

transfer: ((params) => Operation)

Transfer receiver amount tokens.

Type declaration

Param: receiver

The receiver of the transfer.

Param: amount

The amount to be transferred.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

transferFrom: ((params) => Operation)

Transfer from sender to receiver amount tokens.

Type declaration

Param: sender

The sender of the transfer.

Param: receiver

The receiver of the transfer.

Param: amount

The amount to be transferred.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed or batched.

underlyingToken?: ERC20Token
updateFlow: ((params) => Operation)

Update a flow of the token of this class.

Type declaration

Param: receiver

The receiver of the flow.

Param: flowRate

The specified flow rate.

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.

updateFlowByOperator: ((params) => Operation)

Update a flow as an operator.

Type declaration

Param: flowRate

The specified flow rate.

Param: sender

The sender of the flow.

Param: receiver

The receiver of the flow.

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 field of an index.

Type declaration

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

      Returns Operation

      An instance of Operation which can be executed or batched.

      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: 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.

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

updateSubscriptionUnits: ((params) => Operation)

Updates the units allocated to a Subscription.

Type declaration

Param: indexId

The id 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.

upgrade: ((__namedParameters) => Operation)

Upgrade amount of a network's native asset to its SuperToken.

Type declaration

    • (__namedParameters): Operation
    • Upgrade amount of a network's native asset to its SuperToken.

      Parameters

      • __namedParameters: {
            amount: string;
            overrides?: Overrides & {
                from?: string;
            };
        }
        • amount: string
        • Optional overrides?: Overrides & {
              from?: string;
          }

      Returns Operation

      An instance of Operation which can be executed.

Param: amount

The amount to be upgraded.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed.

upgradeTo: ((__namedParameters) => Operation)

Upgrade amount of a network's native asset to its SuperToken to to address.

Type declaration

    • (__namedParameters): Operation
    • Upgrade amount of a network's native asset to its SuperToken to to address.

      Parameters

      • __namedParameters: {
            amount: string;
            overrides?: Overrides & {
                from?: string;
            };
            to: string;
        }
        • amount: string
        • Optional overrides?: Overrides & {
              from?: string;
          }
        • to: string

      Returns Operation

      An instance of Operation which can be executed.

Param: amount

The amount to be upgraded.

Param: to

The destination of the upgraded native asset super tokens.

Param: overrides

ethers overrides object for more control over the transaction sent.

Returns

An instance of Operation which can be executed.

create: ((options) => Promise<_sdkCore.SuperToken>)

Type declaration

Accessors

  • get nativeAssetContract(): ISETH
  • Returns ISETH

Methods

Generated using TypeDoc