import { grpc } from "@improbable-eng/grpc-web";
import _m0 from "protobufjs/minimal";
import { ObservationRequest } from "../../gossip/v1/gossip";
export declare const protobufPackage = "node.v1";
export interface InjectGovernanceVAARequest {
    /** Index of the current guardian set. */
    currentSetIndex: number;
    /** List of governance VAA messages to inject. */
    messages: GovernanceMessage[];
    /** UNIX wall time in seconds */
    timestamp: number;
}
export interface GovernanceMessage {
    /**
     * Sequence number. This is critical for replay protection - make sure the sequence number
     * is unique for every new manually injected governance VAA. Sequences are tracked
     * by emitter, and manually injected VAAs all use a single hardcoded emitter.
     *
     * We use random sequence numbers for the manual emitter.
     */
    sequence: string;
    /** Random nonce for disambiguation. Must be identical across all nodes. */
    nonce: number;
    /** Target chain ID */
    targetChainId: number;
    updateMessageFee: UpdateMessageFee | undefined;
    transferFee: TransferFee | undefined;
    guardianSet: GuardianSetUpgrade | undefined;
    contractUpgrade: ContractUpgrade | undefined;
    bridgeRegisterChain: BridgeRegisterChain | undefined;
    bridgeContractUpgrade: BridgeUpgradeContract | undefined;
    /** Alephium TokenBridge Extensions */
    destroyUnexecutedSequenceContracts: TokenBridgeDestroyUnexecutedSequenceContracts | undefined;
    updateMinimalConsistencyLevel: TokenBridgeUpdateMinimalConsistencyLevel | undefined;
    updateRefundAddress: TokenBridgeUpdateRefundAddress | undefined;
}
export interface InjectGovernanceVAAResponse {
    /** Canonical digests of the submitted VAAs. */
    digests: Uint8Array[];
}
export interface UpdateMessageFee {
    /** 32 bytes hex string */
    newMessageFee: string;
}
export interface TransferFee {
    /** 32 bytes hex string */
    amount: string;
    /** 32 bytes hex string */
    recipient: string;
}
/**
 * GuardianSet represents a new guardian set to be submitted to and signed by the node.
 * During the genesis procedure, this data structure will be assembled using off-chain collaborative tooling
 * like GitHub using a human-readable encoding, so readability is a concern.
 */
