@daostack/client › Globals › Token
- Token
+ new Token(id
: Address, context
: Arc): Token
Defined in token.ts:87
Parameters:
Name | Type |
---|---|
id |
Address |
context |
Arc |
Returns: Token
• address: string
Defined in token.ts:87
• context: Arc
Defined in token.ts:89
• id: Address
Defined in token.ts:89
▸ allowance(owner
: Address, spender
: Address): Observable‹BN›
Defined in token.ts:185
Parameters:
Name | Type |
---|---|
owner |
Address |
spender |
Address |
Returns: Observable‹BN›
▸ approveForStaking(spender
: Address, amount
: BN): IOperationObservable‹ITransactionUpdate‹any››
Defined in token.ts:226
Parameters:
Name | Type |
---|---|
spender |
Address |
amount |
BN |
Returns: IOperationObservable‹ITransactionUpdate‹any››
▸ balanceOf(owner
: string): Observable‹BN›
Defined in token.ts:133
Parameters:
Name | Type |
---|---|
owner |
string |
Returns: Observable‹BN›
▸ contract(mode?
: undefined | "readonly"): any
Defined in token.ts:128
Parameters:
Name | Type |
---|---|
mode? |
undefined | "readonly" |
Returns: any
▸ mint(beneficiary
: Address, amount
: BN): IOperationObservable‹ITransactionUpdate‹any››
Defined in token.ts:212
Parameters:
Name | Type |
---|---|
beneficiary |
Address |
amount |
BN |
Returns: IOperationObservable‹ITransactionUpdate‹any››
▸ state(apolloQueryOptions
: IApolloQueryOptions): Observable‹ITokenState›
Defined in token.ts:97
Parameters:
Name | Type | Default |
---|---|---|
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹ITokenState›
▸ transfer(beneficiary
: Address, amount
: BN): IOperationObservable‹ITransactionUpdate‹any››
Defined in token.ts:219
Parameters:
Name | Type |
---|---|
beneficiary |
Address |
amount |
BN |
Returns: IOperationObservable‹ITransactionUpdate‹any››
▸ 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