UNPKG

dev3-sdk

Version:

SDK for interacting with the 0xDev3 platform.

36 lines (35 loc) 2.66 kB
import { ContractCallAction } from './actions/ContractCallAction'; import { ContractDeployAction } from './actions/ContractDeployAction'; import { NativeSendRequestAction } from './actions/NativeSendRequestAction'; import { TokenSendRequestAction } from './actions/TokenSendRequestAction'; import { WalletAuthorizationAction } from './actions/WalletAuthorizationAction'; import { Contract } from './contracts/Contract'; import { ContractManifest } from './contracts/ContractManifest'; import { CreateWalletAuthorizationRequest, EncodedFunctionOutput, EncodedFunctionParameter, ReadFromContractResult } from './types'; import * as ExecEnv from '../execenv/modal'; import { ContractArbitraryCallAction } from "./actions/ContractArbitraryCallAction"; export declare class Dev3SDK { static attach(apiKey: string, projectId: string, baseApiUrl?: string, identityApiUrl?: string): Dev3SDK; constructor(apiKey: string, projectId: string, baseApiUrl?: string, identityApiUrl?: string); authorizeWallet(options: CreateWalletAuthorizationRequest): Promise<WalletAuthorizationAction>; contractArbitraryCall(options: { to: string; from: string; data?: string; value?: string; }): Promise<ContractArbitraryCallAction>; getManifests(contractTags?: string[], contractImplements?: string[]): Promise<ContractManifest[]>; getManifestById(id: string): Promise<ContractManifest>; getContracts(ids?: string[], deployedOnly?: boolean, contractTags?: string[], contractImplements?: string[]): Promise<Contract[]>; getContractByAlias(alias: string): Promise<Contract>; getContractById(id: string): Promise<Contract>; deleteContractById(id: string): Promise<void>; getContractCallById(id: string): Promise<ContractCallAction>; getContractDeployAction(id: string): Promise<ContractDeployAction>; readContract(contractAddress: string, functionName: string, functionParams: EncodedFunctionParameter[], outputParams: EncodedFunctionOutput[]): Promise<ReadFromContractResult>; readContractWithRawData(contractAddress: string, functionCallData: string, outputParams: EncodedFunctionOutput[]): Promise<ReadFromContractResult>; writeContract(contractAddress: string, functionName: string, functionParams: EncodedFunctionParameter[], ethAmount: string): Promise<ContractCallAction>; requestTokens(toAddress: string, token: string, amount: string, fromAddress?: string): Promise<TokenSendRequestAction>; requestNativeCoins(toAddress: string, amount: string, fromAddress?: string): Promise<NativeSendRequestAction>; present(actionUrl: string): Promise<ExecEnv.SupportedActionType>; }