diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index dc7759c5a2..804a4fd88c 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -53521,33 +53521,15 @@ definitions: index: type: integer format: int64 - commonBlockHeader: - type: object - properties: - height: - type: string - format: int64 - hash: - type: string - format: byte - parent_hash: - type: string - format: byte - chain_id: - type: string - format: int64 - header: - $ref: '#/definitions/commonHeaderData' - title: chain specific header - commonChain: + chainsChain: type: object properties: chain_name: - $ref: '#/definitions/commonChainName' + $ref: '#/definitions/chainsChainName' chain_id: type: string format: int64 - commonChainName: + chainsChainName: type: string enum: - empty @@ -53573,7 +53555,15 @@ definitions: zeta_localnet = 13; - btc_regtest: Athens zeta_athensnet=15; - commonCoinType: + chainsReceiveStatus: + type: string + enum: + - Created + - Success + - Failed + default: Created + title: '- Created: some observer sees inbound tx' + coinCoinType: type: string enum: - Zeta @@ -53585,40 +53575,6 @@ definitions: - Gas: Ether, BNB, Matic, Klay, BTC, etc - ERC20: ERC20 token - Cmd: not a real coin, rather a command - commonHeaderData: - type: object - properties: - ethereum_header: - type: string - format: byte - title: binary encoded headers; RLP for ethereum - bitcoin_header: - type: string - format: byte - title: 80-byte little-endian encoded binary data - commonProof: - type: object - properties: - ethereum_proof: - $ref: '#/definitions/ethereumProof' - bitcoin_proof: - $ref: '#/definitions/bitcoinProof' - commonPubKeySet: - type: object - properties: - secp256k1: - type: string - ed25519: - type: string - title: PubKeySet contains two pub keys , secp256k1 and ed25519 - commonReceiveStatus: - type: string - enum: - - Created - - Success - - Failed - default: Created - title: '- Created: some observer sees inbound tx' crosschainCctxStatus: type: string enum: @@ -53702,7 +53658,7 @@ definitions: tx_hash: type: string coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' crosschainInboundTxParams: type: object properties: @@ -53716,7 +53672,7 @@ definitions: type: string title: this address is the EOA that signs the inbound tx coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' asset: type: string title: for ERC20 coin type, the asset is an address of the ERC20 contract @@ -53808,7 +53764,7 @@ definitions: type: string format: int64 coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' amount: type: string outbound_tx_tss_nonce: @@ -54011,6 +53967,14 @@ definitions: type: string proved: type: boolean + cryptoPubKeySet: + type: object + properties: + secp256k1: + type: string + ed25519: + type: string + title: PubKeySet contains two pub keys , secp256k1 and ed25519 emissionsMsgWithdrawEmissionResponse: type: object emissionsQueryGetEmissionsFactorsResponse: @@ -54069,7 +54033,7 @@ definitions: symbol: type: string coin_type: - $ref: '#/definitions/commonCoinType' + $ref: '#/definitions/coinCoinType' gas_limit: type: string format: uint64 @@ -54393,7 +54357,7 @@ definitions: granteeAddress: type: string granteePubkey: - $ref: '#/definitions/commonPubKeySet' + $ref: '#/definitions/cryptoPubKeySet' nodeStatus: $ref: '#/definitions/observerNodeStatus' observerNodeStatus: @@ -54419,7 +54383,7 @@ definitions: type: object properties: chain: - $ref: '#/definitions/commonChain' + $ref: '#/definitions/chainsChain' ballot_threshold: type: string min_observer_delegation: @@ -54473,7 +54437,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/commonBlockHeader' + $ref: '#/definitions/proofsBlockHeader' pagination: $ref: '#/definitions/v1beta1PageResponse' observerQueryAllChainNoncesResponse: @@ -54537,7 +54501,7 @@ definitions: type: object properties: block_header: - $ref: '#/definitions/commonBlockHeader' + $ref: '#/definitions/proofsBlockHeader' observerQueryGetBlockHeaderStateResponse: type: object properties: @@ -54619,7 +54583,7 @@ definitions: type: array items: type: object - $ref: '#/definitions/commonChain' + $ref: '#/definitions/chainsChain' observerQueryTssHistoryResponse: type: object properties: @@ -54664,6 +54628,42 @@ definitions: type: string vote_type: $ref: '#/definitions/observerVoteType' + proofsBlockHeader: + type: object + properties: + height: + type: string + format: int64 + hash: + type: string + format: byte + parent_hash: + type: string + format: byte + chain_id: + type: string + format: int64 + header: + $ref: '#/definitions/proofsHeaderData' + title: chain specific header + proofsHeaderData: + type: object + properties: + ethereum_header: + type: string + format: byte + title: binary encoded headers; RLP for ethereum + bitcoin_header: + type: string + format: byte + title: 80-byte little-endian encoded binary data + proofsProof: + type: object + properties: + ethereum_proof: + $ref: '#/definitions/ethereumProof' + bitcoin_proof: + $ref: '#/definitions/bitcoinProof' protobufAny: type: object properties: diff --git a/docs/spec/crosschain/messages.md b/docs/spec/crosschain/messages.md index d18adeb778..506ca0f94c 100644 --- a/docs/spec/crosschain/messages.md +++ b/docs/spec/crosschain/messages.md @@ -14,7 +14,7 @@ message MsgAddToOutTxTracker { int64 chain_id = 2; uint64 nonce = 3; string tx_hash = 4; - common.Proof proof = 5; + proofs.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -31,8 +31,8 @@ message MsgAddToInTxTracker { string creator = 1; int64 chain_id = 2; string tx_hash = 3; - common.CoinType coin_type = 4; - common.Proof proof = 5; + coin.CoinType coin_type = 4; + proofs.Proof proof = 5; string block_hash = 6; int64 tx_index = 7; } @@ -124,10 +124,10 @@ message MsgVoteOnObservedOutboundTx { string observed_outTx_effective_gas_price = 11; uint64 observed_outTx_effective_gas_limit = 12; string value_received = 5; - common.ReceiveStatus status = 6; + chains.ReceiveStatus status = 6; int64 outTx_chain = 7; uint64 outTx_tss_nonce = 8; - common.CoinType coin_type = 9; + coin.CoinType coin_type = 9; } ``` @@ -187,7 +187,7 @@ message MsgVoteOnObservedInboundTx { string in_tx_hash = 9; uint64 in_block_height = 10; uint64 gas_limit = 11; - common.CoinType coin_type = 12; + coin.CoinType coin_type = 12; string tx_origin = 13; string asset = 14; uint64 event_index = 15; @@ -254,7 +254,7 @@ message MsgCreateTSSVoter { string creator = 1; string tss_pubkey = 2; int64 keyGenZetaHeight = 3; - common.ReceiveStatus status = 4; + chains.ReceiveStatus status = 4; } ``` diff --git a/docs/spec/fungible/messages.md b/docs/spec/fungible/messages.md index 696cc70631..57c089699f 100644 --- a/docs/spec/fungible/messages.md +++ b/docs/spec/fungible/messages.md @@ -41,7 +41,7 @@ message MsgDeployFungibleCoinZRC20 { uint32 decimals = 4; string name = 5; string symbol = 6; - common.CoinType coin_type = 7; + coin.CoinType coin_type = 7; int64 gas_limit = 8; } ``` diff --git a/docs/spec/observer/messages.md b/docs/spec/observer/messages.md index dfa2d3d1de..9ddfdc0fd0 100644 --- a/docs/spec/observer/messages.md +++ b/docs/spec/observer/messages.md @@ -104,7 +104,7 @@ message MsgAddBlockHeader { int64 chain_id = 2; bytes block_hash = 3; int64 height = 4; - common.HeaderData header = 5; + proofs.HeaderData header = 5; } ``` diff --git a/typescript/common/common_pb.d.ts b/typescript/common/common_pb.d.ts deleted file mode 100644 index dbba2518c0..0000000000 --- a/typescript/common/common_pb.d.ts +++ /dev/null @@ -1,338 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" -// @generated from file common/common.proto (package common, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Proof as Proof$1 } from "./ethereum/ethereum_pb.js"; -import type { Proof as Proof$2 } from "./bitcoin/bitcoin_pb.js"; - -/** - * @generated from enum common.ReceiveStatus - */ -export declare enum ReceiveStatus { - /** - * some observer sees inbound tx - * - * @generated from enum value: Created = 0; - */ - Created = 0, - - /** - * @generated from enum value: Success = 1; - */ - Success = 1, - - /** - * @generated from enum value: Failed = 2; - */ - Failed = 2, -} - -/** - * @generated from enum common.CoinType - */ -export declare enum CoinType { - /** - * @generated from enum value: Zeta = 0; - */ - Zeta = 0, - - /** - * Ether, BNB, Matic, Klay, BTC, etc - * - * @generated from enum value: Gas = 1; - */ - Gas = 1, - - /** - * ERC20 token - * - * @generated from enum value: ERC20 = 2; - */ - ERC20 = 2, - - /** - * not a real coin, rather a command - * - * @generated from enum value: Cmd = 3; - */ - Cmd = 3, -} - -/** - * @generated from enum common.ChainName - */ -export declare enum ChainName { - /** - * @generated from enum value: empty = 0; - */ - empty = 0, - - /** - * @generated from enum value: eth_mainnet = 1; - */ - eth_mainnet = 1, - - /** - * @generated from enum value: zeta_mainnet = 2; - */ - zeta_mainnet = 2, - - /** - * @generated from enum value: btc_mainnet = 3; - */ - btc_mainnet = 3, - - /** - * @generated from enum value: polygon_mainnet = 4; - */ - polygon_mainnet = 4, - - /** - * @generated from enum value: bsc_mainnet = 5; - */ - bsc_mainnet = 5, - - /** - * Testnet - * - * @generated from enum value: goerli_testnet = 6; - */ - goerli_testnet = 6, - - /** - * @generated from enum value: mumbai_testnet = 7; - */ - mumbai_testnet = 7, - - /** - * @generated from enum value: ganache_testnet = 8; - */ - ganache_testnet = 8, - - /** - * @generated from enum value: baobab_testnet = 9; - */ - baobab_testnet = 9, - - /** - * @generated from enum value: bsc_testnet = 10; - */ - bsc_testnet = 10, - - /** - * @generated from enum value: zeta_testnet = 11; - */ - zeta_testnet = 11, - - /** - * @generated from enum value: btc_testnet = 12; - */ - btc_testnet = 12, - - /** - * @generated from enum value: sepolia_testnet = 13; - */ - sepolia_testnet = 13, - - /** - * LocalNet - * zeta_localnet = 13; - * - * @generated from enum value: goerli_localnet = 14; - */ - goerli_localnet = 14, - - /** - * Athens - * zeta_athensnet=15; - * - * @generated from enum value: btc_regtest = 15; - */ - btc_regtest = 15, -} - -/** - * PubKeySet contains two pub keys , secp256k1 and ed25519 - * - * @generated from message common.PubKeySet - */ -export declare class PubKeySet extends Message { - /** - * @generated from field: string secp256k1 = 1; - */ - secp256k1: string; - - /** - * @generated from field: string ed25519 = 2; - */ - ed25519: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.PubKeySet"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): PubKeySet; - - static fromJson(jsonValue: JsonValue, options?: Partial): PubKeySet; - - static fromJsonString(jsonString: string, options?: Partial): PubKeySet; - - static equals(a: PubKeySet | PlainMessage | undefined, b: PubKeySet | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.Chain - */ -export declare class Chain extends Message { - /** - * @generated from field: common.ChainName chain_name = 1; - */ - chainName: ChainName; - - /** - * @generated from field: int64 chain_id = 2; - */ - chainId: bigint; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.Chain"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Chain; - - static fromJson(jsonValue: JsonValue, options?: Partial): Chain; - - static fromJsonString(jsonString: string, options?: Partial): Chain; - - static equals(a: Chain | PlainMessage | undefined, b: Chain | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.BlockHeader - */ -export declare class BlockHeader extends Message { - /** - * @generated from field: int64 height = 1; - */ - height: bigint; - - /** - * @generated from field: bytes hash = 2; - */ - hash: Uint8Array; - - /** - * @generated from field: bytes parent_hash = 3; - */ - parentHash: Uint8Array; - - /** - * @generated from field: int64 chain_id = 4; - */ - chainId: bigint; - - /** - * chain specific header - * - * @generated from field: common.HeaderData header = 5; - */ - header?: HeaderData; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.BlockHeader"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): BlockHeader; - - static fromJson(jsonValue: JsonValue, options?: Partial): BlockHeader; - - static fromJsonString(jsonString: string, options?: Partial): BlockHeader; - - static equals(a: BlockHeader | PlainMessage | undefined, b: BlockHeader | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.HeaderData - */ -export declare class HeaderData extends Message { - /** - * @generated from oneof common.HeaderData.data - */ - data: { - /** - * binary encoded headers; RLP for ethereum - * - * @generated from field: bytes ethereum_header = 1; - */ - value: Uint8Array; - case: "ethereumHeader"; - } | { - /** - * 80-byte little-endian encoded binary data - * - * @generated from field: bytes bitcoin_header = 2; - */ - value: Uint8Array; - case: "bitcoinHeader"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.HeaderData"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): HeaderData; - - static fromJson(jsonValue: JsonValue, options?: Partial): HeaderData; - - static fromJsonString(jsonString: string, options?: Partial): HeaderData; - - static equals(a: HeaderData | PlainMessage | undefined, b: HeaderData | PlainMessage | undefined): boolean; -} - -/** - * @generated from message common.Proof - */ -export declare class Proof extends Message { - /** - * @generated from oneof common.Proof.proof - */ - proof: { - /** - * @generated from field: ethereum.Proof ethereum_proof = 1; - */ - value: Proof$1; - case: "ethereumProof"; - } | { - /** - * @generated from field: bitcoin.Proof bitcoin_proof = 2; - */ - value: Proof$2; - case: "bitcoinProof"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "common.Proof"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Proof; - - static fromJson(jsonValue: JsonValue, options?: Partial): Proof; - - static fromJsonString(jsonString: string, options?: Partial): Proof; - - static equals(a: Proof | PlainMessage | undefined, b: Proof | PlainMessage | undefined): boolean; -} - diff --git a/typescript/common/index.d.ts b/typescript/common/index.d.ts deleted file mode 100644 index 78b610bcc1..0000000000 --- a/typescript/common/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./common_pb"; diff --git a/typescript/crosschain/cross_chain_tx_pb.d.ts b/typescript/crosschain/cross_chain_tx_pb.d.ts index 0157548d54..9aa537b31b 100644 --- a/typescript/crosschain/cross_chain_tx_pb.d.ts +++ b/typescript/crosschain/cross_chain_tx_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType } from "../common/common_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; /** * @generated from enum zetachain.zetacore.crosschain.CctxStatus @@ -104,7 +104,7 @@ export declare class InboundTxParams extends Message { txOrigin: string; /** - * @generated from field: common.CoinType coin_type = 4; + * @generated from field: coin.CoinType coin_type = 4; */ coinType: CoinType; @@ -201,7 +201,7 @@ export declare class OutboundTxParams extends Message { receiverChainId: bigint; /** - * @generated from field: common.CoinType coin_type = 3; + * @generated from field: coin.CoinType coin_type = 3; */ coinType: CoinType; diff --git a/typescript/crosschain/in_tx_tracker_pb.d.ts b/typescript/crosschain/in_tx_tracker_pb.d.ts index d280f82524..9cb101adea 100644 --- a/typescript/crosschain/in_tx_tracker_pb.d.ts +++ b/typescript/crosschain/in_tx_tracker_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType } from "../common/common_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; /** * @generated from message zetachain.zetacore.crosschain.InTxTracker @@ -22,7 +22,7 @@ export declare class InTxTracker extends Message { txHash: string; /** - * @generated from field: common.CoinType coin_type = 3; + * @generated from field: coin.CoinType coin_type = 3; */ coinType: CoinType; diff --git a/typescript/crosschain/tx_pb.d.ts b/typescript/crosschain/tx_pb.d.ts index 2371a9405c..b1900d7c66 100644 --- a/typescript/crosschain/tx_pb.d.ts +++ b/typescript/crosschain/tx_pb.d.ts @@ -5,7 +5,9 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType, Proof, ReceiveStatus } from "../common/common_pb.js"; +import type { ReceiveStatus } from "../pkg/chains/chains_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; +import type { Proof } from "../pkg/proofs/proofs_pb.js"; /** * @generated from message zetachain.zetacore.crosschain.MsgCreateTSSVoter @@ -27,7 +29,7 @@ export declare class MsgCreateTSSVoter extends Message { keyGenZetaHeight: bigint; /** - * @generated from field: common.ReceiveStatus status = 4; + * @generated from field: chains.ReceiveStatus status = 4; */ status: ReceiveStatus; @@ -186,12 +188,12 @@ export declare class MsgAddToInTxTracker extends Message { txHash: string; /** - * @generated from field: common.CoinType coin_type = 4; + * @generated from field: coin.CoinType coin_type = 4; */ coinType: CoinType; /** - * @generated from field: common.Proof proof = 5; + * @generated from field: proofs.Proof proof = 5; */ proof?: Proof; @@ -347,7 +349,7 @@ export declare class MsgAddToOutTxTracker extends Message txHash: string; /** - * @generated from field: common.Proof proof = 5; + * @generated from field: proofs.Proof proof = 5; */ proof?: Proof; @@ -563,7 +565,7 @@ export declare class MsgVoteOnObservedOutboundTx extends Message { decimals: bigint; /** - * @generated from field: common.CoinType coin_type = 7; + * @generated from field: coin.CoinType coin_type = 7; */ coinType: CoinType; @@ -126,7 +126,7 @@ export declare class EventZRC20WithdrawFeeUpdated extends Message { symbol: string; /** - * @generated from field: common.CoinType coin_type = 8; + * @generated from field: coin.CoinType coin_type = 8; */ coinType: CoinType; diff --git a/typescript/fungible/tx_pb.d.ts b/typescript/fungible/tx_pb.d.ts index e20d4bde71..57ec4bbddc 100644 --- a/typescript/fungible/tx_pb.d.ts +++ b/typescript/fungible/tx_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { CoinType } from "../common/common_pb.js"; +import type { CoinType } from "../pkg/coin/coin_pb.js"; /** * @generated from enum zetachain.zetacore.fungible.UpdatePausedStatusAction @@ -233,7 +233,7 @@ export declare class MsgDeployFungibleCoinZRC20 extends Message { granteeAddress: string; /** - * @generated from field: common.PubKeySet granteePubkey = 3; + * @generated from field: crypto.PubKeySet granteePubkey = 3; */ granteePubkey?: PubKeySet; diff --git a/typescript/observer/observer_pb.d.ts b/typescript/observer/observer_pb.d.ts index cf8f1beb79..79bd712ab5 100644 --- a/typescript/observer/observer_pb.d.ts +++ b/typescript/observer/observer_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Chain } from "../common/common_pb.js"; +import type { Chain } from "../pkg/chains/chains_pb.js"; /** * @generated from enum zetachain.zetacore.observer.ObservationType @@ -67,7 +67,7 @@ export declare class ObserverMapper extends Message { index: string; /** - * @generated from field: common.Chain observer_chain = 2; + * @generated from field: chains.Chain observer_chain = 2; */ observerChain?: Chain; diff --git a/typescript/observer/params_pb.d.ts b/typescript/observer/params_pb.d.ts index e06b0aebe5..93f7ab74c7 100644 --- a/typescript/observer/params_pb.d.ts +++ b/typescript/observer/params_pb.d.ts @@ -5,7 +5,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; -import type { Chain } from "../common/common_pb.js"; +import type { Chain } from "../pkg/chains/chains_pb.js"; /** * Deprecated(v14):Moved into the authority module @@ -144,7 +144,7 @@ export declare class ChainParams extends Message { */ export declare class ObserverParams extends Message { /** - * @generated from field: common.Chain chain = 1; + * @generated from field: chains.Chain chain = 1; */ chain?: Chain; diff --git a/typescript/observer/query_pb.d.ts b/typescript/observer/query_pb.d.ts index b346e34a87..a98680eeb8 100644 --- a/typescript/observer/query_pb.d.ts +++ b/typescript/observer/query_pb.d.ts @@ -9,10 +9,11 @@ import type { ChainNonces } from "./chain_nonces_pb.js"; import type { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/pagination_pb.js"; import type { PendingNonces } from "./pending_nonces_pb.js"; import type { TSS } from "./tss_pb.js"; -import type { BlockHeader, Chain, Proof } from "../common/common_pb.js"; +import type { BlockHeader, Proof } from "../pkg/proofs/proofs_pb.js"; import type { ChainParams, ChainParamsList, Params } from "./params_pb.js"; import type { BallotStatus, VoteType } from "./ballot_pb.js"; import type { LastObserverCount, ObservationType } from "./observer_pb.js"; +import type { Chain } from "../pkg/chains/chains_pb.js"; import type { NodeAccount } from "./node_account_pb.js"; import type { CrosschainFlags } from "./crosschain_flags_pb.js"; import type { Keygen } from "./keygen_pb.js"; @@ -443,7 +444,7 @@ export declare class QueryProveRequest extends Message { txHash: string; /** - * @generated from field: common.Proof proof = 3; + * @generated from field: proofs.Proof proof = 3; */ proof?: Proof; @@ -755,7 +756,7 @@ export declare class QuerySupportedChains extends Message */ export declare class QuerySupportedChainsResponse extends Message { /** - * @generated from field: repeated common.Chain chains = 1; + * @generated from field: repeated chains.Chain chains = 1; */ chains: Chain[]; @@ -1278,7 +1279,7 @@ export declare class QueryAllBlockHeaderRequest extends Message { /** - * @generated from field: repeated common.BlockHeader block_headers = 1; + * @generated from field: repeated proofs.BlockHeader block_headers = 1; */ blockHeaders: BlockHeader[]; @@ -1331,7 +1332,7 @@ export declare class QueryGetBlockHeaderByHashRequest extends Message { /** - * @generated from field: common.BlockHeader block_header = 1; + * @generated from field: proofs.BlockHeader block_header = 1; */ blockHeader?: BlockHeader; diff --git a/typescript/observer/tx_pb.d.ts b/typescript/observer/tx_pb.d.ts index 4f7a346cc2..4418e5569e 100644 --- a/typescript/observer/tx_pb.d.ts +++ b/typescript/observer/tx_pb.d.ts @@ -6,7 +6,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; import type { ObserverUpdateReason } from "./observer_pb.js"; -import type { HeaderData } from "../common/common_pb.js"; +import type { HeaderData } from "../pkg/proofs/proofs_pb.js"; import type { ChainParams } from "./params_pb.js"; import type { Blame } from "./blame_pb.js"; import type { BlockHeaderVerificationFlags, GasPriceIncreaseFlags } from "./crosschain_flags_pb.js"; @@ -94,7 +94,7 @@ export declare class MsgAddBlockHeader extends Message { height: bigint; /** - * @generated from field: common.HeaderData header = 5; + * @generated from field: proofs.HeaderData header = 5; */ header?: HeaderData; diff --git a/typescript/pkg/chains/chains_pb.d.ts b/typescript/pkg/chains/chains_pb.d.ts new file mode 100644 index 0000000000..0a04c14420 --- /dev/null +++ b/typescript/pkg/chains/chains_pb.d.ts @@ -0,0 +1,152 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/chains/chains.proto (package chains, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum chains.ReceiveStatus + */ +export declare enum ReceiveStatus { + /** + * some observer sees inbound tx + * + * @generated from enum value: Created = 0; + */ + Created = 0, + + /** + * @generated from enum value: Success = 1; + */ + Success = 1, + + /** + * @generated from enum value: Failed = 2; + */ + Failed = 2, +} + +/** + * @generated from enum chains.ChainName + */ +export declare enum ChainName { + /** + * @generated from enum value: empty = 0; + */ + empty = 0, + + /** + * @generated from enum value: eth_mainnet = 1; + */ + eth_mainnet = 1, + + /** + * @generated from enum value: zeta_mainnet = 2; + */ + zeta_mainnet = 2, + + /** + * @generated from enum value: btc_mainnet = 3; + */ + btc_mainnet = 3, + + /** + * @generated from enum value: polygon_mainnet = 4; + */ + polygon_mainnet = 4, + + /** + * @generated from enum value: bsc_mainnet = 5; + */ + bsc_mainnet = 5, + + /** + * Testnet + * + * @generated from enum value: goerli_testnet = 6; + */ + goerli_testnet = 6, + + /** + * @generated from enum value: mumbai_testnet = 7; + */ + mumbai_testnet = 7, + + /** + * @generated from enum value: ganache_testnet = 8; + */ + ganache_testnet = 8, + + /** + * @generated from enum value: baobab_testnet = 9; + */ + baobab_testnet = 9, + + /** + * @generated from enum value: bsc_testnet = 10; + */ + bsc_testnet = 10, + + /** + * @generated from enum value: zeta_testnet = 11; + */ + zeta_testnet = 11, + + /** + * @generated from enum value: btc_testnet = 12; + */ + btc_testnet = 12, + + /** + * @generated from enum value: sepolia_testnet = 13; + */ + sepolia_testnet = 13, + + /** + * LocalNet + * zeta_localnet = 13; + * + * @generated from enum value: goerli_localnet = 14; + */ + goerli_localnet = 14, + + /** + * Athens + * zeta_athensnet=15; + * + * @generated from enum value: btc_regtest = 15; + */ + btc_regtest = 15, +} + +/** + * @generated from message chains.Chain + */ +export declare class Chain extends Message { + /** + * @generated from field: chains.ChainName chain_name = 1; + */ + chainName: ChainName; + + /** + * @generated from field: int64 chain_id = 2; + */ + chainId: bigint; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "chains.Chain"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Chain; + + static fromJson(jsonValue: JsonValue, options?: Partial): Chain; + + static fromJsonString(jsonString: string, options?: Partial): Chain; + + static equals(a: Chain | PlainMessage | undefined, b: Chain | PlainMessage | undefined): boolean; +} + diff --git a/typescript/pkg/chains/index.d.ts b/typescript/pkg/chains/index.d.ts new file mode 100644 index 0000000000..1c53d86b35 --- /dev/null +++ b/typescript/pkg/chains/index.d.ts @@ -0,0 +1 @@ +export * from "./chains_pb"; diff --git a/typescript/pkg/coin/coin_pb.d.ts b/typescript/pkg/coin/coin_pb.d.ts new file mode 100644 index 0000000000..394472cf10 --- /dev/null +++ b/typescript/pkg/coin/coin_pb.d.ts @@ -0,0 +1,36 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/coin/coin.proto (package coin, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +/** + * @generated from enum coin.CoinType + */ +export declare enum CoinType { + /** + * @generated from enum value: Zeta = 0; + */ + Zeta = 0, + + /** + * Ether, BNB, Matic, Klay, BTC, etc + * + * @generated from enum value: Gas = 1; + */ + Gas = 1, + + /** + * ERC20 token + * + * @generated from enum value: ERC20 = 2; + */ + ERC20 = 2, + + /** + * not a real coin, rather a command + * + * @generated from enum value: Cmd = 3; + */ + Cmd = 3, +} + diff --git a/typescript/pkg/coin/index.d.ts b/typescript/pkg/coin/index.d.ts new file mode 100644 index 0000000000..4ca9ff3633 --- /dev/null +++ b/typescript/pkg/coin/index.d.ts @@ -0,0 +1 @@ +export * from "./coin_pb"; diff --git a/typescript/pkg/crypto/crypto_pb.d.ts b/typescript/pkg/crypto/crypto_pb.d.ts new file mode 100644 index 0000000000..2e29039c56 --- /dev/null +++ b/typescript/pkg/crypto/crypto_pb.d.ts @@ -0,0 +1,39 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/crypto/crypto.proto (package crypto, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * PubKeySet contains two pub keys , secp256k1 and ed25519 + * + * @generated from message crypto.PubKeySet + */ +export declare class PubKeySet extends Message { + /** + * @generated from field: string secp256k1 = 1; + */ + secp256k1: string; + + /** + * @generated from field: string ed25519 = 2; + */ + ed25519: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "crypto.PubKeySet"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PubKeySet; + + static fromJson(jsonValue: JsonValue, options?: Partial): PubKeySet; + + static fromJsonString(jsonString: string, options?: Partial): PubKeySet; + + static equals(a: PubKeySet | PlainMessage | undefined, b: PubKeySet | PlainMessage | undefined): boolean; +} + diff --git a/typescript/pkg/crypto/index.d.ts b/typescript/pkg/crypto/index.d.ts new file mode 100644 index 0000000000..3e597e1b09 --- /dev/null +++ b/typescript/pkg/crypto/index.d.ts @@ -0,0 +1 @@ +export * from "./crypto_pb"; diff --git a/typescript/common/bitcoin/bitcoin_pb.d.ts b/typescript/pkg/proofs/bitcoin/bitcoin_pb.d.ts similarity index 92% rename from typescript/common/bitcoin/bitcoin_pb.d.ts rename to typescript/pkg/proofs/bitcoin/bitcoin_pb.d.ts index 4ba8f93863..baeeb0f2f0 100644 --- a/typescript/common/bitcoin/bitcoin_pb.d.ts +++ b/typescript/pkg/proofs/bitcoin/bitcoin_pb.d.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.3.0 with parameter "target=dts" -// @generated from file common/bitcoin/bitcoin.proto (package bitcoin, syntax proto3) +// @generated from file pkg/proofs/bitcoin/bitcoin.proto (package bitcoin, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/typescript/common/bitcoin/index.d.ts b/typescript/pkg/proofs/bitcoin/index.d.ts similarity index 100% rename from typescript/common/bitcoin/index.d.ts rename to typescript/pkg/proofs/bitcoin/index.d.ts diff --git a/typescript/common/ethereum/ethereum_pb.d.ts b/typescript/pkg/proofs/ethereum/ethereum_pb.d.ts similarity index 92% rename from typescript/common/ethereum/ethereum_pb.d.ts rename to typescript/pkg/proofs/ethereum/ethereum_pb.d.ts index d0d2fa9513..28d7ba9671 100644 --- a/typescript/common/ethereum/ethereum_pb.d.ts +++ b/typescript/pkg/proofs/ethereum/ethereum_pb.d.ts @@ -1,5 +1,5 @@ // @generated by protoc-gen-es v1.3.0 with parameter "target=dts" -// @generated from file common/ethereum/ethereum.proto (package ethereum, syntax proto3) +// @generated from file pkg/proofs/ethereum/ethereum.proto (package ethereum, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/typescript/common/ethereum/index.d.ts b/typescript/pkg/proofs/ethereum/index.d.ts similarity index 100% rename from typescript/common/ethereum/index.d.ts rename to typescript/pkg/proofs/ethereum/index.d.ts diff --git a/typescript/pkg/proofs/index.d.ts b/typescript/pkg/proofs/index.d.ts new file mode 100644 index 0000000000..367acd3a6e --- /dev/null +++ b/typescript/pkg/proofs/index.d.ts @@ -0,0 +1 @@ +export * from "./proofs_pb"; diff --git a/typescript/pkg/proofs/proofs_pb.d.ts b/typescript/pkg/proofs/proofs_pb.d.ts new file mode 100644 index 0000000000..5e0e804c09 --- /dev/null +++ b/typescript/pkg/proofs/proofs_pb.d.ts @@ -0,0 +1,132 @@ +// @generated by protoc-gen-es v1.3.0 with parameter "target=dts" +// @generated from file pkg/proofs/proofs.proto (package proofs, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Proof as Proof$1 } from "./ethereum/ethereum_pb.js"; +import type { Proof as Proof$2 } from "./bitcoin/bitcoin_pb.js"; + +/** + * @generated from message proofs.BlockHeader + */ +export declare class BlockHeader extends Message { + /** + * @generated from field: int64 height = 1; + */ + height: bigint; + + /** + * @generated from field: bytes hash = 2; + */ + hash: Uint8Array; + + /** + * @generated from field: bytes parent_hash = 3; + */ + parentHash: Uint8Array; + + /** + * @generated from field: int64 chain_id = 4; + */ + chainId: bigint; + + /** + * chain specific header + * + * @generated from field: proofs.HeaderData header = 5; + */ + header?: HeaderData; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "proofs.BlockHeader"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): BlockHeader; + + static fromJson(jsonValue: JsonValue, options?: Partial): BlockHeader; + + static fromJsonString(jsonString: string, options?: Partial): BlockHeader; + + static equals(a: BlockHeader | PlainMessage | undefined, b: BlockHeader | PlainMessage | undefined): boolean; +} + +/** + * @generated from message proofs.HeaderData + */ +export declare class HeaderData extends Message { + /** + * @generated from oneof proofs.HeaderData.data + */ + data: { + /** + * binary encoded headers; RLP for ethereum + * + * @generated from field: bytes ethereum_header = 1; + */ + value: Uint8Array; + case: "ethereumHeader"; + } | { + /** + * 80-byte little-endian encoded binary data + * + * @generated from field: bytes bitcoin_header = 2; + */ + value: Uint8Array; + case: "bitcoinHeader"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "proofs.HeaderData"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): HeaderData; + + static fromJson(jsonValue: JsonValue, options?: Partial): HeaderData; + + static fromJsonString(jsonString: string, options?: Partial): HeaderData; + + static equals(a: HeaderData | PlainMessage | undefined, b: HeaderData | PlainMessage | undefined): boolean; +} + +/** + * @generated from message proofs.Proof + */ +export declare class Proof extends Message { + /** + * @generated from oneof proofs.Proof.proof + */ + proof: { + /** + * @generated from field: ethereum.Proof ethereum_proof = 1; + */ + value: Proof$1; + case: "ethereumProof"; + } | { + /** + * @generated from field: bitcoin.Proof bitcoin_proof = 2; + */ + value: Proof$2; + case: "bitcoinProof"; + } | { case: undefined; value?: undefined }; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "proofs.Proof"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Proof; + + static fromJson(jsonValue: JsonValue, options?: Partial): Proof; + + static fromJsonString(jsonString: string, options?: Partial): Proof; + + static equals(a: Proof | PlainMessage | undefined, b: Proof | PlainMessage | undefined): boolean; +} +