@okcontract/sdk
Version:
One-stop-shop permissionless SDK for building any blockchain frontend
30 lines (29 loc) • 1.39 kB
TypeScript
import type { AnyCell, SheetProxy, ValueCell } from "@okcontract/cells";
import { type Chain, type ChainType, type StarkNetType, type StringAddress } from "@okcontract/multichain";
import type { SignedMessage } from "@scv/auth";
import { type OKConnector, type Transaction } from "./wallet";
export declare class ArgentConnector implements OKConnector<StarkNetType> {
readonly ID = "argent";
readonly Network: "strk";
readonly Account: AnyCell<StringAddress<StarkNetType>>;
readonly ChainId: ValueCell<bigint | null>;
readonly Chain: AnyCell<Chain>;
readonly Chains: AnyCell<Record<ChainType, Chain>>;
readonly Addresses: AnyCell<StringAddress<StarkNetType>[]>;
readonly id = "argent";
readonly name = "Argent";
readonly ready = true;
private _prov;
private readonly _wallet;
constructor(proxy: SheetProxy, chains: AnyCell<Record<ChainType, Chain>>);
connect(): Promise<{
account: StringAddress<StarkNetType>;
}>;
disconnect(): Promise<void>;
signMessage(input: string): Promise<`0x${string}`>;
switchChain?(id: ChainType): Promise<ChainType>;
signedMessage(Msg: string): Promise<SignedMessage>;
sendTransaction(tx: Transaction<StarkNetType>): Promise<`0x${string}`>;
addChain?(id: ChainType): Promise<ChainType>;
signTransaction?(tx: Transaction<StarkNetType>): Promise<`0x${string}`>;
}