pegasys-orchestrate
Version:
The PegaSys Orchestrate library provides convenient access to the Codefi Orchestrate API from applications written in server-side JavaScript
1,167 lines (977 loc) • 306 kB
TypeScript
import * as $protobuf from "protobufjs";
/** Namespace abi. */
export namespace abi {
/** Properties of a ContractId. */
interface IContractId {
/** ContractId registry */
registry?: (string|null);
/** ContractId name */
name?: (string|null);
/** ContractId tag */
tag?: (string|null);
}
/** Represents a ContractId. */
class ContractId implements IContractId {
/**
* Constructs a new ContractId.
* @param [properties] Properties to set
*/
constructor(properties?: abi.IContractId);
/** ContractId registry. */
public registry: string;
/** ContractId name. */
public name: string;
/** ContractId tag. */
public tag: string;
/**
* Creates a new ContractId instance using the specified properties.
* @param [properties] Properties to set
* @returns ContractId instance
*/
public static create(properties?: abi.IContractId): abi.ContractId;
/**
* Encodes the specified ContractId message. Does not implicitly {@link abi.ContractId.verify|verify} messages.
* @param message ContractId message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: abi.IContractId, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ContractId message, length delimited. Does not implicitly {@link abi.ContractId.verify|verify} messages.
* @param message ContractId message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: abi.IContractId, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ContractId message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ContractId
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): abi.ContractId;
/**
* Decodes a ContractId message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ContractId
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): abi.ContractId;
/**
* Verifies a ContractId message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a ContractId message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ContractId
*/
public static fromObject(object: { [k: string]: any }): abi.ContractId;
/**
* Creates a plain object from a ContractId message. Also converts values to other types if specified.
* @param message ContractId
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: abi.ContractId, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this ContractId to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a Contract. */
interface IContract {
/** Contract id */
id?: (abi.IContractId|null);
/** Contract abi */
abi?: (string|null);
/** Contract bytecode */
bytecode?: (string|null);
/** Contract methods */
methods?: (abi.IMethod[]|null);
/** Contract events */
events?: (abi.IEvent[]|null);
/** Contract deployedBytecode */
deployedBytecode?: (string|null);
}
/** Represents a Contract. */
class Contract implements IContract {
/**
* Constructs a new Contract.
* @param [properties] Properties to set
*/
constructor(properties?: abi.IContract);
/** Contract id. */
public id?: (abi.IContractId|null);
/** Contract abi. */
public abi: string;
/** Contract bytecode. */
public bytecode: string;
/** Contract methods. */
public methods: abi.IMethod[];
/** Contract events. */
public events: abi.IEvent[];
/** Contract deployedBytecode. */
public deployedBytecode: string;
/**
* Creates a new Contract instance using the specified properties.
* @param [properties] Properties to set
* @returns Contract instance
*/
public static create(properties?: abi.IContract): abi.Contract;
/**
* Encodes the specified Contract message. Does not implicitly {@link abi.Contract.verify|verify} messages.
* @param message Contract message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: abi.IContract, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Contract message, length delimited. Does not implicitly {@link abi.Contract.verify|verify} messages.
* @param message Contract message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: abi.IContract, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Contract message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Contract
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): abi.Contract;
/**
* Decodes a Contract message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Contract
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): abi.Contract;
/**
* Verifies a Contract message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Contract message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Contract
*/
public static fromObject(object: { [k: string]: any }): abi.Contract;
/**
* Creates a plain object from a Contract message. Also converts values to other types if specified.
* @param message Contract
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: abi.Contract, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Contract to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a Method. */
interface IMethod {
/** Method signature */
signature?: (string|null);
/** Method abi */
abi?: (string|null);
}
/** Represents a Method. */
class Method implements IMethod {
/**
* Constructs a new Method.
* @param [properties] Properties to set
*/
constructor(properties?: abi.IMethod);
/** Method signature. */
public signature: string;
/** Method abi. */
public abi: string;
/**
* Creates a new Method instance using the specified properties.
* @param [properties] Properties to set
* @returns Method instance
*/
public static create(properties?: abi.IMethod): abi.Method;
/**
* Encodes the specified Method message. Does not implicitly {@link abi.Method.verify|verify} messages.
* @param message Method message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: abi.IMethod, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Method message, length delimited. Does not implicitly {@link abi.Method.verify|verify} messages.
* @param message Method message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: abi.IMethod, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Method message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Method
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): abi.Method;
/**
* Decodes a Method message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Method
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): abi.Method;
/**
* Verifies a Method message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a Method message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Method
*/
public static fromObject(object: { [k: string]: any }): abi.Method;
/**
* Creates a plain object from a Method message. Also converts values to other types if specified.
* @param message Method
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: abi.Method, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Method to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an Event. */
interface IEvent {
/** Event signature */
signature?: (string|null);
/** Event abi */
abi?: (string|null);
}
/** Represents an Event. */
class Event implements IEvent {
/**
* Constructs a new Event.
* @param [properties] Properties to set
*/
constructor(properties?: abi.IEvent);
/** Event signature. */
public signature: string;
/** Event abi. */
public abi: string;
/**
* Creates a new Event instance using the specified properties.
* @param [properties] Properties to set
* @returns Event instance
*/
public static create(properties?: abi.IEvent): abi.Event;
/**
* Encodes the specified Event message. Does not implicitly {@link abi.Event.verify|verify} messages.
* @param message Event message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: abi.IEvent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Event message, length delimited. Does not implicitly {@link abi.Event.verify|verify} messages.
* @param message Event message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: abi.IEvent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an Event message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Event
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): abi.Event;
/**
* Decodes an Event message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Event
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): abi.Event;
/**
* Verifies an Event message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an Event message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Event
*/
public static fromObject(object: { [k: string]: any }): abi.Event;
/**
* Creates a plain object from an Event message. Also converts values to other types if specified.
* @param message Event
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: abi.Event, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this Event to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
}
/** Namespace common. */
export namespace common {
/** Properties of an AccountInstance. */
interface IAccountInstance {
/** AccountInstance chainId */
chainId?: (string|null);
/** AccountInstance account */
account?: (string|null);
}
/** Represents an AccountInstance. */
class AccountInstance implements IAccountInstance {
/**
* Constructs a new AccountInstance.
* @param [properties] Properties to set
*/
constructor(properties?: common.IAccountInstance);
/** AccountInstance chainId. */
public chainId: string;
/** AccountInstance account. */
public account: string;
/**
* Creates a new AccountInstance instance using the specified properties.
* @param [properties] Properties to set
* @returns AccountInstance instance
*/
public static create(properties?: common.IAccountInstance): common.AccountInstance;
/**
* Encodes the specified AccountInstance message. Does not implicitly {@link common.AccountInstance.verify|verify} messages.
* @param message AccountInstance message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: common.IAccountInstance, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified AccountInstance message, length delimited. Does not implicitly {@link common.AccountInstance.verify|verify} messages.
* @param message AccountInstance message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: common.IAccountInstance, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an AccountInstance message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns AccountInstance
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): common.AccountInstance;
/**
* Decodes an AccountInstance message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns AccountInstance
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): common.AccountInstance;
/**
* Verifies an AccountInstance message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates an AccountInstance message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns AccountInstance
*/
public static fromObject(object: { [k: string]: any }): common.AccountInstance;
/**
* Creates a plain object from an AccountInstance message. Also converts values to other types if specified.
* @param message AccountInstance
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: common.AccountInstance, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this AccountInstance to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
}
/** Namespace contractregistry. */
export namespace contractregistry {
/** Represents a ContractRegistry */
class ContractRegistry extends $protobuf.rpc.Service {
/**
* Constructs a new ContractRegistry service.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
*/
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
/**
* Creates new ContractRegistry service using the specified rpc implementation.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
* @returns RPC service. Useful where requests and/or responses are streamed.
*/
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ContractRegistry;
/**
* Calls RegisterContract.
* @param request RegisterContractRequest message or plain object
* @param callback Node-style callback called with the error, if any, and RegisterContractResponse
*/
public registerContract(request: contractregistry.IRegisterContractRequest, callback: contractregistry.ContractRegistry.RegisterContractCallback): void;
/**
* Calls RegisterContract.
* @param request RegisterContractRequest message or plain object
* @returns Promise
*/
public registerContract(request: contractregistry.IRegisterContractRequest): Promise<contractregistry.RegisterContractResponse>;
/**
* Calls DeregisterContract.
* @param request DeregisterContractRequest message or plain object
* @param callback Node-style callback called with the error, if any, and DeregisterContractResponse
*/
public deregisterContract(request: contractregistry.IDeregisterContractRequest, callback: contractregistry.ContractRegistry.DeregisterContractCallback): void;
/**
* Calls DeregisterContract.
* @param request DeregisterContractRequest message or plain object
* @returns Promise
*/
public deregisterContract(request: contractregistry.IDeregisterContractRequest): Promise<contractregistry.DeregisterContractResponse>;
/**
* Calls DeleteArtifact.
* @param request DeleteArtifactRequest message or plain object
* @param callback Node-style callback called with the error, if any, and DeleteArtifactResponse
*/
public deleteArtifact(request: contractregistry.IDeleteArtifactRequest, callback: contractregistry.ContractRegistry.DeleteArtifactCallback): void;
/**
* Calls DeleteArtifact.
* @param request DeleteArtifactRequest message or plain object
* @returns Promise
*/
public deleteArtifact(request: contractregistry.IDeleteArtifactRequest): Promise<contractregistry.DeleteArtifactResponse>;
/**
* Calls GetContract.
* @param request GetContractRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetContractResponse
*/
public getContract(request: contractregistry.IGetContractRequest, callback: contractregistry.ContractRegistry.GetContractCallback): void;
/**
* Calls GetContract.
* @param request GetContractRequest message or plain object
* @returns Promise
*/
public getContract(request: contractregistry.IGetContractRequest): Promise<contractregistry.GetContractResponse>;
/**
* Calls GetContractABI.
* @param request GetContractRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetContractABIResponse
*/
public getContractABI(request: contractregistry.IGetContractRequest, callback: contractregistry.ContractRegistry.GetContractABICallback): void;
/**
* Calls GetContractABI.
* @param request GetContractRequest message or plain object
* @returns Promise
*/
public getContractABI(request: contractregistry.IGetContractRequest): Promise<contractregistry.GetContractABIResponse>;
/**
* Calls GetContractBytecode.
* @param request GetContractRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetContractBytecodeResponse
*/
public getContractBytecode(request: contractregistry.IGetContractRequest, callback: contractregistry.ContractRegistry.GetContractBytecodeCallback): void;
/**
* Calls GetContractBytecode.
* @param request GetContractRequest message or plain object
* @returns Promise
*/
public getContractBytecode(request: contractregistry.IGetContractRequest): Promise<contractregistry.GetContractBytecodeResponse>;
/**
* Calls GetContractDeployedBytecode.
* @param request GetContractRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetContractDeployedBytecodeResponse
*/
public getContractDeployedBytecode(request: contractregistry.IGetContractRequest, callback: contractregistry.ContractRegistry.GetContractDeployedBytecodeCallback): void;
/**
* Calls GetContractDeployedBytecode.
* @param request GetContractRequest message or plain object
* @returns Promise
*/
public getContractDeployedBytecode(request: contractregistry.IGetContractRequest): Promise<contractregistry.GetContractDeployedBytecodeResponse>;
/**
* Calls GetCatalog.
* @param request GetCatalogRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetCatalogResponse
*/
public getCatalog(request: contractregistry.IGetCatalogRequest, callback: contractregistry.ContractRegistry.GetCatalogCallback): void;
/**
* Calls GetCatalog.
* @param request GetCatalogRequest message or plain object
* @returns Promise
*/
public getCatalog(request: contractregistry.IGetCatalogRequest): Promise<contractregistry.GetCatalogResponse>;
/**
* Calls GetTags.
* @param request GetTagsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetTagsResponse
*/
public getTags(request: contractregistry.IGetTagsRequest, callback: contractregistry.ContractRegistry.GetTagsCallback): void;
/**
* Calls GetTags.
* @param request GetTagsRequest message or plain object
* @returns Promise
*/
public getTags(request: contractregistry.IGetTagsRequest): Promise<contractregistry.GetTagsResponse>;
/**
* Calls GetMethodsBySelector.
* @param request GetMethodsBySelectorRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetMethodsBySelectorResponse
*/
public getMethodsBySelector(request: contractregistry.IGetMethodsBySelectorRequest, callback: contractregistry.ContractRegistry.GetMethodsBySelectorCallback): void;
/**
* Calls GetMethodsBySelector.
* @param request GetMethodsBySelectorRequest message or plain object
* @returns Promise
*/
public getMethodsBySelector(request: contractregistry.IGetMethodsBySelectorRequest): Promise<contractregistry.GetMethodsBySelectorResponse>;
/**
* Calls GetEventsBySigHash.
* @param request GetEventsBySigHashRequest message or plain object
* @param callback Node-style callback called with the error, if any, and GetEventsBySigHashResponse
*/
public getEventsBySigHash(request: contractregistry.IGetEventsBySigHashRequest, callback: contractregistry.ContractRegistry.GetEventsBySigHashCallback): void;
/**
* Calls GetEventsBySigHash.
* @param request GetEventsBySigHashRequest message or plain object
* @returns Promise
*/
public getEventsBySigHash(request: contractregistry.IGetEventsBySigHashRequest): Promise<contractregistry.GetEventsBySigHashResponse>;
/**
* Calls SetAccountCodeHash.
* @param request SetAccountCodeHashRequest message or plain object
* @param callback Node-style callback called with the error, if any, and SetAccountCodeHashResponse
*/
public setAccountCodeHash(request: contractregistry.ISetAccountCodeHashRequest, callback: contractregistry.ContractRegistry.SetAccountCodeHashCallback): void;
/**
* Calls SetAccountCodeHash.
* @param request SetAccountCodeHashRequest message or plain object
* @returns Promise
*/
public setAccountCodeHash(request: contractregistry.ISetAccountCodeHashRequest): Promise<contractregistry.SetAccountCodeHashResponse>;
}
namespace ContractRegistry {
/**
* Callback as used by {@link contractregistry.ContractRegistry#registerContract}.
* @param error Error, if any
* @param [response] RegisterContractResponse
*/
type RegisterContractCallback = (error: (Error|null), response?: contractregistry.RegisterContractResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#deregisterContract}.
* @param error Error, if any
* @param [response] DeregisterContractResponse
*/
type DeregisterContractCallback = (error: (Error|null), response?: contractregistry.DeregisterContractResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#deleteArtifact}.
* @param error Error, if any
* @param [response] DeleteArtifactResponse
*/
type DeleteArtifactCallback = (error: (Error|null), response?: contractregistry.DeleteArtifactResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getContract}.
* @param error Error, if any
* @param [response] GetContractResponse
*/
type GetContractCallback = (error: (Error|null), response?: contractregistry.GetContractResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getContractABI}.
* @param error Error, if any
* @param [response] GetContractABIResponse
*/
type GetContractABICallback = (error: (Error|null), response?: contractregistry.GetContractABIResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getContractBytecode}.
* @param error Error, if any
* @param [response] GetContractBytecodeResponse
*/
type GetContractBytecodeCallback = (error: (Error|null), response?: contractregistry.GetContractBytecodeResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getContractDeployedBytecode}.
* @param error Error, if any
* @param [response] GetContractDeployedBytecodeResponse
*/
type GetContractDeployedBytecodeCallback = (error: (Error|null), response?: contractregistry.GetContractDeployedBytecodeResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getCatalog}.
* @param error Error, if any
* @param [response] GetCatalogResponse
*/
type GetCatalogCallback = (error: (Error|null), response?: contractregistry.GetCatalogResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getTags}.
* @param error Error, if any
* @param [response] GetTagsResponse
*/
type GetTagsCallback = (error: (Error|null), response?: contractregistry.GetTagsResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getMethodsBySelector}.
* @param error Error, if any
* @param [response] GetMethodsBySelectorResponse
*/
type GetMethodsBySelectorCallback = (error: (Error|null), response?: contractregistry.GetMethodsBySelectorResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#getEventsBySigHash}.
* @param error Error, if any
* @param [response] GetEventsBySigHashResponse
*/
type GetEventsBySigHashCallback = (error: (Error|null), response?: contractregistry.GetEventsBySigHashResponse) => void;
/**
* Callback as used by {@link contractregistry.ContractRegistry#setAccountCodeHash}.
* @param error Error, if any
* @param [response] SetAccountCodeHashResponse
*/
type SetAccountCodeHashCallback = (error: (Error|null), response?: contractregistry.SetAccountCodeHashResponse) => void;
}
/** Properties of a RegisterContractRequest. */
interface IRegisterContractRequest {
/** RegisterContractRequest contract */
contract?: (abi.IContract|null);
}
/** Represents a RegisterContractRequest. */
class RegisterContractRequest implements IRegisterContractRequest {
/**
* Constructs a new RegisterContractRequest.
* @param [properties] Properties to set
*/
constructor(properties?: contractregistry.IRegisterContractRequest);
/** RegisterContractRequest contract. */
public contract?: (abi.IContract|null);
/**
* Creates a new RegisterContractRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns RegisterContractRequest instance
*/
public static create(properties?: contractregistry.IRegisterContractRequest): contractregistry.RegisterContractRequest;
/**
* Encodes the specified RegisterContractRequest message. Does not implicitly {@link contractregistry.RegisterContractRequest.verify|verify} messages.
* @param message RegisterContractRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: contractregistry.IRegisterContractRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified RegisterContractRequest message, length delimited. Does not implicitly {@link contractregistry.RegisterContractRequest.verify|verify} messages.
* @param message RegisterContractRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: contractregistry.IRegisterContractRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a RegisterContractRequest message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns RegisterContractRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): contractregistry.RegisterContractRequest;
/**
* Decodes a RegisterContractRequest message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns RegisterContractRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): contractregistry.RegisterContractRequest;
/**
* Verifies a RegisterContractRequest message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a RegisterContractRequest message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns RegisterContractRequest
*/
public static fromObject(object: { [k: string]: any }): contractregistry.RegisterContractRequest;
/**
* Creates a plain object from a RegisterContractRequest message. Also converts values to other types if specified.
* @param message RegisterContractRequest
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: contractregistry.RegisterContractRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this RegisterContractRequest to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a RegisterContractResponse. */
interface IRegisterContractResponse {
}
/** Represents a RegisterContractResponse. */
class RegisterContractResponse implements IRegisterContractResponse {
/**
* Constructs a new RegisterContractResponse.
* @param [properties] Properties to set
*/
constructor(properties?: contractregistry.IRegisterContractResponse);
/**
* Creates a new RegisterContractResponse instance using the specified properties.
* @param [properties] Properties to set
* @returns RegisterContractResponse instance
*/
public static create(properties?: contractregistry.IRegisterContractResponse): contractregistry.RegisterContractResponse;
/**
* Encodes the specified RegisterContractResponse message. Does not implicitly {@link contractregistry.RegisterContractResponse.verify|verify} messages.
* @param message RegisterContractResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: contractregistry.IRegisterContractResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified RegisterContractResponse message, length delimited. Does not implicitly {@link contractregistry.RegisterContractResponse.verify|verify} messages.
* @param message RegisterContractResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: contractregistry.IRegisterContractResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a RegisterContractResponse message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns RegisterContractResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): contractregistry.RegisterContractResponse;
/**
* Decodes a RegisterContractResponse message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns RegisterContractResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): contractregistry.RegisterContractResponse;
/**
* Verifies a RegisterContractResponse message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a RegisterContractResponse message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns RegisterContractResponse
*/
public static fromObject(object: { [k: string]: any }): contractregistry.RegisterContractResponse;
/**
* Creates a plain object from a RegisterContractResponse message. Also converts values to other types if specified.
* @param message RegisterContractResponse
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: contractregistry.RegisterContractResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this RegisterContractResponse to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a DeregisterContractRequest. */
interface IDeregisterContractRequest {
/** DeregisterContractRequest contractId */
contractId?: (abi.IContractId|null);
}
/** Represents a DeregisterContractRequest. */
class DeregisterContractRequest implements IDeregisterContractRequest {
/**
* Constructs a new DeregisterContractRequest.
* @param [properties] Properties to set
*/
constructor(properties?: contractregistry.IDeregisterContractRequest);
/** DeregisterContractRequest contractId. */
public contractId?: (abi.IContractId|null);
/**
* Creates a new DeregisterContractRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns DeregisterContractRequest instance
*/
public static create(properties?: contractregistry.IDeregisterContractRequest): contractregistry.DeregisterContractRequest;
/**
* Encodes the specified DeregisterContractRequest message. Does not implicitly {@link contractregistry.DeregisterContractRequest.verify|verify} messages.
* @param message DeregisterContractRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: contractregistry.IDeregisterContractRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified DeregisterContractRequest message, length delimited. Does not implicitly {@link contractregistry.DeregisterContractRequest.verify|verify} messages.
* @param message DeregisterContractRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: contractregistry.IDeregisterContractRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a DeregisterContractRequest message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns DeregisterContractRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): contractregistry.DeregisterContractRequest;
/**
* Decodes a DeregisterContractRequest message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns DeregisterContractRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): contractregistry.DeregisterContractRequest;
/**
* Verifies a DeregisterContractRequest message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a DeregisterContractRequest message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns DeregisterContractRequest
*/
public static fromObject(object: { [k: string]: any }): contractregistry.DeregisterContractRequest;
/**
* Creates a plain object from a DeregisterContractRequest message. Also converts values to other types if specified.
* @param message DeregisterContractRequest
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: contractregistry.DeregisterContractRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this DeregisterContractRequest to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a DeregisterContractResponse. */
interface IDeregisterContractResponse {
}
/** Represents a DeregisterContractResponse. */
class DeregisterContractResponse implements IDeregisterContractResponse {
/**
* Constructs a new DeregisterContractResponse.
* @param [properties] Properties to set
*/
constructor(properties?: contractregistry.IDeregisterContractResponse);
/**
* Creates a new DeregisterContractResponse instance using the specified properties.
* @param [properties] Properties to set
* @returns DeregisterContractResponse instance
*/
public static create(properties?: contractregistry.IDeregisterContractResponse): contractregistry.DeregisterContractResponse;
/**
* Encodes the specified DeregisterContractResponse message. Does not implicitly {@link contractregistry.DeregisterContractResponse.verify|verify} messages.
* @param message DeregisterContractResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: contractregistry.IDeregisterContractResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified DeregisterContractResponse message, length delimited. Does not implicitly {@link contractregistry.DeregisterContractResponse.verify|verify} messages.
* @param message DeregisterContractResponse message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: contractregistry.IDeregisterContractResponse, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a DeregisterContractResponse message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns DeregisterContractResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): contractregistry.DeregisterContractResponse;
/**
* Decodes a DeregisterContractResponse message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns DeregisterContractResponse
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): contractregistry.DeregisterContractResponse;
/**
* Verifies a DeregisterContractResponse message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a DeregisterContractResponse message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns DeregisterContractResponse
*/
public static fromObject(object: { [k: string]: any }): contractregistry.DeregisterContractResponse;
/**
* Creates a plain object from a DeregisterContractResponse message. Also converts values to other types if specified.
* @param message DeregisterContractResponse
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: contractregistry.DeregisterContractResponse, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this DeregisterContractResponse to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a DeleteArtifactRequest. */
interface IDeleteArtifactRequest {
/** DeleteArtifactRequest bytecodeHash */
bytecodeHash?: (string|null);
}
/** Represents a DeleteArtifactRequest. */
class DeleteArtifactRequest implements IDeleteArtifactRequest {
/**
* Constructs a new DeleteArtifactRequest.
* @param [properties] Properties to set
*/
constructor(properties?: contractregistry.IDeleteArtifactRequest);
/** DeleteArtifactRequest bytecodeHash. */
public bytecodeHash: string;
/**
* Creates a new DeleteArtifact