export interface GuardianSetUpgrade {
    guardians: GuardianSetUpgrade_Guardian[];
}
/** List of guardian set members. */
export interface GuardianSetUpgrade_Guardian {
    /**
     * Guardian key pubkey. Stored as hex string with 0x prefix for human readability -
     * this is the canonical Ethereum representation.
     */
    pubkey: string;
    /** Optional descriptive name. Not stored on any chain, purely informational. */
    name: string;
}
/** GuardianKey specifies the on-disk format for a node's guardian key. */
export interface GuardianKey {
    /** data is the binary representation of the secp256k1 private key. */
    data: Uint8Array;
    /** Whether this key is deterministically generated and unsuitable for production mode. */
    unsafeDeterministicKey: boolean;
}
export interface BridgeRegisterChain {
    /** Module identifier of the token or NFT bridge (typically "TokenBridge" or "NFTBridge") */
    module: string;
    /** ID of the chain to be registered. */
    chainId: number;
    /** Hex-encoded emitter address to be registered (without leading 0x). */
    emitterAddress: string;
}
/** ContractUpgrade represents a Wormhole contract update to be submitted to and signed by the node. */
export interface ContractUpgrade {
    /** hex string */
    payload: string;
}
export interface BridgeUpgradeContract {
    /** Module identifier of the token or NFT bridge (typically "TokenBridge" or "NFTBridge"). */
    module: string;
    /** hex string */
    payload: string;
}
export interface TokenBridgeDestroyUnexecutedSequenceContracts {
    emitterChain: number;
    sequences: string[];
}
export interface TokenBridgeUpdateMinimalConsistencyLevel {
    newConsistencyLevel: number;
}
export interface TokenBridgeUpdateRefundAddress {
    /** hex string */
    newRefundAddress: string;
}
export interface FindMissingMessagesRequest {
    /** Emitter chain ID to iterate. */
    emitterChain: number;
    /** Target chain ID */
    targetChain: number;
    /** Hex-encoded (without leading 0x) emitter address to iterate. */
    emitterAddress: string;
    /** Whether to attempt to backfill missing messages from a list of remote nodes. */
    rpcBackfill: boolean;
    /** List of remote nodes to backfill from. */
    backfillNodes: string[];
}
export interface FindMissingMessagesResponse {
    /** List of missing sequence numbers. */
    missingMessages: string[];
    /** Range processed */
    firstSequence: string;
    lastSequence: string;
}
export interface SendObservationRequestRequest {
    observationRequest: ObservationRequest | undefined;
}
export interface SendObservationRequestResponse {
}
export interface GetNextGovernanceVAASequenceRequest {
}
export interface GetNextGovernanceVAASequenceResponse {
    sequence: string;
}
export declare const InjectGovernanceVAARequest: {
    encode(message: InjectGovernanceVAARequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InjectGovernanceVAARequest;
    fromJSON(object: any): InjectGovernanceVAARequest;
    toJSON(message: InjectGovernanceVAARequest): unknown;
    fromPartial(object: DeepPartial<InjectGovernanceVAARequest>): InjectGovernanceVAARequest;
};
export declare const GovernanceMessage: {
    encode(message: GovernanceMessage, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GovernanceMessage;
    fromJSON(object: any): GovernanceMessage;
    toJSON(message: GovernanceMessage): unknown;
    fromPartial(object: DeepPartial<GovernanceMessage>): GovernanceMessage;
};
export declare const InjectGovernanceVAAResponse: {
    encode(message: InjectGovernanceVAAResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): InjectGovernanceVAAResponse;
    fromJSON(object: any): InjectGovernanceVAAResponse;
    toJSON(message: InjectGovernanceVAAResponse): unknown;
    fromPartial(object: DeepPartial<InjectGovernanceVAAResponse>): InjectGovernanceVAAResponse;
};
export declare const UpdateMessageFee: {
    encode(message: UpdateMessageFee, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UpdateMessageFee;
    fromJSON(object: any): UpdateMessageFee;
    toJSON(message: UpdateMessageFee): unknown;
    fromPartial(object: DeepPartial<UpdateMessageFee>): UpdateMessageFee;
};
export declare const TransferFee: {
    encode(message: TransferFee, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TransferFee;
    fromJSON(object: any): TransferFee;
    toJSON(message: TransferFee): unknown;
    fromPartial(object: DeepPartial<TransferFee>): TransferFee;
};
export declare const GuardianSetUpgrade: {
    encode(message: GuardianSetUpgrade, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GuardianSetUpgrade;
    fromJSON(object: any): GuardianSetUpgrade;
    toJSON(message: GuardianSetUpgrade): unknown;
    fromPartial(object: DeepPartial<GuardianSetUpgrade>): GuardianSetUpgrade;
};
export declare const GuardianSetUpgrade_Guardian: {
    encode(message: GuardianSetUpgrade_Guardian, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GuardianSetUpgrade_Guardian;
    fromJSON(object: any): GuardianSetUpgrade_Guardian;
    toJSON(message: GuardianSetUpgrade_Guardian): unknown;
    fromPartial(object: DeepPartial<GuardianSetUpgrade_Guardian>): GuardianSetUpgrade_Guardian;
};
export declare const GuardianKey: {
    encode(message: GuardianKey, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GuardianKey;
    fromJSON(object: any): GuardianKey;
    toJSON(message: GuardianKey): unknown;
    fromPartial(object: DeepPartial<GuardianKey>): GuardianKey;
};
export declare const BridgeRegisterChain: {
    encode(message: BridgeRegisterChain, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): BridgeRegisterChain;
    fromJSON(object: any): BridgeRegisterChain;
    toJSON(message: BridgeRegisterChain): unknown;
    fromPartial(object: DeepPartial<BridgeRegisterChain>): BridgeRegisterChain;
};
export declare const ContractUpgrade: {
    encode(message: ContractUpgrade, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ContractUpgrade;
    fromJSON(object: any): ContractUpgrade;
    toJSON(message: ContractUpgrade): unknown;
    fromPartial(object: DeepPartial<ContractUpgrade>): ContractUpgrade;
};
export declare const BridgeUpgradeContract: {
    encode(message: BridgeUpgradeContract, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): BridgeUpgradeContract;
    fromJSON(object: any): BridgeUpgradeContract;
    toJSON(message: BridgeUpgradeContract): unknown;
    fromPartial(object: DeepPartial<BridgeUpgradeContract>): BridgeUpgradeContract;
};
export declare const TokenBridgeDestroyUnexecutedSequenceContracts: {
    encode(message: TokenBridgeDestroyUnexecutedSequenceContracts, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TokenBridgeDestroyUnexecutedSequenceContracts;
    fromJSON(object: any): TokenBridgeDestroyUnexecutedSequenceContracts;
    toJSON(message: TokenBridgeDestroyUnexecutedSequenceContracts): unknown;
    fromPartial(object: DeepPartial<TokenBridgeDestroyUnexecutedSequenceContracts>): TokenBridgeDestroyUnexecutedSequenceContracts;
};
export declare const TokenBridgeUpdateMinimalConsistencyLevel: {
    encode(message: TokenBridgeUpdateMinimalConsistencyLevel, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TokenBridgeUpdateMinimalConsistencyLevel;
    fromJSON(object: any): TokenBridgeUpdateMinimalConsistencyLevel;
    toJSON(message: TokenBridgeUpdateMinimalConsistencyLevel): unknown;
    fromPartial(object: DeepPartial<TokenBridgeUpdateMinimalConsistencyLevel>): TokenBridgeUpdateMinimalConsistencyLevel;
};
export declare const TokenBridgeUpdateRefundAddress: {
    encode(message: TokenBridgeUpdateRefundAddress, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TokenBridgeUpdateRefundAddress;
    fromJSON(object: any): TokenBridgeUpdateRefundAddress;
    toJSON(message: TokenBridgeUpdateRefundAddress): unknown;
    fromPartial(object: DeepPartial<TokenBridgeUpdateRefundAddress>): TokenBridgeUpdateRefundAddress;
};
export declare const FindMissingMessagesRequest: {
    encode(message: FindMissingMessagesRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FindMissingMessagesRequest;
    fromJSON(object: any): FindMissingMessagesRequest;
    toJSON(message: FindMissingMessagesRequest): unknown;
    fromPartial(object: DeepPartial<FindMissingMessagesRequest>): FindMissingMessagesRequest;
};
export declare const FindMissingMessagesResponse: {
    encode(message: FindMissingMessagesResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FindMissingMessagesResponse;
    fromJSON(object: any): FindMissingMessagesResponse;
    toJSON(message: FindMissingMessagesResponse): unknown;
    fromPartial(object: DeepPartial<FindMissingMessagesResponse>): FindMissingMessagesResponse;
};
export declare const SendObservationRequestRequest: {
    encode(message: SendObservationRequestRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SendObservationRequestRequest;
    fromJSON(object: any): SendObservationRequestRequest;
    toJSON(message: SendObservationRequestRequest): unknown;
    fromPartial(object: DeepPartial<SendObservationRequestRequest>): SendObservationRequestRequest;
};
export declare const SendObservationRequestResponse: {
    encode(_: SendObservationRequestResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SendObservationRequestResponse;
    fromJSON(_: any): SendObservationRequestResponse;
    toJSON(_: SendObservationRequestResponse): unknown;
    fromPartial(_: DeepPartial<SendObservationRequestResponse>): SendObservationRequestResponse;
};
export declare const GetNextGovernanceVAASequenceRequest: {
    encode(_: GetNextGovernanceVAASequenceRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GetNextGovernanceVAASequenceRequest;
    fromJSON(_: any): GetNextGovernanceVAASequenceRequest;
    toJSON(_: GetNextGovernanceVAASequenceRequest): unknown;
    fromPartial(_: DeepPartial<GetNextGovernanceVAASequenceRequest>): GetNextGovernanceVAASequenceRequest;
};
export declare const GetNextGovernanceVAASequenceResponse: {
    encode(message: GetNextGovernanceVAASequenceResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GetNextGovernanceVAASequenceResponse;
    fromJSON(object: any): GetNextGovernanceVAASequenceResponse;
    toJSON(message: GetNextGovernanceVAASequenceResponse): unknown;
    fromPartial(object: DeepPartial<GetNextGovernanceVAASequenceResponse>): GetNextGovernanceVAASequenceResponse;
};
/**
 * NodePrivilegedService exposes an administrative API. It runs on a UNIX socket and is authenticated
 * using Linux filesystem permissions.
 */
export interface NodePrivilegedService {
    /**
     * InjectGovernanceVAA injects a governance VAA into the guardian node.
     * The node will inject the VAA into the aggregator and sign/broadcast the VAA signature.
     *
     * A consensus majority of nodes on the network will have to inject the VAA within the
     * VAA timeout window for it to reach consensus.
     */
    InjectGovernanceVAA(request: DeepPartial<InjectGovernanceVAARequest>, metadata?: grpc.Metadata): Promise<InjectGovernanceVAAResponse>;
    /**
     * FindMissingMessages will detect message sequence gaps in the local VAA store for a
     * specific emitter chain and address. Start and end slots are the lowest and highest
     * sequence numbers available in the local store, respectively.
     *
     * An error is returned if more than 1000 gaps are found.
     */
    FindMissingMessages(request: DeepPartial<FindMissingMessagesRequest>, metadata?: grpc.Metadata): Promise<FindMissingMessagesResponse>;
    /**
     * SendObservationRequest broadcasts a signed observation request to the gossip network
     * using the node's guardian key. The network rate limits these requests to one per second.
     * Requests at higher rates will fail silently.
     */
    SendObservationRequest(request: DeepPartial<SendObservationRequestRequest>, metadata?: grpc.Metadata): Promise<SendObservationRequestResponse>;
    GetNextGovernanceVAASequence(request: DeepPartial<GetNextGovernanceVAASequenceRequest>, metadata?: grpc.Metadata): Promise<GetNextGovernanceVAASequenceResponse>;
}
export declare class NodePrivilegedServiceClientImpl implements NodePrivilegedService {
    private readonly rpc;
    constructor(rpc: Rpc);
    InjectGovernanceVAA(request: DeepPartial<InjectGovernanceVAARequest>, metadata?: grpc.Metadata): Promise<InjectGovernanceVAAResponse>;
    FindMissingMessages(request: DeepPartial<FindMissingMessagesRequest>, metadata?: grpc.Metadata): Promise<FindMissingMessagesResponse>;
    SendObservationRequest(request: DeepPartial<SendObservationRequestRequest>, metadata?: grpc.Metadata): Promise<SendObservationRequestResponse>;
    GetNextGovernanceVAASequence(request: DeepPartial<GetNextGovernanceVAASequenceRequest>, metadata?: grpc.Metadata): Promise<GetNextGovernanceVAASequenceResponse>;
}
export declare const NodePrivilegedServiceDesc: {
    serviceName: string;
};
export declare const NodePrivilegedServiceInjectGovernanceVAADesc: UnaryMethodDefinitionish;
export declare const NodePrivilegedServiceFindMissingMessagesDesc: UnaryMethodDefinitionish;
export declare const NodePrivilegedServiceSendObservationRequestDesc: UnaryMethodDefinitionish;
export declare const NodePrivilegedServiceGetNextGovernanceVAASequenceDesc: UnaryMethodDefinitionish;
interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
    requestStream: any;
    responseStream: any;
}
declare type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
interface Rpc {
    unary<T extends UnaryMethodDefinitionish>(methodDesc: T, request: any, metadata: grpc.Metadata | undefined): Promise<any>;
}
export declare class GrpcWebImpl {
    private host;
    private options;
    constructor(host: string, options: {
        transport?: grpc.TransportFactory;
        debug?: boolean;
        metadata?: grpc.Metadata;
    });
    unary<T extends UnaryMethodDefinitionish>(methodDesc: T, _request: any, metadata: grpc.Metadata | undefined): Promise<any>;
}
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
export {};
