lisk-framework
Version:
Lisk blockchain application platform
37 lines (36 loc) • 1.29 kB
TypeScript
/// <reference types="node" />
import { MethodContext } from '../../../state_machine';
import { BaseStore, StoreGetter } from '../../base_store';
import { InteroperabilityMethod } from '../types';
export interface EscrowStoreData {
amount: bigint;
}
export declare const escrowStoreSchema: {
$id: string;
type: string;
required: string[];
properties: {
amount: {
dataType: string;
fieldNumber: number;
};
};
};
export declare class EscrowStore extends BaseStore<EscrowStoreData> {
schema: {
$id: string;
type: string;
required: string[];
properties: {
amount: {
dataType: string;
fieldNumber: number;
};
};
};
getKey(escrowChainID: Buffer, tokenID: Buffer): Buffer;
getOrDefault(ctx: StoreGetter, key: Buffer): Promise<EscrowStoreData>;
createDefaultAccount(context: StoreGetter, chainID: Buffer, tokenID: Buffer): Promise<void>;
addAmount(context: StoreGetter, chainID: Buffer, tokenID: Buffer, amount: bigint): Promise<void>;
deductEscrowAmountWithTerminate(context: MethodContext, interopMethod: InteroperabilityMethod, sendingChainID: Buffer, tokenID: Buffer, amount: bigint): Promise<void>;
}