UNPKG

@neardefi/shade-agent-js

Version:

This library is intended to be used in conjunction with the [shade agent template](https://github.com/NearDeFi/shade-agent-template/).

28 lines (25 loc) 1.1 kB
import * as nearAPI from 'near-api-js'; declare const contractId: string; declare const networkId: "testnet" | "mainnet"; declare function setKey(accountId: string, secretKey: string): void; declare function getDevAccountKeyPair(): typeof nearAPI.utils.key_pair.KeyPair; declare function getImplicit(pubKeyStr: string): string; declare function getAccount(id?: string): typeof nearAPI.Account; declare function getCurrentAccountId(): string; declare function getBalance(accountId: string): Promise<{ available: string; }>; declare function contractView({ accountId, contractId, methodName, args, }: { accountId?: string; contractId?: string; methodName: string; args?: any; }): Promise<any>; declare function contractCall({ accountId, contractId, methodName, args, attachedDeposit, }: { accountId?: string; contractId?: string; methodName: string; args?: any; attachedDeposit?: string; }): Promise<any>; export { contractCall, contractId, contractView, getAccount, getBalance, getCurrentAccountId, getDevAccountKeyPair, getImplicit, networkId, setKey };