near-typechain
Version:
37 lines (36 loc) • 1.39 kB
TypeScript
import { Account } from 'near-api-js';
import { FinalExecutionOutcome } from 'near-api-js/lib/providers';
export declare type NearBigint = number | string | bigint;
export declare class CallOverrides {
gas?: NearBigint;
}
export declare class CallOverridesPayable {
attachedDeposit?: NearBigint;
}
export declare abstract class NearContractBase {
private _contractId;
private _signer?;
constructor(contractId: string, signerAccount?: Account);
get contractId(): string;
get signer(): Account | undefined;
abstract connect(account: Account): NearContractBase;
protected functionCall<TArgs extends object = object>({ methodName, args, overrides, }: {
methodName: string;
args?: TArgs;
overrides?: CallOverrides & CallOverridesPayable;
}): Promise<FinalExecutionOutcome>;
protected functionView<TArgs extends object = object, TReturn = unknown>({ methodName, args, }: {
methodName: string;
args?: TArgs;
}): Promise<TReturn>;
}
export declare class NearContract extends NearContractBase {
constructor(contractId: string, signerAccount: Account);
connect(account: Account): NearContract;
call: {
[key: string]: (args: object, overrides?: CallOverrides) => Promise<FinalExecutionOutcome>;
};
view: {
[key: string]: (args: object) => Promise<FinalExecutionOutcome>;
};
}