import Long from "long"; import _m0 from "protobufjs/minimal"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { Any } from "../../../google/protobuf/any"; import { AccessTuple, FunToken, Log, Params } from "./evm"; /** Copyright (c) 2023-2024 Nibi, Inc. */ /** MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. */ export interface MsgEthereumTx { /** data is inner transaction data of the Ethereum transaction */ data?: Any; /** size is the encoded storage size of the transaction (DEPRECATED) */ size: number; /** hash of the transaction in hex format */ hash: string; /** * from is the ethereum signer address in hex format. This address value is * checked against the address derived from the signature (V, R, S) using the * secp256k1 elliptic curve */ from: string; } /** * LegacyTx is the transaction data of regular Ethereum transactions. * * Note that setting "evm.Params.AllowUnprotectedTxs" to false will cause all * non-EIP155 signed transactions to fail, as they'll lack replay protection. * * LegacyTx is a custom implementation of "LegacyTx" from * "github.com/ethereum/go-ethereum/core/types". */ export interface LegacyTx { /** nonce corresponds to the account nonce (transaction sequence). */ nonce: Long; /** gas_price defines the value for each gas unit */ gasPrice: string; /** gas defines the gas limit defined for the transaction. */ gas: Long; /** to is the hex formatted address of the recipient */ to: string; /** value defines the unsigned integer value of the transaction amount. */ value: string; /** data is the data payload bytes of the transaction. */ data: Uint8Array; /** * v defines the recovery id as the "v" signature value from the elliptic * curve digital signatute algorithm (ECDSA). It indicates which of two * possible solutions should be used to reconstruct the public key from the * signature. In Ethereum, "v" takes the value 27 or 28 for transactions that * are not relay-protected. */ v: Uint8Array; /** * r defines the x-coordinate of a point on the elliptic curve in the elliptic * curve digital signatute algorithm (ECDSA). It's crucial in ensuring * uniqueness of the signature. */ r: Uint8Array; /** * s define the signature value derived from the private key, message hash, * and the value of "r". It ensures that the signature is tied to both the * message and the private key of the sender. */ s: Uint8Array; } /** * AccessListTx is the data of EIP-2930 access list transactions. * It is a custom implementation of "AccessListTx" from * "github.com/ethereum/go-ethereum/core/types". */ export interface AccessListTx { /** chain_id of the destination EVM chain */ chainId: string; /** nonce corresponds to the account nonce (transaction sequence). */ nonce: Long; /** gas_price defines the value for each gas unit */ gasPrice: string; /** gas defines the gas limit defined for the transaction. */ gas: Long; /** to is the recipient address in hex format */ to: string; /** value defines the unsigned integer value of the transaction amount. */ value: string; /** data is the data payload bytes of the transaction. */ data: Uint8Array; /** accesses is an array of access tuples */ accesses: AccessTuple[]; /** * v defines the recovery id and "v" signature value from the elliptic curve * digital signatute algorithm (ECDSA). It indicates which of two possible * solutions should be used to reconstruct the public key from the signature. * In Ethereum, "v" takes the value 27 or 28 for transactions that are not * relay-protected. */ v: Uint8Array; /** * r defines the x-coordinate of a point on the elliptic curve in the elliptic * curve digital signatute algorithm (ECDSA). It's crucial in ensuring * uniqueness of the signature. */ r: Uint8Array; /** * s define the signature value derived from the private key, message hash, * and the value of "r". It ensures that the signature is tied to both the * message and the private key of the sender. */ s: Uint8Array; } /** * DynamicFeeTx is the data of EIP-1559 dynamic fee transactions. It is a custom * implementation of "DynamicFeeTx" from * "github.com/ethereum/go-ethereum/core/types". */ export interface DynamicFeeTx { /** chain_id of the destination EVM chain */ chainId: string; /** nonce corresponds to the account nonce (transaction sequence). */ nonce: Long; /** gas_tip_cap defines the max value for the gas tip */ gasTipCap: string; /** gas_fee_cap defines the max value for the gas fee */ gasFeeCap: string; /** gas defines the gas limit defined for the transaction. */ gas: Long; /** to is the hex formatted address of the recipient */ to: string; /** value defines the the transaction amount. */ value: string; /** data is the data payload bytes of the transaction. */ data: Uint8Array; /** accesses is an array of access tuples */ accesses: AccessTuple[]; /** * v defines the recovery id and "v" signature value from the elliptic curve * digital signatute algorithm (ECDSA). It indicates which of two possible * solutions should be used to reconstruct the public key from the signature. * In Ethereum, "v" takes the value 27 or 28 for transactions that are not * relay-protected. */ v: Uint8Array; /** * r defines the x-coordinate of a point on the elliptic curve in the elliptic * curve digital signatute algorithm (ECDSA). It's crucial in ensuring * uniqueness of the signature. */ r: Uint8Array; /** * s define the signature value derived from the private key, message hash, * and the value of "r". It ensures that the signature is tied to both the * message and the private key of the sender. */ s: Uint8Array; } /** ExtensionOptionsEthereumTx is an extension option for ethereum transactions */ export interface ExtensionOptionsEthereumTx { } /** MsgEthereumTxResponse defines the Msg/EthereumTx response type. */ export interface MsgEthereumTxResponse { /** * hash of the ethereum transaction in hex format. This hash differs from the * Tendermint sha256 hash of the transaction bytes. See * https://github.com/tendermint/tendermint/issues/6539 for reference */ hash: string; /** * logs contains the transaction hash and the proto-compatible ethereum * logs. */ logs: Log[]; /** * ret is the returned data from evm function (result or data supplied with * revert opcode) */ ret: Uint8Array; /** vm_error is the error returned by vm execution */ vmError: string; /** gas_used specifies how much gas was consumed by the transaction */ gasUsed: Long; } /** MsgUpdateParams defines a Msg for updating the x/evm module parameters. */ export interface MsgUpdateParams { /** authority is the address of the governance account. */ authority: string; /** * params defines the x/evm parameters to update. * NOTE: All parameters must be supplied. */ params?: Params; } /** * MsgUpdateParamsResponse defines the response structure for executing a * MsgUpdateParams message. */ export interface MsgUpdateParamsResponse { } /** * MsgCreateFunToken: Arguments to create a "FunToken" mapping. Either the ERC20 * contract address can be given to create the mapping to a Bank Coin, or the * denomination for a Bank Coin can be given to create the mapping to an ERC20. */ export interface MsgCreateFunToken { /** Hexadecimal address of the ERC20 token to which the `FunToken` maps */ fromErc20: string; /** Coin denomination in the Bank Module. */ fromBankDenom: string; /** Sender: Address for the signer of the transaction. */ sender: string; /** * Optional flag to allow the `FunToken` mapping to be created with 0 decimals * in the ERC20 sense. Often times, tokens are meant to behave like money and * be divisible, meaning "decimals = 0" is often a mistake. This field * defaults to false as a safety guard against accidental creation of * FunTokens with missing metadata. Set this to true if the token is truly * intended to have 0 decimals. */ allowZeroDecimals: boolean; } export interface MsgCreateFunTokenResponse { /** Fungible token mapping corresponding to ERC20 tokens. */ funtokenMapping?: FunToken; } /** MsgConvertCoinToEvm: Arguments to send a Bank Coin to ERC-20 representation */ export interface MsgConvertCoinToEvm { /** Hexadecimal address of the ERC20 token to which the `FunToken` maps */ toEthAddr: string; /** Sender: Address for the signer of the transaction. */ sender: string; /** Bank Coin to get converted to ERC20 */ bankCoin?: Coin; } export interface MsgConvertCoinToEvmResponse { } /** * MsgConvertEvmToCoin: Arguments to send an ERC20 token to bank coin * representation */ export interface MsgConvertEvmToCoin { /** * Sender: "nibi"-prefixed Bech32 address for the signer of the transaction. * This is also the address whose ERC20 balance will be deducted. */ sender: string; /** Hexadecimal address of the ERC20 token to be converted and sent */ erc20Addr: string; /** Amount of ERC20 tokens to convert */ amount: string; /** * Recipient address for the bank coins in Ethereum hexadecimal or * nibi-prefixed Bech32 format. * * Currently, accounts corresponding to Wasm contracts cannot hold ERC20 * tokens because the function that maps between Bech32 and Eth hex addresses * is not bijective for these types of accounts. * * See [bug(evm): nibid q evm account is not symmetric for wasm * addresses](https://github.com/NibiruChain/nibiru/issues/2138) */ toAddr: string; } export interface MsgConvertEvmToCoinResponse { } export declare const MsgEthereumTx: { encode(message: MsgEthereumTx, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgEthereumTx; fromJSON(object: any): MsgEthereumTx; toJSON(message: MsgEthereumTx): unknown; create, I>>(base?: I): MsgEthereumTx; fromPartial, I>>(object: I): MsgEthereumTx; }; export declare const LegacyTx: { encode(message: LegacyTx, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): LegacyTx; fromJSON(object: any): LegacyTx; toJSON(message: LegacyTx): unknown; create, I>>(base?: I): LegacyTx; fromPartial, I>>(object: I): LegacyTx; }; export declare const AccessListTx: { encode(message: AccessListTx, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AccessListTx; fromJSON(object: any): AccessListTx; toJSON(message: AccessListTx): unknown; create, I>>(base?: I): AccessListTx; fromPartial, I>>(object: I): AccessListTx; }; export declare const DynamicFeeTx: { encode(message: DynamicFeeTx, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DynamicFeeTx; fromJSON(object: any): DynamicFeeTx; toJSON(message: DynamicFeeTx): unknown; create, I>>(base?: I): DynamicFeeTx; fromPartial, I>>(object: I): DynamicFeeTx; }; export declare const ExtensionOptionsEthereumTx: { encode(_: ExtensionOptionsEthereumTx, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionOptionsEthereumTx; fromJSON(_: any): ExtensionOptionsEthereumTx; toJSON(_: ExtensionOptionsEthereumTx): unknown; create, I>>(base?: I): ExtensionOptionsEthereumTx; fromPartial, I>>(_: I): ExtensionOptionsEthereumTx; }; export declare const MsgEthereumTxResponse: { encode(message: MsgEthereumTxResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgEthereumTxResponse; fromJSON(object: any): MsgEthereumTxResponse; toJSON(message: MsgEthereumTxResponse): unknown; create, I>>(base?: I): MsgEthereumTxResponse; fromPartial, I>>(object: I): MsgEthereumTxResponse; }; export declare const MsgUpdateParams: { encode(message: MsgUpdateParams, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParams; fromJSON(object: any): MsgUpdateParams; toJSON(message: MsgUpdateParams): unknown; create, I>>(base?: I): MsgUpdateParams; fromPartial, I>>(object: I): MsgUpdateParams; }; export declare const MsgUpdateParamsResponse: { encode(_: MsgUpdateParamsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateParamsResponse; fromJSON(_: any): MsgUpdateParamsResponse; toJSON(_: MsgUpdateParamsResponse): unknown; create, I>>(base?: I): MsgUpdateParamsResponse; fromPartial, I>>(_: I): MsgUpdateParamsResponse; }; export declare const MsgCreateFunToken: { encode(message: MsgCreateFunToken, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateFunToken; fromJSON(object: any): MsgCreateFunToken; toJSON(message: MsgCreateFunToken): unknown; create, I>>(base?: I): MsgCreateFunToken; fromPartial, I>>(object: I): MsgCreateFunToken; }; export declare const MsgCreateFunTokenResponse: { encode(message: MsgCreateFunTokenResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateFunTokenResponse; fromJSON(object: any): MsgCreateFunTokenResponse; toJSON(message: MsgCreateFunTokenResponse): unknown; create, I>>(base?: I): MsgCreateFunTokenResponse; fromPartial, I>>(object: I): MsgCreateFunTokenResponse; }; export declare const MsgConvertCoinToEvm: { encode(message: MsgConvertCoinToEvm, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgConvertCoinToEvm; fromJSON(object: any): MsgConvertCoinToEvm; toJSON(message: MsgConvertCoinToEvm): unknown; create, I>>(base?: I): MsgConvertCoinToEvm; fromPartial, I>>(object: I): MsgConvertCoinToEvm; }; export declare const MsgConvertCoinToEvmResponse: { encode(_: MsgConvertCoinToEvmResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgConvertCoinToEvmResponse; fromJSON(_: any): MsgConvertCoinToEvmResponse; toJSON(_: MsgConvertCoinToEvmResponse): unknown; create, I>>(base?: I): MsgConvertCoinToEvmResponse; fromPartial, I>>(_: I): MsgConvertCoinToEvmResponse; }; export declare const MsgConvertEvmToCoin: { encode(message: MsgConvertEvmToCoin, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgConvertEvmToCoin; fromJSON(object: any): MsgConvertEvmToCoin; toJSON(message: MsgConvertEvmToCoin): unknown; create, I>>(base?: I): MsgConvertEvmToCoin; fromPartial, I>>(object: I): MsgConvertEvmToCoin; }; export declare const MsgConvertEvmToCoinResponse: { encode(_: MsgConvertEvmToCoinResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MsgConvertEvmToCoinResponse; fromJSON(_: any): MsgConvertEvmToCoinResponse; toJSON(_: MsgConvertEvmToCoinResponse): unknown; create, I>>(base?: I): MsgConvertEvmToCoinResponse; fromPartial, I>>(_: I): MsgConvertEvmToCoinResponse; }; /** Msg defines the evm Msg service. */ export interface Msg { /** EthereumTx defines a method submitting Ethereum transactions. */ EthereumTx(request: MsgEthereumTx): Promise; /** * UpdateParams defined a governance operation for updating the x/evm module * parameters. The authority is hard-coded to the x/gov module account */ UpdateParams(request: MsgUpdateParams): Promise; /** * CreateFunToken: Create a "FunToken" mapping. Either the ERC20 contract * address can be given to create the mapping to a Bank Coin, or the * denomination for a Bank Coin can be given to create the mapping to an * ERC20. */ CreateFunToken(request: MsgCreateFunToken): Promise; /** * ConvertCoinToEvm: Sends a coin with a valid "FunToken" mapping to the * given recipient address ("to_eth_addr") in the corresponding ERC20 * representation. */ ConvertCoinToEvm(request: MsgConvertCoinToEvm): Promise; /** * ConvertEvmToCoin: Sends an ERC20 token with a valid "FunToken" mapping to * the given recipient address as a bank coin. */ ConvertEvmToCoin(request: MsgConvertEvmToCoin): Promise; } export declare const MsgServiceName = "eth.evm.v1.Msg"; export declare class MsgClientImpl implements Msg { private readonly rpc; private readonly service; constructor(rpc: Rpc, opts?: { service?: string; }); EthereumTx(request: MsgEthereumTx): Promise; UpdateParams(request: MsgUpdateParams): Promise; CreateFunToken(request: MsgCreateFunToken): Promise; ConvertCoinToEvm(request: MsgConvertCoinToEvm): Promise; ConvertEvmToCoin(request: MsgConvertEvmToCoin): Promise; } interface Rpc { request(service: string, method: string, data: Uint8Array): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude>]: never; }; export {}; //# sourceMappingURL=tx.d.ts.map