@rarimo/providers-near
Version:
Features of the Rarimo SDK that provide access to wallets and the ability to interact with them on the NEAR blockchain.
23 lines (22 loc) • 1.08 kB
TypeScript
import type { NearTransactionResponse, ProviderProxy, TransactionRequestBody, TransactionResponse } from '@rarimo/provider';
import { ProviderEventBus, Providers } from '@rarimo/provider';
import type { Chain, ChainId } from '@rarimo/shared';
export declare class NearProvider extends ProviderEventBus implements ProviderProxy {
#private;
/**
* @description In most cases, instead of using this constructor, pass the NearProvider class to {@link @rarimo/provider!createProvider}.
*/
constructor();
static get providerType(): Providers;
get isConnected(): boolean;
get chainId(): ChainId | undefined;
get address(): string | undefined;
init(): Promise<void>;
switchChain(chainId: ChainId): Promise<void>;
connect(): Promise<void>;
disconnect(): Promise<void>;
getHashFromTxResponse(txResponse: NearTransactionResponse): string;
getTxUrl(chain: Chain, txHash: string): string;
getAddressUrl(chain: Chain, address: string): string;
signAndSendTx(txRequestBody: TransactionRequestBody): Promise<TransactionResponse>;
}