@0xcert/ethereum-value-ledger
Version:
Value ledger module for currency management on the Ethereum blockchain.
20 lines (19 loc) • 1.16 kB
TypeScript
import { GenericProvider, Mutation, MutationEventSignature } from '@0xcert/ethereum-generic-provider';
import { ValueLedgerBase, ValueLedgerDeployRecipe, ValueLedgerInfo, ValueLedgerTransferRecipe } from '@0xcert/scaffold';
export declare class ValueLedger implements ValueLedgerBase {
protected _id: string;
protected _provider: GenericProvider;
constructor(provider: GenericProvider, id: string);
static deploy(provider: GenericProvider, recipe: ValueLedgerDeployRecipe): Promise<Mutation>;
static getInstance(provider: GenericProvider, id: string): ValueLedger;
get id(): string;
get provider(): GenericProvider;
getApprovedValue(accountId: string, spenderId: string): Promise<string>;
getBalance(accountId: string): Promise<string>;
getInfo(): Promise<ValueLedgerInfo>;
isApprovedValue(value: string, accountId: string, spenderId: string): Promise<boolean>;
approveValue(value: string, accountId: string): Promise<Mutation>;
disapproveValue(accountId: string): Promise<Mutation>;
transferValue(recipe: ValueLedgerTransferRecipe): Promise<Mutation>;
getContext(): MutationEventSignature[];
}