///
import { KeyPair } from "@near-js/crypto";
import { JsonRpcProvider } from "@near-js/providers";
import type { Signer } from "arbundles";
import BigNumber from "bignumber.js";
import type { TokenConfig, Tx } from "../../common/types";
import { BaseNodeToken } from "./base";
import { SignedTransaction } from "@near-js/transactions";
export default class NearConfig extends BaseNodeToken {
protected keyPair: KeyPair;
protected providerInstance?: JsonRpcProvider;
protected IrysUrl: string;
constructor(config: TokenConfig & {
IrysUrl: string;
});
protected getProvider(): Promise;
/**
* NEAR wants both the sender ID and tx Hash, so we have to concatenate to keep with the interface.
* @param txId assumes format senderID:txHash
*/
getTx(txId: string): Promise;
/**
* address = accountID
* @param owner // assumed to be the "ed25519:" header + b58 encoded key
*/
ownerToAddress(owner: any): string;
sign(data: Uint8Array): Promise;
getSigner(): Signer;
verify(pub: any, data: Uint8Array, signature: Uint8Array): Promise;
getCurrentHeight(): Promise;
/**
* NOTE: assumes only operation is transfer
* @param _amount
* @param _to
* @returns
*/
getFee(_amount: BigNumber.Value, _to?: string): Promise;
sendTx(data: SignedTransaction): Promise;
createTx(amount: BigNumber.Value, to: string, _fee?: string): Promise<{
tx: SignedTransaction;
txId: undefined;
}>;
getPublicKey(): string | Buffer;
ready(): Promise;
}