UNPKG

@okcontract/sdk

Version:

One-stop-shop permissionless SDK for building any blockchain frontend

21 lines (20 loc) 1.37 kB
import type { AnyCell, CellArray, MapCell, SheetProxy } from "@okcontract/cells"; import { type CacheQuery } from "@okcontract/coredata"; import { type Address, type ChainAddress, type ChainType, type LocalRPCSubscriber, type Network } from "@okcontract/multichain"; import type { LocalSubscriber } from "@scv/cache"; import type { OKCore } from "./coreExecution"; import type { AnyAddress } from "./types"; export declare const AddressToChainAddress: <N extends Network>(core: OKCore, local: LocalRPCSubscriber, proxy: SheetProxy, chain: AnyCell<ChainType>, addr: AnyCell<Address<N>>) => MapCell<ChainAddress<N>, false>; /** * isKnownAddress returns a query from any given address. * @deprecated cellify */ export declare const isKnownAddress: (core: OKCore, str: string, chain: ChainType) => Promise<string>; /** * retrieveAddress retrieves an address (as string) or keeps the existing value. * @param ch chain * @param addr * @returns */ export declare const retrieveAddress: <T>(proxy: SheetProxy, local: LocalSubscriber<CacheQuery>, ch: AnyCell<ChainType>, value: AnyCell<T>) => MapCell<T extends AnyAddress ? Address<Network> : T, false>; export declare const retrieveAllAddresses: (proxy: SheetProxy, local: LocalSubscriber<CacheQuery>, ch: AnyCell<ChainType>, l: CellArray<unknown>) => MapCell<import("@okcontract/cells").ValueCell<unknown>[], false>;