Skip to content

Latest commit

 

History

History
213 lines (124 loc) · 5.59 KB

token.md

File metadata and controls

213 lines (124 loc) · 5.59 KB

@daostack/clientGlobalsToken

Class: Token

Hierarchy

  • Token

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Token(id: Address, context: Arc): Token

Defined in token.ts:87

Parameters:

Name Type
id Address
context Arc

Returns: Token

Properties

address

address: string

Defined in token.ts:87


context

context: Arc

Defined in token.ts:89


id

id: Address

Defined in token.ts:89

Methods

allowance

allowance(owner: Address, spender: Address): Observable‹BN›

Defined in token.ts:185

Parameters:

Name Type
owner Address
spender Address

Returns: Observable‹BN›


approveForStaking

approveForStaking(spender: Address, amount: BN): IOperationObservableITransactionUpdate‹any››

Defined in token.ts:226

Parameters:

Name Type
spender Address
amount BN

Returns: IOperationObservableITransactionUpdate‹any››


balanceOf

balanceOf(owner: string): Observable‹BN›

Defined in token.ts:133

Parameters:

Name Type
owner string

Returns: Observable‹BN›


contract

contract(mode?: undefined | "readonly"): any

Defined in token.ts:128

Parameters:

Name Type
mode? undefined | "readonly"

Returns: any


mint

mint(beneficiary: Address, amount: BN): IOperationObservableITransactionUpdate‹any››

Defined in token.ts:212

Parameters:

Name Type
beneficiary Address
amount BN

Returns: IOperationObservableITransactionUpdate‹any››


state

state(apolloQueryOptions: IApolloQueryOptions): Observable‹ITokenState

Defined in token.ts:97

Parameters:

Name Type Default
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹ITokenState


transfer

transfer(beneficiary: Address, amount: BN): IOperationObservableITransactionUpdate‹any››

Defined in token.ts:219

Parameters:

Name Type
beneficiary Address
amount BN

Returns: IOperationObservableITransactionUpdate‹any››


Static search

search(context: Arc, options: ITokenQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Token[]›

Defined in token.ts:52

Token.search(context, options) searches for token entities

Parameters:

Name Type Default Description
context Arc - an Arc instance that provides connection information
options ITokenQueryOptions {} the query options, cf. ITokenQueryOptions
apolloQueryOptions IApolloQueryOptions {} -

Returns: Observable‹Token[]›

an observable of Token objects