UNPKG

@stellar/stellar-sdk

Version:

A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.

26 lines (25 loc) 725 B
import { Server } from "../rpc"; /** * Types of contract data that can be fetched */ export type ContractData = { type: "wasm"; wasmBytes: Buffer; } | { type: "stellar-asset-contract"; }; /** * Errors that can occur during WASM fetching */ export declare class WasmFetchError extends Error { readonly cause?: Error | undefined; constructor(message: string, cause?: Error | undefined); } /** * Fetch WASM from network using WASM hash */ export declare function fetchFromWasmHash(wasmHash: string, rpcServer: Server): Promise<ContractData>; /** * Fetch WASM from network using contract ID */ export declare function fetchFromContractId(contractId: string, rpcServer: Server): Promise<ContractData>;