dev3-sdk
Version:
SDK for interacting with the 0xDev3 platform.
44 lines (43 loc) • 5.49 kB
TypeScript
import { AxiosResponse } from 'axios';
import { AddressBookEntries, AddressBookEntry, AssetSendRequest, AssetSendRequests, AttachTxHashRequest, ContractArbitraryCallRequest, ContractDeploymentRequest, ContractDeploymentRequests, CreateAddressBookEntryRequest, CreateAssetSendRequest, CreateContractArbitraryCallRequestWithContractAddress, CreateContractArbitraryCallRequestWithContractAlias, CreateContractArbitraryCallRequestWithContractId, CreateContractDeploymentRequest, CreateFunctionCallRequestWithContractAddress, CreateFunctionCallRequestWithContractAlias, CreateFunctionCallRequestWithContractId, CreateWalletAuthorizationRequest, DeleteAddressBookEntryRequest, DeployableContract, DeployableContractsRequest, DeployableContractsResult, EstimateContractArbitraryCallRequestGasCostWithContractAddress, EstimateContractArbitraryCallRequestGasCostWithContractAlias, EstimateContractArbitraryCallRequestGasCostWithContractId, EstimateGasCostResponse, FetchAddressBookEntryByAliasRequest, FunctionCallRequest, GasPriceResponse, GetJwtByMessageRequest, GetJwtRequest, GetPayload, GetPayloadRequest, JwtToken, ProjectInfoRequest, RawDataReadFromContractByAddressRequest, RawDataReadFromContractByAliasRequest, RawDataReadFromContractByIdRequest, ReadFromContractByAddressRequest, ReadFromContractByAliasRequest, ReadFromContractByIdRequest, ReadFromContractResult, UpdateAddressBookEntryRequest, WalletAuthorizationRequest, WalletAuthorizationRequests } from '../types';
import { HttpClient } from './http-client';
export declare class MainApi extends HttpClient {
private static classInstance?;
private constructor();
static init(baseURL: string, identityBaseURL: string, apiKey: string, projectId: string): void;
static instance(): MainApi;
createWalletAuthorizationRequest(request: CreateWalletAuthorizationRequest): Promise<WalletAuthorizationRequest>;
fetchProject(): Promise<ProjectInfoRequest>;
fetchWalletAuthorizationRequestById(id: string): Promise<WalletAuthorizationRequest>;
fetchWalletAuthorizationRequests(): Promise<WalletAuthorizationRequests>;
createContractDeploymentRequest(request: CreateContractDeploymentRequest): Promise<ContractDeploymentRequest>;
fetchContractDeploymentRequestById(id: string): Promise<ContractDeploymentRequest>;
fetchContractDeploymentRequestByAlias(alias: string): Promise<ContractDeploymentRequest>;
fetchContractDeploymentRequests(contractIds: string[], deployedOnly: boolean, contracTags: string[], contractImplements: string[]): Promise<ContractDeploymentRequests>;
deleteContractDeploymentRequestById(id: string): Promise<void>;
createFunctionCallRequest(request: CreateFunctionCallRequestWithContractId | CreateFunctionCallRequestWithContractAlias | CreateFunctionCallRequestWithContractAddress): Promise<FunctionCallRequest>;
fetchFunctionCallRequestById(id: string): Promise<FunctionCallRequest>;
fetchFunctionCallRequests(deployedContractId?: string, contractAddress?: string): Promise<FunctionCallRequest[]>;
readContract(request: ReadFromContractByAddressRequest | ReadFromContractByAliasRequest | ReadFromContractByIdRequest | RawDataReadFromContractByAddressRequest | RawDataReadFromContractByAliasRequest | RawDataReadFromContractByIdRequest): Promise<ReadFromContractResult>;
attachTxHashForFunctionCall(request: AttachTxHashRequest): Promise<AxiosResponse>;
fetchDeployableContracts(request: DeployableContractsRequest): Promise<DeployableContractsResult>;
fetchDeployableContractById(id: string): Promise<DeployableContract>;
getPayload(request?: GetPayloadRequest): Promise<GetPayload>;
getJwt(request: GetJwtRequest): Promise<JwtToken>;
getJwtByMessage(request: GetJwtByMessageRequest): Promise<JwtToken>;
createAddressBookEntry(request: CreateAddressBookEntryRequest, jwt: JwtToken): Promise<AddressBookEntry>;
updateAddressBookEntry(request: UpdateAddressBookEntryRequest, jwt: JwtToken): Promise<AddressBookEntry>;
deleteAddressBookEntry(request: DeleteAddressBookEntryRequest, jwt: JwtToken): Promise<void>;
fetchAddressBookEntryByAlias(request: FetchAddressBookEntryByAliasRequest, jwt: JwtToken): Promise<AddressBookEntry>;
fetchAddressBookEntries(forWalletAddress: string, jwt: JwtToken): Promise<AddressBookEntries>;
createAssetSendRequest(request: CreateAssetSendRequest): Promise<AssetSendRequest>;
fetchAssetSendRequest(id: string): Promise<AssetSendRequest>;
fetchAllAssetSendRequests(): Promise<AssetSendRequests>;
fetchAssetSendRequestsBySender(senderAddress: string): Promise<AssetSendRequests>;
fetchAssetSendRequestsByRecipient(recipientAddress: string): Promise<AssetSendRequests>;
createContractArbitraryCallRequest(request: CreateContractArbitraryCallRequestWithContractId | CreateContractArbitraryCallRequestWithContractAlias | CreateContractArbitraryCallRequestWithContractAddress): Promise<ContractArbitraryCallRequest>;
estimateArbitraryCallGasCost(request: EstimateContractArbitraryCallRequestGasCostWithContractId | EstimateContractArbitraryCallRequestGasCostWithContractAlias | EstimateContractArbitraryCallRequestGasCostWithContractAddress): Promise<EstimateGasCostResponse>;
getGasPrice(): Promise<GasPriceResponse>;
fetchContractArbitraryCallRequestById(id: string): Promise<ContractArbitraryCallRequest>;
fetchContractArbitraryCallRequests(deployedContractId?: string, contractAddress?: string): Promise<ContractArbitraryCallRequest[]>;
}