rchain-toolkit
Version:
Node JS utils and methods to interact with rchain's rnode api and proto interfaces
1,425 lines (1,240 loc) • 737 kB
TypeScript
import * as $protobuf from "protobufjs";
/** Namespace casper. */
export namespace casper {
/** Properties of a HasBlockRequestProto. */
interface IHasBlockRequestProto {
/** HasBlockRequestProto hash */
hash?: Uint8Array | null;
}
/** Represents a HasBlockRequestProto. */
class HasBlockRequestProto implements IHasBlockRequestProto {
/**
* Constructs a new HasBlockRequestProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IHasBlockRequestProto);
/** HasBlockRequestProto hash. */
public hash: Uint8Array;
/**
* Creates a new HasBlockRequestProto instance using the specified properties.
* @param [properties] Properties to set
* @returns HasBlockRequestProto instance
*/
public static create(
properties?: casper.IHasBlockRequestProto
): casper.HasBlockRequestProto;
/**
* Encodes the specified HasBlockRequestProto message. Does not implicitly {@link casper.HasBlockRequestProto.verify|verify} messages.
* @param message HasBlockRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IHasBlockRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified HasBlockRequestProto message, length delimited. Does not implicitly {@link casper.HasBlockRequestProto.verify|verify} messages.
* @param message HasBlockRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IHasBlockRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a HasBlockRequestProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns HasBlockRequestProto
* @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
): casper.HasBlockRequestProto;
/**
* Decodes a HasBlockRequestProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns HasBlockRequestProto
* @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
): casper.HasBlockRequestProto;
/**
* Verifies a HasBlockRequestProto 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 HasBlockRequestProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns HasBlockRequestProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.HasBlockRequestProto;
/**
* Creates a plain object from a HasBlockRequestProto message. Also converts values to other types if specified.
* @param message HasBlockRequestProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.HasBlockRequestProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this HasBlockRequestProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a HasBlockProto. */
interface IHasBlockProto {
/** HasBlockProto hash */
hash?: Uint8Array | null;
}
/** Represents a HasBlockProto. */
class HasBlockProto implements IHasBlockProto {
/**
* Constructs a new HasBlockProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IHasBlockProto);
/** HasBlockProto hash. */
public hash: Uint8Array;
/**
* Creates a new HasBlockProto instance using the specified properties.
* @param [properties] Properties to set
* @returns HasBlockProto instance
*/
public static create(
properties?: casper.IHasBlockProto
): casper.HasBlockProto;
/**
* Encodes the specified HasBlockProto message. Does not implicitly {@link casper.HasBlockProto.verify|verify} messages.
* @param message HasBlockProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IHasBlockProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified HasBlockProto message, length delimited. Does not implicitly {@link casper.HasBlockProto.verify|verify} messages.
* @param message HasBlockProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IHasBlockProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a HasBlockProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns HasBlockProto
* @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
): casper.HasBlockProto;
/**
* Decodes a HasBlockProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns HasBlockProto
* @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
): casper.HasBlockProto;
/**
* Verifies a HasBlockProto 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 HasBlockProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns HasBlockProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.HasBlockProto;
/**
* Creates a plain object from a HasBlockProto message. Also converts values to other types if specified.
* @param message HasBlockProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.HasBlockProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this HasBlockProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a BlockRequestProto. */
interface IBlockRequestProto {
/** BlockRequestProto hash */
hash?: Uint8Array | null;
}
/** Represents a BlockRequestProto. */
class BlockRequestProto implements IBlockRequestProto {
/**
* Constructs a new BlockRequestProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IBlockRequestProto);
/** BlockRequestProto hash. */
public hash: Uint8Array;
/**
* Creates a new BlockRequestProto instance using the specified properties.
* @param [properties] Properties to set
* @returns BlockRequestProto instance
*/
public static create(
properties?: casper.IBlockRequestProto
): casper.BlockRequestProto;
/**
* Encodes the specified BlockRequestProto message. Does not implicitly {@link casper.BlockRequestProto.verify|verify} messages.
* @param message BlockRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IBlockRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified BlockRequestProto message, length delimited. Does not implicitly {@link casper.BlockRequestProto.verify|verify} messages.
* @param message BlockRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IBlockRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a BlockRequestProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns BlockRequestProto
* @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
): casper.BlockRequestProto;
/**
* Decodes a BlockRequestProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns BlockRequestProto
* @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
): casper.BlockRequestProto;
/**
* Verifies a BlockRequestProto 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 BlockRequestProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BlockRequestProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.BlockRequestProto;
/**
* Creates a plain object from a BlockRequestProto message. Also converts values to other types if specified.
* @param message BlockRequestProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.BlockRequestProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this BlockRequestProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a ForkChoiceTipRequestProto. */
interface IForkChoiceTipRequestProto {}
/** Represents a ForkChoiceTipRequestProto. */
class ForkChoiceTipRequestProto implements IForkChoiceTipRequestProto {
/**
* Constructs a new ForkChoiceTipRequestProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IForkChoiceTipRequestProto);
/**
* Creates a new ForkChoiceTipRequestProto instance using the specified properties.
* @param [properties] Properties to set
* @returns ForkChoiceTipRequestProto instance
*/
public static create(
properties?: casper.IForkChoiceTipRequestProto
): casper.ForkChoiceTipRequestProto;
/**
* Encodes the specified ForkChoiceTipRequestProto message. Does not implicitly {@link casper.ForkChoiceTipRequestProto.verify|verify} messages.
* @param message ForkChoiceTipRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IForkChoiceTipRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified ForkChoiceTipRequestProto message, length delimited. Does not implicitly {@link casper.ForkChoiceTipRequestProto.verify|verify} messages.
* @param message ForkChoiceTipRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IForkChoiceTipRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a ForkChoiceTipRequestProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ForkChoiceTipRequestProto
* @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
): casper.ForkChoiceTipRequestProto;
/**
* Decodes a ForkChoiceTipRequestProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ForkChoiceTipRequestProto
* @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
): casper.ForkChoiceTipRequestProto;
/**
* Verifies a ForkChoiceTipRequestProto 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 ForkChoiceTipRequestProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ForkChoiceTipRequestProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.ForkChoiceTipRequestProto;
/**
* Creates a plain object from a ForkChoiceTipRequestProto message. Also converts values to other types if specified.
* @param message ForkChoiceTipRequestProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.ForkChoiceTipRequestProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this ForkChoiceTipRequestProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an ApprovedBlockCandidateProto. */
interface IApprovedBlockCandidateProto {
/** ApprovedBlockCandidateProto block */
block?: casper.IBlockMessageProto | null;
/** ApprovedBlockCandidateProto requiredSigs */
requiredSigs?: number | null;
}
/** Represents an ApprovedBlockCandidateProto. */
class ApprovedBlockCandidateProto implements IApprovedBlockCandidateProto {
/**
* Constructs a new ApprovedBlockCandidateProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IApprovedBlockCandidateProto);
/** ApprovedBlockCandidateProto block. */
public block?: casper.IBlockMessageProto | null;
/** ApprovedBlockCandidateProto requiredSigs. */
public requiredSigs: number;
/**
* Creates a new ApprovedBlockCandidateProto instance using the specified properties.
* @param [properties] Properties to set
* @returns ApprovedBlockCandidateProto instance
*/
public static create(
properties?: casper.IApprovedBlockCandidateProto
): casper.ApprovedBlockCandidateProto;
/**
* Encodes the specified ApprovedBlockCandidateProto message. Does not implicitly {@link casper.ApprovedBlockCandidateProto.verify|verify} messages.
* @param message ApprovedBlockCandidateProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IApprovedBlockCandidateProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified ApprovedBlockCandidateProto message, length delimited. Does not implicitly {@link casper.ApprovedBlockCandidateProto.verify|verify} messages.
* @param message ApprovedBlockCandidateProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IApprovedBlockCandidateProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes an ApprovedBlockCandidateProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ApprovedBlockCandidateProto
* @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
): casper.ApprovedBlockCandidateProto;
/**
* Decodes an ApprovedBlockCandidateProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ApprovedBlockCandidateProto
* @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
): casper.ApprovedBlockCandidateProto;
/**
* Verifies an ApprovedBlockCandidateProto 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 ApprovedBlockCandidateProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ApprovedBlockCandidateProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.ApprovedBlockCandidateProto;
/**
* Creates a plain object from an ApprovedBlockCandidateProto message. Also converts values to other types if specified.
* @param message ApprovedBlockCandidateProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.ApprovedBlockCandidateProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this ApprovedBlockCandidateProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an UnapprovedBlockProto. */
interface IUnapprovedBlockProto {
/** UnapprovedBlockProto candidate */
candidate?: casper.IApprovedBlockCandidateProto | null;
/** UnapprovedBlockProto timestamp */
timestamp?: number | Long | null;
/** UnapprovedBlockProto duration */
duration?: number | Long | null;
}
/** Represents an UnapprovedBlockProto. */
class UnapprovedBlockProto implements IUnapprovedBlockProto {
/**
* Constructs a new UnapprovedBlockProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IUnapprovedBlockProto);
/** UnapprovedBlockProto candidate. */
public candidate?: casper.IApprovedBlockCandidateProto | null;
/** UnapprovedBlockProto timestamp. */
public timestamp: number | Long;
/** UnapprovedBlockProto duration. */
public duration: number | Long;
/**
* Creates a new UnapprovedBlockProto instance using the specified properties.
* @param [properties] Properties to set
* @returns UnapprovedBlockProto instance
*/
public static create(
properties?: casper.IUnapprovedBlockProto
): casper.UnapprovedBlockProto;
/**
* Encodes the specified UnapprovedBlockProto message. Does not implicitly {@link casper.UnapprovedBlockProto.verify|verify} messages.
* @param message UnapprovedBlockProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IUnapprovedBlockProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified UnapprovedBlockProto message, length delimited. Does not implicitly {@link casper.UnapprovedBlockProto.verify|verify} messages.
* @param message UnapprovedBlockProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IUnapprovedBlockProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes an UnapprovedBlockProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns UnapprovedBlockProto
* @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
): casper.UnapprovedBlockProto;
/**
* Decodes an UnapprovedBlockProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns UnapprovedBlockProto
* @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
): casper.UnapprovedBlockProto;
/**
* Verifies an UnapprovedBlockProto 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 UnapprovedBlockProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns UnapprovedBlockProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.UnapprovedBlockProto;
/**
* Creates a plain object from an UnapprovedBlockProto message. Also converts values to other types if specified.
* @param message UnapprovedBlockProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.UnapprovedBlockProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this UnapprovedBlockProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a Signature. */
interface ISignature {
/** Signature publicKey */
publicKey?: Uint8Array | null;
/** Signature algorithm */
algorithm?: string | null;
/** Signature sig */
sig?: Uint8Array | null;
}
/** Represents a Signature. */
class Signature implements ISignature {
/**
* Constructs a new Signature.
* @param [properties] Properties to set
*/
constructor(properties?: casper.ISignature);
/** Signature publicKey. */
public publicKey: Uint8Array;
/** Signature algorithm. */
public algorithm: string;
/** Signature sig. */
public sig: Uint8Array;
/**
* Creates a new Signature instance using the specified properties.
* @param [properties] Properties to set
* @returns Signature instance
*/
public static create(properties?: casper.ISignature): casper.Signature;
/**
* Encodes the specified Signature message. Does not implicitly {@link casper.Signature.verify|verify} messages.
* @param message Signature message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.ISignature,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified Signature message, length delimited. Does not implicitly {@link casper.Signature.verify|verify} messages.
* @param message Signature message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.ISignature,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a Signature message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns Signature
* @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
): casper.Signature;
/**
* Decodes a Signature message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns Signature
* @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
): casper.Signature;
/**
* Verifies a Signature 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 Signature message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Signature
*/
public static fromObject(object: { [k: string]: any }): casper.Signature;
/**
* Creates a plain object from a Signature message. Also converts values to other types if specified.
* @param message Signature
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.Signature,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this Signature to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a BlockApprovalProto. */
interface IBlockApprovalProto {
/** BlockApprovalProto candidate */
candidate?: casper.IApprovedBlockCandidateProto | null;
/** BlockApprovalProto sig */
sig?: casper.ISignature | null;
}
/** Represents a BlockApprovalProto. */
class BlockApprovalProto implements IBlockApprovalProto {
/**
* Constructs a new BlockApprovalProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IBlockApprovalProto);
/** BlockApprovalProto candidate. */
public candidate?: casper.IApprovedBlockCandidateProto | null;
/** BlockApprovalProto sig. */
public sig?: casper.ISignature | null;
/**
* Creates a new BlockApprovalProto instance using the specified properties.
* @param [properties] Properties to set
* @returns BlockApprovalProto instance
*/
public static create(
properties?: casper.IBlockApprovalProto
): casper.BlockApprovalProto;
/**
* Encodes the specified BlockApprovalProto message. Does not implicitly {@link casper.BlockApprovalProto.verify|verify} messages.
* @param message BlockApprovalProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IBlockApprovalProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified BlockApprovalProto message, length delimited. Does not implicitly {@link casper.BlockApprovalProto.verify|verify} messages.
* @param message BlockApprovalProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IBlockApprovalProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a BlockApprovalProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns BlockApprovalProto
* @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
): casper.BlockApprovalProto;
/**
* Decodes a BlockApprovalProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns BlockApprovalProto
* @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
): casper.BlockApprovalProto;
/**
* Verifies a BlockApprovalProto 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 BlockApprovalProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BlockApprovalProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.BlockApprovalProto;
/**
* Creates a plain object from a BlockApprovalProto message. Also converts values to other types if specified.
* @param message BlockApprovalProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.BlockApprovalProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this BlockApprovalProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an ApprovedBlockProto. */
interface IApprovedBlockProto {
/** ApprovedBlockProto candidate */
candidate?: casper.IApprovedBlockCandidateProto | null;
/** ApprovedBlockProto sigs */
sigs?: casper.ISignature[] | null;
}
/** Represents an ApprovedBlockProto. */
class ApprovedBlockProto implements IApprovedBlockProto {
/**
* Constructs a new ApprovedBlockProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IApprovedBlockProto);
/** ApprovedBlockProto candidate. */
public candidate?: casper.IApprovedBlockCandidateProto | null;
/** ApprovedBlockProto sigs. */
public sigs: casper.ISignature[];
/**
* Creates a new ApprovedBlockProto instance using the specified properties.
* @param [properties] Properties to set
* @returns ApprovedBlockProto instance
*/
public static create(
properties?: casper.IApprovedBlockProto
): casper.ApprovedBlockProto;
/**
* Encodes the specified ApprovedBlockProto message. Does not implicitly {@link casper.ApprovedBlockProto.verify|verify} messages.
* @param message ApprovedBlockProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IApprovedBlockProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified ApprovedBlockProto message, length delimited. Does not implicitly {@link casper.ApprovedBlockProto.verify|verify} messages.
* @param message ApprovedBlockProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IApprovedBlockProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes an ApprovedBlockProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ApprovedBlockProto
* @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
): casper.ApprovedBlockProto;
/**
* Decodes an ApprovedBlockProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ApprovedBlockProto
* @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
): casper.ApprovedBlockProto;
/**
* Verifies an ApprovedBlockProto 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 ApprovedBlockProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ApprovedBlockProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.ApprovedBlockProto;
/**
* Creates a plain object from an ApprovedBlockProto message. Also converts values to other types if specified.
* @param message ApprovedBlockProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.ApprovedBlockProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this ApprovedBlockProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of an ApprovedBlockRequestProto. */
interface IApprovedBlockRequestProto {
/** ApprovedBlockRequestProto identifier */
identifier?: string | null;
}
/** Represents an ApprovedBlockRequestProto. */
class ApprovedBlockRequestProto implements IApprovedBlockRequestProto {
/**
* Constructs a new ApprovedBlockRequestProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IApprovedBlockRequestProto);
/** ApprovedBlockRequestProto identifier. */
public identifier: string;
/**
* Creates a new ApprovedBlockRequestProto instance using the specified properties.
* @param [properties] Properties to set
* @returns ApprovedBlockRequestProto instance
*/
public static create(
properties?: casper.IApprovedBlockRequestProto
): casper.ApprovedBlockRequestProto;
/**
* Encodes the specified ApprovedBlockRequestProto message. Does not implicitly {@link casper.ApprovedBlockRequestProto.verify|verify} messages.
* @param message ApprovedBlockRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IApprovedBlockRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified ApprovedBlockRequestProto message, length delimited. Does not implicitly {@link casper.ApprovedBlockRequestProto.verify|verify} messages.
* @param message ApprovedBlockRequestProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IApprovedBlockRequestProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes an ApprovedBlockRequestProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns ApprovedBlockRequestProto
* @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
): casper.ApprovedBlockRequestProto;
/**
* Decodes an ApprovedBlockRequestProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns ApprovedBlockRequestProto
* @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
): casper.ApprovedBlockRequestProto;
/**
* Verifies an ApprovedBlockRequestProto 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 ApprovedBlockRequestProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ApprovedBlockRequestProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.ApprovedBlockRequestProto;
/**
* Creates a plain object from an ApprovedBlockRequestProto message. Also converts values to other types if specified.
* @param message ApprovedBlockRequestProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.ApprovedBlockRequestProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this ApprovedBlockRequestProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a NoApprovedBlockAvailableProto. */
interface INoApprovedBlockAvailableProto {
/** NoApprovedBlockAvailableProto identifier */
identifier?: string | null;
/** NoApprovedBlockAvailableProto nodeIdentifer */
nodeIdentifer?: string | null;
}
/** Represents a NoApprovedBlockAvailableProto. */
class NoApprovedBlockAvailableProto
implements INoApprovedBlockAvailableProto
{
/**
* Constructs a new NoApprovedBlockAvailableProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.INoApprovedBlockAvailableProto);
/** NoApprovedBlockAvailableProto identifier. */
public identifier: string;
/** NoApprovedBlockAvailableProto nodeIdentifer. */
public nodeIdentifer: string;
/**
* Creates a new NoApprovedBlockAvailableProto instance using the specified properties.
* @param [properties] Properties to set
* @returns NoApprovedBlockAvailableProto instance
*/
public static create(
properties?: casper.INoApprovedBlockAvailableProto
): casper.NoApprovedBlockAvailableProto;
/**
* Encodes the specified NoApprovedBlockAvailableProto message. Does not implicitly {@link casper.NoApprovedBlockAvailableProto.verify|verify} messages.
* @param message NoApprovedBlockAvailableProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.INoApprovedBlockAvailableProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified NoApprovedBlockAvailableProto message, length delimited. Does not implicitly {@link casper.NoApprovedBlockAvailableProto.verify|verify} messages.
* @param message NoApprovedBlockAvailableProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.INoApprovedBlockAvailableProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a NoApprovedBlockAvailableProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns NoApprovedBlockAvailableProto
* @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
): casper.NoApprovedBlockAvailableProto;
/**
* Decodes a NoApprovedBlockAvailableProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns NoApprovedBlockAvailableProto
* @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
): casper.NoApprovedBlockAvailableProto;
/**
* Verifies a NoApprovedBlockAvailableProto 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 NoApprovedBlockAvailableProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns NoApprovedBlockAvailableProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.NoApprovedBlockAvailableProto;
/**
* Creates a plain object from a NoApprovedBlockAvailableProto message. Also converts values to other types if specified.
* @param message NoApprovedBlockAvailableProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.NoApprovedBlockAvailableProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this NoApprovedBlockAvailableProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a BlockMessageProto. */
interface IBlockMessageProto {
/** BlockMessageProto blockHash */
blockHash?: Uint8Array | null;
/** BlockMessageProto header */
header?: casper.IHeaderProto | null;
/** BlockMessageProto body */
body?: casper.IBodyProto | null;
/** BlockMessageProto justifications */
justifications?: casper.IJustificationProto[] | null;
/** BlockMessageProto sender */
sender?: Uint8Array | null;
/** BlockMessageProto seqNum */
seqNum?: number | null;
/** BlockMessageProto sig */
sig?: Uint8Array | null;
/** BlockMessageProto sigAlgorithm */
sigAlgorithm?: string | null;
/** BlockMessageProto shardId */
shardId?: string | null;
/** BlockMessageProto extraBytes */
extraBytes?: Uint8Array | null;
}
/** Represents a BlockMessageProto. */
class BlockMessageProto implements IBlockMessageProto {
/**
* Constructs a new BlockMessageProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IBlockMessageProto);
/** BlockMessageProto blockHash. */
public blockHash: Uint8Array;
/** BlockMessageProto header. */
public header?: casper.IHeaderProto | null;
/** BlockMessageProto body. */
public body?: casper.IBodyProto | null;
/** BlockMessageProto justifications. */
public justifications: casper.IJustificationProto[];
/** BlockMessageProto sender. */
public sender: Uint8Array;
/** BlockMessageProto seqNum. */
public seqNum: number;
/** BlockMessageProto sig. */
public sig: Uint8Array;
/** BlockMessageProto sigAlgorithm. */
public sigAlgorithm: string;
/** BlockMessageProto shardId. */
public shardId: string;
/** BlockMessageProto extraBytes. */
public extraBytes: Uint8Array;
/**
* Creates a new BlockMessageProto instance using the specified properties.
* @param [properties] Properties to set
* @returns BlockMessageProto instance
*/
public static create(
properties?: casper.IBlockMessageProto
): casper.BlockMessageProto;
/**
* Encodes the specified BlockMessageProto message. Does not implicitly {@link casper.BlockMessageProto.verify|verify} messages.
* @param message BlockMessageProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IBlockMessageProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified BlockMessageProto message, length delimited. Does not implicitly {@link casper.BlockMessageProto.verify|verify} messages.
* @param message BlockMessageProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IBlockMessageProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a BlockMessageProto message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns BlockMessageProto
* @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
): casper.BlockMessageProto;
/**
* Decodes a BlockMessageProto message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns BlockMessageProto
* @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
): casper.BlockMessageProto;
/**
* Verifies a BlockMessageProto 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 BlockMessageProto message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns BlockMessageProto
*/
public static fromObject(object: {
[k: string]: any;
}): casper.BlockMessageProto;
/**
* Creates a plain object from a BlockMessageProto message. Also converts values to other types if specified.
* @param message BlockMessageProto
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(
message: casper.BlockMessageProto,
options?: $protobuf.IConversionOptions
): { [k: string]: any };
/**
* Converts this BlockMessageProto to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
}
/** Properties of a BlockHashMessageProto. */
interface IBlockHashMessageProto {
/** BlockHashMessageProto hash */
hash?: Uint8Array | null;
/** BlockHashMessageProto blockCreator */
blockCreator?: Uint8Array | null;
}
/** Represents a BlockHashMessageProto. */
class BlockHashMessageProto implements IBlockHashMessageProto {
/**
* Constructs a new BlockHashMessageProto.
* @param [properties] Properties to set
*/
constructor(properties?: casper.IBlockHashMessageProto);
/** BlockHashMessageProto hash. */
public hash: Uint8Array;
/** BlockHashMessageProto blockCreator. */
public blockCreator: Uint8Array;
/**
* Creates a new BlockHashMessageProto instance using the specified properties.
* @param [properties] Properties to set
* @returns BlockHashMessageProto instance
*/
public static create(
properties?: casper.IBlockHashMessageProto
): casper.BlockHashMessageProto;
/**
* Encodes the specified BlockHashMessageProto message. Does not implicitly {@link casper.BlockHashMessageProto.verify|verify} messages.
* @param message BlockHashMessageProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(
message: casper.IBlockHashMessageProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Encodes the specified BlockHashMessageProto message, length delimited. Does not implicitly {@link casper.BlockHashMessageProto.verify|verify} messages.
* @param message BlockHashMessageProto message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(
message: casper.IBlockHashMessageProto,
writer?: $protobuf.Writer
): $protobuf.Writer;
/**
* Decodes a