diff --git a/.gitignore b/.gitignore index e7e97f12830..a70e963ded9 100644 --- a/.gitignore +++ b/.gitignore @@ -35,22 +35,22 @@ swift/Sources/Generated swift/wallet-core/ codegen-v2/bindings/ -src/Generated/*.h +# src/Generated/*.h src/Generated/*.cpp -include/TrustWalletCore/TWHRP.h -include/TrustWalletCore/TW*Proto.h -include/TrustWalletCore/TWEthereumChainID.h +# include/TrustWalletCore/TWHRP.h +# include/TrustWalletCore/TW*Proto.h +# include/TrustWalletCore/TWEthereumChainID.h # Generated -include/TrustWalletCore/TWTONAddressConverter.h -include/TrustWalletCore/TWFFITest.h -include/TrustWalletCore/TWTONWallet.h -include/TrustWalletCore/TWTONMessageSigner.h -include/TrustWalletCore/TWMessageSigner.h -include/TrustWalletCore/TWWalletConnectRequest.h -include/TrustWalletCore/TWSolanaTransaction.h -include/TrustWalletCore/TWCryptoBoxPublicKey.h -include/TrustWalletCore/TWCryptoBoxSecretKey.h +# include/TrustWalletCore/TWTONAddressConverter.h +# include/TrustWalletCore/TWFFITest.h +# include/TrustWalletCore/TWTONWallet.h +# include/TrustWalletCore/TWTONMessageSigner.h +# include/TrustWalletCore/TWMessageSigner.h +# include/TrustWalletCore/TWWalletConnectRequest.h +# include/TrustWalletCore/TWSolanaTransaction.h +# include/TrustWalletCore/TWCryptoBoxPublicKey.h +# include/TrustWalletCore/TWCryptoBoxSecretKey.h # Wasm emsdk/ @@ -80,3 +80,5 @@ samples/cpp/sample # Rust target build **/target/ + +main diff --git a/go.mod b/go.mod new file mode 100644 index 00000000000..0dfa302e8d1 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/Cramiumlabs/wallet-core + +go 1.22.5 + +require google.golang.org/protobuf v1.36.6 diff --git a/go.sum b/go.sum new file mode 100644 index 00000000000..4665b5a0fb9 --- /dev/null +++ b/go.sum @@ -0,0 +1,6 @@ +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= diff --git a/include/TrustWalletCore/TWAeternityProto.h b/include/TrustWalletCore/TWAeternityProto.h new file mode 100644 index 00000000000..364480089ba --- /dev/null +++ b/include/TrustWalletCore/TWAeternityProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Aeternity_Proto_SigningInput; +typedef TWData *_Nonnull TW_Aeternity_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWAionProto.h b/include/TrustWalletCore/TWAionProto.h new file mode 100644 index 00000000000..fafeaa9371a --- /dev/null +++ b/include/TrustWalletCore/TWAionProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Aion_Proto_SigningInput; +typedef TWData *_Nonnull TW_Aion_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWAlgorandProto.h b/include/TrustWalletCore/TWAlgorandProto.h new file mode 100644 index 00000000000..f7b80e73a75 --- /dev/null +++ b/include/TrustWalletCore/TWAlgorandProto.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Algorand_Proto_Transfer; +typedef TWData *_Nonnull TW_Algorand_Proto_AssetTransfer; +typedef TWData *_Nonnull TW_Algorand_Proto_AssetOptIn; +typedef TWData *_Nonnull TW_Algorand_Proto_SigningInput; +typedef TWData *_Nonnull TW_Algorand_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWAptosProto.h b/include/TrustWalletCore/TWAptosProto.h new file mode 100644 index 00000000000..efbb673b337 --- /dev/null +++ b/include/TrustWalletCore/TWAptosProto.h @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Aptos_Proto_TransferMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_StructTag; +typedef TWData *_Nonnull TW_Aptos_Proto_TokenTransferMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_TokenTransferCoinsMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_FungibleAssetTransferMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_ManagedTokensRegisterMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_CreateAccountMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_OfferNftMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_CancelOfferNftMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_ClaimNftMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_TortugaClaim; +typedef TWData *_Nonnull TW_Aptos_Proto_TortugaStake; +typedef TWData *_Nonnull TW_Aptos_Proto_TortugaUnstake; +typedef TWData *_Nonnull TW_Aptos_Proto_LiquidStaking; +typedef TWData *_Nonnull TW_Aptos_Proto_NftMessage; +typedef TWData *_Nonnull TW_Aptos_Proto_SigningInput; +typedef TWData *_Nonnull TW_Aptos_Proto_TransactionAuthenticator; +typedef TWData *_Nonnull TW_Aptos_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWBabylonStakingProto.h b/include/TrustWalletCore/TWBabylonStakingProto.h new file mode 100644 index 00000000000..39f54f0ab80 --- /dev/null +++ b/include/TrustWalletCore/TWBabylonStakingProto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_BabylonStaking_Proto_PublicKeySignature; +typedef TWData *_Nonnull TW_BabylonStaking_Proto_StakingInfo; +typedef TWData *_Nonnull TW_BabylonStaking_Proto_InputBuilder; +typedef TWData *_Nonnull TW_BabylonStaking_Proto_OutputBuilder; diff --git a/include/TrustWalletCore/TWBarzProto.h b/include/TrustWalletCore/TWBarzProto.h new file mode 100644 index 00000000000..6529a6dae82 --- /dev/null +++ b/include/TrustWalletCore/TWBarzProto.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Barz_Proto_ContractAddressInput; +typedef TWData *_Nonnull TW_Barz_Proto_FacetCut; +typedef TWData *_Nonnull TW_Barz_Proto_DiamondCutInput; diff --git a/include/TrustWalletCore/TWBinanceProto.h b/include/TrustWalletCore/TWBinanceProto.h new file mode 100644 index 00000000000..10a67152915 --- /dev/null +++ b/include/TrustWalletCore/TWBinanceProto.h @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Binance_Proto_Transaction; +typedef TWData *_Nonnull TW_Binance_Proto_Signature; +typedef TWData *_Nonnull TW_Binance_Proto_TradeOrder; +typedef TWData *_Nonnull TW_Binance_Proto_CancelTradeOrder; +typedef TWData *_Nonnull TW_Binance_Proto_SendOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TokenIssueOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TokenMintOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TokenBurnOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TokenFreezeOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TokenUnfreezeOrder; +typedef TWData *_Nonnull TW_Binance_Proto_HTLTOrder; +typedef TWData *_Nonnull TW_Binance_Proto_DepositHTLTOrder; +typedef TWData *_Nonnull TW_Binance_Proto_ClaimHTLOrder; +typedef TWData *_Nonnull TW_Binance_Proto_RefundHTLTOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TransferOut; +typedef TWData *_Nonnull TW_Binance_Proto_SideChainDelegate; +typedef TWData *_Nonnull TW_Binance_Proto_SideChainRedelegate; +typedef TWData *_Nonnull TW_Binance_Proto_SideChainUndelegate; +typedef TWData *_Nonnull TW_Binance_Proto_SideChainStakeMigration; +typedef TWData *_Nonnull TW_Binance_Proto_TimeLockOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TimeRelockOrder; +typedef TWData *_Nonnull TW_Binance_Proto_TimeUnlockOrder; +typedef TWData *_Nonnull TW_Binance_Proto_SigningInput; +typedef TWData *_Nonnull TW_Binance_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWBitcoinProto.h b/include/TrustWalletCore/TWBitcoinProto.h new file mode 100644 index 00000000000..d24514057ff --- /dev/null +++ b/include/TrustWalletCore/TWBitcoinProto.h @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Bitcoin_Proto_Transaction; +typedef TWData *_Nonnull TW_Bitcoin_Proto_TransactionInput; +typedef TWData *_Nonnull TW_Bitcoin_Proto_OutPoint; +typedef TWData *_Nonnull TW_Bitcoin_Proto_TransactionOutput; +typedef TWData *_Nonnull TW_Bitcoin_Proto_UnspentTransaction; +typedef TWData *_Nonnull TW_Bitcoin_Proto_OutputAddress; +typedef TWData *_Nonnull TW_Bitcoin_Proto_OutputIndex; +typedef TWData *_Nonnull TW_Bitcoin_Proto_SigningInput; +typedef TWData *_Nonnull TW_Bitcoin_Proto_TransactionPlan; +typedef TWData *_Nonnull TW_Bitcoin_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Bitcoin_Proto_HashPublicKey; +typedef TWData *_Nonnull TW_Bitcoin_Proto_PreSigningOutput; diff --git a/include/TrustWalletCore/TWBitcoinV2Proto.h b/include/TrustWalletCore/TWBitcoinV2Proto.h new file mode 100644 index 00000000000..a82438b1cbd --- /dev/null +++ b/include/TrustWalletCore/TWBitcoinV2Proto.h @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_BitcoinV2_Proto_PublicKeyOrHash; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_PublicKeySignature; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_Input; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_Output; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_ChainInfo; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_TransactionBuilder; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_Psbt; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_SigningInput; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_TransactionPlan; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_PreSigningOutput; +typedef TWData *_Nonnull TW_BitcoinV2_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWCardanoProto.h b/include/TrustWalletCore/TWCardanoProto.h new file mode 100644 index 00000000000..f289838bc55 --- /dev/null +++ b/include/TrustWalletCore/TWCardanoProto.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Cardano_Proto_OutPoint; +typedef TWData *_Nonnull TW_Cardano_Proto_TokenAmount; +typedef TWData *_Nonnull TW_Cardano_Proto_TxInput; +typedef TWData *_Nonnull TW_Cardano_Proto_TxOutput; +typedef TWData *_Nonnull TW_Cardano_Proto_TokenBundle; +typedef TWData *_Nonnull TW_Cardano_Proto_Transfer; +typedef TWData *_Nonnull TW_Cardano_Proto_RegisterStakingKey; +typedef TWData *_Nonnull TW_Cardano_Proto_DeregisterStakingKey; +typedef TWData *_Nonnull TW_Cardano_Proto_VoteDelegation; +typedef TWData *_Nonnull TW_Cardano_Proto_Delegate; +typedef TWData *_Nonnull TW_Cardano_Proto_Withdraw; +typedef TWData *_Nonnull TW_Cardano_Proto_TransactionPlan; +typedef TWData *_Nonnull TW_Cardano_Proto_SigningInput; +typedef TWData *_Nonnull TW_Cardano_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWCommonProto.h b/include/TrustWalletCore/TWCommonProto.h new file mode 100644 index 00000000000..582af2afcde --- /dev/null +++ b/include/TrustWalletCore/TWCommonProto.h @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + diff --git a/include/TrustWalletCore/TWCosmosProto.h b/include/TrustWalletCore/TWCosmosProto.h new file mode 100644 index 00000000000..36807e8e356 --- /dev/null +++ b/include/TrustWalletCore/TWCosmosProto.h @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Cosmos_Proto_Amount; +typedef TWData *_Nonnull TW_Cosmos_Proto_Fee; +typedef TWData *_Nonnull TW_Cosmos_Proto_Height; +typedef TWData *_Nonnull TW_Cosmos_Proto_THORChainAsset; +typedef TWData *_Nonnull TW_Cosmos_Proto_THORChainCoin; +typedef TWData *_Nonnull TW_Cosmos_Proto_Message; +typedef TWData *_Nonnull TW_Cosmos_Proto_SignerInfo; +typedef TWData *_Nonnull TW_Cosmos_Proto_SigningInput; +typedef TWData *_Nonnull TW_Cosmos_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWCryptoBoxPublicKey.h b/include/TrustWalletCore/TWCryptoBoxPublicKey.h new file mode 100644 index 00000000000..1da9472bfdf --- /dev/null +++ b/include/TrustWalletCore/TWCryptoBoxPublicKey.h @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWData.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWCryptoBoxPublicKey; + +/// Determines if the given public key is valid or not. +/// +/// \param data *non-null* byte array. +/// \return true if the public key is valid, false otherwise. +TW_EXPORT_STATIC_METHOD bool TWCryptoBoxPublicKeyIsValid(TWData *_Nonnull data); + +/// Create a `crypto_box` public key with the given block of data. +/// +/// \param data *non-null* byte array. Expected to have 32 bytes. +/// \note Should be deleted with \tw_crypto_box_public_key_delete. +/// \return Nullable pointer to Public Key. +TW_EXPORT_STATIC_METHOD struct TWCryptoBoxPublicKey *_Nullable TWCryptoBoxPublicKeyCreateWithData(TWData *_Nonnull data); + +/// Returns the raw data of a given public-key. +/// +/// \param public_key *non-null* pointer to a public key. +/// \return C-compatible result with a C-compatible byte array. +TW_EXPORT_PROPERTY TWData *_Nonnull TWCryptoBoxPublicKeyData(struct TWCryptoBoxPublicKey *_Nonnull publicKey); + +/// Delete the given public key. +/// +/// \param public_key *non-null* pointer to public key. +TW_EXPORT_METHOD void TWCryptoBoxPublicKeyDelete(struct TWCryptoBoxPublicKey *_Nonnull publicKey); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWCryptoBoxSecretKey.h b/include/TrustWalletCore/TWCryptoBoxSecretKey.h new file mode 100644 index 00000000000..5065a49313f --- /dev/null +++ b/include/TrustWalletCore/TWCryptoBoxSecretKey.h @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWData.h" +#include "TWCryptoBoxPublicKey.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWCryptoBoxSecretKey; + +/// Determines if the given secret key is valid or not. +/// +/// \param data *non-null* byte array. +/// \return true if the secret key is valid, false otherwise. +TW_EXPORT_STATIC_METHOD bool TWCryptoBoxSecretKeyIsValid(TWData *_Nonnull data); + +/// Create a random secret key. +/// +/// \note Should be deleted with \tw_crypto_box_secret_key_delete. +/// \return Nullable pointer to Private Key. +TW_EXPORT_STATIC_METHOD struct TWCryptoBoxSecretKey *_Nonnull TWCryptoBoxSecretKeyCreate(); + +/// Create a `crypto_box` secret key with the given block of data. +/// +/// \param data *non-null* byte array. Expected to have 32 bytes. +/// \note Should be deleted with \tw_crypto_box_secret_key_delete. +/// \return Nullable pointer to Secret Key. +TW_EXPORT_STATIC_METHOD struct TWCryptoBoxSecretKey *_Nullable TWCryptoBoxSecretKeyCreateWithData(TWData *_Nonnull data); + +/// Returns the public key associated with the given `key`. +/// +/// \param key *non-null* pointer to the private key. +/// \return *non-null* pointer to the corresponding public key. +TW_EXPORT_METHOD struct TWCryptoBoxPublicKey *_Nonnull TWCryptoBoxSecretKeyGetPublicKey(struct TWCryptoBoxSecretKey *_Nonnull key); + +/// Returns the raw data of a given secret-key. +/// +/// \param secret_key *non-null* pointer to a secret key. +/// \return C-compatible result with a C-compatible byte array. +TW_EXPORT_PROPERTY TWData *_Nonnull TWCryptoBoxSecretKeyData(struct TWCryptoBoxSecretKey *_Nonnull secretKey); + +/// Delete the given secret `key`. +/// +/// \param key *non-null* pointer to secret key. +TW_EXPORT_METHOD void TWCryptoBoxSecretKeyDelete(struct TWCryptoBoxSecretKey *_Nonnull key); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWDecredProto.h b/include/TrustWalletCore/TWDecredProto.h new file mode 100644 index 00000000000..f28905ac8cc --- /dev/null +++ b/include/TrustWalletCore/TWDecredProto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Decred_Proto_Transaction; +typedef TWData *_Nonnull TW_Decred_Proto_TransactionInput; +typedef TWData *_Nonnull TW_Decred_Proto_TransactionOutput; +typedef TWData *_Nonnull TW_Decred_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWDecredV2Proto.h b/include/TrustWalletCore/TWDecredV2Proto.h new file mode 100644 index 00000000000..368729f4042 --- /dev/null +++ b/include/TrustWalletCore/TWDecredV2Proto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_DecredV2_Proto_OutPoint; +typedef TWData *_Nonnull TW_DecredV2_Proto_Transaction; +typedef TWData *_Nonnull TW_DecredV2_Proto_TransactionInput; +typedef TWData *_Nonnull TW_DecredV2_Proto_TransactionOutput; diff --git a/include/TrustWalletCore/TWEOSProto.h b/include/TrustWalletCore/TWEOSProto.h new file mode 100644 index 00000000000..aced21ec23d --- /dev/null +++ b/include/TrustWalletCore/TWEOSProto.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_EOS_Proto_Asset; +typedef TWData *_Nonnull TW_EOS_Proto_SigningInput; +typedef TWData *_Nonnull TW_EOS_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWEthereumAbiProto.h b/include/TrustWalletCore/TWEthereumAbiProto.h new file mode 100644 index 00000000000..e113de9e5c4 --- /dev/null +++ b/include/TrustWalletCore/TWEthereumAbiProto.h @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_EthereumAbi_Proto_BoolType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_NumberNType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_StringType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_AddressType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ArrayType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_FixedArrayType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ByteArrayType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ByteArrayFixType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_TupleType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_Param; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ParamType; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_NumberNParam; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ArrayParam; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_TupleParam; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_Token; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ContractCallDecodingInput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ContractCallDecodingOutput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_AbiParams; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ParamsDecodingInput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ParamsDecodingOutput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ValueDecodingInput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_ValueDecodingOutput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_FunctionEncodingInput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_FunctionEncodingOutput; +typedef TWData *_Nonnull TW_EthereumAbi_Proto_FunctionGetTypeInput; diff --git a/include/TrustWalletCore/TWEthereumChainID.h b/include/TrustWalletCore/TWEthereumChainID.h new file mode 100644 index 00000000000..e4f98f78bba --- /dev/null +++ b/include/TrustWalletCore/TWEthereumChainID.h @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE from \registry.json, changes made here WILL BE LOST. +// + +#pragma once + +#include "TWBase.h" + +TW_EXTERN_C_BEGIN + +/// Chain identifiers for Ethereum-based blockchains, for convenience. Recommended to use the dynamic CoinType.ChainId() instead. +/// See also TWChainId. +TW_EXPORT_ENUM(uint32_t) +enum TWEthereumChainID { + TWEthereumChainIDEthereum = 1, + TWEthereumChainIDClassic = 61, + TWEthereumChainIDRootstock = 30, + TWEthereumChainIDManta = 169, + TWEthereumChainIDPoa = 99, + TWEthereumChainIDOpbnb = 204, + TWEthereumChainIDTfuelevm = 361, + TWEthereumChainIDVechain = 74, + TWEthereumChainIDCallisto = 820, + TWEthereumChainIDViction = 88, + TWEthereumChainIDPolygon = 137, + TWEthereumChainIDOkc = 66, + TWEthereumChainIDThundertoken = 108, + TWEthereumChainIDCfxevm = 1030, + TWEthereumChainIDLightlink = 1890, + TWEthereumChainIDMerlin = 4200, + TWEthereumChainIDMantle = 5000, + TWEthereumChainIDBouncebit = 6001, + TWEthereumChainIDGochain = 60, + TWEthereumChainIDZeneon = 7332, + TWEthereumChainIDBase = 8453, + TWEthereumChainIDMeter = 82, + TWEthereumChainIDCelo = 42220, + TWEthereumChainIDLinea = 59144, + TWEthereumChainIDBlast = 81457, + TWEthereumChainIDScroll = 534352, + TWEthereumChainIDZklinknova = 810180, + TWEthereumChainIDWanchain = 888, + TWEthereumChainIDCronos = 25, + TWEthereumChainIDOptimism = 10, + TWEthereumChainIDXdai = 100, + TWEthereumChainIDSmartbch = 10000, + TWEthereumChainIDSonic = 146, + TWEthereumChainIDFantom = 250, + TWEthereumChainIDBoba = 288, + TWEthereumChainIDKcc = 321, + TWEthereumChainIDZksync = 324, + TWEthereumChainIDHeco = 128, + TWEthereumChainIDAcalaevm = 787, + TWEthereumChainIDMetis = 1088, + TWEthereumChainIDPolygonzkevm = 1101, + TWEthereumChainIDMoonbeam = 1284, + TWEthereumChainIDMoonriver = 1285, + TWEthereumChainIDRonin = 2020, + TWEthereumChainIDKavaevm = 2222, + TWEthereumChainIDIotexevm = 4689, + TWEthereumChainIDKaia = 8217, + TWEthereumChainIDAvalanchec = 43114, + TWEthereumChainIDEvmos = 9001, + TWEthereumChainIDArbitrumnova = 42170, + TWEthereumChainIDArbitrum = 42161, + TWEthereumChainIDSmartchain = 56, + TWEthereumChainIDZetaevm = 7000, + TWEthereumChainIDNeon = 245022934, + TWEthereumChainIDAurora = 1313161554, +}; + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWEthereumProto.h b/include/TrustWalletCore/TWEthereumProto.h new file mode 100644 index 00000000000..ad8a21383c9 --- /dev/null +++ b/include/TrustWalletCore/TWEthereumProto.h @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Ethereum_Proto_Transaction; +typedef TWData *_Nonnull TW_Ethereum_Proto_UserOperation; +typedef TWData *_Nonnull TW_Ethereum_Proto_UserOperationV0_7; +typedef TWData *_Nonnull TW_Ethereum_Proto_Access; +typedef TWData *_Nonnull TW_Ethereum_Proto_Authorization; +typedef TWData *_Nonnull TW_Ethereum_Proto_AuthorizationCustomSignature; +typedef TWData *_Nonnull TW_Ethereum_Proto_SigningInput; +typedef TWData *_Nonnull TW_Ethereum_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Ethereum_Proto_MaybeChainId; +typedef TWData *_Nonnull TW_Ethereum_Proto_MessageSigningInput; +typedef TWData *_Nonnull TW_Ethereum_Proto_MessageSigningOutput; +typedef TWData *_Nonnull TW_Ethereum_Proto_MessageVerifyingInput; diff --git a/include/TrustWalletCore/TWEthereumRlpProto.h b/include/TrustWalletCore/TWEthereumRlpProto.h new file mode 100644 index 00000000000..90389118529 --- /dev/null +++ b/include/TrustWalletCore/TWEthereumRlpProto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_EthereumRlp_Proto_RlpList; +typedef TWData *_Nonnull TW_EthereumRlp_Proto_RlpItem; +typedef TWData *_Nonnull TW_EthereumRlp_Proto_EncodingInput; +typedef TWData *_Nonnull TW_EthereumRlp_Proto_EncodingOutput; diff --git a/include/TrustWalletCore/TWEverscaleProto.h b/include/TrustWalletCore/TWEverscaleProto.h new file mode 100644 index 00000000000..ea34704bfe7 --- /dev/null +++ b/include/TrustWalletCore/TWEverscaleProto.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Everscale_Proto_Transfer; +typedef TWData *_Nonnull TW_Everscale_Proto_SigningInput; +typedef TWData *_Nonnull TW_Everscale_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWFIOProto.h b/include/TrustWalletCore/TWFIOProto.h new file mode 100644 index 00000000000..92bd1beead7 --- /dev/null +++ b/include/TrustWalletCore/TWFIOProto.h @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_FIO_Proto_PublicAddress; +typedef TWData *_Nonnull TW_FIO_Proto_NewFundsContent; +typedef TWData *_Nonnull TW_FIO_Proto_Action; +typedef TWData *_Nonnull TW_FIO_Proto_ChainParams; +typedef TWData *_Nonnull TW_FIO_Proto_SigningInput; +typedef TWData *_Nonnull TW_FIO_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWFilecoinProto.h b/include/TrustWalletCore/TWFilecoinProto.h new file mode 100644 index 00000000000..865e93bb8bd --- /dev/null +++ b/include/TrustWalletCore/TWFilecoinProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Filecoin_Proto_SigningInput; +typedef TWData *_Nonnull TW_Filecoin_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWGreenfieldProto.h b/include/TrustWalletCore/TWGreenfieldProto.h new file mode 100644 index 00000000000..db9d8c22614 --- /dev/null +++ b/include/TrustWalletCore/TWGreenfieldProto.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Greenfield_Proto_Amount; +typedef TWData *_Nonnull TW_Greenfield_Proto_Fee; +typedef TWData *_Nonnull TW_Greenfield_Proto_Message; +typedef TWData *_Nonnull TW_Greenfield_Proto_SigningInput; +typedef TWData *_Nonnull TW_Greenfield_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWHRP.h b/include/TrustWalletCore/TWHRP.h new file mode 100644 index 00000000000..c9da19aa740 --- /dev/null +++ b/include/TrustWalletCore/TWHRP.h @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE from \registry.json, changes made here WILL BE LOST. +// + +#pragma once + +#include "TWBase.h" + +TW_EXTERN_C_BEGIN + +/// Registered human-readable parts for BIP-0173 +/// +/// - SeeAlso: https://github.com/satoshilabs/slips/blob/master/slip-0173.md +TW_EXPORT_ENUM() +enum TWHRP { + TWHRPUnknown /* "" */, + TWHRPBitcoin /* "bc" */, + TWHRPLitecoin /* "ltc" */, + TWHRPViacoin /* "via" */, + TWHRPGroestlcoin /* "grs" */, + TWHRPDigiByte /* "dgb" */, + TWHRPMonacoin /* "mona" */, + TWHRPSyscoin /* "sys" */, + TWHRPVerge /* "vg" */, + TWHRPCosmos /* "cosmos" */, + TWHRPBitcoinCash /* "bitcoincash" */, + TWHRPBitcoinGold /* "btg" */, + TWHRPIoTeX /* "io" */, + TWHRPNervos /* "ckb" */, + TWHRPZilliqa /* "zil" */, + TWHRPTerra /* "terra" */, + TWHRPCryptoOrg /* "cro" */, + TWHRPKava /* "kava" */, + TWHRPOasis /* "oasis" */, + TWHRPBluzelle /* "bluzelle" */, + TWHRPBandChain /* "band" */, + TWHRPMultiversX /* "erd" */, + TWHRPSecret /* "secret" */, + TWHRPAgoric /* "agoric" */, + TWHRPBinance /* "bnb" */, + TWHRPECash /* "ecash" */, + TWHRPTHORChain /* "thor" */, + TWHRPBitcoinDiamond /* "bcd" */, + TWHRPHarmony /* "one" */, + TWHRPCardano /* "addr" */, + TWHRPQtum /* "qc" */, + TWHRPPactus /* "pc" */, + TWHRPStratis /* "strax" */, + TWHRPNativeInjective /* "inj" */, + TWHRPOsmosis /* "osmo" */, + TWHRPTerraV2 /* "terra" */, + TWHRPCoreum /* "core" */, + TWHRPNativeZetaChain /* "zeta" */, + TWHRPNativeCanto /* "canto" */, + TWHRPSommelier /* "somm" */, + TWHRPFetchAI /* "fetch" */, + TWHRPMars /* "mars" */, + TWHRPUmee /* "umee" */, + TWHRPQuasar /* "quasar" */, + TWHRPPersistence /* "persistence" */, + TWHRPAkash /* "akash" */, + TWHRPNoble /* "noble" */, + TWHRPSei /* "sei" */, + TWHRPStargaze /* "stars" */, + TWHRPNativeEvmos /* "evmos" */, + TWHRPTia /* "celestia" */, + TWHRPDydx /* "dydx" */, + TWHRPJuno /* "juno" */, + TWHRPTBinance /* "tbnb" */, + TWHRPStride /* "stride" */, + TWHRPAxelar /* "axelar" */, + TWHRPCrescent /* "cre" */, + TWHRPKujira /* "kujira" */, + TWHRPComdex /* "comdex" */, + TWHRPNeutron /* "neutron" */, +}; + +static const char *_Nonnull HRP_BITCOIN = "bc"; +static const char *_Nonnull HRP_LITECOIN = "ltc"; +static const char *_Nonnull HRP_VIACOIN = "via"; +static const char *_Nonnull HRP_GROESTLCOIN = "grs"; +static const char *_Nonnull HRP_DIGIBYTE = "dgb"; +static const char *_Nonnull HRP_MONACOIN = "mona"; +static const char *_Nonnull HRP_SYSCOIN = "sys"; +static const char *_Nonnull HRP_VERGE = "vg"; +static const char *_Nonnull HRP_COSMOS = "cosmos"; +static const char *_Nonnull HRP_BITCOINCASH = "bitcoincash"; +static const char *_Nonnull HRP_BITCOINGOLD = "btg"; +static const char *_Nonnull HRP_IOTEX = "io"; +static const char *_Nonnull HRP_NERVOS = "ckb"; +static const char *_Nonnull HRP_ZILLIQA = "zil"; +static const char *_Nonnull HRP_TERRA = "terra"; +static const char *_Nonnull HRP_CRYPTOORG = "cro"; +static const char *_Nonnull HRP_KAVA = "kava"; +static const char *_Nonnull HRP_OASIS = "oasis"; +static const char *_Nonnull HRP_BLUZELLE = "bluzelle"; +static const char *_Nonnull HRP_BAND = "band"; +static const char *_Nonnull HRP_ELROND = "erd"; +static const char *_Nonnull HRP_SECRET = "secret"; +static const char *_Nonnull HRP_AGORIC = "agoric"; +static const char *_Nonnull HRP_BINANCE = "bnb"; +static const char *_Nonnull HRP_ECASH = "ecash"; +static const char *_Nonnull HRP_THORCHAIN = "thor"; +static const char *_Nonnull HRP_BITCOINDIAMOND = "bcd"; +static const char *_Nonnull HRP_HARMONY = "one"; +static const char *_Nonnull HRP_CARDANO = "addr"; +static const char *_Nonnull HRP_QTUM = "qc"; +static const char *_Nonnull HRP_PACTUS = "pc"; +static const char *_Nonnull HRP_STRATIS = "strax"; +static const char *_Nonnull HRP_NATIVEINJECTIVE = "inj"; +static const char *_Nonnull HRP_OSMOSIS = "osmo"; +static const char *_Nonnull HRP_TERRAV2 = "terra"; +static const char *_Nonnull HRP_COREUM = "core"; +static const char *_Nonnull HRP_ZETACHAIN = "zeta"; +static const char *_Nonnull HRP_NATIVECANTO = "canto"; +static const char *_Nonnull HRP_SOMMELIER = "somm"; +static const char *_Nonnull HRP_FETCHAI = "fetch"; +static const char *_Nonnull HRP_MARS = "mars"; +static const char *_Nonnull HRP_UMEE = "umee"; +static const char *_Nonnull HRP_QUASAR = "quasar"; +static const char *_Nonnull HRP_PERSISTENCE = "persistence"; +static const char *_Nonnull HRP_AKASH = "akash"; +static const char *_Nonnull HRP_NOBLE = "noble"; +static const char *_Nonnull HRP_SEI = "sei"; +static const char *_Nonnull HRP_STARGAZE = "stars"; +static const char *_Nonnull HRP_NATIVEEVMOS = "evmos"; +static const char *_Nonnull HRP_TIA = "celestia"; +static const char *_Nonnull HRP_DYDX = "dydx"; +static const char *_Nonnull HRP_JUNO = "juno"; +static const char *_Nonnull HRP_TBINANCE = "tbnb"; +static const char *_Nonnull HRP_STRIDE = "stride"; +static const char *_Nonnull HRP_AXELAR = "axelar"; +static const char *_Nonnull HRP_CRESCENT = "cre"; +static const char *_Nonnull HRP_KUJIRA = "kujira"; +static const char *_Nonnull HRP_COMDEX = "comdex"; +static const char *_Nonnull HRP_NEUTRON = "neutron"; + +const char *_Nullable stringForHRP(enum TWHRP hrp); +enum TWHRP hrpForString(const char *_Nonnull string); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWHarmonyProto.h b/include/TrustWalletCore/TWHarmonyProto.h new file mode 100644 index 00000000000..d0d09b5c743 --- /dev/null +++ b/include/TrustWalletCore/TWHarmonyProto.h @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Harmony_Proto_SigningInput; +typedef TWData *_Nonnull TW_Harmony_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Harmony_Proto_TransactionMessage; +typedef TWData *_Nonnull TW_Harmony_Proto_StakingMessage; +typedef TWData *_Nonnull TW_Harmony_Proto_Description; +typedef TWData *_Nonnull TW_Harmony_Proto_Decimal; +typedef TWData *_Nonnull TW_Harmony_Proto_CommissionRate; +typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveCreateValidator; +typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveEditValidator; +typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveDelegate; +typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveUndelegate; +typedef TWData *_Nonnull TW_Harmony_Proto_DirectiveCollectRewards; diff --git a/include/TrustWalletCore/TWHederaProto.h b/include/TrustWalletCore/TWHederaProto.h new file mode 100644 index 00000000000..903d6011952 --- /dev/null +++ b/include/TrustWalletCore/TWHederaProto.h @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Hedera_Proto_Timestamp; +typedef TWData *_Nonnull TW_Hedera_Proto_TransactionID; +typedef TWData *_Nonnull TW_Hedera_Proto_TransferMessage; +typedef TWData *_Nonnull TW_Hedera_Proto_TransactionBody; +typedef TWData *_Nonnull TW_Hedera_Proto_SigningInput; +typedef TWData *_Nonnull TW_Hedera_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWIOSTProto.h b/include/TrustWalletCore/TWIOSTProto.h new file mode 100644 index 00000000000..b014dd708cc --- /dev/null +++ b/include/TrustWalletCore/TWIOSTProto.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_IOST_Proto_Action; +typedef TWData *_Nonnull TW_IOST_Proto_AmountLimit; +typedef TWData *_Nonnull TW_IOST_Proto_Signature; +typedef TWData *_Nonnull TW_IOST_Proto_Transaction; +typedef TWData *_Nonnull TW_IOST_Proto_AccountInfo; +typedef TWData *_Nonnull TW_IOST_Proto_SigningInput; +typedef TWData *_Nonnull TW_IOST_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWIconProto.h b/include/TrustWalletCore/TWIconProto.h new file mode 100644 index 00000000000..c0a3b0ddece --- /dev/null +++ b/include/TrustWalletCore/TWIconProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Icon_Proto_SigningInput; +typedef TWData *_Nonnull TW_Icon_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWInternetComputerProto.h b/include/TrustWalletCore/TWInternetComputerProto.h new file mode 100644 index 00000000000..34da0911ed2 --- /dev/null +++ b/include/TrustWalletCore/TWInternetComputerProto.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_InternetComputer_Proto_Transaction; +typedef TWData *_Nonnull TW_InternetComputer_Proto_SigningInput; +typedef TWData *_Nonnull TW_InternetComputer_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWIoTeXProto.h b/include/TrustWalletCore/TWIoTeXProto.h new file mode 100644 index 00000000000..cbfe9c93ffb --- /dev/null +++ b/include/TrustWalletCore/TWIoTeXProto.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_IoTeX_Proto_Transfer; +typedef TWData *_Nonnull TW_IoTeX_Proto_Staking; +typedef TWData *_Nonnull TW_IoTeX_Proto_ContractCall; +typedef TWData *_Nonnull TW_IoTeX_Proto_SigningInput; +typedef TWData *_Nonnull TW_IoTeX_Proto_SigningOutput; +typedef TWData *_Nonnull TW_IoTeX_Proto_ActionCore; +typedef TWData *_Nonnull TW_IoTeX_Proto_Action; diff --git a/include/TrustWalletCore/TWLiquidStakingProto.h b/include/TrustWalletCore/TWLiquidStakingProto.h new file mode 100644 index 00000000000..8621c8209d7 --- /dev/null +++ b/include/TrustWalletCore/TWLiquidStakingProto.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Status; +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Asset; +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Stake; +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Unstake; +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Withdraw; +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Input; +typedef TWData *_Nonnull TW_LiquidStaking_Proto_Output; diff --git a/include/TrustWalletCore/TWMessageSigner.h b/include/TrustWalletCore/TWMessageSigner.h new file mode 100644 index 00000000000..8bbd1d752c2 --- /dev/null +++ b/include/TrustWalletCore/TWMessageSigner.h @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWCoinType.h" +#include "TWData.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWMessageSigner; + +/// Computes preimage hashes of a message. +/// +/// \param coin The given coin type to sign the message for. +/// \param input The serialized data of a signing input (e.g. TW.Ethereum.Proto.MessageSigningInput). +/// \return The serialized data of TW.TxCompiler.PreSigningOutput. +TW_EXPORT_STATIC_METHOD TWData *_Nullable TWMessageSignerPreImageHashes(enum TWCoinType coin, TWData *_Nonnull input); + +/// Signs an arbitrary message to prove ownership of an address for off-chain services. +/// +/// \param coin The given coin type to sign the message for. +/// \param input The serialized data of a signing input (e.g. TW.Ethereum.Proto.MessageSigningInput). +/// \return The serialized data of a `SigningOutput` proto object. (e.g. TW.Ethereum.Proto.MessageSigningOutput). +TW_EXPORT_STATIC_METHOD TWData *_Nullable TWMessageSignerSign(enum TWCoinType coin, TWData *_Nonnull input); + +/// Verifies a signature for a message. +/// +/// \param coin The given coin type to sign the message for. +/// \param input The serialized data of a verifying input (e.g. TW.Ethereum.Proto.MessageVerifyingInput). +/// \return whether the signature is valid. +TW_EXPORT_STATIC_METHOD bool TWMessageSignerVerify(enum TWCoinType coin, TWData *_Nonnull input); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWMultiversXProto.h b/include/TrustWalletCore/TWMultiversXProto.h new file mode 100644 index 00000000000..23cfb650494 --- /dev/null +++ b/include/TrustWalletCore/TWMultiversXProto.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_MultiversX_Proto_GenericAction; +typedef TWData *_Nonnull TW_MultiversX_Proto_EGLDTransfer; +typedef TWData *_Nonnull TW_MultiversX_Proto_ESDTTransfer; +typedef TWData *_Nonnull TW_MultiversX_Proto_ESDTNFTTransfer; +typedef TWData *_Nonnull TW_MultiversX_Proto_Accounts; +typedef TWData *_Nonnull TW_MultiversX_Proto_SigningInput; +typedef TWData *_Nonnull TW_MultiversX_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWNEARProto.h b/include/TrustWalletCore/TWNEARProto.h new file mode 100644 index 00000000000..4e49d01e178 --- /dev/null +++ b/include/TrustWalletCore/TWNEARProto.h @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_NEAR_Proto_PublicKey; +typedef TWData *_Nonnull TW_NEAR_Proto_FunctionCallPermission; +typedef TWData *_Nonnull TW_NEAR_Proto_FullAccessPermission; +typedef TWData *_Nonnull TW_NEAR_Proto_AccessKey; +typedef TWData *_Nonnull TW_NEAR_Proto_CreateAccount; +typedef TWData *_Nonnull TW_NEAR_Proto_DeployContract; +typedef TWData *_Nonnull TW_NEAR_Proto_FunctionCall; +typedef TWData *_Nonnull TW_NEAR_Proto_Transfer; +typedef TWData *_Nonnull TW_NEAR_Proto_Stake; +typedef TWData *_Nonnull TW_NEAR_Proto_AddKey; +typedef TWData *_Nonnull TW_NEAR_Proto_DeleteKey; +typedef TWData *_Nonnull TW_NEAR_Proto_DeleteAccount; +typedef TWData *_Nonnull TW_NEAR_Proto_TokenTransfer; +typedef TWData *_Nonnull TW_NEAR_Proto_Action; +typedef TWData *_Nonnull TW_NEAR_Proto_SigningInput; +typedef TWData *_Nonnull TW_NEAR_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWNEOProto.h b/include/TrustWalletCore/TWNEOProto.h new file mode 100644 index 00000000000..346f8c7a39d --- /dev/null +++ b/include/TrustWalletCore/TWNEOProto.h @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_NEO_Proto_TransactionInput; +typedef TWData *_Nonnull TW_NEO_Proto_OutputAddress; +typedef TWData *_Nonnull TW_NEO_Proto_TransactionOutput; +typedef TWData *_Nonnull TW_NEO_Proto_Transaction; +typedef TWData *_Nonnull TW_NEO_Proto_SigningInput; +typedef TWData *_Nonnull TW_NEO_Proto_SigningOutput; +typedef TWData *_Nonnull TW_NEO_Proto_TransactionOutputPlan; +typedef TWData *_Nonnull TW_NEO_Proto_TransactionAttributePlan; +typedef TWData *_Nonnull TW_NEO_Proto_TransactionPlan; diff --git a/include/TrustWalletCore/TWNULSProto.h b/include/TrustWalletCore/TWNULSProto.h new file mode 100644 index 00000000000..3112b7b37c1 --- /dev/null +++ b/include/TrustWalletCore/TWNULSProto.h @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_NULS_Proto_TransactionCoinFrom; +typedef TWData *_Nonnull TW_NULS_Proto_TransactionCoinTo; +typedef TWData *_Nonnull TW_NULS_Proto_Signature; +typedef TWData *_Nonnull TW_NULS_Proto_Transaction; +typedef TWData *_Nonnull TW_NULS_Proto_SigningInput; +typedef TWData *_Nonnull TW_NULS_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWNanoProto.h b/include/TrustWalletCore/TWNanoProto.h new file mode 100644 index 00000000000..a3f883bd69d --- /dev/null +++ b/include/TrustWalletCore/TWNanoProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Nano_Proto_SigningInput; +typedef TWData *_Nonnull TW_Nano_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWNebulasProto.h b/include/TrustWalletCore/TWNebulasProto.h new file mode 100644 index 00000000000..28ccfa3fbec --- /dev/null +++ b/include/TrustWalletCore/TWNebulasProto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Nebulas_Proto_SigningInput; +typedef TWData *_Nonnull TW_Nebulas_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Nebulas_Proto_Data; +typedef TWData *_Nonnull TW_Nebulas_Proto_RawTransaction; diff --git a/include/TrustWalletCore/TWNervosProto.h b/include/TrustWalletCore/TWNervosProto.h new file mode 100644 index 00000000000..2997e2a42a9 --- /dev/null +++ b/include/TrustWalletCore/TWNervosProto.h @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Nervos_Proto_TransactionPlan; +typedef TWData *_Nonnull TW_Nervos_Proto_CellDep; +typedef TWData *_Nonnull TW_Nervos_Proto_OutPoint; +typedef TWData *_Nonnull TW_Nervos_Proto_CellOutput; +typedef TWData *_Nonnull TW_Nervos_Proto_Script; +typedef TWData *_Nonnull TW_Nervos_Proto_NativeTransfer; +typedef TWData *_Nonnull TW_Nervos_Proto_SudtTransfer; +typedef TWData *_Nonnull TW_Nervos_Proto_DaoDeposit; +typedef TWData *_Nonnull TW_Nervos_Proto_DaoWithdrawPhase1; +typedef TWData *_Nonnull TW_Nervos_Proto_DaoWithdrawPhase2; +typedef TWData *_Nonnull TW_Nervos_Proto_SigningInput; +typedef TWData *_Nonnull TW_Nervos_Proto_Cell; +typedef TWData *_Nonnull TW_Nervos_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWNimiqProto.h b/include/TrustWalletCore/TWNimiqProto.h new file mode 100644 index 00000000000..202d00dff15 --- /dev/null +++ b/include/TrustWalletCore/TWNimiqProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Nimiq_Proto_SigningInput; +typedef TWData *_Nonnull TW_Nimiq_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWOasisProto.h b/include/TrustWalletCore/TWOasisProto.h new file mode 100644 index 00000000000..7a4639273c8 --- /dev/null +++ b/include/TrustWalletCore/TWOasisProto.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Oasis_Proto_TransferMessage; +typedef TWData *_Nonnull TW_Oasis_Proto_EscrowMessage; +typedef TWData *_Nonnull TW_Oasis_Proto_ReclaimEscrowMessage; +typedef TWData *_Nonnull TW_Oasis_Proto_SigningInput; +typedef TWData *_Nonnull TW_Oasis_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWOntologyProto.h b/include/TrustWalletCore/TWOntologyProto.h new file mode 100644 index 00000000000..58d0c0682b3 --- /dev/null +++ b/include/TrustWalletCore/TWOntologyProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Ontology_Proto_SigningInput; +typedef TWData *_Nonnull TW_Ontology_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWPactusProto.h b/include/TrustWalletCore/TWPactusProto.h new file mode 100644 index 00000000000..2bb3213e09d --- /dev/null +++ b/include/TrustWalletCore/TWPactusProto.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Pactus_Proto_TransactionMessage; +typedef TWData *_Nonnull TW_Pactus_Proto_TransferPayload; +typedef TWData *_Nonnull TW_Pactus_Proto_BondPayload; +typedef TWData *_Nonnull TW_Pactus_Proto_SigningInput; +typedef TWData *_Nonnull TW_Pactus_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWPolkadotProto.h b/include/TrustWalletCore/TWPolkadotProto.h new file mode 100644 index 00000000000..9645a8ed7e5 --- /dev/null +++ b/include/TrustWalletCore/TWPolkadotProto.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Polkadot_Proto_Era; +typedef TWData *_Nonnull TW_Polkadot_Proto_CustomCallIndices; +typedef TWData *_Nonnull TW_Polkadot_Proto_CallIndices; +typedef TWData *_Nonnull TW_Polkadot_Proto_Balance; +typedef TWData *_Nonnull TW_Polkadot_Proto_Staking; +typedef TWData *_Nonnull TW_Polkadot_Proto_SigningInput; +typedef TWData *_Nonnull TW_Polkadot_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWPolymeshProto.h b/include/TrustWalletCore/TWPolymeshProto.h new file mode 100644 index 00000000000..f267d7feee1 --- /dev/null +++ b/include/TrustWalletCore/TWPolymeshProto.h @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Polymesh_Proto_Balance; +typedef TWData *_Nonnull TW_Polymesh_Proto_Staking; +typedef TWData *_Nonnull TW_Polymesh_Proto_IdentityId; +typedef TWData *_Nonnull TW_Polymesh_Proto_AssetId; +typedef TWData *_Nonnull TW_Polymesh_Proto_PortfolioId; +typedef TWData *_Nonnull TW_Polymesh_Proto_SecondaryKeyPermissions; +typedef TWData *_Nonnull TW_Polymesh_Proto_Identity; +typedef TWData *_Nonnull TW_Polymesh_Proto_Utility; +typedef TWData *_Nonnull TW_Polymesh_Proto_RuntimeCall; +typedef TWData *_Nonnull TW_Polymesh_Proto_SigningInput; +typedef TWData *_Nonnull TW_Polymesh_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWRippleProto.h b/include/TrustWalletCore/TWRippleProto.h new file mode 100644 index 00000000000..935c736209f --- /dev/null +++ b/include/TrustWalletCore/TWRippleProto.h @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Ripple_Proto_CurrencyAmount; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationTrustSet; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationPayment; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationEscrowCreate; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationEscrowCancel; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationEscrowFinish; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenBurn; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenCreateOffer; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenAcceptOffer; +typedef TWData *_Nonnull TW_Ripple_Proto_OperationNFTokenCancelOffer; +typedef TWData *_Nonnull TW_Ripple_Proto_SigningInput; +typedef TWData *_Nonnull TW_Ripple_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWSolanaProto.h b/include/TrustWalletCore/TWSolanaProto.h new file mode 100644 index 00000000000..c8661af5647 --- /dev/null +++ b/include/TrustWalletCore/TWSolanaProto.h @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Solana_Proto_Transfer; +typedef TWData *_Nonnull TW_Solana_Proto_DelegateStake; +typedef TWData *_Nonnull TW_Solana_Proto_DeactivateStake; +typedef TWData *_Nonnull TW_Solana_Proto_DeactivateAllStake; +typedef TWData *_Nonnull TW_Solana_Proto_WithdrawStake; +typedef TWData *_Nonnull TW_Solana_Proto_StakeAccountValue; +typedef TWData *_Nonnull TW_Solana_Proto_WithdrawAllStake; +typedef TWData *_Nonnull TW_Solana_Proto_CreateTokenAccount; +typedef TWData *_Nonnull TW_Solana_Proto_TokenTransfer; +typedef TWData *_Nonnull TW_Solana_Proto_CreateAndTransferToken; +typedef TWData *_Nonnull TW_Solana_Proto_CreateNonceAccount; +typedef TWData *_Nonnull TW_Solana_Proto_WithdrawNonceAccount; +typedef TWData *_Nonnull TW_Solana_Proto_AdvanceNonceAccount; +typedef TWData *_Nonnull TW_Solana_Proto_PubkeySignature; +typedef TWData *_Nonnull TW_Solana_Proto_RawMessage; +typedef TWData *_Nonnull TW_Solana_Proto_DecodingTransactionOutput; +typedef TWData *_Nonnull TW_Solana_Proto_PriorityFeePrice; +typedef TWData *_Nonnull TW_Solana_Proto_PriorityFeeLimit; +typedef TWData *_Nonnull TW_Solana_Proto_SigningInput; +typedef TWData *_Nonnull TW_Solana_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Solana_Proto_PreSigningOutput; +typedef TWData *_Nonnull TW_Solana_Proto_MessageSigningInput; +typedef TWData *_Nonnull TW_Solana_Proto_MessageSigningOutput; +typedef TWData *_Nonnull TW_Solana_Proto_MessageVerifyingInput; diff --git a/include/TrustWalletCore/TWSolanaTransaction.h b/include/TrustWalletCore/TWSolanaTransaction.h new file mode 100644 index 00000000000..bb011f65a66 --- /dev/null +++ b/include/TrustWalletCore/TWSolanaTransaction.h @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWString.h" +#include "TWDataVector.h" +#include "TWData.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWSolanaTransaction; + +/// Decode Solana transaction, update the recent blockhash and re-sign the transaction. +/// +/// # Warning +/// +/// This is a temporary solution. It will be removed when `Solana.proto` supports +/// direct transaction signing. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \param recent_blockhash base58 encoded recent blockhash. +/// \param private_keys list of private keys that should be used to re-sign the transaction. +/// \return serialized `Solana::Proto::SigningOutput`. +TW_EXPORT_STATIC_METHOD TWData *_Nullable TWSolanaTransactionUpdateBlockhashAndSign(TWString *_Nonnull encodedTx, TWString *_Nonnull recentBlockhash, struct TWDataVector *_Nonnull privateKeys); + +/// Try to find a `ComputeBudgetInstruction::SetComputeUnitPrice` instruction in the given transaction, +/// and returns the specified Unit Price. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \return nullable Unit Price as a decimal string. Null if no instruction found. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWSolanaTransactionGetComputeUnitPrice(TWString *_Nonnull encodedTx); + +/// Try to find a `ComputeBudgetInstruction::SetComputeUnitLimit` instruction in the given transaction, +/// and returns the specified Unit Limit. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \return nullable Unit Limit as a decimal string. Null if no instruction found. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWSolanaTransactionGetComputeUnitLimit(TWString *_Nonnull encodedTx); + +/// Adds or updates a `ComputeBudgetInstruction::SetComputeUnitPrice` instruction of the given transaction, +/// and returns the updated transaction. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \price Unit Price as a decimal string. +/// \return base64 encoded Solana transaction. Null if an error occurred. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWSolanaTransactionSetComputeUnitPrice(TWString *_Nonnull encodedTx, TWString *_Nonnull price); + +/// Adds or updates a `ComputeBudgetInstruction::SetComputeUnitLimit` instruction of the given transaction, +/// and returns the updated transaction. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \limit Unit Limit as a decimal string. +/// \return base64 encoded Solana transaction. Null if an error occurred. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWSolanaTransactionSetComputeUnitLimit(TWString *_Nonnull encodedTx, TWString *_Nonnull limit); + +/// Adds fee payer to the given transaction, and returns the updated transaction. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \param fee_payer fee payer account address. Must be a base58 encoded public key. It must NOT be in the account list yet. +/// \return base64 encoded Solana transaction. Null if an error occurred. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWSolanaTransactionSetFeePayer(TWString *_Nonnull encodedTx, TWString *_Nonnull feePayer); + +/// Adds an instruction to the given transaction, and returns the updated transaction. +/// +/// \param encoded_tx base64 encoded Solana transaction. +/// \param instruction json encoded instruction. Here is an example: {"programId":"11111111111111111111111111111111","accounts":[{"pubkey":"YUz1AupPEy1vttBeDS7sXYZFhQJppcXMzjDiDx18Srf","isSigner":true,"isWritable":true},{"pubkey":"d8DiHEeHKdXkM2ZupT86mrvavhmJwUZjHPCzMiB5Lqb","isSigner":false,"isWritable":true}],"data":"3Bxs4Z6oyhaczjLK"} +/// \return base64 encoded Solana transaction. Null if an error occurred. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWSolanaTransactionAddInstruction(TWString *_Nonnull encodedTx, TWString *_Nonnull instruction); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWStellarProto.h b/include/TrustWalletCore/TWStellarProto.h new file mode 100644 index 00000000000..bf18ebc347c --- /dev/null +++ b/include/TrustWalletCore/TWStellarProto.h @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Stellar_Proto_Asset; +typedef TWData *_Nonnull TW_Stellar_Proto_OperationCreateAccount; +typedef TWData *_Nonnull TW_Stellar_Proto_OperationPayment; +typedef TWData *_Nonnull TW_Stellar_Proto_OperationChangeTrust; +typedef TWData *_Nonnull TW_Stellar_Proto_Claimant; +typedef TWData *_Nonnull TW_Stellar_Proto_OperationCreateClaimableBalance; +typedef TWData *_Nonnull TW_Stellar_Proto_OperationClaimClaimableBalance; +typedef TWData *_Nonnull TW_Stellar_Proto_MemoVoid; +typedef TWData *_Nonnull TW_Stellar_Proto_MemoText; +typedef TWData *_Nonnull TW_Stellar_Proto_MemoId; +typedef TWData *_Nonnull TW_Stellar_Proto_MemoHash; +typedef TWData *_Nonnull TW_Stellar_Proto_SigningInput; +typedef TWData *_Nonnull TW_Stellar_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWSuiProto.h b/include/TrustWalletCore/TWSuiProto.h new file mode 100644 index 00000000000..e72da185d15 --- /dev/null +++ b/include/TrustWalletCore/TWSuiProto.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Sui_Proto_ObjectRef; +typedef TWData *_Nonnull TW_Sui_Proto_Amount; +typedef TWData *_Nonnull TW_Sui_Proto_SignDirect; +typedef TWData *_Nonnull TW_Sui_Proto_Pay; +typedef TWData *_Nonnull TW_Sui_Proto_PaySui; +typedef TWData *_Nonnull TW_Sui_Proto_PayAllSui; +typedef TWData *_Nonnull TW_Sui_Proto_RequestAddStake; +typedef TWData *_Nonnull TW_Sui_Proto_RequestWithdrawStake; +typedef TWData *_Nonnull TW_Sui_Proto_TransferObject; +typedef TWData *_Nonnull TW_Sui_Proto_SigningInput; +typedef TWData *_Nonnull TW_Sui_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Sui_Proto_MessageSigningInput; +typedef TWData *_Nonnull TW_Sui_Proto_MessageSigningOutput; +typedef TWData *_Nonnull TW_Sui_Proto_MessageVerifyingInput; diff --git a/include/TrustWalletCore/TWTHORChainSwapProto.h b/include/TrustWalletCore/TWTHORChainSwapProto.h new file mode 100644 index 00000000000..1e8c8eab8dc --- /dev/null +++ b/include/TrustWalletCore/TWTHORChainSwapProto.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_THORChainSwap_Proto_Error; +typedef TWData *_Nonnull TW_THORChainSwap_Proto_Asset; +typedef TWData *_Nonnull TW_THORChainSwap_Proto_StreamParams; +typedef TWData *_Nonnull TW_THORChainSwap_Proto_SwapInput; +typedef TWData *_Nonnull TW_THORChainSwap_Proto_SwapOutput; diff --git a/include/TrustWalletCore/TWTONAddressConverter.h b/include/TrustWalletCore/TWTONAddressConverter.h new file mode 100644 index 00000000000..fa79e0fe3c8 --- /dev/null +++ b/include/TrustWalletCore/TWTONAddressConverter.h @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWString.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWTONAddressConverter; + +/// Converts a TON user address into a Bag of Cells (BoC) with a single root Cell. +/// The function is mostly used to request a Jetton user address via `get_wallet_address` RPC. +/// https://docs.ton.org/develop/dapps/asset-processing/jettons#retrieving-jetton-wallet-addresses-for-a-given-user +/// +/// \param address Address to be converted into a Bag Of Cells (BoC). +/// \return Pointer to a base64 encoded Bag Of Cells (BoC). Null if invalid address provided. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWTONAddressConverterToBoc(TWString *_Nonnull address); + +/// Parses a TON address from a Bag of Cells (BoC) with a single root Cell. +/// The function is mostly used to parse a Jetton user address received on `get_wallet_address` RPC. +/// https://docs.ton.org/develop/dapps/asset-processing/jettons#retrieving-jetton-wallet-addresses-for-a-given-user +/// +/// \param boc Base64 encoded Bag Of Cells (BoC). +/// \return Pointer to a Jetton address. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWTONAddressConverterFromBoc(TWString *_Nonnull boc); + +/// Converts any TON address format to user friendly with the given parameters. +/// +/// \param address raw or user-friendly address to be converted. +/// \param bounceable whether the result address should be bounceable. +/// \param testnet whether the result address should be testnet. +/// \return user-friendly address str. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWTONAddressConverterToUserFriendly(TWString *_Nonnull address, bool bounceable, bool testnet); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWTONMessageSigner.h b/include/TrustWalletCore/TWTONMessageSigner.h new file mode 100644 index 00000000000..43c6e007d9d --- /dev/null +++ b/include/TrustWalletCore/TWTONMessageSigner.h @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWPrivateKey.h" +#include "TWString.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWTONMessageSigner; + +/// Signs an arbitrary message to prove ownership of an address for off-chain services. +/// https://github.com/ton-foundation/specs/blob/main/specs/wtf-0002.md +/// +/// \param private_key: the private key used for signing +/// \param message: A custom message which is input to the signing. +/// \returns the signature, Hex-encoded. On invalid input null is returned. Returned object needs to be deleted after use. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWTONMessageSignerSignMessage(struct TWPrivateKey *_Nonnull privateKey, TWString *_Nonnull message); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWTONWallet.h b/include/TrustWalletCore/TWTONWallet.h new file mode 100644 index 00000000000..9fe5bca79d0 --- /dev/null +++ b/include/TrustWalletCore/TWTONWallet.h @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWPublicKey.h" +#include "TWString.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWTONWallet; + +/// Constructs a TON Wallet V4R2 stateInit encoded as BoC (BagOfCells) for the given `public_key`. +/// +/// \param public_key wallet's public key. +/// \param workchain TON workchain to which the wallet belongs. Usually, base chain is used (0). +/// \param wallet_id wallet's ID allows to create multiple wallets for the same private key. +/// \return Pointer to a base64 encoded Bag Of Cells (BoC) StateInit. Null if invalid public key provided. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWTONWalletBuildV4R2StateInit(struct TWPublicKey *_Nonnull publicKey, int32_t workchain, int32_t walletId); + +/// +/// \param public_key wallet's public key. +/// \param workchain TON workchain to which the wallet belongs. Usually, base chain is used (0). +/// \param wallet_id wallet's ID allows to create multiple wallets for the same private key. +/// \return Pointer to a base64 encoded Bag Of Cells (BoC) StateInit. Null if invalid public key provided. +TW_EXPORT_STATIC_METHOD TWString *_Nullable TWTONWalletBuildV5R1StateInit(struct TWPublicKey *_Nonnull publicKey, int32_t workchain, int32_t walletId); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWTezosProto.h b/include/TrustWalletCore/TWTezosProto.h new file mode 100644 index 00000000000..57dedbf386a --- /dev/null +++ b/include/TrustWalletCore/TWTezosProto.h @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Tezos_Proto_SigningInput; +typedef TWData *_Nonnull TW_Tezos_Proto_SigningOutput; +typedef TWData *_Nonnull TW_Tezos_Proto_OperationList; +typedef TWData *_Nonnull TW_Tezos_Proto_Operation; +typedef TWData *_Nonnull TW_Tezos_Proto_FA12Parameters; +typedef TWData *_Nonnull TW_Tezos_Proto_Txs; +typedef TWData *_Nonnull TW_Tezos_Proto_TxObject; +typedef TWData *_Nonnull TW_Tezos_Proto_FA2Parameters; +typedef TWData *_Nonnull TW_Tezos_Proto_OperationParameters; +typedef TWData *_Nonnull TW_Tezos_Proto_TransactionOperationData; +typedef TWData *_Nonnull TW_Tezos_Proto_RevealOperationData; +typedef TWData *_Nonnull TW_Tezos_Proto_DelegationOperationData; diff --git a/include/TrustWalletCore/TWTheOpenNetworkProto.h b/include/TrustWalletCore/TWTheOpenNetworkProto.h new file mode 100644 index 00000000000..81b87ad1142 --- /dev/null +++ b/include/TrustWalletCore/TWTheOpenNetworkProto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_Transfer; +typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_JettonTransfer; +typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_SigningInput; +typedef TWData *_Nonnull TW_TheOpenNetwork_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWThetaProto.h b/include/TrustWalletCore/TWThetaProto.h new file mode 100644 index 00000000000..165b70a562b --- /dev/null +++ b/include/TrustWalletCore/TWThetaProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Theta_Proto_SigningInput; +typedef TWData *_Nonnull TW_Theta_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWTransactionCompilerProto.h b/include/TrustWalletCore/TWTransactionCompilerProto.h new file mode 100644 index 00000000000..80512f38bed --- /dev/null +++ b/include/TrustWalletCore/TWTransactionCompilerProto.h @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_TxCompiler_Proto_PreSigningOutput; diff --git a/include/TrustWalletCore/TWTronProto.h b/include/TrustWalletCore/TWTronProto.h new file mode 100644 index 00000000000..a2e65e69975 --- /dev/null +++ b/include/TrustWalletCore/TWTronProto.h @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Tron_Proto_TransferContract; +typedef TWData *_Nonnull TW_Tron_Proto_TransferAssetContract; +typedef TWData *_Nonnull TW_Tron_Proto_TransferTRC20Contract; +typedef TWData *_Nonnull TW_Tron_Proto_FreezeBalanceContract; +typedef TWData *_Nonnull TW_Tron_Proto_FreezeBalanceV2Contract; +typedef TWData *_Nonnull TW_Tron_Proto_UnfreezeBalanceV2Contract; +typedef TWData *_Nonnull TW_Tron_Proto_WithdrawExpireUnfreezeContract; +typedef TWData *_Nonnull TW_Tron_Proto_DelegateResourceContract; +typedef TWData *_Nonnull TW_Tron_Proto_UnDelegateResourceContract; +typedef TWData *_Nonnull TW_Tron_Proto_UnfreezeBalanceContract; +typedef TWData *_Nonnull TW_Tron_Proto_UnfreezeAssetContract; +typedef TWData *_Nonnull TW_Tron_Proto_VoteAssetContract; +typedef TWData *_Nonnull TW_Tron_Proto_VoteWitnessContract; +typedef TWData *_Nonnull TW_Tron_Proto_WithdrawBalanceContract; +typedef TWData *_Nonnull TW_Tron_Proto_TriggerSmartContract; +typedef TWData *_Nonnull TW_Tron_Proto_BlockHeader; +typedef TWData *_Nonnull TW_Tron_Proto_Transaction; +typedef TWData *_Nonnull TW_Tron_Proto_SigningInput; +typedef TWData *_Nonnull TW_Tron_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWUtxoProto.h b/include/TrustWalletCore/TWUtxoProto.h new file mode 100644 index 00000000000..15da9dcddd3 --- /dev/null +++ b/include/TrustWalletCore/TWUtxoProto.h @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Utxo_Proto_OutPoint; +typedef TWData *_Nonnull TW_Utxo_Proto_TransactionInput; +typedef TWData *_Nonnull TW_Utxo_Proto_TransactionOutput; +typedef TWData *_Nonnull TW_Utxo_Proto_Transaction; diff --git a/include/TrustWalletCore/TWVeChainProto.h b/include/TrustWalletCore/TWVeChainProto.h new file mode 100644 index 00000000000..eb9496b33c7 --- /dev/null +++ b/include/TrustWalletCore/TWVeChainProto.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_VeChain_Proto_Clause; +typedef TWData *_Nonnull TW_VeChain_Proto_SigningInput; +typedef TWData *_Nonnull TW_VeChain_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWWalletConnectProto.h b/include/TrustWalletCore/TWWalletConnectProto.h new file mode 100644 index 00000000000..3916a726e54 --- /dev/null +++ b/include/TrustWalletCore/TWWalletConnectProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_WalletConnect_Proto_ParseRequestInput; +typedef TWData *_Nonnull TW_WalletConnect_Proto_ParseRequestOutput; diff --git a/include/TrustWalletCore/TWWalletConnectRequest.h b/include/TrustWalletCore/TWWalletConnectRequest.h new file mode 100644 index 00000000000..c9098e6ecec --- /dev/null +++ b/include/TrustWalletCore/TWWalletConnectRequest.h @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "TWBase.h" +#include "TWCoinType.h" +#include "TWData.h" + +TW_EXTERN_C_BEGIN + +TW_EXPORT_CLASS +struct TWWalletConnectRequest; + +/// Parses the WalletConnect signing request as a `SigningInput`. +/// +/// \param coin The given coin type to plan the transaction for. +/// \param input The serialized data of a `WalletConnect::Proto::ParseRequestInput` proto object. +/// \return The serialized data of `WalletConnect::Proto::ParseRequestOutput` proto object. +TW_EXPORT_STATIC_METHOD TWData *_Nonnull TWWalletConnectRequestParse(enum TWCoinType coin, TWData *_Nonnull input); + +TW_EXTERN_C_END diff --git a/include/TrustWalletCore/TWWavesProto.h b/include/TrustWalletCore/TWWavesProto.h new file mode 100644 index 00000000000..2fc0d80084f --- /dev/null +++ b/include/TrustWalletCore/TWWavesProto.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Waves_Proto_TransferMessage; +typedef TWData *_Nonnull TW_Waves_Proto_LeaseMessage; +typedef TWData *_Nonnull TW_Waves_Proto_CancelLeaseMessage; +typedef TWData *_Nonnull TW_Waves_Proto_SigningInput; +typedef TWData *_Nonnull TW_Waves_Proto_SigningOutput; diff --git a/include/TrustWalletCore/TWZcashProto.h b/include/TrustWalletCore/TWZcashProto.h new file mode 100644 index 00000000000..80ea2248d1b --- /dev/null +++ b/include/TrustWalletCore/TWZcashProto.h @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Zcash_Proto_TransactionBuilderExtraData; +typedef TWData *_Nonnull TW_Zcash_Proto_Transaction; diff --git a/include/TrustWalletCore/TWZilliqaProto.h b/include/TrustWalletCore/TWZilliqaProto.h new file mode 100644 index 00000000000..96002d91f72 --- /dev/null +++ b/include/TrustWalletCore/TWZilliqaProto.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. +// +// This is a GENERATED FILE, changes made here WILL BE LOST. + +#pragma once + +#include "TWData.h" + +typedef TWData *_Nonnull TW_Zilliqa_Proto_Transaction; +typedef TWData *_Nonnull TW_Zilliqa_Proto_SigningInput; +typedef TWData *_Nonnull TW_Zilliqa_Proto_SigningOutput; diff --git a/libs/linux-amd64/libTrezorCrypto.a b/libs/linux-amd64/libTrezorCrypto.a new file mode 100644 index 00000000000..585656eb804 Binary files /dev/null and b/libs/linux-amd64/libTrezorCrypto.a differ diff --git a/libs/linux-amd64/libTrustWalletCore.a b/libs/linux-amd64/libTrustWalletCore.a new file mode 100644 index 00000000000..18ddad0662d Binary files /dev/null and b/libs/linux-amd64/libTrustWalletCore.a differ diff --git a/libs/linux-amd64/libprotobuf.a b/libs/linux-amd64/libprotobuf.a new file mode 100644 index 00000000000..15f6b7d81aa Binary files /dev/null and b/libs/linux-amd64/libprotobuf.a differ diff --git a/libs/linux-amd64/libwallet_core_rs.a b/libs/linux-amd64/libwallet_core_rs.a new file mode 100644 index 00000000000..64953d3761c Binary files /dev/null and b/libs/linux-amd64/libwallet_core_rs.a differ diff --git a/main.go b/main.go new file mode 100644 index 00000000000..1ec1236a977 --- /dev/null +++ b/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/sample" +) + +func main() { + sample.TestCardano() +} diff --git a/samples/cpp/sample.cpp b/samples/cpp/sample.cpp index 1cc19a3196f..942a49ba728 100644 --- a/samples/cpp/sample.cpp +++ b/samples/cpp/sample.cpp @@ -50,7 +50,7 @@ int main() { { // coin type: we use Ethereum - const TWCoinType coinType = TWCoinType::TWCoinTypeEthereum; // TWCoinTypeBitcoin, TWCoinTypeEthereum + const TWCoinType coinType = TWCoinType::TWCoinTypeBitcoin; // TWCoinTypeBitcoin, TWCoinTypeEthereum cout << "Working with coin: " << TWStringUTF8Bytes(TWCoinTypeConfigurationGetName(coinType)) << " " << TWStringUTF8Bytes(TWCoinTypeConfigurationGetSymbol(coinType)) << endl; diff --git a/src/Generated/CryptoBoxPublicKey.h b/src/Generated/CryptoBoxPublicKey.h new file mode 100644 index 00000000000..e39e60f0ab8 --- /dev/null +++ b/src/Generated/CryptoBoxPublicKey.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "rust/Wrapper.h" + +using CryptoBoxPublicKeyPtr = std::shared_ptr; + +struct CryptoBoxPublicKey { + explicit CryptoBoxPublicKey(TW::Rust::TWCryptoBoxPublicKey* raw_ptr): ptr(raw_ptr, TW::Rust::tw_crypto_box_public_key_delete) {} + + CryptoBoxPublicKeyPtr ptr; +}; + +struct TWCryptoBoxPublicKey { + CryptoBoxPublicKey impl; +}; + diff --git a/src/Generated/CryptoBoxSecretKey.h b/src/Generated/CryptoBoxSecretKey.h new file mode 100644 index 00000000000..74f5d9235b1 --- /dev/null +++ b/src/Generated/CryptoBoxSecretKey.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +#pragma once + +#include "rust/Wrapper.h" + +using CryptoBoxSecretKeyPtr = std::shared_ptr; + +struct CryptoBoxSecretKey { + explicit CryptoBoxSecretKey(TW::Rust::TWCryptoBoxSecretKey* raw_ptr): ptr(raw_ptr, TW::Rust::tw_crypto_box_secret_key_delete) {} + + CryptoBoxSecretKeyPtr ptr; +}; + +struct TWCryptoBoxSecretKey { + CryptoBoxSecretKey impl; +}; + diff --git a/wrapper/go-wrapper/README.md b/wrapper/go-wrapper/README.md new file mode 100644 index 00000000000..e543e7f7c0b --- /dev/null +++ b/wrapper/go-wrapper/README.md @@ -0,0 +1,76 @@ +# Sample Go Integration for [Wallet-Core](https://github.com/trustwallet/wallet-core) + +## 🔖 Overview + +This folder contains a small **Go** sample integration with +[Wallet Core](https://github.com/trustwallet/wallet-core) library (part of [Trust Wallet](https://trustwallet.com)), +using [cgo](https://golang.org/cmd/cgo/). + +## ⚠️ DISCLAIMER + +> This is a sample application with demonstration purpose only, +> do not use it with real addresses, real transactions, or real funds. +> Use it at your own risk. + +## 📜 Documentation + +See the official [Trust Wallet developer documentation here](https://developer.trustwallet.com). + +See especially Wallet Core +[Integration Guide](https://developer.trustwallet.com/wallet-core/integration-guide), +and [Build Instructions](https://developer.trustwallet.com/wallet-core/building). + +## 🛠 Prerequisites + +`macOS` or `Docker` + +## ⚙️ Building and Running +###  macOS +#### Prerequisites on macOS +* CMake `brew install cmake` +* Boost `brew install boost` +* Xcode +* Xcode command line tools: `xcode-select --install` +* Other tools: `brew install git ninja autoconf automake libtool xcodegen clang-format` +* GoLang: [download](https://go.dev/dl/) +* Protobuf: `brew install protobuf protoc-gen-go` + +#### Full Build + +1. Clone the wallet-core repo and go inside: +```shell +git clone https://github.com/trustwallet/wallet-core.git + +cd wallet-core +``` +2. The full build can be triggered with one top-level script: +```shell +./bootstrap.sh +``` + +### 🐳 Docker +1. Run `docker run -it trustwallet/wallet-core` +The library is already built in this image (Build instructions [here](building.md)) Note: may not be the most recent version. + +2. Install go: `apt-get update && apt-get install golang` +(or download from here [go1.16.12](https://go.dev/dl/go1.16.12.linux-amd64.tar.gz), configure `GOROOT` and append `GOROOT/bin` to `PATH`). + +### 🏃🏽‍♂️ **Run** (macOS & Docker) +1. Go to the **samples/go** folder within wallet core repo: + +```shell +cd wallet-core/samples/go +``` + +2. Compile it by `go build -o main`. Relevant source file is `main.go`. + +3. Run `./main` and you will see the output below: + +```shell +==> calling wallet core from go +==> mnemonic is valid: true +==> Bitcoin... +``` +4. *(optional)* You might want to copy and run `main` outside of the docker container, make sure you have `libc++1` and `libc++abi1` installed in your host Ubuntu. + +5. *(optional)* If you want to make transaction on other networks you need to compile `src/proto` proto files and to do that, just run the `./compile.sh` . you can also modify it based on your project. diff --git a/wrapper/go-wrapper/compile.sh b/wrapper/go-wrapper/compile.sh new file mode 100755 index 00000000000..cf6e974f479 --- /dev/null +++ b/wrapper/go-wrapper/compile.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Run this file ./compile.sh to generate all go protobuf file from src/proto + +# Clean +rm -rf protos +mkdir protos + +PROTO_PATH=../../src/proto +for FILE in "$PROTO_PATH"/*.proto; do + # Reading proto files + FILE_NAME="${FILE#"$PROTO_PATH"/}" + PKG=$(echo "${FILE_NAME%.proto}" | tr '[:upper:]' '[:lower:]') + # Generate Go protobuf files + # + # manual --go_opt=M... declarations is because of + # dependencies between some proto files + mkdir protos/"$PKG" + echo $PROTO_PATH $PKG $FILE_NAME + ../../build/local/bin/protoc -I=$PROTO_PATH --go_out=protos/"$PKG" \ + --go_opt=paths=source_relative \ + --go_opt=M"$FILE_NAME"=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/"$PKG" \ + --go_opt=MCommon.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common \ + --go_opt=MDecredV2.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/decredv2 \ + --go_opt=MBabylonStaking.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/babylonstaking \ + --go_opt=MBitcoin.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoin \ + --go_opt=MUtxo.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/utxo \ + --go_opt=MZcash.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/zcash \ + --go_opt=MBitcoinV2.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoinv2 \ + --go_opt=MEthereum.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/ethereum \ + --go_opt=MBinance.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/binance \ + --go_opt=MCardano.proto=github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/cardano \ + "$PROTO_PATH"/"$FILE_NAME" +done diff --git a/wrapper/go-wrapper/core/bitcoin.go b/wrapper/go-wrapper/core/bitcoin.go new file mode 100644 index 00000000000..a269dfe6dcf --- /dev/null +++ b/wrapper/go-wrapper/core/bitcoin.go @@ -0,0 +1,58 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +// #include +// #include +import "C" + +import ( + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" +) + +type BitcoinSignHashType uint32 + +const ( + BitcoinSigHashTypeAll BitcoinSignHashType = C.TWBitcoinSigHashTypeAll + BitcoinSigHashTypeNone BitcoinSignHashType = C.TWBitcoinSigHashTypeNone + BitcoinSigHashTypeSingle BitcoinSignHashType = C.TWBitcoinSigHashTypeSingle + BitcoinSigHashTypeFork BitcoinSignHashType = C.TWBitcoinSigHashTypeFork + BitcoinSigHashTypeForkBTG BitcoinSignHashType = C.TWBitcoinSigHashTypeForkBTG + BitcoinSigHashTypeAnyoneCanPay BitcoinSignHashType = C.TWBitcoinSigHashTypeAnyoneCanPay +) + +func BitcoinScriptLockScriptForAddress(addr string, ct CoinType) []byte { + address := types.TWStringCreateWithGoString(addr) + defer C.TWStringDelete(address) + + script := C.TWBitcoinScriptLockScriptForAddress(address, C.enum_TWCoinType(ct)) + scriptData := C.TWBitcoinScriptData(script) + defer C.TWBitcoinScriptDelete(script) + defer C.TWDataDelete(scriptData) + + return types.TWDataGoBytes(scriptData) +} + +func BitcoinScriptBuildPayToPublicKeyHash(hash []byte) []byte { + hashData := types.TWDataCreateWithGoBytes(hash) + defer C.TWDataDelete(hashData) + + script := C.TWBitcoinScriptBuildPayToPublicKeyHash(hashData) + scriptData := C.TWBitcoinScriptData(script) + defer C.TWBitcoinScriptDelete(script) + defer C.TWDataDelete(scriptData) + + return types.TWDataGoBytes(scriptData) +} + +func BitcoinScriptMatchPayToWitnessPublicKeyHash(script []byte) []byte { + scriptData := types.TWDataCreateWithGoBytes(script) + defer C.TWDataDelete(scriptData) + scriptObj := C.TWBitcoinScriptCreateWithData(scriptData) + defer C.TWBitcoinScriptDelete(scriptObj) + + hash := C.TWBitcoinScriptMatchPayToWitnessPublicKeyHash(scriptObj) + defer C.TWDataDelete(hash) + return types.TWDataGoBytes(hash) +} diff --git a/wrapper/go-wrapper/core/coin.go b/wrapper/go-wrapper/core/coin.go new file mode 100644 index 00000000000..cbdcf7253dc --- /dev/null +++ b/wrapper/go-wrapper/core/coin.go @@ -0,0 +1,31 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +// #include +import "C" + +import "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" + +type CoinType uint32 + +const ( + CoinTypeBitcoin CoinType = C.TWCoinTypeBitcoin + CoinTypeBinance CoinType = C.TWCoinTypeBinance + CoinTypeEthereum CoinType = C.TWCoinTypeEthereum + CoinTypeTron CoinType = C.TWCoinTypeTron + CoinTypeCardano CoinType = C.TWCoinTypeCardano + CoinTypeLitecoin CoinType = C.TWCoinTypeLitecoin + CoinTypeDogecoin CoinType = C.TWCoinTypeDogecoin +) + +func (c CoinType) GetName() string { + name := C.TWCoinTypeConfigurationGetName(C.enum_TWCoinType(c)) + defer C.TWStringDelete(name) + return types.TWStringGoString(name) +} + +func (c CoinType) Decimals() int { + return int(C.TWCoinTypeConfigurationGetDecimals(C.enum_TWCoinType(c))) +} diff --git a/wrapper/go-wrapper/core/curve.go b/wrapper/go-wrapper/core/curve.go new file mode 100644 index 00000000000..95130f859aa --- /dev/null +++ b/wrapper/go-wrapper/core/curve.go @@ -0,0 +1,15 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #include +import "C" + +type CurveType uint32 + +const ( + CurveSECP256k1 CurveType = C.TWCurveSECP256k1 + CurveED25519 CurveType = C.TWCurveED25519 + CurveCurve25519 CurveType = C.TWCurveCurve25519 + CurveED25519ExtendedCardano CurveType = C.TWCurveED25519ExtendedCardano + CurveNone CurveType = C.TWCurveNone +) diff --git a/wrapper/go-wrapper/core/datavector.go b/wrapper/go-wrapper/core/datavector.go new file mode 100644 index 00000000000..9901819151f --- /dev/null +++ b/wrapper/go-wrapper/core/datavector.go @@ -0,0 +1,31 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" +import "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" + +type TWDataVector *C.struct_TWDataVector + +// Go [][]byte -> C.TWDataVector +func TWDataVectorCreateWithGoBytes(d [][]byte) TWDataVector { + vec := C.TWDataVectorCreate() + for i := 0; i < len(d); i++ { + elem := types.TWDataCreateWithGoBytes(d[i]) + C.TWDataVectorAdd(vec, elem) + } + return vec +} + +// C.TWDataVector -> Go [][]byte +func TWDataVectorGoBytes(d *C.struct_TWDataVector) [][]byte { + var vec [][]byte + cSize := int(C.TWDataVectorSize(d)) + for i := 0; i < cSize; i++ { + elemC := C.TWDataVectorGet(d, C.ulong(i)) + elemG := types.TWDataGoBytes(elemC) + vec = append(vec, elemG) + } + return vec +} diff --git a/wrapper/go-wrapper/core/mnemonic.go b/wrapper/go-wrapper/core/mnemonic.go new file mode 100644 index 00000000000..0279e901ac6 --- /dev/null +++ b/wrapper/go-wrapper/core/mnemonic.go @@ -0,0 +1,14 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" + +import "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" + +func IsMnemonicValid(mn string) bool { + str := types.TWStringCreateWithGoString(mn) + defer C.TWStringDelete(str) + return bool(C.TWMnemonicIsValid(str)) +} diff --git a/wrapper/go-wrapper/core/privateKey.go b/wrapper/go-wrapper/core/privateKey.go new file mode 100644 index 00000000000..f2354b09908 --- /dev/null +++ b/wrapper/go-wrapper/core/privateKey.go @@ -0,0 +1,41 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" + +import ( + "fmt" + "unsafe" + + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" +) + +type TWPrivateKey *C.struct_TWPrivateKey + +func PrivateKeyCreateWithData(key []byte) (TWPrivateKey, error) { + keyData := types.TWDataCreateWithGoBytes(key) + defer C.TWDataDelete(keyData) + privateKey := C.TWPrivateKeyCreateWithData(keyData) + if privateKey == nil { + return nil, fmt.Errorf("invalid private key") + } + return privateKey, nil +} + +func PrivateKeyDelete(key TWPrivateKey) { + C.TWPrivateKeyDelete(nil) +} + +func PrivateKeySign(key TWPrivateKey, in unsafe.Pointer, curve CurveType) unsafe.Pointer { + return C.TWPrivateKeySign(key, in, C.enum_TWCurve(curve)) +} + +func TWPrivateKeyGetPublicKeyEd25519Cardano(key TWPrivateKey) TWPublicKey { + return C.TWPrivateKeyGetPublicKeyEd25519Cardano(key) +} + +func TWPrivateKeyGetPublicKey(key TWPrivateKey, coinType CoinType) TWPublicKey { + return C.TWPrivateKeyGetPublicKey(key, C.enum_TWCoinType(coinType)) +} diff --git a/wrapper/go-wrapper/core/publicKey.go b/wrapper/go-wrapper/core/publicKey.go new file mode 100644 index 00000000000..89deda00b05 --- /dev/null +++ b/wrapper/go-wrapper/core/publicKey.go @@ -0,0 +1,63 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" + +import ( + "encoding/hex" + "errors" + "unsafe" + + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" +) + +type PublicKeyType uint32 + +type TWPublicKey *C.struct_TWPublicKey + +const ( + PublicKeyTypeSECP256k1 PublicKeyType = C.TWPublicKeyTypeSECP256k1 + PublicKeyTypeSECP256k1Extended PublicKeyType = C.TWPublicKeyTypeSECP256k1Extended + PublicKeyTypeED25519Cardano PublicKeyType = C.TWPublicKeyTypeED25519Cardano + PublicKeyTypeED25519 PublicKeyType = C.TWPublicKeyTypeED25519 +) + +func PublicKeyVerify(key []byte, keyType PublicKeyType, signature []byte, message []byte) bool { + keyData := types.TWDataCreateWithGoBytes(key) + defer C.TWDataDelete(keyData) + publicKey := C.TWPublicKeyCreateWithData(keyData, C.enum_TWPublicKeyType(keyType)) + defer C.TWPublicKeyDelete(publicKey) + sig := types.TWDataCreateWithGoBytes(signature) + defer C.TWDataDelete(sig) + msg := types.TWDataCreateWithGoBytes(message) + defer C.TWDataDelete(msg) + + return bool(C.TWPublicKeyVerify(publicKey, sig, msg)) +} + +func PublicKeyVerifyAsDER(key []byte, keyType PublicKeyType, signature []byte, message []byte) bool { + keyData := types.TWDataCreateWithGoBytes(key) + defer C.TWDataDelete(keyData) + publicKey := C.TWPublicKeyCreateWithData(keyData, C.enum_TWPublicKeyType(keyType)) + defer C.TWPublicKeyDelete(publicKey) + sig := types.TWDataCreateWithGoBytes(signature) + defer C.TWDataDelete(sig) + msg := types.TWDataCreateWithGoBytes(message) + defer C.TWDataDelete(msg) + + return bool(C.TWPublicKeyVerifyAsDER(publicKey, sig, msg)) +} + +func PublicKeyDescription(key TWPublicKey) unsafe.Pointer { + return C.TWPublicKeyDescription(key) +} + +func PublicKeyBytes(key TWPublicKey) ([]byte, error) { + pubValue := PublicKeyDescription(key) + if pubValue == nil { + return nil, errors.New("invalid public key") + } + return hex.DecodeString(types.TWStringGoString(pubValue)) +} diff --git a/wrapper/go-wrapper/core/transaction.go b/wrapper/go-wrapper/core/transaction.go new file mode 100644 index 00000000000..3bfb5cde767 --- /dev/null +++ b/wrapper/go-wrapper/core/transaction.go @@ -0,0 +1,28 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +// #include +import "C" + +import ( + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" + + "google.golang.org/protobuf/proto" +) + +func CreateSignedTx(inputData proto.Message, ct CoinType, outputData proto.Message) error { + ibytes, _ := proto.Marshal(inputData) + idata := types.TWDataCreateWithGoBytes(ibytes) + defer C.TWDataDelete(idata) + + odata := C.TWAnySignerSign(idata, C.enum_TWCoinType(ct)) + defer C.TWDataDelete(odata) + + err := proto.Unmarshal(types.TWDataGoBytes(odata), outputData) + if err != nil { + return err + } + return nil +} diff --git a/wrapper/go-wrapper/core/transactionHelper.go b/wrapper/go-wrapper/core/transactionHelper.go new file mode 100644 index 00000000000..378fd12a0f6 --- /dev/null +++ b/wrapper/go-wrapper/core/transactionHelper.go @@ -0,0 +1,30 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" +import "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" + +func PreImageHashes(c CoinType, txInputData []byte) []byte { + input := types.TWDataCreateWithGoBytes(txInputData) + defer C.TWDataDelete(input) + + result := C.TWTransactionCompilerPreImageHashes(C.enum_TWCoinType(c), input) + defer C.TWDataDelete(result) + return types.TWDataGoBytes(result) +} + +func CompileWithSignatures(c CoinType, txInputData []byte, signatures [][]byte, publicKeyHashes [][]byte) []byte { + input := types.TWDataCreateWithGoBytes(txInputData) + defer C.TWDataDelete(input) + + sigs := TWDataVectorCreateWithGoBytes(signatures) + defer C.TWDataVectorDelete(sigs) + pubkeyhashes := TWDataVectorCreateWithGoBytes(publicKeyHashes) + defer C.TWDataVectorDelete(pubkeyhashes) + + result := C.TWTransactionCompilerCompileWithSignatures(C.enum_TWCoinType(c), input, sigs, pubkeyhashes) + defer C.TWDataDelete(result) + return types.TWDataGoBytes(result) +} diff --git a/wrapper/go-wrapper/core/wallet.go b/wrapper/go-wrapper/core/wallet.go new file mode 100644 index 00000000000..d37077a69b7 --- /dev/null +++ b/wrapper/go-wrapper/core/wallet.go @@ -0,0 +1,56 @@ +package core + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +// #include +// #include +import "C" + +import ( + "errors" + + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" +) + +type Wallet struct { + Address string + PriKey string + PubKey string + CoinType +} + +// Using with secp256k1 +func CreateWalletWithMnemonic(mn string, ct CoinType) (*Wallet, error) { + if !IsMnemonicValid(mn) { + return nil, errors.New("mnemonic is not valid") + } + + str := types.TWStringCreateWithGoString(mn) + empty := types.TWStringCreateWithGoString("") + defer C.TWStringDelete(str) + defer C.TWStringDelete(empty) + + tw := C.TWHDWalletCreateWithMnemonic(str, empty) + defer C.TWHDWalletDelete(tw) + + priKey := C.TWHDWalletGetKeyForCoin(tw, C.enum_TWCoinType(ct)) + defer C.TWPrivateKeyDelete(priKey) + priKeyData := C.TWPrivateKeyData(priKey) + defer C.TWDataDelete(priKeyData) + + pubKey := C.TWPrivateKeyGetPublicKeySecp256k1(priKey, true) + defer C.TWPublicKeyDelete(pubKey) + pubKeyData := C.TWPublicKeyData(pubKey) + defer C.TWDataDelete(pubKeyData) + + address := C.TWHDWalletGetAddressForCoin(tw, C.enum_TWCoinType(ct)) + defer C.TWStringDelete(address) + + return &Wallet{ + Address: types.TWStringGoString(address), + PriKey: types.TWDataHexString(priKeyData), + PubKey: types.TWDataHexString(pubKeyData), + CoinType: ct, + }, nil +} diff --git a/wrapper/go-wrapper/main.go b/wrapper/go-wrapper/main.go new file mode 100644 index 00000000000..0680fd96bdf --- /dev/null +++ b/wrapper/go-wrapper/main.go @@ -0,0 +1,137 @@ +package main + +import ( + "encoding/hex" + "fmt" + "math" + "math/big" + + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/core" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoin" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/ethereum" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/sample" +) + +func main() { + fmt.Println("==> calling wallet core from go") + + mn := "confirm bleak useless tail chalk destroy horn step bulb genuine attract split" + + fmt.Println("==> mnemonic is valid: ", core.IsMnemonicValid(mn)) + + // bitcoin wallet + bw, err := core.CreateWalletWithMnemonic(mn, core.CoinTypeBitcoin) + if err != nil { + panic(err) + } + printWallet(bw) + + // ethereum wallet + ew, err := core.CreateWalletWithMnemonic(mn, core.CoinTypeEthereum) + if err != nil { + panic(err) + } + printWallet(ew) + + // tron wallet + tw, err := core.CreateWalletWithMnemonic(mn, core.CoinTypeTron) + if err != nil { + panic(err) + } + printWallet(tw) + + // Ethereum transaction + ethTxn := createEthTransaction(ew) + fmt.Println("Ethereum signed tx:") + fmt.Println("\t", ethTxn) + + // Bitcoin transaction + btcTxn := createBtcTransaction(bw) + fmt.Println("\nBitcoin signed tx:") + fmt.Println("\t", btcTxn) + + sample.ExternalSigningDemo() + sample.TestCardano() +} + +func createEthTransaction(ew *core.Wallet) string { + priKeyByte, _ := hex.DecodeString(ew.PriKey) + + input := ethereum.SigningInput{ + ChainId: big.NewInt(4).Bytes(), // mainnet: 1, rinkeby: 4 https://chainlist.org/ + Nonce: big.NewInt(0).Bytes(), // get nonce from network + TxMode: ethereum.TransactionMode_Legacy, + GasPrice: big.NewInt(100000000000).Bytes(), // 100 gwei + GasLimit: big.NewInt(21000).Bytes(), + ToAddress: "0xE9B511C0753649E5F3E78Ed8AdBEE92d0d2Db384", + PrivateKey: priKeyByte, + Transaction: ðereum.Transaction{ + TransactionOneof: ðereum.Transaction_Transfer_{ + Transfer: ðereum.Transaction_Transfer{ + // amount should be in wei unit, eth * (10^decimals) = wei + Amount: big.NewInt(int64( + 0.01 * math.Pow10(ew.CoinType.Decimals()), + )).Bytes(), + Data: []byte{}, + }, + }, + }, + } + + var output ethereum.SigningOutput + err := core.CreateSignedTx(&input, ew.CoinType, &output) + if err != nil { + panic(err) + } + return hex.EncodeToString(output.GetEncoded()) +} + +func createBtcTransaction(bw *core.Wallet) string { + lockScript := core.BitcoinScriptLockScriptForAddress(bw.Address, bw.CoinType) + fmt.Println("\nBitcoin address lock script:") + fmt.Println("\t", hex.EncodeToString(lockScript)) + + utxoHash, _ := hex.DecodeString("fff7f7881a8099afa6940d42d1e7f6362bec38171ea3edf433541db4e4ad969f") + + utxo := bitcoin.UnspentTransaction{ + OutPoint: &bitcoin.OutPoint{ + Hash: utxoHash, + Index: 0, + Sequence: 4294967295, + }, + Amount: 625000000, + Script: lockScript, + } + + priKeyByte, _ := hex.DecodeString(bw.PriKey) + + input := bitcoin.SigningInput{ + HashType: uint32(core.BitcoinSigHashTypeAll), + Amount: 1000000, + ByteFee: 1, + ToAddress: "1Bp9U1ogV3A14FMvKbRJms7ctyso4Z4Tcx", + ChangeAddress: "1FQc5LdgGHMHEN9nwkjmz6tWkxhPpxBvBU", + PrivateKey: [][]byte{priKeyByte}, + Utxo: []*bitcoin.UnspentTransaction{&utxo}, + CoinType: uint32(core.CoinTypeBitcoin), + } + + var output bitcoin.SigningOutput + err := core.CreateSignedTx(&input, bw.CoinType, &output) + if err != nil { + panic(err) + } + if output.GetError() != common.SigningError_OK { + panic(output.GetError().String()) + } + return hex.EncodeToString(output.GetEncoded()) +} + +func printWallet(w *core.Wallet) { + fmt.Printf("%s wallet: \n", w.CoinType.GetName()) + fmt.Printf("\t address: %s \n", w.Address) + fmt.Printf("\t pri key: %s \n", w.PriKey) + fmt.Printf("\t pub key: %s \n", w.PubKey) + fmt.Println("") +} diff --git a/wrapper/go-wrapper/protos/aeternity/Aeternity.pb.go b/wrapper/go-wrapper/protos/aeternity/Aeternity.pb.go new file mode 100644 index 00000000000..4c6638d0c22 --- /dev/null +++ b/wrapper/go-wrapper/protos/aeternity/Aeternity.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Aeternity.proto + +package aeternity + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of the sender with "ak_" prefix + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // Address of the recipient with "ak_" prefix + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // Fee amount (uint256, serialized big endian) + Fee []byte `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee,omitempty"` + // Message, optional + Payload string `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` + // Time to live until block height + Ttl uint64 `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint64 `protobuf:"varint,7,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,8,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Aeternity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Aeternity_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Aeternity_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SigningInput) GetFee() []byte { + if x != nil { + return x.Fee + } + return nil +} + +func (x *SigningInput) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +func (x *SigningInput) GetTtl() uint64 { + if x != nil { + return x.Ttl + } + return 0 +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes, Base64 with checksum + Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Signature, Base58 with checksum + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Aeternity_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Aeternity_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Aeternity_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() string { + if x != nil { + return x.Encoded + } + return "" +} + +func (x *SigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +var File_Aeternity_proto protoreflect.FileDescriptor + +const file_Aeternity_proto_rawDesc = "" + + "\n" + + "\x0fAeternity.proto\x12\x12TW.Aeternity.Proto\"\xdd\x01\n" + + "\fSigningInput\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\x12\x10\n" + + "\x03fee\x18\x04 \x01(\fR\x03fee\x12\x18\n" + + "\apayload\x18\x05 \x01(\tR\apayload\x12\x10\n" + + "\x03ttl\x18\x06 \x01(\x04R\x03ttl\x12\x14\n" + + "\x05nonce\x18\a \x01(\x04R\x05nonce\x12\x1f\n" + + "\vprivate_key\x18\b \x01(\fR\n" + + "privateKey\"G\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\tR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\tR\tsignatureB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Aeternity_proto_rawDescOnce sync.Once + file_Aeternity_proto_rawDescData []byte +) + +func file_Aeternity_proto_rawDescGZIP() []byte { + file_Aeternity_proto_rawDescOnce.Do(func() { + file_Aeternity_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Aeternity_proto_rawDesc), len(file_Aeternity_proto_rawDesc))) + }) + return file_Aeternity_proto_rawDescData +} + +var file_Aeternity_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Aeternity_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Aeternity.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Aeternity.Proto.SigningOutput +} +var file_Aeternity_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_Aeternity_proto_init() } +func file_Aeternity_proto_init() { + if File_Aeternity_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Aeternity_proto_rawDesc), len(file_Aeternity_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Aeternity_proto_goTypes, + DependencyIndexes: file_Aeternity_proto_depIdxs, + MessageInfos: file_Aeternity_proto_msgTypes, + }.Build() + File_Aeternity_proto = out.File + file_Aeternity_proto_goTypes = nil + file_Aeternity_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/aion/Aion.pb.go b/wrapper/go-wrapper/protos/aion/Aion.pb.go new file mode 100644 index 00000000000..5f06cec9e92 --- /dev/null +++ b/wrapper/go-wrapper/protos/aion/Aion.pb.go @@ -0,0 +1,280 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Aion.proto + +package aion + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Nonce (uint256, serialized big endian) + Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Gas price (uint256, serialized big endian) + GasPrice []byte `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Gas limit (uint256, serialized big endian) + GasLimit []byte `protobuf:"bytes,3,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Recipient's address. + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to send in wei (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + // Optional payload + Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,7,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Timestamp + Timestamp uint64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Aion_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Aion_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Aion_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *SigningInput) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *SigningInput) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SigningInput) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Signature. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Aion_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Aion_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Aion_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Aion_proto protoreflect.FileDescriptor + +const file_Aion_proto_rawDesc = "" + + "\n" + + "\n" + + "Aion.proto\x12\rTW.Aion.Proto\x1a\fCommon.proto\"\xee\x01\n" + + "\fSigningInput\x12\x14\n" + + "\x05nonce\x18\x01 \x01(\fR\x05nonce\x12\x1b\n" + + "\tgas_price\x18\x02 \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x03 \x01(\fR\bgasLimit\x12\x1d\n" + + "\n" + + "to_address\x18\x04 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x05 \x01(\fR\x06amount\x12\x18\n" + + "\apayload\x18\x06 \x01(\fR\apayload\x12\x1f\n" + + "\vprivate_key\x18\a \x01(\fR\n" + + "privateKey\x12\x1c\n" + + "\ttimestamp\x18\b \x01(\x04R\ttimestamp\"\xa1\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Aion_proto_rawDescOnce sync.Once + file_Aion_proto_rawDescData []byte +) + +func file_Aion_proto_rawDescGZIP() []byte { + file_Aion_proto_rawDescOnce.Do(func() { + file_Aion_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Aion_proto_rawDesc), len(file_Aion_proto_rawDesc))) + }) + return file_Aion_proto_rawDescData +} + +var file_Aion_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Aion_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Aion.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Aion.Proto.SigningOutput + (common.SigningError)(0), // 2: TW.Common.Proto.SigningError +} +var file_Aion_proto_depIdxs = []int32{ + 2, // 0: TW.Aion.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Aion_proto_init() } +func file_Aion_proto_init() { + if File_Aion_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Aion_proto_rawDesc), len(file_Aion_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Aion_proto_goTypes, + DependencyIndexes: file_Aion_proto_depIdxs, + MessageInfos: file_Aion_proto_msgTypes, + }.Build() + File_Aion_proto = out.File + file_Aion_proto_goTypes = nil + file_Aion_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/algorand/Algorand.pb.go b/wrapper/go-wrapper/protos/algorand/Algorand.pb.go new file mode 100644 index 00000000000..d99cc4b7590 --- /dev/null +++ b/wrapper/go-wrapper/protos/algorand/Algorand.pb.go @@ -0,0 +1,540 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Algorand.proto + +package algorand + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Simple transfer message, transfer an amount to an address +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination address (string) + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_Algorand_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Algorand_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_Algorand_proto_rawDescGZIP(), []int{0} +} + +func (x *Transfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Transfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Asset Transfer message, with assetID +type AssetTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination address (string) + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // ID of the asset being transferred + AssetId uint64 `protobuf:"varint,3,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssetTransfer) Reset() { + *x = AssetTransfer{} + mi := &file_Algorand_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssetTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetTransfer) ProtoMessage() {} + +func (x *AssetTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Algorand_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssetTransfer.ProtoReflect.Descriptor instead. +func (*AssetTransfer) Descriptor() ([]byte, []int) { + return file_Algorand_proto_rawDescGZIP(), []int{1} +} + +func (x *AssetTransfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *AssetTransfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *AssetTransfer) GetAssetId() uint64 { + if x != nil { + return x.AssetId + } + return 0 +} + +// Opt-in message for an asset +type AssetOptIn struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ID of the asset + AssetId uint64 `protobuf:"varint,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AssetOptIn) Reset() { + *x = AssetOptIn{} + mi := &file_Algorand_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AssetOptIn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetOptIn) ProtoMessage() {} + +func (x *AssetOptIn) ProtoReflect() protoreflect.Message { + mi := &file_Algorand_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssetOptIn.ProtoReflect.Descriptor instead. +func (*AssetOptIn) Descriptor() ([]byte, []int) { + return file_Algorand_proto_rawDescGZIP(), []int{2} +} + +func (x *AssetOptIn) GetAssetId() uint64 { + if x != nil { + return x.AssetId + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // network / chain id + GenesisId string `protobuf:"bytes,1,opt,name=genesis_id,json=genesisId,proto3" json:"genesis_id,omitempty"` + // network / chain hash + GenesisHash []byte `protobuf:"bytes,2,opt,name=genesis_hash,json=genesisHash,proto3" json:"genesis_hash,omitempty"` + // binary note data + Note []byte `protobuf:"bytes,3,opt,name=note,proto3" json:"note,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // network / first round + FirstRound uint64 `protobuf:"varint,5,opt,name=first_round,json=firstRound,proto3" json:"first_round,omitempty"` + // network / last round + LastRound uint64 `protobuf:"varint,6,opt,name=last_round,json=lastRound,proto3" json:"last_round,omitempty"` + // fee amount + Fee uint64 `protobuf:"varint,7,opt,name=fee,proto3" json:"fee,omitempty"` + // public key + PublicKey []byte `protobuf:"bytes,8,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // message payload + // + // Types that are valid to be assigned to MessageOneof: + // + // *SigningInput_Transfer + // *SigningInput_AssetTransfer + // *SigningInput_AssetOptIn + MessageOneof isSigningInput_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Algorand_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Algorand_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Algorand_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningInput) GetGenesisId() string { + if x != nil { + return x.GenesisId + } + return "" +} + +func (x *SigningInput) GetGenesisHash() []byte { + if x != nil { + return x.GenesisHash + } + return nil +} + +func (x *SigningInput) GetNote() []byte { + if x != nil { + return x.Note + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetFirstRound() uint64 { + if x != nil { + return x.FirstRound + } + return 0 +} + +func (x *SigningInput) GetLastRound() uint64 { + if x != nil { + return x.LastRound + } + return 0 +} + +func (x *SigningInput) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *SigningInput) GetMessageOneof() isSigningInput_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *SigningInput) GetTransfer() *Transfer { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *SigningInput) GetAssetTransfer() *AssetTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_AssetTransfer); ok { + return x.AssetTransfer + } + } + return nil +} + +func (x *SigningInput) GetAssetOptIn() *AssetOptIn { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_AssetOptIn); ok { + return x.AssetOptIn + } + } + return nil +} + +type isSigningInput_MessageOneof interface { + isSigningInput_MessageOneof() +} + +type SigningInput_Transfer struct { + Transfer *Transfer `protobuf:"bytes,10,opt,name=transfer,proto3,oneof"` +} + +type SigningInput_AssetTransfer struct { + AssetTransfer *AssetTransfer `protobuf:"bytes,11,opt,name=asset_transfer,json=assetTransfer,proto3,oneof"` +} + +type SigningInput_AssetOptIn struct { + AssetOptIn *AssetOptIn `protobuf:"bytes,12,opt,name=asset_opt_in,json=assetOptIn,proto3,oneof"` +} + +func (*SigningInput_Transfer) isSigningInput_MessageOneof() {} + +func (*SigningInput_AssetTransfer) isSigningInput_MessageOneof() {} + +func (*SigningInput_AssetOptIn) isSigningInput_MessageOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Signature in base64. + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors. + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description. + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Algorand_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Algorand_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Algorand_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Algorand_proto protoreflect.FileDescriptor + +const file_Algorand_proto_rawDesc = "" + + "\n" + + "\x0eAlgorand.proto\x12\x11TW.Algorand.Proto\x1a\fCommon.proto\"A\n" + + "\bTransfer\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\"a\n" + + "\rAssetTransfer\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x12\x19\n" + + "\basset_id\x18\x03 \x01(\x04R\aassetId\"'\n" + + "\n" + + "AssetOptIn\x12\x19\n" + + "\basset_id\x18\x01 \x01(\x04R\aassetId\"\xd0\x03\n" + + "\fSigningInput\x12\x1d\n" + + "\n" + + "genesis_id\x18\x01 \x01(\tR\tgenesisId\x12!\n" + + "\fgenesis_hash\x18\x02 \x01(\fR\vgenesisHash\x12\x12\n" + + "\x04note\x18\x03 \x01(\fR\x04note\x12\x1f\n" + + "\vprivate_key\x18\x04 \x01(\fR\n" + + "privateKey\x12\x1f\n" + + "\vfirst_round\x18\x05 \x01(\x04R\n" + + "firstRound\x12\x1d\n" + + "\n" + + "last_round\x18\x06 \x01(\x04R\tlastRound\x12\x10\n" + + "\x03fee\x18\a \x01(\x04R\x03fee\x12\x1d\n" + + "\n" + + "public_key\x18\b \x01(\fR\tpublicKey\x129\n" + + "\btransfer\x18\n" + + " \x01(\v2\x1b.TW.Algorand.Proto.TransferH\x00R\btransfer\x12I\n" + + "\x0easset_transfer\x18\v \x01(\v2 .TW.Algorand.Proto.AssetTransferH\x00R\rassetTransfer\x12A\n" + + "\fasset_opt_in\x18\f \x01(\v2\x1d.TW.Algorand.Proto.AssetOptInH\x00R\n" + + "assetOptInB\x0f\n" + + "\rmessage_oneof\"\xa1\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Algorand_proto_rawDescOnce sync.Once + file_Algorand_proto_rawDescData []byte +) + +func file_Algorand_proto_rawDescGZIP() []byte { + file_Algorand_proto_rawDescOnce.Do(func() { + file_Algorand_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Algorand_proto_rawDesc), len(file_Algorand_proto_rawDesc))) + }) + return file_Algorand_proto_rawDescData +} + +var file_Algorand_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_Algorand_proto_goTypes = []any{ + (*Transfer)(nil), // 0: TW.Algorand.Proto.Transfer + (*AssetTransfer)(nil), // 1: TW.Algorand.Proto.AssetTransfer + (*AssetOptIn)(nil), // 2: TW.Algorand.Proto.AssetOptIn + (*SigningInput)(nil), // 3: TW.Algorand.Proto.SigningInput + (*SigningOutput)(nil), // 4: TW.Algorand.Proto.SigningOutput + (common.SigningError)(0), // 5: TW.Common.Proto.SigningError +} +var file_Algorand_proto_depIdxs = []int32{ + 0, // 0: TW.Algorand.Proto.SigningInput.transfer:type_name -> TW.Algorand.Proto.Transfer + 1, // 1: TW.Algorand.Proto.SigningInput.asset_transfer:type_name -> TW.Algorand.Proto.AssetTransfer + 2, // 2: TW.Algorand.Proto.SigningInput.asset_opt_in:type_name -> TW.Algorand.Proto.AssetOptIn + 5, // 3: TW.Algorand.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_Algorand_proto_init() } +func file_Algorand_proto_init() { + if File_Algorand_proto != nil { + return + } + file_Algorand_proto_msgTypes[3].OneofWrappers = []any{ + (*SigningInput_Transfer)(nil), + (*SigningInput_AssetTransfer)(nil), + (*SigningInput_AssetOptIn)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Algorand_proto_rawDesc), len(file_Algorand_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Algorand_proto_goTypes, + DependencyIndexes: file_Algorand_proto_depIdxs, + MessageInfos: file_Algorand_proto_msgTypes, + }.Build() + File_Algorand_proto = out.File + file_Algorand_proto_goTypes = nil + file_Algorand_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/aptos/Aptos.pb.go b/wrapper/go-wrapper/protos/aptos/Aptos.pb.go new file mode 100644 index 00000000000..b431d14feee --- /dev/null +++ b/wrapper/go-wrapper/protos/aptos/Aptos.pb.go @@ -0,0 +1,1636 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Aptos.proto + +package aptos + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Necessary fields to process a TransferMessage +type TransferMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination Account address (string) + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + // Amount to be transferred (uint64) + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferMessage) Reset() { + *x = TransferMessage{} + mi := &file_Aptos_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferMessage) ProtoMessage() {} + +func (x *TransferMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferMessage.ProtoReflect.Descriptor instead. +func (*TransferMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{0} +} + +func (x *TransferMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TransferMessage) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Necessary tag for type function argument +type StructTag struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of the account + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // Module name + Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` + // Identifier + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StructTag) Reset() { + *x = StructTag{} + mi := &file_Aptos_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StructTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructTag) ProtoMessage() {} + +func (x *StructTag) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructTag.ProtoReflect.Descriptor instead. +func (*StructTag) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{1} +} + +func (x *StructTag) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *StructTag) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + +func (x *StructTag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Necessary fields to process a `0x1::coin::transfer` function. +type TokenTransferMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination Account address (string) + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + // Amount to be transferred (uint64) + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // token function to call, e.g BTC: 0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::BTC + Function *StructTag `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenTransferMessage) Reset() { + *x = TokenTransferMessage{} + mi := &file_Aptos_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenTransferMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenTransferMessage) ProtoMessage() {} + +func (x *TokenTransferMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenTransferMessage.ProtoReflect.Descriptor instead. +func (*TokenTransferMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{2} +} + +func (x *TokenTransferMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TokenTransferMessage) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TokenTransferMessage) GetFunction() *StructTag { + if x != nil { + return x.Function + } + return nil +} + +// Necessary fields to process a `0x1::aptos_account::transfer_coins` function. +// Can be used to transfer tokens with registering the recipient account if needed. +type TokenTransferCoinsMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination Account address (string) + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + // Amount to be transferred (uint64) + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // token function to call, e.g BTC: 0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::BTC + Function *StructTag `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenTransferCoinsMessage) Reset() { + *x = TokenTransferCoinsMessage{} + mi := &file_Aptos_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenTransferCoinsMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenTransferCoinsMessage) ProtoMessage() {} + +func (x *TokenTransferCoinsMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenTransferCoinsMessage.ProtoReflect.Descriptor instead. +func (*TokenTransferCoinsMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{3} +} + +func (x *TokenTransferCoinsMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TokenTransferCoinsMessage) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TokenTransferCoinsMessage) GetFunction() *StructTag { + if x != nil { + return x.Function + } + return nil +} + +type FungibleAssetTransferMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Fungible Asset address (string) + MetadataAddress string `protobuf:"bytes,1,opt,name=metadata_address,json=metadataAddress,proto3" json:"metadata_address,omitempty"` + // Destination Account address (string) + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // Amount to be transferred (uint64) + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FungibleAssetTransferMessage) Reset() { + *x = FungibleAssetTransferMessage{} + mi := &file_Aptos_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FungibleAssetTransferMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FungibleAssetTransferMessage) ProtoMessage() {} + +func (x *FungibleAssetTransferMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FungibleAssetTransferMessage.ProtoReflect.Descriptor instead. +func (*FungibleAssetTransferMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{4} +} + +func (x *FungibleAssetTransferMessage) GetMetadataAddress() string { + if x != nil { + return x.MetadataAddress + } + return "" +} + +func (x *FungibleAssetTransferMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *FungibleAssetTransferMessage) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Necessary fields to process a ManagedTokensRegisterMessage +type ManagedTokensRegisterMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // token function to register, e.g BTC: 0x43417434fd869edee76cca2a4d2301e528a1551b1d719b75c350c3c97d15b8b9::coins::BTC + Function *StructTag `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ManagedTokensRegisterMessage) Reset() { + *x = ManagedTokensRegisterMessage{} + mi := &file_Aptos_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ManagedTokensRegisterMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ManagedTokensRegisterMessage) ProtoMessage() {} + +func (x *ManagedTokensRegisterMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ManagedTokensRegisterMessage.ProtoReflect.Descriptor instead. +func (*ManagedTokensRegisterMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{5} +} + +func (x *ManagedTokensRegisterMessage) GetFunction() *StructTag { + if x != nil { + return x.Function + } + return nil +} + +// Necessary fields to process a CreateAccountMessage +type CreateAccountMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // auth account address to create + AuthKey string `protobuf:"bytes,1,opt,name=auth_key,json=authKey,proto3" json:"auth_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAccountMessage) Reset() { + *x = CreateAccountMessage{} + mi := &file_Aptos_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAccountMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountMessage) ProtoMessage() {} + +func (x *CreateAccountMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAccountMessage.ProtoReflect.Descriptor instead. +func (*CreateAccountMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateAccountMessage) GetAuthKey() string { + if x != nil { + return x.AuthKey + } + return "" +} + +// Necessary fields to process an OfferNftMessage +type OfferNftMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Receiver address + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` + // Creator address + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + // Name of the collection + CollectionName string `protobuf:"bytes,3,opt,name=collectionName,proto3" json:"collectionName,omitempty"` + // Name of the NFT + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // Property version (should be often 0) + PropertyVersion uint64 `protobuf:"varint,5,opt,name=property_version,json=propertyVersion,proto3" json:"property_version,omitempty"` + // Amount of NFT's to transfer (should be often 1) + Amount uint64 `protobuf:"varint,6,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OfferNftMessage) Reset() { + *x = OfferNftMessage{} + mi := &file_Aptos_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OfferNftMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OfferNftMessage) ProtoMessage() {} + +func (x *OfferNftMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OfferNftMessage.ProtoReflect.Descriptor instead. +func (*OfferNftMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{7} +} + +func (x *OfferNftMessage) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *OfferNftMessage) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *OfferNftMessage) GetCollectionName() string { + if x != nil { + return x.CollectionName + } + return "" +} + +func (x *OfferNftMessage) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *OfferNftMessage) GetPropertyVersion() uint64 { + if x != nil { + return x.PropertyVersion + } + return 0 +} + +func (x *OfferNftMessage) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Necessary fields to process an CancelOfferNftMessage +type CancelOfferNftMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Receiver address + Receiver string `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` + // Creator address + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + // Name of the collection + CollectionName string `protobuf:"bytes,3,opt,name=collectionName,proto3" json:"collectionName,omitempty"` + // Name of the NFT + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // Property version (should be often 0) + PropertyVersion uint64 `protobuf:"varint,5,opt,name=property_version,json=propertyVersion,proto3" json:"property_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelOfferNftMessage) Reset() { + *x = CancelOfferNftMessage{} + mi := &file_Aptos_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelOfferNftMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelOfferNftMessage) ProtoMessage() {} + +func (x *CancelOfferNftMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelOfferNftMessage.ProtoReflect.Descriptor instead. +func (*CancelOfferNftMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{8} +} + +func (x *CancelOfferNftMessage) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *CancelOfferNftMessage) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *CancelOfferNftMessage) GetCollectionName() string { + if x != nil { + return x.CollectionName + } + return "" +} + +func (x *CancelOfferNftMessage) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CancelOfferNftMessage) GetPropertyVersion() uint64 { + if x != nil { + return x.PropertyVersion + } + return 0 +} + +// Necessary fields to process an ClaimNftMessage +type ClaimNftMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Creator address + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + // Name of the collection + CollectionName string `protobuf:"bytes,3,opt,name=collectionName,proto3" json:"collectionName,omitempty"` + // Name of the NFT + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // Property version (should be often 0) + PropertyVersion uint64 `protobuf:"varint,5,opt,name=property_version,json=propertyVersion,proto3" json:"property_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimNftMessage) Reset() { + *x = ClaimNftMessage{} + mi := &file_Aptos_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimNftMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimNftMessage) ProtoMessage() {} + +func (x *ClaimNftMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimNftMessage.ProtoReflect.Descriptor instead. +func (*ClaimNftMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{9} +} + +func (x *ClaimNftMessage) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *ClaimNftMessage) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *ClaimNftMessage) GetCollectionName() string { + if x != nil { + return x.CollectionName + } + return "" +} + +func (x *ClaimNftMessage) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ClaimNftMessage) GetPropertyVersion() uint64 { + if x != nil { + return x.PropertyVersion + } + return 0 +} + +type TortugaClaim struct { + state protoimpl.MessageState `protogen:"open.v1"` + // idx of ticket to claim + Idx uint64 `protobuf:"varint,1,opt,name=idx,proto3" json:"idx,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TortugaClaim) Reset() { + *x = TortugaClaim{} + mi := &file_Aptos_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TortugaClaim) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TortugaClaim) ProtoMessage() {} + +func (x *TortugaClaim) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TortugaClaim.ProtoReflect.Descriptor instead. +func (*TortugaClaim) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{10} +} + +func (x *TortugaClaim) GetIdx() uint64 { + if x != nil { + return x.Idx + } + return 0 +} + +type TortugaStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to be stake + Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TortugaStake) Reset() { + *x = TortugaStake{} + mi := &file_Aptos_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TortugaStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TortugaStake) ProtoMessage() {} + +func (x *TortugaStake) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TortugaStake.ProtoReflect.Descriptor instead. +func (*TortugaStake) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{11} +} + +func (x *TortugaStake) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +type TortugaUnstake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to be stake + Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TortugaUnstake) Reset() { + *x = TortugaUnstake{} + mi := &file_Aptos_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TortugaUnstake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TortugaUnstake) ProtoMessage() {} + +func (x *TortugaUnstake) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TortugaUnstake.ProtoReflect.Descriptor instead. +func (*TortugaUnstake) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{12} +} + +func (x *TortugaUnstake) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +type LiquidStaking struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Smart contract address of liquid staking module + SmartContractAddress string `protobuf:"bytes,1,opt,name=smart_contract_address,json=smartContractAddress,proto3" json:"smart_contract_address,omitempty"` + // Types that are valid to be assigned to LiquidStakeTransactionPayload: + // + // *LiquidStaking_Stake + // *LiquidStaking_Unstake + // *LiquidStaking_Claim + LiquidStakeTransactionPayload isLiquidStaking_LiquidStakeTransactionPayload `protobuf_oneof:"liquid_stake_transaction_payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LiquidStaking) Reset() { + *x = LiquidStaking{} + mi := &file_Aptos_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LiquidStaking) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LiquidStaking) ProtoMessage() {} + +func (x *LiquidStaking) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LiquidStaking.ProtoReflect.Descriptor instead. +func (*LiquidStaking) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{13} +} + +func (x *LiquidStaking) GetSmartContractAddress() string { + if x != nil { + return x.SmartContractAddress + } + return "" +} + +func (x *LiquidStaking) GetLiquidStakeTransactionPayload() isLiquidStaking_LiquidStakeTransactionPayload { + if x != nil { + return x.LiquidStakeTransactionPayload + } + return nil +} + +func (x *LiquidStaking) GetStake() *TortugaStake { + if x != nil { + if x, ok := x.LiquidStakeTransactionPayload.(*LiquidStaking_Stake); ok { + return x.Stake + } + } + return nil +} + +func (x *LiquidStaking) GetUnstake() *TortugaUnstake { + if x != nil { + if x, ok := x.LiquidStakeTransactionPayload.(*LiquidStaking_Unstake); ok { + return x.Unstake + } + } + return nil +} + +func (x *LiquidStaking) GetClaim() *TortugaClaim { + if x != nil { + if x, ok := x.LiquidStakeTransactionPayload.(*LiquidStaking_Claim); ok { + return x.Claim + } + } + return nil +} + +type isLiquidStaking_LiquidStakeTransactionPayload interface { + isLiquidStaking_LiquidStakeTransactionPayload() +} + +type LiquidStaking_Stake struct { + Stake *TortugaStake `protobuf:"bytes,2,opt,name=stake,proto3,oneof"` +} + +type LiquidStaking_Unstake struct { + Unstake *TortugaUnstake `protobuf:"bytes,3,opt,name=unstake,proto3,oneof"` +} + +type LiquidStaking_Claim struct { + Claim *TortugaClaim `protobuf:"bytes,4,opt,name=claim,proto3,oneof"` +} + +func (*LiquidStaking_Stake) isLiquidStaking_LiquidStakeTransactionPayload() {} + +func (*LiquidStaking_Unstake) isLiquidStaking_LiquidStakeTransactionPayload() {} + +func (*LiquidStaking_Claim) isLiquidStaking_LiquidStakeTransactionPayload() {} + +type NftMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to NftTransactionPayload: + // + // *NftMessage_OfferNft + // *NftMessage_CancelOfferNft + // *NftMessage_ClaimNft + NftTransactionPayload isNftMessage_NftTransactionPayload `protobuf_oneof:"nft_transaction_payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NftMessage) Reset() { + *x = NftMessage{} + mi := &file_Aptos_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NftMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NftMessage) ProtoMessage() {} + +func (x *NftMessage) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NftMessage.ProtoReflect.Descriptor instead. +func (*NftMessage) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{14} +} + +func (x *NftMessage) GetNftTransactionPayload() isNftMessage_NftTransactionPayload { + if x != nil { + return x.NftTransactionPayload + } + return nil +} + +func (x *NftMessage) GetOfferNft() *OfferNftMessage { + if x != nil { + if x, ok := x.NftTransactionPayload.(*NftMessage_OfferNft); ok { + return x.OfferNft + } + } + return nil +} + +func (x *NftMessage) GetCancelOfferNft() *CancelOfferNftMessage { + if x != nil { + if x, ok := x.NftTransactionPayload.(*NftMessage_CancelOfferNft); ok { + return x.CancelOfferNft + } + } + return nil +} + +func (x *NftMessage) GetClaimNft() *ClaimNftMessage { + if x != nil { + if x, ok := x.NftTransactionPayload.(*NftMessage_ClaimNft); ok { + return x.ClaimNft + } + } + return nil +} + +type isNftMessage_NftTransactionPayload interface { + isNftMessage_NftTransactionPayload() +} + +type NftMessage_OfferNft struct { + OfferNft *OfferNftMessage `protobuf:"bytes,1,opt,name=offer_nft,json=offerNft,proto3,oneof"` +} + +type NftMessage_CancelOfferNft struct { + CancelOfferNft *CancelOfferNftMessage `protobuf:"bytes,2,opt,name=cancel_offer_nft,json=cancelOfferNft,proto3,oneof"` +} + +type NftMessage_ClaimNft struct { + ClaimNft *ClaimNftMessage `protobuf:"bytes,3,opt,name=claim_nft,json=claimNft,proto3,oneof"` +} + +func (*NftMessage_OfferNft) isNftMessage_NftTransactionPayload() {} + +func (*NftMessage_CancelOfferNft) isNftMessage_NftTransactionPayload() {} + +func (*NftMessage_ClaimNft) isNftMessage_NftTransactionPayload() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender Account address (string) + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // Sequence number, incremented atomically for each tx present on the account, start at 0 (int64) + SequenceNumber int64 `protobuf:"varint,2,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` + // Max gas amount that the user is willing to pay (uint64) + MaxGasAmount uint64 `protobuf:"varint,3,opt,name=max_gas_amount,json=maxGasAmount,proto3" json:"max_gas_amount,omitempty"` + // Gas unit price - queried through API (uint64) + GasUnitPrice uint64 `protobuf:"varint,4,opt,name=gas_unit_price,json=gasUnitPrice,proto3" json:"gas_unit_price,omitempty"` + // Expiration timestamp for the transaction, can't be in the past (uint64) + ExpirationTimestampSecs uint64 `protobuf:"varint,5,opt,name=expiration_timestamp_secs,json=expirationTimestampSecs,proto3" json:"expiration_timestamp_secs,omitempty"` + // Chain id 1 (mainnet) 32(devnet) (uint32 - casted in uint8_t later) + ChainId uint32 `protobuf:"varint,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Private key to sign the transaction (bytes) + PrivateKey []byte `protobuf:"bytes,7,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // hex encoded function to sign, use it for smart contract approval (string) + AnyEncoded string `protobuf:"bytes,8,opt,name=any_encoded,json=anyEncoded,proto3" json:"any_encoded,omitempty"` + // Types that are valid to be assigned to TransactionPayload: + // + // *SigningInput_Transfer + // *SigningInput_TokenTransfer + // *SigningInput_CreateAccount + // *SigningInput_NftMessage + // *SigningInput_RegisterToken + // *SigningInput_LiquidStakingMessage + // *SigningInput_TokenTransferCoins + // *SigningInput_FungibleAssetTransfer + TransactionPayload isSigningInput_TransactionPayload `protobuf_oneof:"transaction_payload"` + Abi string `protobuf:"bytes,21,opt,name=abi,proto3" json:"abi,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Aptos_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{15} +} + +func (x *SigningInput) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *SigningInput) GetSequenceNumber() int64 { + if x != nil { + return x.SequenceNumber + } + return 0 +} + +func (x *SigningInput) GetMaxGasAmount() uint64 { + if x != nil { + return x.MaxGasAmount + } + return 0 +} + +func (x *SigningInput) GetGasUnitPrice() uint64 { + if x != nil { + return x.GasUnitPrice + } + return 0 +} + +func (x *SigningInput) GetExpirationTimestampSecs() uint64 { + if x != nil { + return x.ExpirationTimestampSecs + } + return 0 +} + +func (x *SigningInput) GetChainId() uint32 { + if x != nil { + return x.ChainId + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetAnyEncoded() string { + if x != nil { + return x.AnyEncoded + } + return "" +} + +func (x *SigningInput) GetTransactionPayload() isSigningInput_TransactionPayload { + if x != nil { + return x.TransactionPayload + } + return nil +} + +func (x *SigningInput) GetTransfer() *TransferMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *SigningInput) GetTokenTransfer() *TokenTransferMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_TokenTransfer); ok { + return x.TokenTransfer + } + } + return nil +} + +func (x *SigningInput) GetCreateAccount() *CreateAccountMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_CreateAccount); ok { + return x.CreateAccount + } + } + return nil +} + +func (x *SigningInput) GetNftMessage() *NftMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_NftMessage); ok { + return x.NftMessage + } + } + return nil +} + +func (x *SigningInput) GetRegisterToken() *ManagedTokensRegisterMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_RegisterToken); ok { + return x.RegisterToken + } + } + return nil +} + +func (x *SigningInput) GetLiquidStakingMessage() *LiquidStaking { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_LiquidStakingMessage); ok { + return x.LiquidStakingMessage + } + } + return nil +} + +func (x *SigningInput) GetTokenTransferCoins() *TokenTransferCoinsMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_TokenTransferCoins); ok { + return x.TokenTransferCoins + } + } + return nil +} + +func (x *SigningInput) GetFungibleAssetTransfer() *FungibleAssetTransferMessage { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_FungibleAssetTransfer); ok { + return x.FungibleAssetTransfer + } + } + return nil +} + +func (x *SigningInput) GetAbi() string { + if x != nil { + return x.Abi + } + return "" +} + +type isSigningInput_TransactionPayload interface { + isSigningInput_TransactionPayload() +} + +type SigningInput_Transfer struct { + Transfer *TransferMessage `protobuf:"bytes,9,opt,name=transfer,proto3,oneof"` +} + +type SigningInput_TokenTransfer struct { + TokenTransfer *TokenTransferMessage `protobuf:"bytes,10,opt,name=token_transfer,json=tokenTransfer,proto3,oneof"` +} + +type SigningInput_CreateAccount struct { + CreateAccount *CreateAccountMessage `protobuf:"bytes,11,opt,name=create_account,json=createAccount,proto3,oneof"` +} + +type SigningInput_NftMessage struct { + NftMessage *NftMessage `protobuf:"bytes,12,opt,name=nft_message,json=nftMessage,proto3,oneof"` +} + +type SigningInput_RegisterToken struct { + RegisterToken *ManagedTokensRegisterMessage `protobuf:"bytes,13,opt,name=register_token,json=registerToken,proto3,oneof"` +} + +type SigningInput_LiquidStakingMessage struct { + LiquidStakingMessage *LiquidStaking `protobuf:"bytes,14,opt,name=liquid_staking_message,json=liquidStakingMessage,proto3,oneof"` +} + +type SigningInput_TokenTransferCoins struct { + TokenTransferCoins *TokenTransferCoinsMessage `protobuf:"bytes,15,opt,name=token_transfer_coins,json=tokenTransferCoins,proto3,oneof"` +} + +type SigningInput_FungibleAssetTransfer struct { + FungibleAssetTransfer *FungibleAssetTransferMessage `protobuf:"bytes,16,opt,name=fungible_asset_transfer,json=fungibleAssetTransfer,proto3,oneof"` +} + +func (*SigningInput_Transfer) isSigningInput_TransactionPayload() {} + +func (*SigningInput_TokenTransfer) isSigningInput_TransactionPayload() {} + +func (*SigningInput_CreateAccount) isSigningInput_TransactionPayload() {} + +func (*SigningInput_NftMessage) isSigningInput_TransactionPayload() {} + +func (*SigningInput_RegisterToken) isSigningInput_TransactionPayload() {} + +func (*SigningInput_LiquidStakingMessage) isSigningInput_TransactionPayload() {} + +func (*SigningInput_TokenTransferCoins) isSigningInput_TransactionPayload() {} + +func (*SigningInput_FungibleAssetTransfer) isSigningInput_TransactionPayload() {} + +// Information related to the signed transaction +type TransactionAuthenticator struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signature part of the signed transaction (bytes) + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // Public key of the signer (bytes) + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionAuthenticator) Reset() { + *x = TransactionAuthenticator{} + mi := &file_Aptos_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionAuthenticator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionAuthenticator) ProtoMessage() {} + +func (x *TransactionAuthenticator) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionAuthenticator.ProtoReflect.Descriptor instead. +func (*TransactionAuthenticator) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{16} +} + +func (x *TransactionAuthenticator) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *TransactionAuthenticator) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / The raw transaction (bytes) + RawTxn []byte `protobuf:"bytes,1,opt,name=raw_txn,json=rawTxn,proto3" json:"raw_txn,omitempty"` + // / Public key and signature to authenticate + Authenticator *TransactionAuthenticator `protobuf:"bytes,2,opt,name=authenticator,proto3" json:"authenticator,omitempty"` + // / Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,3,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Transaction json format for api broadcasting (string) + Json string `protobuf:"bytes,4,opt,name=json,proto3" json:"json,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors. + Error common.SigningError `protobuf:"varint,5,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description. + ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Aptos_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Aptos_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Aptos_proto_rawDescGZIP(), []int{17} +} + +func (x *SigningOutput) GetRawTxn() []byte { + if x != nil { + return x.RawTxn + } + return nil +} + +func (x *SigningOutput) GetAuthenticator() *TransactionAuthenticator { + if x != nil { + return x.Authenticator + } + return nil +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Aptos_proto protoreflect.FileDescriptor + +const file_Aptos_proto_rawDesc = "" + + "\n" + + "\vAptos.proto\x12\x0eTW.Aptos.Proto\x1a\fCommon.proto\"9\n" + + "\x0fTransferMessage\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\"`\n" + + "\tStructTag\x12'\n" + + "\x0faccount_address\x18\x01 \x01(\tR\x0eaccountAddress\x12\x16\n" + + "\x06module\x18\x02 \x01(\tR\x06module\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\"u\n" + + "\x14TokenTransferMessage\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x125\n" + + "\bfunction\x18\x03 \x01(\v2\x19.TW.Aptos.Proto.StructTagR\bfunction\"z\n" + + "\x19TokenTransferCoinsMessage\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x125\n" + + "\bfunction\x18\x03 \x01(\v2\x19.TW.Aptos.Proto.StructTagR\bfunction\"q\n" + + "\x1cFungibleAssetTransferMessage\x12)\n" + + "\x10metadata_address\x18\x01 \x01(\tR\x0fmetadataAddress\x12\x0e\n" + + "\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\"U\n" + + "\x1cManagedTokensRegisterMessage\x125\n" + + "\bfunction\x18\x01 \x01(\v2\x19.TW.Aptos.Proto.StructTagR\bfunction\"1\n" + + "\x14CreateAccountMessage\x12\x19\n" + + "\bauth_key\x18\x01 \x01(\tR\aauthKey\"\xc6\x01\n" + + "\x0fOfferNftMessage\x12\x1a\n" + + "\breceiver\x18\x01 \x01(\tR\breceiver\x12\x18\n" + + "\acreator\x18\x02 \x01(\tR\acreator\x12&\n" + + "\x0ecollectionName\x18\x03 \x01(\tR\x0ecollectionName\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\x12)\n" + + "\x10property_version\x18\x05 \x01(\x04R\x0fpropertyVersion\x12\x16\n" + + "\x06amount\x18\x06 \x01(\x04R\x06amount\"\xb4\x01\n" + + "\x15CancelOfferNftMessage\x12\x1a\n" + + "\breceiver\x18\x01 \x01(\tR\breceiver\x12\x18\n" + + "\acreator\x18\x02 \x01(\tR\acreator\x12&\n" + + "\x0ecollectionName\x18\x03 \x01(\tR\x0ecollectionName\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\x12)\n" + + "\x10property_version\x18\x05 \x01(\x04R\x0fpropertyVersion\"\xaa\x01\n" + + "\x0fClaimNftMessage\x12\x16\n" + + "\x06sender\x18\x01 \x01(\tR\x06sender\x12\x18\n" + + "\acreator\x18\x02 \x01(\tR\acreator\x12&\n" + + "\x0ecollectionName\x18\x03 \x01(\tR\x0ecollectionName\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\x12)\n" + + "\x10property_version\x18\x05 \x01(\x04R\x0fpropertyVersion\" \n" + + "\fTortugaClaim\x12\x10\n" + + "\x03idx\x18\x01 \x01(\x04R\x03idx\"&\n" + + "\fTortugaStake\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x04R\x06amount\"(\n" + + "\x0eTortugaUnstake\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x04R\x06amount\"\x91\x02\n" + + "\rLiquidStaking\x124\n" + + "\x16smart_contract_address\x18\x01 \x01(\tR\x14smartContractAddress\x124\n" + + "\x05stake\x18\x02 \x01(\v2\x1c.TW.Aptos.Proto.TortugaStakeH\x00R\x05stake\x12:\n" + + "\aunstake\x18\x03 \x01(\v2\x1e.TW.Aptos.Proto.TortugaUnstakeH\x00R\aunstake\x124\n" + + "\x05claim\x18\x04 \x01(\v2\x1c.TW.Aptos.Proto.TortugaClaimH\x00R\x05claimB\"\n" + + " liquid_stake_transaction_payload\"\xfa\x01\n" + + "\n" + + "NftMessage\x12>\n" + + "\toffer_nft\x18\x01 \x01(\v2\x1f.TW.Aptos.Proto.OfferNftMessageH\x00R\bofferNft\x12Q\n" + + "\x10cancel_offer_nft\x18\x02 \x01(\v2%.TW.Aptos.Proto.CancelOfferNftMessageH\x00R\x0ecancelOfferNft\x12>\n" + + "\tclaim_nft\x18\x03 \x01(\v2\x1f.TW.Aptos.Proto.ClaimNftMessageH\x00R\bclaimNftB\x19\n" + + "\x17nft_transaction_payload\"\xee\a\n" + + "\fSigningInput\x12\x16\n" + + "\x06sender\x18\x01 \x01(\tR\x06sender\x12'\n" + + "\x0fsequence_number\x18\x02 \x01(\x03R\x0esequenceNumber\x12$\n" + + "\x0emax_gas_amount\x18\x03 \x01(\x04R\fmaxGasAmount\x12$\n" + + "\x0egas_unit_price\x18\x04 \x01(\x04R\fgasUnitPrice\x12:\n" + + "\x19expiration_timestamp_secs\x18\x05 \x01(\x04R\x17expirationTimestampSecs\x12\x19\n" + + "\bchain_id\x18\x06 \x01(\rR\achainId\x12\x1f\n" + + "\vprivate_key\x18\a \x01(\fR\n" + + "privateKey\x12\x1f\n" + + "\vany_encoded\x18\b \x01(\tR\n" + + "anyEncoded\x12=\n" + + "\btransfer\x18\t \x01(\v2\x1f.TW.Aptos.Proto.TransferMessageH\x00R\btransfer\x12M\n" + + "\x0etoken_transfer\x18\n" + + " \x01(\v2$.TW.Aptos.Proto.TokenTransferMessageH\x00R\rtokenTransfer\x12M\n" + + "\x0ecreate_account\x18\v \x01(\v2$.TW.Aptos.Proto.CreateAccountMessageH\x00R\rcreateAccount\x12=\n" + + "\vnft_message\x18\f \x01(\v2\x1a.TW.Aptos.Proto.NftMessageH\x00R\n" + + "nftMessage\x12U\n" + + "\x0eregister_token\x18\r \x01(\v2,.TW.Aptos.Proto.ManagedTokensRegisterMessageH\x00R\rregisterToken\x12U\n" + + "\x16liquid_staking_message\x18\x0e \x01(\v2\x1d.TW.Aptos.Proto.LiquidStakingH\x00R\x14liquidStakingMessage\x12]\n" + + "\x14token_transfer_coins\x18\x0f \x01(\v2).TW.Aptos.Proto.TokenTransferCoinsMessageH\x00R\x12tokenTransferCoins\x12f\n" + + "\x17fungible_asset_transfer\x18\x10 \x01(\v2,.TW.Aptos.Proto.FungibleAssetTransferMessageH\x00R\x15fungibleAssetTransfer\x12\x10\n" + + "\x03abi\x18\x15 \x01(\tR\x03abiB\x15\n" + + "\x13transaction_payload\"W\n" + + "\x18TransactionAuthenticator\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\"\x80\x02\n" + + "\rSigningOutput\x12\x17\n" + + "\araw_txn\x18\x01 \x01(\fR\x06rawTxn\x12N\n" + + "\rauthenticator\x18\x02 \x01(\v2(.TW.Aptos.Proto.TransactionAuthenticatorR\rauthenticator\x12\x18\n" + + "\aencoded\x18\x03 \x01(\fR\aencoded\x12\x12\n" + + "\x04json\x18\x04 \x01(\tR\x04json\x123\n" + + "\x05error\x18\x05 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x06 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Aptos_proto_rawDescOnce sync.Once + file_Aptos_proto_rawDescData []byte +) + +func file_Aptos_proto_rawDescGZIP() []byte { + file_Aptos_proto_rawDescOnce.Do(func() { + file_Aptos_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Aptos_proto_rawDesc), len(file_Aptos_proto_rawDesc))) + }) + return file_Aptos_proto_rawDescData +} + +var file_Aptos_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_Aptos_proto_goTypes = []any{ + (*TransferMessage)(nil), // 0: TW.Aptos.Proto.TransferMessage + (*StructTag)(nil), // 1: TW.Aptos.Proto.StructTag + (*TokenTransferMessage)(nil), // 2: TW.Aptos.Proto.TokenTransferMessage + (*TokenTransferCoinsMessage)(nil), // 3: TW.Aptos.Proto.TokenTransferCoinsMessage + (*FungibleAssetTransferMessage)(nil), // 4: TW.Aptos.Proto.FungibleAssetTransferMessage + (*ManagedTokensRegisterMessage)(nil), // 5: TW.Aptos.Proto.ManagedTokensRegisterMessage + (*CreateAccountMessage)(nil), // 6: TW.Aptos.Proto.CreateAccountMessage + (*OfferNftMessage)(nil), // 7: TW.Aptos.Proto.OfferNftMessage + (*CancelOfferNftMessage)(nil), // 8: TW.Aptos.Proto.CancelOfferNftMessage + (*ClaimNftMessage)(nil), // 9: TW.Aptos.Proto.ClaimNftMessage + (*TortugaClaim)(nil), // 10: TW.Aptos.Proto.TortugaClaim + (*TortugaStake)(nil), // 11: TW.Aptos.Proto.TortugaStake + (*TortugaUnstake)(nil), // 12: TW.Aptos.Proto.TortugaUnstake + (*LiquidStaking)(nil), // 13: TW.Aptos.Proto.LiquidStaking + (*NftMessage)(nil), // 14: TW.Aptos.Proto.NftMessage + (*SigningInput)(nil), // 15: TW.Aptos.Proto.SigningInput + (*TransactionAuthenticator)(nil), // 16: TW.Aptos.Proto.TransactionAuthenticator + (*SigningOutput)(nil), // 17: TW.Aptos.Proto.SigningOutput + (common.SigningError)(0), // 18: TW.Common.Proto.SigningError +} +var file_Aptos_proto_depIdxs = []int32{ + 1, // 0: TW.Aptos.Proto.TokenTransferMessage.function:type_name -> TW.Aptos.Proto.StructTag + 1, // 1: TW.Aptos.Proto.TokenTransferCoinsMessage.function:type_name -> TW.Aptos.Proto.StructTag + 1, // 2: TW.Aptos.Proto.ManagedTokensRegisterMessage.function:type_name -> TW.Aptos.Proto.StructTag + 11, // 3: TW.Aptos.Proto.LiquidStaking.stake:type_name -> TW.Aptos.Proto.TortugaStake + 12, // 4: TW.Aptos.Proto.LiquidStaking.unstake:type_name -> TW.Aptos.Proto.TortugaUnstake + 10, // 5: TW.Aptos.Proto.LiquidStaking.claim:type_name -> TW.Aptos.Proto.TortugaClaim + 7, // 6: TW.Aptos.Proto.NftMessage.offer_nft:type_name -> TW.Aptos.Proto.OfferNftMessage + 8, // 7: TW.Aptos.Proto.NftMessage.cancel_offer_nft:type_name -> TW.Aptos.Proto.CancelOfferNftMessage + 9, // 8: TW.Aptos.Proto.NftMessage.claim_nft:type_name -> TW.Aptos.Proto.ClaimNftMessage + 0, // 9: TW.Aptos.Proto.SigningInput.transfer:type_name -> TW.Aptos.Proto.TransferMessage + 2, // 10: TW.Aptos.Proto.SigningInput.token_transfer:type_name -> TW.Aptos.Proto.TokenTransferMessage + 6, // 11: TW.Aptos.Proto.SigningInput.create_account:type_name -> TW.Aptos.Proto.CreateAccountMessage + 14, // 12: TW.Aptos.Proto.SigningInput.nft_message:type_name -> TW.Aptos.Proto.NftMessage + 5, // 13: TW.Aptos.Proto.SigningInput.register_token:type_name -> TW.Aptos.Proto.ManagedTokensRegisterMessage + 13, // 14: TW.Aptos.Proto.SigningInput.liquid_staking_message:type_name -> TW.Aptos.Proto.LiquidStaking + 3, // 15: TW.Aptos.Proto.SigningInput.token_transfer_coins:type_name -> TW.Aptos.Proto.TokenTransferCoinsMessage + 4, // 16: TW.Aptos.Proto.SigningInput.fungible_asset_transfer:type_name -> TW.Aptos.Proto.FungibleAssetTransferMessage + 16, // 17: TW.Aptos.Proto.SigningOutput.authenticator:type_name -> TW.Aptos.Proto.TransactionAuthenticator + 18, // 18: TW.Aptos.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_Aptos_proto_init() } +func file_Aptos_proto_init() { + if File_Aptos_proto != nil { + return + } + file_Aptos_proto_msgTypes[13].OneofWrappers = []any{ + (*LiquidStaking_Stake)(nil), + (*LiquidStaking_Unstake)(nil), + (*LiquidStaking_Claim)(nil), + } + file_Aptos_proto_msgTypes[14].OneofWrappers = []any{ + (*NftMessage_OfferNft)(nil), + (*NftMessage_CancelOfferNft)(nil), + (*NftMessage_ClaimNft)(nil), + } + file_Aptos_proto_msgTypes[15].OneofWrappers = []any{ + (*SigningInput_Transfer)(nil), + (*SigningInput_TokenTransfer)(nil), + (*SigningInput_CreateAccount)(nil), + (*SigningInput_NftMessage)(nil), + (*SigningInput_RegisterToken)(nil), + (*SigningInput_LiquidStakingMessage)(nil), + (*SigningInput_TokenTransferCoins)(nil), + (*SigningInput_FungibleAssetTransfer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Aptos_proto_rawDesc), len(file_Aptos_proto_rawDesc)), + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Aptos_proto_goTypes, + DependencyIndexes: file_Aptos_proto_depIdxs, + MessageInfos: file_Aptos_proto_msgTypes, + }.Build() + File_Aptos_proto = out.File + file_Aptos_proto_goTypes = nil + file_Aptos_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/babylonstaking/BabylonStaking.pb.go b/wrapper/go-wrapper/protos/babylonstaking/BabylonStaking.pb.go new file mode 100644 index 00000000000..a7bc5eaa27c --- /dev/null +++ b/wrapper/go-wrapper/protos/babylonstaking/BabylonStaking.pb.go @@ -0,0 +1,767 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: BabylonStaking.proto + +package babylonstaking + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Public key and corresponding signature. +type PublicKeySignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Public key bytes. Can be either compressed (33 bytes) or x-only (32 bytes). + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Signature 64-length byte array. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicKeySignature) Reset() { + *x = PublicKeySignature{} + mi := &file_BabylonStaking_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicKeySignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKeySignature) ProtoMessage() {} + +func (x *PublicKeySignature) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicKeySignature.ProtoReflect.Descriptor instead. +func (*PublicKeySignature) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicKeySignature) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *PublicKeySignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type StakingInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // User's public key. + StakerPublicKey []byte `protobuf:"bytes,1,opt,name=staker_public_key,json=stakerPublicKey,proto3" json:"staker_public_key,omitempty"` + // Finality provider's public key chosen by the user. + FinalityProviderPublicKey []byte `protobuf:"bytes,2,opt,name=finality_provider_public_key,json=finalityProviderPublicKey,proto3" json:"finality_provider_public_key,omitempty"` + // Staking Output's lock time. + // Equal to `global_parameters.staking_time` when creating a Staking transaction. + // or `global_parameters.unbonding_time` when creating an Unbonding transaction. + StakingTime uint32 `protobuf:"varint,3,opt,name=staking_time,json=stakingTime,proto3" json:"staking_time,omitempty"` + // Retrieved from global_parameters.covenant_pks. + // Babylon nodes that can approve Unbonding tx or Slash the staked position when acting bad. + CovenantCommitteePublicKeys [][]byte `protobuf:"bytes,4,rep,name=covenant_committee_public_keys,json=covenantCommitteePublicKeys,proto3" json:"covenant_committee_public_keys,omitempty"` + // Retrieved from global_parameters.covenant_quorum. + // Specifies the quorum required by the covenant committee for unbonding transactions to be confirmed. + CovenantQuorum uint32 `protobuf:"varint,5,opt,name=covenant_quorum,json=covenantQuorum,proto3" json:"covenant_quorum,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StakingInfo) Reset() { + *x = StakingInfo{} + mi := &file_BabylonStaking_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StakingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StakingInfo) ProtoMessage() {} + +func (x *StakingInfo) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StakingInfo.ProtoReflect.Descriptor instead. +func (*StakingInfo) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{1} +} + +func (x *StakingInfo) GetStakerPublicKey() []byte { + if x != nil { + return x.StakerPublicKey + } + return nil +} + +func (x *StakingInfo) GetFinalityProviderPublicKey() []byte { + if x != nil { + return x.FinalityProviderPublicKey + } + return nil +} + +func (x *StakingInfo) GetStakingTime() uint32 { + if x != nil { + return x.StakingTime + } + return 0 +} + +func (x *StakingInfo) GetCovenantCommitteePublicKeys() [][]byte { + if x != nil { + return x.CovenantCommitteePublicKeys + } + return nil +} + +func (x *StakingInfo) GetCovenantQuorum() uint32 { + if x != nil { + return x.CovenantQuorum + } + return 0 +} + +type InputBuilder struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InputBuilder) Reset() { + *x = InputBuilder{} + mi := &file_BabylonStaking_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InputBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBuilder) ProtoMessage() {} + +func (x *InputBuilder) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBuilder.ProtoReflect.Descriptor instead. +func (*InputBuilder) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{2} +} + +type OutputBuilder struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputBuilder) Reset() { + *x = OutputBuilder{} + mi := &file_BabylonStaking_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputBuilder) ProtoMessage() {} + +func (x *OutputBuilder) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputBuilder.ProtoReflect.Descriptor instead. +func (*OutputBuilder) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{3} +} + +// Spend a Staking Output via timelock path (staking time expired). +// In other words, create a Withdraw transaction. +type InputBuilder_StakingTimelockPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InputBuilder_StakingTimelockPath) Reset() { + *x = InputBuilder_StakingTimelockPath{} + mi := &file_BabylonStaking_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InputBuilder_StakingTimelockPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBuilder_StakingTimelockPath) ProtoMessage() {} + +func (x *InputBuilder_StakingTimelockPath) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBuilder_StakingTimelockPath.ProtoReflect.Descriptor instead. +func (*InputBuilder_StakingTimelockPath) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *InputBuilder_StakingTimelockPath) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +// Spend a Staking Output via unbonding path. +// In other words, create an Unbonding transaction. +type InputBuilder_StakingUnbondingPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // Signatures signed by covenant committees. + // There can be less signatures than covenant public keys, but not less than `covenant_quorum`. + CovenantCommitteeSignatures []*PublicKeySignature `protobuf:"bytes,2,rep,name=covenant_committee_signatures,json=covenantCommitteeSignatures,proto3" json:"covenant_committee_signatures,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InputBuilder_StakingUnbondingPath) Reset() { + *x = InputBuilder_StakingUnbondingPath{} + mi := &file_BabylonStaking_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InputBuilder_StakingUnbondingPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBuilder_StakingUnbondingPath) ProtoMessage() {} + +func (x *InputBuilder_StakingUnbondingPath) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBuilder_StakingUnbondingPath.ProtoReflect.Descriptor instead. +func (*InputBuilder_StakingUnbondingPath) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *InputBuilder_StakingUnbondingPath) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +func (x *InputBuilder_StakingUnbondingPath) GetCovenantCommitteeSignatures() []*PublicKeySignature { + if x != nil { + return x.CovenantCommitteeSignatures + } + return nil +} + +// Spend a Staking Output via slashing path. +// Slashing path is only used in [ExpressOfInterest](https://github.com/babylonlabs-io/babylon-proto-ts/blob/ef42d04959b326849fe8c9773ab23802573ad407/src/generated/babylon/btcstaking/v1/tx.ts#L61). +// In other words, generate an unsigned Slashing transaction, pre-sign the staker's signature only and share to Babylon PoS chain. +type InputBuilder_StakingSlashingPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // Empty in most of the cases. Staker's signature can be calculated without the fp signature. + FinalityProviderSignature *PublicKeySignature `protobuf:"bytes,2,opt,name=finality_provider_signature,json=finalityProviderSignature,proto3" json:"finality_provider_signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InputBuilder_StakingSlashingPath) Reset() { + *x = InputBuilder_StakingSlashingPath{} + mi := &file_BabylonStaking_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InputBuilder_StakingSlashingPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBuilder_StakingSlashingPath) ProtoMessage() {} + +func (x *InputBuilder_StakingSlashingPath) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBuilder_StakingSlashingPath.ProtoReflect.Descriptor instead. +func (*InputBuilder_StakingSlashingPath) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{2, 2} +} + +func (x *InputBuilder_StakingSlashingPath) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +func (x *InputBuilder_StakingSlashingPath) GetFinalityProviderSignature() *PublicKeySignature { + if x != nil { + return x.FinalityProviderSignature + } + return nil +} + +// Spend an Unbonding Output via timelock path (unbonding time expired). +// In other words, create a Withdraw transaction spending an Unbonding transaction. +type InputBuilder_UnbondingTimelockPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InputBuilder_UnbondingTimelockPath) Reset() { + *x = InputBuilder_UnbondingTimelockPath{} + mi := &file_BabylonStaking_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InputBuilder_UnbondingTimelockPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBuilder_UnbondingTimelockPath) ProtoMessage() {} + +func (x *InputBuilder_UnbondingTimelockPath) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBuilder_UnbondingTimelockPath.ProtoReflect.Descriptor instead. +func (*InputBuilder_UnbondingTimelockPath) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{2, 3} +} + +func (x *InputBuilder_UnbondingTimelockPath) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +// Spend an Unbonding Output via slashing path. +// Slashing path is only used in [ExpressOfInterest](https://github.com/babylonlabs-io/babylon-proto-ts/blob/ef42d04959b326849fe8c9773ab23802573ad407/src/generated/babylon/btcstaking/v1/tx.ts#L61). +// In other words, generate an unsigned Slashing transaction, pre-sign the staker's signature only and share to Babylon PoS chain. +type InputBuilder_UnbondingSlashingPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + // Empty in most of the cases. Staker's signature can be calculated without the fp signature. + FinalityProviderSignature *PublicKeySignature `protobuf:"bytes,2,opt,name=finality_provider_signature,json=finalityProviderSignature,proto3" json:"finality_provider_signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InputBuilder_UnbondingSlashingPath) Reset() { + *x = InputBuilder_UnbondingSlashingPath{} + mi := &file_BabylonStaking_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InputBuilder_UnbondingSlashingPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InputBuilder_UnbondingSlashingPath) ProtoMessage() {} + +func (x *InputBuilder_UnbondingSlashingPath) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InputBuilder_UnbondingSlashingPath.ProtoReflect.Descriptor instead. +func (*InputBuilder_UnbondingSlashingPath) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{2, 4} +} + +func (x *InputBuilder_UnbondingSlashingPath) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +func (x *InputBuilder_UnbondingSlashingPath) GetFinalityProviderSignature() *PublicKeySignature { + if x != nil { + return x.FinalityProviderSignature + } + return nil +} + +// Create a Staking Output. +type OutputBuilder_StakingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputBuilder_StakingOutput) Reset() { + *x = OutputBuilder_StakingOutput{} + mi := &file_BabylonStaking_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputBuilder_StakingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputBuilder_StakingOutput) ProtoMessage() {} + +func (x *OutputBuilder_StakingOutput) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputBuilder_StakingOutput.ProtoReflect.Descriptor instead. +func (*OutputBuilder_StakingOutput) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *OutputBuilder_StakingOutput) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +// Create an Unbonding Output. +type OutputBuilder_UnbondingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + Params *StakingInfo `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputBuilder_UnbondingOutput) Reset() { + *x = OutputBuilder_UnbondingOutput{} + mi := &file_BabylonStaking_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputBuilder_UnbondingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputBuilder_UnbondingOutput) ProtoMessage() {} + +func (x *OutputBuilder_UnbondingOutput) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputBuilder_UnbondingOutput.ProtoReflect.Descriptor instead. +func (*OutputBuilder_UnbondingOutput) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *OutputBuilder_UnbondingOutput) GetParams() *StakingInfo { + if x != nil { + return x.Params + } + return nil +} + +// Creates an OP_RETURN output used to identify the staking transaction among other transactions in the Bitcoin ledger. +type OutputBuilder_OpReturn struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Retrieved from global_parameters.Tag. + Tag []byte `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + // User's public key. + StakerPublicKey []byte `protobuf:"bytes,2,opt,name=staker_public_key,json=stakerPublicKey,proto3" json:"staker_public_key,omitempty"` + // Finality provider's public key chosen by the user. + FinalityProviderPublicKey []byte `protobuf:"bytes,3,opt,name=finality_provider_public_key,json=finalityProviderPublicKey,proto3" json:"finality_provider_public_key,omitempty"` + // global_parameters.min_staking_time <= staking_time <= global_parameters.max_staking_time. + StakingTime uint32 `protobuf:"varint,4,opt,name=staking_time,json=stakingTime,proto3" json:"staking_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputBuilder_OpReturn) Reset() { + *x = OutputBuilder_OpReturn{} + mi := &file_BabylonStaking_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputBuilder_OpReturn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputBuilder_OpReturn) ProtoMessage() {} + +func (x *OutputBuilder_OpReturn) ProtoReflect() protoreflect.Message { + mi := &file_BabylonStaking_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputBuilder_OpReturn.ProtoReflect.Descriptor instead. +func (*OutputBuilder_OpReturn) Descriptor() ([]byte, []int) { + return file_BabylonStaking_proto_rawDescGZIP(), []int{3, 2} +} + +func (x *OutputBuilder_OpReturn) GetTag() []byte { + if x != nil { + return x.Tag + } + return nil +} + +func (x *OutputBuilder_OpReturn) GetStakerPublicKey() []byte { + if x != nil { + return x.StakerPublicKey + } + return nil +} + +func (x *OutputBuilder_OpReturn) GetFinalityProviderPublicKey() []byte { + if x != nil { + return x.FinalityProviderPublicKey + } + return nil +} + +func (x *OutputBuilder_OpReturn) GetStakingTime() uint32 { + if x != nil { + return x.StakingTime + } + return 0 +} + +var File_BabylonStaking_proto protoreflect.FileDescriptor + +const file_BabylonStaking_proto_rawDesc = "" + + "\n" + + "\x14BabylonStaking.proto\x12\x17TW.BabylonStaking.Proto\"Q\n" + + "\x12PublicKeySignature\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\fR\tpublicKey\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\"\x8b\x02\n" + + "\vStakingInfo\x12*\n" + + "\x11staker_public_key\x18\x01 \x01(\fR\x0fstakerPublicKey\x12?\n" + + "\x1cfinality_provider_public_key\x18\x02 \x01(\fR\x19finalityProviderPublicKey\x12!\n" + + "\fstaking_time\x18\x03 \x01(\rR\vstakingTime\x12C\n" + + "\x1ecovenant_committee_public_keys\x18\x04 \x03(\fR\x1bcovenantCommitteePublicKeys\x12'\n" + + "\x0fcovenant_quorum\x18\x05 \x01(\rR\x0ecovenantQuorum\"\x8a\x06\n" + + "\fInputBuilder\x1aS\n" + + "\x13StakingTimelockPath\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x1a\xc5\x01\n" + + "\x14StakingUnbondingPath\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x12o\n" + + "\x1dcovenant_committee_signatures\x18\x02 \x03(\v2+.TW.BabylonStaking.Proto.PublicKeySignatureR\x1bcovenantCommitteeSignatures\x1a\xc0\x01\n" + + "\x13StakingSlashingPath\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x12k\n" + + "\x1bfinality_provider_signature\x18\x02 \x01(\v2+.TW.BabylonStaking.Proto.PublicKeySignatureR\x19finalityProviderSignature\x1aU\n" + + "\x15UnbondingTimelockPath\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x1a\xc2\x01\n" + + "\x15UnbondingSlashingPath\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x12k\n" + + "\x1bfinality_provider_signature\x18\x02 \x01(\v2+.TW.BabylonStaking.Proto.PublicKeySignatureR\x19finalityProviderSignature\"\xde\x02\n" + + "\rOutputBuilder\x1aM\n" + + "\rStakingOutput\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x1aO\n" + + "\x0fUnbondingOutput\x12<\n" + + "\x06params\x18\x01 \x01(\v2$.TW.BabylonStaking.Proto.StakingInfoR\x06params\x1a\xac\x01\n" + + "\bOpReturn\x12\x10\n" + + "\x03tag\x18\x01 \x01(\fR\x03tag\x12*\n" + + "\x11staker_public_key\x18\x02 \x01(\fR\x0fstakerPublicKey\x12?\n" + + "\x1cfinality_provider_public_key\x18\x03 \x01(\fR\x19finalityProviderPublicKey\x12!\n" + + "\fstaking_time\x18\x04 \x01(\rR\vstakingTimeB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_BabylonStaking_proto_rawDescOnce sync.Once + file_BabylonStaking_proto_rawDescData []byte +) + +func file_BabylonStaking_proto_rawDescGZIP() []byte { + file_BabylonStaking_proto_rawDescOnce.Do(func() { + file_BabylonStaking_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_BabylonStaking_proto_rawDesc), len(file_BabylonStaking_proto_rawDesc))) + }) + return file_BabylonStaking_proto_rawDescData +} + +var file_BabylonStaking_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_BabylonStaking_proto_goTypes = []any{ + (*PublicKeySignature)(nil), // 0: TW.BabylonStaking.Proto.PublicKeySignature + (*StakingInfo)(nil), // 1: TW.BabylonStaking.Proto.StakingInfo + (*InputBuilder)(nil), // 2: TW.BabylonStaking.Proto.InputBuilder + (*OutputBuilder)(nil), // 3: TW.BabylonStaking.Proto.OutputBuilder + (*InputBuilder_StakingTimelockPath)(nil), // 4: TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath + (*InputBuilder_StakingUnbondingPath)(nil), // 5: TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath + (*InputBuilder_StakingSlashingPath)(nil), // 6: TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath + (*InputBuilder_UnbondingTimelockPath)(nil), // 7: TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath + (*InputBuilder_UnbondingSlashingPath)(nil), // 8: TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath + (*OutputBuilder_StakingOutput)(nil), // 9: TW.BabylonStaking.Proto.OutputBuilder.StakingOutput + (*OutputBuilder_UnbondingOutput)(nil), // 10: TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput + (*OutputBuilder_OpReturn)(nil), // 11: TW.BabylonStaking.Proto.OutputBuilder.OpReturn +} +var file_BabylonStaking_proto_depIdxs = []int32{ + 1, // 0: TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 1, // 1: TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 0, // 2: TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath.covenant_committee_signatures:type_name -> TW.BabylonStaking.Proto.PublicKeySignature + 1, // 3: TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 0, // 4: TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath.finality_provider_signature:type_name -> TW.BabylonStaking.Proto.PublicKeySignature + 1, // 5: TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 1, // 6: TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 0, // 7: TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath.finality_provider_signature:type_name -> TW.BabylonStaking.Proto.PublicKeySignature + 1, // 8: TW.BabylonStaking.Proto.OutputBuilder.StakingOutput.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 1, // 9: TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput.params:type_name -> TW.BabylonStaking.Proto.StakingInfo + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_BabylonStaking_proto_init() } +func file_BabylonStaking_proto_init() { + if File_BabylonStaking_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_BabylonStaking_proto_rawDesc), len(file_BabylonStaking_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_BabylonStaking_proto_goTypes, + DependencyIndexes: file_BabylonStaking_proto_depIdxs, + MessageInfos: file_BabylonStaking_proto_msgTypes, + }.Build() + File_BabylonStaking_proto = out.File + file_BabylonStaking_proto_goTypes = nil + file_BabylonStaking_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/barz/Barz.pb.go b/wrapper/go-wrapper/protos/barz/Barz.pb.go new file mode 100644 index 00000000000..2ec5b2fecf0 --- /dev/null +++ b/wrapper/go-wrapper/protos/barz/Barz.pb.go @@ -0,0 +1,402 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Barz.proto + +package barz + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// FacetCutAction represents the action to be performed for a FacetCut +type FacetCutAction int32 + +const ( + FacetCutAction_ADD FacetCutAction = 0 + FacetCutAction_REPLACE FacetCutAction = 1 + FacetCutAction_REMOVE FacetCutAction = 2 +) + +// Enum value maps for FacetCutAction. +var ( + FacetCutAction_name = map[int32]string{ + 0: "ADD", + 1: "REPLACE", + 2: "REMOVE", + } + FacetCutAction_value = map[string]int32{ + "ADD": 0, + "REPLACE": 1, + "REMOVE": 2, + } +) + +func (x FacetCutAction) Enum() *FacetCutAction { + p := new(FacetCutAction) + *p = x + return p +} + +func (x FacetCutAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FacetCutAction) Descriptor() protoreflect.EnumDescriptor { + return file_Barz_proto_enumTypes[0].Descriptor() +} + +func (FacetCutAction) Type() protoreflect.EnumType { + return &file_Barz_proto_enumTypes[0] +} + +func (x FacetCutAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FacetCutAction.Descriptor instead. +func (FacetCutAction) EnumDescriptor() ([]byte, []int) { + return file_Barz_proto_rawDescGZIP(), []int{0} +} + +// Input parameters for calculating a counterfactual address for ERC-4337 based smart contract wallet +type ContractAddressInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ERC-4337 entry point + EntryPoint string `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"` + // Address of the contract factory + Factory string `protobuf:"bytes,2,opt,name=factory,proto3" json:"factory,omitempty"` + // Diamond proxy facets required for the contract setup + AccountFacet string `protobuf:"bytes,3,opt,name=account_facet,json=accountFacet,proto3" json:"account_facet,omitempty"` + VerificationFacet string `protobuf:"bytes,4,opt,name=verification_facet,json=verificationFacet,proto3" json:"verification_facet,omitempty"` + FacetRegistry string `protobuf:"bytes,5,opt,name=facet_registry,json=facetRegistry,proto3" json:"facet_registry,omitempty"` + DefaultFallback string `protobuf:"bytes,6,opt,name=default_fallback,json=defaultFallback,proto3" json:"default_fallback,omitempty"` + // Bytecode of the smart contract to deploy + Bytecode string `protobuf:"bytes,7,opt,name=bytecode,proto3" json:"bytecode,omitempty"` + // PublicKey of the wallet + PublicKey string `protobuf:"bytes,8,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Salt is used to derive multiple account from the same public key + Salt uint32 `protobuf:"varint,9,opt,name=salt,proto3" json:"salt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContractAddressInput) Reset() { + *x = ContractAddressInput{} + mi := &file_Barz_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContractAddressInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractAddressInput) ProtoMessage() {} + +func (x *ContractAddressInput) ProtoReflect() protoreflect.Message { + mi := &file_Barz_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractAddressInput.ProtoReflect.Descriptor instead. +func (*ContractAddressInput) Descriptor() ([]byte, []int) { + return file_Barz_proto_rawDescGZIP(), []int{0} +} + +func (x *ContractAddressInput) GetEntryPoint() string { + if x != nil { + return x.EntryPoint + } + return "" +} + +func (x *ContractAddressInput) GetFactory() string { + if x != nil { + return x.Factory + } + return "" +} + +func (x *ContractAddressInput) GetAccountFacet() string { + if x != nil { + return x.AccountFacet + } + return "" +} + +func (x *ContractAddressInput) GetVerificationFacet() string { + if x != nil { + return x.VerificationFacet + } + return "" +} + +func (x *ContractAddressInput) GetFacetRegistry() string { + if x != nil { + return x.FacetRegistry + } + return "" +} + +func (x *ContractAddressInput) GetDefaultFallback() string { + if x != nil { + return x.DefaultFallback + } + return "" +} + +func (x *ContractAddressInput) GetBytecode() string { + if x != nil { + return x.Bytecode + } + return "" +} + +func (x *ContractAddressInput) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *ContractAddressInput) GetSalt() uint32 { + if x != nil { + return x.Salt + } + return 0 +} + +// FacetCut represents a single operation to be performed on a facet +type FacetCut struct { + state protoimpl.MessageState `protogen:"open.v1"` + FacetAddress string `protobuf:"bytes,1,opt,name=facet_address,json=facetAddress,proto3" json:"facet_address,omitempty"` // The address of the facet + Action FacetCutAction `protobuf:"varint,2,opt,name=action,proto3,enum=TW.Barz.Proto.FacetCutAction" json:"action,omitempty"` // The action to perform + FunctionSelectors [][]byte `protobuf:"bytes,3,rep,name=function_selectors,json=functionSelectors,proto3" json:"function_selectors,omitempty"` // List of function selectors, each is bytes4 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FacetCut) Reset() { + *x = FacetCut{} + mi := &file_Barz_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FacetCut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FacetCut) ProtoMessage() {} + +func (x *FacetCut) ProtoReflect() protoreflect.Message { + mi := &file_Barz_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FacetCut.ProtoReflect.Descriptor instead. +func (*FacetCut) Descriptor() ([]byte, []int) { + return file_Barz_proto_rawDescGZIP(), []int{1} +} + +func (x *FacetCut) GetFacetAddress() string { + if x != nil { + return x.FacetAddress + } + return "" +} + +func (x *FacetCut) GetAction() FacetCutAction { + if x != nil { + return x.Action + } + return FacetCutAction_ADD +} + +func (x *FacetCut) GetFunctionSelectors() [][]byte { + if x != nil { + return x.FunctionSelectors + } + return nil +} + +// DiamondCutInput represents the input parameters for a diamondCut operation +type DiamondCutInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + FacetCuts []*FacetCut `protobuf:"bytes,1,rep,name=facet_cuts,json=facetCuts,proto3" json:"facet_cuts,omitempty"` // List of facet cuts to apply + InitAddress string `protobuf:"bytes,2,opt,name=init_address,json=initAddress,proto3" json:"init_address,omitempty"` // Address to call with `init` data after applying cuts + InitData []byte `protobuf:"bytes,3,opt,name=init_data,json=initData,proto3" json:"init_data,omitempty"` // Data to pass to `init` function call + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DiamondCutInput) Reset() { + *x = DiamondCutInput{} + mi := &file_Barz_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DiamondCutInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiamondCutInput) ProtoMessage() {} + +func (x *DiamondCutInput) ProtoReflect() protoreflect.Message { + mi := &file_Barz_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiamondCutInput.ProtoReflect.Descriptor instead. +func (*DiamondCutInput) Descriptor() ([]byte, []int) { + return file_Barz_proto_rawDescGZIP(), []int{2} +} + +func (x *DiamondCutInput) GetFacetCuts() []*FacetCut { + if x != nil { + return x.FacetCuts + } + return nil +} + +func (x *DiamondCutInput) GetInitAddress() string { + if x != nil { + return x.InitAddress + } + return "" +} + +func (x *DiamondCutInput) GetInitData() []byte { + if x != nil { + return x.InitData + } + return nil +} + +var File_Barz_proto protoreflect.FileDescriptor + +const file_Barz_proto_rawDesc = "" + + "\n" + + "\n" + + "Barz.proto\x12\rTW.Barz.Proto\"\xc6\x02\n" + + "\x14ContractAddressInput\x12\x1f\n" + + "\ventry_point\x18\x01 \x01(\tR\n" + + "entryPoint\x12\x18\n" + + "\afactory\x18\x02 \x01(\tR\afactory\x12#\n" + + "\raccount_facet\x18\x03 \x01(\tR\faccountFacet\x12-\n" + + "\x12verification_facet\x18\x04 \x01(\tR\x11verificationFacet\x12%\n" + + "\x0efacet_registry\x18\x05 \x01(\tR\rfacetRegistry\x12)\n" + + "\x10default_fallback\x18\x06 \x01(\tR\x0fdefaultFallback\x12\x1a\n" + + "\bbytecode\x18\a \x01(\tR\bbytecode\x12\x1d\n" + + "\n" + + "public_key\x18\b \x01(\tR\tpublicKey\x12\x12\n" + + "\x04salt\x18\t \x01(\rR\x04salt\"\x95\x01\n" + + "\bFacetCut\x12#\n" + + "\rfacet_address\x18\x01 \x01(\tR\ffacetAddress\x125\n" + + "\x06action\x18\x02 \x01(\x0e2\x1d.TW.Barz.Proto.FacetCutActionR\x06action\x12-\n" + + "\x12function_selectors\x18\x03 \x03(\fR\x11functionSelectors\"\x89\x01\n" + + "\x0fDiamondCutInput\x126\n" + + "\n" + + "facet_cuts\x18\x01 \x03(\v2\x17.TW.Barz.Proto.FacetCutR\tfacetCuts\x12!\n" + + "\finit_address\x18\x02 \x01(\tR\vinitAddress\x12\x1b\n" + + "\tinit_data\x18\x03 \x01(\fR\binitData*2\n" + + "\x0eFacetCutAction\x12\a\n" + + "\x03ADD\x10\x00\x12\v\n" + + "\aREPLACE\x10\x01\x12\n" + + "\n" + + "\x06REMOVE\x10\x02B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Barz_proto_rawDescOnce sync.Once + file_Barz_proto_rawDescData []byte +) + +func file_Barz_proto_rawDescGZIP() []byte { + file_Barz_proto_rawDescOnce.Do(func() { + file_Barz_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Barz_proto_rawDesc), len(file_Barz_proto_rawDesc))) + }) + return file_Barz_proto_rawDescData +} + +var file_Barz_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Barz_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_Barz_proto_goTypes = []any{ + (FacetCutAction)(0), // 0: TW.Barz.Proto.FacetCutAction + (*ContractAddressInput)(nil), // 1: TW.Barz.Proto.ContractAddressInput + (*FacetCut)(nil), // 2: TW.Barz.Proto.FacetCut + (*DiamondCutInput)(nil), // 3: TW.Barz.Proto.DiamondCutInput +} +var file_Barz_proto_depIdxs = []int32{ + 0, // 0: TW.Barz.Proto.FacetCut.action:type_name -> TW.Barz.Proto.FacetCutAction + 2, // 1: TW.Barz.Proto.DiamondCutInput.facet_cuts:type_name -> TW.Barz.Proto.FacetCut + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_Barz_proto_init() } +func file_Barz_proto_init() { + if File_Barz_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Barz_proto_rawDesc), len(file_Barz_proto_rawDesc)), + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Barz_proto_goTypes, + DependencyIndexes: file_Barz_proto_depIdxs, + EnumInfos: file_Barz_proto_enumTypes, + MessageInfos: file_Barz_proto_msgTypes, + }.Build() + File_Barz_proto = out.File + file_Barz_proto_goTypes = nil + file_Barz_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/binance/Binance.pb.go b/wrapper/go-wrapper/protos/binance/Binance.pb.go new file mode 100644 index 00000000000..490a5c96bd1 --- /dev/null +++ b/wrapper/go-wrapper/protos/binance/Binance.pb.go @@ -0,0 +1,2617 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Binance.proto + +package binance + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transaction structure, used internally +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // array of size 1, containing the transaction message, which are one of the transaction type below + Msgs [][]byte `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs,omitempty"` + // array of size 1, containing the standard signature structure of the transaction sender + Signatures [][]byte `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"` + // a short sentence of remark for the transaction, only for `Transfer` transactions. + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` + // an identifier for tools triggering this transaction, set to zero if unwilling to disclose. + Source int64 `protobuf:"varint,4,opt,name=source,proto3" json:"source,omitempty"` + // reserved for future use + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Binance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{0} +} + +func (x *Transaction) GetMsgs() [][]byte { + if x != nil { + return x.Msgs + } + return nil +} + +func (x *Transaction) GetSignatures() [][]byte { + if x != nil { + return x.Signatures + } + return nil +} + +func (x *Transaction) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *Transaction) GetSource() int64 { + if x != nil { + return x.Source + } + return 0 +} + +func (x *Transaction) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Signature structure, used internally +type Signature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // public key bytes of the signer address + PubKey []byte `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` + // signature bytes, please check chain access section for signature generation + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // another identifier of signer, which can be read from chain by account REST API or RPC + AccountNumber int64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // sequence number for the next transaction + Sequence int64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Signature) Reset() { + *x = Signature{} + mi := &file_Binance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature) ProtoMessage() {} + +func (x *Signature) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{1} +} + +func (x *Signature) GetPubKey() []byte { + if x != nil { + return x.PubKey + } + return nil +} + +func (x *Signature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Signature) GetAccountNumber() int64 { + if x != nil { + return x.AccountNumber + } + return 0 +} + +func (x *Signature) GetSequence() int64 { + if x != nil { + return x.Sequence + } + return 0 +} + +// Message for Trade order +type TradeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // originating address + Sender []byte `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // order id, optional + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + // symbol for trading pair in full name of the tokens + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // only accept 2 for now, meaning limit order + Ordertype int64 `protobuf:"varint,4,opt,name=ordertype,proto3" json:"ordertype,omitempty"` + // 1 for buy and 2 for sell + Side int64 `protobuf:"varint,5,opt,name=side,proto3" json:"side,omitempty"` + // price of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer + Price int64 `protobuf:"varint,6,opt,name=price,proto3" json:"price,omitempty"` + // quantity of the order, which is the real price multiplied by 1e8 (10^8) and rounded to integer + Quantity int64 `protobuf:"varint,7,opt,name=quantity,proto3" json:"quantity,omitempty"` + // 1 for Good Till Expire(GTE) order and 3 for Immediate Or Cancel (IOC) + Timeinforce int64 `protobuf:"varint,8,opt,name=timeinforce,proto3" json:"timeinforce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TradeOrder) Reset() { + *x = TradeOrder{} + mi := &file_Binance_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TradeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TradeOrder) ProtoMessage() {} + +func (x *TradeOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TradeOrder.ProtoReflect.Descriptor instead. +func (*TradeOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{2} +} + +func (x *TradeOrder) GetSender() []byte { + if x != nil { + return x.Sender + } + return nil +} + +func (x *TradeOrder) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *TradeOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TradeOrder) GetOrdertype() int64 { + if x != nil { + return x.Ordertype + } + return 0 +} + +func (x *TradeOrder) GetSide() int64 { + if x != nil { + return x.Side + } + return 0 +} + +func (x *TradeOrder) GetPrice() int64 { + if x != nil { + return x.Price + } + return 0 +} + +func (x *TradeOrder) GetQuantity() int64 { + if x != nil { + return x.Quantity + } + return 0 +} + +func (x *TradeOrder) GetTimeinforce() int64 { + if x != nil { + return x.Timeinforce + } + return 0 +} + +// Message for CancelTrade order +type CancelTradeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // originating address + Sender []byte `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // symbol for trading pair in full name of the tokens + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + // order id to cancel + Refid string `protobuf:"bytes,3,opt,name=refid,proto3" json:"refid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelTradeOrder) Reset() { + *x = CancelTradeOrder{} + mi := &file_Binance_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelTradeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelTradeOrder) ProtoMessage() {} + +func (x *CancelTradeOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelTradeOrder.ProtoReflect.Descriptor instead. +func (*CancelTradeOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{3} +} + +func (x *CancelTradeOrder) GetSender() []byte { + if x != nil { + return x.Sender + } + return nil +} + +func (x *CancelTradeOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *CancelTradeOrder) GetRefid() string { + if x != nil { + return x.Refid + } + return "" +} + +// Message for Send order +type SendOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Send inputs + Inputs []*SendOrder_Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` + // Send outputs + Outputs []*SendOrder_Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendOrder) Reset() { + *x = SendOrder{} + mi := &file_Binance_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendOrder) ProtoMessage() {} + +func (x *SendOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendOrder.ProtoReflect.Descriptor instead. +func (*SendOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{4} +} + +func (x *SendOrder) GetInputs() []*SendOrder_Input { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *SendOrder) GetOutputs() []*SendOrder_Output { + if x != nil { + return x.Outputs + } + return nil +} + +// Message for TokenIssue order +type TokenIssueOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // token name + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // token symbol, in full name with "-" suffix + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // total supply + TotalSupply int64 `protobuf:"varint,4,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"` + // mintable + Mintable bool `protobuf:"varint,5,opt,name=mintable,proto3" json:"mintable,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenIssueOrder) Reset() { + *x = TokenIssueOrder{} + mi := &file_Binance_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenIssueOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenIssueOrder) ProtoMessage() {} + +func (x *TokenIssueOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenIssueOrder.ProtoReflect.Descriptor instead. +func (*TokenIssueOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{5} +} + +func (x *TokenIssueOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *TokenIssueOrder) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TokenIssueOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenIssueOrder) GetTotalSupply() int64 { + if x != nil { + return x.TotalSupply + } + return 0 +} + +func (x *TokenIssueOrder) GetMintable() bool { + if x != nil { + return x.Mintable + } + return false +} + +// Message for TokenMint order +type TokenMintOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // token symbol, in full name with "-" suffix + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + // amount to mint + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenMintOrder) Reset() { + *x = TokenMintOrder{} + mi := &file_Binance_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenMintOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenMintOrder) ProtoMessage() {} + +func (x *TokenMintOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenMintOrder.ProtoReflect.Descriptor instead. +func (*TokenMintOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{6} +} + +func (x *TokenMintOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *TokenMintOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenMintOrder) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Message for TokenBurn order +type TokenBurnOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // token symbol, in full name with "-" suffix + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + // amount to burn + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenBurnOrder) Reset() { + *x = TokenBurnOrder{} + mi := &file_Binance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenBurnOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenBurnOrder) ProtoMessage() {} + +func (x *TokenBurnOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenBurnOrder.ProtoReflect.Descriptor instead. +func (*TokenBurnOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{7} +} + +func (x *TokenBurnOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *TokenBurnOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenBurnOrder) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Message for TokenFreeze order +type TokenFreezeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // token symbol, in full name with "-" suffix + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + // amount of token to freeze + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenFreezeOrder) Reset() { + *x = TokenFreezeOrder{} + mi := &file_Binance_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenFreezeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenFreezeOrder) ProtoMessage() {} + +func (x *TokenFreezeOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenFreezeOrder.ProtoReflect.Descriptor instead. +func (*TokenFreezeOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{8} +} + +func (x *TokenFreezeOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *TokenFreezeOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenFreezeOrder) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Message for TokenUnfreeze order +type TokenUnfreezeOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // token symbol, in full name with "-" suffix + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + // amount of token to unfreeze + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenUnfreezeOrder) Reset() { + *x = TokenUnfreezeOrder{} + mi := &file_Binance_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenUnfreezeOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenUnfreezeOrder) ProtoMessage() {} + +func (x *TokenUnfreezeOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenUnfreezeOrder.ProtoReflect.Descriptor instead. +func (*TokenUnfreezeOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{9} +} + +func (x *TokenUnfreezeOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *TokenUnfreezeOrder) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TokenUnfreezeOrder) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Message for HashTimeLock order +type HTLTOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // signer address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // recipient address + To []byte `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // source on other chain, optional + RecipientOtherChain string `protobuf:"bytes,3,opt,name=recipient_other_chain,json=recipientOtherChain,proto3" json:"recipient_other_chain,omitempty"` + // recipient on other chain, optional + SenderOtherChain string `protobuf:"bytes,4,opt,name=sender_other_chain,json=senderOtherChain,proto3" json:"sender_other_chain,omitempty"` + // hash of a random number and timestamp, based on SHA256 + RandomNumberHash []byte `protobuf:"bytes,5,opt,name=random_number_hash,json=randomNumberHash,proto3" json:"random_number_hash,omitempty"` + // timestamp + Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // amounts + Amount []*SendOrder_Token `protobuf:"bytes,7,rep,name=amount,proto3" json:"amount,omitempty"` + // expected gained token on the other chain + ExpectedIncome string `protobuf:"bytes,8,opt,name=expected_income,json=expectedIncome,proto3" json:"expected_income,omitempty"` + // period expressed in block heights + HeightSpan int64 `protobuf:"varint,9,opt,name=height_span,json=heightSpan,proto3" json:"height_span,omitempty"` + // set for cross-chain send + CrossChain bool `protobuf:"varint,10,opt,name=cross_chain,json=crossChain,proto3" json:"cross_chain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HTLTOrder) Reset() { + *x = HTLTOrder{} + mi := &file_Binance_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HTLTOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTLTOrder) ProtoMessage() {} + +func (x *HTLTOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTLTOrder.ProtoReflect.Descriptor instead. +func (*HTLTOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{10} +} + +func (x *HTLTOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *HTLTOrder) GetTo() []byte { + if x != nil { + return x.To + } + return nil +} + +func (x *HTLTOrder) GetRecipientOtherChain() string { + if x != nil { + return x.RecipientOtherChain + } + return "" +} + +func (x *HTLTOrder) GetSenderOtherChain() string { + if x != nil { + return x.SenderOtherChain + } + return "" +} + +func (x *HTLTOrder) GetRandomNumberHash() []byte { + if x != nil { + return x.RandomNumberHash + } + return nil +} + +func (x *HTLTOrder) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *HTLTOrder) GetAmount() []*SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *HTLTOrder) GetExpectedIncome() string { + if x != nil { + return x.ExpectedIncome + } + return "" +} + +func (x *HTLTOrder) GetHeightSpan() int64 { + if x != nil { + return x.HeightSpan + } + return 0 +} + +func (x *HTLTOrder) GetCrossChain() bool { + if x != nil { + return x.CrossChain + } + return false +} + +// Message for Deposit HTLT order +type DepositHTLTOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // signer address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // amounts + Amount []*SendOrder_Token `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` + // swap ID + SwapId []byte `protobuf:"bytes,3,opt,name=swap_id,json=swapId,proto3" json:"swap_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DepositHTLTOrder) Reset() { + *x = DepositHTLTOrder{} + mi := &file_Binance_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DepositHTLTOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DepositHTLTOrder) ProtoMessage() {} + +func (x *DepositHTLTOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DepositHTLTOrder.ProtoReflect.Descriptor instead. +func (*DepositHTLTOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{11} +} + +func (x *DepositHTLTOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *DepositHTLTOrder) GetAmount() []*SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *DepositHTLTOrder) GetSwapId() []byte { + if x != nil { + return x.SwapId + } + return nil +} + +// Message for Claim HTLT order +type ClaimHTLOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // signer address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // swap ID + SwapId []byte `protobuf:"bytes,2,opt,name=swap_id,json=swapId,proto3" json:"swap_id,omitempty"` + // random number input + RandomNumber []byte `protobuf:"bytes,3,opt,name=random_number,json=randomNumber,proto3" json:"random_number,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClaimHTLOrder) Reset() { + *x = ClaimHTLOrder{} + mi := &file_Binance_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClaimHTLOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimHTLOrder) ProtoMessage() {} + +func (x *ClaimHTLOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimHTLOrder.ProtoReflect.Descriptor instead. +func (*ClaimHTLOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{12} +} + +func (x *ClaimHTLOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *ClaimHTLOrder) GetSwapId() []byte { + if x != nil { + return x.SwapId + } + return nil +} + +func (x *ClaimHTLOrder) GetRandomNumber() []byte { + if x != nil { + return x.RandomNumber + } + return nil +} + +// Message for Refund HTLT order +type RefundHTLTOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // signer address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // swap ID + SwapId []byte `protobuf:"bytes,2,opt,name=swap_id,json=swapId,proto3" json:"swap_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefundHTLTOrder) Reset() { + *x = RefundHTLTOrder{} + mi := &file_Binance_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefundHTLTOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundHTLTOrder) ProtoMessage() {} + +func (x *RefundHTLTOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundHTLTOrder.ProtoReflect.Descriptor instead. +func (*RefundHTLTOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{13} +} + +func (x *RefundHTLTOrder) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *RefundHTLTOrder) GetSwapId() []byte { + if x != nil { + return x.SwapId + } + return nil +} + +// Transfer +type TransferOut struct { + state protoimpl.MessageState `protogen:"open.v1"` + // source address + From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // recipient address + To []byte `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // transfer amount + Amount *SendOrder_Token `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // expiration time + ExpireTime int64 `protobuf:"varint,4,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferOut) Reset() { + *x = TransferOut{} + mi := &file_Binance_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferOut) ProtoMessage() {} + +func (x *TransferOut) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferOut.ProtoReflect.Descriptor instead. +func (*TransferOut) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{14} +} + +func (x *TransferOut) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *TransferOut) GetTo() []byte { + if x != nil { + return x.To + } + return nil +} + +func (x *TransferOut) GetAmount() *SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *TransferOut) GetExpireTime() int64 { + if x != nil { + return x.ExpireTime + } + return 0 +} + +type SideChainDelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddr []byte `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` + ValidatorAddr []byte `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` + Delegation *SendOrder_Token `protobuf:"bytes,3,opt,name=delegation,proto3" json:"delegation,omitempty"` + ChainId string `protobuf:"bytes,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SideChainDelegate) Reset() { + *x = SideChainDelegate{} + mi := &file_Binance_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SideChainDelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SideChainDelegate) ProtoMessage() {} + +func (x *SideChainDelegate) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SideChainDelegate.ProtoReflect.Descriptor instead. +func (*SideChainDelegate) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{15} +} + +func (x *SideChainDelegate) GetDelegatorAddr() []byte { + if x != nil { + return x.DelegatorAddr + } + return nil +} + +func (x *SideChainDelegate) GetValidatorAddr() []byte { + if x != nil { + return x.ValidatorAddr + } + return nil +} + +func (x *SideChainDelegate) GetDelegation() *SendOrder_Token { + if x != nil { + return x.Delegation + } + return nil +} + +func (x *SideChainDelegate) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +type SideChainRedelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddr []byte `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` + ValidatorSrcAddr []byte `protobuf:"bytes,2,opt,name=validator_src_addr,json=validatorSrcAddr,proto3" json:"validator_src_addr,omitempty"` + ValidatorDstAddr []byte `protobuf:"bytes,3,opt,name=validator_dst_addr,json=validatorDstAddr,proto3" json:"validator_dst_addr,omitempty"` + Amount *SendOrder_Token `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + ChainId string `protobuf:"bytes,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SideChainRedelegate) Reset() { + *x = SideChainRedelegate{} + mi := &file_Binance_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SideChainRedelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SideChainRedelegate) ProtoMessage() {} + +func (x *SideChainRedelegate) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SideChainRedelegate.ProtoReflect.Descriptor instead. +func (*SideChainRedelegate) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{16} +} + +func (x *SideChainRedelegate) GetDelegatorAddr() []byte { + if x != nil { + return x.DelegatorAddr + } + return nil +} + +func (x *SideChainRedelegate) GetValidatorSrcAddr() []byte { + if x != nil { + return x.ValidatorSrcAddr + } + return nil +} + +func (x *SideChainRedelegate) GetValidatorDstAddr() []byte { + if x != nil { + return x.ValidatorDstAddr + } + return nil +} + +func (x *SideChainRedelegate) GetAmount() *SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SideChainRedelegate) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +type SideChainUndelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddr []byte `protobuf:"bytes,1,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` + ValidatorAddr []byte `protobuf:"bytes,2,opt,name=validator_addr,json=validatorAddr,proto3" json:"validator_addr,omitempty"` + Amount *SendOrder_Token `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + ChainId string `protobuf:"bytes,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SideChainUndelegate) Reset() { + *x = SideChainUndelegate{} + mi := &file_Binance_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SideChainUndelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SideChainUndelegate) ProtoMessage() {} + +func (x *SideChainUndelegate) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SideChainUndelegate.ProtoReflect.Descriptor instead. +func (*SideChainUndelegate) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{17} +} + +func (x *SideChainUndelegate) GetDelegatorAddr() []byte { + if x != nil { + return x.DelegatorAddr + } + return nil +} + +func (x *SideChainUndelegate) GetValidatorAddr() []byte { + if x != nil { + return x.ValidatorAddr + } + return nil +} + +func (x *SideChainUndelegate) GetAmount() *SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SideChainUndelegate) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +// Message for BNB Beacon Chain -> BSC Stake Migration. +// https://github.com/bnb-chain/javascript-sdk/blob/26f6db8b67326e6214e74203ff90c89777b592a1/src/types/msg/stake/stakeMigrationMsg.ts#L13-L18 +type SideChainStakeMigration struct { + state protoimpl.MessageState `protogen:"open.v1"` + ValidatorSrcAddr []byte `protobuf:"bytes,1,opt,name=validator_src_addr,json=validatorSrcAddr,proto3" json:"validator_src_addr,omitempty"` + ValidatorDstAddr []byte `protobuf:"bytes,2,opt,name=validator_dst_addr,json=validatorDstAddr,proto3" json:"validator_dst_addr,omitempty"` + DelegatorAddr []byte `protobuf:"bytes,3,opt,name=delegator_addr,json=delegatorAddr,proto3" json:"delegator_addr,omitempty"` + RefundAddr []byte `protobuf:"bytes,4,opt,name=refund_addr,json=refundAddr,proto3" json:"refund_addr,omitempty"` + Amount *SendOrder_Token `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SideChainStakeMigration) Reset() { + *x = SideChainStakeMigration{} + mi := &file_Binance_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SideChainStakeMigration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SideChainStakeMigration) ProtoMessage() {} + +func (x *SideChainStakeMigration) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SideChainStakeMigration.ProtoReflect.Descriptor instead. +func (*SideChainStakeMigration) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{18} +} + +func (x *SideChainStakeMigration) GetValidatorSrcAddr() []byte { + if x != nil { + return x.ValidatorSrcAddr + } + return nil +} + +func (x *SideChainStakeMigration) GetValidatorDstAddr() []byte { + if x != nil { + return x.ValidatorDstAddr + } + return nil +} + +func (x *SideChainStakeMigration) GetDelegatorAddr() []byte { + if x != nil { + return x.DelegatorAddr + } + return nil +} + +func (x *SideChainStakeMigration) GetRefundAddr() []byte { + if x != nil { + return x.RefundAddr + } + return nil +} + +func (x *SideChainStakeMigration) GetAmount() *SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +// Message for TimeLock order +type TimeLockOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // Description (optional) + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Array of symbol/amount pairs. see SDK https://github.com/binance-chain/javascript-sdk/blob/master/docs/api-docs/classes/tokenmanagement.md#timelock + Amount []*SendOrder_Token `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` + // lock time + LockTime int64 `protobuf:"varint,4,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimeLockOrder) Reset() { + *x = TimeLockOrder{} + mi := &file_Binance_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimeLockOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeLockOrder) ProtoMessage() {} + +func (x *TimeLockOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeLockOrder.ProtoReflect.Descriptor instead. +func (*TimeLockOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{19} +} + +func (x *TimeLockOrder) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *TimeLockOrder) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *TimeLockOrder) GetAmount() []*SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *TimeLockOrder) GetLockTime() int64 { + if x != nil { + return x.LockTime + } + return 0 +} + +// Message for TimeRelock order +type TimeRelockOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // order ID + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + // Description (optional) + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Array of symbol/amount pairs. + Amount []*SendOrder_Token `protobuf:"bytes,4,rep,name=amount,proto3" json:"amount,omitempty"` + // lock time + LockTime int64 `protobuf:"varint,5,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimeRelockOrder) Reset() { + *x = TimeRelockOrder{} + mi := &file_Binance_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimeRelockOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeRelockOrder) ProtoMessage() {} + +func (x *TimeRelockOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeRelockOrder.ProtoReflect.Descriptor instead. +func (*TimeRelockOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{20} +} + +func (x *TimeRelockOrder) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *TimeRelockOrder) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *TimeRelockOrder) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *TimeRelockOrder) GetAmount() []*SendOrder_Token { + if x != nil { + return x.Amount + } + return nil +} + +func (x *TimeRelockOrder) GetLockTime() int64 { + if x != nil { + return x.LockTime + } + return 0 +} + +// Message for TimeUnlock order +type TimeUnlockOrder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // owner address + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // order ID + Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimeUnlockOrder) Reset() { + *x = TimeUnlockOrder{} + mi := &file_Binance_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimeUnlockOrder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeUnlockOrder) ProtoMessage() {} + +func (x *TimeUnlockOrder) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeUnlockOrder.ProtoReflect.Descriptor instead. +func (*TimeUnlockOrder) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{21} +} + +func (x *TimeUnlockOrder) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *TimeUnlockOrder) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Chain ID + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Source account number + AccountNumber int64 `protobuf:"varint,2,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // Sequence number (account specific) + Sequence int64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Transaction source, see https://github.com/bnb-chain/BEPs/blob/master/BEP10.md + // Some important values: + // + // 0: Default source value (e.g. for Binance Chain Command Line, or SDKs) + // 1: Binance DEX Web Wallet + // 2: Trust Wallet + Source int64 `protobuf:"varint,4,opt,name=source,proto3" json:"source,omitempty"` + // Optional memo + Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Payload message + // + // Types that are valid to be assigned to OrderOneof: + // + // *SigningInput_TradeOrder + // *SigningInput_CancelTradeOrder + // *SigningInput_SendOrder + // *SigningInput_FreezeOrder + // *SigningInput_UnfreezeOrder + // *SigningInput_HtltOrder + // *SigningInput_DepositHTLTOrder + // *SigningInput_ClaimHTLTOrder + // *SigningInput_RefundHTLTOrder + // *SigningInput_IssueOrder + // *SigningInput_MintOrder + // *SigningInput_BurnOrder + // *SigningInput_TransferOutOrder + // *SigningInput_SideDelegateOrder + // *SigningInput_SideRedelegateOrder + // *SigningInput_SideUndelegateOrder + // *SigningInput_TimeLockOrder + // *SigningInput_TimeRelockOrder + // *SigningInput_TimeUnlockOrder + // *SigningInput_SideStakeMigrationOrder + OrderOneof isSigningInput_OrderOneof `protobuf_oneof:"order_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Binance_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{22} +} + +func (x *SigningInput) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *SigningInput) GetAccountNumber() int64 { + if x != nil { + return x.AccountNumber + } + return 0 +} + +func (x *SigningInput) GetSequence() int64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *SigningInput) GetSource() int64 { + if x != nil { + return x.Source + } + return 0 +} + +func (x *SigningInput) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetOrderOneof() isSigningInput_OrderOneof { + if x != nil { + return x.OrderOneof + } + return nil +} + +func (x *SigningInput) GetTradeOrder() *TradeOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_TradeOrder); ok { + return x.TradeOrder + } + } + return nil +} + +func (x *SigningInput) GetCancelTradeOrder() *CancelTradeOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_CancelTradeOrder); ok { + return x.CancelTradeOrder + } + } + return nil +} + +func (x *SigningInput) GetSendOrder() *SendOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_SendOrder); ok { + return x.SendOrder + } + } + return nil +} + +func (x *SigningInput) GetFreezeOrder() *TokenFreezeOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_FreezeOrder); ok { + return x.FreezeOrder + } + } + return nil +} + +func (x *SigningInput) GetUnfreezeOrder() *TokenUnfreezeOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_UnfreezeOrder); ok { + return x.UnfreezeOrder + } + } + return nil +} + +func (x *SigningInput) GetHtltOrder() *HTLTOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_HtltOrder); ok { + return x.HtltOrder + } + } + return nil +} + +func (x *SigningInput) GetDepositHTLTOrder() *DepositHTLTOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_DepositHTLTOrder); ok { + return x.DepositHTLTOrder + } + } + return nil +} + +func (x *SigningInput) GetClaimHTLTOrder() *ClaimHTLOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_ClaimHTLTOrder); ok { + return x.ClaimHTLTOrder + } + } + return nil +} + +func (x *SigningInput) GetRefundHTLTOrder() *RefundHTLTOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_RefundHTLTOrder); ok { + return x.RefundHTLTOrder + } + } + return nil +} + +func (x *SigningInput) GetIssueOrder() *TokenIssueOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_IssueOrder); ok { + return x.IssueOrder + } + } + return nil +} + +func (x *SigningInput) GetMintOrder() *TokenMintOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_MintOrder); ok { + return x.MintOrder + } + } + return nil +} + +func (x *SigningInput) GetBurnOrder() *TokenBurnOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_BurnOrder); ok { + return x.BurnOrder + } + } + return nil +} + +func (x *SigningInput) GetTransferOutOrder() *TransferOut { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_TransferOutOrder); ok { + return x.TransferOutOrder + } + } + return nil +} + +func (x *SigningInput) GetSideDelegateOrder() *SideChainDelegate { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_SideDelegateOrder); ok { + return x.SideDelegateOrder + } + } + return nil +} + +func (x *SigningInput) GetSideRedelegateOrder() *SideChainRedelegate { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_SideRedelegateOrder); ok { + return x.SideRedelegateOrder + } + } + return nil +} + +func (x *SigningInput) GetSideUndelegateOrder() *SideChainUndelegate { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_SideUndelegateOrder); ok { + return x.SideUndelegateOrder + } + } + return nil +} + +func (x *SigningInput) GetTimeLockOrder() *TimeLockOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_TimeLockOrder); ok { + return x.TimeLockOrder + } + } + return nil +} + +func (x *SigningInput) GetTimeRelockOrder() *TimeRelockOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_TimeRelockOrder); ok { + return x.TimeRelockOrder + } + } + return nil +} + +func (x *SigningInput) GetTimeUnlockOrder() *TimeUnlockOrder { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_TimeUnlockOrder); ok { + return x.TimeUnlockOrder + } + } + return nil +} + +func (x *SigningInput) GetSideStakeMigrationOrder() *SideChainStakeMigration { + if x != nil { + if x, ok := x.OrderOneof.(*SigningInput_SideStakeMigrationOrder); ok { + return x.SideStakeMigrationOrder + } + } + return nil +} + +type isSigningInput_OrderOneof interface { + isSigningInput_OrderOneof() +} + +type SigningInput_TradeOrder struct { + TradeOrder *TradeOrder `protobuf:"bytes,8,opt,name=trade_order,json=tradeOrder,proto3,oneof"` +} + +type SigningInput_CancelTradeOrder struct { + CancelTradeOrder *CancelTradeOrder `protobuf:"bytes,9,opt,name=cancel_trade_order,json=cancelTradeOrder,proto3,oneof"` +} + +type SigningInput_SendOrder struct { + SendOrder *SendOrder `protobuf:"bytes,10,opt,name=send_order,json=sendOrder,proto3,oneof"` +} + +type SigningInput_FreezeOrder struct { + FreezeOrder *TokenFreezeOrder `protobuf:"bytes,11,opt,name=freeze_order,json=freezeOrder,proto3,oneof"` +} + +type SigningInput_UnfreezeOrder struct { + UnfreezeOrder *TokenUnfreezeOrder `protobuf:"bytes,12,opt,name=unfreeze_order,json=unfreezeOrder,proto3,oneof"` +} + +type SigningInput_HtltOrder struct { + HtltOrder *HTLTOrder `protobuf:"bytes,13,opt,name=htlt_order,json=htltOrder,proto3,oneof"` +} + +type SigningInput_DepositHTLTOrder struct { + DepositHTLTOrder *DepositHTLTOrder `protobuf:"bytes,14,opt,name=depositHTLT_order,json=depositHTLTOrder,proto3,oneof"` +} + +type SigningInput_ClaimHTLTOrder struct { + ClaimHTLTOrder *ClaimHTLOrder `protobuf:"bytes,15,opt,name=claimHTLT_order,json=claimHTLTOrder,proto3,oneof"` +} + +type SigningInput_RefundHTLTOrder struct { + RefundHTLTOrder *RefundHTLTOrder `protobuf:"bytes,16,opt,name=refundHTLT_order,json=refundHTLTOrder,proto3,oneof"` +} + +type SigningInput_IssueOrder struct { + IssueOrder *TokenIssueOrder `protobuf:"bytes,17,opt,name=issue_order,json=issueOrder,proto3,oneof"` +} + +type SigningInput_MintOrder struct { + MintOrder *TokenMintOrder `protobuf:"bytes,18,opt,name=mint_order,json=mintOrder,proto3,oneof"` +} + +type SigningInput_BurnOrder struct { + BurnOrder *TokenBurnOrder `protobuf:"bytes,19,opt,name=burn_order,json=burnOrder,proto3,oneof"` +} + +type SigningInput_TransferOutOrder struct { + TransferOutOrder *TransferOut `protobuf:"bytes,20,opt,name=transfer_out_order,json=transferOutOrder,proto3,oneof"` +} + +type SigningInput_SideDelegateOrder struct { + SideDelegateOrder *SideChainDelegate `protobuf:"bytes,21,opt,name=side_delegate_order,json=sideDelegateOrder,proto3,oneof"` +} + +type SigningInput_SideRedelegateOrder struct { + SideRedelegateOrder *SideChainRedelegate `protobuf:"bytes,22,opt,name=side_redelegate_order,json=sideRedelegateOrder,proto3,oneof"` +} + +type SigningInput_SideUndelegateOrder struct { + SideUndelegateOrder *SideChainUndelegate `protobuf:"bytes,23,opt,name=side_undelegate_order,json=sideUndelegateOrder,proto3,oneof"` +} + +type SigningInput_TimeLockOrder struct { + TimeLockOrder *TimeLockOrder `protobuf:"bytes,24,opt,name=time_lock_order,json=timeLockOrder,proto3,oneof"` +} + +type SigningInput_TimeRelockOrder struct { + TimeRelockOrder *TimeRelockOrder `protobuf:"bytes,25,opt,name=time_relock_order,json=timeRelockOrder,proto3,oneof"` +} + +type SigningInput_TimeUnlockOrder struct { + TimeUnlockOrder *TimeUnlockOrder `protobuf:"bytes,26,opt,name=time_unlock_order,json=timeUnlockOrder,proto3,oneof"` +} + +type SigningInput_SideStakeMigrationOrder struct { + SideStakeMigrationOrder *SideChainStakeMigration `protobuf:"bytes,27,opt,name=side_stake_migration_order,json=sideStakeMigrationOrder,proto3,oneof"` +} + +func (*SigningInput_TradeOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_CancelTradeOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_SendOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_FreezeOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_UnfreezeOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_HtltOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_DepositHTLTOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_ClaimHTLTOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_RefundHTLTOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_IssueOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_MintOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_BurnOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_TransferOutOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_SideDelegateOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_SideRedelegateOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_SideUndelegateOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_TimeLockOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_TimeRelockOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_TimeUnlockOrder) isSigningInput_OrderOneof() {} + +func (*SigningInput_SideStakeMigrationOrder) isSigningInput_OrderOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // OK (=0) or other codes in case of error + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error description in case of error + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Signature bytes. + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + // Signature JSON string. + SignatureJson string `protobuf:"bytes,5,opt,name=signature_json,json=signatureJson,proto3" json:"signature_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Binance_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{23} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetSignatureJson() string { + if x != nil { + return x.SignatureJson + } + return "" +} + +// A token amount, symbol-amount pair. Could be moved out of SendOrder; kept here for backward compatibility. +type SendOrder_Token struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Token ID + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // Amount + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendOrder_Token) Reset() { + *x = SendOrder_Token{} + mi := &file_Binance_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendOrder_Token) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendOrder_Token) ProtoMessage() {} + +func (x *SendOrder_Token) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendOrder_Token.ProtoReflect.Descriptor instead. +func (*SendOrder_Token) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *SendOrder_Token) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *SendOrder_Token) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Transaction input +type SendOrder_Input struct { + state protoimpl.MessageState `protogen:"open.v1"` + // source address + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // input coin amounts + Coins []*SendOrder_Token `protobuf:"bytes,2,rep,name=coins,proto3" json:"coins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendOrder_Input) Reset() { + *x = SendOrder_Input{} + mi := &file_Binance_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendOrder_Input) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendOrder_Input) ProtoMessage() {} + +func (x *SendOrder_Input) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendOrder_Input.ProtoReflect.Descriptor instead. +func (*SendOrder_Input) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *SendOrder_Input) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *SendOrder_Input) GetCoins() []*SendOrder_Token { + if x != nil { + return x.Coins + } + return nil +} + +// Transaction output +type SendOrder_Output struct { + state protoimpl.MessageState `protogen:"open.v1"` + // destination address + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // output coin amounts + Coins []*SendOrder_Token `protobuf:"bytes,2,rep,name=coins,proto3" json:"coins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendOrder_Output) Reset() { + *x = SendOrder_Output{} + mi := &file_Binance_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendOrder_Output) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendOrder_Output) ProtoMessage() {} + +func (x *SendOrder_Output) ProtoReflect() protoreflect.Message { + mi := &file_Binance_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendOrder_Output.ProtoReflect.Descriptor instead. +func (*SendOrder_Output) Descriptor() ([]byte, []int) { + return file_Binance_proto_rawDescGZIP(), []int{4, 2} +} + +func (x *SendOrder_Output) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *SendOrder_Output) GetCoins() []*SendOrder_Token { + if x != nil { + return x.Coins + } + return nil +} + +var File_Binance_proto protoreflect.FileDescriptor + +const file_Binance_proto_rawDesc = "" + + "\n" + + "\rBinance.proto\x12\x10TW.Binance.Proto\x1a\fCommon.proto\"\x81\x01\n" + + "\vTransaction\x12\x12\n" + + "\x04msgs\x18\x01 \x03(\fR\x04msgs\x12\x1e\n" + + "\n" + + "signatures\x18\x02 \x03(\fR\n" + + "signatures\x12\x12\n" + + "\x04memo\x18\x03 \x01(\tR\x04memo\x12\x16\n" + + "\x06source\x18\x04 \x01(\x03R\x06source\x12\x12\n" + + "\x04data\x18\x05 \x01(\fR\x04data\"\x85\x01\n" + + "\tSignature\x12\x17\n" + + "\apub_key\x18\x01 \x01(\fR\x06pubKey\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12%\n" + + "\x0eaccount_number\x18\x03 \x01(\x03R\raccountNumber\x12\x1a\n" + + "\bsequence\x18\x04 \x01(\x03R\bsequence\"\xd2\x01\n" + + "\n" + + "TradeOrder\x12\x16\n" + + "\x06sender\x18\x01 \x01(\fR\x06sender\x12\x0e\n" + + "\x02id\x18\x02 \x01(\tR\x02id\x12\x16\n" + + "\x06symbol\x18\x03 \x01(\tR\x06symbol\x12\x1c\n" + + "\tordertype\x18\x04 \x01(\x03R\tordertype\x12\x12\n" + + "\x04side\x18\x05 \x01(\x03R\x04side\x12\x14\n" + + "\x05price\x18\x06 \x01(\x03R\x05price\x12\x1a\n" + + "\bquantity\x18\a \x01(\x03R\bquantity\x12 \n" + + "\vtimeinforce\x18\b \x01(\x03R\vtimeinforce\"X\n" + + "\x10CancelTradeOrder\x12\x16\n" + + "\x06sender\x18\x01 \x01(\fR\x06sender\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x14\n" + + "\x05refid\x18\x03 \x01(\tR\x05refid\"\xf4\x02\n" + + "\tSendOrder\x129\n" + + "\x06inputs\x18\x01 \x03(\v2!.TW.Binance.Proto.SendOrder.InputR\x06inputs\x12<\n" + + "\aoutputs\x18\x02 \x03(\v2\".TW.Binance.Proto.SendOrder.OutputR\aoutputs\x1a5\n" + + "\x05Token\x12\x14\n" + + "\x05denom\x18\x01 \x01(\tR\x05denom\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x1aZ\n" + + "\x05Input\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\x127\n" + + "\x05coins\x18\x02 \x03(\v2!.TW.Binance.Proto.SendOrder.TokenR\x05coins\x1a[\n" + + "\x06Output\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\x127\n" + + "\x05coins\x18\x02 \x03(\v2!.TW.Binance.Proto.SendOrder.TokenR\x05coins\"\x90\x01\n" + + "\x0fTokenIssueOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n" + + "\x06symbol\x18\x03 \x01(\tR\x06symbol\x12!\n" + + "\ftotal_supply\x18\x04 \x01(\x03R\vtotalSupply\x12\x1a\n" + + "\bmintable\x18\x05 \x01(\bR\bmintable\"T\n" + + "\x0eTokenMintOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"T\n" + + "\x0eTokenBurnOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"V\n" + + "\x10TokenFreezeOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"X\n" + + "\x12TokenUnfreezeOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"\x83\x03\n" + + "\tHTLTOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x0e\n" + + "\x02to\x18\x02 \x01(\fR\x02to\x122\n" + + "\x15recipient_other_chain\x18\x03 \x01(\tR\x13recipientOtherChain\x12,\n" + + "\x12sender_other_chain\x18\x04 \x01(\tR\x10senderOtherChain\x12,\n" + + "\x12random_number_hash\x18\x05 \x01(\fR\x10randomNumberHash\x12\x1c\n" + + "\ttimestamp\x18\x06 \x01(\x03R\ttimestamp\x129\n" + + "\x06amount\x18\a \x03(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12'\n" + + "\x0fexpected_income\x18\b \x01(\tR\x0eexpectedIncome\x12\x1f\n" + + "\vheight_span\x18\t \x01(\x03R\n" + + "heightSpan\x12\x1f\n" + + "\vcross_chain\x18\n" + + " \x01(\bR\n" + + "crossChain\"z\n" + + "\x10DepositHTLTOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x129\n" + + "\x06amount\x18\x02 \x03(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12\x17\n" + + "\aswap_id\x18\x03 \x01(\fR\x06swapId\"a\n" + + "\rClaimHTLOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x17\n" + + "\aswap_id\x18\x02 \x01(\fR\x06swapId\x12#\n" + + "\rrandom_number\x18\x03 \x01(\fR\frandomNumber\">\n" + + "\x0fRefundHTLTOrder\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x17\n" + + "\aswap_id\x18\x02 \x01(\fR\x06swapId\"\x8d\x01\n" + + "\vTransferOut\x12\x12\n" + + "\x04from\x18\x01 \x01(\fR\x04from\x12\x0e\n" + + "\x02to\x18\x02 \x01(\fR\x02to\x129\n" + + "\x06amount\x18\x03 \x01(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12\x1f\n" + + "\vexpire_time\x18\x04 \x01(\x03R\n" + + "expireTime\"\xbf\x01\n" + + "\x11SideChainDelegate\x12%\n" + + "\x0edelegator_addr\x18\x01 \x01(\fR\rdelegatorAddr\x12%\n" + + "\x0evalidator_addr\x18\x02 \x01(\fR\rvalidatorAddr\x12A\n" + + "\n" + + "delegation\x18\x03 \x01(\v2!.TW.Binance.Proto.SendOrder.TokenR\n" + + "delegation\x12\x19\n" + + "\bchain_id\x18\x04 \x01(\tR\achainId\"\xee\x01\n" + + "\x13SideChainRedelegate\x12%\n" + + "\x0edelegator_addr\x18\x01 \x01(\fR\rdelegatorAddr\x12,\n" + + "\x12validator_src_addr\x18\x02 \x01(\fR\x10validatorSrcAddr\x12,\n" + + "\x12validator_dst_addr\x18\x03 \x01(\fR\x10validatorDstAddr\x129\n" + + "\x06amount\x18\x04 \x01(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12\x19\n" + + "\bchain_id\x18\x05 \x01(\tR\achainId\"\xb9\x01\n" + + "\x13SideChainUndelegate\x12%\n" + + "\x0edelegator_addr\x18\x01 \x01(\fR\rdelegatorAddr\x12%\n" + + "\x0evalidator_addr\x18\x02 \x01(\fR\rvalidatorAddr\x129\n" + + "\x06amount\x18\x03 \x01(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12\x19\n" + + "\bchain_id\x18\x04 \x01(\tR\achainId\"\xf8\x01\n" + + "\x17SideChainStakeMigration\x12,\n" + + "\x12validator_src_addr\x18\x01 \x01(\fR\x10validatorSrcAddr\x12,\n" + + "\x12validator_dst_addr\x18\x02 \x01(\fR\x10validatorDstAddr\x12%\n" + + "\x0edelegator_addr\x18\x03 \x01(\fR\rdelegatorAddr\x12\x1f\n" + + "\vrefund_addr\x18\x04 \x01(\fR\n" + + "refundAddr\x129\n" + + "\x06amount\x18\x05 \x01(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\"\xac\x01\n" + + "\rTimeLockOrder\x12!\n" + + "\ffrom_address\x18\x01 \x01(\fR\vfromAddress\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x129\n" + + "\x06amount\x18\x03 \x03(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12\x1b\n" + + "\tlock_time\x18\x04 \x01(\x03R\blockTime\"\xbe\x01\n" + + "\x0fTimeRelockOrder\x12!\n" + + "\ffrom_address\x18\x01 \x01(\fR\vfromAddress\x12\x0e\n" + + "\x02id\x18\x02 \x01(\x03R\x02id\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x129\n" + + "\x06amount\x18\x04 \x03(\v2!.TW.Binance.Proto.SendOrder.TokenR\x06amount\x12\x1b\n" + + "\tlock_time\x18\x05 \x01(\x03R\blockTime\"D\n" + + "\x0fTimeUnlockOrder\x12!\n" + + "\ffrom_address\x18\x01 \x01(\fR\vfromAddress\x12\x0e\n" + + "\x02id\x18\x02 \x01(\x03R\x02id\"\xe3\r\n" + + "\fSigningInput\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\tR\achainId\x12%\n" + + "\x0eaccount_number\x18\x02 \x01(\x03R\raccountNumber\x12\x1a\n" + + "\bsequence\x18\x03 \x01(\x03R\bsequence\x12\x16\n" + + "\x06source\x18\x04 \x01(\x03R\x06source\x12\x12\n" + + "\x04memo\x18\x05 \x01(\tR\x04memo\x12\x1f\n" + + "\vprivate_key\x18\x06 \x01(\fR\n" + + "privateKey\x12?\n" + + "\vtrade_order\x18\b \x01(\v2\x1c.TW.Binance.Proto.TradeOrderH\x00R\n" + + "tradeOrder\x12R\n" + + "\x12cancel_trade_order\x18\t \x01(\v2\".TW.Binance.Proto.CancelTradeOrderH\x00R\x10cancelTradeOrder\x12<\n" + + "\n" + + "send_order\x18\n" + + " \x01(\v2\x1b.TW.Binance.Proto.SendOrderH\x00R\tsendOrder\x12G\n" + + "\ffreeze_order\x18\v \x01(\v2\".TW.Binance.Proto.TokenFreezeOrderH\x00R\vfreezeOrder\x12M\n" + + "\x0eunfreeze_order\x18\f \x01(\v2$.TW.Binance.Proto.TokenUnfreezeOrderH\x00R\runfreezeOrder\x12<\n" + + "\n" + + "htlt_order\x18\r \x01(\v2\x1b.TW.Binance.Proto.HTLTOrderH\x00R\thtltOrder\x12Q\n" + + "\x11depositHTLT_order\x18\x0e \x01(\v2\".TW.Binance.Proto.DepositHTLTOrderH\x00R\x10depositHTLTOrder\x12J\n" + + "\x0fclaimHTLT_order\x18\x0f \x01(\v2\x1f.TW.Binance.Proto.ClaimHTLOrderH\x00R\x0eclaimHTLTOrder\x12N\n" + + "\x10refundHTLT_order\x18\x10 \x01(\v2!.TW.Binance.Proto.RefundHTLTOrderH\x00R\x0frefundHTLTOrder\x12D\n" + + "\vissue_order\x18\x11 \x01(\v2!.TW.Binance.Proto.TokenIssueOrderH\x00R\n" + + "issueOrder\x12A\n" + + "\n" + + "mint_order\x18\x12 \x01(\v2 .TW.Binance.Proto.TokenMintOrderH\x00R\tmintOrder\x12A\n" + + "\n" + + "burn_order\x18\x13 \x01(\v2 .TW.Binance.Proto.TokenBurnOrderH\x00R\tburnOrder\x12M\n" + + "\x12transfer_out_order\x18\x14 \x01(\v2\x1d.TW.Binance.Proto.TransferOutH\x00R\x10transferOutOrder\x12U\n" + + "\x13side_delegate_order\x18\x15 \x01(\v2#.TW.Binance.Proto.SideChainDelegateH\x00R\x11sideDelegateOrder\x12[\n" + + "\x15side_redelegate_order\x18\x16 \x01(\v2%.TW.Binance.Proto.SideChainRedelegateH\x00R\x13sideRedelegateOrder\x12[\n" + + "\x15side_undelegate_order\x18\x17 \x01(\v2%.TW.Binance.Proto.SideChainUndelegateH\x00R\x13sideUndelegateOrder\x12I\n" + + "\x0ftime_lock_order\x18\x18 \x01(\v2\x1f.TW.Binance.Proto.TimeLockOrderH\x00R\rtimeLockOrder\x12O\n" + + "\x11time_relock_order\x18\x19 \x01(\v2!.TW.Binance.Proto.TimeRelockOrderH\x00R\x0ftimeRelockOrder\x12O\n" + + "\x11time_unlock_order\x18\x1a \x01(\v2!.TW.Binance.Proto.TimeUnlockOrderH\x00R\x0ftimeUnlockOrder\x12h\n" + + "\x1aside_stake_migration_order\x18\x1b \x01(\v2).TW.Binance.Proto.SideChainStakeMigrationH\x00R\x17sideStakeMigrationOrderB\r\n" + + "\vorder_oneof\"\xc8\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x12\x1c\n" + + "\tsignature\x18\x04 \x01(\fR\tsignature\x12%\n" + + "\x0esignature_json\x18\x05 \x01(\tR\rsignatureJsonB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Binance_proto_rawDescOnce sync.Once + file_Binance_proto_rawDescData []byte +) + +func file_Binance_proto_rawDescGZIP() []byte { + file_Binance_proto_rawDescOnce.Do(func() { + file_Binance_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Binance_proto_rawDesc), len(file_Binance_proto_rawDesc))) + }) + return file_Binance_proto_rawDescData +} + +var file_Binance_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_Binance_proto_goTypes = []any{ + (*Transaction)(nil), // 0: TW.Binance.Proto.Transaction + (*Signature)(nil), // 1: TW.Binance.Proto.Signature + (*TradeOrder)(nil), // 2: TW.Binance.Proto.TradeOrder + (*CancelTradeOrder)(nil), // 3: TW.Binance.Proto.CancelTradeOrder + (*SendOrder)(nil), // 4: TW.Binance.Proto.SendOrder + (*TokenIssueOrder)(nil), // 5: TW.Binance.Proto.TokenIssueOrder + (*TokenMintOrder)(nil), // 6: TW.Binance.Proto.TokenMintOrder + (*TokenBurnOrder)(nil), // 7: TW.Binance.Proto.TokenBurnOrder + (*TokenFreezeOrder)(nil), // 8: TW.Binance.Proto.TokenFreezeOrder + (*TokenUnfreezeOrder)(nil), // 9: TW.Binance.Proto.TokenUnfreezeOrder + (*HTLTOrder)(nil), // 10: TW.Binance.Proto.HTLTOrder + (*DepositHTLTOrder)(nil), // 11: TW.Binance.Proto.DepositHTLTOrder + (*ClaimHTLOrder)(nil), // 12: TW.Binance.Proto.ClaimHTLOrder + (*RefundHTLTOrder)(nil), // 13: TW.Binance.Proto.RefundHTLTOrder + (*TransferOut)(nil), // 14: TW.Binance.Proto.TransferOut + (*SideChainDelegate)(nil), // 15: TW.Binance.Proto.SideChainDelegate + (*SideChainRedelegate)(nil), // 16: TW.Binance.Proto.SideChainRedelegate + (*SideChainUndelegate)(nil), // 17: TW.Binance.Proto.SideChainUndelegate + (*SideChainStakeMigration)(nil), // 18: TW.Binance.Proto.SideChainStakeMigration + (*TimeLockOrder)(nil), // 19: TW.Binance.Proto.TimeLockOrder + (*TimeRelockOrder)(nil), // 20: TW.Binance.Proto.TimeRelockOrder + (*TimeUnlockOrder)(nil), // 21: TW.Binance.Proto.TimeUnlockOrder + (*SigningInput)(nil), // 22: TW.Binance.Proto.SigningInput + (*SigningOutput)(nil), // 23: TW.Binance.Proto.SigningOutput + (*SendOrder_Token)(nil), // 24: TW.Binance.Proto.SendOrder.Token + (*SendOrder_Input)(nil), // 25: TW.Binance.Proto.SendOrder.Input + (*SendOrder_Output)(nil), // 26: TW.Binance.Proto.SendOrder.Output + (common.SigningError)(0), // 27: TW.Common.Proto.SigningError +} +var file_Binance_proto_depIdxs = []int32{ + 25, // 0: TW.Binance.Proto.SendOrder.inputs:type_name -> TW.Binance.Proto.SendOrder.Input + 26, // 1: TW.Binance.Proto.SendOrder.outputs:type_name -> TW.Binance.Proto.SendOrder.Output + 24, // 2: TW.Binance.Proto.HTLTOrder.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 3: TW.Binance.Proto.DepositHTLTOrder.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 4: TW.Binance.Proto.TransferOut.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 5: TW.Binance.Proto.SideChainDelegate.delegation:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 6: TW.Binance.Proto.SideChainRedelegate.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 7: TW.Binance.Proto.SideChainUndelegate.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 8: TW.Binance.Proto.SideChainStakeMigration.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 9: TW.Binance.Proto.TimeLockOrder.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 10: TW.Binance.Proto.TimeRelockOrder.amount:type_name -> TW.Binance.Proto.SendOrder.Token + 2, // 11: TW.Binance.Proto.SigningInput.trade_order:type_name -> TW.Binance.Proto.TradeOrder + 3, // 12: TW.Binance.Proto.SigningInput.cancel_trade_order:type_name -> TW.Binance.Proto.CancelTradeOrder + 4, // 13: TW.Binance.Proto.SigningInput.send_order:type_name -> TW.Binance.Proto.SendOrder + 8, // 14: TW.Binance.Proto.SigningInput.freeze_order:type_name -> TW.Binance.Proto.TokenFreezeOrder + 9, // 15: TW.Binance.Proto.SigningInput.unfreeze_order:type_name -> TW.Binance.Proto.TokenUnfreezeOrder + 10, // 16: TW.Binance.Proto.SigningInput.htlt_order:type_name -> TW.Binance.Proto.HTLTOrder + 11, // 17: TW.Binance.Proto.SigningInput.depositHTLT_order:type_name -> TW.Binance.Proto.DepositHTLTOrder + 12, // 18: TW.Binance.Proto.SigningInput.claimHTLT_order:type_name -> TW.Binance.Proto.ClaimHTLOrder + 13, // 19: TW.Binance.Proto.SigningInput.refundHTLT_order:type_name -> TW.Binance.Proto.RefundHTLTOrder + 5, // 20: TW.Binance.Proto.SigningInput.issue_order:type_name -> TW.Binance.Proto.TokenIssueOrder + 6, // 21: TW.Binance.Proto.SigningInput.mint_order:type_name -> TW.Binance.Proto.TokenMintOrder + 7, // 22: TW.Binance.Proto.SigningInput.burn_order:type_name -> TW.Binance.Proto.TokenBurnOrder + 14, // 23: TW.Binance.Proto.SigningInput.transfer_out_order:type_name -> TW.Binance.Proto.TransferOut + 15, // 24: TW.Binance.Proto.SigningInput.side_delegate_order:type_name -> TW.Binance.Proto.SideChainDelegate + 16, // 25: TW.Binance.Proto.SigningInput.side_redelegate_order:type_name -> TW.Binance.Proto.SideChainRedelegate + 17, // 26: TW.Binance.Proto.SigningInput.side_undelegate_order:type_name -> TW.Binance.Proto.SideChainUndelegate + 19, // 27: TW.Binance.Proto.SigningInput.time_lock_order:type_name -> TW.Binance.Proto.TimeLockOrder + 20, // 28: TW.Binance.Proto.SigningInput.time_relock_order:type_name -> TW.Binance.Proto.TimeRelockOrder + 21, // 29: TW.Binance.Proto.SigningInput.time_unlock_order:type_name -> TW.Binance.Proto.TimeUnlockOrder + 18, // 30: TW.Binance.Proto.SigningInput.side_stake_migration_order:type_name -> TW.Binance.Proto.SideChainStakeMigration + 27, // 31: TW.Binance.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 24, // 32: TW.Binance.Proto.SendOrder.Input.coins:type_name -> TW.Binance.Proto.SendOrder.Token + 24, // 33: TW.Binance.Proto.SendOrder.Output.coins:type_name -> TW.Binance.Proto.SendOrder.Token + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_Binance_proto_init() } +func file_Binance_proto_init() { + if File_Binance_proto != nil { + return + } + file_Binance_proto_msgTypes[22].OneofWrappers = []any{ + (*SigningInput_TradeOrder)(nil), + (*SigningInput_CancelTradeOrder)(nil), + (*SigningInput_SendOrder)(nil), + (*SigningInput_FreezeOrder)(nil), + (*SigningInput_UnfreezeOrder)(nil), + (*SigningInput_HtltOrder)(nil), + (*SigningInput_DepositHTLTOrder)(nil), + (*SigningInput_ClaimHTLTOrder)(nil), + (*SigningInput_RefundHTLTOrder)(nil), + (*SigningInput_IssueOrder)(nil), + (*SigningInput_MintOrder)(nil), + (*SigningInput_BurnOrder)(nil), + (*SigningInput_TransferOutOrder)(nil), + (*SigningInput_SideDelegateOrder)(nil), + (*SigningInput_SideRedelegateOrder)(nil), + (*SigningInput_SideUndelegateOrder)(nil), + (*SigningInput_TimeLockOrder)(nil), + (*SigningInput_TimeRelockOrder)(nil), + (*SigningInput_TimeUnlockOrder)(nil), + (*SigningInput_SideStakeMigrationOrder)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Binance_proto_rawDesc), len(file_Binance_proto_rawDesc)), + NumEnums: 0, + NumMessages: 27, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Binance_proto_goTypes, + DependencyIndexes: file_Binance_proto_depIdxs, + MessageInfos: file_Binance_proto_msgTypes, + }.Build() + File_Binance_proto = out.File + file_Binance_proto_goTypes = nil + file_Binance_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/bitcoin/Bitcoin.pb.go b/wrapper/go-wrapper/protos/bitcoin/Bitcoin.pb.go new file mode 100644 index 00000000000..1d9a1307f43 --- /dev/null +++ b/wrapper/go-wrapper/protos/bitcoin/Bitcoin.pb.go @@ -0,0 +1,1361 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Bitcoin.proto + +package bitcoin + +import ( + bitcoinv2 "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoinv2" + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TransactionVariant int32 + +const ( + TransactionVariant_P2PKH TransactionVariant = 0 + TransactionVariant_P2WPKH TransactionVariant = 1 + TransactionVariant_P2TRKEYPATH TransactionVariant = 2 + TransactionVariant_BRC20TRANSFER TransactionVariant = 3 + TransactionVariant_NFTINSCRIPTION TransactionVariant = 4 +) + +// Enum value maps for TransactionVariant. +var ( + TransactionVariant_name = map[int32]string{ + 0: "P2PKH", + 1: "P2WPKH", + 2: "P2TRKEYPATH", + 3: "BRC20TRANSFER", + 4: "NFTINSCRIPTION", + } + TransactionVariant_value = map[string]int32{ + "P2PKH": 0, + "P2WPKH": 1, + "P2TRKEYPATH": 2, + "BRC20TRANSFER": 3, + "NFTINSCRIPTION": 4, + } +) + +func (x TransactionVariant) Enum() *TransactionVariant { + p := new(TransactionVariant) + *p = x + return p +} + +func (x TransactionVariant) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionVariant) Descriptor() protoreflect.EnumDescriptor { + return file_Bitcoin_proto_enumTypes[0].Descriptor() +} + +func (TransactionVariant) Type() protoreflect.EnumType { + return &file_Bitcoin_proto_enumTypes[0] +} + +func (x TransactionVariant) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionVariant.Descriptor instead. +func (TransactionVariant) EnumDescriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{0} +} + +// A transaction, with its inputs and outputs +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction data format version. + Version int32 `protobuf:"zigzag32,1,opt,name=version,proto3" json:"version,omitempty"` + // The block number or timestamp at which this transaction is unlocked. + LockTime uint32 `protobuf:"varint,2,opt,name=lockTime,proto3" json:"lockTime,omitempty"` + // A list of 1 or more transaction inputs or sources for coins. + Inputs []*TransactionInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // A list of 1 or more transaction outputs or destinations for coins. + Outputs []*TransactionOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Bitcoin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{0} +} + +func (x *Transaction) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Transaction) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *Transaction) GetInputs() []*TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *Transaction) GetOutputs() []*TransactionOutput { + if x != nil { + return x.Outputs + } + return nil +} + +// Bitcoin transaction input. +type TransactionInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Reference to the previous transaction's output. + PreviousOutput *OutPoint `protobuf:"bytes,1,opt,name=previousOutput,proto3" json:"previousOutput,omitempty"` + // Transaction version as defined by the sender. + Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Computational script for confirming transaction authorization. + Script []byte `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionInput) Reset() { + *x = TransactionInput{} + mi := &file_Bitcoin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInput) ProtoMessage() {} + +func (x *TransactionInput) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead. +func (*TransactionInput) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{1} +} + +func (x *TransactionInput) GetPreviousOutput() *OutPoint { + if x != nil { + return x.PreviousOutput + } + return nil +} + +func (x *TransactionInput) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *TransactionInput) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +// Bitcoin transaction out-point reference. +type OutPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hash of the referenced transaction (network byte order, usually needs to be reversed). + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The index of the specific output in the transaction. + Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + // Transaction version as defined by the sender. + Sequence uint32 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + // The tree in utxo, only works for DCR + Tree int32 `protobuf:"varint,4,opt,name=tree,proto3" json:"tree,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + mi := &file_Bitcoin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{2} +} + +func (x *OutPoint) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *OutPoint) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *OutPoint) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *OutPoint) GetTree() int32 { + if x != nil { + return x.Tree + } + return 0 +} + +// Bitcoin transaction output. +type TransactionOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction amount. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + // Usually contains the public key as a Bitcoin script setting up conditions to claim this output. + Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` + // Optional spending script for P2TR script-path transactions. + SpendingScript []byte `protobuf:"bytes,5,opt,name=spendingScript,proto3" json:"spendingScript,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOutput) Reset() { + *x = TransactionOutput{} + mi := &file_Bitcoin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOutput) ProtoMessage() {} + +func (x *TransactionOutput) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead. +func (*TransactionOutput) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{3} +} + +func (x *TransactionOutput) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *TransactionOutput) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +func (x *TransactionOutput) GetSpendingScript() []byte { + if x != nil { + return x.SpendingScript + } + return nil +} + +// An unspent transaction output, that can serve as input to a transaction +type UnspentTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The unspent output + OutPoint *OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + // Script for claiming this UTXO + Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` + // Amount of the UTXO + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction variant + Variant TransactionVariant `protobuf:"varint,4,opt,name=variant,proto3,enum=TW.Bitcoin.Proto.TransactionVariant" json:"variant,omitempty"` + // Optional spending script for P2TR script-path transactions. + SpendingScript []byte `protobuf:"bytes,5,opt,name=spendingScript,proto3" json:"spendingScript,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnspentTransaction) Reset() { + *x = UnspentTransaction{} + mi := &file_Bitcoin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnspentTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnspentTransaction) ProtoMessage() {} + +func (x *UnspentTransaction) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnspentTransaction.ProtoReflect.Descriptor instead. +func (*UnspentTransaction) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{4} +} + +func (x *UnspentTransaction) GetOutPoint() *OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +func (x *UnspentTransaction) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +func (x *UnspentTransaction) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *UnspentTransaction) GetVariant() TransactionVariant { + if x != nil { + return x.Variant + } + return TransactionVariant_P2PKH +} + +func (x *UnspentTransaction) GetSpendingScript() []byte { + if x != nil { + return x.SpendingScript + } + return nil +} + +// Pair of destination address and amount, used for extra outputs +type OutputAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination address + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to be paid to this output + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputAddress) Reset() { + *x = OutputAddress{} + mi := &file_Bitcoin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputAddress) ProtoMessage() {} + +func (x *OutputAddress) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputAddress.ProtoReflect.Descriptor instead. +func (*OutputAddress) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{5} +} + +func (x *OutputAddress) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *OutputAddress) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Optional index of a corresponding output in the transaction. +type OutputIndex struct { + state protoimpl.MessageState `protogen:"open.v1"` + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputIndex) Reset() { + *x = OutputIndex{} + mi := &file_Bitcoin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputIndex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputIndex) ProtoMessage() {} + +func (x *OutputIndex) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputIndex.ProtoReflect.Descriptor instead. +func (*OutputIndex) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{6} +} + +func (x *OutputIndex) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Hash type to use when signing. + HashType uint32 `protobuf:"varint,1,opt,name=hash_type,json=hashType,proto3" json:"hash_type,omitempty"` + // Amount to send. Transaction created will have this amount in its output, + // except when use_max_amount is set, in that case this amount is not relevant, maximum possible amount will be used (max avail less fee). + // If amount is equal or more than the available amount, also max amount will be used. + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Transaction fee rate, satoshis per byte, used to compute required fee (when planning) + ByteFee int64 `protobuf:"varint,3,opt,name=byte_fee,json=byteFee,proto3" json:"byte_fee,omitempty"` + // Recipient's address, as string. + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Change address, as string. + ChangeAddress string `protobuf:"bytes,5,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // The available secret private key or keys required for signing (32 bytes each). + PrivateKey [][]byte `protobuf:"bytes,6,rep,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Available redeem scripts indexed by script hash. + Scripts map[string][]byte `protobuf:"bytes,7,rep,name=scripts,proto3" json:"scripts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Available input unspent transaction outputs. + Utxo []*UnspentTransaction `protobuf:"bytes,8,rep,name=utxo,proto3" json:"utxo,omitempty"` + // Set if sending max amount is requested. + UseMaxAmount bool `protobuf:"varint,9,opt,name=use_max_amount,json=useMaxAmount,proto3" json:"use_max_amount,omitempty"` + // Coin type (used by forks). + CoinType uint32 `protobuf:"varint,10,opt,name=coin_type,json=coinType,proto3" json:"coin_type,omitempty"` + // Optional transaction plan. If missing, plan will be computed. + Plan *TransactionPlan `protobuf:"bytes,11,opt,name=plan,proto3" json:"plan,omitempty"` + // Optional lockTime, default value 0 means no time locking. + // If all inputs have final (`0xffffffff`) sequence numbers then `lockTime` is irrelevant. + // Otherwise, the transaction may not be added to a block until after `lockTime`. + // + // value < 500000000 : Block number at which this transaction is unlocked + // value >= 500000000 : UNIX timestamp at which this transaction is unlocked + LockTime uint32 `protobuf:"varint,12,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // Optional zero-amount, OP_RETURN output + OutputOpReturn []byte `protobuf:"bytes,13,opt,name=output_op_return,json=outputOpReturn,proto3" json:"output_op_return,omitempty"` + // Optional index of the OP_RETURN output in the transaction. + // If not set, OP_RETURN output will be pushed as the latest output. + OutputOpReturnIndex *OutputIndex `protobuf:"bytes,26,opt,name=output_op_return_index,json=outputOpReturnIndex,proto3" json:"output_op_return_index,omitempty"` + // Optional additional destination addresses, additional to first to_address output + ExtraOutputs []*OutputAddress `protobuf:"bytes,14,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"` + // If use max utxo. + UseMaxUtxo bool `protobuf:"varint,15,opt,name=use_max_utxo,json=useMaxUtxo,proto3" json:"use_max_utxo,omitempty"` + // If disable dust filter. + DisableDustFilter bool `protobuf:"varint,16,opt,name=disable_dust_filter,json=disableDustFilter,proto3" json:"disable_dust_filter,omitempty"` + // transaction creation time that will be used for verge(xvg) + Time uint32 `protobuf:"varint,17,opt,name=time,proto3" json:"time,omitempty"` + // Whether to calculate the fee according to ZIP-0317 for the given transaction + // https://zips.z.cash/zip-0317#fee-calculation + Zip_0317 bool `protobuf:"varint,18,opt,name=zip_0317,json=zip0317,proto3" json:"zip_0317,omitempty"` + // If set, uses Bitcoin 2.0 Signing protocol. + // As a result, `Bitcoin.Proto.SigningOutput.signing_result_v2` is set. + SigningV2 *bitcoinv2.SigningInput `protobuf:"bytes,21,opt,name=signing_v2,json=signingV2,proto3" json:"signing_v2,omitempty"` + // One of the "Dust" amount policies. + // Later, we plan to add support for `DynamicDust` policy with a `min_relay_fee` amount. + // + // Types that are valid to be assigned to DustPolicy: + // + // *SigningInput_FixedDustThreshold + DustPolicy isSigningInput_DustPolicy `protobuf_oneof:"dust_policy"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Bitcoin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{7} +} + +func (x *SigningInput) GetHashType() uint32 { + if x != nil { + return x.HashType + } + return 0 +} + +func (x *SigningInput) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *SigningInput) GetByteFee() int64 { + if x != nil { + return x.ByteFee + } + return 0 +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *SigningInput) GetPrivateKey() [][]byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetScripts() map[string][]byte { + if x != nil { + return x.Scripts + } + return nil +} + +func (x *SigningInput) GetUtxo() []*UnspentTransaction { + if x != nil { + return x.Utxo + } + return nil +} + +func (x *SigningInput) GetUseMaxAmount() bool { + if x != nil { + return x.UseMaxAmount + } + return false +} + +func (x *SigningInput) GetCoinType() uint32 { + if x != nil { + return x.CoinType + } + return 0 +} + +func (x *SigningInput) GetPlan() *TransactionPlan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *SigningInput) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *SigningInput) GetOutputOpReturn() []byte { + if x != nil { + return x.OutputOpReturn + } + return nil +} + +func (x *SigningInput) GetOutputOpReturnIndex() *OutputIndex { + if x != nil { + return x.OutputOpReturnIndex + } + return nil +} + +func (x *SigningInput) GetExtraOutputs() []*OutputAddress { + if x != nil { + return x.ExtraOutputs + } + return nil +} + +func (x *SigningInput) GetUseMaxUtxo() bool { + if x != nil { + return x.UseMaxUtxo + } + return false +} + +func (x *SigningInput) GetDisableDustFilter() bool { + if x != nil { + return x.DisableDustFilter + } + return false +} + +func (x *SigningInput) GetTime() uint32 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *SigningInput) GetZip_0317() bool { + if x != nil { + return x.Zip_0317 + } + return false +} + +func (x *SigningInput) GetSigningV2() *bitcoinv2.SigningInput { + if x != nil { + return x.SigningV2 + } + return nil +} + +func (x *SigningInput) GetDustPolicy() isSigningInput_DustPolicy { + if x != nil { + return x.DustPolicy + } + return nil +} + +func (x *SigningInput) GetFixedDustThreshold() int64 { + if x != nil { + if x, ok := x.DustPolicy.(*SigningInput_FixedDustThreshold); ok { + return x.FixedDustThreshold + } + } + return 0 +} + +type isSigningInput_DustPolicy interface { + isSigningInput_DustPolicy() +} + +type SigningInput_FixedDustThreshold struct { + // Use a constant "Dust" threshold. + FixedDustThreshold int64 `protobuf:"varint,24,opt,name=fixed_dust_threshold,json=fixedDustThreshold,proto3,oneof"` +} + +func (*SigningInput_FixedDustThreshold) isSigningInput_DustPolicy() {} + +// Describes a preliminary transaction plan. +type TransactionPlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to be received at the other end. + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Maximum available amount in all the input UTXOs. + AvailableAmount int64 `protobuf:"varint,2,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"` + // Estimated transaction fee. + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + // Remaining change + Change int64 `protobuf:"varint,4,opt,name=change,proto3" json:"change,omitempty"` + // Selected unspent transaction outputs (subset of all input UTXOs) + Utxos []*UnspentTransaction `protobuf:"bytes,5,rep,name=utxos,proto3" json:"utxos,omitempty"` + // Zcash branch id + BranchId []byte `protobuf:"bytes,6,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,7,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Optional zero-amount, OP_RETURN output + OutputOpReturn []byte `protobuf:"bytes,8,opt,name=output_op_return,json=outputOpReturn,proto3" json:"output_op_return,omitempty"` + // Optional index of the OP_RETURN output in the transaction. + // If not set, OP_RETURN output will be pushed as the latest output. + OutputOpReturnIndex *OutputIndex `protobuf:"bytes,14,opt,name=output_op_return_index,json=outputOpReturnIndex,proto3" json:"output_op_return_index,omitempty"` + // zen & bitcoin diamond preblockhash + Preblockhash []byte `protobuf:"bytes,9,opt,name=preblockhash,proto3" json:"preblockhash,omitempty"` + // zen preblockheight + Preblockheight int64 `protobuf:"varint,10,opt,name=preblockheight,proto3" json:"preblockheight,omitempty"` + // Result of a transaction planning using the Bitcoin 2.0 protocol. + // Set if `Bitcoin.Proto.SigningInput.planning_v2` used. + PlanningResultV2 *bitcoinv2.TransactionPlan `protobuf:"bytes,12,opt,name=planning_result_v2,json=planningResultV2,proto3" json:"planning_result_v2,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionPlan) Reset() { + *x = TransactionPlan{} + mi := &file_Bitcoin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionPlan) ProtoMessage() {} + +func (x *TransactionPlan) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead. +func (*TransactionPlan) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{8} +} + +func (x *TransactionPlan) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TransactionPlan) GetAvailableAmount() int64 { + if x != nil { + return x.AvailableAmount + } + return 0 +} + +func (x *TransactionPlan) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionPlan) GetChange() int64 { + if x != nil { + return x.Change + } + return 0 +} + +func (x *TransactionPlan) GetUtxos() []*UnspentTransaction { + if x != nil { + return x.Utxos + } + return nil +} + +func (x *TransactionPlan) GetBranchId() []byte { + if x != nil { + return x.BranchId + } + return nil +} + +func (x *TransactionPlan) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *TransactionPlan) GetOutputOpReturn() []byte { + if x != nil { + return x.OutputOpReturn + } + return nil +} + +func (x *TransactionPlan) GetOutputOpReturnIndex() *OutputIndex { + if x != nil { + return x.OutputOpReturnIndex + } + return nil +} + +func (x *TransactionPlan) GetPreblockhash() []byte { + if x != nil { + return x.Preblockhash + } + return nil +} + +func (x *TransactionPlan) GetPreblockheight() int64 { + if x != nil { + return x.Preblockheight + } + return 0 +} + +func (x *TransactionPlan) GetPlanningResultV2() *bitcoinv2.TransactionPlan { + if x != nil { + return x.PlanningResultV2 + } + return nil +} + +// Result containing the signed and encoded transaction. +// Note that the amount may be different than the requested amount to account for fees and available funds. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Resulting transaction. + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Transaction ID (hash) + TransactionId string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error description + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Result of a transaction signing using the Bitcoin 2.0 protocol. + // Set if `Bitcoin.Proto.SigningInput.signing_v2` used. + SigningResultV2 *bitcoinv2.SigningOutput `protobuf:"bytes,7,opt,name=signing_result_v2,json=signingResultV2,proto3" json:"signing_result_v2,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Bitcoin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{9} +} + +func (x *SigningOutput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetSigningResultV2() *bitcoinv2.SigningOutput { + if x != nil { + return x.SigningResultV2 + } + return nil +} + +// / Pre-image hash to be used for signing +type HashPublicKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Pre-image data hash that will be used for signing + DataHash []byte `protobuf:"bytes,1,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + // / public key hash used for signing + PublicKeyHash []byte `protobuf:"bytes,2,opt,name=public_key_hash,json=publicKeyHash,proto3" json:"public_key_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HashPublicKey) Reset() { + *x = HashPublicKey{} + mi := &file_Bitcoin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HashPublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HashPublicKey) ProtoMessage() {} + +func (x *HashPublicKey) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HashPublicKey.ProtoReflect.Descriptor instead. +func (*HashPublicKey) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{10} +} + +func (x *HashPublicKey) GetDataHash() []byte { + if x != nil { + return x.DataHash + } + return nil +} + +func (x *HashPublicKey) GetPublicKeyHash() []byte { + if x != nil { + return x.PublicKeyHash + } + return nil +} + +// / Transaction pre-signing output +type PreSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / hash, public key list + HashPublicKeys []*HashPublicKey `protobuf:"bytes,1,rep,name=hash_public_keys,json=hashPublicKeys,proto3" json:"hash_public_keys,omitempty"` + // / error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // / error description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Result of a transaction pre-signing using the Bitcoin 2.0 protocol. + // Set if `Bitcoin.Proto.SigningInput.signing_v2` used. + PreSigningResultV2 *bitcoinv2.PreSigningOutput `protobuf:"bytes,7,opt,name=pre_signing_result_v2,json=preSigningResultV2,proto3" json:"pre_signing_result_v2,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreSigningOutput) Reset() { + *x = PreSigningOutput{} + mi := &file_Bitcoin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreSigningOutput) ProtoMessage() {} + +func (x *PreSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Bitcoin_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreSigningOutput.ProtoReflect.Descriptor instead. +func (*PreSigningOutput) Descriptor() ([]byte, []int) { + return file_Bitcoin_proto_rawDescGZIP(), []int{11} +} + +func (x *PreSigningOutput) GetHashPublicKeys() []*HashPublicKey { + if x != nil { + return x.HashPublicKeys + } + return nil +} + +func (x *PreSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *PreSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *PreSigningOutput) GetPreSigningResultV2() *bitcoinv2.PreSigningOutput { + if x != nil { + return x.PreSigningResultV2 + } + return nil +} + +var File_Bitcoin_proto protoreflect.FileDescriptor + +const file_Bitcoin_proto_rawDesc = "" + + "\n" + + "\rBitcoin.proto\x12\x10TW.Bitcoin.Proto\x1a\x0fBitcoinV2.proto\x1a\fCommon.proto\"\xbe\x01\n" + + "\vTransaction\x12\x18\n" + + "\aversion\x18\x01 \x01(\x11R\aversion\x12\x1a\n" + + "\blockTime\x18\x02 \x01(\rR\blockTime\x12:\n" + + "\x06inputs\x18\x03 \x03(\v2\".TW.Bitcoin.Proto.TransactionInputR\x06inputs\x12=\n" + + "\aoutputs\x18\x04 \x03(\v2#.TW.Bitcoin.Proto.TransactionOutputR\aoutputs\"\x8a\x01\n" + + "\x10TransactionInput\x12B\n" + + "\x0epreviousOutput\x18\x01 \x01(\v2\x1a.TW.Bitcoin.Proto.OutPointR\x0epreviousOutput\x12\x1a\n" + + "\bsequence\x18\x02 \x01(\rR\bsequence\x12\x16\n" + + "\x06script\x18\x03 \x01(\fR\x06script\"d\n" + + "\bOutPoint\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\x12\x14\n" + + "\x05index\x18\x02 \x01(\rR\x05index\x12\x1a\n" + + "\bsequence\x18\x03 \x01(\rR\bsequence\x12\x12\n" + + "\x04tree\x18\x04 \x01(\x05R\x04tree\"i\n" + + "\x11TransactionOutput\x12\x14\n" + + "\x05value\x18\x01 \x01(\x03R\x05value\x12\x16\n" + + "\x06script\x18\x02 \x01(\fR\x06script\x12&\n" + + "\x0espendingScript\x18\x05 \x01(\fR\x0espendingScript\"\xe5\x01\n" + + "\x12UnspentTransaction\x127\n" + + "\tout_point\x18\x01 \x01(\v2\x1a.TW.Bitcoin.Proto.OutPointR\boutPoint\x12\x16\n" + + "\x06script\x18\x02 \x01(\fR\x06script\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\x12>\n" + + "\avariant\x18\x04 \x01(\x0e2$.TW.Bitcoin.Proto.TransactionVariantR\avariant\x12&\n" + + "\x0espendingScript\x18\x05 \x01(\fR\x0espendingScript\"F\n" + + "\rOutputAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\"#\n" + + "\vOutputIndex\x12\x14\n" + + "\x05index\x18\x01 \x01(\rR\x05index\"\xe2\a\n" + + "\fSigningInput\x12\x1b\n" + + "\thash_type\x18\x01 \x01(\rR\bhashType\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x19\n" + + "\bbyte_fee\x18\x03 \x01(\x03R\abyteFee\x12\x1d\n" + + "\n" + + "to_address\x18\x04 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x05 \x01(\tR\rchangeAddress\x12\x1f\n" + + "\vprivate_key\x18\x06 \x03(\fR\n" + + "privateKey\x12E\n" + + "\ascripts\x18\a \x03(\v2+.TW.Bitcoin.Proto.SigningInput.ScriptsEntryR\ascripts\x128\n" + + "\x04utxo\x18\b \x03(\v2$.TW.Bitcoin.Proto.UnspentTransactionR\x04utxo\x12$\n" + + "\x0euse_max_amount\x18\t \x01(\bR\fuseMaxAmount\x12\x1b\n" + + "\tcoin_type\x18\n" + + " \x01(\rR\bcoinType\x125\n" + + "\x04plan\x18\v \x01(\v2!.TW.Bitcoin.Proto.TransactionPlanR\x04plan\x12\x1b\n" + + "\tlock_time\x18\f \x01(\rR\blockTime\x12(\n" + + "\x10output_op_return\x18\r \x01(\fR\x0eoutputOpReturn\x12R\n" + + "\x16output_op_return_index\x18\x1a \x01(\v2\x1d.TW.Bitcoin.Proto.OutputIndexR\x13outputOpReturnIndex\x12D\n" + + "\rextra_outputs\x18\x0e \x03(\v2\x1f.TW.Bitcoin.Proto.OutputAddressR\fextraOutputs\x12 \n" + + "\fuse_max_utxo\x18\x0f \x01(\bR\n" + + "useMaxUtxo\x12.\n" + + "\x13disable_dust_filter\x18\x10 \x01(\bR\x11disableDustFilter\x12\x12\n" + + "\x04time\x18\x11 \x01(\rR\x04time\x12\x19\n" + + "\bzip_0317\x18\x12 \x01(\bR\azip0317\x12?\n" + + "\n" + + "signing_v2\x18\x15 \x01(\v2 .TW.BitcoinV2.Proto.SigningInputR\tsigningV2\x122\n" + + "\x14fixed_dust_threshold\x18\x18 \x01(\x03H\x00R\x12fixedDustThreshold\x1a:\n" + + "\fScriptsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01B\r\n" + + "\vdust_policy\"\xa9\x04\n" + + "\x0fTransactionPlan\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12)\n" + + "\x10available_amount\x18\x02 \x01(\x03R\x0favailableAmount\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x12\x16\n" + + "\x06change\x18\x04 \x01(\x03R\x06change\x12:\n" + + "\x05utxos\x18\x05 \x03(\v2$.TW.Bitcoin.Proto.UnspentTransactionR\x05utxos\x12\x1b\n" + + "\tbranch_id\x18\x06 \x01(\fR\bbranchId\x123\n" + + "\x05error\x18\a \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12(\n" + + "\x10output_op_return\x18\b \x01(\fR\x0eoutputOpReturn\x12R\n" + + "\x16output_op_return_index\x18\x0e \x01(\v2\x1d.TW.Bitcoin.Proto.OutputIndexR\x13outputOpReturnIndex\x12\"\n" + + "\fpreblockhash\x18\t \x01(\fR\fpreblockhash\x12&\n" + + "\x0epreblockheight\x18\n" + + " \x01(\x03R\x0epreblockheight\x12Q\n" + + "\x12planning_result_v2\x18\f \x01(\v2#.TW.BitcoinV2.Proto.TransactionPlanR\x10planningResultV2\"\xba\x02\n" + + "\rSigningOutput\x12?\n" + + "\vtransaction\x18\x01 \x01(\v2\x1d.TW.Bitcoin.Proto.TransactionR\vtransaction\x12\x18\n" + + "\aencoded\x18\x02 \x01(\fR\aencoded\x12%\n" + + "\x0etransaction_id\x18\x03 \x01(\tR\rtransactionId\x123\n" + + "\x05error\x18\x04 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x05 \x01(\tR\ferrorMessage\x12M\n" + + "\x11signing_result_v2\x18\a \x01(\v2!.TW.BitcoinV2.Proto.SigningOutputR\x0fsigningResultV2\"T\n" + + "\rHashPublicKey\x12\x1b\n" + + "\tdata_hash\x18\x01 \x01(\fR\bdataHash\x12&\n" + + "\x0fpublic_key_hash\x18\x02 \x01(\fR\rpublicKeyHash\"\x90\x02\n" + + "\x10PreSigningOutput\x12I\n" + + "\x10hash_public_keys\x18\x01 \x03(\v2\x1f.TW.Bitcoin.Proto.HashPublicKeyR\x0ehashPublicKeys\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x12W\n" + + "\x15pre_signing_result_v2\x18\a \x01(\v2$.TW.BitcoinV2.Proto.PreSigningOutputR\x12preSigningResultV2*c\n" + + "\x12TransactionVariant\x12\t\n" + + "\x05P2PKH\x10\x00\x12\n" + + "\n" + + "\x06P2WPKH\x10\x01\x12\x0f\n" + + "\vP2TRKEYPATH\x10\x02\x12\x11\n" + + "\rBRC20TRANSFER\x10\x03\x12\x12\n" + + "\x0eNFTINSCRIPTION\x10\x04B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Bitcoin_proto_rawDescOnce sync.Once + file_Bitcoin_proto_rawDescData []byte +) + +func file_Bitcoin_proto_rawDescGZIP() []byte { + file_Bitcoin_proto_rawDescOnce.Do(func() { + file_Bitcoin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Bitcoin_proto_rawDesc), len(file_Bitcoin_proto_rawDesc))) + }) + return file_Bitcoin_proto_rawDescData +} + +var file_Bitcoin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Bitcoin_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_Bitcoin_proto_goTypes = []any{ + (TransactionVariant)(0), // 0: TW.Bitcoin.Proto.TransactionVariant + (*Transaction)(nil), // 1: TW.Bitcoin.Proto.Transaction + (*TransactionInput)(nil), // 2: TW.Bitcoin.Proto.TransactionInput + (*OutPoint)(nil), // 3: TW.Bitcoin.Proto.OutPoint + (*TransactionOutput)(nil), // 4: TW.Bitcoin.Proto.TransactionOutput + (*UnspentTransaction)(nil), // 5: TW.Bitcoin.Proto.UnspentTransaction + (*OutputAddress)(nil), // 6: TW.Bitcoin.Proto.OutputAddress + (*OutputIndex)(nil), // 7: TW.Bitcoin.Proto.OutputIndex + (*SigningInput)(nil), // 8: TW.Bitcoin.Proto.SigningInput + (*TransactionPlan)(nil), // 9: TW.Bitcoin.Proto.TransactionPlan + (*SigningOutput)(nil), // 10: TW.Bitcoin.Proto.SigningOutput + (*HashPublicKey)(nil), // 11: TW.Bitcoin.Proto.HashPublicKey + (*PreSigningOutput)(nil), // 12: TW.Bitcoin.Proto.PreSigningOutput + nil, // 13: TW.Bitcoin.Proto.SigningInput.ScriptsEntry + (*bitcoinv2.SigningInput)(nil), // 14: TW.BitcoinV2.Proto.SigningInput + (common.SigningError)(0), // 15: TW.Common.Proto.SigningError + (*bitcoinv2.TransactionPlan)(nil), // 16: TW.BitcoinV2.Proto.TransactionPlan + (*bitcoinv2.SigningOutput)(nil), // 17: TW.BitcoinV2.Proto.SigningOutput + (*bitcoinv2.PreSigningOutput)(nil), // 18: TW.BitcoinV2.Proto.PreSigningOutput +} +var file_Bitcoin_proto_depIdxs = []int32{ + 2, // 0: TW.Bitcoin.Proto.Transaction.inputs:type_name -> TW.Bitcoin.Proto.TransactionInput + 4, // 1: TW.Bitcoin.Proto.Transaction.outputs:type_name -> TW.Bitcoin.Proto.TransactionOutput + 3, // 2: TW.Bitcoin.Proto.TransactionInput.previousOutput:type_name -> TW.Bitcoin.Proto.OutPoint + 3, // 3: TW.Bitcoin.Proto.UnspentTransaction.out_point:type_name -> TW.Bitcoin.Proto.OutPoint + 0, // 4: TW.Bitcoin.Proto.UnspentTransaction.variant:type_name -> TW.Bitcoin.Proto.TransactionVariant + 13, // 5: TW.Bitcoin.Proto.SigningInput.scripts:type_name -> TW.Bitcoin.Proto.SigningInput.ScriptsEntry + 5, // 6: TW.Bitcoin.Proto.SigningInput.utxo:type_name -> TW.Bitcoin.Proto.UnspentTransaction + 9, // 7: TW.Bitcoin.Proto.SigningInput.plan:type_name -> TW.Bitcoin.Proto.TransactionPlan + 7, // 8: TW.Bitcoin.Proto.SigningInput.output_op_return_index:type_name -> TW.Bitcoin.Proto.OutputIndex + 6, // 9: TW.Bitcoin.Proto.SigningInput.extra_outputs:type_name -> TW.Bitcoin.Proto.OutputAddress + 14, // 10: TW.Bitcoin.Proto.SigningInput.signing_v2:type_name -> TW.BitcoinV2.Proto.SigningInput + 5, // 11: TW.Bitcoin.Proto.TransactionPlan.utxos:type_name -> TW.Bitcoin.Proto.UnspentTransaction + 15, // 12: TW.Bitcoin.Proto.TransactionPlan.error:type_name -> TW.Common.Proto.SigningError + 7, // 13: TW.Bitcoin.Proto.TransactionPlan.output_op_return_index:type_name -> TW.Bitcoin.Proto.OutputIndex + 16, // 14: TW.Bitcoin.Proto.TransactionPlan.planning_result_v2:type_name -> TW.BitcoinV2.Proto.TransactionPlan + 1, // 15: TW.Bitcoin.Proto.SigningOutput.transaction:type_name -> TW.Bitcoin.Proto.Transaction + 15, // 16: TW.Bitcoin.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 17, // 17: TW.Bitcoin.Proto.SigningOutput.signing_result_v2:type_name -> TW.BitcoinV2.Proto.SigningOutput + 11, // 18: TW.Bitcoin.Proto.PreSigningOutput.hash_public_keys:type_name -> TW.Bitcoin.Proto.HashPublicKey + 15, // 19: TW.Bitcoin.Proto.PreSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 18, // 20: TW.Bitcoin.Proto.PreSigningOutput.pre_signing_result_v2:type_name -> TW.BitcoinV2.Proto.PreSigningOutput + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_Bitcoin_proto_init() } +func file_Bitcoin_proto_init() { + if File_Bitcoin_proto != nil { + return + } + file_Bitcoin_proto_msgTypes[7].OneofWrappers = []any{ + (*SigningInput_FixedDustThreshold)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Bitcoin_proto_rawDesc), len(file_Bitcoin_proto_rawDesc)), + NumEnums: 1, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Bitcoin_proto_goTypes, + DependencyIndexes: file_Bitcoin_proto_depIdxs, + EnumInfos: file_Bitcoin_proto_enumTypes, + MessageInfos: file_Bitcoin_proto_msgTypes, + }.Build() + File_Bitcoin_proto = out.File + file_Bitcoin_proto_goTypes = nil + file_Bitcoin_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/bitcoinv2/BitcoinV2.pb.go b/wrapper/go-wrapper/protos/bitcoinv2/BitcoinV2.pb.go new file mode 100644 index 00000000000..95fae6d31a9 --- /dev/null +++ b/wrapper/go-wrapper/protos/bitcoinv2/BitcoinV2.pb.go @@ -0,0 +1,2702 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: BitcoinV2.proto + +package bitcoinv2 + +import ( + babylonstaking "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/babylonstaking" + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + decredv2 "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/decredv2" + utxo "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/utxo" + zcash "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/zcash" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InputSelector int32 + +const ( + // Automatically select enough inputs in an ascending order to cover the outputs of the transaction. + InputSelector_SelectAscending InputSelector = 0 + // Automatically select enough inputs in the given order to cover the outputs of the transaction. + InputSelector_SelectInOrder InputSelector = 1 + // Automatically select enough inputs in an descending order to cover the outputs of the transaction. + InputSelector_SelectDescending InputSelector = 2 + // Use all the inputs provided in the given order. + InputSelector_UseAll InputSelector = 10 +) + +// Enum value maps for InputSelector. +var ( + InputSelector_name = map[int32]string{ + 0: "SelectAscending", + 1: "SelectInOrder", + 2: "SelectDescending", + 10: "UseAll", + } + InputSelector_value = map[string]int32{ + "SelectAscending": 0, + "SelectInOrder": 1, + "SelectDescending": 2, + "UseAll": 10, + } +) + +func (x InputSelector) Enum() *InputSelector { + p := new(InputSelector) + *p = x + return p +} + +func (x InputSelector) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (InputSelector) Descriptor() protoreflect.EnumDescriptor { + return file_BitcoinV2_proto_enumTypes[0].Descriptor() +} + +func (InputSelector) Type() protoreflect.EnumType { + return &file_BitcoinV2_proto_enumTypes[0] +} + +func (x InputSelector) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use InputSelector.Descriptor instead. +func (InputSelector) EnumDescriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{0} +} + +type TransactionVersion int32 + +const ( + // V1 is used by default. + TransactionVersion_UseDefault TransactionVersion = 0 + // Original transaction version. + TransactionVersion_V1 TransactionVersion = 1 + // https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki#specification + TransactionVersion_V2 TransactionVersion = 2 +) + +// Enum value maps for TransactionVersion. +var ( + TransactionVersion_name = map[int32]string{ + 0: "UseDefault", + 1: "V1", + 2: "V2", + } + TransactionVersion_value = map[string]int32{ + "UseDefault": 0, + "V1": 1, + "V2": 2, + } +) + +func (x TransactionVersion) Enum() *TransactionVersion { + p := new(TransactionVersion) + *p = x + return p +} + +func (x TransactionVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionVersion) Descriptor() protoreflect.EnumDescriptor { + return file_BitcoinV2_proto_enumTypes[1].Descriptor() +} + +func (TransactionVersion) Type() protoreflect.EnumType { + return &file_BitcoinV2_proto_enumTypes[1] +} + +func (x TransactionVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionVersion.Descriptor instead. +func (TransactionVersion) EnumDescriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{1} +} + +type PreSigningOutput_SigningMethod int32 + +const ( + // Used for P2SH and P2PKH - standard ecdsa secp256k1 signing + PreSigningOutput_Legacy PreSigningOutput_SigningMethod = 0 + // Used for P2WSH and P2WPKH - standard ecdsa secp256k1 signing + PreSigningOutput_Segwit PreSigningOutput_SigningMethod = 1 + // Used for P2TR key-path and P2TR script-pay - schnorr signing + PreSigningOutput_Taproot PreSigningOutput_SigningMethod = 2 +) + +// Enum value maps for PreSigningOutput_SigningMethod. +var ( + PreSigningOutput_SigningMethod_name = map[int32]string{ + 0: "Legacy", + 1: "Segwit", + 2: "Taproot", + } + PreSigningOutput_SigningMethod_value = map[string]int32{ + "Legacy": 0, + "Segwit": 1, + "Taproot": 2, + } +) + +func (x PreSigningOutput_SigningMethod) Enum() *PreSigningOutput_SigningMethod { + p := new(PreSigningOutput_SigningMethod) + *p = x + return p +} + +func (x PreSigningOutput_SigningMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PreSigningOutput_SigningMethod) Descriptor() protoreflect.EnumDescriptor { + return file_BitcoinV2_proto_enumTypes[2].Descriptor() +} + +func (PreSigningOutput_SigningMethod) Type() protoreflect.EnumType { + return &file_BitcoinV2_proto_enumTypes[2] +} + +func (x PreSigningOutput_SigningMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PreSigningOutput_SigningMethod.Descriptor instead. +func (PreSigningOutput_SigningMethod) EnumDescriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{9, 0} +} + +// Either a public key or public key hash. +type PublicKeyOrHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *PublicKeyOrHash_Pubkey + // *PublicKeyOrHash_Hash + Variant isPublicKeyOrHash_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicKeyOrHash) Reset() { + *x = PublicKeyOrHash{} + mi := &file_BitcoinV2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicKeyOrHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKeyOrHash) ProtoMessage() {} + +func (x *PublicKeyOrHash) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicKeyOrHash.ProtoReflect.Descriptor instead. +func (*PublicKeyOrHash) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicKeyOrHash) GetVariant() isPublicKeyOrHash_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *PublicKeyOrHash) GetPubkey() []byte { + if x != nil { + if x, ok := x.Variant.(*PublicKeyOrHash_Pubkey); ok { + return x.Pubkey + } + } + return nil +} + +func (x *PublicKeyOrHash) GetHash() []byte { + if x != nil { + if x, ok := x.Variant.(*PublicKeyOrHash_Hash); ok { + return x.Hash + } + } + return nil +} + +type isPublicKeyOrHash_Variant interface { + isPublicKeyOrHash_Variant() +} + +type PublicKeyOrHash_Pubkey struct { + // Public key bytes. + Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3,oneof"` +} + +type PublicKeyOrHash_Hash struct { + // Public key hash. + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3,oneof"` +} + +func (*PublicKeyOrHash_Pubkey) isPublicKeyOrHash_Variant() {} + +func (*PublicKeyOrHash_Hash) isPublicKeyOrHash_Variant() {} + +// Public key and corresponding signature. +type PublicKeySignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Public key bytes. Type of the public key depends on the context. + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Signature 64-length byte array. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicKeySignature) Reset() { + *x = PublicKeySignature{} + mi := &file_BitcoinV2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicKeySignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKeySignature) ProtoMessage() {} + +func (x *PublicKeySignature) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicKeySignature.ProtoReflect.Descriptor instead. +func (*PublicKeySignature) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{1} +} + +func (x *PublicKeySignature) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *PublicKeySignature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +type Input struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Reference to the previous transaction's output. + OutPoint *utxo.OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + // The amount of satoshis of this input. + Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + // The sighash type, normally `All`. + // See `TWBitcoinSigHashType` enum. + SighashType uint32 `protobuf:"varint,3,opt,name=sighash_type,json=sighashType,proto3" json:"sighash_type,omitempty"` + // Optional sequence number, used for timelocks, replace-by-fee, etc. + // Leave empty to use a default 4294967295 (0xFFFFFFFF) value. + Sequence *Input_Sequence `protobuf:"bytes,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Script for claiming this UTXO. + // + // Types that are valid to be assigned to ClaimingScript: + // + // *Input_ScriptBuilder + // *Input_ScriptData + // *Input_ReceiverAddress + ClaimingScript isInput_ClaimingScript `protobuf_oneof:"claiming_script"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Input) Reset() { + *x = Input{} + mi := &file_BitcoinV2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Input) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input) ProtoMessage() {} + +func (x *Input) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Input.ProtoReflect.Descriptor instead. +func (*Input) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{2} +} + +func (x *Input) GetOutPoint() *utxo.OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +func (x *Input) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *Input) GetSighashType() uint32 { + if x != nil { + return x.SighashType + } + return 0 +} + +func (x *Input) GetSequence() *Input_Sequence { + if x != nil { + return x.Sequence + } + return nil +} + +func (x *Input) GetClaimingScript() isInput_ClaimingScript { + if x != nil { + return x.ClaimingScript + } + return nil +} + +func (x *Input) GetScriptBuilder() *Input_InputBuilder { + if x != nil { + if x, ok := x.ClaimingScript.(*Input_ScriptBuilder); ok { + return x.ScriptBuilder + } + } + return nil +} + +func (x *Input) GetScriptData() []byte { + if x != nil { + if x, ok := x.ClaimingScript.(*Input_ScriptData); ok { + return x.ScriptData + } + } + return nil +} + +func (x *Input) GetReceiverAddress() string { + if x != nil { + if x, ok := x.ClaimingScript.(*Input_ReceiverAddress); ok { + return x.ReceiverAddress + } + } + return "" +} + +type isInput_ClaimingScript interface { + isInput_ClaimingScript() +} + +type Input_ScriptBuilder struct { + // Construct claiming script with a builder pattern. + ScriptBuilder *Input_InputBuilder `protobuf:"bytes,5,opt,name=script_builder,json=scriptBuilder,proto3,oneof"` +} + +type Input_ScriptData struct { + // Spending script pubkey data. + // Use this variant if the UTXO claiming script is known already, otherwise use `InputBuilder`. + // Please note that the signing method (eg "legacy" or "segwit") will be determined by parsing the script data as: + // - P2PK, P2PKH - legacy signing method; + // - P2WPKH - segwit signing method. + ScriptData []byte `protobuf:"bytes,6,opt,name=script_data,json=scriptData,proto3,oneof"` +} + +type Input_ReceiverAddress struct { + // Derive a spending script pubkey from a receiver address. + // E.g "bc1" segwit address will be P2WPKH claiming script. + // TODO consider deprecating this because we can't determine if the script pubkey is P2PK or P2PKH actually. + ReceiverAddress string `protobuf:"bytes,7,opt,name=receiver_address,json=receiverAddress,proto3,oneof"` +} + +func (*Input_ScriptBuilder) isInput_ClaimingScript() {} + +func (*Input_ScriptData) isInput_ClaimingScript() {} + +func (*Input_ReceiverAddress) isInput_ClaimingScript() {} + +type Output struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The amount of satoshis to send. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + // Types that are valid to be assigned to ToRecipient: + // + // *Output_Builder + // *Output_CustomScriptPubkey + // *Output_ToAddress + ToRecipient isOutput_ToRecipient `protobuf_oneof:"to_recipient"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Output) Reset() { + *x = Output{} + mi := &file_BitcoinV2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Output) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output) ProtoMessage() {} + +func (x *Output) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output.ProtoReflect.Descriptor instead. +func (*Output) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{3} +} + +func (x *Output) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *Output) GetToRecipient() isOutput_ToRecipient { + if x != nil { + return x.ToRecipient + } + return nil +} + +func (x *Output) GetBuilder() *Output_OutputBuilder { + if x != nil { + if x, ok := x.ToRecipient.(*Output_Builder); ok { + return x.Builder + } + } + return nil +} + +func (x *Output) GetCustomScriptPubkey() []byte { + if x != nil { + if x, ok := x.ToRecipient.(*Output_CustomScriptPubkey); ok { + return x.CustomScriptPubkey + } + } + return nil +} + +func (x *Output) GetToAddress() string { + if x != nil { + if x, ok := x.ToRecipient.(*Output_ToAddress); ok { + return x.ToAddress + } + } + return "" +} + +type isOutput_ToRecipient interface { + isOutput_ToRecipient() +} + +type Output_Builder struct { + // Construct output with builder pattern. + Builder *Output_OutputBuilder `protobuf:"bytes,2,opt,name=builder,proto3,oneof"` +} + +type Output_CustomScriptPubkey struct { + // Construct output by providing the scriptPubkey directly. + CustomScriptPubkey []byte `protobuf:"bytes,3,opt,name=custom_script_pubkey,json=customScriptPubkey,proto3,oneof"` +} + +type Output_ToAddress struct { + // Derive the expected output from the provided address. + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3,oneof"` +} + +func (*Output_Builder) isOutput_ToRecipient() {} + +func (*Output_CustomScriptPubkey) isOutput_ToRecipient() {} + +func (*Output_ToAddress) isOutput_ToRecipient() {} + +type ChainInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // P2PKH prefix for this chain. + P2PkhPrefix uint32 `protobuf:"varint,1,opt,name=p2pkh_prefix,json=p2pkhPrefix,proto3" json:"p2pkh_prefix,omitempty"` + // P2SH prefix for this coin type. + P2ShPrefix uint32 `protobuf:"varint,2,opt,name=p2sh_prefix,json=p2shPrefix,proto3" json:"p2sh_prefix,omitempty"` + // HRP for this coin type if applicable. + Hrp string `protobuf:"bytes,3,opt,name=hrp,proto3" json:"hrp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChainInfo) Reset() { + *x = ChainInfo{} + mi := &file_BitcoinV2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChainInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo) ProtoMessage() {} + +func (x *ChainInfo) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{4} +} + +func (x *ChainInfo) GetP2PkhPrefix() uint32 { + if x != nil { + return x.P2PkhPrefix + } + return 0 +} + +func (x *ChainInfo) GetP2ShPrefix() uint32 { + if x != nil { + return x.P2ShPrefix + } + return 0 +} + +func (x *ChainInfo) GetHrp() string { + if x != nil { + return x.Hrp + } + return "" +} + +// Transaction builder used in `SigningInput`. +type TransactionBuilder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction version. + Version TransactionVersion `protobuf:"varint,1,opt,name=version,proto3,enum=TW.BitcoinV2.Proto.TransactionVersion" json:"version,omitempty"` + // (optional) Block height or timestamp indicating at what point transactions can be included in a block. + // Zero by default. + LockTime uint32 `protobuf:"varint,2,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // The inputs to spend. + Inputs []*Input `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // The output of the transaction. Note that the change output is specified + // in the `change_output` field. + Outputs []*Output `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // How the inputs should be selected. + InputSelector InputSelector `protobuf:"varint,5,opt,name=input_selector,json=inputSelector,proto3,enum=TW.BitcoinV2.Proto.InputSelector" json:"input_selector,omitempty"` + // The amount of satoshis per vbyte ("satVb"), used for fee calculation. + // Can be satoshis per byte ("satB") **ONLY** when transaction does not contain segwit UTXOs. + FeePerVb int64 `protobuf:"varint,6,opt,name=fee_per_vb,json=feePerVb,proto3" json:"fee_per_vb,omitempty"` + // (optional) The change output to be added (return to sender) at the end of the outputs list. + // The `Output.value` will be overwritten, leave default. + // Note there can be no change output if the change amount is less than dust threshold. + // Leave empty to explicitly disable change output creation. + ChangeOutput *Output `protobuf:"bytes,7,opt,name=change_output,json=changeOutput,proto3" json:"change_output,omitempty"` + // The only output with a max available amount to be send. + // If set, `SigningInput.outputs` and `SigningInput.change` will be ignored. + // The `Output.value` will be overwritten, leave default. + MaxAmountOutput *Output `protobuf:"bytes,8,opt,name=max_amount_output,json=maxAmountOutput,proto3" json:"max_amount_output,omitempty"` + // One of the "Dust" amount policies. + // Later, we plan to add support for `DynamicDust` policy with a `min_relay_fee` amount. + // + // Types that are valid to be assigned to DustPolicy: + // + // *TransactionBuilder_FixedDustThreshold + DustPolicy isTransactionBuilder_DustPolicy `protobuf_oneof:"dust_policy"` + // Types that are valid to be assigned to ChainSpecific: + // + // *TransactionBuilder_ZcashExtraData + ChainSpecific isTransactionBuilder_ChainSpecific `protobuf_oneof:"chain_specific"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionBuilder) Reset() { + *x = TransactionBuilder{} + mi := &file_BitcoinV2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionBuilder) ProtoMessage() {} + +func (x *TransactionBuilder) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionBuilder.ProtoReflect.Descriptor instead. +func (*TransactionBuilder) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{5} +} + +func (x *TransactionBuilder) GetVersion() TransactionVersion { + if x != nil { + return x.Version + } + return TransactionVersion_UseDefault +} + +func (x *TransactionBuilder) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *TransactionBuilder) GetInputs() []*Input { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *TransactionBuilder) GetOutputs() []*Output { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *TransactionBuilder) GetInputSelector() InputSelector { + if x != nil { + return x.InputSelector + } + return InputSelector_SelectAscending +} + +func (x *TransactionBuilder) GetFeePerVb() int64 { + if x != nil { + return x.FeePerVb + } + return 0 +} + +func (x *TransactionBuilder) GetChangeOutput() *Output { + if x != nil { + return x.ChangeOutput + } + return nil +} + +func (x *TransactionBuilder) GetMaxAmountOutput() *Output { + if x != nil { + return x.MaxAmountOutput + } + return nil +} + +func (x *TransactionBuilder) GetDustPolicy() isTransactionBuilder_DustPolicy { + if x != nil { + return x.DustPolicy + } + return nil +} + +func (x *TransactionBuilder) GetFixedDustThreshold() int64 { + if x != nil { + if x, ok := x.DustPolicy.(*TransactionBuilder_FixedDustThreshold); ok { + return x.FixedDustThreshold + } + } + return 0 +} + +func (x *TransactionBuilder) GetChainSpecific() isTransactionBuilder_ChainSpecific { + if x != nil { + return x.ChainSpecific + } + return nil +} + +func (x *TransactionBuilder) GetZcashExtraData() *zcash.TransactionBuilderExtraData { + if x != nil { + if x, ok := x.ChainSpecific.(*TransactionBuilder_ZcashExtraData); ok { + return x.ZcashExtraData + } + } + return nil +} + +type isTransactionBuilder_DustPolicy interface { + isTransactionBuilder_DustPolicy() +} + +type TransactionBuilder_FixedDustThreshold struct { + // Use a constant "Dust" threshold. + FixedDustThreshold int64 `protobuf:"varint,10,opt,name=fixed_dust_threshold,json=fixedDustThreshold,proto3,oneof"` +} + +func (*TransactionBuilder_FixedDustThreshold) isTransactionBuilder_DustPolicy() {} + +type isTransactionBuilder_ChainSpecific interface { + isTransactionBuilder_ChainSpecific() +} + +type TransactionBuilder_ZcashExtraData struct { + // ZCash specific transaction data. + ZcashExtraData *zcash.TransactionBuilderExtraData `protobuf:"bytes,20,opt,name=zcash_extra_data,json=zcashExtraData,proto3,oneof"` +} + +func (*TransactionBuilder_ZcashExtraData) isTransactionBuilder_ChainSpecific() {} + +// Partially Signed Bitcoin Transaction. +type Psbt struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Partially Signed Bitcoin Transaction binary encoded. + Psbt []byte `protobuf:"bytes,1,opt,name=psbt,proto3" json:"psbt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Psbt) Reset() { + *x = Psbt{} + mi := &file_BitcoinV2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Psbt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Psbt) ProtoMessage() {} + +func (x *Psbt) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Psbt.ProtoReflect.Descriptor instead. +func (*Psbt) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{6} +} + +func (x *Psbt) GetPsbt() []byte { + if x != nil { + return x.Psbt + } + return nil +} + +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // User private keys. + // Only required if the `sign` method is called. + PrivateKeys [][]byte `protobuf:"bytes,1,rep,name=private_keys,json=privateKeys,proto3" json:"private_keys,omitempty"` + // User public keys. + // Only required if the `plan`, `preImageHash` methods are called. + PublicKeys [][]byte `protobuf:"bytes,2,rep,name=public_keys,json=publicKeys,proto3" json:"public_keys,omitempty"` + // Chain info includes p2pkh, p2sh address prefixes. + // The parameter needs to be set if an input/output has a receiver address pattern. + ChainInfo *ChainInfo `protobuf:"bytes,3,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info,omitempty"` + // Whether disable auxiliary random data when signing. + // Use for testing **ONLY**. + DangerousUseFixedSchnorrRng bool `protobuf:"varint,4,opt,name=dangerous_use_fixed_schnorr_rng,json=dangerousUseFixedSchnorrRng,proto3" json:"dangerous_use_fixed_schnorr_rng,omitempty"` + // The transaction signing type. + // + // Types that are valid to be assigned to Transaction: + // + // *SigningInput_Builder + // *SigningInput_Psbt + Transaction isSigningInput_Transaction `protobuf_oneof:"transaction"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_BitcoinV2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{7} +} + +func (x *SigningInput) GetPrivateKeys() [][]byte { + if x != nil { + return x.PrivateKeys + } + return nil +} + +func (x *SigningInput) GetPublicKeys() [][]byte { + if x != nil { + return x.PublicKeys + } + return nil +} + +func (x *SigningInput) GetChainInfo() *ChainInfo { + if x != nil { + return x.ChainInfo + } + return nil +} + +func (x *SigningInput) GetDangerousUseFixedSchnorrRng() bool { + if x != nil { + return x.DangerousUseFixedSchnorrRng + } + return false +} + +func (x *SigningInput) GetTransaction() isSigningInput_Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningInput) GetBuilder() *TransactionBuilder { + if x != nil { + if x, ok := x.Transaction.(*SigningInput_Builder); ok { + return x.Builder + } + } + return nil +} + +func (x *SigningInput) GetPsbt() *Psbt { + if x != nil { + if x, ok := x.Transaction.(*SigningInput_Psbt); ok { + return x.Psbt + } + } + return nil +} + +type isSigningInput_Transaction interface { + isSigningInput_Transaction() +} + +type SigningInput_Builder struct { + // Build a transaction to be signed. + Builder *TransactionBuilder `protobuf:"bytes,10,opt,name=builder,proto3,oneof"` +} + +type SigningInput_Psbt struct { + // Finalize a Partially Signed Bitcoin Transaction by signing the rest of UTXOs. + Psbt *Psbt `protobuf:"bytes,11,opt,name=psbt,proto3,oneof"` +} + +func (*SigningInput_Builder) isSigningInput_Transaction() {} + +func (*SigningInput_Psbt) isSigningInput_Transaction() {} + +type TransactionPlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A possible error, `OK` if none. + Error common.SigningError `protobuf:"varint,1,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description. + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Selected unspent transaction outputs (subset of all input UTXOs). + Inputs []*Input `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // Transaction outputs including a change output if applied. + Outputs []*Output `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // Maximum available amount in all the transaction input UTXOs. + // That is an amount that will be spent by this transaction. + AvailableAmount int64 `protobuf:"varint,5,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"` + // Total sending amount in all the transaction outputs. + // That is an amount that will be sent (including change output if applied). + SendAmount int64 `protobuf:"varint,6,opt,name=send_amount,json=sendAmount,proto3" json:"send_amount,omitempty"` + // The estimated `vsize` in `vbytes`. + // It is used to compare how much blockweight needs to be allocated to confirm a transaction. + // For non-segwit transactions, `vsize` = `size`. + VsizeEstimate uint64 `protobuf:"varint,7,opt,name=vsize_estimate,json=vsizeEstimate,proto3" json:"vsize_estimate,omitempty"` + // The estimated fees of the transaction in satoshis. + FeeEstimate int64 `protobuf:"varint,8,opt,name=fee_estimate,json=feeEstimate,proto3" json:"fee_estimate,omitempty"` + // Remaining change. + // Zero if not applied. + Change int64 `protobuf:"varint,9,opt,name=change,proto3" json:"change,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionPlan) Reset() { + *x = TransactionPlan{} + mi := &file_BitcoinV2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionPlan) ProtoMessage() {} + +func (x *TransactionPlan) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead. +func (*TransactionPlan) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{8} +} + +func (x *TransactionPlan) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *TransactionPlan) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *TransactionPlan) GetInputs() []*Input { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *TransactionPlan) GetOutputs() []*Output { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *TransactionPlan) GetAvailableAmount() int64 { + if x != nil { + return x.AvailableAmount + } + return 0 +} + +func (x *TransactionPlan) GetSendAmount() int64 { + if x != nil { + return x.SendAmount + } + return 0 +} + +func (x *TransactionPlan) GetVsizeEstimate() uint64 { + if x != nil { + return x.VsizeEstimate + } + return 0 +} + +func (x *TransactionPlan) GetFeeEstimate() int64 { + if x != nil { + return x.FeeEstimate + } + return 0 +} + +func (x *TransactionPlan) GetChange() int64 { + if x != nil { + return x.Change + } + return 0 +} + +type PreSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A possible error, `OK` if none. + Error common.SigningError `protobuf:"varint,1,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description. + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // The sighashes to be signed; ECDSA for legacy and Segwit, Schnorr for Taproot. + Sighashes []*PreSigningOutput_Sighash `protobuf:"bytes,4,rep,name=sighashes,proto3" json:"sighashes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreSigningOutput) Reset() { + *x = PreSigningOutput{} + mi := &file_BitcoinV2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreSigningOutput) ProtoMessage() {} + +func (x *PreSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreSigningOutput.ProtoReflect.Descriptor instead. +func (*PreSigningOutput) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{9} +} + +func (x *PreSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *PreSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *PreSigningOutput) GetSighashes() []*PreSigningOutput_Sighash { + if x != nil { + return x.Sighashes + } + return nil +} + +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A possible error, `OK` if none. + Error common.SigningError `protobuf:"varint,1,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description. + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // The encoded transaction that can be submitted to the network. + Encoded []byte `protobuf:"bytes,4,opt,name=encoded,proto3" json:"encoded,omitempty"` + // The transaction ID (hash). + Txid []byte `protobuf:"bytes,5,opt,name=txid,proto3" json:"txid,omitempty"` + // The total `vsize` in `vbytes`. + // It is used to compare how much blockweight needs to be allocated to confirm a transaction. + // For non-segwit transactions, `vsize` = `size`. + Vsize uint64 `protobuf:"varint,6,opt,name=vsize,proto3" json:"vsize,omitempty"` + // Transaction weight is defined as Base transaction size * 3 + Total transaction size + // (ie. the same method as calculating Block weight from Base size and Total size). + Weight uint64 `protobuf:"varint,7,opt,name=weight,proto3" json:"weight,omitempty"` + // The total and final fee of the transaction in satoshis. + Fee int64 `protobuf:"varint,8,opt,name=fee,proto3" json:"fee,omitempty"` + // Optional. Signed transaction serialized as PSBT. + // Set if `SigningInput.psbt` is used. + Psbt *Psbt `protobuf:"bytes,9,opt,name=psbt,proto3" json:"psbt,omitempty"` + // Resulting transaction. + // + // Types that are valid to be assigned to Transaction: + // + // *SigningOutput_Bitcoin + // *SigningOutput_Zcash + // *SigningOutput_Decred + Transaction isSigningOutput_Transaction `protobuf_oneof:"transaction"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_BitcoinV2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{10} +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetTxid() []byte { + if x != nil { + return x.Txid + } + return nil +} + +func (x *SigningOutput) GetVsize() uint64 { + if x != nil { + return x.Vsize + } + return 0 +} + +func (x *SigningOutput) GetWeight() uint64 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *SigningOutput) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *SigningOutput) GetPsbt() *Psbt { + if x != nil { + return x.Psbt + } + return nil +} + +func (x *SigningOutput) GetTransaction() isSigningOutput_Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningOutput) GetBitcoin() *utxo.Transaction { + if x != nil { + if x, ok := x.Transaction.(*SigningOutput_Bitcoin); ok { + return x.Bitcoin + } + } + return nil +} + +func (x *SigningOutput) GetZcash() *zcash.Transaction { + if x != nil { + if x, ok := x.Transaction.(*SigningOutput_Zcash); ok { + return x.Zcash + } + } + return nil +} + +func (x *SigningOutput) GetDecred() *decredv2.Transaction { + if x != nil { + if x, ok := x.Transaction.(*SigningOutput_Decred); ok { + return x.Decred + } + } + return nil +} + +type isSigningOutput_Transaction interface { + isSigningOutput_Transaction() +} + +type SigningOutput_Bitcoin struct { + // Standard Bitcoin transaction. + Bitcoin *utxo.Transaction `protobuf:"bytes,15,opt,name=bitcoin,proto3,oneof"` +} + +type SigningOutput_Zcash struct { + // ZCash transaction. + Zcash *zcash.Transaction `protobuf:"bytes,16,opt,name=zcash,proto3,oneof"` +} + +type SigningOutput_Decred struct { + // Decred transaction. + Decred *decredv2.Transaction `protobuf:"bytes,17,opt,name=decred,proto3,oneof"` +} + +func (*SigningOutput_Bitcoin) isSigningOutput_Transaction() {} + +func (*SigningOutput_Zcash) isSigningOutput_Transaction() {} + +func (*SigningOutput_Decred) isSigningOutput_Transaction() {} + +// Optional sequence number, used for timelocks, replace-by-fee, etc. +type Input_Sequence struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sequence uint32 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Input_Sequence) Reset() { + *x = Input_Sequence{} + mi := &file_BitcoinV2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Input_Sequence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input_Sequence) ProtoMessage() {} + +func (x *Input_Sequence) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Input_Sequence.ProtoReflect.Descriptor instead. +func (*Input_Sequence) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *Input_Sequence) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +type Input_InputBuilder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *Input_InputBuilder_P2Pk + // *Input_InputBuilder_P2Pkh + // *Input_InputBuilder_P2Wpkh + // *Input_InputBuilder_P2TrKeyPath + // *Input_InputBuilder_Brc20Inscribe + // *Input_InputBuilder_BabylonStakingTimelockPath + // *Input_InputBuilder_BabylonStakingUnbondingPath + // *Input_InputBuilder_BabylonStakingSlashingPath + // *Input_InputBuilder_BabylonUnbondingTimelockPath + // *Input_InputBuilder_BabylonUnbondingSlashingPath + Variant isInput_InputBuilder_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Input_InputBuilder) Reset() { + *x = Input_InputBuilder{} + mi := &file_BitcoinV2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Input_InputBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input_InputBuilder) ProtoMessage() {} + +func (x *Input_InputBuilder) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Input_InputBuilder.ProtoReflect.Descriptor instead. +func (*Input_InputBuilder) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *Input_InputBuilder) GetVariant() isInput_InputBuilder_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *Input_InputBuilder) GetP2Pk() []byte { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_P2Pk); ok { + return x.P2Pk + } + } + return nil +} + +func (x *Input_InputBuilder) GetP2Pkh() *PublicKeyOrHash { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_P2Pkh); ok { + return x.P2Pkh + } + } + return nil +} + +func (x *Input_InputBuilder) GetP2Wpkh() *PublicKeyOrHash { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_P2Wpkh); ok { + return x.P2Wpkh + } + } + return nil +} + +func (x *Input_InputBuilder) GetP2TrKeyPath() []byte { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_P2TrKeyPath); ok { + return x.P2TrKeyPath + } + } + return nil +} + +func (x *Input_InputBuilder) GetBrc20Inscribe() *Input_InputBrc20Inscription { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_Brc20Inscribe); ok { + return x.Brc20Inscribe + } + } + return nil +} + +func (x *Input_InputBuilder) GetBabylonStakingTimelockPath() *babylonstaking.InputBuilder_StakingTimelockPath { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_BabylonStakingTimelockPath); ok { + return x.BabylonStakingTimelockPath + } + } + return nil +} + +func (x *Input_InputBuilder) GetBabylonStakingUnbondingPath() *babylonstaking.InputBuilder_StakingUnbondingPath { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_BabylonStakingUnbondingPath); ok { + return x.BabylonStakingUnbondingPath + } + } + return nil +} + +func (x *Input_InputBuilder) GetBabylonStakingSlashingPath() *babylonstaking.InputBuilder_StakingSlashingPath { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_BabylonStakingSlashingPath); ok { + return x.BabylonStakingSlashingPath + } + } + return nil +} + +func (x *Input_InputBuilder) GetBabylonUnbondingTimelockPath() *babylonstaking.InputBuilder_UnbondingTimelockPath { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_BabylonUnbondingTimelockPath); ok { + return x.BabylonUnbondingTimelockPath + } + } + return nil +} + +func (x *Input_InputBuilder) GetBabylonUnbondingSlashingPath() *babylonstaking.InputBuilder_UnbondingSlashingPath { + if x != nil { + if x, ok := x.Variant.(*Input_InputBuilder_BabylonUnbondingSlashingPath); ok { + return x.BabylonUnbondingSlashingPath + } + } + return nil +} + +type isInput_InputBuilder_Variant interface { + isInput_InputBuilder_Variant() +} + +type Input_InputBuilder_P2Pk struct { + // Pay-to-Public-Key, specify the public key. + P2Pk []byte `protobuf:"bytes,2,opt,name=p2pk,proto3,oneof"` +} + +type Input_InputBuilder_P2Pkh struct { + // Pay-to-Public-Key-Hash, specify the public key. + P2Pkh *PublicKeyOrHash `protobuf:"bytes,3,opt,name=p2pkh,proto3,oneof"` +} + +type Input_InputBuilder_P2Wpkh struct { + // Pay-to-Public-Key-Hash, specify the public key. + P2Wpkh *PublicKeyOrHash `protobuf:"bytes,5,opt,name=p2wpkh,proto3,oneof"` +} + +type Input_InputBuilder_P2TrKeyPath struct { + // Pay-to-Taproot-key-path (balance transfers), specify the public key. + P2TrKeyPath []byte `protobuf:"bytes,7,opt,name=p2tr_key_path,json=p2trKeyPath,proto3,oneof"` +} + +type Input_InputBuilder_Brc20Inscribe struct { + // Create a BRC20 inscription. + Brc20Inscribe *Input_InputBrc20Inscription `protobuf:"bytes,9,opt,name=brc20_inscribe,json=brc20Inscribe,proto3,oneof"` +} + +type Input_InputBuilder_BabylonStakingTimelockPath struct { + // Spend a Staking Output via timelock path (staking time expired). + // In other words, create a Withdraw transaction. + BabylonStakingTimelockPath *babylonstaking.InputBuilder_StakingTimelockPath `protobuf:"bytes,15,opt,name=babylon_staking_timelock_path,json=babylonStakingTimelockPath,proto3,oneof"` +} + +type Input_InputBuilder_BabylonStakingUnbondingPath struct { + // Spend a Staking Output via unbonding path. + // In other words, create an Unbonding transaction. + BabylonStakingUnbondingPath *babylonstaking.InputBuilder_StakingUnbondingPath `protobuf:"bytes,16,opt,name=babylon_staking_unbonding_path,json=babylonStakingUnbondingPath,proto3,oneof"` +} + +type Input_InputBuilder_BabylonStakingSlashingPath struct { + // Spend a Staking Output via slashing path. + // In other words, generate an unsigned slashing transaction, pre-sign the staker's signature only and share to Babylon PoS chain. + BabylonStakingSlashingPath *babylonstaking.InputBuilder_StakingSlashingPath `protobuf:"bytes,17,opt,name=babylon_staking_slashing_path,json=babylonStakingSlashingPath,proto3,oneof"` +} + +type Input_InputBuilder_BabylonUnbondingTimelockPath struct { + // Spend an Unbonding Output via timelock path (unbonding time expired). + // In other words, create a Withdraw transaction spending an Unbonding transaction. + BabylonUnbondingTimelockPath *babylonstaking.InputBuilder_UnbondingTimelockPath `protobuf:"bytes,18,opt,name=babylon_unbonding_timelock_path,json=babylonUnbondingTimelockPath,proto3,oneof"` +} + +type Input_InputBuilder_BabylonUnbondingSlashingPath struct { + // Spend an Unbonding Output via slashing path. + // In other words, generate an unsigned Slashing transaction, pre-sign the staker's signature only and share to Babylon PoS chain. + BabylonUnbondingSlashingPath *babylonstaking.InputBuilder_UnbondingSlashingPath `protobuf:"bytes,19,opt,name=babylon_unbonding_slashing_path,json=babylonUnbondingSlashingPath,proto3,oneof"` +} + +func (*Input_InputBuilder_P2Pk) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_P2Pkh) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_P2Wpkh) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_P2TrKeyPath) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_Brc20Inscribe) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_BabylonStakingTimelockPath) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_BabylonStakingUnbondingPath) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_BabylonStakingSlashingPath) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_BabylonUnbondingTimelockPath) isInput_InputBuilder_Variant() {} + +func (*Input_InputBuilder_BabylonUnbondingSlashingPath) isInput_InputBuilder_Variant() {} + +type Input_InputTaprootScriptPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payload of the Taproot transaction. + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + // The control block of the Taproot transaction required for claiming. + ControlBlock []byte `protobuf:"bytes,3,opt,name=control_block,json=controlBlock,proto3" json:"control_block,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Input_InputTaprootScriptPath) Reset() { + *x = Input_InputTaprootScriptPath{} + mi := &file_BitcoinV2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Input_InputTaprootScriptPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input_InputTaprootScriptPath) ProtoMessage() {} + +func (x *Input_InputTaprootScriptPath) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Input_InputTaprootScriptPath.ProtoReflect.Descriptor instead. +func (*Input_InputTaprootScriptPath) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{2, 2} +} + +func (x *Input_InputTaprootScriptPath) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Input_InputTaprootScriptPath) GetControlBlock() []byte { + if x != nil { + return x.ControlBlock + } + return nil +} + +type Input_InputBrc20Inscription struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The recipient of the inscription, usually the sender. + InscribeTo []byte `protobuf:"bytes,2,opt,name=inscribe_to,json=inscribeTo,proto3" json:"inscribe_to,omitempty"` + // The ticker of the BRC20 inscription. + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // The BRC20 token transfer amount. + TransferAmount string `protobuf:"bytes,4,opt,name=transfer_amount,json=transferAmount,proto3" json:"transfer_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Input_InputBrc20Inscription) Reset() { + *x = Input_InputBrc20Inscription{} + mi := &file_BitcoinV2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Input_InputBrc20Inscription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Input_InputBrc20Inscription) ProtoMessage() {} + +func (x *Input_InputBrc20Inscription) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Input_InputBrc20Inscription.ProtoReflect.Descriptor instead. +func (*Input_InputBrc20Inscription) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{2, 3} +} + +func (x *Input_InputBrc20Inscription) GetInscribeTo() []byte { + if x != nil { + return x.InscribeTo + } + return nil +} + +func (x *Input_InputBrc20Inscription) GetTicker() string { + if x != nil { + return x.Ticker + } + return "" +} + +func (x *Input_InputBrc20Inscription) GetTransferAmount() string { + if x != nil { + return x.TransferAmount + } + return "" +} + +type Output_OutputBuilder struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *Output_OutputBuilder_P2Sh + // *Output_OutputBuilder_P2Pk + // *Output_OutputBuilder_P2Pkh + // *Output_OutputBuilder_P2Wsh + // *Output_OutputBuilder_P2Wpkh + // *Output_OutputBuilder_P2TrKeyPath + // *Output_OutputBuilder_P2TrScriptPath + // *Output_OutputBuilder_P2TrDangerousAssumeTweaked + // *Output_OutputBuilder_Brc20Inscribe + // *Output_OutputBuilder_OpReturn + // *Output_OutputBuilder_BabylonStaking + // *Output_OutputBuilder_BabylonUnbonding + // *Output_OutputBuilder_BabylonStakingOpReturn + Variant isOutput_OutputBuilder_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Output_OutputBuilder) Reset() { + *x = Output_OutputBuilder{} + mi := &file_BitcoinV2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Output_OutputBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output_OutputBuilder) ProtoMessage() {} + +func (x *Output_OutputBuilder) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output_OutputBuilder.ProtoReflect.Descriptor instead. +func (*Output_OutputBuilder) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Output_OutputBuilder) GetVariant() isOutput_OutputBuilder_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *Output_OutputBuilder) GetP2Sh() *Output_RedeemScriptOrHash { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2Sh); ok { + return x.P2Sh + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2Pk() []byte { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2Pk); ok { + return x.P2Pk + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2Pkh() *PublicKeyOrHash { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2Pkh); ok { + return x.P2Pkh + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2Wsh() *Output_RedeemScriptOrHash { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2Wsh); ok { + return x.P2Wsh + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2Wpkh() *PublicKeyOrHash { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2Wpkh); ok { + return x.P2Wpkh + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2TrKeyPath() []byte { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2TrKeyPath); ok { + return x.P2TrKeyPath + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2TrScriptPath() *Output_OutputTaprootScriptPath { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2TrScriptPath); ok { + return x.P2TrScriptPath + } + } + return nil +} + +func (x *Output_OutputBuilder) GetP2TrDangerousAssumeTweaked() []byte { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_P2TrDangerousAssumeTweaked); ok { + return x.P2TrDangerousAssumeTweaked + } + } + return nil +} + +func (x *Output_OutputBuilder) GetBrc20Inscribe() *Output_OutputBrc20Inscription { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_Brc20Inscribe); ok { + return x.Brc20Inscribe + } + } + return nil +} + +func (x *Output_OutputBuilder) GetOpReturn() []byte { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_OpReturn); ok { + return x.OpReturn + } + } + return nil +} + +func (x *Output_OutputBuilder) GetBabylonStaking() *babylonstaking.OutputBuilder_StakingOutput { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_BabylonStaking); ok { + return x.BabylonStaking + } + } + return nil +} + +func (x *Output_OutputBuilder) GetBabylonUnbonding() *babylonstaking.OutputBuilder_UnbondingOutput { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_BabylonUnbonding); ok { + return x.BabylonUnbonding + } + } + return nil +} + +func (x *Output_OutputBuilder) GetBabylonStakingOpReturn() *babylonstaking.OutputBuilder_OpReturn { + if x != nil { + if x, ok := x.Variant.(*Output_OutputBuilder_BabylonStakingOpReturn); ok { + return x.BabylonStakingOpReturn + } + } + return nil +} + +type isOutput_OutputBuilder_Variant interface { + isOutput_OutputBuilder_Variant() +} + +type Output_OutputBuilder_P2Sh struct { + // Pay-to-Script-Hash, specify the redeem script or its hash. + P2Sh *Output_RedeemScriptOrHash `protobuf:"bytes,1,opt,name=p2sh,proto3,oneof"` +} + +type Output_OutputBuilder_P2Pk struct { + // Pay-to-Public-Key, specify the public key. + P2Pk []byte `protobuf:"bytes,2,opt,name=p2pk,proto3,oneof"` +} + +type Output_OutputBuilder_P2Pkh struct { + // Pay-to-Public-Key-Hash, specify the public key or its hash. + P2Pkh *PublicKeyOrHash `protobuf:"bytes,3,opt,name=p2pkh,proto3,oneof"` +} + +type Output_OutputBuilder_P2Wsh struct { + // Pay-to-Witness-Script-Hash, specify the redeem script or its hash. + P2Wsh *Output_RedeemScriptOrHash `protobuf:"bytes,4,opt,name=p2wsh,proto3,oneof"` +} + +type Output_OutputBuilder_P2Wpkh struct { + // Pay-to-Public-Key-Hash, specify the public key or its hash. + P2Wpkh *PublicKeyOrHash `protobuf:"bytes,5,opt,name=p2wpkh,proto3,oneof"` +} + +type Output_OutputBuilder_P2TrKeyPath struct { + // Pay-to-Taproot-key-path (balance transfers), specify the public key. + P2TrKeyPath []byte `protobuf:"bytes,6,opt,name=p2tr_key_path,json=p2trKeyPath,proto3,oneof"` +} + +type Output_OutputBuilder_P2TrScriptPath struct { + // Pay-to-Taproot-script-path (complex transfers) + P2TrScriptPath *Output_OutputTaprootScriptPath `protobuf:"bytes,7,opt,name=p2tr_script_path,json=p2trScriptPath,proto3,oneof"` +} + +type Output_OutputBuilder_P2TrDangerousAssumeTweaked struct { + P2TrDangerousAssumeTweaked []byte `protobuf:"bytes,8,opt,name=p2tr_dangerous_assume_tweaked,json=p2trDangerousAssumeTweaked,proto3,oneof"` +} + +type Output_OutputBuilder_Brc20Inscribe struct { + Brc20Inscribe *Output_OutputBrc20Inscription `protobuf:"bytes,9,opt,name=brc20_inscribe,json=brc20Inscribe,proto3,oneof"` +} + +type Output_OutputBuilder_OpReturn struct { + // OP_RETURN output. In most cases, with a zero-amount. + OpReturn []byte `protobuf:"bytes,12,opt,name=op_return,json=opReturn,proto3,oneof"` +} + +type Output_OutputBuilder_BabylonStaking struct { + // Create a Babylon `Staking` output. + BabylonStaking *babylonstaking.OutputBuilder_StakingOutput `protobuf:"bytes,15,opt,name=babylon_staking,json=babylonStaking,proto3,oneof"` +} + +type Output_OutputBuilder_BabylonUnbonding struct { + // Create a Babylon `Unbonding` output. + BabylonUnbonding *babylonstaking.OutputBuilder_UnbondingOutput `protobuf:"bytes,16,opt,name=babylon_unbonding,json=babylonUnbonding,proto3,oneof"` +} + +type Output_OutputBuilder_BabylonStakingOpReturn struct { + // Create a Babylon `Staking` OP_RETURN output. + BabylonStakingOpReturn *babylonstaking.OutputBuilder_OpReturn `protobuf:"bytes,17,opt,name=babylon_staking_op_return,json=babylonStakingOpReturn,proto3,oneof"` +} + +func (*Output_OutputBuilder_P2Sh) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2Pk) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2Pkh) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2Wsh) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2Wpkh) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2TrKeyPath) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2TrScriptPath) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_P2TrDangerousAssumeTweaked) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_Brc20Inscribe) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_OpReturn) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_BabylonStaking) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_BabylonUnbonding) isOutput_OutputBuilder_Variant() {} + +func (*Output_OutputBuilder_BabylonStakingOpReturn) isOutput_OutputBuilder_Variant() {} + +// Either a redeem script or its hash. +type Output_RedeemScriptOrHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *Output_RedeemScriptOrHash_RedeemScript + // *Output_RedeemScriptOrHash_Hash + Variant isOutput_RedeemScriptOrHash_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Output_RedeemScriptOrHash) Reset() { + *x = Output_RedeemScriptOrHash{} + mi := &file_BitcoinV2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Output_RedeemScriptOrHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output_RedeemScriptOrHash) ProtoMessage() {} + +func (x *Output_RedeemScriptOrHash) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output_RedeemScriptOrHash.ProtoReflect.Descriptor instead. +func (*Output_RedeemScriptOrHash) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *Output_RedeemScriptOrHash) GetVariant() isOutput_RedeemScriptOrHash_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *Output_RedeemScriptOrHash) GetRedeemScript() []byte { + if x != nil { + if x, ok := x.Variant.(*Output_RedeemScriptOrHash_RedeemScript); ok { + return x.RedeemScript + } + } + return nil +} + +func (x *Output_RedeemScriptOrHash) GetHash() []byte { + if x != nil { + if x, ok := x.Variant.(*Output_RedeemScriptOrHash_Hash); ok { + return x.Hash + } + } + return nil +} + +type isOutput_RedeemScriptOrHash_Variant interface { + isOutput_RedeemScriptOrHash_Variant() +} + +type Output_RedeemScriptOrHash_RedeemScript struct { + // Redeem script bytes. + RedeemScript []byte `protobuf:"bytes,1,opt,name=redeem_script,json=redeemScript,proto3,oneof"` +} + +type Output_RedeemScriptOrHash_Hash struct { + // Public key hash. + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3,oneof"` +} + +func (*Output_RedeemScriptOrHash_RedeemScript) isOutput_RedeemScriptOrHash_Variant() {} + +func (*Output_RedeemScriptOrHash_Hash) isOutput_RedeemScriptOrHash_Variant() {} + +type Output_OutputTaprootScriptPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The internal key, usually the public key of the recipient. + InternalKey []byte `protobuf:"bytes,1,opt,name=internal_key,json=internalKey,proto3" json:"internal_key,omitempty"` + // The merkle root of the Taproot script(s), required to compute the sighash. + MerkleRoot []byte `protobuf:"bytes,2,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Output_OutputTaprootScriptPath) Reset() { + *x = Output_OutputTaprootScriptPath{} + mi := &file_BitcoinV2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Output_OutputTaprootScriptPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output_OutputTaprootScriptPath) ProtoMessage() {} + +func (x *Output_OutputTaprootScriptPath) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output_OutputTaprootScriptPath.ProtoReflect.Descriptor instead. +func (*Output_OutputTaprootScriptPath) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{3, 2} +} + +func (x *Output_OutputTaprootScriptPath) GetInternalKey() []byte { + if x != nil { + return x.InternalKey + } + return nil +} + +func (x *Output_OutputTaprootScriptPath) GetMerkleRoot() []byte { + if x != nil { + return x.MerkleRoot + } + return nil +} + +type Output_OutputBrc20Inscription struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The recipient of the inscription, usually the sender. + InscribeTo []byte `protobuf:"bytes,1,opt,name=inscribe_to,json=inscribeTo,proto3" json:"inscribe_to,omitempty"` + // The ticker of the BRC20 inscription. + Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` + // The BRC20 token transfer amount. + TransferAmount string `protobuf:"bytes,3,opt,name=transfer_amount,json=transferAmount,proto3" json:"transfer_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Output_OutputBrc20Inscription) Reset() { + *x = Output_OutputBrc20Inscription{} + mi := &file_BitcoinV2_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Output_OutputBrc20Inscription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Output_OutputBrc20Inscription) ProtoMessage() {} + +func (x *Output_OutputBrc20Inscription) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Output_OutputBrc20Inscription.ProtoReflect.Descriptor instead. +func (*Output_OutputBrc20Inscription) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{3, 3} +} + +func (x *Output_OutputBrc20Inscription) GetInscribeTo() []byte { + if x != nil { + return x.InscribeTo + } + return nil +} + +func (x *Output_OutputBrc20Inscription) GetTicker() string { + if x != nil { + return x.Ticker + } + return "" +} + +func (x *Output_OutputBrc20Inscription) GetTransferAmount() string { + if x != nil { + return x.TransferAmount + } + return "" +} + +type PreSigningOutput_Sighash struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Public key used for signing. + // Please note it can be tweaked in case of P2TR scriptPubkey. + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The sighash to be signed. + Sighash []byte `protobuf:"bytes,2,opt,name=sighash,proto3" json:"sighash,omitempty"` + // Signing method to be used to sign the sighash. + SigningMethod PreSigningOutput_SigningMethod `protobuf:"varint,3,opt,name=signing_method,json=signingMethod,proto3,enum=TW.BitcoinV2.Proto.PreSigningOutput_SigningMethod" json:"signing_method,omitempty"` + // Taproot tweak if `Taproot` signing method is used. + // Empty if there is no need to tweak the private to sign the sighash. + Tweak *PreSigningOutput_TaprootTweak `protobuf:"bytes,4,opt,name=tweak,proto3" json:"tweak,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreSigningOutput_Sighash) Reset() { + *x = PreSigningOutput_Sighash{} + mi := &file_BitcoinV2_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreSigningOutput_Sighash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreSigningOutput_Sighash) ProtoMessage() {} + +func (x *PreSigningOutput_Sighash) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreSigningOutput_Sighash.ProtoReflect.Descriptor instead. +func (*PreSigningOutput_Sighash) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *PreSigningOutput_Sighash) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *PreSigningOutput_Sighash) GetSighash() []byte { + if x != nil { + return x.Sighash + } + return nil +} + +func (x *PreSigningOutput_Sighash) GetSigningMethod() PreSigningOutput_SigningMethod { + if x != nil { + return x.SigningMethod + } + return PreSigningOutput_Legacy +} + +func (x *PreSigningOutput_Sighash) GetTweak() *PreSigningOutput_TaprootTweak { + if x != nil { + return x.Tweak + } + return nil +} + +type PreSigningOutput_TaprootTweak struct { + state protoimpl.MessageState `protogen:"open.v1"` + // 32 bytes merkle root of the script tree. + // Empty if there are no scripts, and the private key should be tweaked without a merkle root. + MerkleRoot []byte `protobuf:"bytes,1,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreSigningOutput_TaprootTweak) Reset() { + *x = PreSigningOutput_TaprootTweak{} + mi := &file_BitcoinV2_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreSigningOutput_TaprootTweak) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreSigningOutput_TaprootTweak) ProtoMessage() {} + +func (x *PreSigningOutput_TaprootTweak) ProtoReflect() protoreflect.Message { + mi := &file_BitcoinV2_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreSigningOutput_TaprootTweak.ProtoReflect.Descriptor instead. +func (*PreSigningOutput_TaprootTweak) Descriptor() ([]byte, []int) { + return file_BitcoinV2_proto_rawDescGZIP(), []int{9, 1} +} + +func (x *PreSigningOutput_TaprootTweak) GetMerkleRoot() []byte { + if x != nil { + return x.MerkleRoot + } + return nil +} + +var File_BitcoinV2_proto protoreflect.FileDescriptor + +const file_BitcoinV2_proto_rawDesc = "" + + "\n" + + "\x0fBitcoinV2.proto\x12\x12TW.BitcoinV2.Proto\x1a\x14BabylonStaking.proto\x1a\fCommon.proto\x1a\x0eDecredV2.proto\x1a\n" + + "Utxo.proto\x1a\vZcash.proto\"L\n" + + "\x0fPublicKeyOrHash\x12\x18\n" + + "\x06pubkey\x18\x01 \x01(\fH\x00R\x06pubkey\x12\x14\n" + + "\x04hash\x18\x02 \x01(\fH\x00R\x04hashB\t\n" + + "\avariant\"Q\n" + + "\x12PublicKeySignature\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\fR\tpublicKey\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\"\xa6\f\n" + + "\x05Input\x124\n" + + "\tout_point\x18\x01 \x01(\v2\x17.TW.Utxo.Proto.OutPointR\boutPoint\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value\x12!\n" + + "\fsighash_type\x18\x03 \x01(\rR\vsighashType\x12>\n" + + "\bsequence\x18\x04 \x01(\v2\".TW.BitcoinV2.Proto.Input.SequenceR\bsequence\x12O\n" + + "\x0escript_builder\x18\x05 \x01(\v2&.TW.BitcoinV2.Proto.Input.InputBuilderH\x00R\rscriptBuilder\x12!\n" + + "\vscript_data\x18\x06 \x01(\fH\x00R\n" + + "scriptData\x12+\n" + + "\x10receiver_address\x18\a \x01(\tH\x00R\x0freceiverAddress\x1a&\n" + + "\bSequence\x12\x1a\n" + + "\bsequence\x18\x01 \x01(\rR\bsequence\x1a\xbd\a\n" + + "\fInputBuilder\x12\x14\n" + + "\x04p2pk\x18\x02 \x01(\fH\x00R\x04p2pk\x12;\n" + + "\x05p2pkh\x18\x03 \x01(\v2#.TW.BitcoinV2.Proto.PublicKeyOrHashH\x00R\x05p2pkh\x12=\n" + + "\x06p2wpkh\x18\x05 \x01(\v2#.TW.BitcoinV2.Proto.PublicKeyOrHashH\x00R\x06p2wpkh\x12$\n" + + "\rp2tr_key_path\x18\a \x01(\fH\x00R\vp2trKeyPath\x12X\n" + + "\x0ebrc20_inscribe\x18\t \x01(\v2/.TW.BitcoinV2.Proto.Input.InputBrc20InscriptionH\x00R\rbrc20Inscribe\x12~\n" + + "\x1dbabylon_staking_timelock_path\x18\x0f \x01(\v29.TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPathH\x00R\x1ababylonStakingTimelockPath\x12\x81\x01\n" + + "\x1ebabylon_staking_unbonding_path\x18\x10 \x01(\v2:.TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPathH\x00R\x1bbabylonStakingUnbondingPath\x12~\n" + + "\x1dbabylon_staking_slashing_path\x18\x11 \x01(\v29.TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPathH\x00R\x1ababylonStakingSlashingPath\x12\x84\x01\n" + + "\x1fbabylon_unbonding_timelock_path\x18\x12 \x01(\v2;.TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPathH\x00R\x1cbabylonUnbondingTimelockPath\x12\x84\x01\n" + + "\x1fbabylon_unbonding_slashing_path\x18\x13 \x01(\v2;.TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPathH\x00R\x1cbabylonUnbondingSlashingPathB\t\n" + + "\avariant\x1aW\n" + + "\x16InputTaprootScriptPath\x12\x18\n" + + "\apayload\x18\x02 \x01(\fR\apayload\x12#\n" + + "\rcontrol_block\x18\x03 \x01(\fR\fcontrolBlock\x1ay\n" + + "\x15InputBrc20Inscription\x12\x1f\n" + + "\vinscribe_to\x18\x02 \x01(\fR\n" + + "inscribeTo\x12\x16\n" + + "\x06ticker\x18\x03 \x01(\tR\x06ticker\x12'\n" + + "\x0ftransfer_amount\x18\x04 \x01(\tR\x0etransferAmountB\x11\n" + + "\x0fclaiming_script\"\xb9\v\n" + + "\x06Output\x12\x14\n" + + "\x05value\x18\x01 \x01(\x03R\x05value\x12D\n" + + "\abuilder\x18\x02 \x01(\v2(.TW.BitcoinV2.Proto.Output.OutputBuilderH\x00R\abuilder\x122\n" + + "\x14custom_script_pubkey\x18\x03 \x01(\fH\x00R\x12customScriptPubkey\x12\x1f\n" + + "\n" + + "to_address\x18\x04 \x01(\tH\x00R\ttoAddress\x1a\xb4\a\n" + + "\rOutputBuilder\x12C\n" + + "\x04p2sh\x18\x01 \x01(\v2-.TW.BitcoinV2.Proto.Output.RedeemScriptOrHashH\x00R\x04p2sh\x12\x14\n" + + "\x04p2pk\x18\x02 \x01(\fH\x00R\x04p2pk\x12;\n" + + "\x05p2pkh\x18\x03 \x01(\v2#.TW.BitcoinV2.Proto.PublicKeyOrHashH\x00R\x05p2pkh\x12E\n" + + "\x05p2wsh\x18\x04 \x01(\v2-.TW.BitcoinV2.Proto.Output.RedeemScriptOrHashH\x00R\x05p2wsh\x12=\n" + + "\x06p2wpkh\x18\x05 \x01(\v2#.TW.BitcoinV2.Proto.PublicKeyOrHashH\x00R\x06p2wpkh\x12$\n" + + "\rp2tr_key_path\x18\x06 \x01(\fH\x00R\vp2trKeyPath\x12^\n" + + "\x10p2tr_script_path\x18\a \x01(\v22.TW.BitcoinV2.Proto.Output.OutputTaprootScriptPathH\x00R\x0ep2trScriptPath\x12C\n" + + "\x1dp2tr_dangerous_assume_tweaked\x18\b \x01(\fH\x00R\x1ap2trDangerousAssumeTweaked\x12Z\n" + + "\x0ebrc20_inscribe\x18\t \x01(\v21.TW.BitcoinV2.Proto.Output.OutputBrc20InscriptionH\x00R\rbrc20Inscribe\x12\x1d\n" + + "\top_return\x18\f \x01(\fH\x00R\bopReturn\x12_\n" + + "\x0fbabylon_staking\x18\x0f \x01(\v24.TW.BabylonStaking.Proto.OutputBuilder.StakingOutputH\x00R\x0ebabylonStaking\x12e\n" + + "\x11babylon_unbonding\x18\x10 \x01(\v26.TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutputH\x00R\x10babylonUnbonding\x12l\n" + + "\x19babylon_staking_op_return\x18\x11 \x01(\v2/.TW.BabylonStaking.Proto.OutputBuilder.OpReturnH\x00R\x16babylonStakingOpReturnB\t\n" + + "\avariant\x1a\\\n" + + "\x12RedeemScriptOrHash\x12%\n" + + "\rredeem_script\x18\x01 \x01(\fH\x00R\fredeemScript\x12\x14\n" + + "\x04hash\x18\x02 \x01(\fH\x00R\x04hashB\t\n" + + "\avariant\x1a]\n" + + "\x17OutputTaprootScriptPath\x12!\n" + + "\finternal_key\x18\x01 \x01(\fR\vinternalKey\x12\x1f\n" + + "\vmerkle_root\x18\x02 \x01(\fR\n" + + "merkleRoot\x1az\n" + + "\x16OutputBrc20Inscription\x12\x1f\n" + + "\vinscribe_to\x18\x01 \x01(\fR\n" + + "inscribeTo\x12\x16\n" + + "\x06ticker\x18\x02 \x01(\tR\x06ticker\x12'\n" + + "\x0ftransfer_amount\x18\x03 \x01(\tR\x0etransferAmountB\x0e\n" + + "\fto_recipient\"a\n" + + "\tChainInfo\x12!\n" + + "\fp2pkh_prefix\x18\x01 \x01(\rR\vp2pkhPrefix\x12\x1f\n" + + "\vp2sh_prefix\x18\x02 \x01(\rR\n" + + "p2shPrefix\x12\x10\n" + + "\x03hrp\x18\x03 \x01(\tR\x03hrp\"\xfb\x04\n" + + "\x12TransactionBuilder\x12@\n" + + "\aversion\x18\x01 \x01(\x0e2&.TW.BitcoinV2.Proto.TransactionVersionR\aversion\x12\x1b\n" + + "\tlock_time\x18\x02 \x01(\rR\blockTime\x121\n" + + "\x06inputs\x18\x03 \x03(\v2\x19.TW.BitcoinV2.Proto.InputR\x06inputs\x124\n" + + "\aoutputs\x18\x04 \x03(\v2\x1a.TW.BitcoinV2.Proto.OutputR\aoutputs\x12H\n" + + "\x0einput_selector\x18\x05 \x01(\x0e2!.TW.BitcoinV2.Proto.InputSelectorR\rinputSelector\x12\x1c\n" + + "\n" + + "fee_per_vb\x18\x06 \x01(\x03R\bfeePerVb\x12?\n" + + "\rchange_output\x18\a \x01(\v2\x1a.TW.BitcoinV2.Proto.OutputR\fchangeOutput\x12F\n" + + "\x11max_amount_output\x18\b \x01(\v2\x1a.TW.BitcoinV2.Proto.OutputR\x0fmaxAmountOutput\x122\n" + + "\x14fixed_dust_threshold\x18\n" + + " \x01(\x03H\x00R\x12fixedDustThreshold\x12W\n" + + "\x10zcash_extra_data\x18\x14 \x01(\v2+.TW.Zcash.Proto.TransactionBuilderExtraDataH\x01R\x0ezcashExtraDataB\r\n" + + "\vdust_policyB\x10\n" + + "\x0echain_specific\"\x1a\n" + + "\x04Psbt\x12\x12\n" + + "\x04psbt\x18\x01 \x01(\fR\x04psbt\"\xd9\x02\n" + + "\fSigningInput\x12!\n" + + "\fprivate_keys\x18\x01 \x03(\fR\vprivateKeys\x12\x1f\n" + + "\vpublic_keys\x18\x02 \x03(\fR\n" + + "publicKeys\x12<\n" + + "\n" + + "chain_info\x18\x03 \x01(\v2\x1d.TW.BitcoinV2.Proto.ChainInfoR\tchainInfo\x12D\n" + + "\x1fdangerous_use_fixed_schnorr_rng\x18\x04 \x01(\bR\x1bdangerousUseFixedSchnorrRng\x12B\n" + + "\abuilder\x18\n" + + " \x01(\v2&.TW.BitcoinV2.Proto.TransactionBuilderH\x00R\abuilder\x12.\n" + + "\x04psbt\x18\v \x01(\v2\x18.TW.BitcoinV2.Proto.PsbtH\x00R\x04psbtB\r\n" + + "\vtransaction\"\x82\x03\n" + + "\x0fTransactionPlan\x123\n" + + "\x05error\x18\x01 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x121\n" + + "\x06inputs\x18\x03 \x03(\v2\x19.TW.BitcoinV2.Proto.InputR\x06inputs\x124\n" + + "\aoutputs\x18\x04 \x03(\v2\x1a.TW.BitcoinV2.Proto.OutputR\aoutputs\x12)\n" + + "\x10available_amount\x18\x05 \x01(\x03R\x0favailableAmount\x12\x1f\n" + + "\vsend_amount\x18\x06 \x01(\x03R\n" + + "sendAmount\x12%\n" + + "\x0evsize_estimate\x18\a \x01(\x04R\rvsizeEstimate\x12!\n" + + "\ffee_estimate\x18\b \x01(\x03R\vfeeEstimate\x12\x16\n" + + "\x06change\x18\t \x01(\x03R\x06change\"\x88\x04\n" + + "\x10PreSigningOutput\x123\n" + + "\x05error\x18\x01 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12J\n" + + "\tsighashes\x18\x04 \x03(\v2,.TW.BitcoinV2.Proto.PreSigningOutput.SighashR\tsighashes\x1a\xe6\x01\n" + + "\aSighash\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\fR\tpublicKey\x12\x18\n" + + "\asighash\x18\x02 \x01(\fR\asighash\x12Y\n" + + "\x0esigning_method\x18\x03 \x01(\x0e22.TW.BitcoinV2.Proto.PreSigningOutput.SigningMethodR\rsigningMethod\x12G\n" + + "\x05tweak\x18\x04 \x01(\v21.TW.BitcoinV2.Proto.PreSigningOutput.TaprootTweakR\x05tweak\x1a/\n" + + "\fTaprootTweak\x12\x1f\n" + + "\vmerkle_root\x18\x01 \x01(\fR\n" + + "merkleRoot\"4\n" + + "\rSigningMethod\x12\n" + + "\n" + + "\x06Legacy\x10\x00\x12\n" + + "\n" + + "\x06Segwit\x10\x01\x12\v\n" + + "\aTaproot\x10\x02\"\xbb\x03\n" + + "\rSigningOutput\x123\n" + + "\x05error\x18\x01 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12\x18\n" + + "\aencoded\x18\x04 \x01(\fR\aencoded\x12\x12\n" + + "\x04txid\x18\x05 \x01(\fR\x04txid\x12\x14\n" + + "\x05vsize\x18\x06 \x01(\x04R\x05vsize\x12\x16\n" + + "\x06weight\x18\a \x01(\x04R\x06weight\x12\x10\n" + + "\x03fee\x18\b \x01(\x03R\x03fee\x12,\n" + + "\x04psbt\x18\t \x01(\v2\x18.TW.BitcoinV2.Proto.PsbtR\x04psbt\x126\n" + + "\abitcoin\x18\x0f \x01(\v2\x1a.TW.Utxo.Proto.TransactionH\x00R\abitcoin\x123\n" + + "\x05zcash\x18\x10 \x01(\v2\x1b.TW.Zcash.Proto.TransactionH\x00R\x05zcash\x128\n" + + "\x06decred\x18\x11 \x01(\v2\x1e.TW.DecredV2.Proto.TransactionH\x00R\x06decredB\r\n" + + "\vtransaction*Y\n" + + "\rInputSelector\x12\x13\n" + + "\x0fSelectAscending\x10\x00\x12\x11\n" + + "\rSelectInOrder\x10\x01\x12\x14\n" + + "\x10SelectDescending\x10\x02\x12\n" + + "\n" + + "\x06UseAll\x10\n" + + "*4\n" + + "\x12TransactionVersion\x12\x0e\n" + + "\n" + + "UseDefault\x10\x00\x12\x06\n" + + "\x02V1\x10\x01\x12\x06\n" + + "\x02V2\x10\x02B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_BitcoinV2_proto_rawDescOnce sync.Once + file_BitcoinV2_proto_rawDescData []byte +) + +func file_BitcoinV2_proto_rawDescGZIP() []byte { + file_BitcoinV2_proto_rawDescOnce.Do(func() { + file_BitcoinV2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_BitcoinV2_proto_rawDesc), len(file_BitcoinV2_proto_rawDesc))) + }) + return file_BitcoinV2_proto_rawDescData +} + +var file_BitcoinV2_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_BitcoinV2_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_BitcoinV2_proto_goTypes = []any{ + (InputSelector)(0), // 0: TW.BitcoinV2.Proto.InputSelector + (TransactionVersion)(0), // 1: TW.BitcoinV2.Proto.TransactionVersion + (PreSigningOutput_SigningMethod)(0), // 2: TW.BitcoinV2.Proto.PreSigningOutput.SigningMethod + (*PublicKeyOrHash)(nil), // 3: TW.BitcoinV2.Proto.PublicKeyOrHash + (*PublicKeySignature)(nil), // 4: TW.BitcoinV2.Proto.PublicKeySignature + (*Input)(nil), // 5: TW.BitcoinV2.Proto.Input + (*Output)(nil), // 6: TW.BitcoinV2.Proto.Output + (*ChainInfo)(nil), // 7: TW.BitcoinV2.Proto.ChainInfo + (*TransactionBuilder)(nil), // 8: TW.BitcoinV2.Proto.TransactionBuilder + (*Psbt)(nil), // 9: TW.BitcoinV2.Proto.Psbt + (*SigningInput)(nil), // 10: TW.BitcoinV2.Proto.SigningInput + (*TransactionPlan)(nil), // 11: TW.BitcoinV2.Proto.TransactionPlan + (*PreSigningOutput)(nil), // 12: TW.BitcoinV2.Proto.PreSigningOutput + (*SigningOutput)(nil), // 13: TW.BitcoinV2.Proto.SigningOutput + (*Input_Sequence)(nil), // 14: TW.BitcoinV2.Proto.Input.Sequence + (*Input_InputBuilder)(nil), // 15: TW.BitcoinV2.Proto.Input.InputBuilder + (*Input_InputTaprootScriptPath)(nil), // 16: TW.BitcoinV2.Proto.Input.InputTaprootScriptPath + (*Input_InputBrc20Inscription)(nil), // 17: TW.BitcoinV2.Proto.Input.InputBrc20Inscription + (*Output_OutputBuilder)(nil), // 18: TW.BitcoinV2.Proto.Output.OutputBuilder + (*Output_RedeemScriptOrHash)(nil), // 19: TW.BitcoinV2.Proto.Output.RedeemScriptOrHash + (*Output_OutputTaprootScriptPath)(nil), // 20: TW.BitcoinV2.Proto.Output.OutputTaprootScriptPath + (*Output_OutputBrc20Inscription)(nil), // 21: TW.BitcoinV2.Proto.Output.OutputBrc20Inscription + (*PreSigningOutput_Sighash)(nil), // 22: TW.BitcoinV2.Proto.PreSigningOutput.Sighash + (*PreSigningOutput_TaprootTweak)(nil), // 23: TW.BitcoinV2.Proto.PreSigningOutput.TaprootTweak + (*utxo.OutPoint)(nil), // 24: TW.Utxo.Proto.OutPoint + (*zcash.TransactionBuilderExtraData)(nil), // 25: TW.Zcash.Proto.TransactionBuilderExtraData + (common.SigningError)(0), // 26: TW.Common.Proto.SigningError + (*utxo.Transaction)(nil), // 27: TW.Utxo.Proto.Transaction + (*zcash.Transaction)(nil), // 28: TW.Zcash.Proto.Transaction + (*decredv2.Transaction)(nil), // 29: TW.DecredV2.Proto.Transaction + (*babylonstaking.InputBuilder_StakingTimelockPath)(nil), // 30: TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath + (*babylonstaking.InputBuilder_StakingUnbondingPath)(nil), // 31: TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath + (*babylonstaking.InputBuilder_StakingSlashingPath)(nil), // 32: TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath + (*babylonstaking.InputBuilder_UnbondingTimelockPath)(nil), // 33: TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath + (*babylonstaking.InputBuilder_UnbondingSlashingPath)(nil), // 34: TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath + (*babylonstaking.OutputBuilder_StakingOutput)(nil), // 35: TW.BabylonStaking.Proto.OutputBuilder.StakingOutput + (*babylonstaking.OutputBuilder_UnbondingOutput)(nil), // 36: TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput + (*babylonstaking.OutputBuilder_OpReturn)(nil), // 37: TW.BabylonStaking.Proto.OutputBuilder.OpReturn +} +var file_BitcoinV2_proto_depIdxs = []int32{ + 24, // 0: TW.BitcoinV2.Proto.Input.out_point:type_name -> TW.Utxo.Proto.OutPoint + 14, // 1: TW.BitcoinV2.Proto.Input.sequence:type_name -> TW.BitcoinV2.Proto.Input.Sequence + 15, // 2: TW.BitcoinV2.Proto.Input.script_builder:type_name -> TW.BitcoinV2.Proto.Input.InputBuilder + 18, // 3: TW.BitcoinV2.Proto.Output.builder:type_name -> TW.BitcoinV2.Proto.Output.OutputBuilder + 1, // 4: TW.BitcoinV2.Proto.TransactionBuilder.version:type_name -> TW.BitcoinV2.Proto.TransactionVersion + 5, // 5: TW.BitcoinV2.Proto.TransactionBuilder.inputs:type_name -> TW.BitcoinV2.Proto.Input + 6, // 6: TW.BitcoinV2.Proto.TransactionBuilder.outputs:type_name -> TW.BitcoinV2.Proto.Output + 0, // 7: TW.BitcoinV2.Proto.TransactionBuilder.input_selector:type_name -> TW.BitcoinV2.Proto.InputSelector + 6, // 8: TW.BitcoinV2.Proto.TransactionBuilder.change_output:type_name -> TW.BitcoinV2.Proto.Output + 6, // 9: TW.BitcoinV2.Proto.TransactionBuilder.max_amount_output:type_name -> TW.BitcoinV2.Proto.Output + 25, // 10: TW.BitcoinV2.Proto.TransactionBuilder.zcash_extra_data:type_name -> TW.Zcash.Proto.TransactionBuilderExtraData + 7, // 11: TW.BitcoinV2.Proto.SigningInput.chain_info:type_name -> TW.BitcoinV2.Proto.ChainInfo + 8, // 12: TW.BitcoinV2.Proto.SigningInput.builder:type_name -> TW.BitcoinV2.Proto.TransactionBuilder + 9, // 13: TW.BitcoinV2.Proto.SigningInput.psbt:type_name -> TW.BitcoinV2.Proto.Psbt + 26, // 14: TW.BitcoinV2.Proto.TransactionPlan.error:type_name -> TW.Common.Proto.SigningError + 5, // 15: TW.BitcoinV2.Proto.TransactionPlan.inputs:type_name -> TW.BitcoinV2.Proto.Input + 6, // 16: TW.BitcoinV2.Proto.TransactionPlan.outputs:type_name -> TW.BitcoinV2.Proto.Output + 26, // 17: TW.BitcoinV2.Proto.PreSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 22, // 18: TW.BitcoinV2.Proto.PreSigningOutput.sighashes:type_name -> TW.BitcoinV2.Proto.PreSigningOutput.Sighash + 26, // 19: TW.BitcoinV2.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 9, // 20: TW.BitcoinV2.Proto.SigningOutput.psbt:type_name -> TW.BitcoinV2.Proto.Psbt + 27, // 21: TW.BitcoinV2.Proto.SigningOutput.bitcoin:type_name -> TW.Utxo.Proto.Transaction + 28, // 22: TW.BitcoinV2.Proto.SigningOutput.zcash:type_name -> TW.Zcash.Proto.Transaction + 29, // 23: TW.BitcoinV2.Proto.SigningOutput.decred:type_name -> TW.DecredV2.Proto.Transaction + 3, // 24: TW.BitcoinV2.Proto.Input.InputBuilder.p2pkh:type_name -> TW.BitcoinV2.Proto.PublicKeyOrHash + 3, // 25: TW.BitcoinV2.Proto.Input.InputBuilder.p2wpkh:type_name -> TW.BitcoinV2.Proto.PublicKeyOrHash + 17, // 26: TW.BitcoinV2.Proto.Input.InputBuilder.brc20_inscribe:type_name -> TW.BitcoinV2.Proto.Input.InputBrc20Inscription + 30, // 27: TW.BitcoinV2.Proto.Input.InputBuilder.babylon_staking_timelock_path:type_name -> TW.BabylonStaking.Proto.InputBuilder.StakingTimelockPath + 31, // 28: TW.BitcoinV2.Proto.Input.InputBuilder.babylon_staking_unbonding_path:type_name -> TW.BabylonStaking.Proto.InputBuilder.StakingUnbondingPath + 32, // 29: TW.BitcoinV2.Proto.Input.InputBuilder.babylon_staking_slashing_path:type_name -> TW.BabylonStaking.Proto.InputBuilder.StakingSlashingPath + 33, // 30: TW.BitcoinV2.Proto.Input.InputBuilder.babylon_unbonding_timelock_path:type_name -> TW.BabylonStaking.Proto.InputBuilder.UnbondingTimelockPath + 34, // 31: TW.BitcoinV2.Proto.Input.InputBuilder.babylon_unbonding_slashing_path:type_name -> TW.BabylonStaking.Proto.InputBuilder.UnbondingSlashingPath + 19, // 32: TW.BitcoinV2.Proto.Output.OutputBuilder.p2sh:type_name -> TW.BitcoinV2.Proto.Output.RedeemScriptOrHash + 3, // 33: TW.BitcoinV2.Proto.Output.OutputBuilder.p2pkh:type_name -> TW.BitcoinV2.Proto.PublicKeyOrHash + 19, // 34: TW.BitcoinV2.Proto.Output.OutputBuilder.p2wsh:type_name -> TW.BitcoinV2.Proto.Output.RedeemScriptOrHash + 3, // 35: TW.BitcoinV2.Proto.Output.OutputBuilder.p2wpkh:type_name -> TW.BitcoinV2.Proto.PublicKeyOrHash + 20, // 36: TW.BitcoinV2.Proto.Output.OutputBuilder.p2tr_script_path:type_name -> TW.BitcoinV2.Proto.Output.OutputTaprootScriptPath + 21, // 37: TW.BitcoinV2.Proto.Output.OutputBuilder.brc20_inscribe:type_name -> TW.BitcoinV2.Proto.Output.OutputBrc20Inscription + 35, // 38: TW.BitcoinV2.Proto.Output.OutputBuilder.babylon_staking:type_name -> TW.BabylonStaking.Proto.OutputBuilder.StakingOutput + 36, // 39: TW.BitcoinV2.Proto.Output.OutputBuilder.babylon_unbonding:type_name -> TW.BabylonStaking.Proto.OutputBuilder.UnbondingOutput + 37, // 40: TW.BitcoinV2.Proto.Output.OutputBuilder.babylon_staking_op_return:type_name -> TW.BabylonStaking.Proto.OutputBuilder.OpReturn + 2, // 41: TW.BitcoinV2.Proto.PreSigningOutput.Sighash.signing_method:type_name -> TW.BitcoinV2.Proto.PreSigningOutput.SigningMethod + 23, // 42: TW.BitcoinV2.Proto.PreSigningOutput.Sighash.tweak:type_name -> TW.BitcoinV2.Proto.PreSigningOutput.TaprootTweak + 43, // [43:43] is the sub-list for method output_type + 43, // [43:43] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name +} + +func init() { file_BitcoinV2_proto_init() } +func file_BitcoinV2_proto_init() { + if File_BitcoinV2_proto != nil { + return + } + file_BitcoinV2_proto_msgTypes[0].OneofWrappers = []any{ + (*PublicKeyOrHash_Pubkey)(nil), + (*PublicKeyOrHash_Hash)(nil), + } + file_BitcoinV2_proto_msgTypes[2].OneofWrappers = []any{ + (*Input_ScriptBuilder)(nil), + (*Input_ScriptData)(nil), + (*Input_ReceiverAddress)(nil), + } + file_BitcoinV2_proto_msgTypes[3].OneofWrappers = []any{ + (*Output_Builder)(nil), + (*Output_CustomScriptPubkey)(nil), + (*Output_ToAddress)(nil), + } + file_BitcoinV2_proto_msgTypes[5].OneofWrappers = []any{ + (*TransactionBuilder_FixedDustThreshold)(nil), + (*TransactionBuilder_ZcashExtraData)(nil), + } + file_BitcoinV2_proto_msgTypes[7].OneofWrappers = []any{ + (*SigningInput_Builder)(nil), + (*SigningInput_Psbt)(nil), + } + file_BitcoinV2_proto_msgTypes[10].OneofWrappers = []any{ + (*SigningOutput_Bitcoin)(nil), + (*SigningOutput_Zcash)(nil), + (*SigningOutput_Decred)(nil), + } + file_BitcoinV2_proto_msgTypes[12].OneofWrappers = []any{ + (*Input_InputBuilder_P2Pk)(nil), + (*Input_InputBuilder_P2Pkh)(nil), + (*Input_InputBuilder_P2Wpkh)(nil), + (*Input_InputBuilder_P2TrKeyPath)(nil), + (*Input_InputBuilder_Brc20Inscribe)(nil), + (*Input_InputBuilder_BabylonStakingTimelockPath)(nil), + (*Input_InputBuilder_BabylonStakingUnbondingPath)(nil), + (*Input_InputBuilder_BabylonStakingSlashingPath)(nil), + (*Input_InputBuilder_BabylonUnbondingTimelockPath)(nil), + (*Input_InputBuilder_BabylonUnbondingSlashingPath)(nil), + } + file_BitcoinV2_proto_msgTypes[15].OneofWrappers = []any{ + (*Output_OutputBuilder_P2Sh)(nil), + (*Output_OutputBuilder_P2Pk)(nil), + (*Output_OutputBuilder_P2Pkh)(nil), + (*Output_OutputBuilder_P2Wsh)(nil), + (*Output_OutputBuilder_P2Wpkh)(nil), + (*Output_OutputBuilder_P2TrKeyPath)(nil), + (*Output_OutputBuilder_P2TrScriptPath)(nil), + (*Output_OutputBuilder_P2TrDangerousAssumeTweaked)(nil), + (*Output_OutputBuilder_Brc20Inscribe)(nil), + (*Output_OutputBuilder_OpReturn)(nil), + (*Output_OutputBuilder_BabylonStaking)(nil), + (*Output_OutputBuilder_BabylonUnbonding)(nil), + (*Output_OutputBuilder_BabylonStakingOpReturn)(nil), + } + file_BitcoinV2_proto_msgTypes[16].OneofWrappers = []any{ + (*Output_RedeemScriptOrHash_RedeemScript)(nil), + (*Output_RedeemScriptOrHash_Hash)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_BitcoinV2_proto_rawDesc), len(file_BitcoinV2_proto_rawDesc)), + NumEnums: 3, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_BitcoinV2_proto_goTypes, + DependencyIndexes: file_BitcoinV2_proto_depIdxs, + EnumInfos: file_BitcoinV2_proto_enumTypes, + MessageInfos: file_BitcoinV2_proto_msgTypes, + }.Build() + File_BitcoinV2_proto = out.File + file_BitcoinV2_proto_goTypes = nil + file_BitcoinV2_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/cardano/Cardano.pb.go b/wrapper/go-wrapper/protos/cardano/Cardano.pb.go new file mode 100644 index 00000000000..7fc964e53df --- /dev/null +++ b/wrapper/go-wrapper/protos/cardano/Cardano.pb.go @@ -0,0 +1,1301 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Cardano.proto + +package cardano + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type VoteDelegation_DRepType int32 + +const ( + VoteDelegation_DREP_ID VoteDelegation_DRepType = 0 + VoteDelegation_DREP_ALWAYS_ABSTAIN VoteDelegation_DRepType = 2 + VoteDelegation_DREP_NO_CONFIDENCE VoteDelegation_DRepType = 3 +) + +// Enum value maps for VoteDelegation_DRepType. +var ( + VoteDelegation_DRepType_name = map[int32]string{ + 0: "DREP_ID", + 2: "DREP_ALWAYS_ABSTAIN", + 3: "DREP_NO_CONFIDENCE", + } + VoteDelegation_DRepType_value = map[string]int32{ + "DREP_ID": 0, + "DREP_ALWAYS_ABSTAIN": 2, + "DREP_NO_CONFIDENCE": 3, + } +) + +func (x VoteDelegation_DRepType) Enum() *VoteDelegation_DRepType { + p := new(VoteDelegation_DRepType) + *p = x + return p +} + +func (x VoteDelegation_DRepType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VoteDelegation_DRepType) Descriptor() protoreflect.EnumDescriptor { + return file_Cardano_proto_enumTypes[0].Descriptor() +} + +func (VoteDelegation_DRepType) Type() protoreflect.EnumType { + return &file_Cardano_proto_enumTypes[0] +} + +func (x VoteDelegation_DRepType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VoteDelegation_DRepType.Descriptor instead. +func (VoteDelegation_DRepType) EnumDescriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{8, 0} +} + +// A transaction output that can be used as input +type OutPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The transaction ID + TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + // The index of this output within the transaction + OutputIndex uint64 `protobuf:"varint,2,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + mi := &file_Cardano_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{0} +} + +func (x *OutPoint) GetTxHash() []byte { + if x != nil { + return x.TxHash + } + return nil +} + +func (x *OutPoint) GetOutputIndex() uint64 { + if x != nil { + return x.OutputIndex + } + return 0 +} + +// Represents a token and an amount. Token is identified by PolicyID and name. +type TokenAmount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Policy ID of the token, as hex string (28x2 digits) + PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + // The name of the asset (within the policy) + AssetName string `protobuf:"bytes,2,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` + // The amount (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The name of the asset (hex encoded). Ignored if `asset_name` is set + AssetNameHex string `protobuf:"bytes,4,opt,name=asset_name_hex,json=assetNameHex,proto3" json:"asset_name_hex,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenAmount) Reset() { + *x = TokenAmount{} + mi := &file_Cardano_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenAmount) ProtoMessage() {} + +func (x *TokenAmount) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenAmount.ProtoReflect.Descriptor instead. +func (*TokenAmount) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{1} +} + +func (x *TokenAmount) GetPolicyId() string { + if x != nil { + return x.PolicyId + } + return "" +} + +func (x *TokenAmount) GetAssetName() string { + if x != nil { + return x.AssetName + } + return "" +} + +func (x *TokenAmount) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *TokenAmount) GetAssetNameHex() string { + if x != nil { + return x.AssetNameHex + } + return "" +} + +// One input for a transaction +type TxInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The UTXO + OutPoint *OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + // The owner address (string) + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // ADA amount in the UTXO + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // optional token amounts in the UTXO + TokenAmount []*TokenAmount `protobuf:"bytes,4,rep,name=token_amount,json=tokenAmount,proto3" json:"token_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TxInput) Reset() { + *x = TxInput{} + mi := &file_Cardano_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TxInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxInput) ProtoMessage() {} + +func (x *TxInput) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TxInput.ProtoReflect.Descriptor instead. +func (*TxInput) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{2} +} + +func (x *TxInput) GetOutPoint() *OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +func (x *TxInput) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TxInput) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TxInput) GetTokenAmount() []*TokenAmount { + if x != nil { + return x.TokenAmount + } + return nil +} + +// One output for a transaction +type TxOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination address (string) + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // ADA amount + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // optional token amounts + TokenAmount []*TokenAmount `protobuf:"bytes,3,rep,name=token_amount,json=tokenAmount,proto3" json:"token_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TxOutput) Reset() { + *x = TxOutput{} + mi := &file_Cardano_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TxOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxOutput) ProtoMessage() {} + +func (x *TxOutput) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TxOutput.ProtoReflect.Descriptor instead. +func (*TxOutput) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{3} +} + +func (x *TxOutput) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TxOutput) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TxOutput) GetTokenAmount() []*TokenAmount { + if x != nil { + return x.TokenAmount + } + return nil +} + +// Collection of tokens with amount +type TokenBundle struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token []*TokenAmount `protobuf:"bytes,1,rep,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenBundle) Reset() { + *x = TokenBundle{} + mi := &file_Cardano_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenBundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenBundle) ProtoMessage() {} + +func (x *TokenBundle) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenBundle.ProtoReflect.Descriptor instead. +func (*TokenBundle) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{4} +} + +func (x *TokenBundle) GetToken() []*TokenAmount { + if x != nil { + return x.Token + } + return nil +} + +// Message for simple Transfer tx +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination address as string + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Change address + ChangeAddress string `protobuf:"bytes,2,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // Requested ADA amount to be transferred. Output can be different only in use_max_amount case. + // Note that Cardano has a minimum amount per UTXO, see TWCardanoMinAdaAmount. + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // Optional token(s) to be transferred + // Currently only one token type to be transferred per transaction is supported + TokenAmount *TokenBundle `protobuf:"bytes,4,opt,name=token_amount,json=tokenAmount,proto3" json:"token_amount,omitempty"` + // Request max amount option. If set, tx will send all possible amounts from all inputs, including all tokens; there will be no change; requested amount and token_amount is disregarded in this case. + UseMaxAmount bool `protobuf:"varint,5,opt,name=use_max_amount,json=useMaxAmount,proto3" json:"use_max_amount,omitempty"` + // Optional fee overriding. If left to 0, optimal fee will be calculated. If set, exactly this value will be used as fee. + // Use it with care, it may result in underfunded or wasteful fee. + ForceFee uint64 `protobuf:"varint,6,opt,name=force_fee,json=forceFee,proto3" json:"force_fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_Cardano_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{5} +} + +func (x *Transfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Transfer) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *Transfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Transfer) GetTokenAmount() *TokenBundle { + if x != nil { + return x.TokenAmount + } + return nil +} + +func (x *Transfer) GetUseMaxAmount() bool { + if x != nil { + return x.UseMaxAmount + } + return false +} + +func (x *Transfer) GetForceFee() uint64 { + if x != nil { + return x.ForceFee + } + return 0 +} + +// Register a staking key for the account, prerequisite for Staking. +// Note: staking messages are typically used with a 1-output-to-self transaction. +type RegisterStakingKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Staking address (as string) + StakingAddress string `protobuf:"bytes,1,opt,name=staking_address,json=stakingAddress,proto3" json:"staking_address,omitempty"` + // Amount deposited in this TX. Should be 2 ADA (2000000). If not set correctly, TX will be rejected. See also Delegate.deposit_amount. + DepositAmount uint64 `protobuf:"varint,2,opt,name=deposit_amount,json=depositAmount,proto3" json:"deposit_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RegisterStakingKey) Reset() { + *x = RegisterStakingKey{} + mi := &file_Cardano_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RegisterStakingKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterStakingKey) ProtoMessage() {} + +func (x *RegisterStakingKey) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterStakingKey.ProtoReflect.Descriptor instead. +func (*RegisterStakingKey) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{6} +} + +func (x *RegisterStakingKey) GetStakingAddress() string { + if x != nil { + return x.StakingAddress + } + return "" +} + +func (x *RegisterStakingKey) GetDepositAmount() uint64 { + if x != nil { + return x.DepositAmount + } + return 0 +} + +// Deregister staking key. can be done when staking is stopped completely. The Staking deposit is returned at this time. +type DeregisterStakingKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Staking address (as string) + StakingAddress string `protobuf:"bytes,1,opt,name=staking_address,json=stakingAddress,proto3" json:"staking_address,omitempty"` + // Amount undeposited in this TX. Should be 2 ADA (2000000). If not set correctly, TX will be rejected. See also RegisterStakingKey.deposit_amount. + UndepositAmount uint64 `protobuf:"varint,2,opt,name=undeposit_amount,json=undepositAmount,proto3" json:"undeposit_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeregisterStakingKey) Reset() { + *x = DeregisterStakingKey{} + mi := &file_Cardano_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeregisterStakingKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeregisterStakingKey) ProtoMessage() {} + +func (x *DeregisterStakingKey) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeregisterStakingKey.ProtoReflect.Descriptor instead. +func (*DeregisterStakingKey) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{7} +} + +func (x *DeregisterStakingKey) GetStakingAddress() string { + if x != nil { + return x.StakingAddress + } + return "" +} + +func (x *DeregisterStakingKey) GetUndepositAmount() uint64 { + if x != nil { + return x.UndepositAmount + } + return 0 +} + +// Vote delegation to a specific DRep or always abstain or no confidence +type VoteDelegation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Staking address (as string) + StakingAddress string `protobuf:"bytes,1,opt,name=staking_address,json=stakingAddress,proto3" json:"staking_address,omitempty"` + // DRep type + DrepType VoteDelegation_DRepType `protobuf:"varint,2,opt,name=drep_type,json=drepType,proto3,enum=TW.Cardano.Proto.VoteDelegation_DRepType" json:"drep_type,omitempty"` + // DRep ID (only used when drep_type is DREP_ID) + DrepId string `protobuf:"bytes,3,opt,name=drep_id,json=drepId,proto3" json:"drep_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VoteDelegation) Reset() { + *x = VoteDelegation{} + mi := &file_Cardano_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VoteDelegation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VoteDelegation) ProtoMessage() {} + +func (x *VoteDelegation) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VoteDelegation.ProtoReflect.Descriptor instead. +func (*VoteDelegation) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{8} +} + +func (x *VoteDelegation) GetStakingAddress() string { + if x != nil { + return x.StakingAddress + } + return "" +} + +func (x *VoteDelegation) GetDrepType() VoteDelegation_DRepType { + if x != nil { + return x.DrepType + } + return VoteDelegation_DREP_ID +} + +func (x *VoteDelegation) GetDrepId() string { + if x != nil { + return x.DrepId + } + return "" +} + +// Delegate funds in this account to a specified staking pool. +type Delegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Staking address (as string) + StakingAddress string `protobuf:"bytes,1,opt,name=staking_address,json=stakingAddress,proto3" json:"staking_address,omitempty"` + // PoolID of staking pool + PoolId []byte `protobuf:"bytes,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + // Amount deposited in this TX. Should be 0. If not set correctly, TX will be rejected. See also RegisterStakingKey.deposit_amount. + DepositAmount uint64 `protobuf:"varint,3,opt,name=deposit_amount,json=depositAmount,proto3" json:"deposit_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Delegate) Reset() { + *x = Delegate{} + mi := &file_Cardano_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Delegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Delegate) ProtoMessage() {} + +func (x *Delegate) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Delegate.ProtoReflect.Descriptor instead. +func (*Delegate) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{9} +} + +func (x *Delegate) GetStakingAddress() string { + if x != nil { + return x.StakingAddress + } + return "" +} + +func (x *Delegate) GetPoolId() []byte { + if x != nil { + return x.PoolId + } + return nil +} + +func (x *Delegate) GetDepositAmount() uint64 { + if x != nil { + return x.DepositAmount + } + return 0 +} + +// Withdraw earned staking reward. +type Withdraw struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Staking address (as string) + StakingAddress string `protobuf:"bytes,1,opt,name=staking_address,json=stakingAddress,proto3" json:"staking_address,omitempty"` + // Withdrawal amount. Should match the real value of the earned reward. + WithdrawAmount uint64 `protobuf:"varint,2,opt,name=withdraw_amount,json=withdrawAmount,proto3" json:"withdraw_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Withdraw) Reset() { + *x = Withdraw{} + mi := &file_Cardano_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Withdraw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Withdraw) ProtoMessage() {} + +func (x *Withdraw) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Withdraw.ProtoReflect.Descriptor instead. +func (*Withdraw) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{10} +} + +func (x *Withdraw) GetStakingAddress() string { + if x != nil { + return x.StakingAddress + } + return "" +} + +func (x *Withdraw) GetWithdrawAmount() uint64 { + if x != nil { + return x.WithdrawAmount + } + return 0 +} + +// Describes a preliminary transaction plan. +type TransactionPlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + // total coins in the utxos + AvailableAmount uint64 `protobuf:"varint,1,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"` + // coins in the output UTXO + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // coin amount deducted as fee + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + // coins in the change UTXO + Change uint64 `protobuf:"varint,4,opt,name=change,proto3" json:"change,omitempty"` + // coins deposited (going to deposit) in this TX + Deposit uint64 `protobuf:"varint,10,opt,name=deposit,proto3" json:"deposit,omitempty"` + // coins undeposited (coming from deposit) in this TX + Undeposit uint64 `protobuf:"varint,11,opt,name=undeposit,proto3" json:"undeposit,omitempty"` + // total tokens in the utxos (optional) + AvailableTokens []*TokenAmount `protobuf:"bytes,5,rep,name=available_tokens,json=availableTokens,proto3" json:"available_tokens,omitempty"` + // tokens in the output (optional) + OutputTokens []*TokenAmount `protobuf:"bytes,6,rep,name=output_tokens,json=outputTokens,proto3" json:"output_tokens,omitempty"` + // tokens in the change (optional) + ChangeTokens []*TokenAmount `protobuf:"bytes,7,rep,name=change_tokens,json=changeTokens,proto3" json:"change_tokens,omitempty"` + // The selected UTXOs, subset ot the input UTXOs + Utxos []*TxInput `protobuf:"bytes,8,rep,name=utxos,proto3" json:"utxos,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,9,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Optional additional destination addresses, additional to first to_address output + ExtraOutputs []*TxOutput `protobuf:"bytes,12,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionPlan) Reset() { + *x = TransactionPlan{} + mi := &file_Cardano_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionPlan) ProtoMessage() {} + +func (x *TransactionPlan) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead. +func (*TransactionPlan) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{11} +} + +func (x *TransactionPlan) GetAvailableAmount() uint64 { + if x != nil { + return x.AvailableAmount + } + return 0 +} + +func (x *TransactionPlan) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TransactionPlan) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionPlan) GetChange() uint64 { + if x != nil { + return x.Change + } + return 0 +} + +func (x *TransactionPlan) GetDeposit() uint64 { + if x != nil { + return x.Deposit + } + return 0 +} + +func (x *TransactionPlan) GetUndeposit() uint64 { + if x != nil { + return x.Undeposit + } + return 0 +} + +func (x *TransactionPlan) GetAvailableTokens() []*TokenAmount { + if x != nil { + return x.AvailableTokens + } + return nil +} + +func (x *TransactionPlan) GetOutputTokens() []*TokenAmount { + if x != nil { + return x.OutputTokens + } + return nil +} + +func (x *TransactionPlan) GetChangeTokens() []*TokenAmount { + if x != nil { + return x.ChangeTokens + } + return nil +} + +func (x *TransactionPlan) GetUtxos() []*TxInput { + if x != nil { + return x.Utxos + } + return nil +} + +func (x *TransactionPlan) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *TransactionPlan) GetExtraOutputs() []*TxOutput { + if x != nil { + return x.ExtraOutputs + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Available input UTXOs + Utxos []*TxInput `protobuf:"bytes,1,rep,name=utxos,proto3" json:"utxos,omitempty"` + // Available private keys (double extended keys); every input UTXO address should be covered + // In case of Plan only, keys should be present, in correct number + PrivateKey [][]byte `protobuf:"bytes,2,rep,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Later this can be made oneof if more message types are supported + TransferMessage *Transfer `protobuf:"bytes,3,opt,name=transfer_message,json=transferMessage,proto3" json:"transfer_message,omitempty"` + // Optional, used in case of Staking Key registration (prerequisite for Staking) + RegisterStakingKey *RegisterStakingKey `protobuf:"bytes,6,opt,name=register_staking_key,json=registerStakingKey,proto3" json:"register_staking_key,omitempty"` + // Optional, used in case of (re)delegation + Delegate *Delegate `protobuf:"bytes,7,opt,name=delegate,proto3" json:"delegate,omitempty"` + // Optional, used in case of withdraw + Withdraw *Withdraw `protobuf:"bytes,8,opt,name=withdraw,proto3" json:"withdraw,omitempty"` + // Optional + DeregisterStakingKey *DeregisterStakingKey `protobuf:"bytes,9,opt,name=deregister_staking_key,json=deregisterStakingKey,proto3" json:"deregister_staking_key,omitempty"` + // Optional, used for vote delegation + VoteDelegation *VoteDelegation `protobuf:"bytes,11,opt,name=vote_delegation,json=voteDelegation,proto3" json:"vote_delegation,omitempty"` + // Time-to-live time of the TX + Ttl uint64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"` + // Optional plan, if missing it will be computed + Plan *TransactionPlan `protobuf:"bytes,5,opt,name=plan,proto3" json:"plan,omitempty"` + // extra output UTXOs + ExtraOutputs []*TxOutput `protobuf:"bytes,10,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Cardano_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{12} +} + +func (x *SigningInput) GetUtxos() []*TxInput { + if x != nil { + return x.Utxos + } + return nil +} + +func (x *SigningInput) GetPrivateKey() [][]byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTransferMessage() *Transfer { + if x != nil { + return x.TransferMessage + } + return nil +} + +func (x *SigningInput) GetRegisterStakingKey() *RegisterStakingKey { + if x != nil { + return x.RegisterStakingKey + } + return nil +} + +func (x *SigningInput) GetDelegate() *Delegate { + if x != nil { + return x.Delegate + } + return nil +} + +func (x *SigningInput) GetWithdraw() *Withdraw { + if x != nil { + return x.Withdraw + } + return nil +} + +func (x *SigningInput) GetDeregisterStakingKey() *DeregisterStakingKey { + if x != nil { + return x.DeregisterStakingKey + } + return nil +} + +func (x *SigningInput) GetVoteDelegation() *VoteDelegation { + if x != nil { + return x.VoteDelegation + } + return nil +} + +func (x *SigningInput) GetTtl() uint64 { + if x != nil { + return x.Ttl + } + return 0 +} + +func (x *SigningInput) GetPlan() *TransactionPlan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *SigningInput) GetExtraOutputs() []*TxOutput { + if x != nil { + return x.ExtraOutputs + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Encoded transaction bytes + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // TxID, derived from transaction data, also needed for submission + TxId []byte `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Cardano_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Cardano_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Cardano_proto_rawDescGZIP(), []int{13} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetTxId() []byte { + if x != nil { + return x.TxId + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Cardano_proto protoreflect.FileDescriptor + +const file_Cardano_proto_rawDesc = "" + + "\n" + + "\rCardano.proto\x12\x10TW.Cardano.Proto\x1a\fCommon.proto\"F\n" + + "\bOutPoint\x12\x17\n" + + "\atx_hash\x18\x01 \x01(\fR\x06txHash\x12!\n" + + "\foutput_index\x18\x02 \x01(\x04R\voutputIndex\"\x87\x01\n" + + "\vTokenAmount\x12\x1b\n" + + "\tpolicy_id\x18\x01 \x01(\tR\bpolicyId\x12\x1d\n" + + "\n" + + "asset_name\x18\x02 \x01(\tR\tassetName\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\x12$\n" + + "\x0easset_name_hex\x18\x04 \x01(\tR\fassetNameHex\"\xb6\x01\n" + + "\aTxInput\x127\n" + + "\tout_point\x18\x01 \x01(\v2\x1a.TW.Cardano.Proto.OutPointR\boutPoint\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\x12@\n" + + "\ftoken_amount\x18\x04 \x03(\v2\x1d.TW.Cardano.Proto.TokenAmountR\vtokenAmount\"~\n" + + "\bTxOutput\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x12@\n" + + "\ftoken_amount\x18\x03 \x03(\v2\x1d.TW.Cardano.Proto.TokenAmountR\vtokenAmount\"B\n" + + "\vTokenBundle\x123\n" + + "\x05token\x18\x01 \x03(\v2\x1d.TW.Cardano.Proto.TokenAmountR\x05token\"\xed\x01\n" + + "\bTransfer\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x02 \x01(\tR\rchangeAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\x12@\n" + + "\ftoken_amount\x18\x04 \x01(\v2\x1d.TW.Cardano.Proto.TokenBundleR\vtokenAmount\x12$\n" + + "\x0euse_max_amount\x18\x05 \x01(\bR\fuseMaxAmount\x12\x1b\n" + + "\tforce_fee\x18\x06 \x01(\x04R\bforceFee\"d\n" + + "\x12RegisterStakingKey\x12'\n" + + "\x0fstaking_address\x18\x01 \x01(\tR\x0estakingAddress\x12%\n" + + "\x0edeposit_amount\x18\x02 \x01(\x04R\rdepositAmount\"j\n" + + "\x14DeregisterStakingKey\x12'\n" + + "\x0fstaking_address\x18\x01 \x01(\tR\x0estakingAddress\x12)\n" + + "\x10undeposit_amount\x18\x02 \x01(\x04R\x0fundepositAmount\"\xe4\x01\n" + + "\x0eVoteDelegation\x12'\n" + + "\x0fstaking_address\x18\x01 \x01(\tR\x0estakingAddress\x12F\n" + + "\tdrep_type\x18\x02 \x01(\x0e2).TW.Cardano.Proto.VoteDelegation.DRepTypeR\bdrepType\x12\x17\n" + + "\adrep_id\x18\x03 \x01(\tR\x06drepId\"H\n" + + "\bDRepType\x12\v\n" + + "\aDREP_ID\x10\x00\x12\x17\n" + + "\x13DREP_ALWAYS_ABSTAIN\x10\x02\x12\x16\n" + + "\x12DREP_NO_CONFIDENCE\x10\x03\"s\n" + + "\bDelegate\x12'\n" + + "\x0fstaking_address\x18\x01 \x01(\tR\x0estakingAddress\x12\x17\n" + + "\apool_id\x18\x02 \x01(\fR\x06poolId\x12%\n" + + "\x0edeposit_amount\x18\x03 \x01(\x04R\rdepositAmount\"\\\n" + + "\bWithdraw\x12'\n" + + "\x0fstaking_address\x18\x01 \x01(\tR\x0estakingAddress\x12'\n" + + "\x0fwithdraw_amount\x18\x02 \x01(\x04R\x0ewithdrawAmount\"\xaf\x04\n" + + "\x0fTransactionPlan\x12)\n" + + "\x10available_amount\x18\x01 \x01(\x04R\x0favailableAmount\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x12\x16\n" + + "\x06change\x18\x04 \x01(\x04R\x06change\x12\x18\n" + + "\adeposit\x18\n" + + " \x01(\x04R\adeposit\x12\x1c\n" + + "\tundeposit\x18\v \x01(\x04R\tundeposit\x12H\n" + + "\x10available_tokens\x18\x05 \x03(\v2\x1d.TW.Cardano.Proto.TokenAmountR\x0favailableTokens\x12B\n" + + "\routput_tokens\x18\x06 \x03(\v2\x1d.TW.Cardano.Proto.TokenAmountR\foutputTokens\x12B\n" + + "\rchange_tokens\x18\a \x03(\v2\x1d.TW.Cardano.Proto.TokenAmountR\fchangeTokens\x12/\n" + + "\x05utxos\x18\b \x03(\v2\x19.TW.Cardano.Proto.TxInputR\x05utxos\x123\n" + + "\x05error\x18\t \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12?\n" + + "\rextra_outputs\x18\f \x03(\v2\x1a.TW.Cardano.Proto.TxOutputR\fextraOutputs\"\xa2\x05\n" + + "\fSigningInput\x12/\n" + + "\x05utxos\x18\x01 \x03(\v2\x19.TW.Cardano.Proto.TxInputR\x05utxos\x12\x1f\n" + + "\vprivate_key\x18\x02 \x03(\fR\n" + + "privateKey\x12E\n" + + "\x10transfer_message\x18\x03 \x01(\v2\x1a.TW.Cardano.Proto.TransferR\x0ftransferMessage\x12V\n" + + "\x14register_staking_key\x18\x06 \x01(\v2$.TW.Cardano.Proto.RegisterStakingKeyR\x12registerStakingKey\x126\n" + + "\bdelegate\x18\a \x01(\v2\x1a.TW.Cardano.Proto.DelegateR\bdelegate\x126\n" + + "\bwithdraw\x18\b \x01(\v2\x1a.TW.Cardano.Proto.WithdrawR\bwithdraw\x12\\\n" + + "\x16deregister_staking_key\x18\t \x01(\v2&.TW.Cardano.Proto.DeregisterStakingKeyR\x14deregisterStakingKey\x12I\n" + + "\x0fvote_delegation\x18\v \x01(\v2 .TW.Cardano.Proto.VoteDelegationR\x0evoteDelegation\x12\x10\n" + + "\x03ttl\x18\x04 \x01(\x04R\x03ttl\x125\n" + + "\x04plan\x18\x05 \x01(\v2!.TW.Cardano.Proto.TransactionPlanR\x04plan\x12?\n" + + "\rextra_outputs\x18\n" + + " \x03(\v2\x1a.TW.Cardano.Proto.TxOutputR\fextraOutputs\"\x98\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x13\n" + + "\x05tx_id\x18\x02 \x01(\fR\x04txId\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Cardano_proto_rawDescOnce sync.Once + file_Cardano_proto_rawDescData []byte +) + +func file_Cardano_proto_rawDescGZIP() []byte { + file_Cardano_proto_rawDescOnce.Do(func() { + file_Cardano_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Cardano_proto_rawDesc), len(file_Cardano_proto_rawDesc))) + }) + return file_Cardano_proto_rawDescData +} + +var file_Cardano_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Cardano_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_Cardano_proto_goTypes = []any{ + (VoteDelegation_DRepType)(0), // 0: TW.Cardano.Proto.VoteDelegation.DRepType + (*OutPoint)(nil), // 1: TW.Cardano.Proto.OutPoint + (*TokenAmount)(nil), // 2: TW.Cardano.Proto.TokenAmount + (*TxInput)(nil), // 3: TW.Cardano.Proto.TxInput + (*TxOutput)(nil), // 4: TW.Cardano.Proto.TxOutput + (*TokenBundle)(nil), // 5: TW.Cardano.Proto.TokenBundle + (*Transfer)(nil), // 6: TW.Cardano.Proto.Transfer + (*RegisterStakingKey)(nil), // 7: TW.Cardano.Proto.RegisterStakingKey + (*DeregisterStakingKey)(nil), // 8: TW.Cardano.Proto.DeregisterStakingKey + (*VoteDelegation)(nil), // 9: TW.Cardano.Proto.VoteDelegation + (*Delegate)(nil), // 10: TW.Cardano.Proto.Delegate + (*Withdraw)(nil), // 11: TW.Cardano.Proto.Withdraw + (*TransactionPlan)(nil), // 12: TW.Cardano.Proto.TransactionPlan + (*SigningInput)(nil), // 13: TW.Cardano.Proto.SigningInput + (*SigningOutput)(nil), // 14: TW.Cardano.Proto.SigningOutput + (common.SigningError)(0), // 15: TW.Common.Proto.SigningError +} +var file_Cardano_proto_depIdxs = []int32{ + 1, // 0: TW.Cardano.Proto.TxInput.out_point:type_name -> TW.Cardano.Proto.OutPoint + 2, // 1: TW.Cardano.Proto.TxInput.token_amount:type_name -> TW.Cardano.Proto.TokenAmount + 2, // 2: TW.Cardano.Proto.TxOutput.token_amount:type_name -> TW.Cardano.Proto.TokenAmount + 2, // 3: TW.Cardano.Proto.TokenBundle.token:type_name -> TW.Cardano.Proto.TokenAmount + 5, // 4: TW.Cardano.Proto.Transfer.token_amount:type_name -> TW.Cardano.Proto.TokenBundle + 0, // 5: TW.Cardano.Proto.VoteDelegation.drep_type:type_name -> TW.Cardano.Proto.VoteDelegation.DRepType + 2, // 6: TW.Cardano.Proto.TransactionPlan.available_tokens:type_name -> TW.Cardano.Proto.TokenAmount + 2, // 7: TW.Cardano.Proto.TransactionPlan.output_tokens:type_name -> TW.Cardano.Proto.TokenAmount + 2, // 8: TW.Cardano.Proto.TransactionPlan.change_tokens:type_name -> TW.Cardano.Proto.TokenAmount + 3, // 9: TW.Cardano.Proto.TransactionPlan.utxos:type_name -> TW.Cardano.Proto.TxInput + 15, // 10: TW.Cardano.Proto.TransactionPlan.error:type_name -> TW.Common.Proto.SigningError + 4, // 11: TW.Cardano.Proto.TransactionPlan.extra_outputs:type_name -> TW.Cardano.Proto.TxOutput + 3, // 12: TW.Cardano.Proto.SigningInput.utxos:type_name -> TW.Cardano.Proto.TxInput + 6, // 13: TW.Cardano.Proto.SigningInput.transfer_message:type_name -> TW.Cardano.Proto.Transfer + 7, // 14: TW.Cardano.Proto.SigningInput.register_staking_key:type_name -> TW.Cardano.Proto.RegisterStakingKey + 10, // 15: TW.Cardano.Proto.SigningInput.delegate:type_name -> TW.Cardano.Proto.Delegate + 11, // 16: TW.Cardano.Proto.SigningInput.withdraw:type_name -> TW.Cardano.Proto.Withdraw + 8, // 17: TW.Cardano.Proto.SigningInput.deregister_staking_key:type_name -> TW.Cardano.Proto.DeregisterStakingKey + 9, // 18: TW.Cardano.Proto.SigningInput.vote_delegation:type_name -> TW.Cardano.Proto.VoteDelegation + 12, // 19: TW.Cardano.Proto.SigningInput.plan:type_name -> TW.Cardano.Proto.TransactionPlan + 4, // 20: TW.Cardano.Proto.SigningInput.extra_outputs:type_name -> TW.Cardano.Proto.TxOutput + 15, // 21: TW.Cardano.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_Cardano_proto_init() } +func file_Cardano_proto_init() { + if File_Cardano_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Cardano_proto_rawDesc), len(file_Cardano_proto_rawDesc)), + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Cardano_proto_goTypes, + DependencyIndexes: file_Cardano_proto_depIdxs, + EnumInfos: file_Cardano_proto_enumTypes, + MessageInfos: file_Cardano_proto_msgTypes, + }.Build() + File_Cardano_proto = out.File + file_Cardano_proto_goTypes = nil + file_Cardano_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/common/Common.pb.go b/wrapper/go-wrapper/protos/common/Common.pb.go new file mode 100644 index 00000000000..fcd888acb4a --- /dev/null +++ b/wrapper/go-wrapper/protos/common/Common.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Common.proto + +package common + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Error codes, used in multiple blockchains. +type SigningError int32 + +const ( + // This is the OK case, with value=0 + SigningError_OK SigningError = 0 + // Chain-generic codes: + // Generic error (used if there is no suitable specific error is adequate) + SigningError_Error_general SigningError = 1 + // Internal error, indicates some very unusual, unexpected case + SigningError_Error_internal SigningError = 2 + // Chain-generic codes, input related: + // Low balance: the sender balance is not enough to cover the send and other auxiliary amount such as fee, deposit, or minimal balance. + SigningError_Error_low_balance SigningError = 3 + // Requested amount is zero, send of 0 makes no sense + SigningError_Error_zero_amount_requested SigningError = 4 + // One required key is missing (too few or wrong keys are provided) + SigningError_Error_missing_private_key SigningError = 5 + // A private key provided is invalid (e.g. wrong size, usually should be 32 bytes) + SigningError_Error_invalid_private_key SigningError = 15 + // A provided address (e.g. destination address) is invalid + SigningError_Error_invalid_address SigningError = 16 + // A provided input UTXO is invalid + SigningError_Error_invalid_utxo SigningError = 17 + // The amount of an input UTXO is invalid + SigningError_Error_invalid_utxo_amount SigningError = 18 + // Chain-generic, fee related: + // Wrong fee is given, probably it is too low to cover minimal fee for the transaction + SigningError_Error_wrong_fee SigningError = 6 + // Chain-generic, signing related: + // General signing error + SigningError_Error_signing SigningError = 7 + // Resulting transaction is too large + // [NEO] Transaction too big, fee in GAS needed or try send by parts + SigningError_Error_tx_too_big SigningError = 8 + // UTXO-chain specific, input related: + // No input UTXOs provided [BTC] + SigningError_Error_missing_input_utxos SigningError = 9 + // Not enough non-dust input UTXOs to cover requested amount (dust UTXOs are filtered out) [BTC] + SigningError_Error_not_enough_utxos SigningError = 10 + // UTXO-chain specific, script related: + // [BTC] Missing required redeem script + SigningError_Error_script_redeem SigningError = 11 + // [BTC] Invalid required output script + SigningError_Error_script_output SigningError = 12 + // [BTC] Unrecognized witness program + SigningError_Error_script_witness_program SigningError = 13 + // Invalid memo, e.g. [XRP] Invalid tag + SigningError_Error_invalid_memo SigningError = 14 + // Some input field cannot be parsed + SigningError_Error_input_parse SigningError = 19 + // Multi-input and multi-output transaction not supported + SigningError_Error_no_support_n2n SigningError = 20 + // Incorrect count of signatures passed to compile + SigningError_Error_signatures_count SigningError = 21 + // Incorrect input parameter + SigningError_Error_invalid_params SigningError = 22 + // Invalid input token amount + SigningError_Error_invalid_requested_token_amount SigningError = 23 + // Operation not supported for the chain. + SigningError_Error_not_supported SigningError = 24 + // Requested amount is too low (less dust). + SigningError_Error_dust_amount_requested SigningError = 25 +) + +// Enum value maps for SigningError. +var ( + SigningError_name = map[int32]string{ + 0: "OK", + 1: "Error_general", + 2: "Error_internal", + 3: "Error_low_balance", + 4: "Error_zero_amount_requested", + 5: "Error_missing_private_key", + 15: "Error_invalid_private_key", + 16: "Error_invalid_address", + 17: "Error_invalid_utxo", + 18: "Error_invalid_utxo_amount", + 6: "Error_wrong_fee", + 7: "Error_signing", + 8: "Error_tx_too_big", + 9: "Error_missing_input_utxos", + 10: "Error_not_enough_utxos", + 11: "Error_script_redeem", + 12: "Error_script_output", + 13: "Error_script_witness_program", + 14: "Error_invalid_memo", + 19: "Error_input_parse", + 20: "Error_no_support_n2n", + 21: "Error_signatures_count", + 22: "Error_invalid_params", + 23: "Error_invalid_requested_token_amount", + 24: "Error_not_supported", + 25: "Error_dust_amount_requested", + } + SigningError_value = map[string]int32{ + "OK": 0, + "Error_general": 1, + "Error_internal": 2, + "Error_low_balance": 3, + "Error_zero_amount_requested": 4, + "Error_missing_private_key": 5, + "Error_invalid_private_key": 15, + "Error_invalid_address": 16, + "Error_invalid_utxo": 17, + "Error_invalid_utxo_amount": 18, + "Error_wrong_fee": 6, + "Error_signing": 7, + "Error_tx_too_big": 8, + "Error_missing_input_utxos": 9, + "Error_not_enough_utxos": 10, + "Error_script_redeem": 11, + "Error_script_output": 12, + "Error_script_witness_program": 13, + "Error_invalid_memo": 14, + "Error_input_parse": 19, + "Error_no_support_n2n": 20, + "Error_signatures_count": 21, + "Error_invalid_params": 22, + "Error_invalid_requested_token_amount": 23, + "Error_not_supported": 24, + "Error_dust_amount_requested": 25, + } +) + +func (x SigningError) Enum() *SigningError { + p := new(SigningError) + *p = x + return p +} + +func (x SigningError) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SigningError) Descriptor() protoreflect.EnumDescriptor { + return file_Common_proto_enumTypes[0].Descriptor() +} + +func (SigningError) Type() protoreflect.EnumType { + return &file_Common_proto_enumTypes[0] +} + +func (x SigningError) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SigningError.Descriptor instead. +func (SigningError) EnumDescriptor() ([]byte, []int) { + return file_Common_proto_rawDescGZIP(), []int{0} +} + +var File_Common_proto protoreflect.FileDescriptor + +const file_Common_proto_rawDesc = "" + + "\n" + + "\fCommon.proto\x12\x0fTW.Common.Proto*\xb5\x05\n" + + "\fSigningError\x12\x06\n" + + "\x02OK\x10\x00\x12\x11\n" + + "\rError_general\x10\x01\x12\x12\n" + + "\x0eError_internal\x10\x02\x12\x15\n" + + "\x11Error_low_balance\x10\x03\x12\x1f\n" + + "\x1bError_zero_amount_requested\x10\x04\x12\x1d\n" + + "\x19Error_missing_private_key\x10\x05\x12\x1d\n" + + "\x19Error_invalid_private_key\x10\x0f\x12\x19\n" + + "\x15Error_invalid_address\x10\x10\x12\x16\n" + + "\x12Error_invalid_utxo\x10\x11\x12\x1d\n" + + "\x19Error_invalid_utxo_amount\x10\x12\x12\x13\n" + + "\x0fError_wrong_fee\x10\x06\x12\x11\n" + + "\rError_signing\x10\a\x12\x14\n" + + "\x10Error_tx_too_big\x10\b\x12\x1d\n" + + "\x19Error_missing_input_utxos\x10\t\x12\x1a\n" + + "\x16Error_not_enough_utxos\x10\n" + + "\x12\x17\n" + + "\x13Error_script_redeem\x10\v\x12\x17\n" + + "\x13Error_script_output\x10\f\x12 \n" + + "\x1cError_script_witness_program\x10\r\x12\x16\n" + + "\x12Error_invalid_memo\x10\x0e\x12\x15\n" + + "\x11Error_input_parse\x10\x13\x12\x18\n" + + "\x14Error_no_support_n2n\x10\x14\x12\x1a\n" + + "\x16Error_signatures_count\x10\x15\x12\x18\n" + + "\x14Error_invalid_params\x10\x16\x12(\n" + + "$Error_invalid_requested_token_amount\x10\x17\x12\x17\n" + + "\x13Error_not_supported\x10\x18\x12\x1f\n" + + "\x1bError_dust_amount_requested\x10\x19B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Common_proto_rawDescOnce sync.Once + file_Common_proto_rawDescData []byte +) + +func file_Common_proto_rawDescGZIP() []byte { + file_Common_proto_rawDescOnce.Do(func() { + file_Common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Common_proto_rawDesc), len(file_Common_proto_rawDesc))) + }) + return file_Common_proto_rawDescData +} + +var file_Common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Common_proto_goTypes = []any{ + (SigningError)(0), // 0: TW.Common.Proto.SigningError +} +var file_Common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_Common_proto_init() } +func file_Common_proto_init() { + if File_Common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Common_proto_rawDesc), len(file_Common_proto_rawDesc)), + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Common_proto_goTypes, + DependencyIndexes: file_Common_proto_depIdxs, + EnumInfos: file_Common_proto_enumTypes, + }.Build() + File_Common_proto = out.File + file_Common_proto_goTypes = nil + file_Common_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/cosmos/Cosmos.pb.go b/wrapper/go-wrapper/protos/cosmos/Cosmos.pb.go new file mode 100644 index 00000000000..ae1869d77f1 --- /dev/null +++ b/wrapper/go-wrapper/protos/cosmos/Cosmos.pb.go @@ -0,0 +1,3584 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Cosmos.proto + +package cosmos + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transaction broadcast mode +type BroadcastMode int32 + +const ( + BroadcastMode_BLOCK BroadcastMode = 0 // Wait for the tx to pass/fail CheckTx, DeliverTx, and be committed in a block + BroadcastMode_SYNC BroadcastMode = 1 // Wait for the tx to pass/fail CheckTx + BroadcastMode_ASYNC BroadcastMode = 2 // Don't wait for pass/fail CheckTx; send and return tx immediately +) + +// Enum value maps for BroadcastMode. +var ( + BroadcastMode_name = map[int32]string{ + 0: "BLOCK", + 1: "SYNC", + 2: "ASYNC", + } + BroadcastMode_value = map[string]int32{ + "BLOCK": 0, + "SYNC": 1, + "ASYNC": 2, + } +) + +func (x BroadcastMode) Enum() *BroadcastMode { + p := new(BroadcastMode) + *p = x + return p +} + +func (x BroadcastMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BroadcastMode) Descriptor() protoreflect.EnumDescriptor { + return file_Cosmos_proto_enumTypes[0].Descriptor() +} + +func (BroadcastMode) Type() protoreflect.EnumType { + return &file_Cosmos_proto_enumTypes[0] +} + +func (x BroadcastMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BroadcastMode.Descriptor instead. +func (BroadcastMode) EnumDescriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{0} +} + +// Options for transaction encoding: JSON (Amino, older) or Protobuf. +type SigningMode int32 + +const ( + SigningMode_JSON SigningMode = 0 // JSON format, Pre-Stargate + SigningMode_Protobuf SigningMode = 1 // Protobuf-serialized (binary), Stargate +) + +// Enum value maps for SigningMode. +var ( + SigningMode_name = map[int32]string{ + 0: "JSON", + 1: "Protobuf", + } + SigningMode_value = map[string]int32{ + "JSON": 0, + "Protobuf": 1, + } +) + +func (x SigningMode) Enum() *SigningMode { + p := new(SigningMode) + *p = x + return p +} + +func (x SigningMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SigningMode) Descriptor() protoreflect.EnumDescriptor { + return file_Cosmos_proto_enumTypes[1].Descriptor() +} + +func (SigningMode) Type() protoreflect.EnumType { + return &file_Cosmos_proto_enumTypes[1] +} + +func (x SigningMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SigningMode.Descriptor instead. +func (SigningMode) EnumDescriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{1} +} + +type TxHasher int32 + +const ( + // For Cosmos chain, `Sha256` is used by default. + TxHasher_UseDefault TxHasher = 0 + TxHasher_Sha256 TxHasher = 1 + TxHasher_Keccak256 TxHasher = 2 +) + +// Enum value maps for TxHasher. +var ( + TxHasher_name = map[int32]string{ + 0: "UseDefault", + 1: "Sha256", + 2: "Keccak256", + } + TxHasher_value = map[string]int32{ + "UseDefault": 0, + "Sha256": 1, + "Keccak256": 2, + } +) + +func (x TxHasher) Enum() *TxHasher { + p := new(TxHasher) + *p = x + return p +} + +func (x TxHasher) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TxHasher) Descriptor() protoreflect.EnumDescriptor { + return file_Cosmos_proto_enumTypes[2].Descriptor() +} + +func (TxHasher) Type() protoreflect.EnumType { + return &file_Cosmos_proto_enumTypes[2] +} + +func (x TxHasher) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TxHasher.Descriptor instead. +func (TxHasher) EnumDescriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{2} +} + +type SignerPublicKeyType int32 + +const ( + // Default public key type. + SignerPublicKeyType_Secp256k1 SignerPublicKeyType = 0 + // Mostly used in Cosmos chains with EVM support. + SignerPublicKeyType_Secp256k1Extended SignerPublicKeyType = 1 +) + +// Enum value maps for SignerPublicKeyType. +var ( + SignerPublicKeyType_name = map[int32]string{ + 0: "Secp256k1", + 1: "Secp256k1Extended", + } + SignerPublicKeyType_value = map[string]int32{ + "Secp256k1": 0, + "Secp256k1Extended": 1, + } +) + +func (x SignerPublicKeyType) Enum() *SignerPublicKeyType { + p := new(SignerPublicKeyType) + *p = x + return p +} + +func (x SignerPublicKeyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SignerPublicKeyType) Descriptor() protoreflect.EnumDescriptor { + return file_Cosmos_proto_enumTypes[3].Descriptor() +} + +func (SignerPublicKeyType) Type() protoreflect.EnumType { + return &file_Cosmos_proto_enumTypes[3] +} + +func (x SignerPublicKeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SignerPublicKeyType.Descriptor instead. +func (SignerPublicKeyType) EnumDescriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{3} +} + +// AuthorizationType defines the type of staking module authorization type +// +// Since: cosmos-sdk 0.43 +type Message_AuthorizationType int32 + +const ( + // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + Message_UNSPECIFIED Message_AuthorizationType = 0 + // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + Message_DELEGATE Message_AuthorizationType = 1 + // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + Message_UNDELEGATE Message_AuthorizationType = 2 + // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + Message_REDELEGATE Message_AuthorizationType = 3 +) + +// Enum value maps for Message_AuthorizationType. +var ( + Message_AuthorizationType_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "DELEGATE", + 2: "UNDELEGATE", + 3: "REDELEGATE", + } + Message_AuthorizationType_value = map[string]int32{ + "UNSPECIFIED": 0, + "DELEGATE": 1, + "UNDELEGATE": 2, + "REDELEGATE": 3, + } +) + +func (x Message_AuthorizationType) Enum() *Message_AuthorizationType { + p := new(Message_AuthorizationType) + *p = x + return p +} + +func (x Message_AuthorizationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Message_AuthorizationType) Descriptor() protoreflect.EnumDescriptor { + return file_Cosmos_proto_enumTypes[4].Descriptor() +} + +func (Message_AuthorizationType) Type() protoreflect.EnumType { + return &file_Cosmos_proto_enumTypes[4] +} + +func (x Message_AuthorizationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Message_AuthorizationType.Descriptor instead. +func (Message_AuthorizationType) EnumDescriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 0} +} + +// VoteOption enumerates the valid vote options for a given governance proposal. +type Message_VoteOption int32 + +const ( + // _UNSPECIFIED defines a no-op vote option. + Message__UNSPECIFIED Message_VoteOption = 0 + // YES defines a yes vote option. + Message_YES Message_VoteOption = 1 + // ABSTAIN defines an abstain vote option. + Message_ABSTAIN Message_VoteOption = 2 + // NO defines a no vote option. + Message_NO Message_VoteOption = 3 + // NO_WITH_VETO defines a no with veto vote option. + Message_NO_WITH_VETO Message_VoteOption = 4 +) + +// Enum value maps for Message_VoteOption. +var ( + Message_VoteOption_name = map[int32]string{ + 0: "_UNSPECIFIED", + 1: "YES", + 2: "ABSTAIN", + 3: "NO", + 4: "NO_WITH_VETO", + } + Message_VoteOption_value = map[string]int32{ + "_UNSPECIFIED": 0, + "YES": 1, + "ABSTAIN": 2, + "NO": 3, + "NO_WITH_VETO": 4, + } +) + +func (x Message_VoteOption) Enum() *Message_VoteOption { + p := new(Message_VoteOption) + *p = x + return p +} + +func (x Message_VoteOption) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Message_VoteOption) Descriptor() protoreflect.EnumDescriptor { + return file_Cosmos_proto_enumTypes[5].Descriptor() +} + +func (Message_VoteOption) Type() protoreflect.EnumType { + return &file_Cosmos_proto_enumTypes[5] +} + +func (x Message_VoteOption) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Message_VoteOption.Descriptor instead. +func (Message_VoteOption) EnumDescriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 1} +} + +// A denomination and an amount +type Amount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // name of the denomination + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // amount, number as string + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Amount) Reset() { + *x = Amount{} + mi := &file_Cosmos_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Amount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Amount) ProtoMessage() {} + +func (x *Amount) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Amount.ProtoReflect.Descriptor instead. +func (*Amount) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{0} +} + +func (x *Amount) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *Amount) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +// Fee incl. gas +type Fee struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Fee amount(s) + Amounts []*Amount `protobuf:"bytes,1,rep,name=amounts,proto3" json:"amounts,omitempty"` + // Gas price + Gas uint64 `protobuf:"varint,2,opt,name=gas,proto3" json:"gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fee) Reset() { + *x = Fee{} + mi := &file_Cosmos_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fee) ProtoMessage() {} + +func (x *Fee) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fee.ProtoReflect.Descriptor instead. +func (*Fee) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{1} +} + +func (x *Fee) GetAmounts() []*Amount { + if x != nil { + return x.Amounts + } + return nil +} + +func (x *Fee) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +// Block height, a revision and block height tuple. +// A height can be compared against another Height for the purposes of updating and freezing clients +type Height struct { + state protoimpl.MessageState `protogen:"open.v1"` + // the revision that the client is currently on + RevisionNumber uint64 `protobuf:"varint,1,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number,omitempty"` + // the height within the given revision + RevisionHeight uint64 `protobuf:"varint,2,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Height) Reset() { + *x = Height{} + mi := &file_Cosmos_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Height) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Height) ProtoMessage() {} + +func (x *Height) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Height.ProtoReflect.Descriptor instead. +func (*Height) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{2} +} + +func (x *Height) GetRevisionNumber() uint64 { + if x != nil { + return x.RevisionNumber + } + return 0 +} + +func (x *Height) GetRevisionHeight() uint64 { + if x != nil { + return x.RevisionHeight + } + return 0 +} + +type THORChainAsset struct { + state protoimpl.MessageState `protogen:"open.v1"` + Chain string `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + Synth bool `protobuf:"varint,4,opt,name=synth,proto3" json:"synth,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *THORChainAsset) Reset() { + *x = THORChainAsset{} + mi := &file_Cosmos_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *THORChainAsset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*THORChainAsset) ProtoMessage() {} + +func (x *THORChainAsset) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use THORChainAsset.ProtoReflect.Descriptor instead. +func (*THORChainAsset) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{3} +} + +func (x *THORChainAsset) GetChain() string { + if x != nil { + return x.Chain + } + return "" +} + +func (x *THORChainAsset) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *THORChainAsset) GetTicker() string { + if x != nil { + return x.Ticker + } + return "" +} + +func (x *THORChainAsset) GetSynth() bool { + if x != nil { + return x.Synth + } + return false +} + +type THORChainCoin struct { + state protoimpl.MessageState `protogen:"open.v1"` + Asset *THORChainAsset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + Decimals int64 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *THORChainCoin) Reset() { + *x = THORChainCoin{} + mi := &file_Cosmos_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *THORChainCoin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*THORChainCoin) ProtoMessage() {} + +func (x *THORChainCoin) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use THORChainCoin.ProtoReflect.Descriptor instead. +func (*THORChainCoin) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{4} +} + +func (x *THORChainCoin) GetAsset() *THORChainAsset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *THORChainCoin) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *THORChainCoin) GetDecimals() int64 { + if x != nil { + return x.Decimals + } + return 0 +} + +// A transaction payload message +type Message struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payload message + // + // Types that are valid to be assigned to MessageOneof: + // + // *Message_SendCoinsMessage + // *Message_TransferTokensMessage + // *Message_StakeMessage + // *Message_UnstakeMessage + // *Message_RestakeMessage + // *Message_WithdrawStakeRewardMessage + // *Message_RawJsonMessage + // *Message_WasmTerraExecuteContractTransferMessage + // *Message_WasmTerraExecuteContractSendMessage + // *Message_ThorchainSendMessage + // *Message_WasmTerraExecuteContractGeneric_ + // *Message_WasmExecuteContractTransferMessage + // *Message_WasmExecuteContractSendMessage + // *Message_WasmExecuteContractGeneric_ + // *Message_SignDirectMessage + // *Message_AuthGrant_ + // *Message_AuthRevoke_ + // *Message_SetWithdrawAddressMessage + // *Message_MsgVote_ + // *Message_MsgStrideLiquidStakingStake_ + // *Message_MsgStrideLiquidStakingRedeem_ + // *Message_ThorchainDepositMessage + // *Message_WasmInstantiateContractMessage + MessageOneof isMessage_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message) Reset() { + *x = Message{} + mi := &file_Cosmos_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5} +} + +func (x *Message) GetMessageOneof() isMessage_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *Message) GetSendCoinsMessage() *Message_Send { + if x != nil { + if x, ok := x.MessageOneof.(*Message_SendCoinsMessage); ok { + return x.SendCoinsMessage + } + } + return nil +} + +func (x *Message) GetTransferTokensMessage() *Message_Transfer { + if x != nil { + if x, ok := x.MessageOneof.(*Message_TransferTokensMessage); ok { + return x.TransferTokensMessage + } + } + return nil +} + +func (x *Message) GetStakeMessage() *Message_Delegate { + if x != nil { + if x, ok := x.MessageOneof.(*Message_StakeMessage); ok { + return x.StakeMessage + } + } + return nil +} + +func (x *Message) GetUnstakeMessage() *Message_Undelegate { + if x != nil { + if x, ok := x.MessageOneof.(*Message_UnstakeMessage); ok { + return x.UnstakeMessage + } + } + return nil +} + +func (x *Message) GetRestakeMessage() *Message_BeginRedelegate { + if x != nil { + if x, ok := x.MessageOneof.(*Message_RestakeMessage); ok { + return x.RestakeMessage + } + } + return nil +} + +func (x *Message) GetWithdrawStakeRewardMessage() *Message_WithdrawDelegationReward { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WithdrawStakeRewardMessage); ok { + return x.WithdrawStakeRewardMessage + } + } + return nil +} + +func (x *Message) GetRawJsonMessage() *Message_RawJSON { + if x != nil { + if x, ok := x.MessageOneof.(*Message_RawJsonMessage); ok { + return x.RawJsonMessage + } + } + return nil +} + +func (x *Message) GetWasmTerraExecuteContractTransferMessage() *Message_WasmTerraExecuteContractTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmTerraExecuteContractTransferMessage); ok { + return x.WasmTerraExecuteContractTransferMessage + } + } + return nil +} + +func (x *Message) GetWasmTerraExecuteContractSendMessage() *Message_WasmTerraExecuteContractSend { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmTerraExecuteContractSendMessage); ok { + return x.WasmTerraExecuteContractSendMessage + } + } + return nil +} + +func (x *Message) GetThorchainSendMessage() *Message_THORChainSend { + if x != nil { + if x, ok := x.MessageOneof.(*Message_ThorchainSendMessage); ok { + return x.ThorchainSendMessage + } + } + return nil +} + +func (x *Message) GetWasmTerraExecuteContractGeneric() *Message_WasmTerraExecuteContractGeneric { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmTerraExecuteContractGeneric_); ok { + return x.WasmTerraExecuteContractGeneric + } + } + return nil +} + +func (x *Message) GetWasmExecuteContractTransferMessage() *Message_WasmExecuteContractTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmExecuteContractTransferMessage); ok { + return x.WasmExecuteContractTransferMessage + } + } + return nil +} + +func (x *Message) GetWasmExecuteContractSendMessage() *Message_WasmExecuteContractSend { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmExecuteContractSendMessage); ok { + return x.WasmExecuteContractSendMessage + } + } + return nil +} + +func (x *Message) GetWasmExecuteContractGeneric() *Message_WasmExecuteContractGeneric { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmExecuteContractGeneric_); ok { + return x.WasmExecuteContractGeneric + } + } + return nil +} + +func (x *Message) GetSignDirectMessage() *Message_SignDirect { + if x != nil { + if x, ok := x.MessageOneof.(*Message_SignDirectMessage); ok { + return x.SignDirectMessage + } + } + return nil +} + +func (x *Message) GetAuthGrant() *Message_AuthGrant { + if x != nil { + if x, ok := x.MessageOneof.(*Message_AuthGrant_); ok { + return x.AuthGrant + } + } + return nil +} + +func (x *Message) GetAuthRevoke() *Message_AuthRevoke { + if x != nil { + if x, ok := x.MessageOneof.(*Message_AuthRevoke_); ok { + return x.AuthRevoke + } + } + return nil +} + +func (x *Message) GetSetWithdrawAddressMessage() *Message_SetWithdrawAddress { + if x != nil { + if x, ok := x.MessageOneof.(*Message_SetWithdrawAddressMessage); ok { + return x.SetWithdrawAddressMessage + } + } + return nil +} + +func (x *Message) GetMsgVote() *Message_MsgVote { + if x != nil { + if x, ok := x.MessageOneof.(*Message_MsgVote_); ok { + return x.MsgVote + } + } + return nil +} + +func (x *Message) GetMsgStrideLiquidStakingStake() *Message_MsgStrideLiquidStakingStake { + if x != nil { + if x, ok := x.MessageOneof.(*Message_MsgStrideLiquidStakingStake_); ok { + return x.MsgStrideLiquidStakingStake + } + } + return nil +} + +func (x *Message) GetMsgStrideLiquidStakingRedeem() *Message_MsgStrideLiquidStakingRedeem { + if x != nil { + if x, ok := x.MessageOneof.(*Message_MsgStrideLiquidStakingRedeem_); ok { + return x.MsgStrideLiquidStakingRedeem + } + } + return nil +} + +func (x *Message) GetThorchainDepositMessage() *Message_THORChainDeposit { + if x != nil { + if x, ok := x.MessageOneof.(*Message_ThorchainDepositMessage); ok { + return x.ThorchainDepositMessage + } + } + return nil +} + +func (x *Message) GetWasmInstantiateContractMessage() *Message_WasmInstantiateContract { + if x != nil { + if x, ok := x.MessageOneof.(*Message_WasmInstantiateContractMessage); ok { + return x.WasmInstantiateContractMessage + } + } + return nil +} + +type isMessage_MessageOneof interface { + isMessage_MessageOneof() +} + +type Message_SendCoinsMessage struct { + SendCoinsMessage *Message_Send `protobuf:"bytes,1,opt,name=send_coins_message,json=sendCoinsMessage,proto3,oneof"` +} + +type Message_TransferTokensMessage struct { + TransferTokensMessage *Message_Transfer `protobuf:"bytes,2,opt,name=transfer_tokens_message,json=transferTokensMessage,proto3,oneof"` +} + +type Message_StakeMessage struct { + StakeMessage *Message_Delegate `protobuf:"bytes,3,opt,name=stake_message,json=stakeMessage,proto3,oneof"` +} + +type Message_UnstakeMessage struct { + UnstakeMessage *Message_Undelegate `protobuf:"bytes,4,opt,name=unstake_message,json=unstakeMessage,proto3,oneof"` +} + +type Message_RestakeMessage struct { + RestakeMessage *Message_BeginRedelegate `protobuf:"bytes,5,opt,name=restake_message,json=restakeMessage,proto3,oneof"` +} + +type Message_WithdrawStakeRewardMessage struct { + WithdrawStakeRewardMessage *Message_WithdrawDelegationReward `protobuf:"bytes,6,opt,name=withdraw_stake_reward_message,json=withdrawStakeRewardMessage,proto3,oneof"` +} + +type Message_RawJsonMessage struct { + RawJsonMessage *Message_RawJSON `protobuf:"bytes,7,opt,name=raw_json_message,json=rawJsonMessage,proto3,oneof"` +} + +type Message_WasmTerraExecuteContractTransferMessage struct { + WasmTerraExecuteContractTransferMessage *Message_WasmTerraExecuteContractTransfer `protobuf:"bytes,8,opt,name=wasm_terra_execute_contract_transfer_message,json=wasmTerraExecuteContractTransferMessage,proto3,oneof"` +} + +type Message_WasmTerraExecuteContractSendMessage struct { + WasmTerraExecuteContractSendMessage *Message_WasmTerraExecuteContractSend `protobuf:"bytes,9,opt,name=wasm_terra_execute_contract_send_message,json=wasmTerraExecuteContractSendMessage,proto3,oneof"` +} + +type Message_ThorchainSendMessage struct { + ThorchainSendMessage *Message_THORChainSend `protobuf:"bytes,10,opt,name=thorchain_send_message,json=thorchainSendMessage,proto3,oneof"` +} + +type Message_WasmTerraExecuteContractGeneric_ struct { + WasmTerraExecuteContractGeneric *Message_WasmTerraExecuteContractGeneric `protobuf:"bytes,12,opt,name=wasm_terra_execute_contract_generic,json=wasmTerraExecuteContractGeneric,proto3,oneof"` +} + +type Message_WasmExecuteContractTransferMessage struct { + WasmExecuteContractTransferMessage *Message_WasmExecuteContractTransfer `protobuf:"bytes,13,opt,name=wasm_execute_contract_transfer_message,json=wasmExecuteContractTransferMessage,proto3,oneof"` +} + +type Message_WasmExecuteContractSendMessage struct { + WasmExecuteContractSendMessage *Message_WasmExecuteContractSend `protobuf:"bytes,14,opt,name=wasm_execute_contract_send_message,json=wasmExecuteContractSendMessage,proto3,oneof"` +} + +type Message_WasmExecuteContractGeneric_ struct { + WasmExecuteContractGeneric *Message_WasmExecuteContractGeneric `protobuf:"bytes,15,opt,name=wasm_execute_contract_generic,json=wasmExecuteContractGeneric,proto3,oneof"` +} + +type Message_SignDirectMessage struct { + SignDirectMessage *Message_SignDirect `protobuf:"bytes,16,opt,name=sign_direct_message,json=signDirectMessage,proto3,oneof"` +} + +type Message_AuthGrant_ struct { + AuthGrant *Message_AuthGrant `protobuf:"bytes,17,opt,name=auth_grant,json=authGrant,proto3,oneof"` +} + +type Message_AuthRevoke_ struct { + AuthRevoke *Message_AuthRevoke `protobuf:"bytes,18,opt,name=auth_revoke,json=authRevoke,proto3,oneof"` +} + +type Message_SetWithdrawAddressMessage struct { + SetWithdrawAddressMessage *Message_SetWithdrawAddress `protobuf:"bytes,19,opt,name=set_withdraw_address_message,json=setWithdrawAddressMessage,proto3,oneof"` +} + +type Message_MsgVote_ struct { + MsgVote *Message_MsgVote `protobuf:"bytes,20,opt,name=msg_vote,json=msgVote,proto3,oneof"` +} + +type Message_MsgStrideLiquidStakingStake_ struct { + MsgStrideLiquidStakingStake *Message_MsgStrideLiquidStakingStake `protobuf:"bytes,21,opt,name=msg_stride_liquid_staking_stake,json=msgStrideLiquidStakingStake,proto3,oneof"` +} + +type Message_MsgStrideLiquidStakingRedeem_ struct { + MsgStrideLiquidStakingRedeem *Message_MsgStrideLiquidStakingRedeem `protobuf:"bytes,22,opt,name=msg_stride_liquid_staking_redeem,json=msgStrideLiquidStakingRedeem,proto3,oneof"` +} + +type Message_ThorchainDepositMessage struct { + ThorchainDepositMessage *Message_THORChainDeposit `protobuf:"bytes,23,opt,name=thorchain_deposit_message,json=thorchainDepositMessage,proto3,oneof"` +} + +type Message_WasmInstantiateContractMessage struct { + WasmInstantiateContractMessage *Message_WasmInstantiateContract `protobuf:"bytes,24,opt,name=wasm_instantiate_contract_message,json=wasmInstantiateContractMessage,proto3,oneof"` +} + +func (*Message_SendCoinsMessage) isMessage_MessageOneof() {} + +func (*Message_TransferTokensMessage) isMessage_MessageOneof() {} + +func (*Message_StakeMessage) isMessage_MessageOneof() {} + +func (*Message_UnstakeMessage) isMessage_MessageOneof() {} + +func (*Message_RestakeMessage) isMessage_MessageOneof() {} + +func (*Message_WithdrawStakeRewardMessage) isMessage_MessageOneof() {} + +func (*Message_RawJsonMessage) isMessage_MessageOneof() {} + +func (*Message_WasmTerraExecuteContractTransferMessage) isMessage_MessageOneof() {} + +func (*Message_WasmTerraExecuteContractSendMessage) isMessage_MessageOneof() {} + +func (*Message_ThorchainSendMessage) isMessage_MessageOneof() {} + +func (*Message_WasmTerraExecuteContractGeneric_) isMessage_MessageOneof() {} + +func (*Message_WasmExecuteContractTransferMessage) isMessage_MessageOneof() {} + +func (*Message_WasmExecuteContractSendMessage) isMessage_MessageOneof() {} + +func (*Message_WasmExecuteContractGeneric_) isMessage_MessageOneof() {} + +func (*Message_SignDirectMessage) isMessage_MessageOneof() {} + +func (*Message_AuthGrant_) isMessage_MessageOneof() {} + +func (*Message_AuthRevoke_) isMessage_MessageOneof() {} + +func (*Message_SetWithdrawAddressMessage) isMessage_MessageOneof() {} + +func (*Message_MsgVote_) isMessage_MessageOneof() {} + +func (*Message_MsgStrideLiquidStakingStake_) isMessage_MessageOneof() {} + +func (*Message_MsgStrideLiquidStakingRedeem_) isMessage_MessageOneof() {} + +func (*Message_ThorchainDepositMessage) isMessage_MessageOneof() {} + +func (*Message_WasmInstantiateContractMessage) isMessage_MessageOneof() {} + +// Custom Signer info required to sign a transaction and generate a broadcast JSON message. +type SignerInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Public key type used to sign a transaction. + // It can be different from the value from `registry.json`. + PublicKeyType SignerPublicKeyType `protobuf:"varint,1,opt,name=public_key_type,json=publicKeyType,proto3,enum=TW.Cosmos.Proto.SignerPublicKeyType" json:"public_key_type,omitempty"` + JsonType string `protobuf:"bytes,2,opt,name=json_type,json=jsonType,proto3" json:"json_type,omitempty"` + ProtobufType string `protobuf:"bytes,3,opt,name=protobuf_type,json=protobufType,proto3" json:"protobuf_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignerInfo) Reset() { + *x = SignerInfo{} + mi := &file_Cosmos_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignerInfo) ProtoMessage() {} + +func (x *SignerInfo) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignerInfo.ProtoReflect.Descriptor instead. +func (*SignerInfo) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{6} +} + +func (x *SignerInfo) GetPublicKeyType() SignerPublicKeyType { + if x != nil { + return x.PublicKeyType + } + return SignerPublicKeyType_Secp256k1 +} + +func (x *SignerInfo) GetJsonType() string { + if x != nil { + return x.JsonType + } + return "" +} + +func (x *SignerInfo) GetProtobufType() string { + if x != nil { + return x.ProtobufType + } + return "" +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Specify if protobuf (a.k.a. Stargate) or earlier JSON serialization is used + SigningMode SigningMode `protobuf:"varint,1,opt,name=signing_mode,json=signingMode,proto3,enum=TW.Cosmos.Proto.SigningMode" json:"signing_mode,omitempty"` + // Source account number + AccountNumber uint64 `protobuf:"varint,2,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // Chain ID (string) + ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Transaction fee + Fee *Fee `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee,omitempty"` + // Optional memo + Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` + // Sequence number (account specific) + Sequence uint64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,7,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Payload message(s) + Messages []*Message `protobuf:"bytes,8,rep,name=messages,proto3" json:"messages,omitempty"` + // Broadcast mode (included in output, relevant when broadcasting) + Mode BroadcastMode `protobuf:"varint,9,opt,name=mode,proto3,enum=TW.Cosmos.Proto.BroadcastMode" json:"mode,omitempty"` + PublicKey []byte `protobuf:"bytes,10,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + TxHasher TxHasher `protobuf:"varint,11,opt,name=tx_hasher,json=txHasher,proto3,enum=TW.Cosmos.Proto.TxHasher" json:"tx_hasher,omitempty"` + // Optional. If set, use a different Signer info when signing the transaction. + SignerInfo *SignerInfo `protobuf:"bytes,12,opt,name=signer_info,json=signerInfo,proto3" json:"signer_info,omitempty"` + // Optional timeout_height + TimeoutHeight uint64 `protobuf:"varint,13,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Cosmos_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{7} +} + +func (x *SigningInput) GetSigningMode() SigningMode { + if x != nil { + return x.SigningMode + } + return SigningMode_JSON +} + +func (x *SigningInput) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber + } + return 0 +} + +func (x *SigningInput) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *SigningInput) GetFee() *Fee { + if x != nil { + return x.Fee + } + return nil +} + +func (x *SigningInput) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *SigningInput) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +func (x *SigningInput) GetMode() BroadcastMode { + if x != nil { + return x.Mode + } + return BroadcastMode_BLOCK +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *SigningInput) GetTxHasher() TxHasher { + if x != nil { + return x.TxHasher + } + return TxHasher_UseDefault +} + +func (x *SigningInput) GetSignerInfo() *SignerInfo { + if x != nil { + return x.SignerInfo + } + return nil +} + +func (x *SigningInput) GetTimeoutHeight() uint64 { + if x != nil { + return x.TimeoutHeight + } + return 0 +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signature + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // Signed transaction in JSON (pre-Stargate case) + Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` + // Signed transaction containing protobuf encoded, Base64-encoded form (Stargate case), + // wrapped in a ready-to-broadcast json. + Serialized string `protobuf:"bytes,3,opt,name=serialized,proto3" json:"serialized,omitempty"` + // signatures array json string + SignatureJson string `protobuf:"bytes,4,opt,name=signature_json,json=signatureJson,proto3" json:"signature_json,omitempty"` + // error description + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + Error common.SigningError `protobuf:"varint,6,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Cosmos_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{8} +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *SigningOutput) GetSerialized() string { + if x != nil { + return x.Serialized + } + return "" +} + +func (x *SigningOutput) GetSignatureJson() string { + if x != nil { + return x.SignatureJson + } + return "" +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +// cosmos-sdk/MsgSend +type Message_Send struct { + state protoimpl.MessageState `protogen:"open.v1"` + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amounts []*Amount `protobuf:"bytes,3,rep,name=amounts,proto3" json:"amounts,omitempty"` + TypePrefix string `protobuf:"bytes,4,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_Send) Reset() { + *x = Message_Send{} + mi := &file_Cosmos_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_Send) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_Send) ProtoMessage() {} + +func (x *Message_Send) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_Send.ProtoReflect.Descriptor instead. +func (*Message_Send) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *Message_Send) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *Message_Send) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Message_Send) GetAmounts() []*Amount { + if x != nil { + return x.Amounts + } + return nil +} + +func (x *Message_Send) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// cosmos-sdk/MsgTransfer, IBC transfer +type Message_Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // IBC port, e.g. "transfer" + SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty"` + // IBC connection channel, e.g. "channel-141", see apis /ibc/applications/transfer/v1beta1/denom_traces (connections) or /node_info (own channel) + SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty"` + Token *Amount `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` + // Timeout block height. Either timeout height or timestamp should be set. + // Recommendation is to set height, to rev. 1 and block current + 1000 (see api /blocks/latest) + TimeoutHeight *Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + // Timeout timestamp (in nanoseconds) relative to the current block timestamp. Either timeout height or timestamp should be set. + TimeoutTimestamp uint64 `protobuf:"varint,7,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_Transfer) Reset() { + *x = Message_Transfer{} + mi := &file_Cosmos_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_Transfer) ProtoMessage() {} + +func (x *Message_Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_Transfer.ProtoReflect.Descriptor instead. +func (*Message_Transfer) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 1} +} + +func (x *Message_Transfer) GetSourcePort() string { + if x != nil { + return x.SourcePort + } + return "" +} + +func (x *Message_Transfer) GetSourceChannel() string { + if x != nil { + return x.SourceChannel + } + return "" +} + +func (x *Message_Transfer) GetToken() *Amount { + if x != nil { + return x.Token + } + return nil +} + +func (x *Message_Transfer) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *Message_Transfer) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *Message_Transfer) GetTimeoutHeight() *Height { + if x != nil { + return x.TimeoutHeight + } + return nil +} + +func (x *Message_Transfer) GetTimeoutTimestamp() uint64 { + if x != nil { + return x.TimeoutTimestamp + } + return 0 +} + +// cosmos-sdk/MsgDelegate to stake +type Message_Delegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + TypePrefix string `protobuf:"bytes,4,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_Delegate) Reset() { + *x = Message_Delegate{} + mi := &file_Cosmos_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_Delegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_Delegate) ProtoMessage() {} + +func (x *Message_Delegate) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_Delegate.ProtoReflect.Descriptor instead. +func (*Message_Delegate) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 2} +} + +func (x *Message_Delegate) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *Message_Delegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *Message_Delegate) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_Delegate) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// cosmos-sdk/MsgUndelegate to unstake +type Message_Undelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + TypePrefix string `protobuf:"bytes,4,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_Undelegate) Reset() { + *x = Message_Undelegate{} + mi := &file_Cosmos_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_Undelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_Undelegate) ProtoMessage() {} + +func (x *Message_Undelegate) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_Undelegate.ProtoReflect.Descriptor instead. +func (*Message_Undelegate) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 3} +} + +func (x *Message_Undelegate) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *Message_Undelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *Message_Undelegate) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_Undelegate) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// cosmos-sdk/MsgBeginRedelegate +type Message_BeginRedelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorSrcAddress string `protobuf:"bytes,2,opt,name=validator_src_address,json=validatorSrcAddress,proto3" json:"validator_src_address,omitempty"` + ValidatorDstAddress string `protobuf:"bytes,3,opt,name=validator_dst_address,json=validatorDstAddress,proto3" json:"validator_dst_address,omitempty"` + Amount *Amount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + TypePrefix string `protobuf:"bytes,5,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_BeginRedelegate) Reset() { + *x = Message_BeginRedelegate{} + mi := &file_Cosmos_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_BeginRedelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_BeginRedelegate) ProtoMessage() {} + +func (x *Message_BeginRedelegate) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_BeginRedelegate.ProtoReflect.Descriptor instead. +func (*Message_BeginRedelegate) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 4} +} + +func (x *Message_BeginRedelegate) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *Message_BeginRedelegate) GetValidatorSrcAddress() string { + if x != nil { + return x.ValidatorSrcAddress + } + return "" +} + +func (x *Message_BeginRedelegate) GetValidatorDstAddress() string { + if x != nil { + return x.ValidatorDstAddress + } + return "" +} + +func (x *Message_BeginRedelegate) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_BeginRedelegate) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// cosmos-sdk/MsgSetWithdrawAddress +type Message_SetWithdrawAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + WithdrawAddress string `protobuf:"bytes,2,opt,name=withdraw_address,json=withdrawAddress,proto3" json:"withdraw_address,omitempty"` + TypePrefix string `protobuf:"bytes,3,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_SetWithdrawAddress) Reset() { + *x = Message_SetWithdrawAddress{} + mi := &file_Cosmos_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_SetWithdrawAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_SetWithdrawAddress) ProtoMessage() {} + +func (x *Message_SetWithdrawAddress) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_SetWithdrawAddress.ProtoReflect.Descriptor instead. +func (*Message_SetWithdrawAddress) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 5} +} + +func (x *Message_SetWithdrawAddress) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *Message_SetWithdrawAddress) GetWithdrawAddress() string { + if x != nil { + return x.WithdrawAddress + } + return "" +} + +func (x *Message_SetWithdrawAddress) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// cosmos-sdk/MsgWithdrawDelegationReward +type Message_WithdrawDelegationReward struct { + state protoimpl.MessageState `protogen:"open.v1"` + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + TypePrefix string `protobuf:"bytes,3,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WithdrawDelegationReward) Reset() { + *x = Message_WithdrawDelegationReward{} + mi := &file_Cosmos_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WithdrawDelegationReward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WithdrawDelegationReward) ProtoMessage() {} + +func (x *Message_WithdrawDelegationReward) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WithdrawDelegationReward.ProtoReflect.Descriptor instead. +func (*Message_WithdrawDelegationReward) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 6} +} + +func (x *Message_WithdrawDelegationReward) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *Message_WithdrawDelegationReward) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *Message_WithdrawDelegationReward) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// transfer within wasm/MsgExecuteContract, used by Terra Classic +type Message_WasmTerraExecuteContractTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender address + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // token contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // size is uint128, as bigint + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + RecipientAddress string `protobuf:"bytes,4,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmTerraExecuteContractTransfer) Reset() { + *x = Message_WasmTerraExecuteContractTransfer{} + mi := &file_Cosmos_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmTerraExecuteContractTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmTerraExecuteContractTransfer) ProtoMessage() {} + +func (x *Message_WasmTerraExecuteContractTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmTerraExecuteContractTransfer.ProtoReflect.Descriptor instead. +func (*Message_WasmTerraExecuteContractTransfer) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 7} +} + +func (x *Message_WasmTerraExecuteContractTransfer) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractTransfer) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractTransfer) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_WasmTerraExecuteContractTransfer) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +// send within wasm/MsgExecuteContract, used by Terra Classic +type Message_WasmTerraExecuteContractSend struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender address + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // token contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // size is uint128, as bigint + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + RecipientContractAddress string `protobuf:"bytes,4,opt,name=recipient_contract_address,json=recipientContractAddress,proto3" json:"recipient_contract_address,omitempty"` + // execute_msg to be executed in the context of recipient contract + Msg string `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` + // used in case you are sending native tokens along with this message + Coin []string `protobuf:"bytes,6,rep,name=coin,proto3" json:"coin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmTerraExecuteContractSend) Reset() { + *x = Message_WasmTerraExecuteContractSend{} + mi := &file_Cosmos_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmTerraExecuteContractSend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmTerraExecuteContractSend) ProtoMessage() {} + +func (x *Message_WasmTerraExecuteContractSend) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmTerraExecuteContractSend.ProtoReflect.Descriptor instead. +func (*Message_WasmTerraExecuteContractSend) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 8} +} + +func (x *Message_WasmTerraExecuteContractSend) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractSend) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractSend) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_WasmTerraExecuteContractSend) GetRecipientContractAddress() string { + if x != nil { + return x.RecipientContractAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractSend) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *Message_WasmTerraExecuteContractSend) GetCoin() []string { + if x != nil { + return x.Coin + } + return nil +} + +// thorchain/MsgSend +type Message_THORChainSend struct { + state protoimpl.MessageState `protogen:"open.v1"` + FromAddress []byte `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress []byte `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amounts []*Amount `protobuf:"bytes,3,rep,name=amounts,proto3" json:"amounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_THORChainSend) Reset() { + *x = Message_THORChainSend{} + mi := &file_Cosmos_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_THORChainSend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_THORChainSend) ProtoMessage() {} + +func (x *Message_THORChainSend) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_THORChainSend.ProtoReflect.Descriptor instead. +func (*Message_THORChainSend) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 9} +} + +func (x *Message_THORChainSend) GetFromAddress() []byte { + if x != nil { + return x.FromAddress + } + return nil +} + +func (x *Message_THORChainSend) GetToAddress() []byte { + if x != nil { + return x.ToAddress + } + return nil +} + +func (x *Message_THORChainSend) GetAmounts() []*Amount { + if x != nil { + return x.Amounts + } + return nil +} + +// thorchain/MsgDeposit +type Message_THORChainDeposit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Coins []*THORChainCoin `protobuf:"bytes,1,rep,name=coins,proto3" json:"coins,omitempty"` + Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + Signer []byte `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_THORChainDeposit) Reset() { + *x = Message_THORChainDeposit{} + mi := &file_Cosmos_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_THORChainDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_THORChainDeposit) ProtoMessage() {} + +func (x *Message_THORChainDeposit) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_THORChainDeposit.ProtoReflect.Descriptor instead. +func (*Message_THORChainDeposit) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 10} +} + +func (x *Message_THORChainDeposit) GetCoins() []*THORChainCoin { + if x != nil { + return x.Coins + } + return nil +} + +func (x *Message_THORChainDeposit) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *Message_THORChainDeposit) GetSigner() []byte { + if x != nil { + return x.Signer + } + return nil +} + +// execute within wasm/MsgExecuteContract, used by Terra Classic +type Message_WasmTerraExecuteContractGeneric struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender address + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // token contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // execute_msg to be executed in the context of recipient contract + ExecuteMsg string `protobuf:"bytes,3,opt,name=execute_msg,json=executeMsg,proto3" json:"execute_msg,omitempty"` + // used in case you are sending native tokens along with this message + // Gap in field numbering is intentional + Coins []*Amount `protobuf:"bytes,5,rep,name=coins,proto3" json:"coins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmTerraExecuteContractGeneric) Reset() { + *x = Message_WasmTerraExecuteContractGeneric{} + mi := &file_Cosmos_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmTerraExecuteContractGeneric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmTerraExecuteContractGeneric) ProtoMessage() {} + +func (x *Message_WasmTerraExecuteContractGeneric) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmTerraExecuteContractGeneric.ProtoReflect.Descriptor instead. +func (*Message_WasmTerraExecuteContractGeneric) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 11} +} + +func (x *Message_WasmTerraExecuteContractGeneric) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractGeneric) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Message_WasmTerraExecuteContractGeneric) GetExecuteMsg() string { + if x != nil { + return x.ExecuteMsg + } + return "" +} + +func (x *Message_WasmTerraExecuteContractGeneric) GetCoins() []*Amount { + if x != nil { + return x.Coins + } + return nil +} + +// transfer within wasm/MsgExecuteContract +type Message_WasmExecuteContractTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender address + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // token contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // size is uint128, as bigint + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + RecipientAddress string `protobuf:"bytes,4,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmExecuteContractTransfer) Reset() { + *x = Message_WasmExecuteContractTransfer{} + mi := &file_Cosmos_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmExecuteContractTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmExecuteContractTransfer) ProtoMessage() {} + +func (x *Message_WasmExecuteContractTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmExecuteContractTransfer.ProtoReflect.Descriptor instead. +func (*Message_WasmExecuteContractTransfer) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 12} +} + +func (x *Message_WasmExecuteContractTransfer) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *Message_WasmExecuteContractTransfer) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Message_WasmExecuteContractTransfer) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_WasmExecuteContractTransfer) GetRecipientAddress() string { + if x != nil { + return x.RecipientAddress + } + return "" +} + +// send within wasm/MsgExecuteContract +type Message_WasmExecuteContractSend struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender address + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // token contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // size is uint128, as bigint + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + RecipientContractAddress string `protobuf:"bytes,4,opt,name=recipient_contract_address,json=recipientContractAddress,proto3" json:"recipient_contract_address,omitempty"` + // execute_msg to be executed in the context of recipient contract + Msg string `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` + // used in case you are sending native tokens along with this message + Coin []string `protobuf:"bytes,6,rep,name=coin,proto3" json:"coin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmExecuteContractSend) Reset() { + *x = Message_WasmExecuteContractSend{} + mi := &file_Cosmos_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmExecuteContractSend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmExecuteContractSend) ProtoMessage() {} + +func (x *Message_WasmExecuteContractSend) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmExecuteContractSend.ProtoReflect.Descriptor instead. +func (*Message_WasmExecuteContractSend) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 13} +} + +func (x *Message_WasmExecuteContractSend) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *Message_WasmExecuteContractSend) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Message_WasmExecuteContractSend) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_WasmExecuteContractSend) GetRecipientContractAddress() string { + if x != nil { + return x.RecipientContractAddress + } + return "" +} + +func (x *Message_WasmExecuteContractSend) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *Message_WasmExecuteContractSend) GetCoin() []string { + if x != nil { + return x.Coin + } + return nil +} + +// execute within wasm/MsgExecuteContract +// TODO replaces `ExecuteContract`. +type Message_WasmExecuteContractGeneric struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender address + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // token contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // execute_msg to be executed in the context of recipient contract + ExecuteMsg string `protobuf:"bytes,3,opt,name=execute_msg,json=executeMsg,proto3" json:"execute_msg,omitempty"` + // used in case you are sending native tokens along with this message + // Gap in field numbering is intentional + Coins []*Amount `protobuf:"bytes,5,rep,name=coins,proto3" json:"coins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmExecuteContractGeneric) Reset() { + *x = Message_WasmExecuteContractGeneric{} + mi := &file_Cosmos_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmExecuteContractGeneric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmExecuteContractGeneric) ProtoMessage() {} + +func (x *Message_WasmExecuteContractGeneric) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmExecuteContractGeneric.ProtoReflect.Descriptor instead. +func (*Message_WasmExecuteContractGeneric) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 14} +} + +func (x *Message_WasmExecuteContractGeneric) GetSenderAddress() string { + if x != nil { + return x.SenderAddress + } + return "" +} + +func (x *Message_WasmExecuteContractGeneric) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *Message_WasmExecuteContractGeneric) GetExecuteMsg() string { + if x != nil { + return x.ExecuteMsg + } + return "" +} + +func (x *Message_WasmExecuteContractGeneric) GetCoins() []*Amount { + if x != nil { + return x.Coins + } + return nil +} + +// MsgInstantiateContract defines a message for instantiating a new CosmWasm contract. +type Message_WasmInstantiateContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` + CodeId uint64 `protobuf:"varint,3,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` + Msg []byte `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"` + InitFunds []*Amount `protobuf:"bytes,6,rep,name=init_funds,json=initFunds,proto3" json:"init_funds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_WasmInstantiateContract) Reset() { + *x = Message_WasmInstantiateContract{} + mi := &file_Cosmos_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_WasmInstantiateContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_WasmInstantiateContract) ProtoMessage() {} + +func (x *Message_WasmInstantiateContract) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_WasmInstantiateContract.ProtoReflect.Descriptor instead. +func (*Message_WasmInstantiateContract) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 15} +} + +func (x *Message_WasmInstantiateContract) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *Message_WasmInstantiateContract) GetAdmin() string { + if x != nil { + return x.Admin + } + return "" +} + +func (x *Message_WasmInstantiateContract) GetCodeId() uint64 { + if x != nil { + return x.CodeId + } + return 0 +} + +func (x *Message_WasmInstantiateContract) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *Message_WasmInstantiateContract) GetMsg() []byte { + if x != nil { + return x.Msg + } + return nil +} + +func (x *Message_WasmInstantiateContract) GetInitFunds() []*Amount { + if x != nil { + return x.InitFunds + } + return nil +} + +type Message_RawJSON struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_RawJSON) Reset() { + *x = Message_RawJSON{} + mi := &file_Cosmos_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_RawJSON) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_RawJSON) ProtoMessage() {} + +func (x *Message_RawJSON) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_RawJSON.ProtoReflect.Descriptor instead. +func (*Message_RawJSON) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 16} +} + +func (x *Message_RawJSON) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Message_RawJSON) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// For signing an already serialized transaction. Account number and chain ID must be set outside. +type Message_SignDirect struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The prepared serialized TxBody + // Required + BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` + // The prepared serialized AuthInfo + // Optional. If not provided, will be generated from `SigningInput` parameters. + AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_SignDirect) Reset() { + *x = Message_SignDirect{} + mi := &file_Cosmos_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_SignDirect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_SignDirect) ProtoMessage() {} + +func (x *Message_SignDirect) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_SignDirect.ProtoReflect.Descriptor instead. +func (*Message_SignDirect) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 17} +} + +func (x *Message_SignDirect) GetBodyBytes() []byte { + if x != nil { + return x.BodyBytes + } + return nil +} + +func (x *Message_SignDirect) GetAuthInfoBytes() []byte { + if x != nil { + return x.AuthInfoBytes + } + return nil +} + +// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +// +// Since: cosmos-sdk 0.43 +type Message_StakeAuthorization struct { + state protoimpl.MessageState `protogen:"open.v1"` + // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + // empty, there is no spend limit and any amount of coins can be delegated. + MaxTokens *Amount `protobuf:"bytes,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` + // validators is the oneof that represents either allow_list or deny_list + // + // Types that are valid to be assigned to Validators: + // + // *Message_StakeAuthorization_AllowList + // *Message_StakeAuthorization_DenyList + Validators isMessage_StakeAuthorization_Validators `protobuf_oneof:"validators"` + // authorization_type defines one of AuthorizationType. + AuthorizationType Message_AuthorizationType `protobuf:"varint,4,opt,name=authorization_type,json=authorizationType,proto3,enum=TW.Cosmos.Proto.Message_AuthorizationType" json:"authorization_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_StakeAuthorization) Reset() { + *x = Message_StakeAuthorization{} + mi := &file_Cosmos_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_StakeAuthorization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_StakeAuthorization) ProtoMessage() {} + +func (x *Message_StakeAuthorization) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_StakeAuthorization.ProtoReflect.Descriptor instead. +func (*Message_StakeAuthorization) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 18} +} + +func (x *Message_StakeAuthorization) GetMaxTokens() *Amount { + if x != nil { + return x.MaxTokens + } + return nil +} + +func (x *Message_StakeAuthorization) GetValidators() isMessage_StakeAuthorization_Validators { + if x != nil { + return x.Validators + } + return nil +} + +func (x *Message_StakeAuthorization) GetAllowList() *Message_StakeAuthorization_Validators { + if x != nil { + if x, ok := x.Validators.(*Message_StakeAuthorization_AllowList); ok { + return x.AllowList + } + } + return nil +} + +func (x *Message_StakeAuthorization) GetDenyList() *Message_StakeAuthorization_Validators { + if x != nil { + if x, ok := x.Validators.(*Message_StakeAuthorization_DenyList); ok { + return x.DenyList + } + } + return nil +} + +func (x *Message_StakeAuthorization) GetAuthorizationType() Message_AuthorizationType { + if x != nil { + return x.AuthorizationType + } + return Message_UNSPECIFIED +} + +type isMessage_StakeAuthorization_Validators interface { + isMessage_StakeAuthorization_Validators() +} + +type Message_StakeAuthorization_AllowList struct { + // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + // account. + AllowList *Message_StakeAuthorization_Validators `protobuf:"bytes,2,opt,name=allow_list,json=allowList,proto3,oneof"` +} + +type Message_StakeAuthorization_DenyList struct { + // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + DenyList *Message_StakeAuthorization_Validators `protobuf:"bytes,3,opt,name=deny_list,json=denyList,proto3,oneof"` +} + +func (*Message_StakeAuthorization_AllowList) isMessage_StakeAuthorization_Validators() {} + +func (*Message_StakeAuthorization_DenyList) isMessage_StakeAuthorization_Validators() {} + +// cosmos-sdk/MsgGrant +type Message_AuthGrant struct { + state protoimpl.MessageState `protogen:"open.v1"` + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + // Types that are valid to be assigned to GrantType: + // + // *Message_AuthGrant_GrantStake + GrantType isMessage_AuthGrant_GrantType `protobuf_oneof:"grant_type"` + Expiration int64 `protobuf:"varint,4,opt,name=expiration,proto3" json:"expiration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_AuthGrant) Reset() { + *x = Message_AuthGrant{} + mi := &file_Cosmos_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_AuthGrant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_AuthGrant) ProtoMessage() {} + +func (x *Message_AuthGrant) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_AuthGrant.ProtoReflect.Descriptor instead. +func (*Message_AuthGrant) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 19} +} + +func (x *Message_AuthGrant) GetGranter() string { + if x != nil { + return x.Granter + } + return "" +} + +func (x *Message_AuthGrant) GetGrantee() string { + if x != nil { + return x.Grantee + } + return "" +} + +func (x *Message_AuthGrant) GetGrantType() isMessage_AuthGrant_GrantType { + if x != nil { + return x.GrantType + } + return nil +} + +func (x *Message_AuthGrant) GetGrantStake() *Message_StakeAuthorization { + if x != nil { + if x, ok := x.GrantType.(*Message_AuthGrant_GrantStake); ok { + return x.GrantStake + } + } + return nil +} + +func (x *Message_AuthGrant) GetExpiration() int64 { + if x != nil { + return x.Expiration + } + return 0 +} + +type isMessage_AuthGrant_GrantType interface { + isMessage_AuthGrant_GrantType() +} + +type Message_AuthGrant_GrantStake struct { + GrantStake *Message_StakeAuthorization `protobuf:"bytes,3,opt,name=grant_stake,json=grantStake,proto3,oneof"` +} + +func (*Message_AuthGrant_GrantStake) isMessage_AuthGrant_GrantType() {} + +// cosmos-sdk/MsgRevoke +type Message_AuthRevoke struct { + state protoimpl.MessageState `protogen:"open.v1"` + Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` + Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` + MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_AuthRevoke) Reset() { + *x = Message_AuthRevoke{} + mi := &file_Cosmos_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_AuthRevoke) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_AuthRevoke) ProtoMessage() {} + +func (x *Message_AuthRevoke) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_AuthRevoke.ProtoReflect.Descriptor instead. +func (*Message_AuthRevoke) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 20} +} + +func (x *Message_AuthRevoke) GetGranter() string { + if x != nil { + return x.Granter + } + return "" +} + +func (x *Message_AuthRevoke) GetGrantee() string { + if x != nil { + return x.Grantee + } + return "" +} + +func (x *Message_AuthRevoke) GetMsgTypeUrl() string { + if x != nil { + return x.MsgTypeUrl + } + return "" +} + +// cosmos-sdk/MsgVote defines a message to cast a vote. +type Message_MsgVote struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + Option Message_VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=TW.Cosmos.Proto.Message_VoteOption" json:"option,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_MsgVote) Reset() { + *x = Message_MsgVote{} + mi := &file_Cosmos_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_MsgVote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_MsgVote) ProtoMessage() {} + +func (x *Message_MsgVote) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_MsgVote.ProtoReflect.Descriptor instead. +func (*Message_MsgVote) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 21} +} + +func (x *Message_MsgVote) GetProposalId() uint64 { + if x != nil { + return x.ProposalId + } + return 0 +} + +func (x *Message_MsgVote) GetVoter() string { + if x != nil { + return x.Voter + } + return "" +} + +func (x *Message_MsgVote) GetOption() Message_VoteOption { + if x != nil { + return x.Option + } + return Message__UNSPECIFIED +} + +type Message_MsgStrideLiquidStakingStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_MsgStrideLiquidStakingStake) Reset() { + *x = Message_MsgStrideLiquidStakingStake{} + mi := &file_Cosmos_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_MsgStrideLiquidStakingStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_MsgStrideLiquidStakingStake) ProtoMessage() {} + +func (x *Message_MsgStrideLiquidStakingStake) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_MsgStrideLiquidStakingStake.ProtoReflect.Descriptor instead. +func (*Message_MsgStrideLiquidStakingStake) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 22} +} + +func (x *Message_MsgStrideLiquidStakingStake) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *Message_MsgStrideLiquidStakingStake) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Message_MsgStrideLiquidStakingStake) GetHostDenom() string { + if x != nil { + return x.HostDenom + } + return "" +} + +type Message_MsgStrideLiquidStakingRedeem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + HostZone string `protobuf:"bytes,3,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` + Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_MsgStrideLiquidStakingRedeem) Reset() { + *x = Message_MsgStrideLiquidStakingRedeem{} + mi := &file_Cosmos_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_MsgStrideLiquidStakingRedeem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_MsgStrideLiquidStakingRedeem) ProtoMessage() {} + +func (x *Message_MsgStrideLiquidStakingRedeem) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_MsgStrideLiquidStakingRedeem.ProtoReflect.Descriptor instead. +func (*Message_MsgStrideLiquidStakingRedeem) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 23} +} + +func (x *Message_MsgStrideLiquidStakingRedeem) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *Message_MsgStrideLiquidStakingRedeem) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Message_MsgStrideLiquidStakingRedeem) GetHostZone() string { + if x != nil { + return x.HostZone + } + return "" +} + +func (x *Message_MsgStrideLiquidStakingRedeem) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +// Validators defines list of validator addresses. +type Message_StakeAuthorization_Validators struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address []string `protobuf:"bytes,1,rep,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_StakeAuthorization_Validators) Reset() { + *x = Message_StakeAuthorization_Validators{} + mi := &file_Cosmos_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_StakeAuthorization_Validators) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_StakeAuthorization_Validators) ProtoMessage() {} + +func (x *Message_StakeAuthorization_Validators) ProtoReflect() protoreflect.Message { + mi := &file_Cosmos_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_StakeAuthorization_Validators.ProtoReflect.Descriptor instead. +func (*Message_StakeAuthorization_Validators) Descriptor() ([]byte, []int) { + return file_Cosmos_proto_rawDescGZIP(), []int{5, 18, 0} +} + +func (x *Message_StakeAuthorization_Validators) GetAddress() []string { + if x != nil { + return x.Address + } + return nil +} + +var File_Cosmos_proto protoreflect.FileDescriptor + +const file_Cosmos_proto_rawDesc = "" + + "\n" + + "\fCosmos.proto\x12\x0fTW.Cosmos.Proto\x1a\fCommon.proto\"6\n" + + "\x06Amount\x12\x14\n" + + "\x05denom\x18\x01 \x01(\tR\x05denom\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\"J\n" + + "\x03Fee\x121\n" + + "\aamounts\x18\x01 \x03(\v2\x17.TW.Cosmos.Proto.AmountR\aamounts\x12\x10\n" + + "\x03gas\x18\x02 \x01(\x04R\x03gas\"Z\n" + + "\x06Height\x12'\n" + + "\x0frevision_number\x18\x01 \x01(\x04R\x0erevisionNumber\x12'\n" + + "\x0frevision_height\x18\x02 \x01(\x04R\x0erevisionHeight\"l\n" + + "\x0eTHORChainAsset\x12\x14\n" + + "\x05chain\x18\x01 \x01(\tR\x05chain\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x12\x16\n" + + "\x06ticker\x18\x03 \x01(\tR\x06ticker\x12\x14\n" + + "\x05synth\x18\x04 \x01(\bR\x05synth\"z\n" + + "\rTHORChainCoin\x125\n" + + "\x05asset\x18\x01 \x01(\v2\x1f.TW.Cosmos.Proto.THORChainAssetR\x05asset\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\x12\x1a\n" + + "\bdecimals\x18\x03 \x01(\x03R\bdecimals\"\xe05\n" + + "\aMessage\x12M\n" + + "\x12send_coins_message\x18\x01 \x01(\v2\x1d.TW.Cosmos.Proto.Message.SendH\x00R\x10sendCoinsMessage\x12[\n" + + "\x17transfer_tokens_message\x18\x02 \x01(\v2!.TW.Cosmos.Proto.Message.TransferH\x00R\x15transferTokensMessage\x12H\n" + + "\rstake_message\x18\x03 \x01(\v2!.TW.Cosmos.Proto.Message.DelegateH\x00R\fstakeMessage\x12N\n" + + "\x0funstake_message\x18\x04 \x01(\v2#.TW.Cosmos.Proto.Message.UndelegateH\x00R\x0eunstakeMessage\x12S\n" + + "\x0frestake_message\x18\x05 \x01(\v2(.TW.Cosmos.Proto.Message.BeginRedelegateH\x00R\x0erestakeMessage\x12v\n" + + "\x1dwithdraw_stake_reward_message\x18\x06 \x01(\v21.TW.Cosmos.Proto.Message.WithdrawDelegationRewardH\x00R\x1awithdrawStakeRewardMessage\x12L\n" + + "\x10raw_json_message\x18\a \x01(\v2 .TW.Cosmos.Proto.Message.RawJSONH\x00R\x0erawJsonMessage\x12\x9a\x01\n" + + ",wasm_terra_execute_contract_transfer_message\x18\b \x01(\v29.TW.Cosmos.Proto.Message.WasmTerraExecuteContractTransferH\x00R'wasmTerraExecuteContractTransferMessage\x12\x8e\x01\n" + + "(wasm_terra_execute_contract_send_message\x18\t \x01(\v25.TW.Cosmos.Proto.Message.WasmTerraExecuteContractSendH\x00R#wasmTerraExecuteContractSendMessage\x12^\n" + + "\x16thorchain_send_message\x18\n" + + " \x01(\v2&.TW.Cosmos.Proto.Message.THORChainSendH\x00R\x14thorchainSendMessage\x12\x88\x01\n" + + "#wasm_terra_execute_contract_generic\x18\f \x01(\v28.TW.Cosmos.Proto.Message.WasmTerraExecuteContractGenericH\x00R\x1fwasmTerraExecuteContractGeneric\x12\x8a\x01\n" + + "&wasm_execute_contract_transfer_message\x18\r \x01(\v24.TW.Cosmos.Proto.Message.WasmExecuteContractTransferH\x00R\"wasmExecuteContractTransferMessage\x12~\n" + + "\"wasm_execute_contract_send_message\x18\x0e \x01(\v20.TW.Cosmos.Proto.Message.WasmExecuteContractSendH\x00R\x1ewasmExecuteContractSendMessage\x12x\n" + + "\x1dwasm_execute_contract_generic\x18\x0f \x01(\v23.TW.Cosmos.Proto.Message.WasmExecuteContractGenericH\x00R\x1awasmExecuteContractGeneric\x12U\n" + + "\x13sign_direct_message\x18\x10 \x01(\v2#.TW.Cosmos.Proto.Message.SignDirectH\x00R\x11signDirectMessage\x12C\n" + + "\n" + + "auth_grant\x18\x11 \x01(\v2\".TW.Cosmos.Proto.Message.AuthGrantH\x00R\tauthGrant\x12F\n" + + "\vauth_revoke\x18\x12 \x01(\v2#.TW.Cosmos.Proto.Message.AuthRevokeH\x00R\n" + + "authRevoke\x12n\n" + + "\x1cset_withdraw_address_message\x18\x13 \x01(\v2+.TW.Cosmos.Proto.Message.SetWithdrawAddressH\x00R\x19setWithdrawAddressMessage\x12=\n" + + "\bmsg_vote\x18\x14 \x01(\v2 .TW.Cosmos.Proto.Message.MsgVoteH\x00R\amsgVote\x12|\n" + + "\x1fmsg_stride_liquid_staking_stake\x18\x15 \x01(\v24.TW.Cosmos.Proto.Message.MsgStrideLiquidStakingStakeH\x00R\x1bmsgStrideLiquidStakingStake\x12\x7f\n" + + " msg_stride_liquid_staking_redeem\x18\x16 \x01(\v25.TW.Cosmos.Proto.Message.MsgStrideLiquidStakingRedeemH\x00R\x1cmsgStrideLiquidStakingRedeem\x12g\n" + + "\x19thorchain_deposit_message\x18\x17 \x01(\v2).TW.Cosmos.Proto.Message.THORChainDepositH\x00R\x17thorchainDepositMessage\x12}\n" + + "!wasm_instantiate_contract_message\x18\x18 \x01(\v20.TW.Cosmos.Proto.Message.WasmInstantiateContractH\x00R\x1ewasmInstantiateContractMessage\x1a\x9c\x01\n" + + "\x04Send\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x121\n" + + "\aamounts\x18\x03 \x03(\v2\x17.TW.Cosmos.Proto.AmountR\aamounts\x12\x1f\n" + + "\vtype_prefix\x18\x04 \x01(\tR\n" + + "typePrefix\x1a\xa2\x02\n" + + "\bTransfer\x12\x1f\n" + + "\vsource_port\x18\x01 \x01(\tR\n" + + "sourcePort\x12%\n" + + "\x0esource_channel\x18\x02 \x01(\tR\rsourceChannel\x12-\n" + + "\x05token\x18\x03 \x01(\v2\x17.TW.Cosmos.Proto.AmountR\x05token\x12\x16\n" + + "\x06sender\x18\x04 \x01(\tR\x06sender\x12\x1a\n" + + "\breceiver\x18\x05 \x01(\tR\breceiver\x12>\n" + + "\x0etimeout_height\x18\x06 \x01(\v2\x17.TW.Cosmos.Proto.HeightR\rtimeoutHeight\x12+\n" + + "\x11timeout_timestamp\x18\a \x01(\x04R\x10timeoutTimestamp\x1a\xb6\x01\n" + + "\bDelegate\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x12+\n" + + "\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12/\n" + + "\x06amount\x18\x03 \x01(\v2\x17.TW.Cosmos.Proto.AmountR\x06amount\x12\x1f\n" + + "\vtype_prefix\x18\x04 \x01(\tR\n" + + "typePrefix\x1a\xb8\x01\n" + + "\n" + + "Undelegate\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x12+\n" + + "\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12/\n" + + "\x06amount\x18\x03 \x01(\v2\x17.TW.Cosmos.Proto.AmountR\x06amount\x12\x1f\n" + + "\vtype_prefix\x18\x04 \x01(\tR\n" + + "typePrefix\x1a\xf8\x01\n" + + "\x0fBeginRedelegate\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x122\n" + + "\x15validator_src_address\x18\x02 \x01(\tR\x13validatorSrcAddress\x122\n" + + "\x15validator_dst_address\x18\x03 \x01(\tR\x13validatorDstAddress\x12/\n" + + "\x06amount\x18\x04 \x01(\v2\x17.TW.Cosmos.Proto.AmountR\x06amount\x12\x1f\n" + + "\vtype_prefix\x18\x05 \x01(\tR\n" + + "typePrefix\x1a\x8d\x01\n" + + "\x12SetWithdrawAddress\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x12)\n" + + "\x10withdraw_address\x18\x02 \x01(\tR\x0fwithdrawAddress\x12\x1f\n" + + "\vtype_prefix\x18\x03 \x01(\tR\n" + + "typePrefix\x1a\x95\x01\n" + + "\x18WithdrawDelegationReward\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x12+\n" + + "\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\x1f\n" + + "\vtype_prefix\x18\x03 \x01(\tR\n" + + "typePrefix\x1a\xb9\x01\n" + + " WasmTerraExecuteContractTransfer\x12%\n" + + "\x0esender_address\x18\x01 \x01(\tR\rsenderAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\x12+\n" + + "\x11recipient_address\x18\x04 \x01(\tR\x10recipientAddress\x1a\xec\x01\n" + + "\x1cWasmTerraExecuteContractSend\x12%\n" + + "\x0esender_address\x18\x01 \x01(\tR\rsenderAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\x12<\n" + + "\x1arecipient_contract_address\x18\x04 \x01(\tR\x18recipientContractAddress\x12\x10\n" + + "\x03msg\x18\x05 \x01(\tR\x03msg\x12\x12\n" + + "\x04coin\x18\x06 \x03(\tR\x04coin\x1a\x84\x01\n" + + "\rTHORChainSend\x12!\n" + + "\ffrom_address\x18\x01 \x01(\fR\vfromAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\fR\ttoAddress\x121\n" + + "\aamounts\x18\x03 \x03(\v2\x17.TW.Cosmos.Proto.AmountR\aamounts\x1at\n" + + "\x10THORChainDeposit\x124\n" + + "\x05coins\x18\x01 \x03(\v2\x1e.TW.Cosmos.Proto.THORChainCoinR\x05coins\x12\x12\n" + + "\x04memo\x18\x02 \x01(\tR\x04memo\x12\x16\n" + + "\x06signer\x18\x03 \x01(\fR\x06signer\x1a\xc3\x01\n" + + "\x1fWasmTerraExecuteContractGeneric\x12%\n" + + "\x0esender_address\x18\x01 \x01(\tR\rsenderAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x1f\n" + + "\vexecute_msg\x18\x03 \x01(\tR\n" + + "executeMsg\x12-\n" + + "\x05coins\x18\x05 \x03(\v2\x17.TW.Cosmos.Proto.AmountR\x05coins\x1a\xb4\x01\n" + + "\x1bWasmExecuteContractTransfer\x12%\n" + + "\x0esender_address\x18\x01 \x01(\tR\rsenderAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\x12+\n" + + "\x11recipient_address\x18\x04 \x01(\tR\x10recipientAddress\x1a\xe7\x01\n" + + "\x17WasmExecuteContractSend\x12%\n" + + "\x0esender_address\x18\x01 \x01(\tR\rsenderAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\x12<\n" + + "\x1arecipient_contract_address\x18\x04 \x01(\tR\x18recipientContractAddress\x12\x10\n" + + "\x03msg\x18\x05 \x01(\tR\x03msg\x12\x12\n" + + "\x04coin\x18\x06 \x03(\tR\x04coin\x1a\xbe\x01\n" + + "\x1aWasmExecuteContractGeneric\x12%\n" + + "\x0esender_address\x18\x01 \x01(\tR\rsenderAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x1f\n" + + "\vexecute_msg\x18\x03 \x01(\tR\n" + + "executeMsg\x12-\n" + + "\x05coins\x18\x05 \x03(\v2\x17.TW.Cosmos.Proto.AmountR\x05coins\x1a\xc0\x01\n" + + "\x17WasmInstantiateContract\x12\x16\n" + + "\x06sender\x18\x01 \x01(\tR\x06sender\x12\x14\n" + + "\x05admin\x18\x02 \x01(\tR\x05admin\x12\x17\n" + + "\acode_id\x18\x03 \x01(\x04R\x06codeId\x12\x14\n" + + "\x05label\x18\x04 \x01(\tR\x05label\x12\x10\n" + + "\x03msg\x18\x05 \x01(\fR\x03msg\x126\n" + + "\n" + + "init_funds\x18\x06 \x03(\v2\x17.TW.Cosmos.Proto.AmountR\tinitFunds\x1a3\n" + + "\aRawJSON\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\x1aS\n" + + "\n" + + "SignDirect\x12\x1d\n" + + "\n" + + "body_bytes\x18\x01 \x01(\fR\tbodyBytes\x12&\n" + + "\x0fauth_info_bytes\x18\x02 \x01(\fR\rauthInfoBytes\x1a\x8d\x03\n" + + "\x12StakeAuthorization\x126\n" + + "\n" + + "max_tokens\x18\x01 \x01(\v2\x17.TW.Cosmos.Proto.AmountR\tmaxTokens\x12W\n" + + "\n" + + "allow_list\x18\x02 \x01(\v26.TW.Cosmos.Proto.Message.StakeAuthorization.ValidatorsH\x00R\tallowList\x12U\n" + + "\tdeny_list\x18\x03 \x01(\v26.TW.Cosmos.Proto.Message.StakeAuthorization.ValidatorsH\x00R\bdenyList\x12Y\n" + + "\x12authorization_type\x18\x04 \x01(\x0e2*.TW.Cosmos.Proto.Message.AuthorizationTypeR\x11authorizationType\x1a&\n" + + "\n" + + "Validators\x12\x18\n" + + "\aaddress\x18\x01 \x03(\tR\aaddressB\f\n" + + "\n" + + "validators\x1a\xbd\x01\n" + + "\tAuthGrant\x12\x18\n" + + "\agranter\x18\x01 \x01(\tR\agranter\x12\x18\n" + + "\agrantee\x18\x02 \x01(\tR\agrantee\x12N\n" + + "\vgrant_stake\x18\x03 \x01(\v2+.TW.Cosmos.Proto.Message.StakeAuthorizationH\x00R\n" + + "grantStake\x12\x1e\n" + + "\n" + + "expiration\x18\x04 \x01(\x03R\n" + + "expirationB\f\n" + + "\n" + + "grant_type\x1ab\n" + + "\n" + + "AuthRevoke\x12\x18\n" + + "\agranter\x18\x01 \x01(\tR\agranter\x12\x18\n" + + "\agrantee\x18\x02 \x01(\tR\agrantee\x12 \n" + + "\fmsg_type_url\x18\x03 \x01(\tR\n" + + "msgTypeUrl\x1a}\n" + + "\aMsgVote\x12\x1f\n" + + "\vproposal_id\x18\x01 \x01(\x04R\n" + + "proposalId\x12\x14\n" + + "\x05voter\x18\x02 \x01(\tR\x05voter\x12;\n" + + "\x06option\x18\x03 \x01(\x0e2#.TW.Cosmos.Proto.Message.VoteOptionR\x06option\x1an\n" + + "\x1bMsgStrideLiquidStakingStake\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\x12\x1d\n" + + "\n" + + "host_denom\x18\x03 \x01(\tR\thostDenom\x1a\x89\x01\n" + + "\x1cMsgStrideLiquidStakingRedeem\x12\x18\n" + + "\acreator\x18\x01 \x01(\tR\acreator\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\x12\x1b\n" + + "\thost_zone\x18\x03 \x01(\tR\bhostZone\x12\x1a\n" + + "\breceiver\x18\x04 \x01(\tR\breceiver\"R\n" + + "\x11AuthorizationType\x12\x0f\n" + + "\vUNSPECIFIED\x10\x00\x12\f\n" + + "\bDELEGATE\x10\x01\x12\x0e\n" + + "\n" + + "UNDELEGATE\x10\x02\x12\x0e\n" + + "\n" + + "REDELEGATE\x10\x03\"N\n" + + "\n" + + "VoteOption\x12\x10\n" + + "\f_UNSPECIFIED\x10\x00\x12\a\n" + + "\x03YES\x10\x01\x12\v\n" + + "\aABSTAIN\x10\x02\x12\x06\n" + + "\x02NO\x10\x03\x12\x10\n" + + "\fNO_WITH_VETO\x10\x04B\x0f\n" + + "\rmessage_oneof\"\x9c\x01\n" + + "\n" + + "SignerInfo\x12L\n" + + "\x0fpublic_key_type\x18\x01 \x01(\x0e2$.TW.Cosmos.Proto.SignerPublicKeyTypeR\rpublicKeyType\x12\x1b\n" + + "\tjson_type\x18\x02 \x01(\tR\bjsonType\x12#\n" + + "\rprotobuf_type\x18\x03 \x01(\tR\fprotobufType\"\xb0\x04\n" + + "\fSigningInput\x12?\n" + + "\fsigning_mode\x18\x01 \x01(\x0e2\x1c.TW.Cosmos.Proto.SigningModeR\vsigningMode\x12%\n" + + "\x0eaccount_number\x18\x02 \x01(\x04R\raccountNumber\x12\x19\n" + + "\bchain_id\x18\x03 \x01(\tR\achainId\x12&\n" + + "\x03fee\x18\x04 \x01(\v2\x14.TW.Cosmos.Proto.FeeR\x03fee\x12\x12\n" + + "\x04memo\x18\x05 \x01(\tR\x04memo\x12\x1a\n" + + "\bsequence\x18\x06 \x01(\x04R\bsequence\x12\x1f\n" + + "\vprivate_key\x18\a \x01(\fR\n" + + "privateKey\x124\n" + + "\bmessages\x18\b \x03(\v2\x18.TW.Cosmos.Proto.MessageR\bmessages\x122\n" + + "\x04mode\x18\t \x01(\x0e2\x1e.TW.Cosmos.Proto.BroadcastModeR\x04mode\x12\x1d\n" + + "\n" + + "public_key\x18\n" + + " \x01(\fR\tpublicKey\x126\n" + + "\ttx_hasher\x18\v \x01(\x0e2\x19.TW.Cosmos.Proto.TxHasherR\btxHasher\x12<\n" + + "\vsigner_info\x18\f \x01(\v2\x1b.TW.Cosmos.Proto.SignerInfoR\n" + + "signerInfo\x12%\n" + + "\x0etimeout_height\x18\r \x01(\x04R\rtimeoutHeight\"\xe2\x01\n" + + "\rSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x12\n" + + "\x04json\x18\x02 \x01(\tR\x04json\x12\x1e\n" + + "\n" + + "serialized\x18\x03 \x01(\tR\n" + + "serialized\x12%\n" + + "\x0esignature_json\x18\x04 \x01(\tR\rsignatureJson\x12#\n" + + "\rerror_message\x18\x05 \x01(\tR\ferrorMessage\x123\n" + + "\x05error\x18\x06 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error*/\n" + + "\rBroadcastMode\x12\t\n" + + "\x05BLOCK\x10\x00\x12\b\n" + + "\x04SYNC\x10\x01\x12\t\n" + + "\x05ASYNC\x10\x02*%\n" + + "\vSigningMode\x12\b\n" + + "\x04JSON\x10\x00\x12\f\n" + + "\bProtobuf\x10\x01*5\n" + + "\bTxHasher\x12\x0e\n" + + "\n" + + "UseDefault\x10\x00\x12\n" + + "\n" + + "\x06Sha256\x10\x01\x12\r\n" + + "\tKeccak256\x10\x02*;\n" + + "\x13SignerPublicKeyType\x12\r\n" + + "\tSecp256k1\x10\x00\x12\x15\n" + + "\x11Secp256k1Extended\x10\x01B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Cosmos_proto_rawDescOnce sync.Once + file_Cosmos_proto_rawDescData []byte +) + +func file_Cosmos_proto_rawDescGZIP() []byte { + file_Cosmos_proto_rawDescOnce.Do(func() { + file_Cosmos_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Cosmos_proto_rawDesc), len(file_Cosmos_proto_rawDesc))) + }) + return file_Cosmos_proto_rawDescData +} + +var file_Cosmos_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_Cosmos_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_Cosmos_proto_goTypes = []any{ + (BroadcastMode)(0), // 0: TW.Cosmos.Proto.BroadcastMode + (SigningMode)(0), // 1: TW.Cosmos.Proto.SigningMode + (TxHasher)(0), // 2: TW.Cosmos.Proto.TxHasher + (SignerPublicKeyType)(0), // 3: TW.Cosmos.Proto.SignerPublicKeyType + (Message_AuthorizationType)(0), // 4: TW.Cosmos.Proto.Message.AuthorizationType + (Message_VoteOption)(0), // 5: TW.Cosmos.Proto.Message.VoteOption + (*Amount)(nil), // 6: TW.Cosmos.Proto.Amount + (*Fee)(nil), // 7: TW.Cosmos.Proto.Fee + (*Height)(nil), // 8: TW.Cosmos.Proto.Height + (*THORChainAsset)(nil), // 9: TW.Cosmos.Proto.THORChainAsset + (*THORChainCoin)(nil), // 10: TW.Cosmos.Proto.THORChainCoin + (*Message)(nil), // 11: TW.Cosmos.Proto.Message + (*SignerInfo)(nil), // 12: TW.Cosmos.Proto.SignerInfo + (*SigningInput)(nil), // 13: TW.Cosmos.Proto.SigningInput + (*SigningOutput)(nil), // 14: TW.Cosmos.Proto.SigningOutput + (*Message_Send)(nil), // 15: TW.Cosmos.Proto.Message.Send + (*Message_Transfer)(nil), // 16: TW.Cosmos.Proto.Message.Transfer + (*Message_Delegate)(nil), // 17: TW.Cosmos.Proto.Message.Delegate + (*Message_Undelegate)(nil), // 18: TW.Cosmos.Proto.Message.Undelegate + (*Message_BeginRedelegate)(nil), // 19: TW.Cosmos.Proto.Message.BeginRedelegate + (*Message_SetWithdrawAddress)(nil), // 20: TW.Cosmos.Proto.Message.SetWithdrawAddress + (*Message_WithdrawDelegationReward)(nil), // 21: TW.Cosmos.Proto.Message.WithdrawDelegationReward + (*Message_WasmTerraExecuteContractTransfer)(nil), // 22: TW.Cosmos.Proto.Message.WasmTerraExecuteContractTransfer + (*Message_WasmTerraExecuteContractSend)(nil), // 23: TW.Cosmos.Proto.Message.WasmTerraExecuteContractSend + (*Message_THORChainSend)(nil), // 24: TW.Cosmos.Proto.Message.THORChainSend + (*Message_THORChainDeposit)(nil), // 25: TW.Cosmos.Proto.Message.THORChainDeposit + (*Message_WasmTerraExecuteContractGeneric)(nil), // 26: TW.Cosmos.Proto.Message.WasmTerraExecuteContractGeneric + (*Message_WasmExecuteContractTransfer)(nil), // 27: TW.Cosmos.Proto.Message.WasmExecuteContractTransfer + (*Message_WasmExecuteContractSend)(nil), // 28: TW.Cosmos.Proto.Message.WasmExecuteContractSend + (*Message_WasmExecuteContractGeneric)(nil), // 29: TW.Cosmos.Proto.Message.WasmExecuteContractGeneric + (*Message_WasmInstantiateContract)(nil), // 30: TW.Cosmos.Proto.Message.WasmInstantiateContract + (*Message_RawJSON)(nil), // 31: TW.Cosmos.Proto.Message.RawJSON + (*Message_SignDirect)(nil), // 32: TW.Cosmos.Proto.Message.SignDirect + (*Message_StakeAuthorization)(nil), // 33: TW.Cosmos.Proto.Message.StakeAuthorization + (*Message_AuthGrant)(nil), // 34: TW.Cosmos.Proto.Message.AuthGrant + (*Message_AuthRevoke)(nil), // 35: TW.Cosmos.Proto.Message.AuthRevoke + (*Message_MsgVote)(nil), // 36: TW.Cosmos.Proto.Message.MsgVote + (*Message_MsgStrideLiquidStakingStake)(nil), // 37: TW.Cosmos.Proto.Message.MsgStrideLiquidStakingStake + (*Message_MsgStrideLiquidStakingRedeem)(nil), // 38: TW.Cosmos.Proto.Message.MsgStrideLiquidStakingRedeem + (*Message_StakeAuthorization_Validators)(nil), // 39: TW.Cosmos.Proto.Message.StakeAuthorization.Validators + (common.SigningError)(0), // 40: TW.Common.Proto.SigningError +} +var file_Cosmos_proto_depIdxs = []int32{ + 6, // 0: TW.Cosmos.Proto.Fee.amounts:type_name -> TW.Cosmos.Proto.Amount + 9, // 1: TW.Cosmos.Proto.THORChainCoin.asset:type_name -> TW.Cosmos.Proto.THORChainAsset + 15, // 2: TW.Cosmos.Proto.Message.send_coins_message:type_name -> TW.Cosmos.Proto.Message.Send + 16, // 3: TW.Cosmos.Proto.Message.transfer_tokens_message:type_name -> TW.Cosmos.Proto.Message.Transfer + 17, // 4: TW.Cosmos.Proto.Message.stake_message:type_name -> TW.Cosmos.Proto.Message.Delegate + 18, // 5: TW.Cosmos.Proto.Message.unstake_message:type_name -> TW.Cosmos.Proto.Message.Undelegate + 19, // 6: TW.Cosmos.Proto.Message.restake_message:type_name -> TW.Cosmos.Proto.Message.BeginRedelegate + 21, // 7: TW.Cosmos.Proto.Message.withdraw_stake_reward_message:type_name -> TW.Cosmos.Proto.Message.WithdrawDelegationReward + 31, // 8: TW.Cosmos.Proto.Message.raw_json_message:type_name -> TW.Cosmos.Proto.Message.RawJSON + 22, // 9: TW.Cosmos.Proto.Message.wasm_terra_execute_contract_transfer_message:type_name -> TW.Cosmos.Proto.Message.WasmTerraExecuteContractTransfer + 23, // 10: TW.Cosmos.Proto.Message.wasm_terra_execute_contract_send_message:type_name -> TW.Cosmos.Proto.Message.WasmTerraExecuteContractSend + 24, // 11: TW.Cosmos.Proto.Message.thorchain_send_message:type_name -> TW.Cosmos.Proto.Message.THORChainSend + 26, // 12: TW.Cosmos.Proto.Message.wasm_terra_execute_contract_generic:type_name -> TW.Cosmos.Proto.Message.WasmTerraExecuteContractGeneric + 27, // 13: TW.Cosmos.Proto.Message.wasm_execute_contract_transfer_message:type_name -> TW.Cosmos.Proto.Message.WasmExecuteContractTransfer + 28, // 14: TW.Cosmos.Proto.Message.wasm_execute_contract_send_message:type_name -> TW.Cosmos.Proto.Message.WasmExecuteContractSend + 29, // 15: TW.Cosmos.Proto.Message.wasm_execute_contract_generic:type_name -> TW.Cosmos.Proto.Message.WasmExecuteContractGeneric + 32, // 16: TW.Cosmos.Proto.Message.sign_direct_message:type_name -> TW.Cosmos.Proto.Message.SignDirect + 34, // 17: TW.Cosmos.Proto.Message.auth_grant:type_name -> TW.Cosmos.Proto.Message.AuthGrant + 35, // 18: TW.Cosmos.Proto.Message.auth_revoke:type_name -> TW.Cosmos.Proto.Message.AuthRevoke + 20, // 19: TW.Cosmos.Proto.Message.set_withdraw_address_message:type_name -> TW.Cosmos.Proto.Message.SetWithdrawAddress + 36, // 20: TW.Cosmos.Proto.Message.msg_vote:type_name -> TW.Cosmos.Proto.Message.MsgVote + 37, // 21: TW.Cosmos.Proto.Message.msg_stride_liquid_staking_stake:type_name -> TW.Cosmos.Proto.Message.MsgStrideLiquidStakingStake + 38, // 22: TW.Cosmos.Proto.Message.msg_stride_liquid_staking_redeem:type_name -> TW.Cosmos.Proto.Message.MsgStrideLiquidStakingRedeem + 25, // 23: TW.Cosmos.Proto.Message.thorchain_deposit_message:type_name -> TW.Cosmos.Proto.Message.THORChainDeposit + 30, // 24: TW.Cosmos.Proto.Message.wasm_instantiate_contract_message:type_name -> TW.Cosmos.Proto.Message.WasmInstantiateContract + 3, // 25: TW.Cosmos.Proto.SignerInfo.public_key_type:type_name -> TW.Cosmos.Proto.SignerPublicKeyType + 1, // 26: TW.Cosmos.Proto.SigningInput.signing_mode:type_name -> TW.Cosmos.Proto.SigningMode + 7, // 27: TW.Cosmos.Proto.SigningInput.fee:type_name -> TW.Cosmos.Proto.Fee + 11, // 28: TW.Cosmos.Proto.SigningInput.messages:type_name -> TW.Cosmos.Proto.Message + 0, // 29: TW.Cosmos.Proto.SigningInput.mode:type_name -> TW.Cosmos.Proto.BroadcastMode + 2, // 30: TW.Cosmos.Proto.SigningInput.tx_hasher:type_name -> TW.Cosmos.Proto.TxHasher + 12, // 31: TW.Cosmos.Proto.SigningInput.signer_info:type_name -> TW.Cosmos.Proto.SignerInfo + 40, // 32: TW.Cosmos.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 6, // 33: TW.Cosmos.Proto.Message.Send.amounts:type_name -> TW.Cosmos.Proto.Amount + 6, // 34: TW.Cosmos.Proto.Message.Transfer.token:type_name -> TW.Cosmos.Proto.Amount + 8, // 35: TW.Cosmos.Proto.Message.Transfer.timeout_height:type_name -> TW.Cosmos.Proto.Height + 6, // 36: TW.Cosmos.Proto.Message.Delegate.amount:type_name -> TW.Cosmos.Proto.Amount + 6, // 37: TW.Cosmos.Proto.Message.Undelegate.amount:type_name -> TW.Cosmos.Proto.Amount + 6, // 38: TW.Cosmos.Proto.Message.BeginRedelegate.amount:type_name -> TW.Cosmos.Proto.Amount + 6, // 39: TW.Cosmos.Proto.Message.THORChainSend.amounts:type_name -> TW.Cosmos.Proto.Amount + 10, // 40: TW.Cosmos.Proto.Message.THORChainDeposit.coins:type_name -> TW.Cosmos.Proto.THORChainCoin + 6, // 41: TW.Cosmos.Proto.Message.WasmTerraExecuteContractGeneric.coins:type_name -> TW.Cosmos.Proto.Amount + 6, // 42: TW.Cosmos.Proto.Message.WasmExecuteContractGeneric.coins:type_name -> TW.Cosmos.Proto.Amount + 6, // 43: TW.Cosmos.Proto.Message.WasmInstantiateContract.init_funds:type_name -> TW.Cosmos.Proto.Amount + 6, // 44: TW.Cosmos.Proto.Message.StakeAuthorization.max_tokens:type_name -> TW.Cosmos.Proto.Amount + 39, // 45: TW.Cosmos.Proto.Message.StakeAuthorization.allow_list:type_name -> TW.Cosmos.Proto.Message.StakeAuthorization.Validators + 39, // 46: TW.Cosmos.Proto.Message.StakeAuthorization.deny_list:type_name -> TW.Cosmos.Proto.Message.StakeAuthorization.Validators + 4, // 47: TW.Cosmos.Proto.Message.StakeAuthorization.authorization_type:type_name -> TW.Cosmos.Proto.Message.AuthorizationType + 33, // 48: TW.Cosmos.Proto.Message.AuthGrant.grant_stake:type_name -> TW.Cosmos.Proto.Message.StakeAuthorization + 5, // 49: TW.Cosmos.Proto.Message.MsgVote.option:type_name -> TW.Cosmos.Proto.Message.VoteOption + 50, // [50:50] is the sub-list for method output_type + 50, // [50:50] is the sub-list for method input_type + 50, // [50:50] is the sub-list for extension type_name + 50, // [50:50] is the sub-list for extension extendee + 0, // [0:50] is the sub-list for field type_name +} + +func init() { file_Cosmos_proto_init() } +func file_Cosmos_proto_init() { + if File_Cosmos_proto != nil { + return + } + file_Cosmos_proto_msgTypes[5].OneofWrappers = []any{ + (*Message_SendCoinsMessage)(nil), + (*Message_TransferTokensMessage)(nil), + (*Message_StakeMessage)(nil), + (*Message_UnstakeMessage)(nil), + (*Message_RestakeMessage)(nil), + (*Message_WithdrawStakeRewardMessage)(nil), + (*Message_RawJsonMessage)(nil), + (*Message_WasmTerraExecuteContractTransferMessage)(nil), + (*Message_WasmTerraExecuteContractSendMessage)(nil), + (*Message_ThorchainSendMessage)(nil), + (*Message_WasmTerraExecuteContractGeneric_)(nil), + (*Message_WasmExecuteContractTransferMessage)(nil), + (*Message_WasmExecuteContractSendMessage)(nil), + (*Message_WasmExecuteContractGeneric_)(nil), + (*Message_SignDirectMessage)(nil), + (*Message_AuthGrant_)(nil), + (*Message_AuthRevoke_)(nil), + (*Message_SetWithdrawAddressMessage)(nil), + (*Message_MsgVote_)(nil), + (*Message_MsgStrideLiquidStakingStake_)(nil), + (*Message_MsgStrideLiquidStakingRedeem_)(nil), + (*Message_ThorchainDepositMessage)(nil), + (*Message_WasmInstantiateContractMessage)(nil), + } + file_Cosmos_proto_msgTypes[27].OneofWrappers = []any{ + (*Message_StakeAuthorization_AllowList)(nil), + (*Message_StakeAuthorization_DenyList)(nil), + } + file_Cosmos_proto_msgTypes[28].OneofWrappers = []any{ + (*Message_AuthGrant_GrantStake)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Cosmos_proto_rawDesc), len(file_Cosmos_proto_rawDesc)), + NumEnums: 6, + NumMessages: 34, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Cosmos_proto_goTypes, + DependencyIndexes: file_Cosmos_proto_depIdxs, + EnumInfos: file_Cosmos_proto_enumTypes, + MessageInfos: file_Cosmos_proto_msgTypes, + }.Build() + File_Cosmos_proto = out.File + file_Cosmos_proto_goTypes = nil + file_Cosmos_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/decred/Decred.pb.go b/wrapper/go-wrapper/protos/decred/Decred.pb.go new file mode 100644 index 00000000000..6abea2a3528 --- /dev/null +++ b/wrapper/go-wrapper/protos/decred/Decred.pb.go @@ -0,0 +1,456 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Decred.proto + +package decred + +import ( + bitcoin "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoin" + bitcoinv2 "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoinv2" + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A transfer transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Serialization format + SerializeType uint32 `protobuf:"varint,1,opt,name=serializeType,proto3" json:"serializeType,omitempty"` + // Transaction data format version + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // A list of 1 or more transaction inputs or sources for coins. + Inputs []*TransactionInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // A list of 1 or more transaction outputs or destinations for coins + Outputs []*TransactionOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // The time when a transaction can be spent (usually zero, in which case it has no effect). + LockTime uint32 `protobuf:"varint,5,opt,name=lockTime,proto3" json:"lockTime,omitempty"` + // The block height at which the transaction expires and is no longer valid. + Expiry uint32 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Decred_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Decred_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Decred_proto_rawDescGZIP(), []int{0} +} + +func (x *Transaction) GetSerializeType() uint32 { + if x != nil { + return x.SerializeType + } + return 0 +} + +func (x *Transaction) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Transaction) GetInputs() []*TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *Transaction) GetOutputs() []*TransactionOutput { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *Transaction) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *Transaction) GetExpiry() uint32 { + if x != nil { + return x.Expiry + } + return 0 +} + +// Decred transaction input. +type TransactionInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Reference to the previous transaction's output. + PreviousOutput *bitcoin.OutPoint `protobuf:"bytes,1,opt,name=previousOutput,proto3" json:"previousOutput,omitempty"` + // Transaction version as defined by the sender. + Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // The amount of the input + ValueIn int64 `protobuf:"varint,3,opt,name=valueIn,proto3" json:"valueIn,omitempty"` + // Creation block height + BlockHeight uint32 `protobuf:"varint,4,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` + // Index within the block + BlockIndex uint32 `protobuf:"varint,5,opt,name=blockIndex,proto3" json:"blockIndex,omitempty"` + // Computational script for confirming transaction authorization. + Script []byte `protobuf:"bytes,6,opt,name=script,proto3" json:"script,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionInput) Reset() { + *x = TransactionInput{} + mi := &file_Decred_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInput) ProtoMessage() {} + +func (x *TransactionInput) ProtoReflect() protoreflect.Message { + mi := &file_Decred_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead. +func (*TransactionInput) Descriptor() ([]byte, []int) { + return file_Decred_proto_rawDescGZIP(), []int{1} +} + +func (x *TransactionInput) GetPreviousOutput() *bitcoin.OutPoint { + if x != nil { + return x.PreviousOutput + } + return nil +} + +func (x *TransactionInput) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *TransactionInput) GetValueIn() int64 { + if x != nil { + return x.ValueIn + } + return 0 +} + +func (x *TransactionInput) GetBlockHeight() uint32 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *TransactionInput) GetBlockIndex() uint32 { + if x != nil { + return x.BlockIndex + } + return 0 +} + +func (x *TransactionInput) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +// Decred transaction output. +type TransactionOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction amount. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + // Transaction output version. + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // Usually contains the public key as a Decred script setting up conditions to claim this output. + Script []byte `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOutput) Reset() { + *x = TransactionOutput{} + mi := &file_Decred_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOutput) ProtoMessage() {} + +func (x *TransactionOutput) ProtoReflect() protoreflect.Message { + mi := &file_Decred_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead. +func (*TransactionOutput) Descriptor() ([]byte, []int) { + return file_Decred_proto_rawDescGZIP(), []int{2} +} + +func (x *TransactionOutput) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *TransactionOutput) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *TransactionOutput) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Resulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds. + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Transaction id + TransactionId string `protobuf:"bytes,3,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Result of a transaction signing using the Bitcoin 2.0 protocol. + // Set if `Bitcoin.Proto.SigningInput.signing_v2` used. + SigningResultV2 *bitcoinv2.SigningOutput `protobuf:"bytes,6,opt,name=signing_result_v2,json=signingResultV2,proto3" json:"signing_result_v2,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Decred_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Decred_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Decred_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningOutput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetSigningResultV2() *bitcoinv2.SigningOutput { + if x != nil { + return x.SigningResultV2 + } + return nil +} + +var File_Decred_proto protoreflect.FileDescriptor + +const file_Decred_proto_rawDesc = "" + + "\n" + + "\fDecred.proto\x12\x0fTW.Decred.Proto\x1a\rBitcoin.proto\x1a\x0fBitcoinV2.proto\x1a\fCommon.proto\"\xfa\x01\n" + + "\vTransaction\x12$\n" + + "\rserializeType\x18\x01 \x01(\rR\rserializeType\x12\x18\n" + + "\aversion\x18\x02 \x01(\rR\aversion\x129\n" + + "\x06inputs\x18\x03 \x03(\v2!.TW.Decred.Proto.TransactionInputR\x06inputs\x12<\n" + + "\aoutputs\x18\x04 \x03(\v2\".TW.Decred.Proto.TransactionOutputR\aoutputs\x12\x1a\n" + + "\blockTime\x18\x05 \x01(\rR\blockTime\x12\x16\n" + + "\x06expiry\x18\x06 \x01(\rR\x06expiry\"\xe6\x01\n" + + "\x10TransactionInput\x12B\n" + + "\x0epreviousOutput\x18\x01 \x01(\v2\x1a.TW.Bitcoin.Proto.OutPointR\x0epreviousOutput\x12\x1a\n" + + "\bsequence\x18\x02 \x01(\rR\bsequence\x12\x18\n" + + "\avalueIn\x18\x03 \x01(\x03R\avalueIn\x12 \n" + + "\vblockHeight\x18\x04 \x01(\rR\vblockHeight\x12\x1e\n" + + "\n" + + "blockIndex\x18\x05 \x01(\rR\n" + + "blockIndex\x12\x16\n" + + "\x06script\x18\x06 \x01(\fR\x06script\"[\n" + + "\x11TransactionOutput\x12\x14\n" + + "\x05value\x18\x01 \x01(\x03R\x05value\x12\x18\n" + + "\aversion\x18\x02 \x01(\rR\aversion\x12\x16\n" + + "\x06script\x18\x03 \x01(\fR\x06script\"\xb9\x02\n" + + "\rSigningOutput\x12>\n" + + "\vtransaction\x18\x01 \x01(\v2\x1c.TW.Decred.Proto.TransactionR\vtransaction\x12\x18\n" + + "\aencoded\x18\x02 \x01(\fR\aencoded\x12%\n" + + "\x0etransaction_id\x18\x03 \x01(\tR\rtransactionId\x123\n" + + "\x05error\x18\x04 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x05 \x01(\tR\ferrorMessage\x12M\n" + + "\x11signing_result_v2\x18\x06 \x01(\v2!.TW.BitcoinV2.Proto.SigningOutputR\x0fsigningResultV2B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Decred_proto_rawDescOnce sync.Once + file_Decred_proto_rawDescData []byte +) + +func file_Decred_proto_rawDescGZIP() []byte { + file_Decred_proto_rawDescOnce.Do(func() { + file_Decred_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Decred_proto_rawDesc), len(file_Decred_proto_rawDesc))) + }) + return file_Decred_proto_rawDescData +} + +var file_Decred_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_Decred_proto_goTypes = []any{ + (*Transaction)(nil), // 0: TW.Decred.Proto.Transaction + (*TransactionInput)(nil), // 1: TW.Decred.Proto.TransactionInput + (*TransactionOutput)(nil), // 2: TW.Decred.Proto.TransactionOutput + (*SigningOutput)(nil), // 3: TW.Decred.Proto.SigningOutput + (*bitcoin.OutPoint)(nil), // 4: TW.Bitcoin.Proto.OutPoint + (common.SigningError)(0), // 5: TW.Common.Proto.SigningError + (*bitcoinv2.SigningOutput)(nil), // 6: TW.BitcoinV2.Proto.SigningOutput +} +var file_Decred_proto_depIdxs = []int32{ + 1, // 0: TW.Decred.Proto.Transaction.inputs:type_name -> TW.Decred.Proto.TransactionInput + 2, // 1: TW.Decred.Proto.Transaction.outputs:type_name -> TW.Decred.Proto.TransactionOutput + 4, // 2: TW.Decred.Proto.TransactionInput.previousOutput:type_name -> TW.Bitcoin.Proto.OutPoint + 0, // 3: TW.Decred.Proto.SigningOutput.transaction:type_name -> TW.Decred.Proto.Transaction + 5, // 4: TW.Decred.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 6, // 5: TW.Decred.Proto.SigningOutput.signing_result_v2:type_name -> TW.BitcoinV2.Proto.SigningOutput + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_Decred_proto_init() } +func file_Decred_proto_init() { + if File_Decred_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Decred_proto_rawDesc), len(file_Decred_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Decred_proto_goTypes, + DependencyIndexes: file_Decred_proto_depIdxs, + MessageInfos: file_Decred_proto_msgTypes, + }.Build() + File_Decred_proto = out.File + file_Decred_proto_goTypes = nil + file_Decred_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/decredv2/DecredV2.pb.go b/wrapper/go-wrapper/protos/decredv2/DecredV2.pb.go new file mode 100644 index 00000000000..ab052f1a1b0 --- /dev/null +++ b/wrapper/go-wrapper/protos/decredv2/DecredV2.pb.go @@ -0,0 +1,420 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: DecredV2.proto + +package decredv2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Decred transaction out-point reference. +type OutPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hash of the referenced transaction (network byte order, usually needs to be reversed). + // The referenced transaction ID in REVERSED order. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The position in the previous transactions output that this input references. + Vout uint32 `protobuf:"varint,2,opt,name=vout,proto3" json:"vout,omitempty"` + // The tree in utxo, only works for DCR. + Tree uint32 `protobuf:"varint,3,opt,name=tree,proto3" json:"tree,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + mi := &file_DecredV2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_DecredV2_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_DecredV2_proto_rawDescGZIP(), []int{0} +} + +func (x *OutPoint) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *OutPoint) GetVout() uint32 { + if x != nil { + return x.Vout + } + return 0 +} + +func (x *OutPoint) GetTree() uint32 { + if x != nil { + return x.Tree + } + return 0 +} + +// A transfer transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Serialization format + SerializeType uint32 `protobuf:"varint,1,opt,name=serialize_type,json=serializeType,proto3" json:"serialize_type,omitempty"` + // Transaction version. + // Currently, version 1 is supported only. + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // A list of 1 or more transaction inputs or sources for coins. + Inputs []*TransactionInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // A list of 1 or more transaction outputs or destinations for coins + Outputs []*TransactionOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // Block height or timestamp indicating at what point transactions can be included in a block. + // Zero by default. + LockTime uint32 `protobuf:"varint,5,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // The block height at which the transaction expires and is no longer valid. + Expiry uint32 `protobuf:"varint,6,opt,name=expiry,proto3" json:"expiry,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_DecredV2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_DecredV2_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_DecredV2_proto_rawDescGZIP(), []int{1} +} + +func (x *Transaction) GetSerializeType() uint32 { + if x != nil { + return x.SerializeType + } + return 0 +} + +func (x *Transaction) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Transaction) GetInputs() []*TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *Transaction) GetOutputs() []*TransactionOutput { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *Transaction) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *Transaction) GetExpiry() uint32 { + if x != nil { + return x.Expiry + } + return 0 +} + +// Decred transaction input. +type TransactionInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Reference to the previous transaction's output. + OutPoint *OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + // Transaction version as defined by the sender. + Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // The amount of the input. + Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` + // Creation block height. + BlockHeight uint32 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + // Index within the block. + BlockIndex uint32 `protobuf:"varint,5,opt,name=block_index,json=blockIndex,proto3" json:"block_index,omitempty"` + // Computational script for confirming transaction authorization. + ScriptSig []byte `protobuf:"bytes,6,opt,name=script_sig,json=scriptSig,proto3" json:"script_sig,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionInput) Reset() { + *x = TransactionInput{} + mi := &file_DecredV2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInput) ProtoMessage() {} + +func (x *TransactionInput) ProtoReflect() protoreflect.Message { + mi := &file_DecredV2_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead. +func (*TransactionInput) Descriptor() ([]byte, []int) { + return file_DecredV2_proto_rawDescGZIP(), []int{2} +} + +func (x *TransactionInput) GetOutPoint() *OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +func (x *TransactionInput) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *TransactionInput) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *TransactionInput) GetBlockHeight() uint32 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *TransactionInput) GetBlockIndex() uint32 { + if x != nil { + return x.BlockIndex + } + return 0 +} + +func (x *TransactionInput) GetScriptSig() []byte { + if x != nil { + return x.ScriptSig + } + return nil +} + +// Decred transaction output. +type TransactionOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction amount. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + // Transaction output version. + Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // Usually contains the public key as a Decred script setting up conditions to claim this output. + Script []byte `protobuf:"bytes,3,opt,name=script,proto3" json:"script,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOutput) Reset() { + *x = TransactionOutput{} + mi := &file_DecredV2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOutput) ProtoMessage() {} + +func (x *TransactionOutput) ProtoReflect() protoreflect.Message { + mi := &file_DecredV2_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead. +func (*TransactionOutput) Descriptor() ([]byte, []int) { + return file_DecredV2_proto_rawDescGZIP(), []int{3} +} + +func (x *TransactionOutput) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *TransactionOutput) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *TransactionOutput) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +var File_DecredV2_proto protoreflect.FileDescriptor + +const file_DecredV2_proto_rawDesc = "" + + "\n" + + "\x0eDecredV2.proto\x12\x11TW.DecredV2.Proto\"F\n" + + "\bOutPoint\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\x12\x12\n" + + "\x04vout\x18\x02 \x01(\rR\x04vout\x12\x12\n" + + "\x04tree\x18\x03 \x01(\rR\x04tree\"\x80\x02\n" + + "\vTransaction\x12%\n" + + "\x0eserialize_type\x18\x01 \x01(\rR\rserializeType\x12\x18\n" + + "\aversion\x18\x02 \x01(\rR\aversion\x12;\n" + + "\x06inputs\x18\x03 \x03(\v2#.TW.DecredV2.Proto.TransactionInputR\x06inputs\x12>\n" + + "\aoutputs\x18\x04 \x03(\v2$.TW.DecredV2.Proto.TransactionOutputR\aoutputs\x12\x1b\n" + + "\tlock_time\x18\x05 \x01(\rR\blockTime\x12\x16\n" + + "\x06expiry\x18\x06 \x01(\rR\x06expiry\"\xe1\x01\n" + + "\x10TransactionInput\x128\n" + + "\tout_point\x18\x01 \x01(\v2\x1b.TW.DecredV2.Proto.OutPointR\boutPoint\x12\x1a\n" + + "\bsequence\x18\x02 \x01(\rR\bsequence\x12\x14\n" + + "\x05value\x18\x03 \x01(\x03R\x05value\x12!\n" + + "\fblock_height\x18\x04 \x01(\rR\vblockHeight\x12\x1f\n" + + "\vblock_index\x18\x05 \x01(\rR\n" + + "blockIndex\x12\x1d\n" + + "\n" + + "script_sig\x18\x06 \x01(\fR\tscriptSig\"[\n" + + "\x11TransactionOutput\x12\x14\n" + + "\x05value\x18\x01 \x01(\x03R\x05value\x12\x18\n" + + "\aversion\x18\x02 \x01(\rR\aversion\x12\x16\n" + + "\x06script\x18\x03 \x01(\fR\x06scriptB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_DecredV2_proto_rawDescOnce sync.Once + file_DecredV2_proto_rawDescData []byte +) + +func file_DecredV2_proto_rawDescGZIP() []byte { + file_DecredV2_proto_rawDescOnce.Do(func() { + file_DecredV2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_DecredV2_proto_rawDesc), len(file_DecredV2_proto_rawDesc))) + }) + return file_DecredV2_proto_rawDescData +} + +var file_DecredV2_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_DecredV2_proto_goTypes = []any{ + (*OutPoint)(nil), // 0: TW.DecredV2.Proto.OutPoint + (*Transaction)(nil), // 1: TW.DecredV2.Proto.Transaction + (*TransactionInput)(nil), // 2: TW.DecredV2.Proto.TransactionInput + (*TransactionOutput)(nil), // 3: TW.DecredV2.Proto.TransactionOutput +} +var file_DecredV2_proto_depIdxs = []int32{ + 2, // 0: TW.DecredV2.Proto.Transaction.inputs:type_name -> TW.DecredV2.Proto.TransactionInput + 3, // 1: TW.DecredV2.Proto.Transaction.outputs:type_name -> TW.DecredV2.Proto.TransactionOutput + 0, // 2: TW.DecredV2.Proto.TransactionInput.out_point:type_name -> TW.DecredV2.Proto.OutPoint + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_DecredV2_proto_init() } +func file_DecredV2_proto_init() { + if File_DecredV2_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_DecredV2_proto_rawDesc), len(file_DecredV2_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_DecredV2_proto_goTypes, + DependencyIndexes: file_DecredV2_proto_depIdxs, + MessageInfos: file_DecredV2_proto_msgTypes, + }.Build() + File_DecredV2_proto = out.File + file_DecredV2_proto_goTypes = nil + file_DecredV2_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/eos/EOS.pb.go b/wrapper/go-wrapper/protos/eos/EOS.pb.go new file mode 100644 index 00000000000..a263fe33ac5 --- /dev/null +++ b/wrapper/go-wrapper/protos/eos/EOS.pb.go @@ -0,0 +1,429 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: EOS.proto + +package eos + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type KeyType int32 + +const ( + KeyType_LEGACY KeyType = 0 + KeyType_MODERNK1 KeyType = 1 + KeyType_MODERNR1 KeyType = 2 +) + +// Enum value maps for KeyType. +var ( + KeyType_name = map[int32]string{ + 0: "LEGACY", + 1: "MODERNK1", + 2: "MODERNR1", + } + KeyType_value = map[string]int32{ + "LEGACY": 0, + "MODERNK1": 1, + "MODERNR1": 2, + } +) + +func (x KeyType) Enum() *KeyType { + p := new(KeyType) + *p = x + return p +} + +func (x KeyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyType) Descriptor() protoreflect.EnumDescriptor { + return file_EOS_proto_enumTypes[0].Descriptor() +} + +func (KeyType) Type() protoreflect.EnumType { + return &file_EOS_proto_enumTypes[0] +} + +func (x KeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyType.Descriptor instead. +func (KeyType) EnumDescriptor() ([]byte, []int) { + return file_EOS_proto_rawDescGZIP(), []int{0} +} + +// Values for an Asset object. +type Asset struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Total amount + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Number of decimals defined + Decimals uint32 `protobuf:"varint,2,opt,name=decimals,proto3" json:"decimals,omitempty"` + // Asset symbol + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Asset) Reset() { + *x = Asset{} + mi := &file_EOS_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Asset) ProtoMessage() {} + +func (x *Asset) ProtoReflect() protoreflect.Message { + mi := &file_EOS_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Asset.ProtoReflect.Descriptor instead. +func (*Asset) Descriptor() ([]byte, []int) { + return file_EOS_proto_rawDescGZIP(), []int{0} +} + +func (x *Asset) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Asset) GetDecimals() uint32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *Asset) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Chain id (uint256, serialized big endian) + ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Reference Block Id (uint256, serialized big endian) + ReferenceBlockId []byte `protobuf:"bytes,2,opt,name=reference_block_id,json=referenceBlockId,proto3" json:"reference_block_id,omitempty"` + // Timestamp on the reference block + ReferenceBlockTime int32 `protobuf:"fixed32,3,opt,name=reference_block_time,json=referenceBlockTime,proto3" json:"reference_block_time,omitempty"` + // Currency (e.g. "eosio.token") + Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` + // Sender's username + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` + // Recipient's username + Recipient string `protobuf:"bytes,6,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Memo attached to the transaction + Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` + // Asset details and amount + Asset *Asset `protobuf:"bytes,8,opt,name=asset,proto3" json:"asset,omitempty"` + // Sender's secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,9,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Type of the private key + PrivateKeyType KeyType `protobuf:"varint,10,opt,name=private_key_type,json=privateKeyType,proto3,enum=TW.EOS.Proto.KeyType" json:"private_key_type,omitempty"` + // Expiration of the transaction, if not set, default is reference_block_time + 3600 seconds + Expiration int32 `protobuf:"fixed32,11,opt,name=expiration,proto3" json:"expiration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_EOS_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_EOS_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_EOS_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningInput) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *SigningInput) GetReferenceBlockId() []byte { + if x != nil { + return x.ReferenceBlockId + } + return nil +} + +func (x *SigningInput) GetReferenceBlockTime() int32 { + if x != nil { + return x.ReferenceBlockTime + } + return 0 +} + +func (x *SigningInput) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *SigningInput) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *SigningInput) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *SigningInput) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *SigningInput) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetPrivateKeyType() KeyType { + if x != nil { + return x.PrivateKeyType + } + return KeyType_LEGACY +} + +func (x *SigningInput) GetExpiration() int32 { + if x != nil { + return x.Expiration + } + return 0 +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // JSON of the packed transaction. + JsonEncoded string `protobuf:"bytes,1,opt,name=json_encoded,json=jsonEncoded,proto3" json:"json_encoded,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_EOS_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_EOS_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_EOS_proto_rawDescGZIP(), []int{2} +} + +func (x *SigningOutput) GetJsonEncoded() string { + if x != nil { + return x.JsonEncoded + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_EOS_proto protoreflect.FileDescriptor + +const file_EOS_proto_rawDesc = "" + + "\n" + + "\tEOS.proto\x12\fTW.EOS.Proto\x1a\fCommon.proto\"S\n" + + "\x05Asset\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12\x1a\n" + + "\bdecimals\x18\x02 \x01(\rR\bdecimals\x12\x16\n" + + "\x06symbol\x18\x03 \x01(\tR\x06symbol\"\x9c\x03\n" + + "\fSigningInput\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\fR\achainId\x12,\n" + + "\x12reference_block_id\x18\x02 \x01(\fR\x10referenceBlockId\x120\n" + + "\x14reference_block_time\x18\x03 \x01(\x0fR\x12referenceBlockTime\x12\x1a\n" + + "\bcurrency\x18\x04 \x01(\tR\bcurrency\x12\x16\n" + + "\x06sender\x18\x05 \x01(\tR\x06sender\x12\x1c\n" + + "\trecipient\x18\x06 \x01(\tR\trecipient\x12\x12\n" + + "\x04memo\x18\a \x01(\tR\x04memo\x12)\n" + + "\x05asset\x18\b \x01(\v2\x13.TW.EOS.Proto.AssetR\x05asset\x12\x1f\n" + + "\vprivate_key\x18\t \x01(\fR\n" + + "privateKey\x12?\n" + + "\x10private_key_type\x18\n" + + " \x01(\x0e2\x15.TW.EOS.Proto.KeyTypeR\x0eprivateKeyType\x12\x1e\n" + + "\n" + + "expiration\x18\v \x01(\x0fR\n" + + "expiration\"\x8c\x01\n" + + "\rSigningOutput\x12!\n" + + "\fjson_encoded\x18\x01 \x01(\tR\vjsonEncoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage*1\n" + + "\aKeyType\x12\n" + + "\n" + + "\x06LEGACY\x10\x00\x12\f\n" + + "\bMODERNK1\x10\x01\x12\f\n" + + "\bMODERNR1\x10\x02B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_EOS_proto_rawDescOnce sync.Once + file_EOS_proto_rawDescData []byte +) + +func file_EOS_proto_rawDescGZIP() []byte { + file_EOS_proto_rawDescOnce.Do(func() { + file_EOS_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_EOS_proto_rawDesc), len(file_EOS_proto_rawDesc))) + }) + return file_EOS_proto_rawDescData +} + +var file_EOS_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_EOS_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_EOS_proto_goTypes = []any{ + (KeyType)(0), // 0: TW.EOS.Proto.KeyType + (*Asset)(nil), // 1: TW.EOS.Proto.Asset + (*SigningInput)(nil), // 2: TW.EOS.Proto.SigningInput + (*SigningOutput)(nil), // 3: TW.EOS.Proto.SigningOutput + (common.SigningError)(0), // 4: TW.Common.Proto.SigningError +} +var file_EOS_proto_depIdxs = []int32{ + 1, // 0: TW.EOS.Proto.SigningInput.asset:type_name -> TW.EOS.Proto.Asset + 0, // 1: TW.EOS.Proto.SigningInput.private_key_type:type_name -> TW.EOS.Proto.KeyType + 4, // 2: TW.EOS.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_EOS_proto_init() } +func file_EOS_proto_init() { + if File_EOS_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_EOS_proto_rawDesc), len(file_EOS_proto_rawDesc)), + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_EOS_proto_goTypes, + DependencyIndexes: file_EOS_proto_depIdxs, + EnumInfos: file_EOS_proto_enumTypes, + MessageInfos: file_EOS_proto_msgTypes, + }.Build() + File_EOS_proto = out.File + file_EOS_proto_goTypes = nil + file_EOS_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/ethereum/Ethereum.pb.go b/wrapper/go-wrapper/protos/ethereum/Ethereum.pb.go new file mode 100644 index 00000000000..a16e9ae9a9e --- /dev/null +++ b/wrapper/go-wrapper/protos/ethereum/Ethereum.pb.go @@ -0,0 +1,2128 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Ethereum.proto + +package ethereum + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transaction type +type TransactionMode int32 + +const ( + // Legacy transaction, pre-EIP2718/EIP1559; for fee gasPrice/gasLimit is used + TransactionMode_Legacy TransactionMode = 0 + // Enveloped transaction EIP2718 (with type 0x2), fee is according to EIP1559 (base fee, inclusion fee, ...) + TransactionMode_Enveloped TransactionMode = 1 + // EIP4337-compatible UserOperation + TransactionMode_UserOp TransactionMode = 2 + // EIP-7702 transaction (with type 0x4); allows to set the code of a contract for an EOA. + // Note that `SetCode` transaction extends `Enveloped` transaction. + // https://eips.ethereum.org/EIPS/eip-7702 + TransactionMode_SetCode TransactionMode = 4 +) + +// Enum value maps for TransactionMode. +var ( + TransactionMode_name = map[int32]string{ + 0: "Legacy", + 1: "Enveloped", + 2: "UserOp", + 4: "SetCode", + } + TransactionMode_value = map[string]int32{ + "Legacy": 0, + "Enveloped": 1, + "UserOp": 2, + "SetCode": 4, + } +) + +func (x TransactionMode) Enum() *TransactionMode { + p := new(TransactionMode) + *p = x + return p +} + +func (x TransactionMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionMode) Descriptor() protoreflect.EnumDescriptor { + return file_Ethereum_proto_enumTypes[0].Descriptor() +} + +func (TransactionMode) Type() protoreflect.EnumType { + return &file_Ethereum_proto_enumTypes[0] +} + +func (x TransactionMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionMode.Descriptor instead. +func (TransactionMode) EnumDescriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0} +} + +// Smart Contract Wallet type. +type SCWalletType int32 + +const ( + // ERC-4337 compatible smart contract wallet. + // https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/accounts/SimpleAccount.sol + SCWalletType_SimpleAccount SCWalletType = 0 + // Biz smart contract (Trust Wallet specific) through ERC-4337 EntryPoint. + SCWalletType_Biz4337 SCWalletType = 1 + // Biz smart contract (Trust Wallet specific) directly through ERC-7702. + SCWalletType_Biz SCWalletType = 2 +) + +// Enum value maps for SCWalletType. +var ( + SCWalletType_name = map[int32]string{ + 0: "SimpleAccount", + 1: "Biz4337", + 2: "Biz", + } + SCWalletType_value = map[string]int32{ + "SimpleAccount": 0, + "Biz4337": 1, + "Biz": 2, + } +) + +func (x SCWalletType) Enum() *SCWalletType { + p := new(SCWalletType) + *p = x + return p +} + +func (x SCWalletType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SCWalletType) Descriptor() protoreflect.EnumDescriptor { + return file_Ethereum_proto_enumTypes[1].Descriptor() +} + +func (SCWalletType) Type() protoreflect.EnumType { + return &file_Ethereum_proto_enumTypes[1] +} + +func (x SCWalletType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SCWalletType.Descriptor instead. +func (SCWalletType) EnumDescriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{1} +} + +type MessageType int32 + +const ( + // Sign a message following EIP-191. + MessageType_MessageType_legacy MessageType = 0 + // Sign a message following EIP-191 with EIP-155 replay attack protection. + MessageType_MessageType_eip155 MessageType = 1 + // Sign a typed message EIP-712 V4. + MessageType_MessageType_typed MessageType = 2 + // Sign a typed message EIP-712 V4 with EIP-155 replay attack protection. + MessageType_MessageType_typed_eip155 MessageType = 3 + // Sign a message with Immutable X msg type. + MessageType_MessageType_immutable_x MessageType = 4 + // Sign a EIP-7702 authorization tuple. + MessageType_MessageType_eip7702_authorization MessageType = 5 +) + +// Enum value maps for MessageType. +var ( + MessageType_name = map[int32]string{ + 0: "MessageType_legacy", + 1: "MessageType_eip155", + 2: "MessageType_typed", + 3: "MessageType_typed_eip155", + 4: "MessageType_immutable_x", + 5: "MessageType_eip7702_authorization", + } + MessageType_value = map[string]int32{ + "MessageType_legacy": 0, + "MessageType_eip155": 1, + "MessageType_typed": 2, + "MessageType_typed_eip155": 3, + "MessageType_immutable_x": 4, + "MessageType_eip7702_authorization": 5, + } +) + +func (x MessageType) Enum() *MessageType { + p := new(MessageType) + *p = x + return p +} + +func (x MessageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageType) Descriptor() protoreflect.EnumDescriptor { + return file_Ethereum_proto_enumTypes[2].Descriptor() +} + +func (MessageType) Type() protoreflect.EnumType { + return &file_Ethereum_proto_enumTypes[2] +} + +func (x MessageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageType.Descriptor instead. +func (MessageType) EnumDescriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{2} +} + +// Transaction (transfer, smart contract call, ...) +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Payload transfer + // + // Types that are valid to be assigned to TransactionOneof: + // + // *Transaction_Transfer_ + // *Transaction_Erc20Transfer + // *Transaction_Erc20Approve + // *Transaction_Erc721Transfer + // *Transaction_Erc1155Transfer + // *Transaction_ContractGeneric_ + // *Transaction_ScwBatch + // *Transaction_ScwExecute + TransactionOneof isTransaction_TransactionOneof `protobuf_oneof:"transaction_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Ethereum_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0} +} + +func (x *Transaction) GetTransactionOneof() isTransaction_TransactionOneof { + if x != nil { + return x.TransactionOneof + } + return nil +} + +func (x *Transaction) GetTransfer() *Transaction_Transfer { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Transfer_); ok { + return x.Transfer + } + } + return nil +} + +func (x *Transaction) GetErc20Transfer() *Transaction_ERC20Transfer { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Erc20Transfer); ok { + return x.Erc20Transfer + } + } + return nil +} + +func (x *Transaction) GetErc20Approve() *Transaction_ERC20Approve { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Erc20Approve); ok { + return x.Erc20Approve + } + } + return nil +} + +func (x *Transaction) GetErc721Transfer() *Transaction_ERC721Transfer { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Erc721Transfer); ok { + return x.Erc721Transfer + } + } + return nil +} + +func (x *Transaction) GetErc1155Transfer() *Transaction_ERC1155Transfer { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Erc1155Transfer); ok { + return x.Erc1155Transfer + } + } + return nil +} + +func (x *Transaction) GetContractGeneric() *Transaction_ContractGeneric { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_ContractGeneric_); ok { + return x.ContractGeneric + } + } + return nil +} + +func (x *Transaction) GetScwBatch() *Transaction_SCWalletBatch { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_ScwBatch); ok { + return x.ScwBatch + } + } + return nil +} + +func (x *Transaction) GetScwExecute() *Transaction_SCWalletExecute { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_ScwExecute); ok { + return x.ScwExecute + } + } + return nil +} + +type isTransaction_TransactionOneof interface { + isTransaction_TransactionOneof() +} + +type Transaction_Transfer_ struct { + Transfer *Transaction_Transfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"` +} + +type Transaction_Erc20Transfer struct { + Erc20Transfer *Transaction_ERC20Transfer `protobuf:"bytes,2,opt,name=erc20_transfer,json=erc20Transfer,proto3,oneof"` +} + +type Transaction_Erc20Approve struct { + Erc20Approve *Transaction_ERC20Approve `protobuf:"bytes,3,opt,name=erc20_approve,json=erc20Approve,proto3,oneof"` +} + +type Transaction_Erc721Transfer struct { + Erc721Transfer *Transaction_ERC721Transfer `protobuf:"bytes,4,opt,name=erc721_transfer,json=erc721Transfer,proto3,oneof"` +} + +type Transaction_Erc1155Transfer struct { + Erc1155Transfer *Transaction_ERC1155Transfer `protobuf:"bytes,5,opt,name=erc1155_transfer,json=erc1155Transfer,proto3,oneof"` +} + +type Transaction_ContractGeneric_ struct { + ContractGeneric *Transaction_ContractGeneric `protobuf:"bytes,6,opt,name=contract_generic,json=contractGeneric,proto3,oneof"` +} + +type Transaction_ScwBatch struct { + // Batch transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702). + ScwBatch *Transaction_SCWalletBatch `protobuf:"bytes,7,opt,name=scw_batch,json=scwBatch,proto3,oneof"` +} + +type Transaction_ScwExecute struct { + // Execute transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702). + ScwExecute *Transaction_SCWalletExecute `protobuf:"bytes,8,opt,name=scw_execute,json=scwExecute,proto3,oneof"` +} + +func (*Transaction_Transfer_) isTransaction_TransactionOneof() {} + +func (*Transaction_Erc20Transfer) isTransaction_TransactionOneof() {} + +func (*Transaction_Erc20Approve) isTransaction_TransactionOneof() {} + +func (*Transaction_Erc721Transfer) isTransaction_TransactionOneof() {} + +func (*Transaction_Erc1155Transfer) isTransaction_TransactionOneof() {} + +func (*Transaction_ContractGeneric_) isTransaction_TransactionOneof() {} + +func (*Transaction_ScwBatch) isTransaction_TransactionOneof() {} + +func (*Transaction_ScwExecute) isTransaction_TransactionOneof() {} + +// ERC-4337 structure that describes a transaction to be sent on behalf of a user +type UserOperation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Entry point contract address + EntryPoint string `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"` + // Account factory contract address + InitCode []byte `protobuf:"bytes,2,opt,name=init_code,json=initCode,proto3" json:"init_code,omitempty"` + // Account logic contract address + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + // The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata + PreVerificationGas []byte `protobuf:"bytes,4,opt,name=pre_verification_gas,json=preVerificationGas,proto3" json:"pre_verification_gas,omitempty"` + // The amount of gas to allocate for the verification step + VerificationGasLimit []byte `protobuf:"bytes,5,opt,name=verification_gas_limit,json=verificationGasLimit,proto3" json:"verification_gas_limit,omitempty"` + // Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction) + PaymasterAndData []byte `protobuf:"bytes,6,opt,name=paymaster_and_data,json=paymasterAndData,proto3" json:"paymaster_and_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserOperation) Reset() { + *x = UserOperation{} + mi := &file_Ethereum_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserOperation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserOperation) ProtoMessage() {} + +func (x *UserOperation) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserOperation.ProtoReflect.Descriptor instead. +func (*UserOperation) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{1} +} + +func (x *UserOperation) GetEntryPoint() string { + if x != nil { + return x.EntryPoint + } + return "" +} + +func (x *UserOperation) GetInitCode() []byte { + if x != nil { + return x.InitCode + } + return nil +} + +func (x *UserOperation) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *UserOperation) GetPreVerificationGas() []byte { + if x != nil { + return x.PreVerificationGas + } + return nil +} + +func (x *UserOperation) GetVerificationGasLimit() []byte { + if x != nil { + return x.VerificationGasLimit + } + return nil +} + +func (x *UserOperation) GetPaymasterAndData() []byte { + if x != nil { + return x.PaymasterAndData + } + return nil +} + +// EIP-7702 compatible ERC-4337 structure that describes a transaction to be sent on behalf of a user +type UserOperationV0_7 struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Entry point contract address + EntryPoint string `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"` + // Account factory contract address + Factory string `protobuf:"bytes,2,opt,name=factory,proto3" json:"factory,omitempty"` + // Account factory data + FactoryData []byte `protobuf:"bytes,3,opt,name=factory_data,json=factoryData,proto3" json:"factory_data,omitempty"` + // Account logic contract address + Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` + // The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata + PreVerificationGas []byte `protobuf:"bytes,5,opt,name=pre_verification_gas,json=preVerificationGas,proto3" json:"pre_verification_gas,omitempty"` + // The amount of gas to allocate for the verification step + VerificationGasLimit []byte `protobuf:"bytes,6,opt,name=verification_gas_limit,json=verificationGasLimit,proto3" json:"verification_gas_limit,omitempty"` + // Address of paymaster + Paymaster string `protobuf:"bytes,7,opt,name=paymaster,proto3" json:"paymaster,omitempty"` + // The amount of gas to allocate for the paymaster verification step + PaymasterVerificationGasLimit []byte `protobuf:"bytes,8,opt,name=paymaster_verification_gas_limit,json=paymasterVerificationGasLimit,proto3" json:"paymaster_verification_gas_limit,omitempty"` + // The amount of gas to allocate for paymaster post ops + PaymasterPostOpGasLimit []byte `protobuf:"bytes,9,opt,name=paymaster_post_op_gas_limit,json=paymasterPostOpGasLimit,proto3" json:"paymaster_post_op_gas_limit,omitempty"` + // Paymaster data + PaymasterData []byte `protobuf:"bytes,10,opt,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UserOperationV0_7) Reset() { + *x = UserOperationV0_7{} + mi := &file_Ethereum_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UserOperationV0_7) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserOperationV0_7) ProtoMessage() {} + +func (x *UserOperationV0_7) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserOperationV0_7.ProtoReflect.Descriptor instead. +func (*UserOperationV0_7) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{2} +} + +func (x *UserOperationV0_7) GetEntryPoint() string { + if x != nil { + return x.EntryPoint + } + return "" +} + +func (x *UserOperationV0_7) GetFactory() string { + if x != nil { + return x.Factory + } + return "" +} + +func (x *UserOperationV0_7) GetFactoryData() []byte { + if x != nil { + return x.FactoryData + } + return nil +} + +func (x *UserOperationV0_7) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *UserOperationV0_7) GetPreVerificationGas() []byte { + if x != nil { + return x.PreVerificationGas + } + return nil +} + +func (x *UserOperationV0_7) GetVerificationGasLimit() []byte { + if x != nil { + return x.VerificationGasLimit + } + return nil +} + +func (x *UserOperationV0_7) GetPaymaster() string { + if x != nil { + return x.Paymaster + } + return "" +} + +func (x *UserOperationV0_7) GetPaymasterVerificationGasLimit() []byte { + if x != nil { + return x.PaymasterVerificationGasLimit + } + return nil +} + +func (x *UserOperationV0_7) GetPaymasterPostOpGasLimit() []byte { + if x != nil { + return x.PaymasterPostOpGasLimit + } + return nil +} + +func (x *UserOperationV0_7) GetPaymasterData() []byte { + if x != nil { + return x.PaymasterData + } + return nil +} + +// An item of the [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access list. +type Access struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address to be accessed by the transaction. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Storage keys to be accessed by the transaction. + StoredKeys [][]byte `protobuf:"bytes,2,rep,name=stored_keys,json=storedKeys,proto3" json:"stored_keys,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Access) Reset() { + *x = Access{} + mi := &file_Ethereum_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Access) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Access) ProtoMessage() {} + +func (x *Access) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Access.ProtoReflect.Descriptor instead. +func (*Access) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{3} +} + +func (x *Access) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Access) GetStoredKeys() [][]byte { + if x != nil { + return x.StoredKeys + } + return nil +} + +// [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) authorization. +type Authorization struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address to be authorized, a smart contract address. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // If custom_signature isn't provided, the authorization will be signed with the provided private key, nonce and chainId + CustomSignature *AuthorizationCustomSignature `protobuf:"bytes,3,opt,name=custom_signature,json=customSignature,proto3" json:"custom_signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Authorization) Reset() { + *x = Authorization{} + mi := &file_Ethereum_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Authorization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Authorization) ProtoMessage() {} + +func (x *Authorization) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Authorization.ProtoReflect.Descriptor instead. +func (*Authorization) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{4} +} + +func (x *Authorization) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Authorization) GetCustomSignature() *AuthorizationCustomSignature { + if x != nil { + return x.CustomSignature + } + return nil +} + +// [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) authorization. +type AuthorizationCustomSignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Chain id (uint256, serialized big endian). + ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Nonce, the nonce of authority. + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // The signature, Hex-encoded. + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthorizationCustomSignature) Reset() { + *x = AuthorizationCustomSignature{} + mi := &file_Ethereum_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthorizationCustomSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthorizationCustomSignature) ProtoMessage() {} + +func (x *AuthorizationCustomSignature) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthorizationCustomSignature.ProtoReflect.Descriptor instead. +func (*AuthorizationCustomSignature) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{5} +} + +func (x *AuthorizationCustomSignature) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *AuthorizationCustomSignature) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *AuthorizationCustomSignature) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// Input data necessary to create a signed transaction. +// Legacy and EIP2718/EIP1559 transactions supported, see TransactionMode. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Chain identifier (uint256, serialized big endian) + ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Nonce (uint256, serialized big endian) + Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Transaction version selector: Legacy or enveloped, has impact on fee structure. + // Default is Legacy (value 0) + TxMode TransactionMode `protobuf:"varint,3,opt,name=tx_mode,json=txMode,proto3,enum=TW.Ethereum.Proto.TransactionMode" json:"tx_mode,omitempty"` + // Gas price (uint256, serialized big endian) + // Relevant for legacy transactions only (disregarded for enveloped/EIP1559) + GasPrice []byte `protobuf:"bytes,4,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Gas limit (uint256, serialized big endian) + GasLimit []byte `protobuf:"bytes,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Maximum optional inclusion fee (aka tip) (uint256, serialized big endian) + // Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy) + MaxInclusionFeePerGas []byte `protobuf:"bytes,6,opt,name=max_inclusion_fee_per_gas,json=maxInclusionFeePerGas,proto3" json:"max_inclusion_fee_per_gas,omitempty"` + // Maximum fee (uint256, serialized big endian) + // Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy) + MaxFeePerGas []byte `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"` + // Recipient's address. + // TODO currently, will be moved to each `Transaction` oneof soon. + ToAddress string `protobuf:"bytes,8,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,9,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The payload transaction + Transaction *Transaction `protobuf:"bytes,10,opt,name=transaction,proto3" json:"transaction,omitempty"` + // UserOperation for ERC-4337 wallets + // + // Types that are valid to be assigned to UserOperationOneof: + // + // *SigningInput_UserOperation + // *SigningInput_UserOperationV0_7 + UserOperationOneof isSigningInput_UserOperationOneof `protobuf_oneof:"user_operation_oneof"` + // Optional list of addresses and storage keys that the transaction plans to access. + // Used in `TransactionMode::Enveloped` only. + AccessList []*Access `protobuf:"bytes,12,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"` + // EIP7702 authorization. + // Used in `TransactionMode::SetOp` or `TransactionMode::UserOp`. + // Currently, we support delegation to only one authority at a time. + Eip7702Authorization *Authorization `protobuf:"bytes,15,opt,name=eip7702_authorization,json=eip7702Authorization,proto3" json:"eip7702_authorization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Ethereum_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{6} +} + +func (x *SigningInput) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *SigningInput) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *SigningInput) GetTxMode() TransactionMode { + if x != nil { + return x.TxMode + } + return TransactionMode_Legacy +} + +func (x *SigningInput) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *SigningInput) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +func (x *SigningInput) GetMaxInclusionFeePerGas() []byte { + if x != nil { + return x.MaxInclusionFeePerGas + } + return nil +} + +func (x *SigningInput) GetMaxFeePerGas() []byte { + if x != nil { + return x.MaxFeePerGas + } + return nil +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningInput) GetUserOperationOneof() isSigningInput_UserOperationOneof { + if x != nil { + return x.UserOperationOneof + } + return nil +} + +func (x *SigningInput) GetUserOperation() *UserOperation { + if x != nil { + if x, ok := x.UserOperationOneof.(*SigningInput_UserOperation); ok { + return x.UserOperation + } + } + return nil +} + +func (x *SigningInput) GetUserOperationV0_7() *UserOperationV0_7 { + if x != nil { + if x, ok := x.UserOperationOneof.(*SigningInput_UserOperationV0_7); ok { + return x.UserOperationV0_7 + } + } + return nil +} + +func (x *SigningInput) GetAccessList() []*Access { + if x != nil { + return x.AccessList + } + return nil +} + +func (x *SigningInput) GetEip7702Authorization() *Authorization { + if x != nil { + return x.Eip7702Authorization + } + return nil +} + +type isSigningInput_UserOperationOneof interface { + isSigningInput_UserOperationOneof() +} + +type SigningInput_UserOperation struct { + UserOperation *UserOperation `protobuf:"bytes,11,opt,name=user_operation,json=userOperation,proto3,oneof"` +} + +type SigningInput_UserOperationV0_7 struct { + // EIP-7702 compatible + UserOperationV0_7 *UserOperationV0_7 `protobuf:"bytes,13,opt,name=user_operation_v0_7,json=userOperationV07,proto3,oneof"` +} + +func (*SigningInput_UserOperation) isSigningInput_UserOperationOneof() {} + +func (*SigningInput_UserOperationV0_7) isSigningInput_UserOperationOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // The V, R, S components of the resulting signature, (each uint256, serialized big endian) + V []byte `protobuf:"bytes,2,opt,name=v,proto3" json:"v,omitempty"` + R []byte `protobuf:"bytes,3,opt,name=r,proto3" json:"r,omitempty"` + S []byte `protobuf:"bytes,4,opt,name=s,proto3" json:"s,omitempty"` + // The payload part, supplied in the input or assembled from input parameters + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,6,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,7,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Encoded transaction bytes. + PreHash []byte `protobuf:"bytes,8,opt,name=pre_hash,json=preHash,proto3" json:"pre_hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Ethereum_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{7} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetV() []byte { + if x != nil { + return x.V + } + return nil +} + +func (x *SigningOutput) GetR() []byte { + if x != nil { + return x.R + } + return nil +} + +func (x *SigningOutput) GetS() []byte { + if x != nil { + return x.S + } + return nil +} + +func (x *SigningOutput) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetPreHash() []byte { + if x != nil { + return x.PreHash + } + return nil +} + +type MaybeChainId struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Chain ID. + ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MaybeChainId) Reset() { + *x = MaybeChainId{} + mi := &file_Ethereum_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaybeChainId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaybeChainId) ProtoMessage() {} + +func (x *MaybeChainId) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaybeChainId.ProtoReflect.Descriptor instead. +func (*MaybeChainId) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{8} +} + +func (x *MaybeChainId) GetChainId() uint64 { + if x != nil { + return x.ChainId + } + return 0 +} + +type MessageSigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Message to sign. Either a regular message or a typed data structured message in JSON format. + // Message type should be declared at `message_type`. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // Optional. Used in replay protection and to check Typed Structured Data input. + // Eg. should be set if `message_type` is `MessageType_eip155`, or MessageType_typed, or `MessageType_typed_eip155`. + ChainId *MaybeChainId `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Message type. + MessageType MessageType `protobuf:"varint,4,opt,name=message_type,json=messageType,proto3,enum=TW.Ethereum.Proto.MessageType" json:"message_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageSigningInput) Reset() { + *x = MessageSigningInput{} + mi := &file_Ethereum_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageSigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageSigningInput) ProtoMessage() {} + +func (x *MessageSigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageSigningInput.ProtoReflect.Descriptor instead. +func (*MessageSigningInput) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{9} +} + +func (x *MessageSigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *MessageSigningInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MessageSigningInput) GetChainId() *MaybeChainId { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *MessageSigningInput) GetMessageType() MessageType { + if x != nil { + return x.MessageType + } + return MessageType_MessageType_legacy +} + +type MessageSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The signature, Hex-encoded. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageSigningOutput) Reset() { + *x = MessageSigningOutput{} + mi := &file_Ethereum_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageSigningOutput) ProtoMessage() {} + +func (x *MessageSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageSigningOutput.ProtoReflect.Descriptor instead. +func (*MessageSigningOutput) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{10} +} + +func (x *MessageSigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *MessageSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *MessageSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +type MessageVerifyingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The message signed. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Public key that will verify and recover the message from the signature. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The signature, Hex-encoded. + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageVerifyingInput) Reset() { + *x = MessageVerifyingInput{} + mi := &file_Ethereum_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageVerifyingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageVerifyingInput) ProtoMessage() {} + +func (x *MessageVerifyingInput) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageVerifyingInput.ProtoReflect.Descriptor instead. +func (*MessageVerifyingInput) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{11} +} + +func (x *MessageVerifyingInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MessageVerifyingInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *MessageVerifyingInput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// Native coin transfer transaction +type Transaction_Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to send in wei (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Optional payload data + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_Transfer) Reset() { + *x = Transaction_Transfer{} + mi := &file_Ethereum_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_Transfer) ProtoMessage() {} + +func (x *Transaction_Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_Transfer) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Transaction_Transfer) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Transaction_Transfer) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// ERC20 token transfer transaction +type Transaction_ERC20Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // destination address (string) + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + // Amount to send (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_ERC20Transfer) Reset() { + *x = Transaction_ERC20Transfer{} + mi := &file_Ethereum_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_ERC20Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_ERC20Transfer) ProtoMessage() {} + +func (x *Transaction_ERC20Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_ERC20Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_ERC20Transfer) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Transaction_ERC20Transfer) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Transaction_ERC20Transfer) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// ERC20 approve transaction +type Transaction_ERC20Approve struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Target of the approval + Spender string `protobuf:"bytes,1,opt,name=spender,proto3" json:"spender,omitempty"` + // Amount to send (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_ERC20Approve) Reset() { + *x = Transaction_ERC20Approve{} + mi := &file_Ethereum_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_ERC20Approve) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_ERC20Approve) ProtoMessage() {} + +func (x *Transaction_ERC20Approve) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_ERC20Approve.ProtoReflect.Descriptor instead. +func (*Transaction_ERC20Approve) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Transaction_ERC20Approve) GetSpender() string { + if x != nil { + return x.Spender + } + return "" +} + +func (x *Transaction_ERC20Approve) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// ERC721 NFT transfer transaction +type Transaction_ERC721Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Source address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Destination address + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // ID of the token (uint256, serialized big endian) + TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_ERC721Transfer) Reset() { + *x = Transaction_ERC721Transfer{} + mi := &file_Ethereum_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_ERC721Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_ERC721Transfer) ProtoMessage() {} + +func (x *Transaction_ERC721Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_ERC721Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_ERC721Transfer) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *Transaction_ERC721Transfer) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *Transaction_ERC721Transfer) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Transaction_ERC721Transfer) GetTokenId() []byte { + if x != nil { + return x.TokenId + } + return nil +} + +// ERC1155 NFT transfer transaction +type Transaction_ERC1155Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Source address + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Destination address + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // ID of the token (uint256, serialized big endian) + TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + // The amount of tokens being transferred (uint256, serialized big endian) + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_ERC1155Transfer) Reset() { + *x = Transaction_ERC1155Transfer{} + mi := &file_Ethereum_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_ERC1155Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_ERC1155Transfer) ProtoMessage() {} + +func (x *Transaction_ERC1155Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_ERC1155Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_ERC1155Transfer) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *Transaction_ERC1155Transfer) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *Transaction_ERC1155Transfer) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Transaction_ERC1155Transfer) GetTokenId() []byte { + if x != nil { + return x.TokenId + } + return nil +} + +func (x *Transaction_ERC1155Transfer) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Transaction_ERC1155Transfer) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Generic smart contract transaction +type Transaction_ContractGeneric struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to send in wei (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Contract call payload data + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_ContractGeneric) Reset() { + *x = Transaction_ContractGeneric{} + mi := &file_Ethereum_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_ContractGeneric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_ContractGeneric) ProtoMessage() {} + +func (x *Transaction_ContractGeneric) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_ContractGeneric.ProtoReflect.Descriptor instead. +func (*Transaction_ContractGeneric) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *Transaction_ContractGeneric) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Transaction_ContractGeneric) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Batch transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702). +type Transaction_SCWalletBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Batched calls to be executed on the smart contract wallet. + Calls []*Transaction_SCWalletBatch_BatchedCall `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"` + // Smart contract wallet type. + WalletType SCWalletType `protobuf:"varint,2,opt,name=wallet_type,json=walletType,proto3,enum=TW.Ethereum.Proto.SCWalletType" json:"wallet_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_SCWalletBatch) Reset() { + *x = Transaction_SCWalletBatch{} + mi := &file_Ethereum_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_SCWalletBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_SCWalletBatch) ProtoMessage() {} + +func (x *Transaction_SCWalletBatch) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_SCWalletBatch.ProtoReflect.Descriptor instead. +func (*Transaction_SCWalletBatch) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 6} +} + +func (x *Transaction_SCWalletBatch) GetCalls() []*Transaction_SCWalletBatch_BatchedCall { + if x != nil { + return x.Calls + } + return nil +} + +func (x *Transaction_SCWalletBatch) GetWalletType() SCWalletType { + if x != nil { + return x.WalletType + } + return SCWalletType_SimpleAccount +} + +// Execute transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702). +type Transaction_SCWalletExecute struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction to be executed on the smart contract wallet. + // TODO currently, smart contract wallet address is specified in `SigningInput.toAddress`, but it will be refactored soon. + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + // Smart contract wallet type. + WalletType SCWalletType `protobuf:"varint,2,opt,name=wallet_type,json=walletType,proto3,enum=TW.Ethereum.Proto.SCWalletType" json:"wallet_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_SCWalletExecute) Reset() { + *x = Transaction_SCWalletExecute{} + mi := &file_Ethereum_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_SCWalletExecute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_SCWalletExecute) ProtoMessage() {} + +func (x *Transaction_SCWalletExecute) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_SCWalletExecute.ProtoReflect.Descriptor instead. +func (*Transaction_SCWalletExecute) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 7} +} + +func (x *Transaction_SCWalletExecute) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *Transaction_SCWalletExecute) GetWalletType() SCWalletType { + if x != nil { + return x.WalletType + } + return SCWalletType_SimpleAccount +} + +type Transaction_SCWalletBatch_BatchedCall struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Recipient addresses. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Amounts to send in wei (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Contract call payloads data + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_SCWalletBatch_BatchedCall) Reset() { + *x = Transaction_SCWalletBatch_BatchedCall{} + mi := &file_Ethereum_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_SCWalletBatch_BatchedCall) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_SCWalletBatch_BatchedCall) ProtoMessage() {} + +func (x *Transaction_SCWalletBatch_BatchedCall) ProtoReflect() protoreflect.Message { + mi := &file_Ethereum_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_SCWalletBatch_BatchedCall.ProtoReflect.Descriptor instead. +func (*Transaction_SCWalletBatch_BatchedCall) Descriptor() ([]byte, []int) { + return file_Ethereum_proto_rawDescGZIP(), []int{0, 6, 0} +} + +func (x *Transaction_SCWalletBatch_BatchedCall) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Transaction_SCWalletBatch_BatchedCall) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Transaction_SCWalletBatch_BatchedCall) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +var File_Ethereum_proto protoreflect.FileDescriptor + +const file_Ethereum_proto_rawDesc = "" + + "\n" + + "\x0eEthereum.proto\x12\x11TW.Ethereum.Proto\x1a\fCommon.proto\"\x9e\f\n" + + "\vTransaction\x12E\n" + + "\btransfer\x18\x01 \x01(\v2'.TW.Ethereum.Proto.Transaction.TransferH\x00R\btransfer\x12U\n" + + "\x0eerc20_transfer\x18\x02 \x01(\v2,.TW.Ethereum.Proto.Transaction.ERC20TransferH\x00R\rerc20Transfer\x12R\n" + + "\rerc20_approve\x18\x03 \x01(\v2+.TW.Ethereum.Proto.Transaction.ERC20ApproveH\x00R\ferc20Approve\x12X\n" + + "\x0ferc721_transfer\x18\x04 \x01(\v2-.TW.Ethereum.Proto.Transaction.ERC721TransferH\x00R\x0eerc721Transfer\x12[\n" + + "\x10erc1155_transfer\x18\x05 \x01(\v2..TW.Ethereum.Proto.Transaction.ERC1155TransferH\x00R\x0ferc1155Transfer\x12[\n" + + "\x10contract_generic\x18\x06 \x01(\v2..TW.Ethereum.Proto.Transaction.ContractGenericH\x00R\x0fcontractGeneric\x12K\n" + + "\tscw_batch\x18\a \x01(\v2,.TW.Ethereum.Proto.Transaction.SCWalletBatchH\x00R\bscwBatch\x12Q\n" + + "\vscw_execute\x18\b \x01(\v2..TW.Ethereum.Proto.Transaction.SCWalletExecuteH\x00R\n" + + "scwExecute\x1a6\n" + + "\bTransfer\x12\x16\n" + + "\x06amount\x18\x01 \x01(\fR\x06amount\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x1a7\n" + + "\rERC20Transfer\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x02 \x01(\fR\x06amount\x1a@\n" + + "\fERC20Approve\x12\x18\n" + + "\aspender\x18\x01 \x01(\tR\aspender\x12\x16\n" + + "\x06amount\x18\x02 \x01(\fR\x06amount\x1aO\n" + + "\x0eERC721Transfer\x12\x12\n" + + "\x04from\x18\x01 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x02 \x01(\tR\x02to\x12\x19\n" + + "\btoken_id\x18\x03 \x01(\fR\atokenId\x1az\n" + + "\x0fERC1155Transfer\x12\x12\n" + + "\x04from\x18\x01 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x02 \x01(\tR\x02to\x12\x19\n" + + "\btoken_id\x18\x03 \x01(\fR\atokenId\x12\x14\n" + + "\x05value\x18\x04 \x01(\fR\x05value\x12\x12\n" + + "\x04data\x18\x05 \x01(\fR\x04data\x1a=\n" + + "\x0fContractGeneric\x12\x16\n" + + "\x06amount\x18\x01 \x01(\fR\x06amount\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x1a\xfc\x01\n" + + "\rSCWalletBatch\x12N\n" + + "\x05calls\x18\x01 \x03(\v28.TW.Ethereum.Proto.Transaction.SCWalletBatch.BatchedCallR\x05calls\x12@\n" + + "\vwallet_type\x18\x02 \x01(\x0e2\x1f.TW.Ethereum.Proto.SCWalletTypeR\n" + + "walletType\x1aY\n" + + "\vBatchedCall\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12\x16\n" + + "\x06amount\x18\x02 \x01(\fR\x06amount\x12\x18\n" + + "\apayload\x18\x03 \x01(\fR\apayload\x1a\x95\x01\n" + + "\x0fSCWalletExecute\x12@\n" + + "\vtransaction\x18\x01 \x01(\v2\x1e.TW.Ethereum.Proto.TransactionR\vtransaction\x12@\n" + + "\vwallet_type\x18\x02 \x01(\x0e2\x1f.TW.Ethereum.Proto.SCWalletTypeR\n" + + "walletTypeB\x13\n" + + "\x11transaction_oneof\"\xfb\x01\n" + + "\rUserOperation\x12\x1f\n" + + "\ventry_point\x18\x01 \x01(\tR\n" + + "entryPoint\x12\x1b\n" + + "\tinit_code\x18\x02 \x01(\fR\binitCode\x12\x16\n" + + "\x06sender\x18\x03 \x01(\tR\x06sender\x120\n" + + "\x14pre_verification_gas\x18\x04 \x01(\fR\x12preVerificationGas\x124\n" + + "\x16verification_gas_limit\x18\x05 \x01(\fR\x14verificationGasLimit\x12,\n" + + "\x12paymaster_and_data\x18\x06 \x01(\fR\x10paymasterAndData\"\xbd\x03\n" + + "\x11UserOperationV0_7\x12\x1f\n" + + "\ventry_point\x18\x01 \x01(\tR\n" + + "entryPoint\x12\x18\n" + + "\afactory\x18\x02 \x01(\tR\afactory\x12!\n" + + "\ffactory_data\x18\x03 \x01(\fR\vfactoryData\x12\x16\n" + + "\x06sender\x18\x04 \x01(\tR\x06sender\x120\n" + + "\x14pre_verification_gas\x18\x05 \x01(\fR\x12preVerificationGas\x124\n" + + "\x16verification_gas_limit\x18\x06 \x01(\fR\x14verificationGasLimit\x12\x1c\n" + + "\tpaymaster\x18\a \x01(\tR\tpaymaster\x12G\n" + + " paymaster_verification_gas_limit\x18\b \x01(\fR\x1dpaymasterVerificationGasLimit\x12<\n" + + "\x1bpaymaster_post_op_gas_limit\x18\t \x01(\fR\x17paymasterPostOpGasLimit\x12%\n" + + "\x0epaymaster_data\x18\n" + + " \x01(\fR\rpaymasterData\"C\n" + + "\x06Access\x12\x18\n" + + "\aaddress\x18\x01 \x01(\tR\aaddress\x12\x1f\n" + + "\vstored_keys\x18\x02 \x03(\fR\n" + + "storedKeys\"\x85\x01\n" + + "\rAuthorization\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\x12Z\n" + + "\x10custom_signature\x18\x03 \x01(\v2/.TW.Ethereum.Proto.AuthorizationCustomSignatureR\x0fcustomSignature\"m\n" + + "\x1cAuthorizationCustomSignature\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\fR\achainId\x12\x14\n" + + "\x05nonce\x18\x02 \x01(\fR\x05nonce\x12\x1c\n" + + "\tsignature\x18\x03 \x01(\tR\tsignature\"\xe6\x05\n" + + "\fSigningInput\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\fR\achainId\x12\x14\n" + + "\x05nonce\x18\x02 \x01(\fR\x05nonce\x12;\n" + + "\atx_mode\x18\x03 \x01(\x0e2\".TW.Ethereum.Proto.TransactionModeR\x06txMode\x12\x1b\n" + + "\tgas_price\x18\x04 \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x05 \x01(\fR\bgasLimit\x128\n" + + "\x19max_inclusion_fee_per_gas\x18\x06 \x01(\fR\x15maxInclusionFeePerGas\x12%\n" + + "\x0fmax_fee_per_gas\x18\a \x01(\fR\fmaxFeePerGas\x12\x1d\n" + + "\n" + + "to_address\x18\b \x01(\tR\ttoAddress\x12\x1f\n" + + "\vprivate_key\x18\t \x01(\fR\n" + + "privateKey\x12@\n" + + "\vtransaction\x18\n" + + " \x01(\v2\x1e.TW.Ethereum.Proto.TransactionR\vtransaction\x12I\n" + + "\x0euser_operation\x18\v \x01(\v2 .TW.Ethereum.Proto.UserOperationH\x00R\ruserOperation\x12U\n" + + "\x13user_operation_v0_7\x18\r \x01(\v2$.TW.Ethereum.Proto.UserOperationV0_7H\x00R\x10userOperationV07\x12:\n" + + "\vaccess_list\x18\f \x03(\v2\x19.TW.Ethereum.Proto.AccessR\n" + + "accessList\x12U\n" + + "\x15eip7702_authorization\x18\x0f \x01(\v2 .TW.Ethereum.Proto.AuthorizationR\x14eip7702AuthorizationB\x16\n" + + "\x14user_operation_oneof\"\xdc\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\f\n" + + "\x01v\x18\x02 \x01(\fR\x01v\x12\f\n" + + "\x01r\x18\x03 \x01(\fR\x01r\x12\f\n" + + "\x01s\x18\x04 \x01(\fR\x01s\x12\x12\n" + + "\x04data\x18\x05 \x01(\fR\x04data\x123\n" + + "\x05error\x18\x06 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\a \x01(\tR\ferrorMessage\x12\x19\n" + + "\bpre_hash\x18\b \x01(\fR\apreHash\")\n" + + "\fMaybeChainId\x12\x19\n" + + "\bchain_id\x18\x03 \x01(\x04R\achainId\"\xcf\x01\n" + + "\x13MessageSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12:\n" + + "\bchain_id\x18\x03 \x01(\v2\x1f.TW.Ethereum.Proto.MaybeChainIdR\achainId\x12A\n" + + "\fmessage_type\x18\x04 \x01(\x0e2\x1e.TW.Ethereum.Proto.MessageTypeR\vmessageType\"\x8e\x01\n" + + "\x14MessageSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"n\n" + + "\x15MessageVerifyingInput\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\x1c\n" + + "\tsignature\x18\x03 \x01(\tR\tsignature*E\n" + + "\x0fTransactionMode\x12\n" + + "\n" + + "\x06Legacy\x10\x00\x12\r\n" + + "\tEnveloped\x10\x01\x12\n" + + "\n" + + "\x06UserOp\x10\x02\x12\v\n" + + "\aSetCode\x10\x04*7\n" + + "\fSCWalletType\x12\x11\n" + + "\rSimpleAccount\x10\x00\x12\v\n" + + "\aBiz4337\x10\x01\x12\a\n" + + "\x03Biz\x10\x02*\xb6\x01\n" + + "\vMessageType\x12\x16\n" + + "\x12MessageType_legacy\x10\x00\x12\x16\n" + + "\x12MessageType_eip155\x10\x01\x12\x15\n" + + "\x11MessageType_typed\x10\x02\x12\x1c\n" + + "\x18MessageType_typed_eip155\x10\x03\x12\x1b\n" + + "\x17MessageType_immutable_x\x10\x04\x12%\n" + + "!MessageType_eip7702_authorization\x10\x05B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Ethereum_proto_rawDescOnce sync.Once + file_Ethereum_proto_rawDescData []byte +) + +func file_Ethereum_proto_rawDescGZIP() []byte { + file_Ethereum_proto_rawDescOnce.Do(func() { + file_Ethereum_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Ethereum_proto_rawDesc), len(file_Ethereum_proto_rawDesc))) + }) + return file_Ethereum_proto_rawDescData +} + +var file_Ethereum_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_Ethereum_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_Ethereum_proto_goTypes = []any{ + (TransactionMode)(0), // 0: TW.Ethereum.Proto.TransactionMode + (SCWalletType)(0), // 1: TW.Ethereum.Proto.SCWalletType + (MessageType)(0), // 2: TW.Ethereum.Proto.MessageType + (*Transaction)(nil), // 3: TW.Ethereum.Proto.Transaction + (*UserOperation)(nil), // 4: TW.Ethereum.Proto.UserOperation + (*UserOperationV0_7)(nil), // 5: TW.Ethereum.Proto.UserOperationV0_7 + (*Access)(nil), // 6: TW.Ethereum.Proto.Access + (*Authorization)(nil), // 7: TW.Ethereum.Proto.Authorization + (*AuthorizationCustomSignature)(nil), // 8: TW.Ethereum.Proto.AuthorizationCustomSignature + (*SigningInput)(nil), // 9: TW.Ethereum.Proto.SigningInput + (*SigningOutput)(nil), // 10: TW.Ethereum.Proto.SigningOutput + (*MaybeChainId)(nil), // 11: TW.Ethereum.Proto.MaybeChainId + (*MessageSigningInput)(nil), // 12: TW.Ethereum.Proto.MessageSigningInput + (*MessageSigningOutput)(nil), // 13: TW.Ethereum.Proto.MessageSigningOutput + (*MessageVerifyingInput)(nil), // 14: TW.Ethereum.Proto.MessageVerifyingInput + (*Transaction_Transfer)(nil), // 15: TW.Ethereum.Proto.Transaction.Transfer + (*Transaction_ERC20Transfer)(nil), // 16: TW.Ethereum.Proto.Transaction.ERC20Transfer + (*Transaction_ERC20Approve)(nil), // 17: TW.Ethereum.Proto.Transaction.ERC20Approve + (*Transaction_ERC721Transfer)(nil), // 18: TW.Ethereum.Proto.Transaction.ERC721Transfer + (*Transaction_ERC1155Transfer)(nil), // 19: TW.Ethereum.Proto.Transaction.ERC1155Transfer + (*Transaction_ContractGeneric)(nil), // 20: TW.Ethereum.Proto.Transaction.ContractGeneric + (*Transaction_SCWalletBatch)(nil), // 21: TW.Ethereum.Proto.Transaction.SCWalletBatch + (*Transaction_SCWalletExecute)(nil), // 22: TW.Ethereum.Proto.Transaction.SCWalletExecute + (*Transaction_SCWalletBatch_BatchedCall)(nil), // 23: TW.Ethereum.Proto.Transaction.SCWalletBatch.BatchedCall + (common.SigningError)(0), // 24: TW.Common.Proto.SigningError +} +var file_Ethereum_proto_depIdxs = []int32{ + 15, // 0: TW.Ethereum.Proto.Transaction.transfer:type_name -> TW.Ethereum.Proto.Transaction.Transfer + 16, // 1: TW.Ethereum.Proto.Transaction.erc20_transfer:type_name -> TW.Ethereum.Proto.Transaction.ERC20Transfer + 17, // 2: TW.Ethereum.Proto.Transaction.erc20_approve:type_name -> TW.Ethereum.Proto.Transaction.ERC20Approve + 18, // 3: TW.Ethereum.Proto.Transaction.erc721_transfer:type_name -> TW.Ethereum.Proto.Transaction.ERC721Transfer + 19, // 4: TW.Ethereum.Proto.Transaction.erc1155_transfer:type_name -> TW.Ethereum.Proto.Transaction.ERC1155Transfer + 20, // 5: TW.Ethereum.Proto.Transaction.contract_generic:type_name -> TW.Ethereum.Proto.Transaction.ContractGeneric + 21, // 6: TW.Ethereum.Proto.Transaction.scw_batch:type_name -> TW.Ethereum.Proto.Transaction.SCWalletBatch + 22, // 7: TW.Ethereum.Proto.Transaction.scw_execute:type_name -> TW.Ethereum.Proto.Transaction.SCWalletExecute + 8, // 8: TW.Ethereum.Proto.Authorization.custom_signature:type_name -> TW.Ethereum.Proto.AuthorizationCustomSignature + 0, // 9: TW.Ethereum.Proto.SigningInput.tx_mode:type_name -> TW.Ethereum.Proto.TransactionMode + 3, // 10: TW.Ethereum.Proto.SigningInput.transaction:type_name -> TW.Ethereum.Proto.Transaction + 4, // 11: TW.Ethereum.Proto.SigningInput.user_operation:type_name -> TW.Ethereum.Proto.UserOperation + 5, // 12: TW.Ethereum.Proto.SigningInput.user_operation_v0_7:type_name -> TW.Ethereum.Proto.UserOperationV0_7 + 6, // 13: TW.Ethereum.Proto.SigningInput.access_list:type_name -> TW.Ethereum.Proto.Access + 7, // 14: TW.Ethereum.Proto.SigningInput.eip7702_authorization:type_name -> TW.Ethereum.Proto.Authorization + 24, // 15: TW.Ethereum.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 11, // 16: TW.Ethereum.Proto.MessageSigningInput.chain_id:type_name -> TW.Ethereum.Proto.MaybeChainId + 2, // 17: TW.Ethereum.Proto.MessageSigningInput.message_type:type_name -> TW.Ethereum.Proto.MessageType + 24, // 18: TW.Ethereum.Proto.MessageSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 23, // 19: TW.Ethereum.Proto.Transaction.SCWalletBatch.calls:type_name -> TW.Ethereum.Proto.Transaction.SCWalletBatch.BatchedCall + 1, // 20: TW.Ethereum.Proto.Transaction.SCWalletBatch.wallet_type:type_name -> TW.Ethereum.Proto.SCWalletType + 3, // 21: TW.Ethereum.Proto.Transaction.SCWalletExecute.transaction:type_name -> TW.Ethereum.Proto.Transaction + 1, // 22: TW.Ethereum.Proto.Transaction.SCWalletExecute.wallet_type:type_name -> TW.Ethereum.Proto.SCWalletType + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_Ethereum_proto_init() } +func file_Ethereum_proto_init() { + if File_Ethereum_proto != nil { + return + } + file_Ethereum_proto_msgTypes[0].OneofWrappers = []any{ + (*Transaction_Transfer_)(nil), + (*Transaction_Erc20Transfer)(nil), + (*Transaction_Erc20Approve)(nil), + (*Transaction_Erc721Transfer)(nil), + (*Transaction_Erc1155Transfer)(nil), + (*Transaction_ContractGeneric_)(nil), + (*Transaction_ScwBatch)(nil), + (*Transaction_ScwExecute)(nil), + } + file_Ethereum_proto_msgTypes[6].OneofWrappers = []any{ + (*SigningInput_UserOperation)(nil), + (*SigningInput_UserOperationV0_7)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Ethereum_proto_rawDesc), len(file_Ethereum_proto_rawDesc)), + NumEnums: 3, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Ethereum_proto_goTypes, + DependencyIndexes: file_Ethereum_proto_depIdxs, + EnumInfos: file_Ethereum_proto_enumTypes, + MessageInfos: file_Ethereum_proto_msgTypes, + }.Build() + File_Ethereum_proto = out.File + file_Ethereum_proto_goTypes = nil + file_Ethereum_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/ethereumabi/EthereumAbi.pb.go b/wrapper/go-wrapper/protos/ethereumabi/EthereumAbi.pb.go new file mode 100644 index 00000000000..be1920a0f4d --- /dev/null +++ b/wrapper/go-wrapper/protos/ethereumabi/EthereumAbi.pb.go @@ -0,0 +1,2086 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: EthereumAbi.proto + +package ethereumabi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AbiError int32 + +const ( + // This is the OK case, with value=0 + AbiError_OK AbiError = 0 + // Internal error. + AbiError_Error_internal AbiError = 1 + // Unexpected function signature or ABI mismatch. + AbiError_Error_abi_mismatch AbiError = 2 + // Invalid ABI. + AbiError_Error_invalid_abi AbiError = 3 + // Invalid parameter type. + AbiError_Error_invalid_param_type AbiError = 4 + // Invalid address value. + AbiError_Error_invalid_address_value AbiError = 5 + // Invalid UInt value. + AbiError_Error_invalid_uint_value AbiError = 6 + // Missing parameter type. + AbiError_Error_missing_param_type AbiError = 7 + // Missing parameter value. + AbiError_Error_missing_param_value AbiError = 8 + // Invalid encoded data. + AbiError_Error_decoding_data AbiError = 9 + // Invalid empty type. + // For example, bytes0, address[0]. + AbiError_Error_empty_type AbiError = 10 +) + +// Enum value maps for AbiError. +var ( + AbiError_name = map[int32]string{ + 0: "OK", + 1: "Error_internal", + 2: "Error_abi_mismatch", + 3: "Error_invalid_abi", + 4: "Error_invalid_param_type", + 5: "Error_invalid_address_value", + 6: "Error_invalid_uint_value", + 7: "Error_missing_param_type", + 8: "Error_missing_param_value", + 9: "Error_decoding_data", + 10: "Error_empty_type", + } + AbiError_value = map[string]int32{ + "OK": 0, + "Error_internal": 1, + "Error_abi_mismatch": 2, + "Error_invalid_abi": 3, + "Error_invalid_param_type": 4, + "Error_invalid_address_value": 5, + "Error_invalid_uint_value": 6, + "Error_missing_param_type": 7, + "Error_missing_param_value": 8, + "Error_decoding_data": 9, + "Error_empty_type": 10, + } +) + +func (x AbiError) Enum() *AbiError { + p := new(AbiError) + *p = x + return p +} + +func (x AbiError) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AbiError) Descriptor() protoreflect.EnumDescriptor { + return file_EthereumAbi_proto_enumTypes[0].Descriptor() +} + +func (AbiError) Type() protoreflect.EnumType { + return &file_EthereumAbi_proto_enumTypes[0] +} + +func (x AbiError) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AbiError.Descriptor instead. +func (AbiError) EnumDescriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{0} +} + +// Indicates a boolean type. +type BoolType struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolType) Reset() { + *x = BoolType{} + mi := &file_EthereumAbi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolType) ProtoMessage() {} + +func (x *BoolType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolType.ProtoReflect.Descriptor instead. +func (*BoolType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{0} +} + +// Generic number type for all bit sizes, like UInt24, 40, 48, ... 248. +type NumberNType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The number of bits of an integer. + Bits uint32 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NumberNType) Reset() { + *x = NumberNType{} + mi := &file_EthereumAbi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NumberNType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NumberNType) ProtoMessage() {} + +func (x *NumberNType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NumberNType.ProtoReflect.Descriptor instead. +func (*NumberNType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{1} +} + +func (x *NumberNType) GetBits() uint32 { + if x != nil { + return x.Bits + } + return 0 +} + +// Indicates a string type. +type StringType struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringType) Reset() { + *x = StringType{} + mi := &file_EthereumAbi_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringType) ProtoMessage() {} + +func (x *StringType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringType.ProtoReflect.Descriptor instead. +func (*StringType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{2} +} + +// Indicates an address type. +type AddressType struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddressType) Reset() { + *x = AddressType{} + mi := &file_EthereumAbi_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddressType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressType) ProtoMessage() {} + +func (x *AddressType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddressType.ProtoReflect.Descriptor instead. +func (*AddressType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{3} +} + +// Indicates an array type with an inner `element_type`. +type ArrayType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The type of array elements. + ElementType *ParamType `protobuf:"bytes,1,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArrayType) Reset() { + *x = ArrayType{} + mi := &file_EthereumAbi_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArrayType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArrayType) ProtoMessage() {} + +func (x *ArrayType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArrayType.ProtoReflect.Descriptor instead. +func (*ArrayType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{4} +} + +func (x *ArrayType) GetElementType() *ParamType { + if x != nil { + return x.ElementType + } + return nil +} + +// Indicates a fixed-size array type with an inner `element_type`. +type FixedArrayType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The fixed-size of the array. + Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + // The type of array elements. + ElementType *ParamType `protobuf:"bytes,2,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FixedArrayType) Reset() { + *x = FixedArrayType{} + mi := &file_EthereumAbi_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FixedArrayType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FixedArrayType) ProtoMessage() {} + +func (x *FixedArrayType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FixedArrayType.ProtoReflect.Descriptor instead. +func (*FixedArrayType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{5} +} + +func (x *FixedArrayType) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *FixedArrayType) GetElementType() *ParamType { + if x != nil { + return x.ElementType + } + return nil +} + +// Indicates a byte array type. +type ByteArrayType struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ByteArrayType) Reset() { + *x = ByteArrayType{} + mi := &file_EthereumAbi_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ByteArrayType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ByteArrayType) ProtoMessage() {} + +func (x *ByteArrayType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ByteArrayType.ProtoReflect.Descriptor instead. +func (*ByteArrayType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{6} +} + +// Indicates a fixed-size byte array type. +type ByteArrayFixType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The fixed-size of the array. + Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ByteArrayFixType) Reset() { + *x = ByteArrayFixType{} + mi := &file_EthereumAbi_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ByteArrayFixType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ByteArrayFixType) ProtoMessage() {} + +func (x *ByteArrayFixType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ByteArrayFixType.ProtoReflect.Descriptor instead. +func (*ByteArrayFixType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{7} +} + +func (x *ByteArrayFixType) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +// Indicates a tuple with inner type parameters. +type TupleType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Tuple named parameters. + Params []*Param `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TupleType) Reset() { + *x = TupleType{} + mi := &file_EthereumAbi_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TupleType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TupleType) ProtoMessage() {} + +func (x *TupleType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TupleType.ProtoReflect.Descriptor instead. +func (*TupleType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{8} +} + +func (x *TupleType) GetParams() []*Param { + if x != nil { + return x.Params + } + return nil +} + +// Named parameter with type. +type Param struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Name of the parameter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Type of the parameter. + Param *ParamType `protobuf:"bytes,2,opt,name=param,proto3" json:"param,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Param) Reset() { + *x = Param{} + mi := &file_EthereumAbi_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Param) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Param) ProtoMessage() {} + +func (x *Param) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Param.ProtoReflect.Descriptor instead. +func (*Param) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{9} +} + +func (x *Param) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Param) GetParam() *ParamType { + if x != nil { + return x.Param + } + return nil +} + +type ParamType struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Param: + // + // *ParamType_Boolean + // *ParamType_NumberInt + // *ParamType_NumberUint + // *ParamType_StringParam + // *ParamType_Address + // *ParamType_ByteArray + // *ParamType_ByteArrayFix + // *ParamType_Array + // *ParamType_FixedArray + // *ParamType_Tuple + Param isParamType_Param `protobuf_oneof:"param"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParamType) Reset() { + *x = ParamType{} + mi := &file_EthereumAbi_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParamType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParamType) ProtoMessage() {} + +func (x *ParamType) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParamType.ProtoReflect.Descriptor instead. +func (*ParamType) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{10} +} + +func (x *ParamType) GetParam() isParamType_Param { + if x != nil { + return x.Param + } + return nil +} + +func (x *ParamType) GetBoolean() *BoolType { + if x != nil { + if x, ok := x.Param.(*ParamType_Boolean); ok { + return x.Boolean + } + } + return nil +} + +func (x *ParamType) GetNumberInt() *NumberNType { + if x != nil { + if x, ok := x.Param.(*ParamType_NumberInt); ok { + return x.NumberInt + } + } + return nil +} + +func (x *ParamType) GetNumberUint() *NumberNType { + if x != nil { + if x, ok := x.Param.(*ParamType_NumberUint); ok { + return x.NumberUint + } + } + return nil +} + +func (x *ParamType) GetStringParam() *StringType { + if x != nil { + if x, ok := x.Param.(*ParamType_StringParam); ok { + return x.StringParam + } + } + return nil +} + +func (x *ParamType) GetAddress() *AddressType { + if x != nil { + if x, ok := x.Param.(*ParamType_Address); ok { + return x.Address + } + } + return nil +} + +func (x *ParamType) GetByteArray() *ByteArrayType { + if x != nil { + if x, ok := x.Param.(*ParamType_ByteArray); ok { + return x.ByteArray + } + } + return nil +} + +func (x *ParamType) GetByteArrayFix() *ByteArrayFixType { + if x != nil { + if x, ok := x.Param.(*ParamType_ByteArrayFix); ok { + return x.ByteArrayFix + } + } + return nil +} + +func (x *ParamType) GetArray() *ArrayType { + if x != nil { + if x, ok := x.Param.(*ParamType_Array); ok { + return x.Array + } + } + return nil +} + +func (x *ParamType) GetFixedArray() *FixedArrayType { + if x != nil { + if x, ok := x.Param.(*ParamType_FixedArray); ok { + return x.FixedArray + } + } + return nil +} + +func (x *ParamType) GetTuple() *TupleType { + if x != nil { + if x, ok := x.Param.(*ParamType_Tuple); ok { + return x.Tuple + } + } + return nil +} + +type isParamType_Param interface { + isParamType_Param() +} + +type ParamType_Boolean struct { + Boolean *BoolType `protobuf:"bytes,1,opt,name=boolean,proto3,oneof"` +} + +type ParamType_NumberInt struct { + NumberInt *NumberNType `protobuf:"bytes,2,opt,name=number_int,json=numberInt,proto3,oneof"` +} + +type ParamType_NumberUint struct { + NumberUint *NumberNType `protobuf:"bytes,3,opt,name=number_uint,json=numberUint,proto3,oneof"` +} + +type ParamType_StringParam struct { + // Nested values. Gap in field numbering is intentional. + StringParam *StringType `protobuf:"bytes,7,opt,name=string_param,json=stringParam,proto3,oneof"` +} + +type ParamType_Address struct { + Address *AddressType `protobuf:"bytes,8,opt,name=address,proto3,oneof"` +} + +type ParamType_ByteArray struct { + ByteArray *ByteArrayType `protobuf:"bytes,9,opt,name=byte_array,json=byteArray,proto3,oneof"` +} + +type ParamType_ByteArrayFix struct { + ByteArrayFix *ByteArrayFixType `protobuf:"bytes,10,opt,name=byte_array_fix,json=byteArrayFix,proto3,oneof"` +} + +type ParamType_Array struct { + // Nested values. Gap in field numbering is intentional. + Array *ArrayType `protobuf:"bytes,14,opt,name=array,proto3,oneof"` +} + +type ParamType_FixedArray struct { + FixedArray *FixedArrayType `protobuf:"bytes,15,opt,name=fixed_array,json=fixedArray,proto3,oneof"` +} + +type ParamType_Tuple struct { + // Nested values. Gap in field numbering is intentional. + Tuple *TupleType `protobuf:"bytes,19,opt,name=tuple,proto3,oneof"` +} + +func (*ParamType_Boolean) isParamType_Param() {} + +func (*ParamType_NumberInt) isParamType_Param() {} + +func (*ParamType_NumberUint) isParamType_Param() {} + +func (*ParamType_StringParam) isParamType_Param() {} + +func (*ParamType_Address) isParamType_Param() {} + +func (*ParamType_ByteArray) isParamType_Param() {} + +func (*ParamType_ByteArrayFix) isParamType_Param() {} + +func (*ParamType_Array) isParamType_Param() {} + +func (*ParamType_FixedArray) isParamType_Param() {} + +func (*ParamType_Tuple) isParamType_Param() {} + +// Generic number parameter for all other bit sizes, like UInt24, 40, 48, ... 248. +type NumberNParam struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Count of bits of the number. + // 0 < bits <= 256, bits % 8 == 0 + Bits uint32 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"` + // Serialized big endian. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NumberNParam) Reset() { + *x = NumberNParam{} + mi := &file_EthereumAbi_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NumberNParam) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NumberNParam) ProtoMessage() {} + +func (x *NumberNParam) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NumberNParam.ProtoReflect.Descriptor instead. +func (*NumberNParam) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{11} +} + +func (x *NumberNParam) GetBits() uint32 { + if x != nil { + return x.Bits + } + return 0 +} + +func (x *NumberNParam) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// A byte array of arbitrary size. +type ArrayParam struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The type of array elements. + ElementType *ParamType `protobuf:"bytes,1,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"` + // Array elements. + Elements []*Token `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ArrayParam) Reset() { + *x = ArrayParam{} + mi := &file_EthereumAbi_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ArrayParam) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArrayParam) ProtoMessage() {} + +func (x *ArrayParam) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArrayParam.ProtoReflect.Descriptor instead. +func (*ArrayParam) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{12} +} + +func (x *ArrayParam) GetElementType() *ParamType { + if x != nil { + return x.ElementType + } + return nil +} + +func (x *ArrayParam) GetElements() []*Token { + if x != nil { + return x.Elements + } + return nil +} + +// A tuple with various parameters similar to a structure. +type TupleParam struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Tokens (values) of the tuple parameters. + Params []*Token `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TupleParam) Reset() { + *x = TupleParam{} + mi := &file_EthereumAbi_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TupleParam) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TupleParam) ProtoMessage() {} + +func (x *TupleParam) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TupleParam.ProtoReflect.Descriptor instead. +func (*TupleParam) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{13} +} + +func (x *TupleParam) GetParams() []*Token { + if x != nil { + return x.Params + } + return nil +} + +// A value of an ABI parameter. +type Token struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Optional. Name of a corresponding parameter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Types that are valid to be assigned to Token: + // + // *Token_Boolean + // *Token_NumberInt + // *Token_NumberUint + // *Token_StringValue + // *Token_Address + // *Token_ByteArray + // *Token_ByteArrayFix + // *Token_Array + // *Token_FixedArray + // *Token_Tuple + Token isToken_Token `protobuf_oneof:"token"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Token) Reset() { + *x = Token{} + mi := &file_EthereumAbi_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Token) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Token) ProtoMessage() {} + +func (x *Token) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Token.ProtoReflect.Descriptor instead. +func (*Token) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{14} +} + +func (x *Token) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Token) GetToken() isToken_Token { + if x != nil { + return x.Token + } + return nil +} + +func (x *Token) GetBoolean() bool { + if x != nil { + if x, ok := x.Token.(*Token_Boolean); ok { + return x.Boolean + } + } + return false +} + +func (x *Token) GetNumberInt() *NumberNParam { + if x != nil { + if x, ok := x.Token.(*Token_NumberInt); ok { + return x.NumberInt + } + } + return nil +} + +func (x *Token) GetNumberUint() *NumberNParam { + if x != nil { + if x, ok := x.Token.(*Token_NumberUint); ok { + return x.NumberUint + } + } + return nil +} + +func (x *Token) GetStringValue() string { + if x != nil { + if x, ok := x.Token.(*Token_StringValue); ok { + return x.StringValue + } + } + return "" +} + +func (x *Token) GetAddress() string { + if x != nil { + if x, ok := x.Token.(*Token_Address); ok { + return x.Address + } + } + return "" +} + +func (x *Token) GetByteArray() []byte { + if x != nil { + if x, ok := x.Token.(*Token_ByteArray); ok { + return x.ByteArray + } + } + return nil +} + +func (x *Token) GetByteArrayFix() []byte { + if x != nil { + if x, ok := x.Token.(*Token_ByteArrayFix); ok { + return x.ByteArrayFix + } + } + return nil +} + +func (x *Token) GetArray() *ArrayParam { + if x != nil { + if x, ok := x.Token.(*Token_Array); ok { + return x.Array + } + } + return nil +} + +func (x *Token) GetFixedArray() *ArrayParam { + if x != nil { + if x, ok := x.Token.(*Token_FixedArray); ok { + return x.FixedArray + } + } + return nil +} + +func (x *Token) GetTuple() *TupleParam { + if x != nil { + if x, ok := x.Token.(*Token_Tuple); ok { + return x.Tuple + } + } + return nil +} + +type isToken_Token interface { + isToken_Token() +} + +type Token_Boolean struct { + // Integer values. + Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"` +} + +type Token_NumberInt struct { + NumberInt *NumberNParam `protobuf:"bytes,3,opt,name=number_int,json=numberInt,proto3,oneof"` +} + +type Token_NumberUint struct { + NumberUint *NumberNParam `protobuf:"bytes,4,opt,name=number_uint,json=numberUint,proto3,oneof"` +} + +type Token_StringValue struct { + // Simple values. Gap in field numbering is intentional. + StringValue string `protobuf:"bytes,7,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type Token_Address struct { + Address string `protobuf:"bytes,8,opt,name=address,proto3,oneof"` +} + +type Token_ByteArray struct { + ByteArray []byte `protobuf:"bytes,9,opt,name=byte_array,json=byteArray,proto3,oneof"` +} + +type Token_ByteArrayFix struct { + ByteArrayFix []byte `protobuf:"bytes,10,opt,name=byte_array_fix,json=byteArrayFix,proto3,oneof"` +} + +type Token_Array struct { + // Nested values. Gap in field numbering is intentional. + Array *ArrayParam `protobuf:"bytes,14,opt,name=array,proto3,oneof"` +} + +type Token_FixedArray struct { + FixedArray *ArrayParam `protobuf:"bytes,15,opt,name=fixed_array,json=fixedArray,proto3,oneof"` +} + +type Token_Tuple struct { + // Nested values. Gap in field numbering is intentional. + Tuple *TupleParam `protobuf:"bytes,19,opt,name=tuple,proto3,oneof"` +} + +func (*Token_Boolean) isToken_Token() {} + +func (*Token_NumberInt) isToken_Token() {} + +func (*Token_NumberUint) isToken_Token() {} + +func (*Token_StringValue) isToken_Token() {} + +func (*Token_Address) isToken_Token() {} + +func (*Token_ByteArray) isToken_Token() {} + +func (*Token_ByteArrayFix) isToken_Token() {} + +func (*Token_Array) isToken_Token() {} + +func (*Token_FixedArray) isToken_Token() {} + +func (*Token_Tuple) isToken_Token() {} + +// Decode a contract call (function input) according to the given ABI json. +type ContractCallDecodingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An encoded smart contract call with a prefixed function signature (4 bytes). + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // A smart contract ABI in JSON. + // Each ABI function must be mapped to a short signature. + // Expected to be a set of functions mapped to corresponding short signatures. + // Example: + // ``` + // + // { + // "1896f70a": { + // "name": "setResolver", + // "inputs": [...], + // ... + // }, + // "ac9650d8": { + // "name": "multicall", + // "inputs": [...], + // ... + // } + // } + // + // ``` + SmartContractAbiJson string `protobuf:"bytes,2,opt,name=smart_contract_abi_json,json=smartContractAbiJson,proto3" json:"smart_contract_abi_json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContractCallDecodingInput) Reset() { + *x = ContractCallDecodingInput{} + mi := &file_EthereumAbi_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContractCallDecodingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractCallDecodingInput) ProtoMessage() {} + +func (x *ContractCallDecodingInput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractCallDecodingInput.ProtoReflect.Descriptor instead. +func (*ContractCallDecodingInput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{15} +} + +func (x *ContractCallDecodingInput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *ContractCallDecodingInput) GetSmartContractAbiJson() string { + if x != nil { + return x.SmartContractAbiJson + } + return "" +} + +type ContractCallDecodingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Human readable json format, according to the input `ContractCallDecodingInput::smart_contract_abi_json`. + DecodedJson string `protobuf:"bytes,1,opt,name=decoded_json,json=decodedJson,proto3" json:"decoded_json,omitempty"` + // Decoded parameters. + Tokens []*Token `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error AbiError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContractCallDecodingOutput) Reset() { + *x = ContractCallDecodingOutput{} + mi := &file_EthereumAbi_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContractCallDecodingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractCallDecodingOutput) ProtoMessage() {} + +func (x *ContractCallDecodingOutput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractCallDecodingOutput.ProtoReflect.Descriptor instead. +func (*ContractCallDecodingOutput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{16} +} + +func (x *ContractCallDecodingOutput) GetDecodedJson() string { + if x != nil { + return x.DecodedJson + } + return "" +} + +func (x *ContractCallDecodingOutput) GetTokens() []*Token { + if x != nil { + return x.Tokens + } + return nil +} + +func (x *ContractCallDecodingOutput) GetError() AbiError { + if x != nil { + return x.Error + } + return AbiError_OK +} + +func (x *ContractCallDecodingOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// A set of ABI type parameters. +type AbiParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ABI type parameters. + Params []*Param `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AbiParams) Reset() { + *x = AbiParams{} + mi := &file_EthereumAbi_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AbiParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AbiParams) ProtoMessage() {} + +func (x *AbiParams) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AbiParams.ProtoReflect.Descriptor instead. +func (*AbiParams) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{17} +} + +func (x *AbiParams) GetParams() []*Param { + if x != nil { + return x.Params + } + return nil +} + +// Decode a function input or output data according to the given ABI json. +type ParamsDecodingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An encoded ABI. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Types that are valid to be assigned to Abi: + // + // *ParamsDecodingInput_AbiJson + // *ParamsDecodingInput_AbiParams + Abi isParamsDecodingInput_Abi `protobuf_oneof:"abi"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParamsDecodingInput) Reset() { + *x = ParamsDecodingInput{} + mi := &file_EthereumAbi_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParamsDecodingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParamsDecodingInput) ProtoMessage() {} + +func (x *ParamsDecodingInput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParamsDecodingInput.ProtoReflect.Descriptor instead. +func (*ParamsDecodingInput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{18} +} + +func (x *ParamsDecodingInput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *ParamsDecodingInput) GetAbi() isParamsDecodingInput_Abi { + if x != nil { + return x.Abi + } + return nil +} + +func (x *ParamsDecodingInput) GetAbiJson() string { + if x != nil { + if x, ok := x.Abi.(*ParamsDecodingInput_AbiJson); ok { + return x.AbiJson + } + } + return "" +} + +func (x *ParamsDecodingInput) GetAbiParams() *AbiParams { + if x != nil { + if x, ok := x.Abi.(*ParamsDecodingInput_AbiParams); ok { + return x.AbiParams + } + } + return nil +} + +type isParamsDecodingInput_Abi interface { + isParamsDecodingInput_Abi() +} + +type ParamsDecodingInput_AbiJson struct { + // A set of ABI parameters in JSON. + // Expected to be a JSON array at the entry level. + // Example: + // ``` + // [ + // + // { + // "name": "_to', + // "type": "address" + // }, + // { + // "name": "_value", + // "type": "uint256" + // } + // + // ] + // ``` + AbiJson string `protobuf:"bytes,2,opt,name=abi_json,json=abiJson,proto3,oneof"` +} + +type ParamsDecodingInput_AbiParams struct { + // A set of ABI type parameters. + AbiParams *AbiParams `protobuf:"bytes,3,opt,name=abi_params,json=abiParams,proto3,oneof"` +} + +func (*ParamsDecodingInput_AbiJson) isParamsDecodingInput_Abi() {} + +func (*ParamsDecodingInput_AbiParams) isParamsDecodingInput_Abi() {} + +type ParamsDecodingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Decoded parameters. + Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error AbiError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParamsDecodingOutput) Reset() { + *x = ParamsDecodingOutput{} + mi := &file_EthereumAbi_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParamsDecodingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParamsDecodingOutput) ProtoMessage() {} + +func (x *ParamsDecodingOutput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParamsDecodingOutput.ProtoReflect.Descriptor instead. +func (*ParamsDecodingOutput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{19} +} + +func (x *ParamsDecodingOutput) GetTokens() []*Token { + if x != nil { + return x.Tokens + } + return nil +} + +func (x *ParamsDecodingOutput) GetError() AbiError { + if x != nil { + return x.Error + } + return AbiError_OK +} + +func (x *ParamsDecodingOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Decode an Eth ABI value. +type ValueDecodingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An encoded value to be decoded. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // A type of the parameter. + // Example: "bytes[32]". + // Please note `tuple` is not supported. + ParamType string `protobuf:"bytes,2,opt,name=param_type,json=paramType,proto3" json:"param_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValueDecodingInput) Reset() { + *x = ValueDecodingInput{} + mi := &file_EthereumAbi_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValueDecodingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueDecodingInput) ProtoMessage() {} + +func (x *ValueDecodingInput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValueDecodingInput.ProtoReflect.Descriptor instead. +func (*ValueDecodingInput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{20} +} + +func (x *ValueDecodingInput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *ValueDecodingInput) GetParamType() string { + if x != nil { + return x.ParamType + } + return "" +} + +type ValueDecodingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Decoded parameter. + Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // Decoded parameter as a string. + ParamStr string `protobuf:"bytes,2,opt,name=param_str,json=paramStr,proto3" json:"param_str,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error AbiError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValueDecodingOutput) Reset() { + *x = ValueDecodingOutput{} + mi := &file_EthereumAbi_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValueDecodingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueDecodingOutput) ProtoMessage() {} + +func (x *ValueDecodingOutput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValueDecodingOutput.ProtoReflect.Descriptor instead. +func (*ValueDecodingOutput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{21} +} + +func (x *ValueDecodingOutput) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + +func (x *ValueDecodingOutput) GetParamStr() string { + if x != nil { + return x.ParamStr + } + return "" +} + +func (x *ValueDecodingOutput) GetError() AbiError { + if x != nil { + return x.Error + } + return AbiError_OK +} + +func (x *ValueDecodingOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Encode a function call to Eth ABI binary. +type FunctionEncodingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Function name. + FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"` + // Parameters to be encoded. + Tokens []*Token `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FunctionEncodingInput) Reset() { + *x = FunctionEncodingInput{} + mi := &file_EthereumAbi_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FunctionEncodingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionEncodingInput) ProtoMessage() {} + +func (x *FunctionEncodingInput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FunctionEncodingInput.ProtoReflect.Descriptor instead. +func (*FunctionEncodingInput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{22} +} + +func (x *FunctionEncodingInput) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *FunctionEncodingInput) GetTokens() []*Token { + if x != nil { + return x.Tokens + } + return nil +} + +type FunctionEncodingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The function type signature. + // Example: "baz(int32,uint256)" + FunctionType string `protobuf:"bytes,1,opt,name=function_type,json=functionType,proto3" json:"function_type,omitempty"` + // An encoded smart contract call with a prefixed function signature (4 bytes). + Encoded []byte `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error AbiError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FunctionEncodingOutput) Reset() { + *x = FunctionEncodingOutput{} + mi := &file_EthereumAbi_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FunctionEncodingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionEncodingOutput) ProtoMessage() {} + +func (x *FunctionEncodingOutput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FunctionEncodingOutput.ProtoReflect.Descriptor instead. +func (*FunctionEncodingOutput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{23} +} + +func (x *FunctionEncodingOutput) GetFunctionType() string { + if x != nil { + return x.FunctionType + } + return "" +} + +func (x *FunctionEncodingOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *FunctionEncodingOutput) GetError() AbiError { + if x != nil { + return x.Error + } + return AbiError_OK +} + +func (x *FunctionEncodingOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Return the function type signature, of the form "baz(int32,uint256)". +type FunctionGetTypeInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Function signature. Includes function inputs if they are. + // Examples: + // - `functionName()` + // - `functionName()` + // - `functionName(bool)` + // - `functionName(uint256,bytes32)` + FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"` + // A set of ABI type parameters. + Inputs []*Param `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FunctionGetTypeInput) Reset() { + *x = FunctionGetTypeInput{} + mi := &file_EthereumAbi_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FunctionGetTypeInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionGetTypeInput) ProtoMessage() {} + +func (x *FunctionGetTypeInput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumAbi_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FunctionGetTypeInput.ProtoReflect.Descriptor instead. +func (*FunctionGetTypeInput) Descriptor() ([]byte, []int) { + return file_EthereumAbi_proto_rawDescGZIP(), []int{24} +} + +func (x *FunctionGetTypeInput) GetFunctionName() string { + if x != nil { + return x.FunctionName + } + return "" +} + +func (x *FunctionGetTypeInput) GetInputs() []*Param { + if x != nil { + return x.Inputs + } + return nil +} + +var File_EthereumAbi_proto protoreflect.FileDescriptor + +const file_EthereumAbi_proto_rawDesc = "" + + "\n" + + "\x11EthereumAbi.proto\x12\x14TW.EthereumAbi.Proto\"\n" + + "\n" + + "\bBoolType\"!\n" + + "\vNumberNType\x12\x12\n" + + "\x04bits\x18\x01 \x01(\rR\x04bits\"\f\n" + + "\n" + + "StringType\"\r\n" + + "\vAddressType\"O\n" + + "\tArrayType\x12B\n" + + "\felement_type\x18\x01 \x01(\v2\x1f.TW.EthereumAbi.Proto.ParamTypeR\velementType\"h\n" + + "\x0eFixedArrayType\x12\x12\n" + + "\x04size\x18\x01 \x01(\x04R\x04size\x12B\n" + + "\felement_type\x18\x02 \x01(\v2\x1f.TW.EthereumAbi.Proto.ParamTypeR\velementType\"\x0f\n" + + "\rByteArrayType\"&\n" + + "\x10ByteArrayFixType\x12\x12\n" + + "\x04size\x18\x01 \x01(\x04R\x04size\"@\n" + + "\tTupleType\x123\n" + + "\x06params\x18\x01 \x03(\v2\x1b.TW.EthereumAbi.Proto.ParamR\x06params\"R\n" + + "\x05Param\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x125\n" + + "\x05param\x18\x02 \x01(\v2\x1f.TW.EthereumAbi.Proto.ParamTypeR\x05param\"\xb1\x05\n" + + "\tParamType\x12:\n" + + "\aboolean\x18\x01 \x01(\v2\x1e.TW.EthereumAbi.Proto.BoolTypeH\x00R\aboolean\x12B\n" + + "\n" + + "number_int\x18\x02 \x01(\v2!.TW.EthereumAbi.Proto.NumberNTypeH\x00R\tnumberInt\x12D\n" + + "\vnumber_uint\x18\x03 \x01(\v2!.TW.EthereumAbi.Proto.NumberNTypeH\x00R\n" + + "numberUint\x12E\n" + + "\fstring_param\x18\a \x01(\v2 .TW.EthereumAbi.Proto.StringTypeH\x00R\vstringParam\x12=\n" + + "\aaddress\x18\b \x01(\v2!.TW.EthereumAbi.Proto.AddressTypeH\x00R\aaddress\x12D\n" + + "\n" + + "byte_array\x18\t \x01(\v2#.TW.EthereumAbi.Proto.ByteArrayTypeH\x00R\tbyteArray\x12N\n" + + "\x0ebyte_array_fix\x18\n" + + " \x01(\v2&.TW.EthereumAbi.Proto.ByteArrayFixTypeH\x00R\fbyteArrayFix\x127\n" + + "\x05array\x18\x0e \x01(\v2\x1f.TW.EthereumAbi.Proto.ArrayTypeH\x00R\x05array\x12G\n" + + "\vfixed_array\x18\x0f \x01(\v2$.TW.EthereumAbi.Proto.FixedArrayTypeH\x00R\n" + + "fixedArray\x127\n" + + "\x05tuple\x18\x13 \x01(\v2\x1f.TW.EthereumAbi.Proto.TupleTypeH\x00R\x05tupleB\a\n" + + "\x05param\"8\n" + + "\fNumberNParam\x12\x12\n" + + "\x04bits\x18\x01 \x01(\rR\x04bits\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value\"\x89\x01\n" + + "\n" + + "ArrayParam\x12B\n" + + "\felement_type\x18\x01 \x01(\v2\x1f.TW.EthereumAbi.Proto.ParamTypeR\velementType\x127\n" + + "\belements\x18\x02 \x03(\v2\x1b.TW.EthereumAbi.Proto.TokenR\belements\"A\n" + + "\n" + + "TupleParam\x123\n" + + "\x06params\x18\x01 \x03(\v2\x1b.TW.EthereumAbi.Proto.TokenR\x06params\"\x8f\x04\n" + + "\x05Token\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" + + "\aboolean\x18\x02 \x01(\bH\x00R\aboolean\x12C\n" + + "\n" + + "number_int\x18\x03 \x01(\v2\".TW.EthereumAbi.Proto.NumberNParamH\x00R\tnumberInt\x12E\n" + + "\vnumber_uint\x18\x04 \x01(\v2\".TW.EthereumAbi.Proto.NumberNParamH\x00R\n" + + "numberUint\x12#\n" + + "\fstring_value\x18\a \x01(\tH\x00R\vstringValue\x12\x1a\n" + + "\aaddress\x18\b \x01(\tH\x00R\aaddress\x12\x1f\n" + + "\n" + + "byte_array\x18\t \x01(\fH\x00R\tbyteArray\x12&\n" + + "\x0ebyte_array_fix\x18\n" + + " \x01(\fH\x00R\fbyteArrayFix\x128\n" + + "\x05array\x18\x0e \x01(\v2 .TW.EthereumAbi.Proto.ArrayParamH\x00R\x05array\x12C\n" + + "\vfixed_array\x18\x0f \x01(\v2 .TW.EthereumAbi.Proto.ArrayParamH\x00R\n" + + "fixedArray\x128\n" + + "\x05tuple\x18\x13 \x01(\v2 .TW.EthereumAbi.Proto.TupleParamH\x00R\x05tupleB\a\n" + + "\x05token\"l\n" + + "\x19ContractCallDecodingInput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x125\n" + + "\x17smart_contract_abi_json\x18\x02 \x01(\tR\x14smartContractAbiJson\"\xcf\x01\n" + + "\x1aContractCallDecodingOutput\x12!\n" + + "\fdecoded_json\x18\x01 \x01(\tR\vdecodedJson\x123\n" + + "\x06tokens\x18\x02 \x03(\v2\x1b.TW.EthereumAbi.Proto.TokenR\x06tokens\x124\n" + + "\x05error\x18\x03 \x01(\x0e2\x1e.TW.EthereumAbi.Proto.AbiErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"@\n" + + "\tAbiParams\x123\n" + + "\x06params\x18\x01 \x03(\v2\x1b.TW.EthereumAbi.Proto.ParamR\x06params\"\x95\x01\n" + + "\x13ParamsDecodingInput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x1b\n" + + "\babi_json\x18\x02 \x01(\tH\x00R\aabiJson\x12@\n" + + "\n" + + "abi_params\x18\x03 \x01(\v2\x1f.TW.EthereumAbi.Proto.AbiParamsH\x00R\tabiParamsB\x05\n" + + "\x03abi\"\xa6\x01\n" + + "\x14ParamsDecodingOutput\x123\n" + + "\x06tokens\x18\x01 \x03(\v2\x1b.TW.EthereumAbi.Proto.TokenR\x06tokens\x124\n" + + "\x05error\x18\x02 \x01(\x0e2\x1e.TW.EthereumAbi.Proto.AbiErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"M\n" + + "\x12ValueDecodingInput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x1d\n" + + "\n" + + "param_type\x18\x02 \x01(\tR\tparamType\"\xc0\x01\n" + + "\x13ValueDecodingOutput\x121\n" + + "\x05token\x18\x01 \x01(\v2\x1b.TW.EthereumAbi.Proto.TokenR\x05token\x12\x1b\n" + + "\tparam_str\x18\x02 \x01(\tR\bparamStr\x124\n" + + "\x05error\x18\x03 \x01(\x0e2\x1e.TW.EthereumAbi.Proto.AbiErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"q\n" + + "\x15FunctionEncodingInput\x12#\n" + + "\rfunction_name\x18\x01 \x01(\tR\ffunctionName\x123\n" + + "\x06tokens\x18\x02 \x03(\v2\x1b.TW.EthereumAbi.Proto.TokenR\x06tokens\"\xb2\x01\n" + + "\x16FunctionEncodingOutput\x12#\n" + + "\rfunction_type\x18\x01 \x01(\tR\ffunctionType\x12\x18\n" + + "\aencoded\x18\x02 \x01(\fR\aencoded\x124\n" + + "\x05error\x18\x03 \x01(\x0e2\x1e.TW.EthereumAbi.Proto.AbiErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"p\n" + + "\x14FunctionGetTypeInput\x12#\n" + + "\rfunction_name\x18\x01 \x01(\tR\ffunctionName\x123\n" + + "\x06inputs\x18\x02 \x03(\v2\x1b.TW.EthereumAbi.Proto.ParamR\x06inputs*\x9e\x02\n" + + "\bAbiError\x12\x06\n" + + "\x02OK\x10\x00\x12\x12\n" + + "\x0eError_internal\x10\x01\x12\x16\n" + + "\x12Error_abi_mismatch\x10\x02\x12\x15\n" + + "\x11Error_invalid_abi\x10\x03\x12\x1c\n" + + "\x18Error_invalid_param_type\x10\x04\x12\x1f\n" + + "\x1bError_invalid_address_value\x10\x05\x12\x1c\n" + + "\x18Error_invalid_uint_value\x10\x06\x12\x1c\n" + + "\x18Error_missing_param_type\x10\a\x12\x1d\n" + + "\x19Error_missing_param_value\x10\b\x12\x17\n" + + "\x13Error_decoding_data\x10\t\x12\x14\n" + + "\x10Error_empty_type\x10\n" + + "B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_EthereumAbi_proto_rawDescOnce sync.Once + file_EthereumAbi_proto_rawDescData []byte +) + +func file_EthereumAbi_proto_rawDescGZIP() []byte { + file_EthereumAbi_proto_rawDescOnce.Do(func() { + file_EthereumAbi_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_EthereumAbi_proto_rawDesc), len(file_EthereumAbi_proto_rawDesc))) + }) + return file_EthereumAbi_proto_rawDescData +} + +var file_EthereumAbi_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_EthereumAbi_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_EthereumAbi_proto_goTypes = []any{ + (AbiError)(0), // 0: TW.EthereumAbi.Proto.AbiError + (*BoolType)(nil), // 1: TW.EthereumAbi.Proto.BoolType + (*NumberNType)(nil), // 2: TW.EthereumAbi.Proto.NumberNType + (*StringType)(nil), // 3: TW.EthereumAbi.Proto.StringType + (*AddressType)(nil), // 4: TW.EthereumAbi.Proto.AddressType + (*ArrayType)(nil), // 5: TW.EthereumAbi.Proto.ArrayType + (*FixedArrayType)(nil), // 6: TW.EthereumAbi.Proto.FixedArrayType + (*ByteArrayType)(nil), // 7: TW.EthereumAbi.Proto.ByteArrayType + (*ByteArrayFixType)(nil), // 8: TW.EthereumAbi.Proto.ByteArrayFixType + (*TupleType)(nil), // 9: TW.EthereumAbi.Proto.TupleType + (*Param)(nil), // 10: TW.EthereumAbi.Proto.Param + (*ParamType)(nil), // 11: TW.EthereumAbi.Proto.ParamType + (*NumberNParam)(nil), // 12: TW.EthereumAbi.Proto.NumberNParam + (*ArrayParam)(nil), // 13: TW.EthereumAbi.Proto.ArrayParam + (*TupleParam)(nil), // 14: TW.EthereumAbi.Proto.TupleParam + (*Token)(nil), // 15: TW.EthereumAbi.Proto.Token + (*ContractCallDecodingInput)(nil), // 16: TW.EthereumAbi.Proto.ContractCallDecodingInput + (*ContractCallDecodingOutput)(nil), // 17: TW.EthereumAbi.Proto.ContractCallDecodingOutput + (*AbiParams)(nil), // 18: TW.EthereumAbi.Proto.AbiParams + (*ParamsDecodingInput)(nil), // 19: TW.EthereumAbi.Proto.ParamsDecodingInput + (*ParamsDecodingOutput)(nil), // 20: TW.EthereumAbi.Proto.ParamsDecodingOutput + (*ValueDecodingInput)(nil), // 21: TW.EthereumAbi.Proto.ValueDecodingInput + (*ValueDecodingOutput)(nil), // 22: TW.EthereumAbi.Proto.ValueDecodingOutput + (*FunctionEncodingInput)(nil), // 23: TW.EthereumAbi.Proto.FunctionEncodingInput + (*FunctionEncodingOutput)(nil), // 24: TW.EthereumAbi.Proto.FunctionEncodingOutput + (*FunctionGetTypeInput)(nil), // 25: TW.EthereumAbi.Proto.FunctionGetTypeInput +} +var file_EthereumAbi_proto_depIdxs = []int32{ + 11, // 0: TW.EthereumAbi.Proto.ArrayType.element_type:type_name -> TW.EthereumAbi.Proto.ParamType + 11, // 1: TW.EthereumAbi.Proto.FixedArrayType.element_type:type_name -> TW.EthereumAbi.Proto.ParamType + 10, // 2: TW.EthereumAbi.Proto.TupleType.params:type_name -> TW.EthereumAbi.Proto.Param + 11, // 3: TW.EthereumAbi.Proto.Param.param:type_name -> TW.EthereumAbi.Proto.ParamType + 1, // 4: TW.EthereumAbi.Proto.ParamType.boolean:type_name -> TW.EthereumAbi.Proto.BoolType + 2, // 5: TW.EthereumAbi.Proto.ParamType.number_int:type_name -> TW.EthereumAbi.Proto.NumberNType + 2, // 6: TW.EthereumAbi.Proto.ParamType.number_uint:type_name -> TW.EthereumAbi.Proto.NumberNType + 3, // 7: TW.EthereumAbi.Proto.ParamType.string_param:type_name -> TW.EthereumAbi.Proto.StringType + 4, // 8: TW.EthereumAbi.Proto.ParamType.address:type_name -> TW.EthereumAbi.Proto.AddressType + 7, // 9: TW.EthereumAbi.Proto.ParamType.byte_array:type_name -> TW.EthereumAbi.Proto.ByteArrayType + 8, // 10: TW.EthereumAbi.Proto.ParamType.byte_array_fix:type_name -> TW.EthereumAbi.Proto.ByteArrayFixType + 5, // 11: TW.EthereumAbi.Proto.ParamType.array:type_name -> TW.EthereumAbi.Proto.ArrayType + 6, // 12: TW.EthereumAbi.Proto.ParamType.fixed_array:type_name -> TW.EthereumAbi.Proto.FixedArrayType + 9, // 13: TW.EthereumAbi.Proto.ParamType.tuple:type_name -> TW.EthereumAbi.Proto.TupleType + 11, // 14: TW.EthereumAbi.Proto.ArrayParam.element_type:type_name -> TW.EthereumAbi.Proto.ParamType + 15, // 15: TW.EthereumAbi.Proto.ArrayParam.elements:type_name -> TW.EthereumAbi.Proto.Token + 15, // 16: TW.EthereumAbi.Proto.TupleParam.params:type_name -> TW.EthereumAbi.Proto.Token + 12, // 17: TW.EthereumAbi.Proto.Token.number_int:type_name -> TW.EthereumAbi.Proto.NumberNParam + 12, // 18: TW.EthereumAbi.Proto.Token.number_uint:type_name -> TW.EthereumAbi.Proto.NumberNParam + 13, // 19: TW.EthereumAbi.Proto.Token.array:type_name -> TW.EthereumAbi.Proto.ArrayParam + 13, // 20: TW.EthereumAbi.Proto.Token.fixed_array:type_name -> TW.EthereumAbi.Proto.ArrayParam + 14, // 21: TW.EthereumAbi.Proto.Token.tuple:type_name -> TW.EthereumAbi.Proto.TupleParam + 15, // 22: TW.EthereumAbi.Proto.ContractCallDecodingOutput.tokens:type_name -> TW.EthereumAbi.Proto.Token + 0, // 23: TW.EthereumAbi.Proto.ContractCallDecodingOutput.error:type_name -> TW.EthereumAbi.Proto.AbiError + 10, // 24: TW.EthereumAbi.Proto.AbiParams.params:type_name -> TW.EthereumAbi.Proto.Param + 18, // 25: TW.EthereumAbi.Proto.ParamsDecodingInput.abi_params:type_name -> TW.EthereumAbi.Proto.AbiParams + 15, // 26: TW.EthereumAbi.Proto.ParamsDecodingOutput.tokens:type_name -> TW.EthereumAbi.Proto.Token + 0, // 27: TW.EthereumAbi.Proto.ParamsDecodingOutput.error:type_name -> TW.EthereumAbi.Proto.AbiError + 15, // 28: TW.EthereumAbi.Proto.ValueDecodingOutput.token:type_name -> TW.EthereumAbi.Proto.Token + 0, // 29: TW.EthereumAbi.Proto.ValueDecodingOutput.error:type_name -> TW.EthereumAbi.Proto.AbiError + 15, // 30: TW.EthereumAbi.Proto.FunctionEncodingInput.tokens:type_name -> TW.EthereumAbi.Proto.Token + 0, // 31: TW.EthereumAbi.Proto.FunctionEncodingOutput.error:type_name -> TW.EthereumAbi.Proto.AbiError + 10, // 32: TW.EthereumAbi.Proto.FunctionGetTypeInput.inputs:type_name -> TW.EthereumAbi.Proto.Param + 33, // [33:33] is the sub-list for method output_type + 33, // [33:33] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name +} + +func init() { file_EthereumAbi_proto_init() } +func file_EthereumAbi_proto_init() { + if File_EthereumAbi_proto != nil { + return + } + file_EthereumAbi_proto_msgTypes[10].OneofWrappers = []any{ + (*ParamType_Boolean)(nil), + (*ParamType_NumberInt)(nil), + (*ParamType_NumberUint)(nil), + (*ParamType_StringParam)(nil), + (*ParamType_Address)(nil), + (*ParamType_ByteArray)(nil), + (*ParamType_ByteArrayFix)(nil), + (*ParamType_Array)(nil), + (*ParamType_FixedArray)(nil), + (*ParamType_Tuple)(nil), + } + file_EthereumAbi_proto_msgTypes[14].OneofWrappers = []any{ + (*Token_Boolean)(nil), + (*Token_NumberInt)(nil), + (*Token_NumberUint)(nil), + (*Token_StringValue)(nil), + (*Token_Address)(nil), + (*Token_ByteArray)(nil), + (*Token_ByteArrayFix)(nil), + (*Token_Array)(nil), + (*Token_FixedArray)(nil), + (*Token_Tuple)(nil), + } + file_EthereumAbi_proto_msgTypes[18].OneofWrappers = []any{ + (*ParamsDecodingInput_AbiJson)(nil), + (*ParamsDecodingInput_AbiParams)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_EthereumAbi_proto_rawDesc), len(file_EthereumAbi_proto_rawDesc)), + NumEnums: 1, + NumMessages: 25, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_EthereumAbi_proto_goTypes, + DependencyIndexes: file_EthereumAbi_proto_depIdxs, + EnumInfos: file_EthereumAbi_proto_enumTypes, + MessageInfos: file_EthereumAbi_proto_msgTypes, + }.Build() + File_EthereumAbi_proto = out.File + file_EthereumAbi_proto_goTypes = nil + file_EthereumAbi_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/ethereumrlp/EthereumRlp.pb.go b/wrapper/go-wrapper/protos/ethereumrlp/EthereumRlp.pb.go new file mode 100644 index 00000000000..ad93ca5a9be --- /dev/null +++ b/wrapper/go-wrapper/protos/ethereumrlp/EthereumRlp.pb.go @@ -0,0 +1,441 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: EthereumRlp.proto + +package ethereumrlp + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// List of elements. +type RlpList struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*RlpItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RlpList) Reset() { + *x = RlpList{} + mi := &file_EthereumRlp_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RlpList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RlpList) ProtoMessage() {} + +func (x *RlpList) ProtoReflect() protoreflect.Message { + mi := &file_EthereumRlp_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RlpList.ProtoReflect.Descriptor instead. +func (*RlpList) Descriptor() ([]byte, []int) { + return file_EthereumRlp_proto_rawDescGZIP(), []int{0} +} + +func (x *RlpList) GetItems() []*RlpItem { + if x != nil { + return x.Items + } + return nil +} + +// RLP item. +type RlpItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Item: + // + // *RlpItem_StringItem + // *RlpItem_NumberU64 + // *RlpItem_NumberU256 + // *RlpItem_Address + // *RlpItem_Data + // *RlpItem_List + // *RlpItem_RawEncoded + Item isRlpItem_Item `protobuf_oneof:"item"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RlpItem) Reset() { + *x = RlpItem{} + mi := &file_EthereumRlp_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RlpItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RlpItem) ProtoMessage() {} + +func (x *RlpItem) ProtoReflect() protoreflect.Message { + mi := &file_EthereumRlp_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RlpItem.ProtoReflect.Descriptor instead. +func (*RlpItem) Descriptor() ([]byte, []int) { + return file_EthereumRlp_proto_rawDescGZIP(), []int{1} +} + +func (x *RlpItem) GetItem() isRlpItem_Item { + if x != nil { + return x.Item + } + return nil +} + +func (x *RlpItem) GetStringItem() string { + if x != nil { + if x, ok := x.Item.(*RlpItem_StringItem); ok { + return x.StringItem + } + } + return "" +} + +func (x *RlpItem) GetNumberU64() uint64 { + if x != nil { + if x, ok := x.Item.(*RlpItem_NumberU64); ok { + return x.NumberU64 + } + } + return 0 +} + +func (x *RlpItem) GetNumberU256() []byte { + if x != nil { + if x, ok := x.Item.(*RlpItem_NumberU256); ok { + return x.NumberU256 + } + } + return nil +} + +func (x *RlpItem) GetAddress() string { + if x != nil { + if x, ok := x.Item.(*RlpItem_Address); ok { + return x.Address + } + } + return "" +} + +func (x *RlpItem) GetData() []byte { + if x != nil { + if x, ok := x.Item.(*RlpItem_Data); ok { + return x.Data + } + } + return nil +} + +func (x *RlpItem) GetList() *RlpList { + if x != nil { + if x, ok := x.Item.(*RlpItem_List); ok { + return x.List + } + } + return nil +} + +func (x *RlpItem) GetRawEncoded() []byte { + if x != nil { + if x, ok := x.Item.(*RlpItem_RawEncoded); ok { + return x.RawEncoded + } + } + return nil +} + +type isRlpItem_Item interface { + isRlpItem_Item() +} + +type RlpItem_StringItem struct { + // A string to be encoded. + StringItem string `protobuf:"bytes,1,opt,name=string_item,json=stringItem,proto3,oneof"` +} + +type RlpItem_NumberU64 struct { + // A U64 number to be encoded. + NumberU64 uint64 `protobuf:"varint,2,opt,name=number_u64,json=numberU64,proto3,oneof"` +} + +type RlpItem_NumberU256 struct { + // A U256 number to be encoded. + NumberU256 []byte `protobuf:"bytes,3,opt,name=number_u256,json=numberU256,proto3,oneof"` +} + +type RlpItem_Address struct { + // An address to be encoded. + Address string `protobuf:"bytes,4,opt,name=address,proto3,oneof"` +} + +type RlpItem_Data struct { + // A data to be encoded. + Data []byte `protobuf:"bytes,5,opt,name=data,proto3,oneof"` +} + +type RlpItem_List struct { + // A list of items to be encoded. + List *RlpList `protobuf:"bytes,6,opt,name=list,proto3,oneof"` +} + +type RlpItem_RawEncoded struct { + // An RLP encoded item to be appended as it is. + RawEncoded []byte `protobuf:"bytes,7,opt,name=raw_encoded,json=rawEncoded,proto3,oneof"` +} + +func (*RlpItem_StringItem) isRlpItem_Item() {} + +func (*RlpItem_NumberU64) isRlpItem_Item() {} + +func (*RlpItem_NumberU256) isRlpItem_Item() {} + +func (*RlpItem_Address) isRlpItem_Item() {} + +func (*RlpItem_Data) isRlpItem_Item() {} + +func (*RlpItem_List) isRlpItem_Item() {} + +func (*RlpItem_RawEncoded) isRlpItem_Item() {} + +// RLP encoding input. +type EncodingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An item or a list to encode. + Item *RlpItem `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EncodingInput) Reset() { + *x = EncodingInput{} + mi := &file_EthereumRlp_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EncodingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncodingInput) ProtoMessage() {} + +func (x *EncodingInput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumRlp_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncodingInput.ProtoReflect.Descriptor instead. +func (*EncodingInput) Descriptor() ([]byte, []int) { + return file_EthereumRlp_proto_rawDescGZIP(), []int{2} +} + +func (x *EncodingInput) GetItem() *RlpItem { + if x != nil { + return x.Item + } + return nil +} + +// / RLP encoding output. +type EncodingOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An item RLP encoded. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors. + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error code description. + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EncodingOutput) Reset() { + *x = EncodingOutput{} + mi := &file_EthereumRlp_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EncodingOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EncodingOutput) ProtoMessage() {} + +func (x *EncodingOutput) ProtoReflect() protoreflect.Message { + mi := &file_EthereumRlp_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EncodingOutput.ProtoReflect.Descriptor instead. +func (*EncodingOutput) Descriptor() ([]byte, []int) { + return file_EthereumRlp_proto_rawDescGZIP(), []int{3} +} + +func (x *EncodingOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *EncodingOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *EncodingOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_EthereumRlp_proto protoreflect.FileDescriptor + +const file_EthereumRlp_proto_rawDesc = "" + + "\n" + + "\x11EthereumRlp.proto\x12\x14TW.EthereumRlp.Proto\x1a\fCommon.proto\">\n" + + "\aRlpList\x123\n" + + "\x05items\x18\x01 \x03(\v2\x1d.TW.EthereumRlp.Proto.RlpItemR\x05items\"\x82\x02\n" + + "\aRlpItem\x12!\n" + + "\vstring_item\x18\x01 \x01(\tH\x00R\n" + + "stringItem\x12\x1f\n" + + "\n" + + "number_u64\x18\x02 \x01(\x04H\x00R\tnumberU64\x12!\n" + + "\vnumber_u256\x18\x03 \x01(\fH\x00R\n" + + "numberU256\x12\x1a\n" + + "\aaddress\x18\x04 \x01(\tH\x00R\aaddress\x12\x14\n" + + "\x04data\x18\x05 \x01(\fH\x00R\x04data\x123\n" + + "\x04list\x18\x06 \x01(\v2\x1d.TW.EthereumRlp.Proto.RlpListH\x00R\x04list\x12!\n" + + "\vraw_encoded\x18\a \x01(\fH\x00R\n" + + "rawEncodedB\x06\n" + + "\x04item\"B\n" + + "\rEncodingInput\x121\n" + + "\x04item\x18\x01 \x01(\v2\x1d.TW.EthereumRlp.Proto.RlpItemR\x04item\"\x84\x01\n" + + "\x0eEncodingOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_EthereumRlp_proto_rawDescOnce sync.Once + file_EthereumRlp_proto_rawDescData []byte +) + +func file_EthereumRlp_proto_rawDescGZIP() []byte { + file_EthereumRlp_proto_rawDescOnce.Do(func() { + file_EthereumRlp_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_EthereumRlp_proto_rawDesc), len(file_EthereumRlp_proto_rawDesc))) + }) + return file_EthereumRlp_proto_rawDescData +} + +var file_EthereumRlp_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_EthereumRlp_proto_goTypes = []any{ + (*RlpList)(nil), // 0: TW.EthereumRlp.Proto.RlpList + (*RlpItem)(nil), // 1: TW.EthereumRlp.Proto.RlpItem + (*EncodingInput)(nil), // 2: TW.EthereumRlp.Proto.EncodingInput + (*EncodingOutput)(nil), // 3: TW.EthereumRlp.Proto.EncodingOutput + (common.SigningError)(0), // 4: TW.Common.Proto.SigningError +} +var file_EthereumRlp_proto_depIdxs = []int32{ + 1, // 0: TW.EthereumRlp.Proto.RlpList.items:type_name -> TW.EthereumRlp.Proto.RlpItem + 0, // 1: TW.EthereumRlp.Proto.RlpItem.list:type_name -> TW.EthereumRlp.Proto.RlpList + 1, // 2: TW.EthereumRlp.Proto.EncodingInput.item:type_name -> TW.EthereumRlp.Proto.RlpItem + 4, // 3: TW.EthereumRlp.Proto.EncodingOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_EthereumRlp_proto_init() } +func file_EthereumRlp_proto_init() { + if File_EthereumRlp_proto != nil { + return + } + file_EthereumRlp_proto_msgTypes[1].OneofWrappers = []any{ + (*RlpItem_StringItem)(nil), + (*RlpItem_NumberU64)(nil), + (*RlpItem_NumberU256)(nil), + (*RlpItem_Address)(nil), + (*RlpItem_Data)(nil), + (*RlpItem_List)(nil), + (*RlpItem_RawEncoded)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_EthereumRlp_proto_rawDesc), len(file_EthereumRlp_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_EthereumRlp_proto_goTypes, + DependencyIndexes: file_EthereumRlp_proto_depIdxs, + MessageInfos: file_EthereumRlp_proto_msgTypes, + }.Build() + File_EthereumRlp_proto = out.File + file_EthereumRlp_proto_goTypes = nil + file_EthereumRlp_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/everscale/Everscale.pb.go b/wrapper/go-wrapper/protos/everscale/Everscale.pb.go new file mode 100644 index 00000000000..b4b348a2285 --- /dev/null +++ b/wrapper/go-wrapper/protos/everscale/Everscale.pb.go @@ -0,0 +1,400 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Everscale.proto + +package everscale + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Message option +type MessageBehavior int32 + +const ( + // Sends a message with the specified amount. The sender pays a fee from the account balance + MessageBehavior_SimpleTransfer MessageBehavior = 0 + // Sends the entire account balance along with the message + MessageBehavior_SendAllBalance MessageBehavior = 1 +) + +// Enum value maps for MessageBehavior. +var ( + MessageBehavior_name = map[int32]string{ + 0: "SimpleTransfer", + 1: "SendAllBalance", + } + MessageBehavior_value = map[string]int32{ + "SimpleTransfer": 0, + "SendAllBalance": 1, + } +) + +func (x MessageBehavior) Enum() *MessageBehavior { + p := new(MessageBehavior) + *p = x + return p +} + +func (x MessageBehavior) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageBehavior) Descriptor() protoreflect.EnumDescriptor { + return file_Everscale_proto_enumTypes[0].Descriptor() +} + +func (MessageBehavior) Type() protoreflect.EnumType { + return &file_Everscale_proto_enumTypes[0] +} + +func (x MessageBehavior) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageBehavior.Descriptor instead. +func (MessageBehavior) EnumDescriptor() ([]byte, []int) { + return file_Everscale_proto_rawDescGZIP(), []int{0} +} + +// Transfer message +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If set to true, then the message will be returned if there is an error on the recipient's side. + Bounce bool `protobuf:"varint,1,opt,name=bounce,proto3" json:"bounce,omitempty"` + // Affect the attached amount and fees + Behavior MessageBehavior `protobuf:"varint,2,opt,name=behavior,proto3,enum=TW.Everscale.Proto.MessageBehavior" json:"behavior,omitempty"` + // Amount to send in nano EVER + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // Expiration UNIX timestamp + ExpiredAt uint32 `protobuf:"varint,4,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + // Recipient address + To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` + // Account state if there is any + // + // Types that are valid to be assigned to AccountStateOneof: + // + // *Transfer_EncodedContractData + AccountStateOneof isTransfer_AccountStateOneof `protobuf_oneof:"account_state_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_Everscale_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Everscale_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_Everscale_proto_rawDescGZIP(), []int{0} +} + +func (x *Transfer) GetBounce() bool { + if x != nil { + return x.Bounce + } + return false +} + +func (x *Transfer) GetBehavior() MessageBehavior { + if x != nil { + return x.Behavior + } + return MessageBehavior_SimpleTransfer +} + +func (x *Transfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Transfer) GetExpiredAt() uint32 { + if x != nil { + return x.ExpiredAt + } + return 0 +} + +func (x *Transfer) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Transfer) GetAccountStateOneof() isTransfer_AccountStateOneof { + if x != nil { + return x.AccountStateOneof + } + return nil +} + +func (x *Transfer) GetEncodedContractData() string { + if x != nil { + if x, ok := x.AccountStateOneof.(*Transfer_EncodedContractData); ok { + return x.EncodedContractData + } + } + return "" +} + +type isTransfer_AccountStateOneof interface { + isTransfer_AccountStateOneof() +} + +type Transfer_EncodedContractData struct { + // Just contract data + EncodedContractData string `protobuf:"bytes,6,opt,name=encoded_contract_data,json=encodedContractData,proto3,oneof"` +} + +func (*Transfer_EncodedContractData) isTransfer_AccountStateOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payload transfer + // + // Types that are valid to be assigned to ActionOneof: + // + // *SigningInput_Transfer + ActionOneof isSigningInput_ActionOneof `protobuf_oneof:"action_oneof"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Everscale_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Everscale_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Everscale_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningInput) GetActionOneof() isSigningInput_ActionOneof { + if x != nil { + return x.ActionOneof + } + return nil +} + +func (x *SigningInput) GetTransfer() *Transfer { + if x != nil { + if x, ok := x.ActionOneof.(*SigningInput_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +type isSigningInput_ActionOneof interface { + isSigningInput_ActionOneof() +} + +type SigningInput_Transfer struct { + Transfer *Transfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"` +} + +func (*SigningInput_Transfer) isSigningInput_ActionOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Everscale_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Everscale_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Everscale_proto_rawDescGZIP(), []int{2} +} + +func (x *SigningOutput) GetEncoded() string { + if x != nil { + return x.Encoded + } + return "" +} + +var File_Everscale_proto protoreflect.FileDescriptor + +const file_Everscale_proto_rawDesc = "" + + "\n" + + "\x0fEverscale.proto\x12\x12TW.Everscale.Proto\"\xf7\x01\n" + + "\bTransfer\x12\x16\n" + + "\x06bounce\x18\x01 \x01(\bR\x06bounce\x12?\n" + + "\bbehavior\x18\x02 \x01(\x0e2#.TW.Everscale.Proto.MessageBehaviorR\bbehavior\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\x12\x1d\n" + + "\n" + + "expired_at\x18\x04 \x01(\rR\texpiredAt\x12\x0e\n" + + "\x02to\x18\x05 \x01(\tR\x02to\x124\n" + + "\x15encoded_contract_data\x18\x06 \x01(\tH\x00R\x13encodedContractDataB\x15\n" + + "\x13account_state_oneof\"{\n" + + "\fSigningInput\x12:\n" + + "\btransfer\x18\x01 \x01(\v2\x1c.TW.Everscale.Proto.TransferH\x00R\btransfer\x12\x1f\n" + + "\vprivate_key\x18\x02 \x01(\fR\n" + + "privateKeyB\x0e\n" + + "\faction_oneof\")\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\tR\aencoded*9\n" + + "\x0fMessageBehavior\x12\x12\n" + + "\x0eSimpleTransfer\x10\x00\x12\x12\n" + + "\x0eSendAllBalance\x10\x01B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Everscale_proto_rawDescOnce sync.Once + file_Everscale_proto_rawDescData []byte +) + +func file_Everscale_proto_rawDescGZIP() []byte { + file_Everscale_proto_rawDescOnce.Do(func() { + file_Everscale_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Everscale_proto_rawDesc), len(file_Everscale_proto_rawDesc))) + }) + return file_Everscale_proto_rawDescData +} + +var file_Everscale_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Everscale_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_Everscale_proto_goTypes = []any{ + (MessageBehavior)(0), // 0: TW.Everscale.Proto.MessageBehavior + (*Transfer)(nil), // 1: TW.Everscale.Proto.Transfer + (*SigningInput)(nil), // 2: TW.Everscale.Proto.SigningInput + (*SigningOutput)(nil), // 3: TW.Everscale.Proto.SigningOutput +} +var file_Everscale_proto_depIdxs = []int32{ + 0, // 0: TW.Everscale.Proto.Transfer.behavior:type_name -> TW.Everscale.Proto.MessageBehavior + 1, // 1: TW.Everscale.Proto.SigningInput.transfer:type_name -> TW.Everscale.Proto.Transfer + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_Everscale_proto_init() } +func file_Everscale_proto_init() { + if File_Everscale_proto != nil { + return + } + file_Everscale_proto_msgTypes[0].OneofWrappers = []any{ + (*Transfer_EncodedContractData)(nil), + } + file_Everscale_proto_msgTypes[1].OneofWrappers = []any{ + (*SigningInput_Transfer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Everscale_proto_rawDesc), len(file_Everscale_proto_rawDesc)), + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Everscale_proto_goTypes, + DependencyIndexes: file_Everscale_proto_depIdxs, + EnumInfos: file_Everscale_proto_enumTypes, + MessageInfos: file_Everscale_proto_msgTypes, + }.Build() + File_Everscale_proto = out.File + file_Everscale_proto_goTypes = nil + file_Everscale_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/filecoin/Filecoin.pb.go b/wrapper/go-wrapper/protos/filecoin/Filecoin.pb.go new file mode 100644 index 00000000000..0354e7e106c --- /dev/null +++ b/wrapper/go-wrapper/protos/filecoin/Filecoin.pb.go @@ -0,0 +1,350 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Filecoin.proto + +package filecoin + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines the type of `from` address derivation. +type DerivationType int32 + +const ( + // Defines a Secp256k1 (`f1`) derivation for the sender address. + // Default derivation type. + DerivationType_SECP256K1 DerivationType = 0 + // Defines a Delegated (`f4`) derivation for the sender address. + DerivationType_DELEGATED DerivationType = 1 +) + +// Enum value maps for DerivationType. +var ( + DerivationType_name = map[int32]string{ + 0: "SECP256K1", + 1: "DELEGATED", + } + DerivationType_value = map[string]int32{ + "SECP256K1": 0, + "DELEGATED": 1, + } +) + +func (x DerivationType) Enum() *DerivationType { + p := new(DerivationType) + *p = x + return p +} + +func (x DerivationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DerivationType) Descriptor() protoreflect.EnumDescriptor { + return file_Filecoin_proto_enumTypes[0].Descriptor() +} + +func (DerivationType) Type() protoreflect.EnumType { + return &file_Filecoin_proto_enumTypes[0] +} + +func (x DerivationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DerivationType.Descriptor instead. +func (DerivationType) EnumDescriptor() ([]byte, []int) { + return file_Filecoin_proto_rawDescGZIP(), []int{0} +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key of the sender account, used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Recipient's address. + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // Transaction nonce. + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Transfer value (uint256, serialized big endian) + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + // Gas limit. + GasLimit int64 `protobuf:"varint,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Gas fee cap (uint256, serialized big endian) + GasFeeCap []byte `protobuf:"bytes,6,opt,name=gas_fee_cap,json=gasFeeCap,proto3" json:"gas_fee_cap,omitempty"` + // Gas premium (uint256, serialized big endian) + GasPremium []byte `protobuf:"bytes,7,opt,name=gas_premium,json=gasPremium,proto3" json:"gas_premium,omitempty"` + // Message params. + Params []byte `protobuf:"bytes,8,opt,name=params,proto3" json:"params,omitempty"` + // Sender address derivation type. + Derivation DerivationType `protobuf:"varint,9,opt,name=derivation,proto3,enum=TW.Filecoin.Proto.DerivationType" json:"derivation,omitempty"` + // Public key secp256k1 extended + PublicKey []byte `protobuf:"bytes,10,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Filecoin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Filecoin_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Filecoin_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *SigningInput) GetGasLimit() int64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *SigningInput) GetGasFeeCap() []byte { + if x != nil { + return x.GasFeeCap + } + return nil +} + +func (x *SigningInput) GetGasPremium() []byte { + if x != nil { + return x.GasPremium + } + return nil +} + +func (x *SigningInput) GetParams() []byte { + if x != nil { + return x.Params + } + return nil +} + +func (x *SigningInput) GetDerivation() DerivationType { + if x != nil { + return x.Derivation + } + return DerivationType_SECP256K1 +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Resulting transaction, in JSON. + Json string `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Filecoin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Filecoin_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Filecoin_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Filecoin_proto protoreflect.FileDescriptor + +const file_Filecoin_proto_rawDesc = "" + + "\n" + + "\x0eFilecoin.proto\x12\x11TW.Filecoin.Proto\x1a\fCommon.proto\"\xc3\x02\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x0e\n" + + "\x02to\x18\x02 \x01(\tR\x02to\x12\x14\n" + + "\x05nonce\x18\x03 \x01(\x04R\x05nonce\x12\x14\n" + + "\x05value\x18\x04 \x01(\fR\x05value\x12\x1b\n" + + "\tgas_limit\x18\x05 \x01(\x03R\bgasLimit\x12\x1e\n" + + "\vgas_fee_cap\x18\x06 \x01(\fR\tgasFeeCap\x12\x1f\n" + + "\vgas_premium\x18\a \x01(\fR\n" + + "gasPremium\x12\x16\n" + + "\x06params\x18\b \x01(\fR\x06params\x12A\n" + + "\n" + + "derivation\x18\t \x01(\x0e2!.TW.Filecoin.Proto.DerivationTypeR\n" + + "derivation\x12\x1d\n" + + "\n" + + "public_key\x18\n" + + " \x01(\fR\tpublicKey\"}\n" + + "\rSigningOutput\x12\x12\n" + + "\x04json\x18\x01 \x01(\tR\x04json\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage*.\n" + + "\x0eDerivationType\x12\r\n" + + "\tSECP256K1\x10\x00\x12\r\n" + + "\tDELEGATED\x10\x01B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Filecoin_proto_rawDescOnce sync.Once + file_Filecoin_proto_rawDescData []byte +) + +func file_Filecoin_proto_rawDescGZIP() []byte { + file_Filecoin_proto_rawDescOnce.Do(func() { + file_Filecoin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Filecoin_proto_rawDesc), len(file_Filecoin_proto_rawDesc))) + }) + return file_Filecoin_proto_rawDescData +} + +var file_Filecoin_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Filecoin_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Filecoin_proto_goTypes = []any{ + (DerivationType)(0), // 0: TW.Filecoin.Proto.DerivationType + (*SigningInput)(nil), // 1: TW.Filecoin.Proto.SigningInput + (*SigningOutput)(nil), // 2: TW.Filecoin.Proto.SigningOutput + (common.SigningError)(0), // 3: TW.Common.Proto.SigningError +} +var file_Filecoin_proto_depIdxs = []int32{ + 0, // 0: TW.Filecoin.Proto.SigningInput.derivation:type_name -> TW.Filecoin.Proto.DerivationType + 3, // 1: TW.Filecoin.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_Filecoin_proto_init() } +func file_Filecoin_proto_init() { + if File_Filecoin_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Filecoin_proto_rawDesc), len(file_Filecoin_proto_rawDesc)), + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Filecoin_proto_goTypes, + DependencyIndexes: file_Filecoin_proto_depIdxs, + EnumInfos: file_Filecoin_proto_enumTypes, + MessageInfos: file_Filecoin_proto_msgTypes, + }.Build() + File_Filecoin_proto = out.File + file_Filecoin_proto_goTypes = nil + file_Filecoin_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/fio/FIO.pb.go b/wrapper/go-wrapper/protos/fio/FIO.pb.go new file mode 100644 index 00000000000..f213af3c221 --- /dev/null +++ b/wrapper/go-wrapper/protos/fio/FIO.pb.go @@ -0,0 +1,1279 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: FIO.proto + +package fio + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A public blockchain address, such as {"BTC", "bc1qvy4074rggkdr2pzw5vpnn62eg0smzlxwp70d7v"} +type PublicAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Coin symbol for the address (a.k.a. tokenCode) + CoinSymbol string `protobuf:"bytes,1,opt,name=coin_symbol,json=coinSymbol,proto3" json:"coin_symbol,omitempty"` + // The address + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicAddress) Reset() { + *x = PublicAddress{} + mi := &file_FIO_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAddress) ProtoMessage() {} + +func (x *PublicAddress) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicAddress.ProtoReflect.Descriptor instead. +func (*PublicAddress) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicAddress) GetCoinSymbol() string { + if x != nil { + return x.CoinSymbol + } + return "" +} + +func (x *PublicAddress) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Payload content for New Funds requests +type NewFundsContent struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Public addressed of the payee, on the mentioned blockchain. + PayeePublicAddress string `protobuf:"bytes,1,opt,name=payee_public_address,json=payeePublicAddress,proto3" json:"payee_public_address,omitempty"` + // Amount requested (as string) + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Coin symbol of the amount requested (a.k.a. tokenCode) + CoinSymbol string `protobuf:"bytes,3,opt,name=coin_symbol,json=coinSymbol,proto3" json:"coin_symbol,omitempty"` + // Memo free text. Optional, may be empty. + Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` + // Hash. Optional, may be empty. + Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` + // Attached offline URL. Optional, may be empty. + OfflineUrl string `protobuf:"bytes,6,opt,name=offline_url,json=offlineUrl,proto3" json:"offline_url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NewFundsContent) Reset() { + *x = NewFundsContent{} + mi := &file_FIO_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NewFundsContent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NewFundsContent) ProtoMessage() {} + +func (x *NewFundsContent) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NewFundsContent.ProtoReflect.Descriptor instead. +func (*NewFundsContent) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{1} +} + +func (x *NewFundsContent) GetPayeePublicAddress() string { + if x != nil { + return x.PayeePublicAddress + } + return "" +} + +func (x *NewFundsContent) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *NewFundsContent) GetCoinSymbol() string { + if x != nil { + return x.CoinSymbol + } + return "" +} + +func (x *NewFundsContent) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *NewFundsContent) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *NewFundsContent) GetOfflineUrl() string { + if x != nil { + return x.OfflineUrl + } + return "" +} + +// Different Actions +type Action struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Payload message + // + // Types that are valid to be assigned to MessageOneof: + // + // *Action_RegisterFioAddressMessage + // *Action_AddPubAddressMessage + // *Action_TransferMessage + // *Action_RenewFioAddressMessage + // *Action_NewFundsRequestMessage + // *Action_RemovePubAddressMessage + // *Action_RemoveAllPubAddressesMessage + // *Action_AddBundledTransactionsMessage + MessageOneof isAction_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action) Reset() { + *x = Action{} + mi := &file_FIO_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action) ProtoMessage() {} + +func (x *Action) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action.ProtoReflect.Descriptor instead. +func (*Action) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2} +} + +func (x *Action) GetMessageOneof() isAction_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *Action) GetRegisterFioAddressMessage() *Action_RegisterFioAddress { + if x != nil { + if x, ok := x.MessageOneof.(*Action_RegisterFioAddressMessage); ok { + return x.RegisterFioAddressMessage + } + } + return nil +} + +func (x *Action) GetAddPubAddressMessage() *Action_AddPubAddress { + if x != nil { + if x, ok := x.MessageOneof.(*Action_AddPubAddressMessage); ok { + return x.AddPubAddressMessage + } + } + return nil +} + +func (x *Action) GetTransferMessage() *Action_Transfer { + if x != nil { + if x, ok := x.MessageOneof.(*Action_TransferMessage); ok { + return x.TransferMessage + } + } + return nil +} + +func (x *Action) GetRenewFioAddressMessage() *Action_RenewFioAddress { + if x != nil { + if x, ok := x.MessageOneof.(*Action_RenewFioAddressMessage); ok { + return x.RenewFioAddressMessage + } + } + return nil +} + +func (x *Action) GetNewFundsRequestMessage() *Action_NewFundsRequest { + if x != nil { + if x, ok := x.MessageOneof.(*Action_NewFundsRequestMessage); ok { + return x.NewFundsRequestMessage + } + } + return nil +} + +func (x *Action) GetRemovePubAddressMessage() *Action_RemovePubAddress { + if x != nil { + if x, ok := x.MessageOneof.(*Action_RemovePubAddressMessage); ok { + return x.RemovePubAddressMessage + } + } + return nil +} + +func (x *Action) GetRemoveAllPubAddressesMessage() *Action_RemoveAllPubAddress { + if x != nil { + if x, ok := x.MessageOneof.(*Action_RemoveAllPubAddressesMessage); ok { + return x.RemoveAllPubAddressesMessage + } + } + return nil +} + +func (x *Action) GetAddBundledTransactionsMessage() *Action_AddBundledTransactions { + if x != nil { + if x, ok := x.MessageOneof.(*Action_AddBundledTransactionsMessage); ok { + return x.AddBundledTransactionsMessage + } + } + return nil +} + +type isAction_MessageOneof interface { + isAction_MessageOneof() +} + +type Action_RegisterFioAddressMessage struct { + RegisterFioAddressMessage *Action_RegisterFioAddress `protobuf:"bytes,1,opt,name=register_fio_address_message,json=registerFioAddressMessage,proto3,oneof"` +} + +type Action_AddPubAddressMessage struct { + AddPubAddressMessage *Action_AddPubAddress `protobuf:"bytes,2,opt,name=add_pub_address_message,json=addPubAddressMessage,proto3,oneof"` +} + +type Action_TransferMessage struct { + TransferMessage *Action_Transfer `protobuf:"bytes,3,opt,name=transfer_message,json=transferMessage,proto3,oneof"` +} + +type Action_RenewFioAddressMessage struct { + RenewFioAddressMessage *Action_RenewFioAddress `protobuf:"bytes,4,opt,name=renew_fio_address_message,json=renewFioAddressMessage,proto3,oneof"` +} + +type Action_NewFundsRequestMessage struct { + NewFundsRequestMessage *Action_NewFundsRequest `protobuf:"bytes,5,opt,name=new_funds_request_message,json=newFundsRequestMessage,proto3,oneof"` +} + +type Action_RemovePubAddressMessage struct { + RemovePubAddressMessage *Action_RemovePubAddress `protobuf:"bytes,6,opt,name=remove_pub_address_message,json=removePubAddressMessage,proto3,oneof"` +} + +type Action_RemoveAllPubAddressesMessage struct { + RemoveAllPubAddressesMessage *Action_RemoveAllPubAddress `protobuf:"bytes,7,opt,name=remove_all_pub_addresses_message,json=removeAllPubAddressesMessage,proto3,oneof"` +} + +type Action_AddBundledTransactionsMessage struct { + AddBundledTransactionsMessage *Action_AddBundledTransactions `protobuf:"bytes,8,opt,name=add_bundled_transactions_message,json=addBundledTransactionsMessage,proto3,oneof"` +} + +func (*Action_RegisterFioAddressMessage) isAction_MessageOneof() {} + +func (*Action_AddPubAddressMessage) isAction_MessageOneof() {} + +func (*Action_TransferMessage) isAction_MessageOneof() {} + +func (*Action_RenewFioAddressMessage) isAction_MessageOneof() {} + +func (*Action_NewFundsRequestMessage) isAction_MessageOneof() {} + +func (*Action_RemovePubAddressMessage) isAction_MessageOneof() {} + +func (*Action_RemoveAllPubAddressesMessage) isAction_MessageOneof() {} + +func (*Action_AddBundledTransactionsMessage) isAction_MessageOneof() {} + +// Represents current parameters of the FIO blockchain +type ChainParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Constant chainId (32 bytes), obtained from get_info API + ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // The last block number, obtained from get_info API + HeadBlockNumber uint64 `protobuf:"varint,2,opt,name=head_block_number,json=headBlockNumber,proto3" json:"head_block_number,omitempty"` + // Block prefix of last block, obtained from get_block API + RefBlockPrefix uint64 `protobuf:"varint,3,opt,name=ref_block_prefix,json=refBlockPrefix,proto3" json:"ref_block_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChainParams) Reset() { + *x = ChainParams{} + mi := &file_FIO_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChainParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainParams) ProtoMessage() {} + +func (x *ChainParams) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChainParams.ProtoReflect.Descriptor instead. +func (*ChainParams) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{3} +} + +func (x *ChainParams) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *ChainParams) GetHeadBlockNumber() uint64 { + if x != nil { + return x.HeadBlockNumber + } + return 0 +} + +func (x *ChainParams) GetRefBlockPrefix() uint64 { + if x != nil { + return x.RefBlockPrefix + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Expiry for this message, in unix time. Can be 0, then it is taken from current time with default expiry + Expiry uint32 `protobuf:"varint,1,opt,name=expiry,proto3" json:"expiry,omitempty"` + // Current parameters of the FIO blockchain + ChainParams *ChainParams `protobuf:"bytes,2,opt,name=chain_params,json=chainParams,proto3" json:"chain_params,omitempty"` + // The secret private key matching the address, used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The FIO name of the originating wallet (project-wide constant) + Tpid string `protobuf:"bytes,4,opt,name=tpid,proto3" json:"tpid,omitempty"` + // Context-specific action data + Action *Action `protobuf:"bytes,5,opt,name=action,proto3" json:"action,omitempty"` + // FIO address of the owner. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" + OwnerPublicKey string `protobuf:"bytes,6,opt,name=owner_public_key,json=ownerPublicKey,proto3" json:"owner_public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_FIO_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningInput) GetExpiry() uint32 { + if x != nil { + return x.Expiry + } + return 0 +} + +func (x *SigningInput) GetChainParams() *ChainParams { + if x != nil { + return x.ChainParams + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTpid() string { + if x != nil { + return x.Tpid + } + return "" +} + +func (x *SigningInput) GetAction() *Action { + if x != nil { + return x.Action + } + return nil +} + +func (x *SigningInput) GetOwnerPublicKey() string { + if x != nil { + return x.OwnerPublicKey + } + return "" +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed transaction in JSON + Json string `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Performed action name, ex. "addaddress", "remaddress", "trnsfiopubky" etc. + ActionName string `protobuf:"bytes,4,opt,name=action_name,json=actionName,proto3" json:"action_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_FIO_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetActionName() string { + if x != nil { + return x.ActionName + } + return "" +} + +// Action for registering a FIO name; register_fio_address +type Action_RegisterFioAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name to be registered. Ex.: "alice@trust" + FioAddress string `protobuf:"bytes,1,opt,name=fio_address,json=fioAddress,proto3" json:"fio_address,omitempty"` + // FIO address of the owner. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" + OwnerFioPublicKey string `protobuf:"bytes,2,opt,name=owner_fio_public_key,json=ownerFioPublicKey,proto3" json:"owner_fio_public_key,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_RegisterFioAddress) Reset() { + *x = Action_RegisterFioAddress{} + mi := &file_FIO_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_RegisterFioAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_RegisterFioAddress) ProtoMessage() {} + +func (x *Action_RegisterFioAddress) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_RegisterFioAddress.ProtoReflect.Descriptor instead. +func (*Action_RegisterFioAddress) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *Action_RegisterFioAddress) GetFioAddress() string { + if x != nil { + return x.FioAddress + } + return "" +} + +func (x *Action_RegisterFioAddress) GetOwnerFioPublicKey() string { + if x != nil { + return x.OwnerFioPublicKey + } + return "" +} + +func (x *Action_RegisterFioAddress) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Acion for adding public chain addresses to a FIO name; add_pub_address +// Note: actor is not needed, computed from private key +type Action_AddPubAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name already registered to the owner. Ex.: "alice@trust" + FioAddress string `protobuf:"bytes,1,opt,name=fio_address,json=fioAddress,proto3" json:"fio_address,omitempty"` + // List of public addresses to be registered, ex. {{"BTC", "bc1qv...7v"},{"BNB", "bnb1ts3...9s"}} + PublicAddresses []*PublicAddress `protobuf:"bytes,2,rep,name=public_addresses,json=publicAddresses,proto3" json:"public_addresses,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_AddPubAddress) Reset() { + *x = Action_AddPubAddress{} + mi := &file_FIO_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_AddPubAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_AddPubAddress) ProtoMessage() {} + +func (x *Action_AddPubAddress) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_AddPubAddress.ProtoReflect.Descriptor instead. +func (*Action_AddPubAddress) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *Action_AddPubAddress) GetFioAddress() string { + if x != nil { + return x.FioAddress + } + return "" +} + +func (x *Action_AddPubAddress) GetPublicAddresses() []*PublicAddress { + if x != nil { + return x.PublicAddresses + } + return nil +} + +func (x *Action_AddPubAddress) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Action for removing public chain addresses from a FIO name; remove_pub_address +// Note: actor is not needed, computed from private key +type Action_RemovePubAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name already registered to the owner. Ex.: "alice@trust" + FioAddress string `protobuf:"bytes,1,opt,name=fio_address,json=fioAddress,proto3" json:"fio_address,omitempty"` + // List of public addresses to be unregistered, ex. {{"BTC", "bc1qv...7v"},{"BNB", "bnb1ts3...9s"}} + PublicAddresses []*PublicAddress `protobuf:"bytes,2,rep,name=public_addresses,json=publicAddresses,proto3" json:"public_addresses,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_RemovePubAddress) Reset() { + *x = Action_RemovePubAddress{} + mi := &file_FIO_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_RemovePubAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_RemovePubAddress) ProtoMessage() {} + +func (x *Action_RemovePubAddress) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_RemovePubAddress.ProtoReflect.Descriptor instead. +func (*Action_RemovePubAddress) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 2} +} + +func (x *Action_RemovePubAddress) GetFioAddress() string { + if x != nil { + return x.FioAddress + } + return "" +} + +func (x *Action_RemovePubAddress) GetPublicAddresses() []*PublicAddress { + if x != nil { + return x.PublicAddresses + } + return nil +} + +func (x *Action_RemovePubAddress) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Action for removing public chain addresses from a FIO name; remove_pub_address +// Note: actor is not needed, computed from private key +type Action_RemoveAllPubAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name already registered to the owner. Ex.: "alice@trust" + FioAddress string `protobuf:"bytes,1,opt,name=fio_address,json=fioAddress,proto3" json:"fio_address,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_RemoveAllPubAddress) Reset() { + *x = Action_RemoveAllPubAddress{} + mi := &file_FIO_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_RemoveAllPubAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_RemoveAllPubAddress) ProtoMessage() {} + +func (x *Action_RemoveAllPubAddress) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_RemoveAllPubAddress.ProtoReflect.Descriptor instead. +func (*Action_RemoveAllPubAddress) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 3} +} + +func (x *Action_RemoveAllPubAddress) GetFioAddress() string { + if x != nil { + return x.FioAddress + } + return "" +} + +func (x *Action_RemoveAllPubAddress) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Action for transferring FIO coins; transfer_tokens_pub_key +// Note: actor is not needed, computed from private key +type Action_Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // FIO address of the payee. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" + PayeePublicKey string `protobuf:"bytes,1,opt,name=payee_public_key,json=payeePublicKey,proto3" json:"payee_public_key,omitempty"` + // Amount of FIO coins to be transferred. + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_Transfer) Reset() { + *x = Action_Transfer{} + mi := &file_FIO_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_Transfer) ProtoMessage() {} + +func (x *Action_Transfer) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_Transfer.ProtoReflect.Descriptor instead. +func (*Action_Transfer) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 4} +} + +func (x *Action_Transfer) GetPayeePublicKey() string { + if x != nil { + return x.PayeePublicKey + } + return "" +} + +func (x *Action_Transfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Action_Transfer) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Action for renewing a FIO name; renew_fio_address +// Note: actor is not needed, computed from private key +type Action_RenewFioAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name to be renewed. Ex.: "alice@trust" + FioAddress string `protobuf:"bytes,1,opt,name=fio_address,json=fioAddress,proto3" json:"fio_address,omitempty"` + // FIO address of the owner. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" + OwnerFioPublicKey string `protobuf:"bytes,2,opt,name=owner_fio_public_key,json=ownerFioPublicKey,proto3" json:"owner_fio_public_key,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_RenewFioAddress) Reset() { + *x = Action_RenewFioAddress{} + mi := &file_FIO_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_RenewFioAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_RenewFioAddress) ProtoMessage() {} + +func (x *Action_RenewFioAddress) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_RenewFioAddress.ProtoReflect.Descriptor instead. +func (*Action_RenewFioAddress) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 5} +} + +func (x *Action_RenewFioAddress) GetFioAddress() string { + if x != nil { + return x.FioAddress + } + return "" +} + +func (x *Action_RenewFioAddress) GetOwnerFioPublicKey() string { + if x != nil { + return x.OwnerFioPublicKey + } + return "" +} + +func (x *Action_RenewFioAddress) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Action for creating a new payment request; new_funds_request +// Note: actor is not needed, computed from private key +type Action_NewFundsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name of the requested payer. Ex.: "alice@trust" + PayerFioName string `protobuf:"bytes,1,opt,name=payer_fio_name,json=payerFioName,proto3" json:"payer_fio_name,omitempty"` + // The FIO address (not name) of the payer, owner of payee_fio_name. Ex.: "FIO6m1fMdTpRkRBnedvYshXCxLFiC5suRU8KDfx8xxtXp2hntxpnf" + PayerFioAddress string `protobuf:"bytes,2,opt,name=payer_fio_address,json=payerFioAddress,proto3" json:"payer_fio_address,omitempty"` + // Own FIO name. Ex.: "bob@trust" + PayeeFioName string `protobuf:"bytes,3,opt,name=payee_fio_name,json=payeeFioName,proto3" json:"payee_fio_name,omitempty"` + // Payload content of the request + Content *NewFundsContent `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_NewFundsRequest) Reset() { + *x = Action_NewFundsRequest{} + mi := &file_FIO_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_NewFundsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_NewFundsRequest) ProtoMessage() {} + +func (x *Action_NewFundsRequest) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_NewFundsRequest.ProtoReflect.Descriptor instead. +func (*Action_NewFundsRequest) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 6} +} + +func (x *Action_NewFundsRequest) GetPayerFioName() string { + if x != nil { + return x.PayerFioName + } + return "" +} + +func (x *Action_NewFundsRequest) GetPayerFioAddress() string { + if x != nil { + return x.PayerFioAddress + } + return "" +} + +func (x *Action_NewFundsRequest) GetPayeeFioName() string { + if x != nil { + return x.PayeeFioName + } + return "" +} + +func (x *Action_NewFundsRequest) GetContent() *NewFundsContent { + if x != nil { + return x.Content + } + return nil +} + +func (x *Action_NewFundsRequest) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Action for adding `100 * bundle_sets` bundled transactions to the supplied FIO Handle. When bundles are purchased one or more sets of bundled transactions are added to the existing count. +type Action_AddBundledTransactions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The FIO name already registered to the owner. Ex.: "alice@trust" + FioAddress string `protobuf:"bytes,1,opt,name=fio_address,json=fioAddress,proto3" json:"fio_address,omitempty"` + // Number of bundled sets. One set is 100 bundled transactions. + BundleSets uint64 `protobuf:"varint,2,opt,name=bundle_sets,json=bundleSets,proto3" json:"bundle_sets,omitempty"` + // Max fee to spend, can be obtained using get_fee API. + Fee uint64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action_AddBundledTransactions) Reset() { + *x = Action_AddBundledTransactions{} + mi := &file_FIO_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action_AddBundledTransactions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action_AddBundledTransactions) ProtoMessage() {} + +func (x *Action_AddBundledTransactions) ProtoReflect() protoreflect.Message { + mi := &file_FIO_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action_AddBundledTransactions.ProtoReflect.Descriptor instead. +func (*Action_AddBundledTransactions) Descriptor() ([]byte, []int) { + return file_FIO_proto_rawDescGZIP(), []int{2, 7} +} + +func (x *Action_AddBundledTransactions) GetFioAddress() string { + if x != nil { + return x.FioAddress + } + return "" +} + +func (x *Action_AddBundledTransactions) GetBundleSets() uint64 { + if x != nil { + return x.BundleSets + } + return 0 +} + +func (x *Action_AddBundledTransactions) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +var File_FIO_proto protoreflect.FileDescriptor + +const file_FIO_proto_rawDesc = "" + + "\n" + + "\tFIO.proto\x12\fTW.FIO.Proto\x1a\fCommon.proto\"J\n" + + "\rPublicAddress\x12\x1f\n" + + "\vcoin_symbol\x18\x01 \x01(\tR\n" + + "coinSymbol\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\"\xc5\x01\n" + + "\x0fNewFundsContent\x120\n" + + "\x14payee_public_address\x18\x01 \x01(\tR\x12payeePublicAddress\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\x12\x1f\n" + + "\vcoin_symbol\x18\x03 \x01(\tR\n" + + "coinSymbol\x12\x12\n" + + "\x04memo\x18\x04 \x01(\tR\x04memo\x12\x12\n" + + "\x04hash\x18\x05 \x01(\tR\x04hash\x12\x1f\n" + + "\voffline_url\x18\x06 \x01(\tR\n" + + "offlineUrl\"\xc3\x0e\n" + + "\x06Action\x12j\n" + + "\x1cregister_fio_address_message\x18\x01 \x01(\v2'.TW.FIO.Proto.Action.RegisterFioAddressH\x00R\x19registerFioAddressMessage\x12[\n" + + "\x17add_pub_address_message\x18\x02 \x01(\v2\".TW.FIO.Proto.Action.AddPubAddressH\x00R\x14addPubAddressMessage\x12J\n" + + "\x10transfer_message\x18\x03 \x01(\v2\x1d.TW.FIO.Proto.Action.TransferH\x00R\x0ftransferMessage\x12a\n" + + "\x19renew_fio_address_message\x18\x04 \x01(\v2$.TW.FIO.Proto.Action.RenewFioAddressH\x00R\x16renewFioAddressMessage\x12a\n" + + "\x19new_funds_request_message\x18\x05 \x01(\v2$.TW.FIO.Proto.Action.NewFundsRequestH\x00R\x16newFundsRequestMessage\x12d\n" + + "\x1aremove_pub_address_message\x18\x06 \x01(\v2%.TW.FIO.Proto.Action.RemovePubAddressH\x00R\x17removePubAddressMessage\x12r\n" + + " remove_all_pub_addresses_message\x18\a \x01(\v2(.TW.FIO.Proto.Action.RemoveAllPubAddressH\x00R\x1cremoveAllPubAddressesMessage\x12v\n" + + " add_bundled_transactions_message\x18\b \x01(\v2+.TW.FIO.Proto.Action.AddBundledTransactionsH\x00R\x1daddBundledTransactionsMessage\x1ax\n" + + "\x12RegisterFioAddress\x12\x1f\n" + + "\vfio_address\x18\x01 \x01(\tR\n" + + "fioAddress\x12/\n" + + "\x14owner_fio_public_key\x18\x02 \x01(\tR\x11ownerFioPublicKey\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x1a\x8a\x01\n" + + "\rAddPubAddress\x12\x1f\n" + + "\vfio_address\x18\x01 \x01(\tR\n" + + "fioAddress\x12F\n" + + "\x10public_addresses\x18\x02 \x03(\v2\x1b.TW.FIO.Proto.PublicAddressR\x0fpublicAddresses\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x1a\x8d\x01\n" + + "\x10RemovePubAddress\x12\x1f\n" + + "\vfio_address\x18\x01 \x01(\tR\n" + + "fioAddress\x12F\n" + + "\x10public_addresses\x18\x02 \x03(\v2\x1b.TW.FIO.Proto.PublicAddressR\x0fpublicAddresses\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x1aH\n" + + "\x13RemoveAllPubAddress\x12\x1f\n" + + "\vfio_address\x18\x01 \x01(\tR\n" + + "fioAddress\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x1a^\n" + + "\bTransfer\x12(\n" + + "\x10payee_public_key\x18\x01 \x01(\tR\x0epayeePublicKey\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x1au\n" + + "\x0fRenewFioAddress\x12\x1f\n" + + "\vfio_address\x18\x01 \x01(\tR\n" + + "fioAddress\x12/\n" + + "\x14owner_fio_public_key\x18\x02 \x01(\tR\x11ownerFioPublicKey\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03fee\x1a\xd4\x01\n" + + "\x0fNewFundsRequest\x12$\n" + + "\x0epayer_fio_name\x18\x01 \x01(\tR\fpayerFioName\x12*\n" + + "\x11payer_fio_address\x18\x02 \x01(\tR\x0fpayerFioAddress\x12$\n" + + "\x0epayee_fio_name\x18\x03 \x01(\tR\fpayeeFioName\x127\n" + + "\acontent\x18\x04 \x01(\v2\x1d.TW.FIO.Proto.NewFundsContentR\acontent\x12\x10\n" + + "\x03fee\x18\x05 \x01(\x04R\x03fee\x1al\n" + + "\x16AddBundledTransactions\x12\x1f\n" + + "\vfio_address\x18\x01 \x01(\tR\n" + + "fioAddress\x12\x1f\n" + + "\vbundle_sets\x18\x02 \x01(\x04R\n" + + "bundleSets\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x04R\x03feeB\x0f\n" + + "\rmessage_oneof\"~\n" + + "\vChainParams\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\fR\achainId\x12*\n" + + "\x11head_block_number\x18\x02 \x01(\x04R\x0fheadBlockNumber\x12(\n" + + "\x10ref_block_prefix\x18\x03 \x01(\x04R\x0erefBlockPrefix\"\xf1\x01\n" + + "\fSigningInput\x12\x16\n" + + "\x06expiry\x18\x01 \x01(\rR\x06expiry\x12<\n" + + "\fchain_params\x18\x02 \x01(\v2\x19.TW.FIO.Proto.ChainParamsR\vchainParams\x12\x1f\n" + + "\vprivate_key\x18\x03 \x01(\fR\n" + + "privateKey\x12\x12\n" + + "\x04tpid\x18\x04 \x01(\tR\x04tpid\x12,\n" + + "\x06action\x18\x05 \x01(\v2\x14.TW.FIO.Proto.ActionR\x06action\x12(\n" + + "\x10owner_public_key\x18\x06 \x01(\tR\x0eownerPublicKey\"\x9e\x01\n" + + "\rSigningOutput\x12\x12\n" + + "\x04json\x18\x01 \x01(\tR\x04json\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x12\x1f\n" + + "\vaction_name\x18\x04 \x01(\tR\n" + + "actionNameB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_FIO_proto_rawDescOnce sync.Once + file_FIO_proto_rawDescData []byte +) + +func file_FIO_proto_rawDescGZIP() []byte { + file_FIO_proto_rawDescOnce.Do(func() { + file_FIO_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_FIO_proto_rawDesc), len(file_FIO_proto_rawDesc))) + }) + return file_FIO_proto_rawDescData +} + +var file_FIO_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_FIO_proto_goTypes = []any{ + (*PublicAddress)(nil), // 0: TW.FIO.Proto.PublicAddress + (*NewFundsContent)(nil), // 1: TW.FIO.Proto.NewFundsContent + (*Action)(nil), // 2: TW.FIO.Proto.Action + (*ChainParams)(nil), // 3: TW.FIO.Proto.ChainParams + (*SigningInput)(nil), // 4: TW.FIO.Proto.SigningInput + (*SigningOutput)(nil), // 5: TW.FIO.Proto.SigningOutput + (*Action_RegisterFioAddress)(nil), // 6: TW.FIO.Proto.Action.RegisterFioAddress + (*Action_AddPubAddress)(nil), // 7: TW.FIO.Proto.Action.AddPubAddress + (*Action_RemovePubAddress)(nil), // 8: TW.FIO.Proto.Action.RemovePubAddress + (*Action_RemoveAllPubAddress)(nil), // 9: TW.FIO.Proto.Action.RemoveAllPubAddress + (*Action_Transfer)(nil), // 10: TW.FIO.Proto.Action.Transfer + (*Action_RenewFioAddress)(nil), // 11: TW.FIO.Proto.Action.RenewFioAddress + (*Action_NewFundsRequest)(nil), // 12: TW.FIO.Proto.Action.NewFundsRequest + (*Action_AddBundledTransactions)(nil), // 13: TW.FIO.Proto.Action.AddBundledTransactions + (common.SigningError)(0), // 14: TW.Common.Proto.SigningError +} +var file_FIO_proto_depIdxs = []int32{ + 6, // 0: TW.FIO.Proto.Action.register_fio_address_message:type_name -> TW.FIO.Proto.Action.RegisterFioAddress + 7, // 1: TW.FIO.Proto.Action.add_pub_address_message:type_name -> TW.FIO.Proto.Action.AddPubAddress + 10, // 2: TW.FIO.Proto.Action.transfer_message:type_name -> TW.FIO.Proto.Action.Transfer + 11, // 3: TW.FIO.Proto.Action.renew_fio_address_message:type_name -> TW.FIO.Proto.Action.RenewFioAddress + 12, // 4: TW.FIO.Proto.Action.new_funds_request_message:type_name -> TW.FIO.Proto.Action.NewFundsRequest + 8, // 5: TW.FIO.Proto.Action.remove_pub_address_message:type_name -> TW.FIO.Proto.Action.RemovePubAddress + 9, // 6: TW.FIO.Proto.Action.remove_all_pub_addresses_message:type_name -> TW.FIO.Proto.Action.RemoveAllPubAddress + 13, // 7: TW.FIO.Proto.Action.add_bundled_transactions_message:type_name -> TW.FIO.Proto.Action.AddBundledTransactions + 3, // 8: TW.FIO.Proto.SigningInput.chain_params:type_name -> TW.FIO.Proto.ChainParams + 2, // 9: TW.FIO.Proto.SigningInput.action:type_name -> TW.FIO.Proto.Action + 14, // 10: TW.FIO.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 0, // 11: TW.FIO.Proto.Action.AddPubAddress.public_addresses:type_name -> TW.FIO.Proto.PublicAddress + 0, // 12: TW.FIO.Proto.Action.RemovePubAddress.public_addresses:type_name -> TW.FIO.Proto.PublicAddress + 1, // 13: TW.FIO.Proto.Action.NewFundsRequest.content:type_name -> TW.FIO.Proto.NewFundsContent + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_FIO_proto_init() } +func file_FIO_proto_init() { + if File_FIO_proto != nil { + return + } + file_FIO_proto_msgTypes[2].OneofWrappers = []any{ + (*Action_RegisterFioAddressMessage)(nil), + (*Action_AddPubAddressMessage)(nil), + (*Action_TransferMessage)(nil), + (*Action_RenewFioAddressMessage)(nil), + (*Action_NewFundsRequestMessage)(nil), + (*Action_RemovePubAddressMessage)(nil), + (*Action_RemoveAllPubAddressesMessage)(nil), + (*Action_AddBundledTransactionsMessage)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_FIO_proto_rawDesc), len(file_FIO_proto_rawDesc)), + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_FIO_proto_goTypes, + DependencyIndexes: file_FIO_proto_depIdxs, + MessageInfos: file_FIO_proto_msgTypes, + }.Build() + File_FIO_proto = out.File + file_FIO_proto_goTypes = nil + file_FIO_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/greenfield/Greenfield.pb.go b/wrapper/go-wrapper/protos/greenfield/Greenfield.pb.go new file mode 100644 index 00000000000..341a951eaf4 --- /dev/null +++ b/wrapper/go-wrapper/protos/greenfield/Greenfield.pb.go @@ -0,0 +1,863 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Greenfield.proto + +package greenfield + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transaction broadcast mode +type BroadcastMode int32 + +const ( + BroadcastMode_SYNC BroadcastMode = 0 // Wait for the tx to pass/fail CheckTx + BroadcastMode_ASYNC BroadcastMode = 1 // Don't wait for pass/fail CheckTx; send and return tx immediately +) + +// Enum value maps for BroadcastMode. +var ( + BroadcastMode_name = map[int32]string{ + 0: "SYNC", + 1: "ASYNC", + } + BroadcastMode_value = map[string]int32{ + "SYNC": 0, + "ASYNC": 1, + } +) + +func (x BroadcastMode) Enum() *BroadcastMode { + p := new(BroadcastMode) + *p = x + return p +} + +func (x BroadcastMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BroadcastMode) Descriptor() protoreflect.EnumDescriptor { + return file_Greenfield_proto_enumTypes[0].Descriptor() +} + +func (BroadcastMode) Type() protoreflect.EnumType { + return &file_Greenfield_proto_enumTypes[0] +} + +func (x BroadcastMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BroadcastMode.Descriptor instead. +func (BroadcastMode) EnumDescriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{0} +} + +// Options for transaction encoding. +// Consider adding Json mode. +type EncodingMode int32 + +const ( + EncodingMode_Protobuf EncodingMode = 0 // Protobuf-serialized (binary) +) + +// Enum value maps for EncodingMode. +var ( + EncodingMode_name = map[int32]string{ + 0: "Protobuf", + } + EncodingMode_value = map[string]int32{ + "Protobuf": 0, + } +) + +func (x EncodingMode) Enum() *EncodingMode { + p := new(EncodingMode) + *p = x + return p +} + +func (x EncodingMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EncodingMode) Descriptor() protoreflect.EnumDescriptor { + return file_Greenfield_proto_enumTypes[1].Descriptor() +} + +func (EncodingMode) Type() protoreflect.EnumType { + return &file_Greenfield_proto_enumTypes[1] +} + +func (x EncodingMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EncodingMode.Descriptor instead. +func (EncodingMode) EnumDescriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{1} +} + +// Options for transaction signing. +// Consider adding Direct mode when it is supported. +type SigningMode int32 + +const ( + SigningMode_Eip712 SigningMode = 0 +) + +// Enum value maps for SigningMode. +var ( + SigningMode_name = map[int32]string{ + 0: "Eip712", + } + SigningMode_value = map[string]int32{ + "Eip712": 0, + } +) + +func (x SigningMode) Enum() *SigningMode { + p := new(SigningMode) + *p = x + return p +} + +func (x SigningMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SigningMode) Descriptor() protoreflect.EnumDescriptor { + return file_Greenfield_proto_enumTypes[2].Descriptor() +} + +func (SigningMode) Type() protoreflect.EnumType { + return &file_Greenfield_proto_enumTypes[2] +} + +func (x SigningMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SigningMode.Descriptor instead. +func (SigningMode) EnumDescriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{2} +} + +// A denomination and an amount +type Amount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // name of the denomination + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + // amount, number as string + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Amount) Reset() { + *x = Amount{} + mi := &file_Greenfield_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Amount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Amount) ProtoMessage() {} + +func (x *Amount) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Amount.ProtoReflect.Descriptor instead. +func (*Amount) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{0} +} + +func (x *Amount) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *Amount) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +// Fee incl. gas +type Fee struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Fee amount(s) + Amounts []*Amount `protobuf:"bytes,1,rep,name=amounts,proto3" json:"amounts,omitempty"` + // Gas price + Gas uint64 `protobuf:"varint,2,opt,name=gas,proto3" json:"gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fee) Reset() { + *x = Fee{} + mi := &file_Greenfield_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fee) ProtoMessage() {} + +func (x *Fee) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fee.ProtoReflect.Descriptor instead. +func (*Fee) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{1} +} + +func (x *Fee) GetAmounts() []*Amount { + if x != nil { + return x.Amounts + } + return nil +} + +func (x *Fee) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +// A transaction payload message +type Message struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The payload message + // + // Types that are valid to be assigned to MessageOneof: + // + // *Message_SendCoinsMessage + // *Message_BridgeTransferOut_ + MessageOneof isMessage_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message) Reset() { + *x = Message{} + mi := &file_Greenfield_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{2} +} + +func (x *Message) GetMessageOneof() isMessage_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *Message) GetSendCoinsMessage() *Message_Send { + if x != nil { + if x, ok := x.MessageOneof.(*Message_SendCoinsMessage); ok { + return x.SendCoinsMessage + } + } + return nil +} + +func (x *Message) GetBridgeTransferOut() *Message_BridgeTransferOut { + if x != nil { + if x, ok := x.MessageOneof.(*Message_BridgeTransferOut_); ok { + return x.BridgeTransferOut + } + } + return nil +} + +type isMessage_MessageOneof interface { + isMessage_MessageOneof() +} + +type Message_SendCoinsMessage struct { + SendCoinsMessage *Message_Send `protobuf:"bytes,1,opt,name=send_coins_message,json=sendCoinsMessage,proto3,oneof"` +} + +type Message_BridgeTransferOut_ struct { + BridgeTransferOut *Message_BridgeTransferOut `protobuf:"bytes,2,opt,name=bridge_transfer_out,json=bridgeTransferOut,proto3,oneof"` +} + +func (*Message_SendCoinsMessage) isMessage_MessageOneof() {} + +func (*Message_BridgeTransferOut_) isMessage_MessageOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An encoding mode. + EncodingMode EncodingMode `protobuf:"varint,1,opt,name=encoding_mode,json=encodingMode,proto3,enum=TW.Greenfield.Proto.EncodingMode" json:"encoding_mode,omitempty"` + // A signing mode. + SigningMode SigningMode `protobuf:"varint,2,opt,name=signing_mode,json=signingMode,proto3,enum=TW.Greenfield.Proto.SigningMode" json:"signing_mode,omitempty"` + // Source account number + AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + // ETH Chain ID (string). + // Must be set if `signing_mode` is Eip712. + EthChainId string `protobuf:"bytes,4,opt,name=eth_chain_id,json=ethChainId,proto3" json:"eth_chain_id,omitempty"` + // Cosmos Chain ID (string) + CosmosChainId string `protobuf:"bytes,5,opt,name=cosmos_chain_id,json=cosmosChainId,proto3" json:"cosmos_chain_id,omitempty"` + // Transaction fee + Fee *Fee `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` + // Optional memo + Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` + // Sequence number (account specific) + Sequence uint64 `protobuf:"varint,8,opt,name=sequence,proto3" json:"sequence,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,9,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Message payloads. + Messages []*Message `protobuf:"bytes,10,rep,name=messages,proto3" json:"messages,omitempty"` + // Broadcast mode (included in output, relevant when broadcasting) + Mode BroadcastMode `protobuf:"varint,11,opt,name=mode,proto3,enum=TW.Greenfield.Proto.BroadcastMode" json:"mode,omitempty"` + PublicKey []byte `protobuf:"bytes,12,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Greenfield_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningInput) GetEncodingMode() EncodingMode { + if x != nil { + return x.EncodingMode + } + return EncodingMode_Protobuf +} + +func (x *SigningInput) GetSigningMode() SigningMode { + if x != nil { + return x.SigningMode + } + return SigningMode_Eip712 +} + +func (x *SigningInput) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber + } + return 0 +} + +func (x *SigningInput) GetEthChainId() string { + if x != nil { + return x.EthChainId + } + return "" +} + +func (x *SigningInput) GetCosmosChainId() string { + if x != nil { + return x.CosmosChainId + } + return "" +} + +func (x *SigningInput) GetFee() *Fee { + if x != nil { + return x.Fee + } + return nil +} + +func (x *SigningInput) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *SigningInput) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetMessages() []*Message { + if x != nil { + return x.Messages + } + return nil +} + +func (x *SigningInput) GetMode() BroadcastMode { + if x != nil { + return x.Mode + } + return BroadcastMode_SYNC +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signature + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // Signed transaction containing protobuf encoded, Base64-encoded form (Stargate case), + // wrapped in a ready-to-broadcast json. + Serialized string `protobuf:"bytes,2,opt,name=serialized,proto3" json:"serialized,omitempty"` + // signatures array json string + SignatureJson string `protobuf:"bytes,3,opt,name=signature_json,json=signatureJson,proto3" json:"signature_json,omitempty"` + // error description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + Error common.SigningError `protobuf:"varint,5,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Greenfield_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetSerialized() string { + if x != nil { + return x.Serialized + } + return "" +} + +func (x *SigningOutput) GetSignatureJson() string { + if x != nil { + return x.SignatureJson + } + return "" +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +// cosmos-sdk/MsgSend +type Message_Send struct { + state protoimpl.MessageState `protogen:"open.v1"` + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amounts []*Amount `protobuf:"bytes,3,rep,name=amounts,proto3" json:"amounts,omitempty"` + // Optional. Default `cosmos.bank.v1beta1.MsgSend`. + TypePrefix string `protobuf:"bytes,4,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_Send) Reset() { + *x = Message_Send{} + mi := &file_Greenfield_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_Send) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_Send) ProtoMessage() {} + +func (x *Message_Send) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_Send.ProtoReflect.Descriptor instead. +func (*Message_Send) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *Message_Send) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *Message_Send) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Message_Send) GetAmounts() []*Amount { + if x != nil { + return x.Amounts + } + return nil +} + +func (x *Message_Send) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +// greenfield/MsgTransferOut +// Used to transfer BNB Greenfield to BSC blockchain. +type Message_BridgeTransferOut struct { + state protoimpl.MessageState `protogen:"open.v1"` + // In most cases, `from_address` and `to_address` are equal. + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // Optional. Default `greenfield.bridge.MsgTransferOut`. + TypePrefix string `protobuf:"bytes,4,opt,name=type_prefix,json=typePrefix,proto3" json:"type_prefix,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Message_BridgeTransferOut) Reset() { + *x = Message_BridgeTransferOut{} + mi := &file_Greenfield_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Message_BridgeTransferOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message_BridgeTransferOut) ProtoMessage() {} + +func (x *Message_BridgeTransferOut) ProtoReflect() protoreflect.Message { + mi := &file_Greenfield_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message_BridgeTransferOut.ProtoReflect.Descriptor instead. +func (*Message_BridgeTransferOut) Descriptor() ([]byte, []int) { + return file_Greenfield_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *Message_BridgeTransferOut) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *Message_BridgeTransferOut) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Message_BridgeTransferOut) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Message_BridgeTransferOut) GetTypePrefix() string { + if x != nil { + return x.TypePrefix + } + return "" +} + +var File_Greenfield_proto protoreflect.FileDescriptor + +const file_Greenfield_proto_rawDesc = "" + + "\n" + + "\x10Greenfield.proto\x12\x13TW.Greenfield.Proto\x1a\fCommon.proto\"6\n" + + "\x06Amount\x12\x14\n" + + "\x05denom\x18\x01 \x01(\tR\x05denom\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\"N\n" + + "\x03Fee\x125\n" + + "\aamounts\x18\x01 \x03(\v2\x1b.TW.Greenfield.Proto.AmountR\aamounts\x12\x10\n" + + "\x03gas\x18\x02 \x01(\x04R\x03gas\"\xa0\x04\n" + + "\aMessage\x12Q\n" + + "\x12send_coins_message\x18\x01 \x01(\v2!.TW.Greenfield.Proto.Message.SendH\x00R\x10sendCoinsMessage\x12`\n" + + "\x13bridge_transfer_out\x18\x02 \x01(\v2..TW.Greenfield.Proto.Message.BridgeTransferOutH\x00R\x11bridgeTransferOut\x1a\xa0\x01\n" + + "\x04Send\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x125\n" + + "\aamounts\x18\x03 \x03(\v2\x1b.TW.Greenfield.Proto.AmountR\aamounts\x12\x1f\n" + + "\vtype_prefix\x18\x04 \x01(\tR\n" + + "typePrefix\x1a\xab\x01\n" + + "\x11BridgeTransferOut\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x123\n" + + "\x06amount\x18\x03 \x01(\v2\x1b.TW.Greenfield.Proto.AmountR\x06amount\x12\x1f\n" + + "\vtype_prefix\x18\x04 \x01(\tR\n" + + "typePrefixB\x0f\n" + + "\rmessage_oneof\"\x9a\x04\n" + + "\fSigningInput\x12F\n" + + "\rencoding_mode\x18\x01 \x01(\x0e2!.TW.Greenfield.Proto.EncodingModeR\fencodingMode\x12C\n" + + "\fsigning_mode\x18\x02 \x01(\x0e2 .TW.Greenfield.Proto.SigningModeR\vsigningMode\x12%\n" + + "\x0eaccount_number\x18\x03 \x01(\x04R\raccountNumber\x12 \n" + + "\feth_chain_id\x18\x04 \x01(\tR\n" + + "ethChainId\x12&\n" + + "\x0fcosmos_chain_id\x18\x05 \x01(\tR\rcosmosChainId\x12*\n" + + "\x03fee\x18\x06 \x01(\v2\x18.TW.Greenfield.Proto.FeeR\x03fee\x12\x12\n" + + "\x04memo\x18\a \x01(\tR\x04memo\x12\x1a\n" + + "\bsequence\x18\b \x01(\x04R\bsequence\x12\x1f\n" + + "\vprivate_key\x18\t \x01(\fR\n" + + "privateKey\x128\n" + + "\bmessages\x18\n" + + " \x03(\v2\x1c.TW.Greenfield.Proto.MessageR\bmessages\x126\n" + + "\x04mode\x18\v \x01(\x0e2\".TW.Greenfield.Proto.BroadcastModeR\x04mode\x12\x1d\n" + + "\n" + + "public_key\x18\f \x01(\fR\tpublicKey\"\xce\x01\n" + + "\rSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x1e\n" + + "\n" + + "serialized\x18\x02 \x01(\tR\n" + + "serialized\x12%\n" + + "\x0esignature_json\x18\x03 \x01(\tR\rsignatureJson\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\x123\n" + + "\x05error\x18\x05 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error*$\n" + + "\rBroadcastMode\x12\b\n" + + "\x04SYNC\x10\x00\x12\t\n" + + "\x05ASYNC\x10\x01*\x1c\n" + + "\fEncodingMode\x12\f\n" + + "\bProtobuf\x10\x00*\x19\n" + + "\vSigningMode\x12\n" + + "\n" + + "\x06Eip712\x10\x00B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Greenfield_proto_rawDescOnce sync.Once + file_Greenfield_proto_rawDescData []byte +) + +func file_Greenfield_proto_rawDescGZIP() []byte { + file_Greenfield_proto_rawDescOnce.Do(func() { + file_Greenfield_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Greenfield_proto_rawDesc), len(file_Greenfield_proto_rawDesc))) + }) + return file_Greenfield_proto_rawDescData +} + +var file_Greenfield_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_Greenfield_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_Greenfield_proto_goTypes = []any{ + (BroadcastMode)(0), // 0: TW.Greenfield.Proto.BroadcastMode + (EncodingMode)(0), // 1: TW.Greenfield.Proto.EncodingMode + (SigningMode)(0), // 2: TW.Greenfield.Proto.SigningMode + (*Amount)(nil), // 3: TW.Greenfield.Proto.Amount + (*Fee)(nil), // 4: TW.Greenfield.Proto.Fee + (*Message)(nil), // 5: TW.Greenfield.Proto.Message + (*SigningInput)(nil), // 6: TW.Greenfield.Proto.SigningInput + (*SigningOutput)(nil), // 7: TW.Greenfield.Proto.SigningOutput + (*Message_Send)(nil), // 8: TW.Greenfield.Proto.Message.Send + (*Message_BridgeTransferOut)(nil), // 9: TW.Greenfield.Proto.Message.BridgeTransferOut + (common.SigningError)(0), // 10: TW.Common.Proto.SigningError +} +var file_Greenfield_proto_depIdxs = []int32{ + 3, // 0: TW.Greenfield.Proto.Fee.amounts:type_name -> TW.Greenfield.Proto.Amount + 8, // 1: TW.Greenfield.Proto.Message.send_coins_message:type_name -> TW.Greenfield.Proto.Message.Send + 9, // 2: TW.Greenfield.Proto.Message.bridge_transfer_out:type_name -> TW.Greenfield.Proto.Message.BridgeTransferOut + 1, // 3: TW.Greenfield.Proto.SigningInput.encoding_mode:type_name -> TW.Greenfield.Proto.EncodingMode + 2, // 4: TW.Greenfield.Proto.SigningInput.signing_mode:type_name -> TW.Greenfield.Proto.SigningMode + 4, // 5: TW.Greenfield.Proto.SigningInput.fee:type_name -> TW.Greenfield.Proto.Fee + 5, // 6: TW.Greenfield.Proto.SigningInput.messages:type_name -> TW.Greenfield.Proto.Message + 0, // 7: TW.Greenfield.Proto.SigningInput.mode:type_name -> TW.Greenfield.Proto.BroadcastMode + 10, // 8: TW.Greenfield.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 3, // 9: TW.Greenfield.Proto.Message.Send.amounts:type_name -> TW.Greenfield.Proto.Amount + 3, // 10: TW.Greenfield.Proto.Message.BridgeTransferOut.amount:type_name -> TW.Greenfield.Proto.Amount + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_Greenfield_proto_init() } +func file_Greenfield_proto_init() { + if File_Greenfield_proto != nil { + return + } + file_Greenfield_proto_msgTypes[2].OneofWrappers = []any{ + (*Message_SendCoinsMessage)(nil), + (*Message_BridgeTransferOut_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Greenfield_proto_rawDesc), len(file_Greenfield_proto_rawDesc)), + NumEnums: 3, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Greenfield_proto_goTypes, + DependencyIndexes: file_Greenfield_proto_depIdxs, + EnumInfos: file_Greenfield_proto_enumTypes, + MessageInfos: file_Greenfield_proto_msgTypes, + }.Build() + File_Greenfield_proto = out.File + file_Greenfield_proto_goTypes = nil + file_Greenfield_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/harmony/Harmony.pb.go b/wrapper/go-wrapper/protos/harmony/Harmony.pb.go new file mode 100644 index 00000000000..6059e1e7c68 --- /dev/null +++ b/wrapper/go-wrapper/protos/harmony/Harmony.pb.go @@ -0,0 +1,1237 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Harmony.proto + +package harmony + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Chain identifier (uint256, serialized big endian) + ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The payload message + // + // Types that are valid to be assigned to MessageOneof: + // + // *SigningInput_TransactionMessage + // *SigningInput_StakingMessage + MessageOneof isSigningInput_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Harmony_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetMessageOneof() isSigningInput_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *SigningInput) GetTransactionMessage() *TransactionMessage { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_TransactionMessage); ok { + return x.TransactionMessage + } + } + return nil +} + +func (x *SigningInput) GetStakingMessage() *StakingMessage { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_StakingMessage); ok { + return x.StakingMessage + } + } + return nil +} + +type isSigningInput_MessageOneof interface { + isSigningInput_MessageOneof() +} + +type SigningInput_TransactionMessage struct { + TransactionMessage *TransactionMessage `protobuf:"bytes,3,opt,name=transaction_message,json=transactionMessage,proto3,oneof"` +} + +type SigningInput_StakingMessage struct { + StakingMessage *StakingMessage `protobuf:"bytes,4,opt,name=staking_message,json=stakingMessage,proto3,oneof"` +} + +func (*SigningInput_TransactionMessage) isSigningInput_MessageOneof() {} + +func (*SigningInput_StakingMessage) isSigningInput_MessageOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // THE V,R,S components of the signature + V []byte `protobuf:"bytes,2,opt,name=v,proto3" json:"v,omitempty"` + R []byte `protobuf:"bytes,3,opt,name=r,proto3" json:"r,omitempty"` + S []byte `protobuf:"bytes,4,opt,name=s,proto3" json:"s,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,5,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Harmony_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetV() []byte { + if x != nil { + return x.V + } + return nil +} + +func (x *SigningOutput) GetR() []byte { + if x != nil { + return x.R + } + return nil +} + +func (x *SigningOutput) GetS() []byte { + if x != nil { + return x.S + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// A Transfer message +type TransactionMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Nonce (uint256, serialized big endian) + Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Gas price (uint256, serialized big endian) + GasPrice []byte `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Gas limit (uint256, serialized big endian) + GasLimit []byte `protobuf:"bytes,3,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Recipient's address. + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to send in wei (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + // Optional payload + Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + // From shard ID (uint256, serialized big endian) + FromShardId []byte `protobuf:"bytes,7,opt,name=from_shard_id,json=fromShardId,proto3" json:"from_shard_id,omitempty"` + // To Shard ID (uint256, serialized big endian) + ToShardId []byte `protobuf:"bytes,8,opt,name=to_shard_id,json=toShardId,proto3" json:"to_shard_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionMessage) Reset() { + *x = TransactionMessage{} + mi := &file_Harmony_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionMessage) ProtoMessage() {} + +func (x *TransactionMessage) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionMessage.ProtoReflect.Descriptor instead. +func (*TransactionMessage) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{2} +} + +func (x *TransactionMessage) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *TransactionMessage) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *TransactionMessage) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +func (x *TransactionMessage) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransactionMessage) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *TransactionMessage) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *TransactionMessage) GetFromShardId() []byte { + if x != nil { + return x.FromShardId + } + return nil +} + +func (x *TransactionMessage) GetToShardId() []byte { + if x != nil { + return x.ToShardId + } + return nil +} + +// A Staking message. +type StakingMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // StakeMsg + // + // Types that are valid to be assigned to StakeMsg: + // + // *StakingMessage_CreateValidatorMessage + // *StakingMessage_EditValidatorMessage + // *StakingMessage_DelegateMessage + // *StakingMessage_UndelegateMessage + // *StakingMessage_CollectRewards + StakeMsg isStakingMessage_StakeMsg `protobuf_oneof:"stake_msg"` + // Nonce (uint256, serialized big endian) + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Gas price (uint256, serialized big endian) + GasPrice []byte `protobuf:"bytes,7,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Gas limit (uint256, serialized big endian) + GasLimit []byte `protobuf:"bytes,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StakingMessage) Reset() { + *x = StakingMessage{} + mi := &file_Harmony_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StakingMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StakingMessage) ProtoMessage() {} + +func (x *StakingMessage) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StakingMessage.ProtoReflect.Descriptor instead. +func (*StakingMessage) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{3} +} + +func (x *StakingMessage) GetStakeMsg() isStakingMessage_StakeMsg { + if x != nil { + return x.StakeMsg + } + return nil +} + +func (x *StakingMessage) GetCreateValidatorMessage() *DirectiveCreateValidator { + if x != nil { + if x, ok := x.StakeMsg.(*StakingMessage_CreateValidatorMessage); ok { + return x.CreateValidatorMessage + } + } + return nil +} + +func (x *StakingMessage) GetEditValidatorMessage() *DirectiveEditValidator { + if x != nil { + if x, ok := x.StakeMsg.(*StakingMessage_EditValidatorMessage); ok { + return x.EditValidatorMessage + } + } + return nil +} + +func (x *StakingMessage) GetDelegateMessage() *DirectiveDelegate { + if x != nil { + if x, ok := x.StakeMsg.(*StakingMessage_DelegateMessage); ok { + return x.DelegateMessage + } + } + return nil +} + +func (x *StakingMessage) GetUndelegateMessage() *DirectiveUndelegate { + if x != nil { + if x, ok := x.StakeMsg.(*StakingMessage_UndelegateMessage); ok { + return x.UndelegateMessage + } + } + return nil +} + +func (x *StakingMessage) GetCollectRewards() *DirectiveCollectRewards { + if x != nil { + if x, ok := x.StakeMsg.(*StakingMessage_CollectRewards); ok { + return x.CollectRewards + } + } + return nil +} + +func (x *StakingMessage) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *StakingMessage) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *StakingMessage) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +type isStakingMessage_StakeMsg interface { + isStakingMessage_StakeMsg() +} + +type StakingMessage_CreateValidatorMessage struct { + CreateValidatorMessage *DirectiveCreateValidator `protobuf:"bytes,1,opt,name=create_validator_message,json=createValidatorMessage,proto3,oneof"` +} + +type StakingMessage_EditValidatorMessage struct { + EditValidatorMessage *DirectiveEditValidator `protobuf:"bytes,2,opt,name=edit_validator_message,json=editValidatorMessage,proto3,oneof"` +} + +type StakingMessage_DelegateMessage struct { + DelegateMessage *DirectiveDelegate `protobuf:"bytes,3,opt,name=delegate_message,json=delegateMessage,proto3,oneof"` +} + +type StakingMessage_UndelegateMessage struct { + UndelegateMessage *DirectiveUndelegate `protobuf:"bytes,4,opt,name=undelegate_message,json=undelegateMessage,proto3,oneof"` +} + +type StakingMessage_CollectRewards struct { + CollectRewards *DirectiveCollectRewards `protobuf:"bytes,5,opt,name=collect_rewards,json=collectRewards,proto3,oneof"` +} + +func (*StakingMessage_CreateValidatorMessage) isStakingMessage_StakeMsg() {} + +func (*StakingMessage_EditValidatorMessage) isStakingMessage_StakeMsg() {} + +func (*StakingMessage_DelegateMessage) isStakingMessage_StakeMsg() {} + +func (*StakingMessage_UndelegateMessage) isStakingMessage_StakeMsg() {} + +func (*StakingMessage_CollectRewards) isStakingMessage_StakeMsg() {} + +// Description for a validator +type Description struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` + Website string `protobuf:"bytes,3,opt,name=website,proto3" json:"website,omitempty"` + SecurityContact string `protobuf:"bytes,4,opt,name=security_contact,json=securityContact,proto3" json:"security_contact,omitempty"` + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Description) Reset() { + *x = Description{} + mi := &file_Harmony_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Description) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Description) ProtoMessage() {} + +func (x *Description) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Description.ProtoReflect.Descriptor instead. +func (*Description) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{4} +} + +func (x *Description) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Description) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *Description) GetWebsite() string { + if x != nil { + return x.Website + } + return "" +} + +func (x *Description) GetSecurityContact() string { + if x != nil { + return x.SecurityContact + } + return "" +} + +func (x *Description) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +// A variable precision number +type Decimal struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The 'raw' value + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // The precision (number of decimals) + Precision []byte `protobuf:"bytes,2,opt,name=precision,proto3" json:"precision,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Decimal) Reset() { + *x = Decimal{} + mi := &file_Harmony_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Decimal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decimal) ProtoMessage() {} + +func (x *Decimal) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decimal.ProtoReflect.Descriptor instead. +func (*Decimal) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{5} +} + +func (x *Decimal) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Decimal) GetPrecision() []byte { + if x != nil { + return x.Precision + } + return nil +} + +// Represents validator commission rule +type CommissionRate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The rate + Rate *Decimal `protobuf:"bytes,1,opt,name=rate,proto3" json:"rate,omitempty"` + // Maximum rate + MaxRate *Decimal `protobuf:"bytes,2,opt,name=max_rate,json=maxRate,proto3" json:"max_rate,omitempty"` + // Maximum of rate change + MaxChangeRate *Decimal `protobuf:"bytes,3,opt,name=max_change_rate,json=maxChangeRate,proto3" json:"max_change_rate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CommissionRate) Reset() { + *x = CommissionRate{} + mi := &file_Harmony_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CommissionRate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommissionRate) ProtoMessage() {} + +func (x *CommissionRate) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommissionRate.ProtoReflect.Descriptor instead. +func (*CommissionRate) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{6} +} + +func (x *CommissionRate) GetRate() *Decimal { + if x != nil { + return x.Rate + } + return nil +} + +func (x *CommissionRate) GetMaxRate() *Decimal { + if x != nil { + return x.MaxRate + } + return nil +} + +func (x *CommissionRate) GetMaxChangeRate() *Decimal { + if x != nil { + return x.MaxChangeRate + } + return nil +} + +// Create Validator directive +type DirectiveCreateValidator struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of validator + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // Description, name etc. + Description *Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Rates + CommissionRates *CommissionRate `protobuf:"bytes,3,opt,name=commission_rates,json=commissionRates,proto3" json:"commission_rates,omitempty"` + MinSelfDelegation []byte `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3" json:"min_self_delegation,omitempty"` + MaxTotalDelegation []byte `protobuf:"bytes,5,opt,name=max_total_delegation,json=maxTotalDelegation,proto3" json:"max_total_delegation,omitempty"` + SlotPubKeys [][]byte `protobuf:"bytes,6,rep,name=slot_pub_keys,json=slotPubKeys,proto3" json:"slot_pub_keys,omitempty"` + SlotKeySigs [][]byte `protobuf:"bytes,7,rep,name=slot_key_sigs,json=slotKeySigs,proto3" json:"slot_key_sigs,omitempty"` + Amount []byte `protobuf:"bytes,8,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DirectiveCreateValidator) Reset() { + *x = DirectiveCreateValidator{} + mi := &file_Harmony_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DirectiveCreateValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectiveCreateValidator) ProtoMessage() {} + +func (x *DirectiveCreateValidator) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectiveCreateValidator.ProtoReflect.Descriptor instead. +func (*DirectiveCreateValidator) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{7} +} + +func (x *DirectiveCreateValidator) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *DirectiveCreateValidator) GetDescription() *Description { + if x != nil { + return x.Description + } + return nil +} + +func (x *DirectiveCreateValidator) GetCommissionRates() *CommissionRate { + if x != nil { + return x.CommissionRates + } + return nil +} + +func (x *DirectiveCreateValidator) GetMinSelfDelegation() []byte { + if x != nil { + return x.MinSelfDelegation + } + return nil +} + +func (x *DirectiveCreateValidator) GetMaxTotalDelegation() []byte { + if x != nil { + return x.MaxTotalDelegation + } + return nil +} + +func (x *DirectiveCreateValidator) GetSlotPubKeys() [][]byte { + if x != nil { + return x.SlotPubKeys + } + return nil +} + +func (x *DirectiveCreateValidator) GetSlotKeySigs() [][]byte { + if x != nil { + return x.SlotKeySigs + } + return nil +} + +func (x *DirectiveCreateValidator) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// Edit Validator directive +type DirectiveEditValidator struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Validator address + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + Description *Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + CommissionRate *Decimal `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3" json:"commission_rate,omitempty"` + MinSelfDelegation []byte `protobuf:"bytes,4,opt,name=min_self_delegation,json=minSelfDelegation,proto3" json:"min_self_delegation,omitempty"` + MaxTotalDelegation []byte `protobuf:"bytes,5,opt,name=max_total_delegation,json=maxTotalDelegation,proto3" json:"max_total_delegation,omitempty"` + SlotKeyToRemove []byte `protobuf:"bytes,6,opt,name=slot_key_to_remove,json=slotKeyToRemove,proto3" json:"slot_key_to_remove,omitempty"` + SlotKeyToAdd []byte `protobuf:"bytes,7,opt,name=slot_key_to_add,json=slotKeyToAdd,proto3" json:"slot_key_to_add,omitempty"` + SlotKeyToAddSig []byte `protobuf:"bytes,8,opt,name=slot_key_to_add_sig,json=slotKeyToAddSig,proto3" json:"slot_key_to_add_sig,omitempty"` + Active []byte `protobuf:"bytes,9,opt,name=active,proto3" json:"active,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DirectiveEditValidator) Reset() { + *x = DirectiveEditValidator{} + mi := &file_Harmony_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DirectiveEditValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectiveEditValidator) ProtoMessage() {} + +func (x *DirectiveEditValidator) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectiveEditValidator.ProtoReflect.Descriptor instead. +func (*DirectiveEditValidator) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{8} +} + +func (x *DirectiveEditValidator) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *DirectiveEditValidator) GetDescription() *Description { + if x != nil { + return x.Description + } + return nil +} + +func (x *DirectiveEditValidator) GetCommissionRate() *Decimal { + if x != nil { + return x.CommissionRate + } + return nil +} + +func (x *DirectiveEditValidator) GetMinSelfDelegation() []byte { + if x != nil { + return x.MinSelfDelegation + } + return nil +} + +func (x *DirectiveEditValidator) GetMaxTotalDelegation() []byte { + if x != nil { + return x.MaxTotalDelegation + } + return nil +} + +func (x *DirectiveEditValidator) GetSlotKeyToRemove() []byte { + if x != nil { + return x.SlotKeyToRemove + } + return nil +} + +func (x *DirectiveEditValidator) GetSlotKeyToAdd() []byte { + if x != nil { + return x.SlotKeyToAdd + } + return nil +} + +func (x *DirectiveEditValidator) GetSlotKeyToAddSig() []byte { + if x != nil { + return x.SlotKeyToAddSig + } + return nil +} + +func (x *DirectiveEditValidator) GetActive() []byte { + if x != nil { + return x.Active + } + return nil +} + +// Delegate directive +type DirectiveDelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Delegator address + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // Validator address + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // Delegate amount (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DirectiveDelegate) Reset() { + *x = DirectiveDelegate{} + mi := &file_Harmony_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DirectiveDelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectiveDelegate) ProtoMessage() {} + +func (x *DirectiveDelegate) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectiveDelegate.ProtoReflect.Descriptor instead. +func (*DirectiveDelegate) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{9} +} + +func (x *DirectiveDelegate) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *DirectiveDelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *DirectiveDelegate) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// Undelegate directive +type DirectiveUndelegate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Delegator address + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + // Validator address + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // Undelegate amount (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DirectiveUndelegate) Reset() { + *x = DirectiveUndelegate{} + mi := &file_Harmony_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DirectiveUndelegate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectiveUndelegate) ProtoMessage() {} + +func (x *DirectiveUndelegate) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectiveUndelegate.ProtoReflect.Descriptor instead. +func (*DirectiveUndelegate) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{10} +} + +func (x *DirectiveUndelegate) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +func (x *DirectiveUndelegate) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *DirectiveUndelegate) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// Collect reward +type DirectiveCollectRewards struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Delegator address + DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DirectiveCollectRewards) Reset() { + *x = DirectiveCollectRewards{} + mi := &file_Harmony_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DirectiveCollectRewards) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectiveCollectRewards) ProtoMessage() {} + +func (x *DirectiveCollectRewards) ProtoReflect() protoreflect.Message { + mi := &file_Harmony_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectiveCollectRewards.ProtoReflect.Descriptor instead. +func (*DirectiveCollectRewards) Descriptor() ([]byte, []int) { + return file_Harmony_proto_rawDescGZIP(), []int{11} +} + +func (x *DirectiveCollectRewards) GetDelegatorAddress() string { + if x != nil { + return x.DelegatorAddress + } + return "" +} + +var File_Harmony_proto protoreflect.FileDescriptor + +const file_Harmony_proto_rawDesc = "" + + "\n" + + "\rHarmony.proto\x12\x10TW.Harmony.Proto\x1a\fCommon.proto\"\x81\x02\n" + + "\fSigningInput\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\fR\achainId\x12\x1f\n" + + "\vprivate_key\x18\x02 \x01(\fR\n" + + "privateKey\x12W\n" + + "\x13transaction_message\x18\x03 \x01(\v2$.TW.Harmony.Proto.TransactionMessageH\x00R\x12transactionMessage\x12K\n" + + "\x0fstaking_message\x18\x04 \x01(\v2 .TW.Harmony.Proto.StakingMessageH\x00R\x0estakingMessageB\x0f\n" + + "\rmessage_oneof\"\xad\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\f\n" + + "\x01v\x18\x02 \x01(\fR\x01v\x12\f\n" + + "\x01r\x18\x03 \x01(\fR\x01r\x12\f\n" + + "\x01s\x18\x04 \x01(\fR\x01s\x123\n" + + "\x05error\x18\x05 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x06 \x01(\tR\ferrorMessage\"\xf9\x01\n" + + "\x12TransactionMessage\x12\x14\n" + + "\x05nonce\x18\x01 \x01(\fR\x05nonce\x12\x1b\n" + + "\tgas_price\x18\x02 \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x03 \x01(\fR\bgasLimit\x12\x1d\n" + + "\n" + + "to_address\x18\x04 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x05 \x01(\fR\x06amount\x12\x18\n" + + "\apayload\x18\x06 \x01(\fR\apayload\x12\"\n" + + "\rfrom_shard_id\x18\a \x01(\fR\vfromShardId\x12\x1e\n" + + "\vto_shard_id\x18\b \x01(\fR\ttoShardId\"\xb7\x04\n" + + "\x0eStakingMessage\x12f\n" + + "\x18create_validator_message\x18\x01 \x01(\v2*.TW.Harmony.Proto.DirectiveCreateValidatorH\x00R\x16createValidatorMessage\x12`\n" + + "\x16edit_validator_message\x18\x02 \x01(\v2(.TW.Harmony.Proto.DirectiveEditValidatorH\x00R\x14editValidatorMessage\x12P\n" + + "\x10delegate_message\x18\x03 \x01(\v2#.TW.Harmony.Proto.DirectiveDelegateH\x00R\x0fdelegateMessage\x12V\n" + + "\x12undelegate_message\x18\x04 \x01(\v2%.TW.Harmony.Proto.DirectiveUndelegateH\x00R\x11undelegateMessage\x12T\n" + + "\x0fcollect_rewards\x18\x05 \x01(\v2).TW.Harmony.Proto.DirectiveCollectRewardsH\x00R\x0ecollectRewards\x12\x14\n" + + "\x05nonce\x18\x06 \x01(\fR\x05nonce\x12\x1b\n" + + "\tgas_price\x18\a \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\b \x01(\fR\bgasLimitB\v\n" + + "\tstake_msg\"\x9c\x01\n" + + "\vDescription\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" + + "\awebsite\x18\x03 \x01(\tR\awebsite\x12)\n" + + "\x10security_contact\x18\x04 \x01(\tR\x0fsecurityContact\x12\x18\n" + + "\adetails\x18\x05 \x01(\tR\adetails\"=\n" + + "\aDecimal\x12\x14\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12\x1c\n" + + "\tprecision\x18\x02 \x01(\fR\tprecision\"\xb8\x01\n" + + "\x0eCommissionRate\x12-\n" + + "\x04rate\x18\x01 \x01(\v2\x19.TW.Harmony.Proto.DecimalR\x04rate\x124\n" + + "\bmax_rate\x18\x02 \x01(\v2\x19.TW.Harmony.Proto.DecimalR\amaxRate\x12A\n" + + "\x0fmax_change_rate\x18\x03 \x01(\v2\x19.TW.Harmony.Proto.DecimalR\rmaxChangeRate\"\x97\x03\n" + + "\x18DirectiveCreateValidator\x12+\n" + + "\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12?\n" + + "\vdescription\x18\x02 \x01(\v2\x1d.TW.Harmony.Proto.DescriptionR\vdescription\x12K\n" + + "\x10commission_rates\x18\x03 \x01(\v2 .TW.Harmony.Proto.CommissionRateR\x0fcommissionRates\x12.\n" + + "\x13min_self_delegation\x18\x04 \x01(\fR\x11minSelfDelegation\x120\n" + + "\x14max_total_delegation\x18\x05 \x01(\fR\x12maxTotalDelegation\x12\"\n" + + "\rslot_pub_keys\x18\x06 \x03(\fR\vslotPubKeys\x12\"\n" + + "\rslot_key_sigs\x18\a \x03(\fR\vslotKeySigs\x12\x16\n" + + "\x06amount\x18\b \x01(\fR\x06amount\"\xc6\x03\n" + + "\x16DirectiveEditValidator\x12+\n" + + "\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12?\n" + + "\vdescription\x18\x02 \x01(\v2\x1d.TW.Harmony.Proto.DescriptionR\vdescription\x12B\n" + + "\x0fcommission_rate\x18\x03 \x01(\v2\x19.TW.Harmony.Proto.DecimalR\x0ecommissionRate\x12.\n" + + "\x13min_self_delegation\x18\x04 \x01(\fR\x11minSelfDelegation\x120\n" + + "\x14max_total_delegation\x18\x05 \x01(\fR\x12maxTotalDelegation\x12+\n" + + "\x12slot_key_to_remove\x18\x06 \x01(\fR\x0fslotKeyToRemove\x12%\n" + + "\x0fslot_key_to_add\x18\a \x01(\fR\fslotKeyToAdd\x12,\n" + + "\x13slot_key_to_add_sig\x18\b \x01(\fR\x0fslotKeyToAddSig\x12\x16\n" + + "\x06active\x18\t \x01(\fR\x06active\"\x85\x01\n" + + "\x11DirectiveDelegate\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x12+\n" + + "\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\"\x87\x01\n" + + "\x13DirectiveUndelegate\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddress\x12+\n" + + "\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\fR\x06amount\"F\n" + + "\x17DirectiveCollectRewards\x12+\n" + + "\x11delegator_address\x18\x01 \x01(\tR\x10delegatorAddressB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Harmony_proto_rawDescOnce sync.Once + file_Harmony_proto_rawDescData []byte +) + +func file_Harmony_proto_rawDescGZIP() []byte { + file_Harmony_proto_rawDescOnce.Do(func() { + file_Harmony_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Harmony_proto_rawDesc), len(file_Harmony_proto_rawDesc))) + }) + return file_Harmony_proto_rawDescData +} + +var file_Harmony_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_Harmony_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Harmony.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Harmony.Proto.SigningOutput + (*TransactionMessage)(nil), // 2: TW.Harmony.Proto.TransactionMessage + (*StakingMessage)(nil), // 3: TW.Harmony.Proto.StakingMessage + (*Description)(nil), // 4: TW.Harmony.Proto.Description + (*Decimal)(nil), // 5: TW.Harmony.Proto.Decimal + (*CommissionRate)(nil), // 6: TW.Harmony.Proto.CommissionRate + (*DirectiveCreateValidator)(nil), // 7: TW.Harmony.Proto.DirectiveCreateValidator + (*DirectiveEditValidator)(nil), // 8: TW.Harmony.Proto.DirectiveEditValidator + (*DirectiveDelegate)(nil), // 9: TW.Harmony.Proto.DirectiveDelegate + (*DirectiveUndelegate)(nil), // 10: TW.Harmony.Proto.DirectiveUndelegate + (*DirectiveCollectRewards)(nil), // 11: TW.Harmony.Proto.DirectiveCollectRewards + (common.SigningError)(0), // 12: TW.Common.Proto.SigningError +} +var file_Harmony_proto_depIdxs = []int32{ + 2, // 0: TW.Harmony.Proto.SigningInput.transaction_message:type_name -> TW.Harmony.Proto.TransactionMessage + 3, // 1: TW.Harmony.Proto.SigningInput.staking_message:type_name -> TW.Harmony.Proto.StakingMessage + 12, // 2: TW.Harmony.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 7, // 3: TW.Harmony.Proto.StakingMessage.create_validator_message:type_name -> TW.Harmony.Proto.DirectiveCreateValidator + 8, // 4: TW.Harmony.Proto.StakingMessage.edit_validator_message:type_name -> TW.Harmony.Proto.DirectiveEditValidator + 9, // 5: TW.Harmony.Proto.StakingMessage.delegate_message:type_name -> TW.Harmony.Proto.DirectiveDelegate + 10, // 6: TW.Harmony.Proto.StakingMessage.undelegate_message:type_name -> TW.Harmony.Proto.DirectiveUndelegate + 11, // 7: TW.Harmony.Proto.StakingMessage.collect_rewards:type_name -> TW.Harmony.Proto.DirectiveCollectRewards + 5, // 8: TW.Harmony.Proto.CommissionRate.rate:type_name -> TW.Harmony.Proto.Decimal + 5, // 9: TW.Harmony.Proto.CommissionRate.max_rate:type_name -> TW.Harmony.Proto.Decimal + 5, // 10: TW.Harmony.Proto.CommissionRate.max_change_rate:type_name -> TW.Harmony.Proto.Decimal + 4, // 11: TW.Harmony.Proto.DirectiveCreateValidator.description:type_name -> TW.Harmony.Proto.Description + 6, // 12: TW.Harmony.Proto.DirectiveCreateValidator.commission_rates:type_name -> TW.Harmony.Proto.CommissionRate + 4, // 13: TW.Harmony.Proto.DirectiveEditValidator.description:type_name -> TW.Harmony.Proto.Description + 5, // 14: TW.Harmony.Proto.DirectiveEditValidator.commission_rate:type_name -> TW.Harmony.Proto.Decimal + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_Harmony_proto_init() } +func file_Harmony_proto_init() { + if File_Harmony_proto != nil { + return + } + file_Harmony_proto_msgTypes[0].OneofWrappers = []any{ + (*SigningInput_TransactionMessage)(nil), + (*SigningInput_StakingMessage)(nil), + } + file_Harmony_proto_msgTypes[3].OneofWrappers = []any{ + (*StakingMessage_CreateValidatorMessage)(nil), + (*StakingMessage_EditValidatorMessage)(nil), + (*StakingMessage_DelegateMessage)(nil), + (*StakingMessage_UndelegateMessage)(nil), + (*StakingMessage_CollectRewards)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Harmony_proto_rawDesc), len(file_Harmony_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Harmony_proto_goTypes, + DependencyIndexes: file_Harmony_proto_depIdxs, + MessageInfos: file_Harmony_proto_msgTypes, + }.Build() + File_Harmony_proto = out.File + file_Harmony_proto_goTypes = nil + file_Harmony_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/hedera/Hedera.pb.go b/wrapper/go-wrapper/protos/hedera/Hedera.pb.go new file mode 100644 index 00000000000..1f92578c8d9 --- /dev/null +++ b/wrapper/go-wrapper/protos/hedera/Hedera.pb.go @@ -0,0 +1,551 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Hedera.proto + +package hedera + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// An exact date and time. This is the same data structure as the protobuf Timestamp.proto +// (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto) +type Timestamp struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Number of complete seconds since the start of the epoch + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Number of nanoseconds since the start of the last second + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Timestamp) Reset() { + *x = Timestamp{} + mi := &file_Hedera_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Timestamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Timestamp) ProtoMessage() {} + +func (x *Timestamp) ProtoReflect() protoreflect.Message { + mi := &file_Hedera_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. +func (*Timestamp) Descriptor() ([]byte, []int) { + return file_Hedera_proto_rawDescGZIP(), []int{0} +} + +func (x *Timestamp) GetSeconds() int64 { + if x != nil { + return x.Seconds + } + return 0 +} + +func (x *Timestamp) GetNanos() int32 { + if x != nil { + return x.Nanos + } + return 0 +} + +// The ID for a transaction. This is used for retrieving receipts and records for a transaction, for +// appending to a file right after creating it, for instantiating a smart contract with bytecode in +// a file just created, and internally by the network for detecting when duplicate transactions are +// submitted. A user might get a transaction processed faster by submitting it to N nodes, each with +// a different node account, but all with the same TransactionID. Then, the transaction will take +// effect when the first of all those nodes submits the transaction and it reaches consensus. The +// other transactions will not take effect. So this could make the transaction take effect faster, +// if any given node might be slow. However, the full transaction fee is charged for each +// transaction, so the total fee is N times as much if the transaction is sent to N nodes. +// +// Applicable to Scheduled Transactions: +// - The ID of a Scheduled Transaction has transactionValidStart and accountIDs inherited from the +// ScheduleCreate transaction that created it. That is to say that they are equal +// - The scheduled property is true for Scheduled Transactions +// - transactionValidStart, accountID and scheduled properties should be omitted +type TransactionID struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid + TransactionValidStart *Timestamp `protobuf:"bytes,1,opt,name=transactionValidStart,proto3" json:"transactionValidStart,omitempty"` + // The Account ID that paid for this transaction + AccountID string `protobuf:"bytes,2,opt,name=accountID,proto3" json:"accountID,omitempty"` + // Whether the Transaction is of type Scheduled or no + Scheduled bool `protobuf:"varint,3,opt,name=scheduled,proto3" json:"scheduled,omitempty"` + // The identifier for an internal transaction that was spawned as part + // of handling a user transaction. (These internal transactions share the + // transactionValidStart and accountID of the user transaction, so a + // nonce is necessary to give them a unique TransactionID.) + // + // An example is when a "parent" ContractCreate or ContractCall transaction + // calls one or more HTS precompiled contracts; each of the "child" transactions spawned for a precompile has a id + // with a different nonce. + Nonce int32 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionID) Reset() { + *x = TransactionID{} + mi := &file_Hedera_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionID) ProtoMessage() {} + +func (x *TransactionID) ProtoReflect() protoreflect.Message { + mi := &file_Hedera_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionID.ProtoReflect.Descriptor instead. +func (*TransactionID) Descriptor() ([]byte, []int) { + return file_Hedera_proto_rawDescGZIP(), []int{1} +} + +func (x *TransactionID) GetTransactionValidStart() *Timestamp { + if x != nil { + return x.TransactionValidStart + } + return nil +} + +func (x *TransactionID) GetAccountID() string { + if x != nil { + return x.AccountID + } + return "" +} + +func (x *TransactionID) GetScheduled() bool { + if x != nil { + return x.Scheduled + } + return false +} + +func (x *TransactionID) GetNonce() int32 { + if x != nil { + return x.Nonce + } + return 0 +} + +// Necessary fields to process a TransferMessage +type TransferMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Source Account address (string) + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // Destination Account address (string) + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // Amount to be transferred (sint64) + Amount int64 `protobuf:"zigzag64,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferMessage) Reset() { + *x = TransferMessage{} + mi := &file_Hedera_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferMessage) ProtoMessage() {} + +func (x *TransferMessage) ProtoReflect() protoreflect.Message { + mi := &file_Hedera_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferMessage.ProtoReflect.Descriptor instead. +func (*TransferMessage) Descriptor() ([]byte, []int) { + return file_Hedera_proto_rawDescGZIP(), []int{2} +} + +func (x *TransferMessage) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *TransferMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TransferMessage) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// A single transaction. All transaction types are possible here. +type TransactionBody struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ID for this transaction, which includes the payer's account (the account paying the transaction fee). + // If two transactions have the same transactionID, they won't both have an effect + TransactionID *TransactionID `protobuf:"bytes,1,opt,name=transactionID,proto3" json:"transactionID,omitempty"` + // The account of the node that submits the client's transaction to the network + NodeAccountID string `protobuf:"bytes,2,opt,name=nodeAccountID,proto3" json:"nodeAccountID,omitempty"` + // The maximum transaction fee the client is willing to pay + TransactionFee uint64 `protobuf:"varint,3,opt,name=transactionFee,proto3" json:"transactionFee,omitempty"` + // The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + transactionValidDuration + TransactionValidDuration int64 `protobuf:"varint,4,opt,name=transactionValidDuration,proto3" json:"transactionValidDuration,omitempty"` + // Any notes or descriptions that should be put into the record (max length 100) + Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` + // The choices here are arranged by service in roughly lexicographical order. The field ordinals are non-sequential, + // and a result of the historical order of implementation. + // + // Types that are valid to be assigned to Data: + // + // *TransactionBody_Transfer + Data isTransactionBody_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionBody) Reset() { + *x = TransactionBody{} + mi := &file_Hedera_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionBody) ProtoMessage() {} + +func (x *TransactionBody) ProtoReflect() protoreflect.Message { + mi := &file_Hedera_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionBody.ProtoReflect.Descriptor instead. +func (*TransactionBody) Descriptor() ([]byte, []int) { + return file_Hedera_proto_rawDescGZIP(), []int{3} +} + +func (x *TransactionBody) GetTransactionID() *TransactionID { + if x != nil { + return x.TransactionID + } + return nil +} + +func (x *TransactionBody) GetNodeAccountID() string { + if x != nil { + return x.NodeAccountID + } + return "" +} + +func (x *TransactionBody) GetTransactionFee() uint64 { + if x != nil { + return x.TransactionFee + } + return 0 +} + +func (x *TransactionBody) GetTransactionValidDuration() int64 { + if x != nil { + return x.TransactionValidDuration + } + return 0 +} + +func (x *TransactionBody) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *TransactionBody) GetData() isTransactionBody_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *TransactionBody) GetTransfer() *TransferMessage { + if x != nil { + if x, ok := x.Data.(*TransactionBody_Transfer); ok { + return x.Transfer + } + } + return nil +} + +type isTransactionBody_Data interface { + isTransactionBody_Data() +} + +type TransactionBody_Transfer struct { + // Transfer amount between accounts + Transfer *TransferMessage `protobuf:"bytes,6,opt,name=transfer,proto3,oneof"` +} + +func (*TransactionBody_Transfer) isTransactionBody_Data() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Private key to sign the transaction (bytes) + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The transaction body + Body *TransactionBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Hedera_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Hedera_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Hedera_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetBody() *TransactionBody { + if x != nil { + return x.Body + } + return nil +} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Hedera_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Hedera_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Hedera_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +var File_Hedera_proto protoreflect.FileDescriptor + +const file_Hedera_proto_rawDesc = "" + + "\n" + + "\fHedera.proto\x12\x0fTW.Hedera.Proto\";\n" + + "\tTimestamp\x12\x18\n" + + "\aseconds\x18\x01 \x01(\x03R\aseconds\x12\x14\n" + + "\x05nanos\x18\x02 \x01(\x05R\x05nanos\"\xb3\x01\n" + + "\rTransactionID\x12P\n" + + "\x15transactionValidStart\x18\x01 \x01(\v2\x1a.TW.Hedera.Proto.TimestampR\x15transactionValidStart\x12\x1c\n" + + "\taccountID\x18\x02 \x01(\tR\taccountID\x12\x1c\n" + + "\tscheduled\x18\x03 \x01(\bR\tscheduled\x12\x14\n" + + "\x05nonce\x18\x04 \x01(\x05R\x05nonce\"M\n" + + "\x0fTransferMessage\x12\x12\n" + + "\x04from\x18\x01 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x12R\x06amount\"\xbd\x02\n" + + "\x0fTransactionBody\x12D\n" + + "\rtransactionID\x18\x01 \x01(\v2\x1e.TW.Hedera.Proto.TransactionIDR\rtransactionID\x12$\n" + + "\rnodeAccountID\x18\x02 \x01(\tR\rnodeAccountID\x12&\n" + + "\x0etransactionFee\x18\x03 \x01(\x04R\x0etransactionFee\x12:\n" + + "\x18transactionValidDuration\x18\x04 \x01(\x03R\x18transactionValidDuration\x12\x12\n" + + "\x04memo\x18\x05 \x01(\tR\x04memo\x12>\n" + + "\btransfer\x18\x06 \x01(\v2 .TW.Hedera.Proto.TransferMessageH\x00R\btransferB\x06\n" + + "\x04data\"e\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x124\n" + + "\x04body\x18\x02 \x01(\v2 .TW.Hedera.Proto.TransactionBodyR\x04body\")\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencodedB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Hedera_proto_rawDescOnce sync.Once + file_Hedera_proto_rawDescData []byte +) + +func file_Hedera_proto_rawDescGZIP() []byte { + file_Hedera_proto_rawDescOnce.Do(func() { + file_Hedera_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Hedera_proto_rawDesc), len(file_Hedera_proto_rawDesc))) + }) + return file_Hedera_proto_rawDescData +} + +var file_Hedera_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_Hedera_proto_goTypes = []any{ + (*Timestamp)(nil), // 0: TW.Hedera.Proto.Timestamp + (*TransactionID)(nil), // 1: TW.Hedera.Proto.TransactionID + (*TransferMessage)(nil), // 2: TW.Hedera.Proto.TransferMessage + (*TransactionBody)(nil), // 3: TW.Hedera.Proto.TransactionBody + (*SigningInput)(nil), // 4: TW.Hedera.Proto.SigningInput + (*SigningOutput)(nil), // 5: TW.Hedera.Proto.SigningOutput +} +var file_Hedera_proto_depIdxs = []int32{ + 0, // 0: TW.Hedera.Proto.TransactionID.transactionValidStart:type_name -> TW.Hedera.Proto.Timestamp + 1, // 1: TW.Hedera.Proto.TransactionBody.transactionID:type_name -> TW.Hedera.Proto.TransactionID + 2, // 2: TW.Hedera.Proto.TransactionBody.transfer:type_name -> TW.Hedera.Proto.TransferMessage + 3, // 3: TW.Hedera.Proto.SigningInput.body:type_name -> TW.Hedera.Proto.TransactionBody + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_Hedera_proto_init() } +func file_Hedera_proto_init() { + if File_Hedera_proto != nil { + return + } + file_Hedera_proto_msgTypes[3].OneofWrappers = []any{ + (*TransactionBody_Transfer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Hedera_proto_rawDesc), len(file_Hedera_proto_rawDesc)), + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Hedera_proto_goTypes, + DependencyIndexes: file_Hedera_proto_depIdxs, + MessageInfos: file_Hedera_proto_msgTypes, + }.Build() + File_Hedera_proto = out.File + file_Hedera_proto_goTypes = nil + file_Hedera_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/icon/Icon.pb.go b/wrapper/go-wrapper/protos/icon/Icon.pb.go new file mode 100644 index 00000000000..99633d9a847 --- /dev/null +++ b/wrapper/go-wrapper/protos/icon/Icon.pb.go @@ -0,0 +1,281 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Icon.proto + +package icon + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address. + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // Recipient address. + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Transfer amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // The amount of step to send with the transaction. + StepLimit []byte `protobuf:"bytes,4,opt,name=step_limit,json=stepLimit,proto3" json:"step_limit,omitempty"` + // UNIX epoch time (from 1970.1.1 00:00:00) in microseconds + Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Integer value increased by request to avoid replay attacks. + Nonce []byte `protobuf:"bytes,6,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Network identifier + NetworkId []byte `protobuf:"bytes,7,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,8,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Icon_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Icon_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Icon_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *SigningInput) GetStepLimit() []byte { + if x != nil { + return x.StepLimit + } + return nil +} + +func (x *SigningInput) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SigningInput) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *SigningInput) GetNetworkId() []byte { + if x != nil { + return x.NetworkId + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // JSON-encoded transaction parameters. + Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Signature. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // error description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Icon_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Icon_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Icon_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() string { + if x != nil { + return x.Encoded + } + return "" +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +var File_Icon_proto protoreflect.FileDescriptor + +const file_Icon_proto_rawDesc = "" + + "\n" + + "\n" + + "Icon.proto\x12\rTW.Icon.Proto\x1a\fCommon.proto\"\xf9\x01\n" + + "\fSigningInput\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12\x14\n" + + "\x05value\x18\x03 \x01(\fR\x05value\x12\x1d\n" + + "\n" + + "step_limit\x18\x04 \x01(\fR\tstepLimit\x12\x1c\n" + + "\ttimestamp\x18\x05 \x01(\x03R\ttimestamp\x12\x14\n" + + "\x05nonce\x18\x06 \x01(\fR\x05nonce\x12\x1d\n" + + "\n" + + "network_id\x18\a \x01(\fR\tnetworkId\x12\x1f\n" + + "\vprivate_key\x18\b \x01(\fR\n" + + "privateKey\"\xa1\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\tR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x123\n" + + "\x05error\x18\x04 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05errorB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Icon_proto_rawDescOnce sync.Once + file_Icon_proto_rawDescData []byte +) + +func file_Icon_proto_rawDescGZIP() []byte { + file_Icon_proto_rawDescOnce.Do(func() { + file_Icon_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Icon_proto_rawDesc), len(file_Icon_proto_rawDesc))) + }) + return file_Icon_proto_rawDescData +} + +var file_Icon_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Icon_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Icon.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Icon.Proto.SigningOutput + (common.SigningError)(0), // 2: TW.Common.Proto.SigningError +} +var file_Icon_proto_depIdxs = []int32{ + 2, // 0: TW.Icon.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Icon_proto_init() } +func file_Icon_proto_init() { + if File_Icon_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Icon_proto_rawDesc), len(file_Icon_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Icon_proto_goTypes, + DependencyIndexes: file_Icon_proto_depIdxs, + MessageInfos: file_Icon_proto_msgTypes, + }.Build() + File_Icon_proto = out.File + file_Icon_proto_goTypes = nil + file_Icon_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/internetcomputer/InternetComputer.pb.go b/wrapper/go-wrapper/protos/internetcomputer/InternetComputer.pb.go new file mode 100644 index 00000000000..24a60c19893 --- /dev/null +++ b/wrapper/go-wrapper/protos/internetcomputer/InternetComputer.pb.go @@ -0,0 +1,371 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: InternetComputer.proto + +package internetcomputer + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Internet Computer Transactions +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Payload transfer + // + // Types that are valid to be assigned to TransactionOneof: + // + // *Transaction_Transfer_ + TransactionOneof isTransaction_TransactionOneof `protobuf_oneof:"transaction_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_InternetComputer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_InternetComputer_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_InternetComputer_proto_rawDescGZIP(), []int{0} +} + +func (x *Transaction) GetTransactionOneof() isTransaction_TransactionOneof { + if x != nil { + return x.TransactionOneof + } + return nil +} + +func (x *Transaction) GetTransfer() *Transaction_Transfer { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Transfer_); ok { + return x.Transfer + } + } + return nil +} + +type isTransaction_TransactionOneof interface { + isTransaction_TransactionOneof() +} + +type Transaction_Transfer_ struct { + Transfer *Transaction_Transfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"` +} + +func (*Transaction_Transfer_) isTransaction_TransactionOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_InternetComputer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_InternetComputer_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_InternetComputer_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + // NOTE: Before sending to the Rosetta node, this value should be hex-encoded before using with the JSON structure. + SignedTransaction []byte `protobuf:"bytes,1,opt,name=signed_transaction,json=signedTransaction,proto3" json:"signed_transaction,omitempty"` + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_InternetComputer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_InternetComputer_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_InternetComputer_proto_rawDescGZIP(), []int{2} +} + +func (x *SigningOutput) GetSignedTransaction() []byte { + if x != nil { + return x.SignedTransaction + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// ICP ledger transfer arguments +type Transaction_Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + ToAccountIdentifier string `protobuf:"bytes,1,opt,name=to_account_identifier,json=toAccountIdentifier,proto3" json:"to_account_identifier,omitempty"` + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + Memo uint64 `protobuf:"varint,3,opt,name=memo,proto3" json:"memo,omitempty"` + CurrentTimestampNanos uint64 `protobuf:"varint,4,opt,name=current_timestamp_nanos,json=currentTimestampNanos,proto3" json:"current_timestamp_nanos,omitempty"` + PermittedDrift uint64 `protobuf:"varint,5,opt,name=permitted_drift,json=permittedDrift,proto3" json:"permitted_drift,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_Transfer) Reset() { + *x = Transaction_Transfer{} + mi := &file_InternetComputer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_Transfer) ProtoMessage() {} + +func (x *Transaction_Transfer) ProtoReflect() protoreflect.Message { + mi := &file_InternetComputer_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_Transfer) Descriptor() ([]byte, []int) { + return file_InternetComputer_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Transaction_Transfer) GetToAccountIdentifier() string { + if x != nil { + return x.ToAccountIdentifier + } + return "" +} + +func (x *Transaction_Transfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Transaction_Transfer) GetMemo() uint64 { + if x != nil { + return x.Memo + } + return 0 +} + +func (x *Transaction_Transfer) GetCurrentTimestampNanos() uint64 { + if x != nil { + return x.CurrentTimestampNanos + } + return 0 +} + +func (x *Transaction_Transfer) GetPermittedDrift() uint64 { + if x != nil { + return x.PermittedDrift + } + return 0 +} + +var File_InternetComputer_proto protoreflect.FileDescriptor + +const file_InternetComputer_proto_rawDesc = "" + + "\n" + + "\x16InternetComputer.proto\x12\x19TW.InternetComputer.Proto\x1a\fCommon.proto\"\xbf\x02\n" + + "\vTransaction\x12M\n" + + "\btransfer\x18\x01 \x01(\v2/.TW.InternetComputer.Proto.Transaction.TransferH\x00R\btransfer\x1a\xcb\x01\n" + + "\bTransfer\x122\n" + + "\x15to_account_identifier\x18\x01 \x01(\tR\x13toAccountIdentifier\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x12\x12\n" + + "\x04memo\x18\x03 \x01(\x04R\x04memo\x126\n" + + "\x17current_timestamp_nanos\x18\x04 \x01(\x04R\x15currentTimestampNanos\x12'\n" + + "\x0fpermitted_drift\x18\x05 \x01(\x04R\x0epermittedDriftB\x13\n" + + "\x11transaction_oneof\"y\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12H\n" + + "\vtransaction\x18\x02 \x01(\v2&.TW.InternetComputer.Proto.TransactionR\vtransaction\"\x98\x01\n" + + "\rSigningOutput\x12-\n" + + "\x12signed_transaction\x18\x01 \x01(\fR\x11signedTransaction\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_InternetComputer_proto_rawDescOnce sync.Once + file_InternetComputer_proto_rawDescData []byte +) + +func file_InternetComputer_proto_rawDescGZIP() []byte { + file_InternetComputer_proto_rawDescOnce.Do(func() { + file_InternetComputer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_InternetComputer_proto_rawDesc), len(file_InternetComputer_proto_rawDesc))) + }) + return file_InternetComputer_proto_rawDescData +} + +var file_InternetComputer_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_InternetComputer_proto_goTypes = []any{ + (*Transaction)(nil), // 0: TW.InternetComputer.Proto.Transaction + (*SigningInput)(nil), // 1: TW.InternetComputer.Proto.SigningInput + (*SigningOutput)(nil), // 2: TW.InternetComputer.Proto.SigningOutput + (*Transaction_Transfer)(nil), // 3: TW.InternetComputer.Proto.Transaction.Transfer + (common.SigningError)(0), // 4: TW.Common.Proto.SigningError +} +var file_InternetComputer_proto_depIdxs = []int32{ + 3, // 0: TW.InternetComputer.Proto.Transaction.transfer:type_name -> TW.InternetComputer.Proto.Transaction.Transfer + 0, // 1: TW.InternetComputer.Proto.SigningInput.transaction:type_name -> TW.InternetComputer.Proto.Transaction + 4, // 2: TW.InternetComputer.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_InternetComputer_proto_init() } +func file_InternetComputer_proto_init() { + if File_InternetComputer_proto != nil { + return + } + file_InternetComputer_proto_msgTypes[0].OneofWrappers = []any{ + (*Transaction_Transfer_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_InternetComputer_proto_rawDesc), len(file_InternetComputer_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_InternetComputer_proto_goTypes, + DependencyIndexes: file_InternetComputer_proto_depIdxs, + MessageInfos: file_InternetComputer_proto_msgTypes, + }.Build() + File_InternetComputer_proto = out.File + file_InternetComputer_proto_goTypes = nil + file_InternetComputer_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/iost/IOST.pb.go b/wrapper/go-wrapper/protos/iost/IOST.pb.go new file mode 100644 index 00000000000..6763d94069f --- /dev/null +++ b/wrapper/go-wrapper/protos/iost/IOST.pb.go @@ -0,0 +1,740 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: IOST.proto + +package iost + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The enumeration defines the signature algorithm. +type Algorithm int32 + +const ( + // unknown + Algorithm_UNKNOWN Algorithm = 0 + // secp256k1 + Algorithm_SECP256K1 Algorithm = 1 + // ed25519 + Algorithm_ED25519 Algorithm = 2 +) + +// Enum value maps for Algorithm. +var ( + Algorithm_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SECP256K1", + 2: "ED25519", + } + Algorithm_value = map[string]int32{ + "UNKNOWN": 0, + "SECP256K1": 1, + "ED25519": 2, + } +) + +func (x Algorithm) Enum() *Algorithm { + p := new(Algorithm) + *p = x + return p +} + +func (x Algorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Algorithm) Descriptor() protoreflect.EnumDescriptor { + return file_IOST_proto_enumTypes[0].Descriptor() +} + +func (Algorithm) Type() protoreflect.EnumType { + return &file_IOST_proto_enumTypes[0] +} + +func (x Algorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Algorithm.Descriptor instead. +func (Algorithm) EnumDescriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{0} +} + +// The message defines transaction action struct. +type Action struct { + state protoimpl.MessageState `protogen:"open.v1"` + // contract name + Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` + // action name + ActionName string `protobuf:"bytes,2,opt,name=action_name,json=actionName,proto3" json:"action_name,omitempty"` + // data + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action) Reset() { + *x = Action{} + mi := &file_IOST_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action) ProtoMessage() {} + +func (x *Action) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action.ProtoReflect.Descriptor instead. +func (*Action) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{0} +} + +func (x *Action) GetContract() string { + if x != nil { + return x.Contract + } + return "" +} + +func (x *Action) GetActionName() string { + if x != nil { + return x.ActionName + } + return "" +} + +func (x *Action) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +// The message defines transaction amount limit struct. +type AmountLimit struct { + state protoimpl.MessageState `protogen:"open.v1"` + // token name + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // limit value + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AmountLimit) Reset() { + *x = AmountLimit{} + mi := &file_IOST_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AmountLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AmountLimit) ProtoMessage() {} + +func (x *AmountLimit) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AmountLimit.ProtoReflect.Descriptor instead. +func (*AmountLimit) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{1} +} + +func (x *AmountLimit) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *AmountLimit) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// The message defines signature struct. +type Signature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // signature algorithm + Algorithm Algorithm `protobuf:"varint,1,opt,name=algorithm,proto3,enum=TW.IOST.Proto.Algorithm" json:"algorithm,omitempty"` + // signature bytes + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // public key + PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Signature) Reset() { + *x = Signature{} + mi := &file_IOST_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature) ProtoMessage() {} + +func (x *Signature) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{2} +} + +func (x *Signature) GetAlgorithm() Algorithm { + if x != nil { + return x.Algorithm + } + return Algorithm_UNKNOWN +} + +func (x *Signature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *Signature) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// The message defines the transaction request. +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // transaction timestamp + Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` + // expiration timestamp + Expiration int64 `protobuf:"varint,2,opt,name=expiration,proto3" json:"expiration,omitempty"` + // gas price + GasRatio float64 `protobuf:"fixed64,3,opt,name=gas_ratio,json=gasRatio,proto3" json:"gas_ratio,omitempty"` + // gas limit + GasLimit float64 `protobuf:"fixed64,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // delay nanoseconds + Delay int64 `protobuf:"varint,5,opt,name=delay,proto3" json:"delay,omitempty"` + // chain id + ChainId uint32 `protobuf:"varint,6,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // action list + Actions []*Action `protobuf:"bytes,7,rep,name=actions,proto3" json:"actions,omitempty"` + // amount limit + AmountLimit []*AmountLimit `protobuf:"bytes,8,rep,name=amount_limit,json=amountLimit,proto3" json:"amount_limit,omitempty"` + // signer list + Signers []string `protobuf:"bytes,9,rep,name=signers,proto3" json:"signers,omitempty"` + // signatures of signers + Signatures []*Signature `protobuf:"bytes,10,rep,name=signatures,proto3" json:"signatures,omitempty"` + // publisher + Publisher string `protobuf:"bytes,11,opt,name=publisher,proto3" json:"publisher,omitempty"` + // signatures of publisher + PublisherSigs []*Signature `protobuf:"bytes,12,rep,name=publisher_sigs,json=publisherSigs,proto3" json:"publisher_sigs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_IOST_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{3} +} + +func (x *Transaction) GetTime() int64 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *Transaction) GetExpiration() int64 { + if x != nil { + return x.Expiration + } + return 0 +} + +func (x *Transaction) GetGasRatio() float64 { + if x != nil { + return x.GasRatio + } + return 0 +} + +func (x *Transaction) GetGasLimit() float64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *Transaction) GetDelay() int64 { + if x != nil { + return x.Delay + } + return 0 +} + +func (x *Transaction) GetChainId() uint32 { + if x != nil { + return x.ChainId + } + return 0 +} + +func (x *Transaction) GetActions() []*Action { + if x != nil { + return x.Actions + } + return nil +} + +func (x *Transaction) GetAmountLimit() []*AmountLimit { + if x != nil { + return x.AmountLimit + } + return nil +} + +func (x *Transaction) GetSigners() []string { + if x != nil { + return x.Signers + } + return nil +} + +func (x *Transaction) GetSignatures() []*Signature { + if x != nil { + return x.Signatures + } + return nil +} + +func (x *Transaction) GetPublisher() string { + if x != nil { + return x.Publisher + } + return "" +} + +func (x *Transaction) GetPublisherSigs() []*Signature { + if x != nil { + return x.PublisherSigs + } + return nil +} + +type AccountInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ActiveKey []byte `protobuf:"bytes,2,opt,name=active_key,json=activeKey,proto3" json:"active_key,omitempty"` + OwnerKey []byte `protobuf:"bytes,3,opt,name=owner_key,json=ownerKey,proto3" json:"owner_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountInfo) Reset() { + *x = AccountInfo{} + mi := &file_IOST_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfo) ProtoMessage() {} + +func (x *AccountInfo) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. +func (*AccountInfo) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{4} +} + +func (x *AccountInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AccountInfo) GetActiveKey() []byte { + if x != nil { + return x.ActiveKey + } + return nil +} + +func (x *AccountInfo) GetOwnerKey() []byte { + if x != nil { + return x.OwnerKey + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account *AccountInfo `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + TransactionTemplate *Transaction `protobuf:"bytes,2,opt,name=transaction_template,json=transactionTemplate,proto3" json:"transaction_template,omitempty"` + TransferDestination string `protobuf:"bytes,3,opt,name=transfer_destination,json=transferDestination,proto3" json:"transfer_destination,omitempty"` + TransferAmount string `protobuf:"bytes,4,opt,name=transfer_amount,json=transferAmount,proto3" json:"transfer_amount,omitempty"` + TransferMemo string `protobuf:"bytes,5,opt,name=transfer_memo,json=transferMemo,proto3" json:"transfer_memo,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_IOST_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningInput) GetAccount() *AccountInfo { + if x != nil { + return x.Account + } + return nil +} + +func (x *SigningInput) GetTransactionTemplate() *Transaction { + if x != nil { + return x.TransactionTemplate + } + return nil +} + +func (x *SigningInput) GetTransferDestination() string { + if x != nil { + return x.TransferDestination + } + return "" +} + +func (x *SigningInput) GetTransferAmount() string { + if x != nil { + return x.TransferAmount + } + return "" +} + +func (x *SigningInput) GetTransferMemo() string { + if x != nil { + return x.TransferMemo + } + return "" +} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed transaction + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_IOST_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_IOST_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_IOST_proto_rawDescGZIP(), []int{6} +} + +func (x *SigningOutput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_IOST_proto protoreflect.FileDescriptor + +const file_IOST_proto_rawDesc = "" + + "\n" + + "\n" + + "IOST.proto\x12\rTW.IOST.Proto\x1a\fCommon.proto\"Y\n" + + "\x06Action\x12\x1a\n" + + "\bcontract\x18\x01 \x01(\tR\bcontract\x12\x1f\n" + + "\vaction_name\x18\x02 \x01(\tR\n" + + "actionName\x12\x12\n" + + "\x04data\x18\x03 \x01(\tR\x04data\"9\n" + + "\vAmountLimit\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\"\x80\x01\n" + + "\tSignature\x126\n" + + "\talgorithm\x18\x01 \x01(\x0e2\x18.TW.IOST.Proto.AlgorithmR\talgorithm\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12\x1d\n" + + "\n" + + "public_key\x18\x03 \x01(\fR\tpublicKey\"\xcf\x03\n" + + "\vTransaction\x12\x12\n" + + "\x04time\x18\x01 \x01(\x03R\x04time\x12\x1e\n" + + "\n" + + "expiration\x18\x02 \x01(\x03R\n" + + "expiration\x12\x1b\n" + + "\tgas_ratio\x18\x03 \x01(\x01R\bgasRatio\x12\x1b\n" + + "\tgas_limit\x18\x04 \x01(\x01R\bgasLimit\x12\x14\n" + + "\x05delay\x18\x05 \x01(\x03R\x05delay\x12\x19\n" + + "\bchain_id\x18\x06 \x01(\rR\achainId\x12/\n" + + "\aactions\x18\a \x03(\v2\x15.TW.IOST.Proto.ActionR\aactions\x12=\n" + + "\famount_limit\x18\b \x03(\v2\x1a.TW.IOST.Proto.AmountLimitR\vamountLimit\x12\x18\n" + + "\asigners\x18\t \x03(\tR\asigners\x128\n" + + "\n" + + "signatures\x18\n" + + " \x03(\v2\x18.TW.IOST.Proto.SignatureR\n" + + "signatures\x12\x1c\n" + + "\tpublisher\x18\v \x01(\tR\tpublisher\x12?\n" + + "\x0epublisher_sigs\x18\f \x03(\v2\x18.TW.IOST.Proto.SignatureR\rpublisherSigs\"]\n" + + "\vAccountInfo\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" + + "\n" + + "active_key\x18\x02 \x01(\fR\tactiveKey\x12\x1b\n" + + "\towner_key\x18\x03 \x01(\fR\bownerKey\"\x94\x02\n" + + "\fSigningInput\x124\n" + + "\aaccount\x18\x01 \x01(\v2\x1a.TW.IOST.Proto.AccountInfoR\aaccount\x12M\n" + + "\x14transaction_template\x18\x02 \x01(\v2\x1a.TW.IOST.Proto.TransactionR\x13transactionTemplate\x121\n" + + "\x14transfer_destination\x18\x03 \x01(\tR\x13transferDestination\x12'\n" + + "\x0ftransfer_amount\x18\x04 \x01(\tR\x0etransferAmount\x12#\n" + + "\rtransfer_memo\x18\x05 \x01(\tR\ftransferMemo\"\xc1\x01\n" + + "\rSigningOutput\x12<\n" + + "\vtransaction\x18\x01 \x01(\v2\x1a.TW.IOST.Proto.TransactionR\vtransaction\x12\x18\n" + + "\aencoded\x18\x02 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage*4\n" + + "\tAlgorithm\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\r\n" + + "\tSECP256K1\x10\x01\x12\v\n" + + "\aED25519\x10\x02B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_IOST_proto_rawDescOnce sync.Once + file_IOST_proto_rawDescData []byte +) + +func file_IOST_proto_rawDescGZIP() []byte { + file_IOST_proto_rawDescOnce.Do(func() { + file_IOST_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_IOST_proto_rawDesc), len(file_IOST_proto_rawDesc))) + }) + return file_IOST_proto_rawDescData +} + +var file_IOST_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_IOST_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_IOST_proto_goTypes = []any{ + (Algorithm)(0), // 0: TW.IOST.Proto.Algorithm + (*Action)(nil), // 1: TW.IOST.Proto.Action + (*AmountLimit)(nil), // 2: TW.IOST.Proto.AmountLimit + (*Signature)(nil), // 3: TW.IOST.Proto.Signature + (*Transaction)(nil), // 4: TW.IOST.Proto.Transaction + (*AccountInfo)(nil), // 5: TW.IOST.Proto.AccountInfo + (*SigningInput)(nil), // 6: TW.IOST.Proto.SigningInput + (*SigningOutput)(nil), // 7: TW.IOST.Proto.SigningOutput + (common.SigningError)(0), // 8: TW.Common.Proto.SigningError +} +var file_IOST_proto_depIdxs = []int32{ + 0, // 0: TW.IOST.Proto.Signature.algorithm:type_name -> TW.IOST.Proto.Algorithm + 1, // 1: TW.IOST.Proto.Transaction.actions:type_name -> TW.IOST.Proto.Action + 2, // 2: TW.IOST.Proto.Transaction.amount_limit:type_name -> TW.IOST.Proto.AmountLimit + 3, // 3: TW.IOST.Proto.Transaction.signatures:type_name -> TW.IOST.Proto.Signature + 3, // 4: TW.IOST.Proto.Transaction.publisher_sigs:type_name -> TW.IOST.Proto.Signature + 5, // 5: TW.IOST.Proto.SigningInput.account:type_name -> TW.IOST.Proto.AccountInfo + 4, // 6: TW.IOST.Proto.SigningInput.transaction_template:type_name -> TW.IOST.Proto.Transaction + 4, // 7: TW.IOST.Proto.SigningOutput.transaction:type_name -> TW.IOST.Proto.Transaction + 8, // 8: TW.IOST.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_IOST_proto_init() } +func file_IOST_proto_init() { + if File_IOST_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_IOST_proto_rawDesc), len(file_IOST_proto_rawDesc)), + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_IOST_proto_goTypes, + DependencyIndexes: file_IOST_proto_depIdxs, + EnumInfos: file_IOST_proto_enumTypes, + MessageInfos: file_IOST_proto_msgTypes, + }.Build() + File_IOST_proto = out.File + file_IOST_proto_goTypes = nil + file_IOST_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/iotex/IoTeX.pb.go b/wrapper/go-wrapper/protos/iotex/IoTeX.pb.go new file mode 100644 index 00000000000..a03ae325cac --- /dev/null +++ b/wrapper/go-wrapper/protos/iotex/IoTeX.pb.go @@ -0,0 +1,1843 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: IoTeX.proto + +package iotex + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A transfer +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount (as string) + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Destination address + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Payload data + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_IoTeX_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{0} +} + +func (x *Transfer) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Transfer) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *Transfer) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// A Staking message +type Staking struct { + state protoimpl.MessageState `protogen:"open.v1"` + // the payload message + // + // Types that are valid to be assigned to Message: + // + // *Staking_StakeCreate + // *Staking_StakeUnstake + // *Staking_StakeWithdraw + // *Staking_StakeAddDeposit + // *Staking_StakeRestake + // *Staking_StakeChangeCandidate + // *Staking_StakeTransferOwnership + // *Staking_CandidateRegister_ + // *Staking_CandidateUpdate + Message isStaking_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking) Reset() { + *x = Staking{} + mi := &file_IoTeX_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking) ProtoMessage() {} + +func (x *Staking) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking.ProtoReflect.Descriptor instead. +func (*Staking) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1} +} + +func (x *Staking) GetMessage() isStaking_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *Staking) GetStakeCreate() *Staking_Create { + if x != nil { + if x, ok := x.Message.(*Staking_StakeCreate); ok { + return x.StakeCreate + } + } + return nil +} + +func (x *Staking) GetStakeUnstake() *Staking_Reclaim { + if x != nil { + if x, ok := x.Message.(*Staking_StakeUnstake); ok { + return x.StakeUnstake + } + } + return nil +} + +func (x *Staking) GetStakeWithdraw() *Staking_Reclaim { + if x != nil { + if x, ok := x.Message.(*Staking_StakeWithdraw); ok { + return x.StakeWithdraw + } + } + return nil +} + +func (x *Staking) GetStakeAddDeposit() *Staking_AddDeposit { + if x != nil { + if x, ok := x.Message.(*Staking_StakeAddDeposit); ok { + return x.StakeAddDeposit + } + } + return nil +} + +func (x *Staking) GetStakeRestake() *Staking_Restake { + if x != nil { + if x, ok := x.Message.(*Staking_StakeRestake); ok { + return x.StakeRestake + } + } + return nil +} + +func (x *Staking) GetStakeChangeCandidate() *Staking_ChangeCandidate { + if x != nil { + if x, ok := x.Message.(*Staking_StakeChangeCandidate); ok { + return x.StakeChangeCandidate + } + } + return nil +} + +func (x *Staking) GetStakeTransferOwnership() *Staking_TransferOwnership { + if x != nil { + if x, ok := x.Message.(*Staking_StakeTransferOwnership); ok { + return x.StakeTransferOwnership + } + } + return nil +} + +func (x *Staking) GetCandidateRegister() *Staking_CandidateRegister { + if x != nil { + if x, ok := x.Message.(*Staking_CandidateRegister_); ok { + return x.CandidateRegister + } + } + return nil +} + +func (x *Staking) GetCandidateUpdate() *Staking_CandidateBasicInfo { + if x != nil { + if x, ok := x.Message.(*Staking_CandidateUpdate); ok { + return x.CandidateUpdate + } + } + return nil +} + +type isStaking_Message interface { + isStaking_Message() +} + +type Staking_StakeCreate struct { + StakeCreate *Staking_Create `protobuf:"bytes,1,opt,name=stakeCreate,proto3,oneof"` +} + +type Staking_StakeUnstake struct { + StakeUnstake *Staking_Reclaim `protobuf:"bytes,2,opt,name=stakeUnstake,proto3,oneof"` +} + +type Staking_StakeWithdraw struct { + StakeWithdraw *Staking_Reclaim `protobuf:"bytes,3,opt,name=stakeWithdraw,proto3,oneof"` +} + +type Staking_StakeAddDeposit struct { + StakeAddDeposit *Staking_AddDeposit `protobuf:"bytes,4,opt,name=stakeAddDeposit,proto3,oneof"` +} + +type Staking_StakeRestake struct { + StakeRestake *Staking_Restake `protobuf:"bytes,5,opt,name=stakeRestake,proto3,oneof"` +} + +type Staking_StakeChangeCandidate struct { + StakeChangeCandidate *Staking_ChangeCandidate `protobuf:"bytes,6,opt,name=stakeChangeCandidate,proto3,oneof"` +} + +type Staking_StakeTransferOwnership struct { + StakeTransferOwnership *Staking_TransferOwnership `protobuf:"bytes,7,opt,name=stakeTransferOwnership,proto3,oneof"` +} + +type Staking_CandidateRegister_ struct { + CandidateRegister *Staking_CandidateRegister `protobuf:"bytes,8,opt,name=candidateRegister,proto3,oneof"` +} + +type Staking_CandidateUpdate struct { + CandidateUpdate *Staking_CandidateBasicInfo `protobuf:"bytes,9,opt,name=candidateUpdate,proto3,oneof"` +} + +func (*Staking_StakeCreate) isStaking_Message() {} + +func (*Staking_StakeUnstake) isStaking_Message() {} + +func (*Staking_StakeWithdraw) isStaking_Message() {} + +func (*Staking_StakeAddDeposit) isStaking_Message() {} + +func (*Staking_StakeRestake) isStaking_Message() {} + +func (*Staking_StakeChangeCandidate) isStaking_Message() {} + +func (*Staking_StakeTransferOwnership) isStaking_Message() {} + +func (*Staking_CandidateRegister_) isStaking_Message() {} + +func (*Staking_CandidateUpdate) isStaking_Message() {} + +// Arbitrary contract call +type ContractCall struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // contract address + Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` + // payload data + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContractCall) Reset() { + *x = ContractCall{} + mi := &file_IoTeX_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContractCall) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractCall) ProtoMessage() {} + +func (x *ContractCall) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContractCall.ProtoReflect.Descriptor instead. +func (*ContractCall) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{2} +} + +func (x *ContractCall) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *ContractCall) GetContract() string { + if x != nil { + return x.Contract + } + return "" +} + +func (x *ContractCall) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction version + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Limit for the gas used + GasLimit uint64 `protobuf:"varint,3,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` + // Gas price + GasPrice string `protobuf:"bytes,4,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"` + // The chain id of blockchain + ChainID uint32 `protobuf:"varint,5,opt,name=chainID,proto3" json:"chainID,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,6,opt,name=privateKey,proto3" json:"privateKey,omitempty"` + // Payload transfer + // + // Types that are valid to be assigned to Action: + // + // *SigningInput_Transfer + // *SigningInput_Call + // *SigningInput_StakeCreate + // *SigningInput_StakeUnstake + // *SigningInput_StakeWithdraw + // *SigningInput_StakeAddDeposit + // *SigningInput_StakeRestake + // *SigningInput_StakeChangeCandidate + // *SigningInput_StakeTransferOwnership + // *SigningInput_CandidateRegister + // *SigningInput_CandidateUpdate + Action isSigningInput_Action `protobuf_oneof:"action"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_IoTeX_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningInput) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *SigningInput) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *SigningInput) GetChainID() uint32 { + if x != nil { + return x.ChainID + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetAction() isSigningInput_Action { + if x != nil { + return x.Action + } + return nil +} + +func (x *SigningInput) GetTransfer() *Transfer { + if x != nil { + if x, ok := x.Action.(*SigningInput_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *SigningInput) GetCall() *ContractCall { + if x != nil { + if x, ok := x.Action.(*SigningInput_Call); ok { + return x.Call + } + } + return nil +} + +func (x *SigningInput) GetStakeCreate() *Staking_Create { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeCreate); ok { + return x.StakeCreate + } + } + return nil +} + +func (x *SigningInput) GetStakeUnstake() *Staking_Reclaim { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeUnstake); ok { + return x.StakeUnstake + } + } + return nil +} + +func (x *SigningInput) GetStakeWithdraw() *Staking_Reclaim { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeWithdraw); ok { + return x.StakeWithdraw + } + } + return nil +} + +func (x *SigningInput) GetStakeAddDeposit() *Staking_AddDeposit { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeAddDeposit); ok { + return x.StakeAddDeposit + } + } + return nil +} + +func (x *SigningInput) GetStakeRestake() *Staking_Restake { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeRestake); ok { + return x.StakeRestake + } + } + return nil +} + +func (x *SigningInput) GetStakeChangeCandidate() *Staking_ChangeCandidate { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeChangeCandidate); ok { + return x.StakeChangeCandidate + } + } + return nil +} + +func (x *SigningInput) GetStakeTransferOwnership() *Staking_TransferOwnership { + if x != nil { + if x, ok := x.Action.(*SigningInput_StakeTransferOwnership); ok { + return x.StakeTransferOwnership + } + } + return nil +} + +func (x *SigningInput) GetCandidateRegister() *Staking_CandidateRegister { + if x != nil { + if x, ok := x.Action.(*SigningInput_CandidateRegister); ok { + return x.CandidateRegister + } + } + return nil +} + +func (x *SigningInput) GetCandidateUpdate() *Staking_CandidateBasicInfo { + if x != nil { + if x, ok := x.Action.(*SigningInput_CandidateUpdate); ok { + return x.CandidateUpdate + } + } + return nil +} + +type isSigningInput_Action interface { + isSigningInput_Action() +} + +type SigningInput_Transfer struct { + Transfer *Transfer `protobuf:"bytes,10,opt,name=transfer,proto3,oneof"` +} + +type SigningInput_Call struct { + Call *ContractCall `protobuf:"bytes,12,opt,name=call,proto3,oneof"` +} + +type SigningInput_StakeCreate struct { + // Native staking + StakeCreate *Staking_Create `protobuf:"bytes,40,opt,name=stakeCreate,proto3,oneof"` +} + +type SigningInput_StakeUnstake struct { + StakeUnstake *Staking_Reclaim `protobuf:"bytes,41,opt,name=stakeUnstake,proto3,oneof"` +} + +type SigningInput_StakeWithdraw struct { + StakeWithdraw *Staking_Reclaim `protobuf:"bytes,42,opt,name=stakeWithdraw,proto3,oneof"` +} + +type SigningInput_StakeAddDeposit struct { + StakeAddDeposit *Staking_AddDeposit `protobuf:"bytes,43,opt,name=stakeAddDeposit,proto3,oneof"` +} + +type SigningInput_StakeRestake struct { + StakeRestake *Staking_Restake `protobuf:"bytes,44,opt,name=stakeRestake,proto3,oneof"` +} + +type SigningInput_StakeChangeCandidate struct { + StakeChangeCandidate *Staking_ChangeCandidate `protobuf:"bytes,45,opt,name=stakeChangeCandidate,proto3,oneof"` +} + +type SigningInput_StakeTransferOwnership struct { + StakeTransferOwnership *Staking_TransferOwnership `protobuf:"bytes,46,opt,name=stakeTransferOwnership,proto3,oneof"` +} + +type SigningInput_CandidateRegister struct { + CandidateRegister *Staking_CandidateRegister `protobuf:"bytes,47,opt,name=candidateRegister,proto3,oneof"` +} + +type SigningInput_CandidateUpdate struct { + CandidateUpdate *Staking_CandidateBasicInfo `protobuf:"bytes,48,opt,name=candidateUpdate,proto3,oneof"` +} + +func (*SigningInput_Transfer) isSigningInput_Action() {} + +func (*SigningInput_Call) isSigningInput_Action() {} + +func (*SigningInput_StakeCreate) isSigningInput_Action() {} + +func (*SigningInput_StakeUnstake) isSigningInput_Action() {} + +func (*SigningInput_StakeWithdraw) isSigningInput_Action() {} + +func (*SigningInput_StakeAddDeposit) isSigningInput_Action() {} + +func (*SigningInput_StakeRestake) isSigningInput_Action() {} + +func (*SigningInput_StakeChangeCandidate) isSigningInput_Action() {} + +func (*SigningInput_StakeTransferOwnership) isSigningInput_Action() {} + +func (*SigningInput_CandidateRegister) isSigningInput_Action() {} + +func (*SigningInput_CandidateUpdate) isSigningInput_Action() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded Action bytes + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Signed Action hash + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_IoTeX_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// An Action structure +// Used internally +type ActionCore struct { + state protoimpl.MessageState `protogen:"open.v1"` + // version number + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Gas limit + GasLimit uint64 `protobuf:"varint,3,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` + // Gas price + GasPrice string `protobuf:"bytes,4,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"` + // Chain ID + ChainID uint32 `protobuf:"varint,5,opt,name=chainID,proto3" json:"chainID,omitempty"` + // action payload + // + // Types that are valid to be assigned to Action: + // + // *ActionCore_Transfer + // *ActionCore_Execution + // *ActionCore_StakeCreate + // *ActionCore_StakeUnstake + // *ActionCore_StakeWithdraw + // *ActionCore_StakeAddDeposit + // *ActionCore_StakeRestake + // *ActionCore_StakeChangeCandidate + // *ActionCore_StakeTransferOwnership + // *ActionCore_CandidateRegister + // *ActionCore_CandidateUpdate + Action isActionCore_Action `protobuf_oneof:"action"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionCore) Reset() { + *x = ActionCore{} + mi := &file_IoTeX_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionCore) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionCore) ProtoMessage() {} + +func (x *ActionCore) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionCore.ProtoReflect.Descriptor instead. +func (*ActionCore) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{5} +} + +func (x *ActionCore) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *ActionCore) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *ActionCore) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *ActionCore) GetGasPrice() string { + if x != nil { + return x.GasPrice + } + return "" +} + +func (x *ActionCore) GetChainID() uint32 { + if x != nil { + return x.ChainID + } + return 0 +} + +func (x *ActionCore) GetAction() isActionCore_Action { + if x != nil { + return x.Action + } + return nil +} + +func (x *ActionCore) GetTransfer() *Transfer { + if x != nil { + if x, ok := x.Action.(*ActionCore_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *ActionCore) GetExecution() *ContractCall { + if x != nil { + if x, ok := x.Action.(*ActionCore_Execution); ok { + return x.Execution + } + } + return nil +} + +func (x *ActionCore) GetStakeCreate() *Staking_Create { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeCreate); ok { + return x.StakeCreate + } + } + return nil +} + +func (x *ActionCore) GetStakeUnstake() *Staking_Reclaim { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeUnstake); ok { + return x.StakeUnstake + } + } + return nil +} + +func (x *ActionCore) GetStakeWithdraw() *Staking_Reclaim { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeWithdraw); ok { + return x.StakeWithdraw + } + } + return nil +} + +func (x *ActionCore) GetStakeAddDeposit() *Staking_AddDeposit { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeAddDeposit); ok { + return x.StakeAddDeposit + } + } + return nil +} + +func (x *ActionCore) GetStakeRestake() *Staking_Restake { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeRestake); ok { + return x.StakeRestake + } + } + return nil +} + +func (x *ActionCore) GetStakeChangeCandidate() *Staking_ChangeCandidate { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeChangeCandidate); ok { + return x.StakeChangeCandidate + } + } + return nil +} + +func (x *ActionCore) GetStakeTransferOwnership() *Staking_TransferOwnership { + if x != nil { + if x, ok := x.Action.(*ActionCore_StakeTransferOwnership); ok { + return x.StakeTransferOwnership + } + } + return nil +} + +func (x *ActionCore) GetCandidateRegister() *Staking_CandidateRegister { + if x != nil { + if x, ok := x.Action.(*ActionCore_CandidateRegister); ok { + return x.CandidateRegister + } + } + return nil +} + +func (x *ActionCore) GetCandidateUpdate() *Staking_CandidateBasicInfo { + if x != nil { + if x, ok := x.Action.(*ActionCore_CandidateUpdate); ok { + return x.CandidateUpdate + } + } + return nil +} + +type isActionCore_Action interface { + isActionCore_Action() +} + +type ActionCore_Transfer struct { + Transfer *Transfer `protobuf:"bytes,10,opt,name=transfer,proto3,oneof"` +} + +type ActionCore_Execution struct { + Execution *ContractCall `protobuf:"bytes,12,opt,name=execution,proto3,oneof"` +} + +type ActionCore_StakeCreate struct { + // Native staking + StakeCreate *Staking_Create `protobuf:"bytes,40,opt,name=stakeCreate,proto3,oneof"` +} + +type ActionCore_StakeUnstake struct { + StakeUnstake *Staking_Reclaim `protobuf:"bytes,41,opt,name=stakeUnstake,proto3,oneof"` +} + +type ActionCore_StakeWithdraw struct { + StakeWithdraw *Staking_Reclaim `protobuf:"bytes,42,opt,name=stakeWithdraw,proto3,oneof"` +} + +type ActionCore_StakeAddDeposit struct { + StakeAddDeposit *Staking_AddDeposit `protobuf:"bytes,43,opt,name=stakeAddDeposit,proto3,oneof"` +} + +type ActionCore_StakeRestake struct { + StakeRestake *Staking_Restake `protobuf:"bytes,44,opt,name=stakeRestake,proto3,oneof"` +} + +type ActionCore_StakeChangeCandidate struct { + StakeChangeCandidate *Staking_ChangeCandidate `protobuf:"bytes,45,opt,name=stakeChangeCandidate,proto3,oneof"` +} + +type ActionCore_StakeTransferOwnership struct { + StakeTransferOwnership *Staking_TransferOwnership `protobuf:"bytes,46,opt,name=stakeTransferOwnership,proto3,oneof"` +} + +type ActionCore_CandidateRegister struct { + CandidateRegister *Staking_CandidateRegister `protobuf:"bytes,47,opt,name=candidateRegister,proto3,oneof"` +} + +type ActionCore_CandidateUpdate struct { + CandidateUpdate *Staking_CandidateBasicInfo `protobuf:"bytes,48,opt,name=candidateUpdate,proto3,oneof"` +} + +func (*ActionCore_Transfer) isActionCore_Action() {} + +func (*ActionCore_Execution) isActionCore_Action() {} + +func (*ActionCore_StakeCreate) isActionCore_Action() {} + +func (*ActionCore_StakeUnstake) isActionCore_Action() {} + +func (*ActionCore_StakeWithdraw) isActionCore_Action() {} + +func (*ActionCore_StakeAddDeposit) isActionCore_Action() {} + +func (*ActionCore_StakeRestake) isActionCore_Action() {} + +func (*ActionCore_StakeChangeCandidate) isActionCore_Action() {} + +func (*ActionCore_StakeTransferOwnership) isActionCore_Action() {} + +func (*ActionCore_CandidateRegister) isActionCore_Action() {} + +func (*ActionCore_CandidateUpdate) isActionCore_Action() {} + +// Signed Action +// Used internally +type Action struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Action details + Core *ActionCore `protobuf:"bytes,1,opt,name=core,proto3" json:"core,omitempty"` + // public key + SenderPubKey []byte `protobuf:"bytes,2,opt,name=senderPubKey,proto3" json:"senderPubKey,omitempty"` + // the signature + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action) Reset() { + *x = Action{} + mi := &file_IoTeX_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action) ProtoMessage() {} + +func (x *Action) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action.ProtoReflect.Descriptor instead. +func (*Action) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{6} +} + +func (x *Action) GetCore() *ActionCore { + if x != nil { + return x.Core + } + return nil +} + +func (x *Action) GetSenderPubKey() []byte { + if x != nil { + return x.SenderPubKey + } + return nil +} + +func (x *Action) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +// create stake +type Staking_Create struct { + state protoimpl.MessageState `protogen:"open.v1"` + // validator name + CandidateName string `protobuf:"bytes,1,opt,name=candidateName,proto3" json:"candidateName,omitempty"` + // amount to be staked + StakedAmount string `protobuf:"bytes,2,opt,name=stakedAmount,proto3" json:"stakedAmount,omitempty"` + // duration + StakedDuration uint32 `protobuf:"varint,3,opt,name=stakedDuration,proto3" json:"stakedDuration,omitempty"` + // auto-restake + AutoStake bool `protobuf:"varint,4,opt,name=autoStake,proto3" json:"autoStake,omitempty"` + // payload data + Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Create) Reset() { + *x = Staking_Create{} + mi := &file_IoTeX_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Create) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Create) ProtoMessage() {} + +func (x *Staking_Create) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Create.ProtoReflect.Descriptor instead. +func (*Staking_Create) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Staking_Create) GetCandidateName() string { + if x != nil { + return x.CandidateName + } + return "" +} + +func (x *Staking_Create) GetStakedAmount() string { + if x != nil { + return x.StakedAmount + } + return "" +} + +func (x *Staking_Create) GetStakedDuration() uint32 { + if x != nil { + return x.StakedDuration + } + return 0 +} + +func (x *Staking_Create) GetAutoStake() bool { + if x != nil { + return x.AutoStake + } + return false +} + +func (x *Staking_Create) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// unstake or withdraw +type Staking_Reclaim struct { + state protoimpl.MessageState `protogen:"open.v1"` + // index to claim + BucketIndex uint64 `protobuf:"varint,1,opt,name=bucketIndex,proto3" json:"bucketIndex,omitempty"` + // payload data + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Reclaim) Reset() { + *x = Staking_Reclaim{} + mi := &file_IoTeX_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Reclaim) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Reclaim) ProtoMessage() {} + +func (x *Staking_Reclaim) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Reclaim.ProtoReflect.Descriptor instead. +func (*Staking_Reclaim) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *Staking_Reclaim) GetBucketIndex() uint64 { + if x != nil { + return x.BucketIndex + } + return 0 +} + +func (x *Staking_Reclaim) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// add the amount of bucket +type Staking_AddDeposit struct { + state protoimpl.MessageState `protogen:"open.v1"` + // index + BucketIndex uint64 `protobuf:"varint,1,opt,name=bucketIndex,proto3" json:"bucketIndex,omitempty"` + // amount to add + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + // payload data + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_AddDeposit) Reset() { + *x = Staking_AddDeposit{} + mi := &file_IoTeX_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_AddDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_AddDeposit) ProtoMessage() {} + +func (x *Staking_AddDeposit) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_AddDeposit.ProtoReflect.Descriptor instead. +func (*Staking_AddDeposit) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *Staking_AddDeposit) GetBucketIndex() uint64 { + if x != nil { + return x.BucketIndex + } + return 0 +} + +func (x *Staking_AddDeposit) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Staking_AddDeposit) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// restake the duration and autoStake flag of bucket +type Staking_Restake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // index + BucketIndex uint64 `protobuf:"varint,1,opt,name=bucketIndex,proto3" json:"bucketIndex,omitempty"` + // stake duration + StakedDuration uint32 `protobuf:"varint,2,opt,name=stakedDuration,proto3" json:"stakedDuration,omitempty"` + // auto re-stake + AutoStake bool `protobuf:"varint,3,opt,name=autoStake,proto3" json:"autoStake,omitempty"` + // payload data + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Restake) Reset() { + *x = Staking_Restake{} + mi := &file_IoTeX_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Restake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Restake) ProtoMessage() {} + +func (x *Staking_Restake) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Restake.ProtoReflect.Descriptor instead. +func (*Staking_Restake) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 3} +} + +func (x *Staking_Restake) GetBucketIndex() uint64 { + if x != nil { + return x.BucketIndex + } + return 0 +} + +func (x *Staking_Restake) GetStakedDuration() uint32 { + if x != nil { + return x.StakedDuration + } + return 0 +} + +func (x *Staking_Restake) GetAutoStake() bool { + if x != nil { + return x.AutoStake + } + return false +} + +func (x *Staking_Restake) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// move the bucket to vote for another candidate or transfer the ownership of bucket to another voters +type Staking_ChangeCandidate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // index + BucketIndex uint64 `protobuf:"varint,1,opt,name=bucketIndex,proto3" json:"bucketIndex,omitempty"` + // validator name + CandidateName string `protobuf:"bytes,2,opt,name=candidateName,proto3" json:"candidateName,omitempty"` + // payload data + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_ChangeCandidate) Reset() { + *x = Staking_ChangeCandidate{} + mi := &file_IoTeX_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_ChangeCandidate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_ChangeCandidate) ProtoMessage() {} + +func (x *Staking_ChangeCandidate) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_ChangeCandidate.ProtoReflect.Descriptor instead. +func (*Staking_ChangeCandidate) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 4} +} + +func (x *Staking_ChangeCandidate) GetBucketIndex() uint64 { + if x != nil { + return x.BucketIndex + } + return 0 +} + +func (x *Staking_ChangeCandidate) GetCandidateName() string { + if x != nil { + return x.CandidateName + } + return "" +} + +func (x *Staking_ChangeCandidate) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// transfer ownserhip of stake +type Staking_TransferOwnership struct { + state protoimpl.MessageState `protogen:"open.v1"` + // index + BucketIndex uint64 `protobuf:"varint,1,opt,name=bucketIndex,proto3" json:"bucketIndex,omitempty"` + // address of voter + VoterAddress string `protobuf:"bytes,2,opt,name=voterAddress,proto3" json:"voterAddress,omitempty"` + // payload data + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_TransferOwnership) Reset() { + *x = Staking_TransferOwnership{} + mi := &file_IoTeX_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_TransferOwnership) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_TransferOwnership) ProtoMessage() {} + +func (x *Staking_TransferOwnership) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_TransferOwnership.ProtoReflect.Descriptor instead. +func (*Staking_TransferOwnership) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 5} +} + +func (x *Staking_TransferOwnership) GetBucketIndex() uint64 { + if x != nil { + return x.BucketIndex + } + return 0 +} + +func (x *Staking_TransferOwnership) GetVoterAddress() string { + if x != nil { + return x.VoterAddress + } + return "" +} + +func (x *Staking_TransferOwnership) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// Candidate (validator) info +type Staking_CandidateBasicInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + OperatorAddress string `protobuf:"bytes,2,opt,name=operatorAddress,proto3" json:"operatorAddress,omitempty"` + RewardAddress string `protobuf:"bytes,3,opt,name=rewardAddress,proto3" json:"rewardAddress,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_CandidateBasicInfo) Reset() { + *x = Staking_CandidateBasicInfo{} + mi := &file_IoTeX_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_CandidateBasicInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_CandidateBasicInfo) ProtoMessage() {} + +func (x *Staking_CandidateBasicInfo) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_CandidateBasicInfo.ProtoReflect.Descriptor instead. +func (*Staking_CandidateBasicInfo) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 6} +} + +func (x *Staking_CandidateBasicInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Staking_CandidateBasicInfo) GetOperatorAddress() string { + if x != nil { + return x.OperatorAddress + } + return "" +} + +func (x *Staking_CandidateBasicInfo) GetRewardAddress() string { + if x != nil { + return x.RewardAddress + } + return "" +} + +// Register a Candidate +type Staking_CandidateRegister struct { + state protoimpl.MessageState `protogen:"open.v1"` + Candidate *Staking_CandidateBasicInfo `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"` + StakedAmount string `protobuf:"bytes,2,opt,name=stakedAmount,proto3" json:"stakedAmount,omitempty"` + StakedDuration uint32 `protobuf:"varint,3,opt,name=stakedDuration,proto3" json:"stakedDuration,omitempty"` + AutoStake bool `protobuf:"varint,4,opt,name=autoStake,proto3" json:"autoStake,omitempty"` + OwnerAddress string `protobuf:"bytes,5,opt,name=ownerAddress,proto3" json:"ownerAddress,omitempty"` // if ownerAddress is absent, owner of candidate is the sender + Payload []byte `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_CandidateRegister) Reset() { + *x = Staking_CandidateRegister{} + mi := &file_IoTeX_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_CandidateRegister) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_CandidateRegister) ProtoMessage() {} + +func (x *Staking_CandidateRegister) ProtoReflect() protoreflect.Message { + mi := &file_IoTeX_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_CandidateRegister.ProtoReflect.Descriptor instead. +func (*Staking_CandidateRegister) Descriptor() ([]byte, []int) { + return file_IoTeX_proto_rawDescGZIP(), []int{1, 7} +} + +func (x *Staking_CandidateRegister) GetCandidate() *Staking_CandidateBasicInfo { + if x != nil { + return x.Candidate + } + return nil +} + +func (x *Staking_CandidateRegister) GetStakedAmount() string { + if x != nil { + return x.StakedAmount + } + return "" +} + +func (x *Staking_CandidateRegister) GetStakedDuration() uint32 { + if x != nil { + return x.StakedDuration + } + return 0 +} + +func (x *Staking_CandidateRegister) GetAutoStake() bool { + if x != nil { + return x.AutoStake + } + return false +} + +func (x *Staking_CandidateRegister) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *Staking_CandidateRegister) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +var File_IoTeX_proto protoreflect.FileDescriptor + +const file_IoTeX_proto_rawDesc = "" + + "\n" + + "\vIoTeX.proto\x12\x0eTW.IoTeX.Proto\x1a\fCommon.proto\"Z\n" + + "\bTransfer\x12\x16\n" + + "\x06amount\x18\x01 \x01(\tR\x06amount\x12\x1c\n" + + "\trecipient\x18\x02 \x01(\tR\trecipient\x12\x18\n" + + "\apayload\x18\x03 \x01(\fR\apayload\"\xce\x0e\n" + + "\aStaking\x12B\n" + + "\vstakeCreate\x18\x01 \x01(\v2\x1e.TW.IoTeX.Proto.Staking.CreateH\x00R\vstakeCreate\x12E\n" + + "\fstakeUnstake\x18\x02 \x01(\v2\x1f.TW.IoTeX.Proto.Staking.ReclaimH\x00R\fstakeUnstake\x12G\n" + + "\rstakeWithdraw\x18\x03 \x01(\v2\x1f.TW.IoTeX.Proto.Staking.ReclaimH\x00R\rstakeWithdraw\x12N\n" + + "\x0fstakeAddDeposit\x18\x04 \x01(\v2\".TW.IoTeX.Proto.Staking.AddDepositH\x00R\x0fstakeAddDeposit\x12E\n" + + "\fstakeRestake\x18\x05 \x01(\v2\x1f.TW.IoTeX.Proto.Staking.RestakeH\x00R\fstakeRestake\x12]\n" + + "\x14stakeChangeCandidate\x18\x06 \x01(\v2'.TW.IoTeX.Proto.Staking.ChangeCandidateH\x00R\x14stakeChangeCandidate\x12c\n" + + "\x16stakeTransferOwnership\x18\a \x01(\v2).TW.IoTeX.Proto.Staking.TransferOwnershipH\x00R\x16stakeTransferOwnership\x12Y\n" + + "\x11candidateRegister\x18\b \x01(\v2).TW.IoTeX.Proto.Staking.CandidateRegisterH\x00R\x11candidateRegister\x12V\n" + + "\x0fcandidateUpdate\x18\t \x01(\v2*.TW.IoTeX.Proto.Staking.CandidateBasicInfoH\x00R\x0fcandidateUpdate\x1a\xb2\x01\n" + + "\x06Create\x12$\n" + + "\rcandidateName\x18\x01 \x01(\tR\rcandidateName\x12\"\n" + + "\fstakedAmount\x18\x02 \x01(\tR\fstakedAmount\x12&\n" + + "\x0estakedDuration\x18\x03 \x01(\rR\x0estakedDuration\x12\x1c\n" + + "\tautoStake\x18\x04 \x01(\bR\tautoStake\x12\x18\n" + + "\apayload\x18\x05 \x01(\fR\apayload\x1aE\n" + + "\aReclaim\x12 \n" + + "\vbucketIndex\x18\x01 \x01(\x04R\vbucketIndex\x12\x18\n" + + "\apayload\x18\x02 \x01(\fR\apayload\x1a`\n" + + "\n" + + "AddDeposit\x12 \n" + + "\vbucketIndex\x18\x01 \x01(\x04R\vbucketIndex\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\x12\x18\n" + + "\apayload\x18\x03 \x01(\fR\apayload\x1a\x8b\x01\n" + + "\aRestake\x12 \n" + + "\vbucketIndex\x18\x01 \x01(\x04R\vbucketIndex\x12&\n" + + "\x0estakedDuration\x18\x02 \x01(\rR\x0estakedDuration\x12\x1c\n" + + "\tautoStake\x18\x03 \x01(\bR\tautoStake\x12\x18\n" + + "\apayload\x18\x04 \x01(\fR\apayload\x1as\n" + + "\x0fChangeCandidate\x12 \n" + + "\vbucketIndex\x18\x01 \x01(\x04R\vbucketIndex\x12$\n" + + "\rcandidateName\x18\x02 \x01(\tR\rcandidateName\x12\x18\n" + + "\apayload\x18\x03 \x01(\fR\apayload\x1as\n" + + "\x11TransferOwnership\x12 \n" + + "\vbucketIndex\x18\x01 \x01(\x04R\vbucketIndex\x12\"\n" + + "\fvoterAddress\x18\x02 \x01(\tR\fvoterAddress\x12\x18\n" + + "\apayload\x18\x03 \x01(\fR\apayload\x1ax\n" + + "\x12CandidateBasicInfo\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12(\n" + + "\x0foperatorAddress\x18\x02 \x01(\tR\x0foperatorAddress\x12$\n" + + "\rrewardAddress\x18\x03 \x01(\tR\rrewardAddress\x1a\x85\x02\n" + + "\x11CandidateRegister\x12H\n" + + "\tcandidate\x18\x01 \x01(\v2*.TW.IoTeX.Proto.Staking.CandidateBasicInfoR\tcandidate\x12\"\n" + + "\fstakedAmount\x18\x02 \x01(\tR\fstakedAmount\x12&\n" + + "\x0estakedDuration\x18\x03 \x01(\rR\x0estakedDuration\x12\x1c\n" + + "\tautoStake\x18\x04 \x01(\bR\tautoStake\x12\"\n" + + "\fownerAddress\x18\x05 \x01(\tR\fownerAddress\x12\x18\n" + + "\apayload\x18\x06 \x01(\fR\apayloadB\t\n" + + "\amessage\"V\n" + + "\fContractCall\x12\x16\n" + + "\x06amount\x18\x01 \x01(\tR\x06amount\x12\x1a\n" + + "\bcontract\x18\x02 \x01(\tR\bcontract\x12\x12\n" + + "\x04data\x18\x03 \x01(\fR\x04data\"\x88\b\n" + + "\fSigningInput\x12\x18\n" + + "\aversion\x18\x01 \x01(\rR\aversion\x12\x14\n" + + "\x05nonce\x18\x02 \x01(\x04R\x05nonce\x12\x1a\n" + + "\bgasLimit\x18\x03 \x01(\x04R\bgasLimit\x12\x1a\n" + + "\bgasPrice\x18\x04 \x01(\tR\bgasPrice\x12\x18\n" + + "\achainID\x18\x05 \x01(\rR\achainID\x12\x1e\n" + + "\n" + + "privateKey\x18\x06 \x01(\fR\n" + + "privateKey\x126\n" + + "\btransfer\x18\n" + + " \x01(\v2\x18.TW.IoTeX.Proto.TransferH\x00R\btransfer\x122\n" + + "\x04call\x18\f \x01(\v2\x1c.TW.IoTeX.Proto.ContractCallH\x00R\x04call\x12B\n" + + "\vstakeCreate\x18( \x01(\v2\x1e.TW.IoTeX.Proto.Staking.CreateH\x00R\vstakeCreate\x12E\n" + + "\fstakeUnstake\x18) \x01(\v2\x1f.TW.IoTeX.Proto.Staking.ReclaimH\x00R\fstakeUnstake\x12G\n" + + "\rstakeWithdraw\x18* \x01(\v2\x1f.TW.IoTeX.Proto.Staking.ReclaimH\x00R\rstakeWithdraw\x12N\n" + + "\x0fstakeAddDeposit\x18+ \x01(\v2\".TW.IoTeX.Proto.Staking.AddDepositH\x00R\x0fstakeAddDeposit\x12E\n" + + "\fstakeRestake\x18, \x01(\v2\x1f.TW.IoTeX.Proto.Staking.RestakeH\x00R\fstakeRestake\x12]\n" + + "\x14stakeChangeCandidate\x18- \x01(\v2'.TW.IoTeX.Proto.Staking.ChangeCandidateH\x00R\x14stakeChangeCandidate\x12c\n" + + "\x16stakeTransferOwnership\x18. \x01(\v2).TW.IoTeX.Proto.Staking.TransferOwnershipH\x00R\x16stakeTransferOwnership\x12Y\n" + + "\x11candidateRegister\x18/ \x01(\v2).TW.IoTeX.Proto.Staking.CandidateRegisterH\x00R\x11candidateRegister\x12V\n" + + "\x0fcandidateUpdate\x180 \x01(\v2*.TW.IoTeX.Proto.Staking.CandidateBasicInfoH\x00R\x0fcandidateUpdateB\b\n" + + "\x06action\"\x97\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x12\n" + + "\x04hash\x18\x02 \x01(\fR\x04hash\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\xf0\a\n" + + "\n" + + "ActionCore\x12\x18\n" + + "\aversion\x18\x01 \x01(\rR\aversion\x12\x14\n" + + "\x05nonce\x18\x02 \x01(\x04R\x05nonce\x12\x1a\n" + + "\bgasLimit\x18\x03 \x01(\x04R\bgasLimit\x12\x1a\n" + + "\bgasPrice\x18\x04 \x01(\tR\bgasPrice\x12\x18\n" + + "\achainID\x18\x05 \x01(\rR\achainID\x126\n" + + "\btransfer\x18\n" + + " \x01(\v2\x18.TW.IoTeX.Proto.TransferH\x00R\btransfer\x12<\n" + + "\texecution\x18\f \x01(\v2\x1c.TW.IoTeX.Proto.ContractCallH\x00R\texecution\x12B\n" + + "\vstakeCreate\x18( \x01(\v2\x1e.TW.IoTeX.Proto.Staking.CreateH\x00R\vstakeCreate\x12E\n" + + "\fstakeUnstake\x18) \x01(\v2\x1f.TW.IoTeX.Proto.Staking.ReclaimH\x00R\fstakeUnstake\x12G\n" + + "\rstakeWithdraw\x18* \x01(\v2\x1f.TW.IoTeX.Proto.Staking.ReclaimH\x00R\rstakeWithdraw\x12N\n" + + "\x0fstakeAddDeposit\x18+ \x01(\v2\".TW.IoTeX.Proto.Staking.AddDepositH\x00R\x0fstakeAddDeposit\x12E\n" + + "\fstakeRestake\x18, \x01(\v2\x1f.TW.IoTeX.Proto.Staking.RestakeH\x00R\fstakeRestake\x12]\n" + + "\x14stakeChangeCandidate\x18- \x01(\v2'.TW.IoTeX.Proto.Staking.ChangeCandidateH\x00R\x14stakeChangeCandidate\x12c\n" + + "\x16stakeTransferOwnership\x18. \x01(\v2).TW.IoTeX.Proto.Staking.TransferOwnershipH\x00R\x16stakeTransferOwnership\x12Y\n" + + "\x11candidateRegister\x18/ \x01(\v2).TW.IoTeX.Proto.Staking.CandidateRegisterH\x00R\x11candidateRegister\x12V\n" + + "\x0fcandidateUpdate\x180 \x01(\v2*.TW.IoTeX.Proto.Staking.CandidateBasicInfoH\x00R\x0fcandidateUpdateB\b\n" + + "\x06action\"z\n" + + "\x06Action\x12.\n" + + "\x04core\x18\x01 \x01(\v2\x1a.TW.IoTeX.Proto.ActionCoreR\x04core\x12\"\n" + + "\fsenderPubKey\x18\x02 \x01(\fR\fsenderPubKey\x12\x1c\n" + + "\tsignature\x18\x03 \x01(\fR\tsignatureB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_IoTeX_proto_rawDescOnce sync.Once + file_IoTeX_proto_rawDescData []byte +) + +func file_IoTeX_proto_rawDescGZIP() []byte { + file_IoTeX_proto_rawDescOnce.Do(func() { + file_IoTeX_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_IoTeX_proto_rawDesc), len(file_IoTeX_proto_rawDesc))) + }) + return file_IoTeX_proto_rawDescData +} + +var file_IoTeX_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_IoTeX_proto_goTypes = []any{ + (*Transfer)(nil), // 0: TW.IoTeX.Proto.Transfer + (*Staking)(nil), // 1: TW.IoTeX.Proto.Staking + (*ContractCall)(nil), // 2: TW.IoTeX.Proto.ContractCall + (*SigningInput)(nil), // 3: TW.IoTeX.Proto.SigningInput + (*SigningOutput)(nil), // 4: TW.IoTeX.Proto.SigningOutput + (*ActionCore)(nil), // 5: TW.IoTeX.Proto.ActionCore + (*Action)(nil), // 6: TW.IoTeX.Proto.Action + (*Staking_Create)(nil), // 7: TW.IoTeX.Proto.Staking.Create + (*Staking_Reclaim)(nil), // 8: TW.IoTeX.Proto.Staking.Reclaim + (*Staking_AddDeposit)(nil), // 9: TW.IoTeX.Proto.Staking.AddDeposit + (*Staking_Restake)(nil), // 10: TW.IoTeX.Proto.Staking.Restake + (*Staking_ChangeCandidate)(nil), // 11: TW.IoTeX.Proto.Staking.ChangeCandidate + (*Staking_TransferOwnership)(nil), // 12: TW.IoTeX.Proto.Staking.TransferOwnership + (*Staking_CandidateBasicInfo)(nil), // 13: TW.IoTeX.Proto.Staking.CandidateBasicInfo + (*Staking_CandidateRegister)(nil), // 14: TW.IoTeX.Proto.Staking.CandidateRegister + (common.SigningError)(0), // 15: TW.Common.Proto.SigningError +} +var file_IoTeX_proto_depIdxs = []int32{ + 7, // 0: TW.IoTeX.Proto.Staking.stakeCreate:type_name -> TW.IoTeX.Proto.Staking.Create + 8, // 1: TW.IoTeX.Proto.Staking.stakeUnstake:type_name -> TW.IoTeX.Proto.Staking.Reclaim + 8, // 2: TW.IoTeX.Proto.Staking.stakeWithdraw:type_name -> TW.IoTeX.Proto.Staking.Reclaim + 9, // 3: TW.IoTeX.Proto.Staking.stakeAddDeposit:type_name -> TW.IoTeX.Proto.Staking.AddDeposit + 10, // 4: TW.IoTeX.Proto.Staking.stakeRestake:type_name -> TW.IoTeX.Proto.Staking.Restake + 11, // 5: TW.IoTeX.Proto.Staking.stakeChangeCandidate:type_name -> TW.IoTeX.Proto.Staking.ChangeCandidate + 12, // 6: TW.IoTeX.Proto.Staking.stakeTransferOwnership:type_name -> TW.IoTeX.Proto.Staking.TransferOwnership + 14, // 7: TW.IoTeX.Proto.Staking.candidateRegister:type_name -> TW.IoTeX.Proto.Staking.CandidateRegister + 13, // 8: TW.IoTeX.Proto.Staking.candidateUpdate:type_name -> TW.IoTeX.Proto.Staking.CandidateBasicInfo + 0, // 9: TW.IoTeX.Proto.SigningInput.transfer:type_name -> TW.IoTeX.Proto.Transfer + 2, // 10: TW.IoTeX.Proto.SigningInput.call:type_name -> TW.IoTeX.Proto.ContractCall + 7, // 11: TW.IoTeX.Proto.SigningInput.stakeCreate:type_name -> TW.IoTeX.Proto.Staking.Create + 8, // 12: TW.IoTeX.Proto.SigningInput.stakeUnstake:type_name -> TW.IoTeX.Proto.Staking.Reclaim + 8, // 13: TW.IoTeX.Proto.SigningInput.stakeWithdraw:type_name -> TW.IoTeX.Proto.Staking.Reclaim + 9, // 14: TW.IoTeX.Proto.SigningInput.stakeAddDeposit:type_name -> TW.IoTeX.Proto.Staking.AddDeposit + 10, // 15: TW.IoTeX.Proto.SigningInput.stakeRestake:type_name -> TW.IoTeX.Proto.Staking.Restake + 11, // 16: TW.IoTeX.Proto.SigningInput.stakeChangeCandidate:type_name -> TW.IoTeX.Proto.Staking.ChangeCandidate + 12, // 17: TW.IoTeX.Proto.SigningInput.stakeTransferOwnership:type_name -> TW.IoTeX.Proto.Staking.TransferOwnership + 14, // 18: TW.IoTeX.Proto.SigningInput.candidateRegister:type_name -> TW.IoTeX.Proto.Staking.CandidateRegister + 13, // 19: TW.IoTeX.Proto.SigningInput.candidateUpdate:type_name -> TW.IoTeX.Proto.Staking.CandidateBasicInfo + 15, // 20: TW.IoTeX.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 0, // 21: TW.IoTeX.Proto.ActionCore.transfer:type_name -> TW.IoTeX.Proto.Transfer + 2, // 22: TW.IoTeX.Proto.ActionCore.execution:type_name -> TW.IoTeX.Proto.ContractCall + 7, // 23: TW.IoTeX.Proto.ActionCore.stakeCreate:type_name -> TW.IoTeX.Proto.Staking.Create + 8, // 24: TW.IoTeX.Proto.ActionCore.stakeUnstake:type_name -> TW.IoTeX.Proto.Staking.Reclaim + 8, // 25: TW.IoTeX.Proto.ActionCore.stakeWithdraw:type_name -> TW.IoTeX.Proto.Staking.Reclaim + 9, // 26: TW.IoTeX.Proto.ActionCore.stakeAddDeposit:type_name -> TW.IoTeX.Proto.Staking.AddDeposit + 10, // 27: TW.IoTeX.Proto.ActionCore.stakeRestake:type_name -> TW.IoTeX.Proto.Staking.Restake + 11, // 28: TW.IoTeX.Proto.ActionCore.stakeChangeCandidate:type_name -> TW.IoTeX.Proto.Staking.ChangeCandidate + 12, // 29: TW.IoTeX.Proto.ActionCore.stakeTransferOwnership:type_name -> TW.IoTeX.Proto.Staking.TransferOwnership + 14, // 30: TW.IoTeX.Proto.ActionCore.candidateRegister:type_name -> TW.IoTeX.Proto.Staking.CandidateRegister + 13, // 31: TW.IoTeX.Proto.ActionCore.candidateUpdate:type_name -> TW.IoTeX.Proto.Staking.CandidateBasicInfo + 5, // 32: TW.IoTeX.Proto.Action.core:type_name -> TW.IoTeX.Proto.ActionCore + 13, // 33: TW.IoTeX.Proto.Staking.CandidateRegister.candidate:type_name -> TW.IoTeX.Proto.Staking.CandidateBasicInfo + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_IoTeX_proto_init() } +func file_IoTeX_proto_init() { + if File_IoTeX_proto != nil { + return + } + file_IoTeX_proto_msgTypes[1].OneofWrappers = []any{ + (*Staking_StakeCreate)(nil), + (*Staking_StakeUnstake)(nil), + (*Staking_StakeWithdraw)(nil), + (*Staking_StakeAddDeposit)(nil), + (*Staking_StakeRestake)(nil), + (*Staking_StakeChangeCandidate)(nil), + (*Staking_StakeTransferOwnership)(nil), + (*Staking_CandidateRegister_)(nil), + (*Staking_CandidateUpdate)(nil), + } + file_IoTeX_proto_msgTypes[3].OneofWrappers = []any{ + (*SigningInput_Transfer)(nil), + (*SigningInput_Call)(nil), + (*SigningInput_StakeCreate)(nil), + (*SigningInput_StakeUnstake)(nil), + (*SigningInput_StakeWithdraw)(nil), + (*SigningInput_StakeAddDeposit)(nil), + (*SigningInput_StakeRestake)(nil), + (*SigningInput_StakeChangeCandidate)(nil), + (*SigningInput_StakeTransferOwnership)(nil), + (*SigningInput_CandidateRegister)(nil), + (*SigningInput_CandidateUpdate)(nil), + } + file_IoTeX_proto_msgTypes[5].OneofWrappers = []any{ + (*ActionCore_Transfer)(nil), + (*ActionCore_Execution)(nil), + (*ActionCore_StakeCreate)(nil), + (*ActionCore_StakeUnstake)(nil), + (*ActionCore_StakeWithdraw)(nil), + (*ActionCore_StakeAddDeposit)(nil), + (*ActionCore_StakeRestake)(nil), + (*ActionCore_StakeChangeCandidate)(nil), + (*ActionCore_StakeTransferOwnership)(nil), + (*ActionCore_CandidateRegister)(nil), + (*ActionCore_CandidateUpdate)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_IoTeX_proto_rawDesc), len(file_IoTeX_proto_rawDesc)), + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_IoTeX_proto_goTypes, + DependencyIndexes: file_IoTeX_proto_depIdxs, + MessageInfos: file_IoTeX_proto_msgTypes, + }.Build() + File_IoTeX_proto = out.File + file_IoTeX_proto_goTypes = nil + file_IoTeX_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/multiversx/MultiversX.pb.go b/wrapper/go-wrapper/protos/multiversx/MultiversX.pb.go new file mode 100644 index 00000000000..9ebf5be3cb1 --- /dev/null +++ b/wrapper/go-wrapper/protos/multiversx/MultiversX.pb.go @@ -0,0 +1,784 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: MultiversX.proto + +package multiversx + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Generic action. Using one of the more specific actions (e.g. transfers, see below) is recommended. +type GenericAction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Accounts involved + Accounts *Accounts `protobuf:"bytes,1,opt,name=accounts,proto3" json:"accounts,omitempty"` + // amount + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // additional data + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // transaction version + Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + // Generally speaking, the "options" field can be ignored (not set) by applications using TW Core. + Options uint32 `protobuf:"varint,5,opt,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GenericAction) Reset() { + *x = GenericAction{} + mi := &file_MultiversX_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenericAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericAction) ProtoMessage() {} + +func (x *GenericAction) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericAction.ProtoReflect.Descriptor instead. +func (*GenericAction) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{0} +} + +func (x *GenericAction) GetAccounts() *Accounts { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *GenericAction) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *GenericAction) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *GenericAction) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *GenericAction) GetOptions() uint32 { + if x != nil { + return x.Options + } + return 0 +} + +// EGLD transfer (move balance). +type EGLDTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Accounts involved + Accounts *Accounts `protobuf:"bytes,1,opt,name=accounts,proto3" json:"accounts,omitempty"` + // Transfer amount (string) + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // transaction version, if empty, the default value will be used + Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EGLDTransfer) Reset() { + *x = EGLDTransfer{} + mi := &file_MultiversX_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EGLDTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EGLDTransfer) ProtoMessage() {} + +func (x *EGLDTransfer) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EGLDTransfer.ProtoReflect.Descriptor instead. +func (*EGLDTransfer) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{1} +} + +func (x *EGLDTransfer) GetAccounts() *Accounts { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *EGLDTransfer) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *EGLDTransfer) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *EGLDTransfer) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +// ESDT transfer (transfer regular ESDTs - fungible tokens). +type ESDTTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Accounts involved + Accounts *Accounts `protobuf:"bytes,1,opt,name=accounts,proto3" json:"accounts,omitempty"` + // Token ID + TokenIdentifier string `protobuf:"bytes,2,opt,name=token_identifier,json=tokenIdentifier,proto3" json:"token_identifier,omitempty"` + // Transfer token amount (string) + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // transaction version, if empty, the default value will be used + Version uint32 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ESDTTransfer) Reset() { + *x = ESDTTransfer{} + mi := &file_MultiversX_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ESDTTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ESDTTransfer) ProtoMessage() {} + +func (x *ESDTTransfer) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ESDTTransfer.ProtoReflect.Descriptor instead. +func (*ESDTTransfer) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{2} +} + +func (x *ESDTTransfer) GetAccounts() *Accounts { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *ESDTTransfer) GetTokenIdentifier() string { + if x != nil { + return x.TokenIdentifier + } + return "" +} + +func (x *ESDTTransfer) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *ESDTTransfer) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +// ESDTNFT transfer (transfer NFTs, SFTs and Meta ESDTs). +type ESDTNFTTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Accounts involved + Accounts *Accounts `protobuf:"bytes,1,opt,name=accounts,proto3" json:"accounts,omitempty"` + // tokens + TokenCollection string `protobuf:"bytes,2,opt,name=token_collection,json=tokenCollection,proto3" json:"token_collection,omitempty"` + // nonce of the token + TokenNonce uint64 `protobuf:"varint,3,opt,name=token_nonce,json=tokenNonce,proto3" json:"token_nonce,omitempty"` + // transfer amount + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // transaction version, if empty, the default value will be used + Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ESDTNFTTransfer) Reset() { + *x = ESDTNFTTransfer{} + mi := &file_MultiversX_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ESDTNFTTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ESDTNFTTransfer) ProtoMessage() {} + +func (x *ESDTNFTTransfer) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ESDTNFTTransfer.ProtoReflect.Descriptor instead. +func (*ESDTNFTTransfer) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{3} +} + +func (x *ESDTNFTTransfer) GetAccounts() *Accounts { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *ESDTNFTTransfer) GetTokenCollection() string { + if x != nil { + return x.TokenCollection + } + return "" +} + +func (x *ESDTNFTTransfer) GetTokenNonce() uint64 { + if x != nil { + return x.TokenNonce + } + return 0 +} + +func (x *ESDTNFTTransfer) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *ESDTNFTTransfer) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +// Transaction sender & receiver etc. +type Accounts struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Nonce of the sender + SenderNonce uint64 `protobuf:"varint,1,opt,name=sender_nonce,json=senderNonce,proto3" json:"sender_nonce,omitempty"` + // Sender address + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + // Sender username + SenderUsername string `protobuf:"bytes,3,opt,name=sender_username,json=senderUsername,proto3" json:"sender_username,omitempty"` + // Receiver address + Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` + // Receiver username + ReceiverUsername string `protobuf:"bytes,5,opt,name=receiver_username,json=receiverUsername,proto3" json:"receiver_username,omitempty"` + // Guardian address + Guardian string `protobuf:"bytes,6,opt,name=guardian,proto3" json:"guardian,omitempty"` + // Relayer address + Relayer string `protobuf:"bytes,7,opt,name=relayer,proto3" json:"relayer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Accounts) Reset() { + *x = Accounts{} + mi := &file_MultiversX_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Accounts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Accounts) ProtoMessage() {} + +func (x *Accounts) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Accounts.ProtoReflect.Descriptor instead. +func (*Accounts) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{4} +} + +func (x *Accounts) GetSenderNonce() uint64 { + if x != nil { + return x.SenderNonce + } + return 0 +} + +func (x *Accounts) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *Accounts) GetSenderUsername() string { + if x != nil { + return x.SenderUsername + } + return "" +} + +func (x *Accounts) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *Accounts) GetReceiverUsername() string { + if x != nil { + return x.ReceiverUsername + } + return "" +} + +func (x *Accounts) GetGuardian() string { + if x != nil { + return x.Guardian + } + return "" +} + +func (x *Accounts) GetRelayer() string { + if x != nil { + return x.Relayer + } + return "" +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Chain identifier, string + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Gas price + GasPrice uint64 `protobuf:"varint,3,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Limit for the gas used + GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // transfer payload + // + // Types that are valid to be assigned to MessageOneof: + // + // *SigningInput_GenericAction + // *SigningInput_EgldTransfer + // *SigningInput_EsdtTransfer + // *SigningInput_EsdtnftTransfer + MessageOneof isSigningInput_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_MultiversX_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *SigningInput) GetGasPrice() uint64 { + if x != nil { + return x.GasPrice + } + return 0 +} + +func (x *SigningInput) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *SigningInput) GetMessageOneof() isSigningInput_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *SigningInput) GetGenericAction() *GenericAction { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_GenericAction); ok { + return x.GenericAction + } + } + return nil +} + +func (x *SigningInput) GetEgldTransfer() *EGLDTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_EgldTransfer); ok { + return x.EgldTransfer + } + } + return nil +} + +func (x *SigningInput) GetEsdtTransfer() *ESDTTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_EsdtTransfer); ok { + return x.EsdtTransfer + } + } + return nil +} + +func (x *SigningInput) GetEsdtnftTransfer() *ESDTNFTTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_EsdtnftTransfer); ok { + return x.EsdtnftTransfer + } + } + return nil +} + +type isSigningInput_MessageOneof interface { + isSigningInput_MessageOneof() +} + +type SigningInput_GenericAction struct { + GenericAction *GenericAction `protobuf:"bytes,5,opt,name=generic_action,json=genericAction,proto3,oneof"` +} + +type SigningInput_EgldTransfer struct { + EgldTransfer *EGLDTransfer `protobuf:"bytes,6,opt,name=egld_transfer,json=egldTransfer,proto3,oneof"` +} + +type SigningInput_EsdtTransfer struct { + EsdtTransfer *ESDTTransfer `protobuf:"bytes,7,opt,name=esdt_transfer,json=esdtTransfer,proto3,oneof"` +} + +type SigningInput_EsdtnftTransfer struct { + EsdtnftTransfer *ESDTNFTTransfer `protobuf:"bytes,8,opt,name=esdtnft_transfer,json=esdtnftTransfer,proto3,oneof"` +} + +func (*SigningInput_GenericAction) isSigningInput_MessageOneof() {} + +func (*SigningInput_EgldTransfer) isSigningInput_MessageOneof() {} + +func (*SigningInput_EsdtTransfer) isSigningInput_MessageOneof() {} + +func (*SigningInput_EsdtnftTransfer) isSigningInput_MessageOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_MultiversX_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_MultiversX_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_MultiversX_proto_rawDescGZIP(), []int{6} +} + +func (x *SigningOutput) GetEncoded() string { + if x != nil { + return x.Encoded + } + return "" +} + +func (x *SigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_MultiversX_proto protoreflect.FileDescriptor + +const file_MultiversX_proto_rawDesc = "" + + "\n" + + "\x10MultiversX.proto\x12\x13TW.MultiversX.Proto\x1a\fCommon.proto\"\xa8\x01\n" + + "\rGenericAction\x129\n" + + "\baccounts\x18\x01 \x01(\v2\x1d.TW.MultiversX.Proto.AccountsR\baccounts\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\x12\x12\n" + + "\x04data\x18\x03 \x01(\tR\x04data\x12\x18\n" + + "\aversion\x18\x04 \x01(\rR\aversion\x12\x18\n" + + "\aoptions\x18\x05 \x01(\rR\aoptions\"\x8f\x01\n" + + "\fEGLDTransfer\x129\n" + + "\baccounts\x18\x01 \x01(\v2\x1d.TW.MultiversX.Proto.AccountsR\baccounts\x12\x16\n" + + "\x06amount\x18\x02 \x01(\tR\x06amount\x12\x12\n" + + "\x04data\x18\x03 \x01(\tR\x04data\x12\x18\n" + + "\aversion\x18\x04 \x01(\rR\aversion\"\xa6\x01\n" + + "\fESDTTransfer\x129\n" + + "\baccounts\x18\x01 \x01(\v2\x1d.TW.MultiversX.Proto.AccountsR\baccounts\x12)\n" + + "\x10token_identifier\x18\x02 \x01(\tR\x0ftokenIdentifier\x12\x16\n" + + "\x06amount\x18\x03 \x01(\tR\x06amount\x12\x18\n" + + "\aversion\x18\x04 \x01(\rR\aversion\"\xca\x01\n" + + "\x0fESDTNFTTransfer\x129\n" + + "\baccounts\x18\x01 \x01(\v2\x1d.TW.MultiversX.Proto.AccountsR\baccounts\x12)\n" + + "\x10token_collection\x18\x02 \x01(\tR\x0ftokenCollection\x12\x1f\n" + + "\vtoken_nonce\x18\x03 \x01(\x04R\n" + + "tokenNonce\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x12\x18\n" + + "\aversion\x18\x05 \x01(\rR\aversion\"\xed\x01\n" + + "\bAccounts\x12!\n" + + "\fsender_nonce\x18\x01 \x01(\x04R\vsenderNonce\x12\x16\n" + + "\x06sender\x18\x02 \x01(\tR\x06sender\x12'\n" + + "\x0fsender_username\x18\x03 \x01(\tR\x0esenderUsername\x12\x1a\n" + + "\breceiver\x18\x04 \x01(\tR\breceiver\x12+\n" + + "\x11receiver_username\x18\x05 \x01(\tR\x10receiverUsername\x12\x1a\n" + + "\bguardian\x18\x06 \x01(\tR\bguardian\x12\x18\n" + + "\arelayer\x18\a \x01(\tR\arelayer\"\xc9\x03\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x19\n" + + "\bchain_id\x18\x02 \x01(\tR\achainId\x12\x1b\n" + + "\tgas_price\x18\x03 \x01(\x04R\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x04 \x01(\x04R\bgasLimit\x12K\n" + + "\x0egeneric_action\x18\x05 \x01(\v2\".TW.MultiversX.Proto.GenericActionH\x00R\rgenericAction\x12H\n" + + "\regld_transfer\x18\x06 \x01(\v2!.TW.MultiversX.Proto.EGLDTransferH\x00R\fegldTransfer\x12H\n" + + "\resdt_transfer\x18\a \x01(\v2!.TW.MultiversX.Proto.ESDTTransferH\x00R\fesdtTransfer\x12Q\n" + + "\x10esdtnft_transfer\x18\b \x01(\v2$.TW.MultiversX.Proto.ESDTNFTTransferH\x00R\x0fesdtnftTransferB\x0f\n" + + "\rmessage_oneof\"\xa1\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\tR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_MultiversX_proto_rawDescOnce sync.Once + file_MultiversX_proto_rawDescData []byte +) + +func file_MultiversX_proto_rawDescGZIP() []byte { + file_MultiversX_proto_rawDescOnce.Do(func() { + file_MultiversX_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_MultiversX_proto_rawDesc), len(file_MultiversX_proto_rawDesc))) + }) + return file_MultiversX_proto_rawDescData +} + +var file_MultiversX_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_MultiversX_proto_goTypes = []any{ + (*GenericAction)(nil), // 0: TW.MultiversX.Proto.GenericAction + (*EGLDTransfer)(nil), // 1: TW.MultiversX.Proto.EGLDTransfer + (*ESDTTransfer)(nil), // 2: TW.MultiversX.Proto.ESDTTransfer + (*ESDTNFTTransfer)(nil), // 3: TW.MultiversX.Proto.ESDTNFTTransfer + (*Accounts)(nil), // 4: TW.MultiversX.Proto.Accounts + (*SigningInput)(nil), // 5: TW.MultiversX.Proto.SigningInput + (*SigningOutput)(nil), // 6: TW.MultiversX.Proto.SigningOutput + (common.SigningError)(0), // 7: TW.Common.Proto.SigningError +} +var file_MultiversX_proto_depIdxs = []int32{ + 4, // 0: TW.MultiversX.Proto.GenericAction.accounts:type_name -> TW.MultiversX.Proto.Accounts + 4, // 1: TW.MultiversX.Proto.EGLDTransfer.accounts:type_name -> TW.MultiversX.Proto.Accounts + 4, // 2: TW.MultiversX.Proto.ESDTTransfer.accounts:type_name -> TW.MultiversX.Proto.Accounts + 4, // 3: TW.MultiversX.Proto.ESDTNFTTransfer.accounts:type_name -> TW.MultiversX.Proto.Accounts + 0, // 4: TW.MultiversX.Proto.SigningInput.generic_action:type_name -> TW.MultiversX.Proto.GenericAction + 1, // 5: TW.MultiversX.Proto.SigningInput.egld_transfer:type_name -> TW.MultiversX.Proto.EGLDTransfer + 2, // 6: TW.MultiversX.Proto.SigningInput.esdt_transfer:type_name -> TW.MultiversX.Proto.ESDTTransfer + 3, // 7: TW.MultiversX.Proto.SigningInput.esdtnft_transfer:type_name -> TW.MultiversX.Proto.ESDTNFTTransfer + 7, // 8: TW.MultiversX.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_MultiversX_proto_init() } +func file_MultiversX_proto_init() { + if File_MultiversX_proto != nil { + return + } + file_MultiversX_proto_msgTypes[5].OneofWrappers = []any{ + (*SigningInput_GenericAction)(nil), + (*SigningInput_EgldTransfer)(nil), + (*SigningInput_EsdtTransfer)(nil), + (*SigningInput_EsdtnftTransfer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_MultiversX_proto_rawDesc), len(file_MultiversX_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_MultiversX_proto_goTypes, + DependencyIndexes: file_MultiversX_proto_depIdxs, + MessageInfos: file_MultiversX_proto_msgTypes, + }.Build() + File_MultiversX_proto = out.File + file_MultiversX_proto_goTypes = nil + file_MultiversX_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/nano/Nano.pb.go b/wrapper/go-wrapper/protos/nano/Nano.pb.go new file mode 100644 index 00000000000..124af1eb612 --- /dev/null +++ b/wrapper/go-wrapper/protos/nano/Nano.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Nano.proto + +package nano + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Optional parent block hash + ParentBlock []byte `protobuf:"bytes,2,opt,name=parent_block,json=parentBlock,proto3" json:"parent_block,omitempty"` + // Receive/Send reference + // + // Types that are valid to be assigned to LinkOneof: + // + // *SigningInput_LinkBlock + // *SigningInput_LinkRecipient + LinkOneof isSigningInput_LinkOneof `protobuf_oneof:"link_oneof"` + // Representative address + Representative string `protobuf:"bytes,5,opt,name=representative,proto3" json:"representative,omitempty"` + // Account balance (128-bit unsigned integer, as a string) + Balance string `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance,omitempty"` + // Work + Work string `protobuf:"bytes,7,opt,name=work,proto3" json:"work,omitempty"` + // Pulic key used for building preImage (32 bytes). + PublicKey []byte `protobuf:"bytes,8,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Nano_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Nano_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Nano_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetParentBlock() []byte { + if x != nil { + return x.ParentBlock + } + return nil +} + +func (x *SigningInput) GetLinkOneof() isSigningInput_LinkOneof { + if x != nil { + return x.LinkOneof + } + return nil +} + +func (x *SigningInput) GetLinkBlock() []byte { + if x != nil { + if x, ok := x.LinkOneof.(*SigningInput_LinkBlock); ok { + return x.LinkBlock + } + } + return nil +} + +func (x *SigningInput) GetLinkRecipient() string { + if x != nil { + if x, ok := x.LinkOneof.(*SigningInput_LinkRecipient); ok { + return x.LinkRecipient + } + } + return "" +} + +func (x *SigningInput) GetRepresentative() string { + if x != nil { + return x.Representative + } + return "" +} + +func (x *SigningInput) GetBalance() string { + if x != nil { + return x.Balance + } + return "" +} + +func (x *SigningInput) GetWork() string { + if x != nil { + return x.Work + } + return "" +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +type isSigningInput_LinkOneof interface { + isSigningInput_LinkOneof() +} + +type SigningInput_LinkBlock struct { + // Hash of a block to receive from + LinkBlock []byte `protobuf:"bytes,3,opt,name=link_block,json=linkBlock,proto3,oneof"` +} + +type SigningInput_LinkRecipient struct { + // Recipient address to send coins to + LinkRecipient string `protobuf:"bytes,4,opt,name=link_recipient,json=linkRecipient,proto3,oneof"` +} + +func (*SigningInput_LinkBlock) isSigningInput_LinkOneof() {} + +func (*SigningInput_LinkRecipient) isSigningInput_LinkOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signature + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // Block hash + BlockHash []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // JSON representation of the block + Json string `protobuf:"bytes,3,opt,name=json,proto3" json:"json,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Nano_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Nano_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Nano_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Nano_proto protoreflect.FileDescriptor + +const file_Nano_proto_rawDesc = "" + + "\n" + + "\n" + + "Nano.proto\x12\rTW.Nano.Proto\x1a\fCommon.proto\"\x9f\x02\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12!\n" + + "\fparent_block\x18\x02 \x01(\fR\vparentBlock\x12\x1f\n" + + "\n" + + "link_block\x18\x03 \x01(\fH\x00R\tlinkBlock\x12'\n" + + "\x0elink_recipient\x18\x04 \x01(\tH\x00R\rlinkRecipient\x12&\n" + + "\x0erepresentative\x18\x05 \x01(\tR\x0erepresentative\x12\x18\n" + + "\abalance\x18\x06 \x01(\tR\abalance\x12\x12\n" + + "\x04work\x18\a \x01(\tR\x04work\x12\x1d\n" + + "\n" + + "public_key\x18\b \x01(\fR\tpublicKeyB\f\n" + + "\n" + + "link_oneof\"\xba\x01\n" + + "\rSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x1d\n" + + "\n" + + "block_hash\x18\x02 \x01(\fR\tblockHash\x12\x12\n" + + "\x04json\x18\x03 \x01(\tR\x04json\x123\n" + + "\x05error\x18\x04 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x05 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Nano_proto_rawDescOnce sync.Once + file_Nano_proto_rawDescData []byte +) + +func file_Nano_proto_rawDescGZIP() []byte { + file_Nano_proto_rawDescOnce.Do(func() { + file_Nano_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Nano_proto_rawDesc), len(file_Nano_proto_rawDesc))) + }) + return file_Nano_proto_rawDescData +} + +var file_Nano_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Nano_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Nano.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Nano.Proto.SigningOutput + (common.SigningError)(0), // 2: TW.Common.Proto.SigningError +} +var file_Nano_proto_depIdxs = []int32{ + 2, // 0: TW.Nano.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Nano_proto_init() } +func file_Nano_proto_init() { + if File_Nano_proto != nil { + return + } + file_Nano_proto_msgTypes[0].OneofWrappers = []any{ + (*SigningInput_LinkBlock)(nil), + (*SigningInput_LinkRecipient)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Nano_proto_rawDesc), len(file_Nano_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Nano_proto_goTypes, + DependencyIndexes: file_Nano_proto_depIdxs, + MessageInfos: file_Nano_proto_msgTypes, + }.Build() + File_Nano_proto = out.File + file_Nano_proto_goTypes = nil + file_Nano_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/near/NEAR.pb.go b/wrapper/go-wrapper/protos/near/NEAR.pb.go new file mode 100644 index 00000000000..d5643d6feba --- /dev/null +++ b/wrapper/go-wrapper/protos/near/NEAR.pb.go @@ -0,0 +1,1292 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: NEAR.proto + +package near + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Public key with type +type PublicKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Key type + KeyType uint32 `protobuf:"varint,1,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + // The public key data + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublicKey) Reset() { + *x = PublicKey{} + mi := &file_NEAR_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKey) ProtoMessage() {} + +func (x *PublicKey) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. +func (*PublicKey) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{0} +} + +func (x *PublicKey) GetKeyType() uint32 { + if x != nil { + return x.KeyType + } + return 0 +} + +func (x *PublicKey) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Permissions for a function call +type FunctionCallPermission struct { + state protoimpl.MessageState `protogen:"open.v1"` + // uint128 / big endian byte order + Allowance []byte `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` + ReceiverId string `protobuf:"bytes,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"` + MethodNames []string `protobuf:"bytes,3,rep,name=method_names,json=methodNames,proto3" json:"method_names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FunctionCallPermission) Reset() { + *x = FunctionCallPermission{} + mi := &file_NEAR_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FunctionCallPermission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionCallPermission) ProtoMessage() {} + +func (x *FunctionCallPermission) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FunctionCallPermission.ProtoReflect.Descriptor instead. +func (*FunctionCallPermission) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{1} +} + +func (x *FunctionCallPermission) GetAllowance() []byte { + if x != nil { + return x.Allowance + } + return nil +} + +func (x *FunctionCallPermission) GetReceiverId() string { + if x != nil { + return x.ReceiverId + } + return "" +} + +func (x *FunctionCallPermission) GetMethodNames() []string { + if x != nil { + return x.MethodNames + } + return nil +} + +// Full access +type FullAccessPermission struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FullAccessPermission) Reset() { + *x = FullAccessPermission{} + mi := &file_NEAR_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FullAccessPermission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FullAccessPermission) ProtoMessage() {} + +func (x *FullAccessPermission) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FullAccessPermission.ProtoReflect.Descriptor instead. +func (*FullAccessPermission) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{2} +} + +// Access key: nonce + permission +type AccessKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Nonce + Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Permission + // + // Types that are valid to be assigned to Permission: + // + // *AccessKey_FunctionCall + // *AccessKey_FullAccess + Permission isAccessKey_Permission `protobuf_oneof:"permission"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccessKey) Reset() { + *x = AccessKey{} + mi := &file_NEAR_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccessKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessKey) ProtoMessage() {} + +func (x *AccessKey) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessKey.ProtoReflect.Descriptor instead. +func (*AccessKey) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{3} +} + +func (x *AccessKey) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *AccessKey) GetPermission() isAccessKey_Permission { + if x != nil { + return x.Permission + } + return nil +} + +func (x *AccessKey) GetFunctionCall() *FunctionCallPermission { + if x != nil { + if x, ok := x.Permission.(*AccessKey_FunctionCall); ok { + return x.FunctionCall + } + } + return nil +} + +func (x *AccessKey) GetFullAccess() *FullAccessPermission { + if x != nil { + if x, ok := x.Permission.(*AccessKey_FullAccess); ok { + return x.FullAccess + } + } + return nil +} + +type isAccessKey_Permission interface { + isAccessKey_Permission() +} + +type AccessKey_FunctionCall struct { + FunctionCall *FunctionCallPermission `protobuf:"bytes,2,opt,name=function_call,json=functionCall,proto3,oneof"` +} + +type AccessKey_FullAccess struct { + FullAccess *FullAccessPermission `protobuf:"bytes,3,opt,name=full_access,json=fullAccess,proto3,oneof"` +} + +func (*AccessKey_FunctionCall) isAccessKey_Permission() {} + +func (*AccessKey_FullAccess) isAccessKey_Permission() {} + +// Create Account +type CreateAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAccount) Reset() { + *x = CreateAccount{} + mi := &file_NEAR_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccount) ProtoMessage() {} + +func (x *CreateAccount) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAccount.ProtoReflect.Descriptor instead. +func (*CreateAccount) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{4} +} + +// Deploying a contract +type DeployContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code []byte `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeployContract) Reset() { + *x = DeployContract{} + mi := &file_NEAR_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeployContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployContract) ProtoMessage() {} + +func (x *DeployContract) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployContract.ProtoReflect.Descriptor instead. +func (*DeployContract) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{5} +} + +func (x *DeployContract) GetCode() []byte { + if x != nil { + return x.Code + } + return nil +} + +// A method/function call +type FunctionCall struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Method/function name + MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + // input arguments + Args []byte `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + // gas + Gas uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"` + // uint128 / big endian byte order + Deposit []byte `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FunctionCall) Reset() { + *x = FunctionCall{} + mi := &file_NEAR_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FunctionCall) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionCall) ProtoMessage() {} + +func (x *FunctionCall) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FunctionCall.ProtoReflect.Descriptor instead. +func (*FunctionCall) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{6} +} + +func (x *FunctionCall) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *FunctionCall) GetArgs() []byte { + if x != nil { + return x.Args + } + return nil +} + +func (x *FunctionCall) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +func (x *FunctionCall) GetDeposit() []byte { + if x != nil { + return x.Deposit + } + return nil +} + +// Transfer +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount; uint128 / big endian byte order + Deposit []byte `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_NEAR_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{7} +} + +func (x *Transfer) GetDeposit() []byte { + if x != nil { + return x.Deposit + } + return nil +} + +// Stake +type Stake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount; uint128 / big endian byte order + Stake []byte `protobuf:"bytes,1,opt,name=stake,proto3" json:"stake,omitempty"` + // owner public key + PublicKey *PublicKey `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Stake) Reset() { + *x = Stake{} + mi := &file_NEAR_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Stake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stake) ProtoMessage() {} + +func (x *Stake) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stake.ProtoReflect.Descriptor instead. +func (*Stake) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{8} +} + +func (x *Stake) GetStake() []byte { + if x != nil { + return x.Stake + } + return nil +} + +func (x *Stake) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +// Add a key +type AddKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublicKey *PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + AccessKey *AccessKey `protobuf:"bytes,2,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddKey) Reset() { + *x = AddKey{} + mi := &file_NEAR_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddKey) ProtoMessage() {} + +func (x *AddKey) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddKey.ProtoReflect.Descriptor instead. +func (*AddKey) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{9} +} + +func (x *AddKey) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *AddKey) GetAccessKey() *AccessKey { + if x != nil { + return x.AccessKey + } + return nil +} + +// Delete a key +type DeleteKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublicKey *PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteKey) Reset() { + *x = DeleteKey{} + mi := &file_NEAR_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteKey) ProtoMessage() {} + +func (x *DeleteKey) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteKey.ProtoReflect.Descriptor instead. +func (*DeleteKey) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteKey) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +// Delete account +type DeleteAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + BeneficiaryId string `protobuf:"bytes,1,opt,name=beneficiary_id,json=beneficiaryId,proto3" json:"beneficiary_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAccount) Reset() { + *x = DeleteAccount{} + mi := &file_NEAR_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccount) ProtoMessage() {} + +func (x *DeleteAccount) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAccount.ProtoReflect.Descriptor instead. +func (*DeleteAccount) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteAccount) GetBeneficiaryId() string { + if x != nil { + return x.BeneficiaryId + } + return "" +} + +// Fungible token transfer +type TokenTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Token amount. Base-10 decimal string. + TokenAmount string `protobuf:"bytes,1,opt,name=token_amount,json=tokenAmount,proto3" json:"token_amount,omitempty"` + // ID of the receiver. + ReceiverId string `protobuf:"bytes,2,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"` + // Gas. + Gas uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"` + // NEAR deposit amount; uint128 / big endian byte order. + Deposit []byte `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenTransfer) Reset() { + *x = TokenTransfer{} + mi := &file_NEAR_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenTransfer) ProtoMessage() {} + +func (x *TokenTransfer) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenTransfer.ProtoReflect.Descriptor instead. +func (*TokenTransfer) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{12} +} + +func (x *TokenTransfer) GetTokenAmount() string { + if x != nil { + return x.TokenAmount + } + return "" +} + +func (x *TokenTransfer) GetReceiverId() string { + if x != nil { + return x.ReceiverId + } + return "" +} + +func (x *TokenTransfer) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +func (x *TokenTransfer) GetDeposit() []byte { + if x != nil { + return x.Deposit + } + return nil +} + +// Represents an action +type Action struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Payload: + // + // *Action_CreateAccount + // *Action_DeployContract + // *Action_FunctionCall + // *Action_Transfer + // *Action_Stake + // *Action_AddKey + // *Action_DeleteKey + // *Action_DeleteAccount + // *Action_TokenTransfer + Payload isAction_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Action) Reset() { + *x = Action{} + mi := &file_NEAR_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action) ProtoMessage() {} + +func (x *Action) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action.ProtoReflect.Descriptor instead. +func (*Action) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{13} +} + +func (x *Action) GetPayload() isAction_Payload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Action) GetCreateAccount() *CreateAccount { + if x != nil { + if x, ok := x.Payload.(*Action_CreateAccount); ok { + return x.CreateAccount + } + } + return nil +} + +func (x *Action) GetDeployContract() *DeployContract { + if x != nil { + if x, ok := x.Payload.(*Action_DeployContract); ok { + return x.DeployContract + } + } + return nil +} + +func (x *Action) GetFunctionCall() *FunctionCall { + if x != nil { + if x, ok := x.Payload.(*Action_FunctionCall); ok { + return x.FunctionCall + } + } + return nil +} + +func (x *Action) GetTransfer() *Transfer { + if x != nil { + if x, ok := x.Payload.(*Action_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *Action) GetStake() *Stake { + if x != nil { + if x, ok := x.Payload.(*Action_Stake); ok { + return x.Stake + } + } + return nil +} + +func (x *Action) GetAddKey() *AddKey { + if x != nil { + if x, ok := x.Payload.(*Action_AddKey); ok { + return x.AddKey + } + } + return nil +} + +func (x *Action) GetDeleteKey() *DeleteKey { + if x != nil { + if x, ok := x.Payload.(*Action_DeleteKey); ok { + return x.DeleteKey + } + } + return nil +} + +func (x *Action) GetDeleteAccount() *DeleteAccount { + if x != nil { + if x, ok := x.Payload.(*Action_DeleteAccount); ok { + return x.DeleteAccount + } + } + return nil +} + +func (x *Action) GetTokenTransfer() *TokenTransfer { + if x != nil { + if x, ok := x.Payload.(*Action_TokenTransfer); ok { + return x.TokenTransfer + } + } + return nil +} + +type isAction_Payload interface { + isAction_Payload() +} + +type Action_CreateAccount struct { + CreateAccount *CreateAccount `protobuf:"bytes,1,opt,name=create_account,json=createAccount,proto3,oneof"` +} + +type Action_DeployContract struct { + DeployContract *DeployContract `protobuf:"bytes,2,opt,name=deploy_contract,json=deployContract,proto3,oneof"` +} + +type Action_FunctionCall struct { + FunctionCall *FunctionCall `protobuf:"bytes,3,opt,name=function_call,json=functionCall,proto3,oneof"` +} + +type Action_Transfer struct { + Transfer *Transfer `protobuf:"bytes,4,opt,name=transfer,proto3,oneof"` +} + +type Action_Stake struct { + Stake *Stake `protobuf:"bytes,5,opt,name=stake,proto3,oneof"` +} + +type Action_AddKey struct { + AddKey *AddKey `protobuf:"bytes,6,opt,name=add_key,json=addKey,proto3,oneof"` +} + +type Action_DeleteKey struct { + DeleteKey *DeleteKey `protobuf:"bytes,7,opt,name=delete_key,json=deleteKey,proto3,oneof"` +} + +type Action_DeleteAccount struct { + DeleteAccount *DeleteAccount `protobuf:"bytes,8,opt,name=delete_account,json=deleteAccount,proto3,oneof"` +} + +type Action_TokenTransfer struct { + // Gap in field numbering is intentional as it's not a standard NEAR action. + TokenTransfer *TokenTransfer `protobuf:"bytes,13,opt,name=token_transfer,json=tokenTransfer,proto3,oneof"` +} + +func (*Action_CreateAccount) isAction_Payload() {} + +func (*Action_DeployContract) isAction_Payload() {} + +func (*Action_FunctionCall) isAction_Payload() {} + +func (*Action_Transfer) isAction_Payload() {} + +func (*Action_Stake) isAction_Payload() {} + +func (*Action_AddKey) isAction_Payload() {} + +func (*Action_DeleteKey) isAction_Payload() {} + +func (*Action_DeleteAccount) isAction_Payload() {} + +func (*Action_TokenTransfer) isAction_Payload() {} + +// Input data necessary to create a signed order. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // ID of the sender + SignerId string `protobuf:"bytes,1,opt,name=signer_id,json=signerId,proto3" json:"signer_id,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // ID of the receiver + ReceiverId string `protobuf:"bytes,3,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"` + // Recent block hash + BlockHash []byte `protobuf:"bytes,4,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // Payload action(s) + Actions []*Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The public key used for compiling a transaction with a signature. + PublicKey []byte `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_NEAR_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{14} +} + +func (x *SigningInput) GetSignerId() string { + if x != nil { + return x.SignerId + } + return "" +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetReceiverId() string { + if x != nil { + return x.ReceiverId + } + return "" +} + +func (x *SigningInput) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *SigningInput) GetActions() []*Action { + if x != nil { + return x.Actions + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed transaction blob + SignedTransaction []byte `protobuf:"bytes,1,opt,name=signed_transaction,json=signedTransaction,proto3" json:"signed_transaction,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // Hash of the transaction + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_NEAR_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_NEAR_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_NEAR_proto_rawDescGZIP(), []int{15} +} + +func (x *SigningOutput) GetSignedTransaction() []byte { + if x != nil { + return x.SignedTransaction + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +var File_NEAR_proto protoreflect.FileDescriptor + +const file_NEAR_proto_rawDesc = "" + + "\n" + + "\n" + + "NEAR.proto\x12\rTW.NEAR.Proto\x1a\fCommon.proto\":\n" + + "\tPublicKey\x12\x19\n" + + "\bkey_type\x18\x01 \x01(\rR\akeyType\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\"z\n" + + "\x16FunctionCallPermission\x12\x1c\n" + + "\tallowance\x18\x01 \x01(\fR\tallowance\x12\x1f\n" + + "\vreceiver_id\x18\x02 \x01(\tR\n" + + "receiverId\x12!\n" + + "\fmethod_names\x18\x03 \x03(\tR\vmethodNames\"\x16\n" + + "\x14FullAccessPermission\"\xc5\x01\n" + + "\tAccessKey\x12\x14\n" + + "\x05nonce\x18\x01 \x01(\x04R\x05nonce\x12L\n" + + "\rfunction_call\x18\x02 \x01(\v2%.TW.NEAR.Proto.FunctionCallPermissionH\x00R\ffunctionCall\x12F\n" + + "\vfull_access\x18\x03 \x01(\v2#.TW.NEAR.Proto.FullAccessPermissionH\x00R\n" + + "fullAccessB\f\n" + + "\n" + + "permission\"\x0f\n" + + "\rCreateAccount\"$\n" + + "\x0eDeployContract\x12\x12\n" + + "\x04code\x18\x01 \x01(\fR\x04code\"o\n" + + "\fFunctionCall\x12\x1f\n" + + "\vmethod_name\x18\x01 \x01(\tR\n" + + "methodName\x12\x12\n" + + "\x04args\x18\x02 \x01(\fR\x04args\x12\x10\n" + + "\x03gas\x18\x03 \x01(\x04R\x03gas\x12\x18\n" + + "\adeposit\x18\x04 \x01(\fR\adeposit\"$\n" + + "\bTransfer\x12\x18\n" + + "\adeposit\x18\x01 \x01(\fR\adeposit\"V\n" + + "\x05Stake\x12\x14\n" + + "\x05stake\x18\x01 \x01(\fR\x05stake\x127\n" + + "\n" + + "public_key\x18\x02 \x01(\v2\x18.TW.NEAR.Proto.PublicKeyR\tpublicKey\"z\n" + + "\x06AddKey\x127\n" + + "\n" + + "public_key\x18\x01 \x01(\v2\x18.TW.NEAR.Proto.PublicKeyR\tpublicKey\x127\n" + + "\n" + + "access_key\x18\x02 \x01(\v2\x18.TW.NEAR.Proto.AccessKeyR\taccessKey\"D\n" + + "\tDeleteKey\x127\n" + + "\n" + + "public_key\x18\x01 \x01(\v2\x18.TW.NEAR.Proto.PublicKeyR\tpublicKey\"6\n" + + "\rDeleteAccount\x12%\n" + + "\x0ebeneficiary_id\x18\x01 \x01(\tR\rbeneficiaryId\"\x7f\n" + + "\rTokenTransfer\x12!\n" + + "\ftoken_amount\x18\x01 \x01(\tR\vtokenAmount\x12\x1f\n" + + "\vreceiver_id\x18\x02 \x01(\tR\n" + + "receiverId\x12\x10\n" + + "\x03gas\x18\x03 \x01(\x04R\x03gas\x12\x18\n" + + "\adeposit\x18\x04 \x01(\fR\adeposit\"\xc8\x04\n" + + "\x06Action\x12E\n" + + "\x0ecreate_account\x18\x01 \x01(\v2\x1c.TW.NEAR.Proto.CreateAccountH\x00R\rcreateAccount\x12H\n" + + "\x0fdeploy_contract\x18\x02 \x01(\v2\x1d.TW.NEAR.Proto.DeployContractH\x00R\x0edeployContract\x12B\n" + + "\rfunction_call\x18\x03 \x01(\v2\x1b.TW.NEAR.Proto.FunctionCallH\x00R\ffunctionCall\x125\n" + + "\btransfer\x18\x04 \x01(\v2\x17.TW.NEAR.Proto.TransferH\x00R\btransfer\x12,\n" + + "\x05stake\x18\x05 \x01(\v2\x14.TW.NEAR.Proto.StakeH\x00R\x05stake\x120\n" + + "\aadd_key\x18\x06 \x01(\v2\x15.TW.NEAR.Proto.AddKeyH\x00R\x06addKey\x129\n" + + "\n" + + "delete_key\x18\a \x01(\v2\x18.TW.NEAR.Proto.DeleteKeyH\x00R\tdeleteKey\x12E\n" + + "\x0edelete_account\x18\b \x01(\v2\x1c.TW.NEAR.Proto.DeleteAccountH\x00R\rdeleteAccount\x12E\n" + + "\x0etoken_transfer\x18\r \x01(\v2\x1c.TW.NEAR.Proto.TokenTransferH\x00R\rtokenTransferB\t\n" + + "\apayload\"\xf2\x01\n" + + "\fSigningInput\x12\x1b\n" + + "\tsigner_id\x18\x01 \x01(\tR\bsignerId\x12\x14\n" + + "\x05nonce\x18\x02 \x01(\x04R\x05nonce\x12\x1f\n" + + "\vreceiver_id\x18\x03 \x01(\tR\n" + + "receiverId\x12\x1d\n" + + "\n" + + "block_hash\x18\x04 \x01(\fR\tblockHash\x12/\n" + + "\aactions\x18\x05 \x03(\v2\x15.TW.NEAR.Proto.ActionR\aactions\x12\x1f\n" + + "\vprivate_key\x18\x06 \x01(\fR\n" + + "privateKey\x12\x1d\n" + + "\n" + + "public_key\x18\a \x01(\fR\tpublicKey\"\xac\x01\n" + + "\rSigningOutput\x12-\n" + + "\x12signed_transaction\x18\x01 \x01(\fR\x11signedTransaction\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x12\x12\n" + + "\x04hash\x18\x04 \x01(\fR\x04hashB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_NEAR_proto_rawDescOnce sync.Once + file_NEAR_proto_rawDescData []byte +) + +func file_NEAR_proto_rawDescGZIP() []byte { + file_NEAR_proto_rawDescOnce.Do(func() { + file_NEAR_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_NEAR_proto_rawDesc), len(file_NEAR_proto_rawDesc))) + }) + return file_NEAR_proto_rawDescData +} + +var file_NEAR_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_NEAR_proto_goTypes = []any{ + (*PublicKey)(nil), // 0: TW.NEAR.Proto.PublicKey + (*FunctionCallPermission)(nil), // 1: TW.NEAR.Proto.FunctionCallPermission + (*FullAccessPermission)(nil), // 2: TW.NEAR.Proto.FullAccessPermission + (*AccessKey)(nil), // 3: TW.NEAR.Proto.AccessKey + (*CreateAccount)(nil), // 4: TW.NEAR.Proto.CreateAccount + (*DeployContract)(nil), // 5: TW.NEAR.Proto.DeployContract + (*FunctionCall)(nil), // 6: TW.NEAR.Proto.FunctionCall + (*Transfer)(nil), // 7: TW.NEAR.Proto.Transfer + (*Stake)(nil), // 8: TW.NEAR.Proto.Stake + (*AddKey)(nil), // 9: TW.NEAR.Proto.AddKey + (*DeleteKey)(nil), // 10: TW.NEAR.Proto.DeleteKey + (*DeleteAccount)(nil), // 11: TW.NEAR.Proto.DeleteAccount + (*TokenTransfer)(nil), // 12: TW.NEAR.Proto.TokenTransfer + (*Action)(nil), // 13: TW.NEAR.Proto.Action + (*SigningInput)(nil), // 14: TW.NEAR.Proto.SigningInput + (*SigningOutput)(nil), // 15: TW.NEAR.Proto.SigningOutput + (common.SigningError)(0), // 16: TW.Common.Proto.SigningError +} +var file_NEAR_proto_depIdxs = []int32{ + 1, // 0: TW.NEAR.Proto.AccessKey.function_call:type_name -> TW.NEAR.Proto.FunctionCallPermission + 2, // 1: TW.NEAR.Proto.AccessKey.full_access:type_name -> TW.NEAR.Proto.FullAccessPermission + 0, // 2: TW.NEAR.Proto.Stake.public_key:type_name -> TW.NEAR.Proto.PublicKey + 0, // 3: TW.NEAR.Proto.AddKey.public_key:type_name -> TW.NEAR.Proto.PublicKey + 3, // 4: TW.NEAR.Proto.AddKey.access_key:type_name -> TW.NEAR.Proto.AccessKey + 0, // 5: TW.NEAR.Proto.DeleteKey.public_key:type_name -> TW.NEAR.Proto.PublicKey + 4, // 6: TW.NEAR.Proto.Action.create_account:type_name -> TW.NEAR.Proto.CreateAccount + 5, // 7: TW.NEAR.Proto.Action.deploy_contract:type_name -> TW.NEAR.Proto.DeployContract + 6, // 8: TW.NEAR.Proto.Action.function_call:type_name -> TW.NEAR.Proto.FunctionCall + 7, // 9: TW.NEAR.Proto.Action.transfer:type_name -> TW.NEAR.Proto.Transfer + 8, // 10: TW.NEAR.Proto.Action.stake:type_name -> TW.NEAR.Proto.Stake + 9, // 11: TW.NEAR.Proto.Action.add_key:type_name -> TW.NEAR.Proto.AddKey + 10, // 12: TW.NEAR.Proto.Action.delete_key:type_name -> TW.NEAR.Proto.DeleteKey + 11, // 13: TW.NEAR.Proto.Action.delete_account:type_name -> TW.NEAR.Proto.DeleteAccount + 12, // 14: TW.NEAR.Proto.Action.token_transfer:type_name -> TW.NEAR.Proto.TokenTransfer + 13, // 15: TW.NEAR.Proto.SigningInput.actions:type_name -> TW.NEAR.Proto.Action + 16, // 16: TW.NEAR.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_NEAR_proto_init() } +func file_NEAR_proto_init() { + if File_NEAR_proto != nil { + return + } + file_NEAR_proto_msgTypes[3].OneofWrappers = []any{ + (*AccessKey_FunctionCall)(nil), + (*AccessKey_FullAccess)(nil), + } + file_NEAR_proto_msgTypes[13].OneofWrappers = []any{ + (*Action_CreateAccount)(nil), + (*Action_DeployContract)(nil), + (*Action_FunctionCall)(nil), + (*Action_Transfer)(nil), + (*Action_Stake)(nil), + (*Action_AddKey)(nil), + (*Action_DeleteKey)(nil), + (*Action_DeleteAccount)(nil), + (*Action_TokenTransfer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_NEAR_proto_rawDesc), len(file_NEAR_proto_rawDesc)), + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_NEAR_proto_goTypes, + DependencyIndexes: file_NEAR_proto_depIdxs, + MessageInfos: file_NEAR_proto_msgTypes, + }.Build() + File_NEAR_proto = out.File + file_NEAR_proto_goTypes = nil + file_NEAR_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/nebulas/Nebulas.pb.go b/wrapper/go-wrapper/protos/nebulas/Nebulas.pb.go new file mode 100644 index 00000000000..2ee2edee406 --- /dev/null +++ b/wrapper/go-wrapper/protos/nebulas/Nebulas.pb.go @@ -0,0 +1,505 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Nebulas.proto + +package nebulas + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // sender's address. + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // Chain identifier (uint256, serialized big endian) + ChainId []byte `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Nonce (uint256, serialized big endian) + Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Gas price (uint256, serialized big endian) + GasPrice []byte `protobuf:"bytes,4,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Gas limit (uint256, serialized big endian) + GasLimit []byte `protobuf:"bytes,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Recipient's address. + ToAddress string `protobuf:"bytes,6,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to send in wei, 1 NAS = 10^18 Wei (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,7,opt,name=amount,proto3" json:"amount,omitempty"` + // Timestamp to create transaction (uint256, serialized big endian) + Timestamp []byte `protobuf:"bytes,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Optional payload + Payload string `protobuf:"bytes,9,opt,name=payload,proto3" json:"payload,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,10,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Nebulas_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Nebulas_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Nebulas_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *SigningInput) GetChainId() []byte { + if x != nil { + return x.ChainId + } + return nil +} + +func (x *SigningInput) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *SigningInput) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *SigningInput) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SigningInput) GetTimestamp() []byte { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *SigningInput) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Algorithm code + Algorithm uint32 `protobuf:"varint,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + // The signature + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // Encoded transaction + Raw string `protobuf:"bytes,3,opt,name=raw,proto3" json:"raw,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Nebulas_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Nebulas_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Nebulas_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetAlgorithm() uint32 { + if x != nil { + return x.Algorithm + } + return 0 +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetRaw() string { + if x != nil { + return x.Raw + } + return "" +} + +// Generic data +type Data struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Data) Reset() { + *x = Data{} + mi := &file_Nebulas_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_Nebulas_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_Nebulas_proto_rawDescGZIP(), []int{2} +} + +func (x *Data) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Data) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +// Raw transaction data +type RawTransaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // tx hash + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // source address + From []byte `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + // destination address + To []byte `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint64 `protobuf:"varint,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + // transaction timestamp + Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // generic data + Data *Data `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` + // chain ID (4 bytes) + ChainId uint32 `protobuf:"varint,8,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // gas price (uint256, serialized big endian) + GasPrice []byte `protobuf:"bytes,9,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // gas limit (uint256, serialized big endian) + GasLimit []byte `protobuf:"bytes,10,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // algorithm + Alg uint32 `protobuf:"varint,11,opt,name=alg,proto3" json:"alg,omitempty"` + // signature + Sign []byte `protobuf:"bytes,12,opt,name=sign,proto3" json:"sign,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawTransaction) Reset() { + *x = RawTransaction{} + mi := &file_Nebulas_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawTransaction) ProtoMessage() {} + +func (x *RawTransaction) ProtoReflect() protoreflect.Message { + mi := &file_Nebulas_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawTransaction.ProtoReflect.Descriptor instead. +func (*RawTransaction) Descriptor() ([]byte, []int) { + return file_Nebulas_proto_rawDescGZIP(), []int{3} +} + +func (x *RawTransaction) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *RawTransaction) GetFrom() []byte { + if x != nil { + return x.From + } + return nil +} + +func (x *RawTransaction) GetTo() []byte { + if x != nil { + return x.To + } + return nil +} + +func (x *RawTransaction) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *RawTransaction) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *RawTransaction) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *RawTransaction) GetData() *Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *RawTransaction) GetChainId() uint32 { + if x != nil { + return x.ChainId + } + return 0 +} + +func (x *RawTransaction) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *RawTransaction) GetGasLimit() []byte { + if x != nil { + return x.GasLimit + } + return nil +} + +func (x *RawTransaction) GetAlg() uint32 { + if x != nil { + return x.Alg + } + return 0 +} + +func (x *RawTransaction) GetSign() []byte { + if x != nil { + return x.Sign + } + return nil +} + +var File_Nebulas_proto protoreflect.FileDescriptor + +const file_Nebulas_proto_rawDesc = "" + + "\n" + + "\rNebulas.proto\x12\x10TW.Nebulas.Proto\"\xac\x02\n" + + "\fSigningInput\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12\x19\n" + + "\bchain_id\x18\x02 \x01(\fR\achainId\x12\x14\n" + + "\x05nonce\x18\x03 \x01(\fR\x05nonce\x12\x1b\n" + + "\tgas_price\x18\x04 \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x05 \x01(\fR\bgasLimit\x12\x1d\n" + + "\n" + + "to_address\x18\x06 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\a \x01(\fR\x06amount\x12\x1c\n" + + "\ttimestamp\x18\b \x01(\fR\ttimestamp\x12\x18\n" + + "\apayload\x18\t \x01(\tR\apayload\x12\x1f\n" + + "\vprivate_key\x18\n" + + " \x01(\fR\n" + + "privateKey\"]\n" + + "\rSigningOutput\x12\x1c\n" + + "\talgorithm\x18\x01 \x01(\rR\talgorithm\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12\x10\n" + + "\x03raw\x18\x03 \x01(\tR\x03raw\"4\n" + + "\x04Data\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x12\x18\n" + + "\apayload\x18\x02 \x01(\fR\apayload\"\xb9\x02\n" + + "\x0eRawTransaction\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\x12\x12\n" + + "\x04from\x18\x02 \x01(\fR\x04from\x12\x0e\n" + + "\x02to\x18\x03 \x01(\fR\x02to\x12\x14\n" + + "\x05value\x18\x04 \x01(\fR\x05value\x12\x14\n" + + "\x05nonce\x18\x05 \x01(\x04R\x05nonce\x12\x1c\n" + + "\ttimestamp\x18\x06 \x01(\x03R\ttimestamp\x12*\n" + + "\x04data\x18\a \x01(\v2\x16.TW.Nebulas.Proto.DataR\x04data\x12\x19\n" + + "\bchain_id\x18\b \x01(\rR\achainId\x12\x1b\n" + + "\tgas_price\x18\t \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\n" + + " \x01(\fR\bgasLimit\x12\x10\n" + + "\x03alg\x18\v \x01(\rR\x03alg\x12\x12\n" + + "\x04sign\x18\f \x01(\fR\x04signB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Nebulas_proto_rawDescOnce sync.Once + file_Nebulas_proto_rawDescData []byte +) + +func file_Nebulas_proto_rawDescGZIP() []byte { + file_Nebulas_proto_rawDescOnce.Do(func() { + file_Nebulas_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Nebulas_proto_rawDesc), len(file_Nebulas_proto_rawDesc))) + }) + return file_Nebulas_proto_rawDescData +} + +var file_Nebulas_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_Nebulas_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Nebulas.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Nebulas.Proto.SigningOutput + (*Data)(nil), // 2: TW.Nebulas.Proto.Data + (*RawTransaction)(nil), // 3: TW.Nebulas.Proto.RawTransaction +} +var file_Nebulas_proto_depIdxs = []int32{ + 2, // 0: TW.Nebulas.Proto.RawTransaction.data:type_name -> TW.Nebulas.Proto.Data + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Nebulas_proto_init() } +func file_Nebulas_proto_init() { + if File_Nebulas_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Nebulas_proto_rawDesc), len(file_Nebulas_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Nebulas_proto_goTypes, + DependencyIndexes: file_Nebulas_proto_depIdxs, + MessageInfos: file_Nebulas_proto_msgTypes, + }.Build() + File_Nebulas_proto = out.File + file_Nebulas_proto_goTypes = nil + file_Nebulas_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/neo/NEO.pb.go b/wrapper/go-wrapper/protos/neo/NEO.pb.go new file mode 100644 index 00000000000..d2ec2b72e61 --- /dev/null +++ b/wrapper/go-wrapper/protos/neo/NEO.pb.go @@ -0,0 +1,1004 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: NEO.proto + +package neo + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input for a transaction (output of a prev tx) +type TransactionInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Previous tx hash + PrevHash []byte `protobuf:"bytes,1,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"` + // Output index + PrevIndex uint32 `protobuf:"fixed32,2,opt,name=prev_index,json=prevIndex,proto3" json:"prev_index,omitempty"` + // unspent value of UTXO + Value int64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` + // Asset + AssetId string `protobuf:"bytes,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionInput) Reset() { + *x = TransactionInput{} + mi := &file_NEO_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInput) ProtoMessage() {} + +func (x *TransactionInput) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead. +func (*TransactionInput) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{0} +} + +func (x *TransactionInput) GetPrevHash() []byte { + if x != nil { + return x.PrevHash + } + return nil +} + +func (x *TransactionInput) GetPrevIndex() uint32 { + if x != nil { + return x.PrevIndex + } + return 0 +} + +func (x *TransactionInput) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *TransactionInput) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +// extra address of Output +type OutputAddress struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount (as string) + Amount int64 `protobuf:"zigzag64,1,opt,name=amount,proto3" json:"amount,omitempty"` + // destination address + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutputAddress) Reset() { + *x = OutputAddress{} + mi := &file_NEO_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputAddress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputAddress) ProtoMessage() {} + +func (x *OutputAddress) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputAddress.ProtoReflect.Descriptor instead. +func (*OutputAddress) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{1} +} + +func (x *OutputAddress) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *OutputAddress) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +// Output of a transaction +type TransactionOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Asset + AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + // Amount (as string) + Amount int64 `protobuf:"zigzag64,2,opt,name=amount,proto3" json:"amount,omitempty"` + // destination address + ToAddress string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // change address + ChangeAddress string `protobuf:"bytes,4,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // extra output + ExtraOutputs []*OutputAddress `protobuf:"bytes,5,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOutput) Reset() { + *x = TransactionOutput{} + mi := &file_NEO_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOutput) ProtoMessage() {} + +func (x *TransactionOutput) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead. +func (*TransactionOutput) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{2} +} + +func (x *TransactionOutput) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +func (x *TransactionOutput) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TransactionOutput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransactionOutput) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *TransactionOutput) GetExtraOutputs() []*OutputAddress { + if x != nil { + return x.ExtraOutputs + } + return nil +} + +// Transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to TransactionOneof: + // + // *Transaction_Nep5Transfer_ + // *Transaction_InvocationGeneric_ + TransactionOneof isTransaction_TransactionOneof `protobuf_oneof:"transaction_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_NEO_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{3} +} + +func (x *Transaction) GetTransactionOneof() isTransaction_TransactionOneof { + if x != nil { + return x.TransactionOneof + } + return nil +} + +func (x *Transaction) GetNep5Transfer() *Transaction_Nep5Transfer { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_Nep5Transfer_); ok { + return x.Nep5Transfer + } + } + return nil +} + +func (x *Transaction) GetInvocationGeneric() *Transaction_InvocationGeneric { + if x != nil { + if x, ok := x.TransactionOneof.(*Transaction_InvocationGeneric_); ok { + return x.InvocationGeneric + } + } + return nil +} + +type isTransaction_TransactionOneof interface { + isTransaction_TransactionOneof() +} + +type Transaction_Nep5Transfer_ struct { + Nep5Transfer *Transaction_Nep5Transfer `protobuf:"bytes,1,opt,name=nep5_transfer,json=nep5Transfer,proto3,oneof"` +} + +type Transaction_InvocationGeneric_ struct { + InvocationGeneric *Transaction_InvocationGeneric `protobuf:"bytes,2,opt,name=invocation_generic,json=invocationGeneric,proto3,oneof"` +} + +func (*Transaction_Nep5Transfer_) isTransaction_TransactionOneof() {} + +func (*Transaction_InvocationGeneric_) isTransaction_TransactionOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Available transaction inputs + Inputs []*TransactionInput `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` + // Transaction outputs + Outputs []*TransactionOutput `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Fee + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` + // Asset ID for gas + GasAssetId string `protobuf:"bytes,5,opt,name=gas_asset_id,json=gasAssetId,proto3" json:"gas_asset_id,omitempty"` + // Address for the change + GasChangeAddress string `protobuf:"bytes,6,opt,name=gas_change_address,json=gasChangeAddress,proto3" json:"gas_change_address,omitempty"` + // Optional transaction plan (if missing it will be computed) + Plan *TransactionPlan `protobuf:"bytes,7,opt,name=plan,proto3" json:"plan,omitempty"` + Transaction *Transaction `protobuf:"bytes,8,opt,name=transaction,proto3" json:"transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_NEO_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningInput) GetInputs() []*TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *SigningInput) GetOutputs() []*TransactionOutput { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *SigningInput) GetGasAssetId() string { + if x != nil { + return x.GasAssetId + } + return "" +} + +func (x *SigningInput) GetGasChangeAddress() string { + if x != nil { + return x.GasChangeAddress + } + return "" +} + +func (x *SigningInput) GetPlan() *TransactionPlan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *SigningInput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_NEO_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Describes a preliminary transaction output plan. +type TransactionOutputPlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to be received at the other end. + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Maximum available amount. + AvailableAmount int64 `protobuf:"varint,2,opt,name=available_amount,json=availableAmount,proto3" json:"available_amount,omitempty"` + // Amount that is left as change + Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"` + // Asset + AssetId string `protobuf:"bytes,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + // Destination address + ToAddress string `protobuf:"bytes,5,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Address for the change + ChangeAddress string `protobuf:"bytes,6,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // extra output + ExtraOutputs []*OutputAddress `protobuf:"bytes,7,rep,name=extra_outputs,json=extraOutputs,proto3" json:"extra_outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOutputPlan) Reset() { + *x = TransactionOutputPlan{} + mi := &file_NEO_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOutputPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOutputPlan) ProtoMessage() {} + +func (x *TransactionOutputPlan) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOutputPlan.ProtoReflect.Descriptor instead. +func (*TransactionOutputPlan) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{6} +} + +func (x *TransactionOutputPlan) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TransactionOutputPlan) GetAvailableAmount() int64 { + if x != nil { + return x.AvailableAmount + } + return 0 +} + +func (x *TransactionOutputPlan) GetChange() int64 { + if x != nil { + return x.Change + } + return 0 +} + +func (x *TransactionOutputPlan) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +func (x *TransactionOutputPlan) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransactionOutputPlan) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *TransactionOutputPlan) GetExtraOutputs() []*OutputAddress { + if x != nil { + return x.ExtraOutputs + } + return nil +} + +type TransactionAttributePlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + Usage int32 `protobuf:"varint,1,opt,name=usage,proto3" json:"usage,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionAttributePlan) Reset() { + *x = TransactionAttributePlan{} + mi := &file_NEO_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionAttributePlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionAttributePlan) ProtoMessage() {} + +func (x *TransactionAttributePlan) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionAttributePlan.ProtoReflect.Descriptor instead. +func (*TransactionAttributePlan) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{7} +} + +func (x *TransactionAttributePlan) GetUsage() int32 { + if x != nil { + return x.Usage + } + return 0 +} + +func (x *TransactionAttributePlan) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Describes a preliminary transaction plan. +type TransactionPlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Used assets + Outputs []*TransactionOutputPlan `protobuf:"bytes,1,rep,name=outputs,proto3" json:"outputs,omitempty"` + // Selected unspent transaction outputs. + Inputs []*TransactionInput `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"` + // GAS used + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Attribute + Attributes []*TransactionAttributePlan `protobuf:"bytes,5,rep,name=attributes,proto3" json:"attributes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionPlan) Reset() { + *x = TransactionPlan{} + mi := &file_NEO_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionPlan) ProtoMessage() {} + +func (x *TransactionPlan) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead. +func (*TransactionPlan) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{8} +} + +func (x *TransactionPlan) GetOutputs() []*TransactionOutputPlan { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *TransactionPlan) GetInputs() []*TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *TransactionPlan) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionPlan) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *TransactionPlan) GetAttributes() []*TransactionAttributePlan { + if x != nil { + return x.Attributes + } + return nil +} + +// nep5 token transfer transaction +type Transaction_Nep5Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + // Amount to send (256-bit number) + Amount []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // determine if putting THROWIFNOT & RET instructions + ScriptWithRet bool `protobuf:"varint,5,opt,name=script_with_ret,json=scriptWithRet,proto3" json:"script_with_ret,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_Nep5Transfer) Reset() { + *x = Transaction_Nep5Transfer{} + mi := &file_NEO_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_Nep5Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_Nep5Transfer) ProtoMessage() {} + +func (x *Transaction_Nep5Transfer) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_Nep5Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_Nep5Transfer) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Transaction_Nep5Transfer) GetAssetId() string { + if x != nil { + return x.AssetId + } + return "" +} + +func (x *Transaction_Nep5Transfer) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *Transaction_Nep5Transfer) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Transaction_Nep5Transfer) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Transaction_Nep5Transfer) GetScriptWithRet() bool { + if x != nil { + return x.ScriptWithRet + } + return false +} + +// Generic invocation transaction +type Transaction_InvocationGeneric struct { + state protoimpl.MessageState `protogen:"open.v1"` + // gas to use + Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"` + // Contract call payload data + Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_InvocationGeneric) Reset() { + *x = Transaction_InvocationGeneric{} + mi := &file_NEO_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_InvocationGeneric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_InvocationGeneric) ProtoMessage() {} + +func (x *Transaction_InvocationGeneric) ProtoReflect() protoreflect.Message { + mi := &file_NEO_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_InvocationGeneric.ProtoReflect.Descriptor instead. +func (*Transaction_InvocationGeneric) Descriptor() ([]byte, []int) { + return file_NEO_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *Transaction_InvocationGeneric) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +func (x *Transaction_InvocationGeneric) GetScript() []byte { + if x != nil { + return x.Script + } + return nil +} + +var File_NEO_proto protoreflect.FileDescriptor + +const file_NEO_proto_rawDesc = "" + + "\n" + + "\tNEO.proto\x12\fTW.NEO.Proto\x1a\fCommon.proto\"\x7f\n" + + "\x10TransactionInput\x12\x1b\n" + + "\tprev_hash\x18\x01 \x01(\fR\bprevHash\x12\x1d\n" + + "\n" + + "prev_index\x18\x02 \x01(\aR\tprevIndex\x12\x14\n" + + "\x05value\x18\x03 \x01(\x03R\x05value\x12\x19\n" + + "\basset_id\x18\x04 \x01(\tR\aassetId\"F\n" + + "\rOutputAddress\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x12R\x06amount\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\"\xce\x01\n" + + "\x11TransactionOutput\x12\x19\n" + + "\basset_id\x18\x01 \x01(\tR\aassetId\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x12R\x06amount\x12\x1d\n" + + "\n" + + "to_address\x18\x03 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x04 \x01(\tR\rchangeAddress\x12@\n" + + "\rextra_outputs\x18\x05 \x03(\v2\x1b.TW.NEO.Proto.OutputAddressR\fextraOutputs\"\x9e\x03\n" + + "\vTransaction\x12M\n" + + "\rnep5_transfer\x18\x01 \x01(\v2&.TW.NEO.Proto.Transaction.Nep5TransferH\x00R\fnep5Transfer\x12\\\n" + + "\x12invocation_generic\x18\x02 \x01(\v2+.TW.NEO.Proto.Transaction.InvocationGenericH\x00R\x11invocationGeneric\x1a\x8d\x01\n" + + "\fNep5Transfer\x12\x19\n" + + "\basset_id\x18\x01 \x01(\tR\aassetId\x12\x12\n" + + "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x04 \x01(\fR\x06amount\x12&\n" + + "\x0fscript_with_ret\x18\x05 \x01(\bR\rscriptWithRet\x1a=\n" + + "\x11InvocationGeneric\x12\x10\n" + + "\x03gas\x18\x01 \x01(\x04R\x03gas\x12\x16\n" + + "\x06script\x18\x02 \x01(\fR\x06scriptB\x13\n" + + "\x11transaction_oneof\"\xf4\x02\n" + + "\fSigningInput\x126\n" + + "\x06inputs\x18\x01 \x03(\v2\x1e.TW.NEO.Proto.TransactionInputR\x06inputs\x129\n" + + "\aoutputs\x18\x02 \x03(\v2\x1f.TW.NEO.Proto.TransactionOutputR\aoutputs\x12\x1f\n" + + "\vprivate_key\x18\x03 \x01(\fR\n" + + "privateKey\x12\x10\n" + + "\x03fee\x18\x04 \x01(\x03R\x03fee\x12 \n" + + "\fgas_asset_id\x18\x05 \x01(\tR\n" + + "gasAssetId\x12,\n" + + "\x12gas_change_address\x18\x06 \x01(\tR\x10gasChangeAddress\x121\n" + + "\x04plan\x18\a \x01(\v2\x1d.TW.NEO.Proto.TransactionPlanR\x04plan\x12;\n" + + "\vtransaction\x18\b \x01(\v2\x19.TW.NEO.Proto.TransactionR\vtransaction\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"\x95\x02\n" + + "\x15TransactionOutputPlan\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12)\n" + + "\x10available_amount\x18\x02 \x01(\x03R\x0favailableAmount\x12\x16\n" + + "\x06change\x18\x03 \x01(\x03R\x06change\x12\x19\n" + + "\basset_id\x18\x04 \x01(\tR\aassetId\x12\x1d\n" + + "\n" + + "to_address\x18\x05 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x06 \x01(\tR\rchangeAddress\x12@\n" + + "\rextra_outputs\x18\a \x03(\v2\x1b.TW.NEO.Proto.OutputAddressR\fextraOutputs\"D\n" + + "\x18TransactionAttributePlan\x12\x14\n" + + "\x05usage\x18\x01 \x01(\x05R\x05usage\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\"\x97\x02\n" + + "\x0fTransactionPlan\x12=\n" + + "\aoutputs\x18\x01 \x03(\v2#.TW.NEO.Proto.TransactionOutputPlanR\aoutputs\x126\n" + + "\x06inputs\x18\x02 \x03(\v2\x1e.TW.NEO.Proto.TransactionInputR\x06inputs\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x123\n" + + "\x05error\x18\x04 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12F\n" + + "\n" + + "attributes\x18\x05 \x03(\v2&.TW.NEO.Proto.TransactionAttributePlanR\n" + + "attributesB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_NEO_proto_rawDescOnce sync.Once + file_NEO_proto_rawDescData []byte +) + +func file_NEO_proto_rawDescGZIP() []byte { + file_NEO_proto_rawDescOnce.Do(func() { + file_NEO_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_NEO_proto_rawDesc), len(file_NEO_proto_rawDesc))) + }) + return file_NEO_proto_rawDescData +} + +var file_NEO_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_NEO_proto_goTypes = []any{ + (*TransactionInput)(nil), // 0: TW.NEO.Proto.TransactionInput + (*OutputAddress)(nil), // 1: TW.NEO.Proto.OutputAddress + (*TransactionOutput)(nil), // 2: TW.NEO.Proto.TransactionOutput + (*Transaction)(nil), // 3: TW.NEO.Proto.Transaction + (*SigningInput)(nil), // 4: TW.NEO.Proto.SigningInput + (*SigningOutput)(nil), // 5: TW.NEO.Proto.SigningOutput + (*TransactionOutputPlan)(nil), // 6: TW.NEO.Proto.TransactionOutputPlan + (*TransactionAttributePlan)(nil), // 7: TW.NEO.Proto.TransactionAttributePlan + (*TransactionPlan)(nil), // 8: TW.NEO.Proto.TransactionPlan + (*Transaction_Nep5Transfer)(nil), // 9: TW.NEO.Proto.Transaction.Nep5Transfer + (*Transaction_InvocationGeneric)(nil), // 10: TW.NEO.Proto.Transaction.InvocationGeneric + (common.SigningError)(0), // 11: TW.Common.Proto.SigningError +} +var file_NEO_proto_depIdxs = []int32{ + 1, // 0: TW.NEO.Proto.TransactionOutput.extra_outputs:type_name -> TW.NEO.Proto.OutputAddress + 9, // 1: TW.NEO.Proto.Transaction.nep5_transfer:type_name -> TW.NEO.Proto.Transaction.Nep5Transfer + 10, // 2: TW.NEO.Proto.Transaction.invocation_generic:type_name -> TW.NEO.Proto.Transaction.InvocationGeneric + 0, // 3: TW.NEO.Proto.SigningInput.inputs:type_name -> TW.NEO.Proto.TransactionInput + 2, // 4: TW.NEO.Proto.SigningInput.outputs:type_name -> TW.NEO.Proto.TransactionOutput + 8, // 5: TW.NEO.Proto.SigningInput.plan:type_name -> TW.NEO.Proto.TransactionPlan + 3, // 6: TW.NEO.Proto.SigningInput.transaction:type_name -> TW.NEO.Proto.Transaction + 11, // 7: TW.NEO.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // 8: TW.NEO.Proto.TransactionOutputPlan.extra_outputs:type_name -> TW.NEO.Proto.OutputAddress + 6, // 9: TW.NEO.Proto.TransactionPlan.outputs:type_name -> TW.NEO.Proto.TransactionOutputPlan + 0, // 10: TW.NEO.Proto.TransactionPlan.inputs:type_name -> TW.NEO.Proto.TransactionInput + 11, // 11: TW.NEO.Proto.TransactionPlan.error:type_name -> TW.Common.Proto.SigningError + 7, // 12: TW.NEO.Proto.TransactionPlan.attributes:type_name -> TW.NEO.Proto.TransactionAttributePlan + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_NEO_proto_init() } +func file_NEO_proto_init() { + if File_NEO_proto != nil { + return + } + file_NEO_proto_msgTypes[3].OneofWrappers = []any{ + (*Transaction_Nep5Transfer_)(nil), + (*Transaction_InvocationGeneric_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_NEO_proto_rawDesc), len(file_NEO_proto_rawDesc)), + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_NEO_proto_goTypes, + DependencyIndexes: file_NEO_proto_depIdxs, + MessageInfos: file_NEO_proto_msgTypes, + }.Build() + File_NEO_proto = out.File + file_NEO_proto_goTypes = nil + file_NEO_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/nervos/Nervos.pb.go b/wrapper/go-wrapper/protos/nervos/Nervos.pb.go new file mode 100644 index 00000000000..a4cb3f7928f --- /dev/null +++ b/wrapper/go-wrapper/protos/nervos/Nervos.pb.go @@ -0,0 +1,1229 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Nervos.proto + +package nervos + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Nervos transaction plan +type TransactionPlan struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of cell deps. + CellDeps []*CellDep `protobuf:"bytes,1,rep,name=cell_deps,json=cellDeps,proto3" json:"cell_deps,omitempty"` + // A list of header deps. + HeaderDeps [][]byte `protobuf:"bytes,2,rep,name=header_deps,json=headerDeps,proto3" json:"header_deps,omitempty"` + // A list of 1 or more selected cells for this transaction + SelectedCells []*Cell `protobuf:"bytes,3,rep,name=selected_cells,json=selectedCells,proto3" json:"selected_cells,omitempty"` + // A list of 1 or more outputs by this transaction + Outputs []*CellOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // A list of outputs data. + OutputsData [][]byte `protobuf:"bytes,5,rep,name=outputs_data,json=outputsData,proto3" json:"outputs_data,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,6,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionPlan) Reset() { + *x = TransactionPlan{} + mi := &file_Nervos_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionPlan) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionPlan) ProtoMessage() {} + +func (x *TransactionPlan) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionPlan.ProtoReflect.Descriptor instead. +func (*TransactionPlan) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{0} +} + +func (x *TransactionPlan) GetCellDeps() []*CellDep { + if x != nil { + return x.CellDeps + } + return nil +} + +func (x *TransactionPlan) GetHeaderDeps() [][]byte { + if x != nil { + return x.HeaderDeps + } + return nil +} + +func (x *TransactionPlan) GetSelectedCells() []*Cell { + if x != nil { + return x.SelectedCells + } + return nil +} + +func (x *TransactionPlan) GetOutputs() []*CellOutput { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *TransactionPlan) GetOutputsData() [][]byte { + if x != nil { + return x.OutputsData + } + return nil +} + +func (x *TransactionPlan) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +// Nervos cell dep. +type CellDep struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Prevents the transaction to be mined before an absolute or relative time + DepType string `protobuf:"bytes,1,opt,name=dep_type,json=depType,proto3" json:"dep_type,omitempty"` + // Reference to the previous transaction's output. + OutPoint *OutPoint `protobuf:"bytes,2,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CellDep) Reset() { + *x = CellDep{} + mi := &file_Nervos_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CellDep) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CellDep) ProtoMessage() {} + +func (x *CellDep) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CellDep.ProtoReflect.Descriptor instead. +func (*CellDep) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{1} +} + +func (x *CellDep) GetDepType() string { + if x != nil { + return x.DepType + } + return "" +} + +func (x *CellDep) GetOutPoint() *OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +// Nervos transaction out-point reference. +type OutPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hash of the referenced transaction. + TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + // The index of the specific output in the transaction. + Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + mi := &file_Nervos_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{2} +} + +func (x *OutPoint) GetTxHash() []byte { + if x != nil { + return x.TxHash + } + return nil +} + +func (x *OutPoint) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +// Nervos cell output. +type CellOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction amount. + Capacity uint64 `protobuf:"varint,1,opt,name=capacity,proto3" json:"capacity,omitempty"` + // Lock script + Lock *Script `protobuf:"bytes,2,opt,name=lock,proto3" json:"lock,omitempty"` + // Type script + Type *Script `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CellOutput) Reset() { + *x = CellOutput{} + mi := &file_Nervos_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CellOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CellOutput) ProtoMessage() {} + +func (x *CellOutput) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CellOutput.ProtoReflect.Descriptor instead. +func (*CellOutput) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{3} +} + +func (x *CellOutput) GetCapacity() uint64 { + if x != nil { + return x.Capacity + } + return 0 +} + +func (x *CellOutput) GetLock() *Script { + if x != nil { + return x.Lock + } + return nil +} + +func (x *CellOutput) GetType() *Script { + if x != nil { + return x.Type + } + return nil +} + +// Nervos script +type Script struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Code hash + CodeHash []byte `protobuf:"bytes,1,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` + // Hash type + HashType string `protobuf:"bytes,2,opt,name=hash_type,json=hashType,proto3" json:"hash_type,omitempty"` + // args + Args []byte `protobuf:"bytes,3,opt,name=args,proto3" json:"args,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Script) Reset() { + *x = Script{} + mi := &file_Nervos_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Script) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Script) ProtoMessage() {} + +func (x *Script) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Script.ProtoReflect.Descriptor instead. +func (*Script) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{4} +} + +func (x *Script) GetCodeHash() []byte { + if x != nil { + return x.CodeHash + } + return nil +} + +func (x *Script) GetHashType() string { + if x != nil { + return x.HashType + } + return "" +} + +func (x *Script) GetArgs() []byte { + if x != nil { + return x.Args + } + return nil +} + +// Transfer of native asset +type NativeTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Recipient's address. + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Change address. + ChangeAddress string `protobuf:"bytes,2,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // Amount to send. + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // If sending max amount. + UseMaxAmount bool `protobuf:"varint,4,opt,name=use_max_amount,json=useMaxAmount,proto3" json:"use_max_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NativeTransfer) Reset() { + *x = NativeTransfer{} + mi := &file_Nervos_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NativeTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NativeTransfer) ProtoMessage() {} + +func (x *NativeTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NativeTransfer.ProtoReflect.Descriptor instead. +func (*NativeTransfer) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{5} +} + +func (x *NativeTransfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *NativeTransfer) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *NativeTransfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *NativeTransfer) GetUseMaxAmount() bool { + if x != nil { + return x.UseMaxAmount + } + return false +} + +// Token transfer (SUDT) +type SudtTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Recipient's address. + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Change address. + ChangeAddress string `protobuf:"bytes,2,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // SUDT (Simple User Defined Token) address + SudtAddress []byte `protobuf:"bytes,3,opt,name=sudt_address,json=sudtAddress,proto3" json:"sudt_address,omitempty"` + // Amount to send. + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // If sending max amount. + UseMaxAmount bool `protobuf:"varint,5,opt,name=use_max_amount,json=useMaxAmount,proto3" json:"use_max_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SudtTransfer) Reset() { + *x = SudtTransfer{} + mi := &file_Nervos_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SudtTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SudtTransfer) ProtoMessage() {} + +func (x *SudtTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SudtTransfer.ProtoReflect.Descriptor instead. +func (*SudtTransfer) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{6} +} + +func (x *SudtTransfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SudtTransfer) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *SudtTransfer) GetSudtAddress() []byte { + if x != nil { + return x.SudtAddress + } + return nil +} + +func (x *SudtTransfer) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *SudtTransfer) GetUseMaxAmount() bool { + if x != nil { + return x.UseMaxAmount + } + return false +} + +// Deposit +type DaoDeposit struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Recipient's address. + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Change address. + ChangeAddress string `protobuf:"bytes,2,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + // Amount to deposit. + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DaoDeposit) Reset() { + *x = DaoDeposit{} + mi := &file_Nervos_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DaoDeposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DaoDeposit) ProtoMessage() {} + +func (x *DaoDeposit) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DaoDeposit.ProtoReflect.Descriptor instead. +func (*DaoDeposit) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{7} +} + +func (x *DaoDeposit) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *DaoDeposit) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +func (x *DaoDeposit) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +type DaoWithdrawPhase1 struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Deposit cell + DepositCell *Cell `protobuf:"bytes,1,opt,name=deposit_cell,json=depositCell,proto3" json:"deposit_cell,omitempty"` + // Change address. + ChangeAddress string `protobuf:"bytes,2,opt,name=change_address,json=changeAddress,proto3" json:"change_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DaoWithdrawPhase1) Reset() { + *x = DaoWithdrawPhase1{} + mi := &file_Nervos_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DaoWithdrawPhase1) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DaoWithdrawPhase1) ProtoMessage() {} + +func (x *DaoWithdrawPhase1) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DaoWithdrawPhase1.ProtoReflect.Descriptor instead. +func (*DaoWithdrawPhase1) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{8} +} + +func (x *DaoWithdrawPhase1) GetDepositCell() *Cell { + if x != nil { + return x.DepositCell + } + return nil +} + +func (x *DaoWithdrawPhase1) GetChangeAddress() string { + if x != nil { + return x.ChangeAddress + } + return "" +} + +type DaoWithdrawPhase2 struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Deposit cell + DepositCell *Cell `protobuf:"bytes,1,opt,name=deposit_cell,json=depositCell,proto3" json:"deposit_cell,omitempty"` + // Withdrawing cell + WithdrawingCell *Cell `protobuf:"bytes,2,opt,name=withdrawing_cell,json=withdrawingCell,proto3" json:"withdrawing_cell,omitempty"` + // Amount + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DaoWithdrawPhase2) Reset() { + *x = DaoWithdrawPhase2{} + mi := &file_Nervos_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DaoWithdrawPhase2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DaoWithdrawPhase2) ProtoMessage() {} + +func (x *DaoWithdrawPhase2) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DaoWithdrawPhase2.ProtoReflect.Descriptor instead. +func (*DaoWithdrawPhase2) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{9} +} + +func (x *DaoWithdrawPhase2) GetDepositCell() *Cell { + if x != nil { + return x.DepositCell + } + return nil +} + +func (x *DaoWithdrawPhase2) GetWithdrawingCell() *Cell { + if x != nil { + return x.WithdrawingCell + } + return nil +} + +func (x *DaoWithdrawPhase2) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction fee per byte. + ByteFee uint64 `protobuf:"varint,1,opt,name=byte_fee,json=byteFee,proto3" json:"byte_fee,omitempty"` + // The available secret private keys used for signing (32 bytes each). + PrivateKey [][]byte `protobuf:"bytes,2,rep,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Available unspent cell outputs. + Cell []*Cell `protobuf:"bytes,3,rep,name=cell,proto3" json:"cell,omitempty"` + // Optional transaction plan + Plan *TransactionPlan `protobuf:"bytes,4,opt,name=plan,proto3" json:"plan,omitempty"` + // The payload transfer + // + // Types that are valid to be assigned to OperationOneof: + // + // *SigningInput_NativeTransfer + // *SigningInput_SudtTransfer + // *SigningInput_DaoDeposit + // *SigningInput_DaoWithdrawPhase1 + // *SigningInput_DaoWithdrawPhase2 + OperationOneof isSigningInput_OperationOneof `protobuf_oneof:"operation_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Nervos_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{10} +} + +func (x *SigningInput) GetByteFee() uint64 { + if x != nil { + return x.ByteFee + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() [][]byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetCell() []*Cell { + if x != nil { + return x.Cell + } + return nil +} + +func (x *SigningInput) GetPlan() *TransactionPlan { + if x != nil { + return x.Plan + } + return nil +} + +func (x *SigningInput) GetOperationOneof() isSigningInput_OperationOneof { + if x != nil { + return x.OperationOneof + } + return nil +} + +func (x *SigningInput) GetNativeTransfer() *NativeTransfer { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_NativeTransfer); ok { + return x.NativeTransfer + } + } + return nil +} + +func (x *SigningInput) GetSudtTransfer() *SudtTransfer { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_SudtTransfer); ok { + return x.SudtTransfer + } + } + return nil +} + +func (x *SigningInput) GetDaoDeposit() *DaoDeposit { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_DaoDeposit); ok { + return x.DaoDeposit + } + } + return nil +} + +func (x *SigningInput) GetDaoWithdrawPhase1() *DaoWithdrawPhase1 { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_DaoWithdrawPhase1); ok { + return x.DaoWithdrawPhase1 + } + } + return nil +} + +func (x *SigningInput) GetDaoWithdrawPhase2() *DaoWithdrawPhase2 { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_DaoWithdrawPhase2); ok { + return x.DaoWithdrawPhase2 + } + } + return nil +} + +type isSigningInput_OperationOneof interface { + isSigningInput_OperationOneof() +} + +type SigningInput_NativeTransfer struct { + NativeTransfer *NativeTransfer `protobuf:"bytes,5,opt,name=native_transfer,json=nativeTransfer,proto3,oneof"` +} + +type SigningInput_SudtTransfer struct { + SudtTransfer *SudtTransfer `protobuf:"bytes,6,opt,name=sudt_transfer,json=sudtTransfer,proto3,oneof"` +} + +type SigningInput_DaoDeposit struct { + DaoDeposit *DaoDeposit `protobuf:"bytes,7,opt,name=dao_deposit,json=daoDeposit,proto3,oneof"` +} + +type SigningInput_DaoWithdrawPhase1 struct { + DaoWithdrawPhase1 *DaoWithdrawPhase1 `protobuf:"bytes,8,opt,name=dao_withdraw_phase1,json=daoWithdrawPhase1,proto3,oneof"` +} + +type SigningInput_DaoWithdrawPhase2 struct { + DaoWithdrawPhase2 *DaoWithdrawPhase2 `protobuf:"bytes,9,opt,name=dao_withdraw_phase2,json=daoWithdrawPhase2,proto3,oneof"` +} + +func (*SigningInput_NativeTransfer) isSigningInput_OperationOneof() {} + +func (*SigningInput_SudtTransfer) isSigningInput_OperationOneof() {} + +func (*SigningInput_DaoDeposit) isSigningInput_OperationOneof() {} + +func (*SigningInput_DaoWithdrawPhase1) isSigningInput_OperationOneof() {} + +func (*SigningInput_DaoWithdrawPhase2) isSigningInput_OperationOneof() {} + +// An unspent cell output, that can serve as input to a transaction +type Cell struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The unspent output + OutPoint *OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + // Amount of the cell + Capacity uint64 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"` + // Lock script + Lock *Script `protobuf:"bytes,3,opt,name=lock,proto3" json:"lock,omitempty"` + // Type script + Type *Script `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + // Data + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` + // Optional block number + BlockNumber uint64 `protobuf:"varint,6,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // Optional block hash + BlockHash []byte `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // Optional since the cell is available to spend + Since uint64 `protobuf:"varint,8,opt,name=since,proto3" json:"since,omitempty"` + // Optional input type data to be included in witness + InputType []byte `protobuf:"bytes,9,opt,name=input_type,json=inputType,proto3" json:"input_type,omitempty"` + // Optional output type data to be included in witness + OutputType []byte `protobuf:"bytes,10,opt,name=output_type,json=outputType,proto3" json:"output_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Cell) Reset() { + *x = Cell{} + mi := &file_Nervos_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Cell) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cell) ProtoMessage() {} + +func (x *Cell) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cell.ProtoReflect.Descriptor instead. +func (*Cell) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{11} +} + +func (x *Cell) GetOutPoint() *OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +func (x *Cell) GetCapacity() uint64 { + if x != nil { + return x.Capacity + } + return 0 +} + +func (x *Cell) GetLock() *Script { + if x != nil { + return x.Lock + } + return nil +} + +func (x *Cell) GetType() *Script { + if x != nil { + return x.Type + } + return nil +} + +func (x *Cell) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *Cell) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Cell) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *Cell) GetSince() uint64 { + if x != nil { + return x.Since + } + return 0 +} + +func (x *Cell) GetInputType() []byte { + if x != nil { + return x.InputType + } + return nil +} + +func (x *Cell) GetOutputType() []byte { + if x != nil { + return x.OutputType + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Resulting transaction. Note that the amount may be different than the requested amount to account for fees and available funds. + TransactionJson string `protobuf:"bytes,1,opt,name=transaction_json,json=transactionJson,proto3" json:"transaction_json,omitempty"` + // Transaction id + TransactionId string `protobuf:"bytes,2,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Nervos_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Nervos_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Nervos_proto_rawDescGZIP(), []int{12} +} + +func (x *SigningOutput) GetTransactionJson() string { + if x != nil { + return x.TransactionJson + } + return "" +} + +func (x *SigningOutput) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +var File_Nervos_proto protoreflect.FileDescriptor + +const file_Nervos_proto_rawDesc = "" + + "\n" + + "\fNervos.proto\x12\x0fTW.Nervos.Proto\x1a\fCommon.proto\"\xb6\x02\n" + + "\x0fTransactionPlan\x125\n" + + "\tcell_deps\x18\x01 \x03(\v2\x18.TW.Nervos.Proto.CellDepR\bcellDeps\x12\x1f\n" + + "\vheader_deps\x18\x02 \x03(\fR\n" + + "headerDeps\x12<\n" + + "\x0eselected_cells\x18\x03 \x03(\v2\x15.TW.Nervos.Proto.CellR\rselectedCells\x125\n" + + "\aoutputs\x18\x04 \x03(\v2\x1b.TW.Nervos.Proto.CellOutputR\aoutputs\x12!\n" + + "\foutputs_data\x18\x05 \x03(\fR\voutputsData\x123\n" + + "\x05error\x18\x06 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\"\\\n" + + "\aCellDep\x12\x19\n" + + "\bdep_type\x18\x01 \x01(\tR\adepType\x126\n" + + "\tout_point\x18\x02 \x01(\v2\x19.TW.Nervos.Proto.OutPointR\boutPoint\"9\n" + + "\bOutPoint\x12\x17\n" + + "\atx_hash\x18\x01 \x01(\fR\x06txHash\x12\x14\n" + + "\x05index\x18\x02 \x01(\rR\x05index\"\x82\x01\n" + + "\n" + + "CellOutput\x12\x1a\n" + + "\bcapacity\x18\x01 \x01(\x04R\bcapacity\x12+\n" + + "\x04lock\x18\x02 \x01(\v2\x17.TW.Nervos.Proto.ScriptR\x04lock\x12+\n" + + "\x04type\x18\x03 \x01(\v2\x17.TW.Nervos.Proto.ScriptR\x04type\"V\n" + + "\x06Script\x12\x1b\n" + + "\tcode_hash\x18\x01 \x01(\fR\bcodeHash\x12\x1b\n" + + "\thash_type\x18\x02 \x01(\tR\bhashType\x12\x12\n" + + "\x04args\x18\x03 \x01(\fR\x04args\"\x94\x01\n" + + "\x0eNativeTransfer\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x02 \x01(\tR\rchangeAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\x12$\n" + + "\x0euse_max_amount\x18\x04 \x01(\bR\fuseMaxAmount\"\xb5\x01\n" + + "\fSudtTransfer\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x02 \x01(\tR\rchangeAddress\x12!\n" + + "\fsudt_address\x18\x03 \x01(\fR\vsudtAddress\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x12$\n" + + "\x0euse_max_amount\x18\x05 \x01(\bR\fuseMaxAmount\"j\n" + + "\n" + + "DaoDeposit\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12%\n" + + "\x0echange_address\x18\x02 \x01(\tR\rchangeAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\"t\n" + + "\x11DaoWithdrawPhase1\x128\n" + + "\fdeposit_cell\x18\x01 \x01(\v2\x15.TW.Nervos.Proto.CellR\vdepositCell\x12%\n" + + "\x0echange_address\x18\x02 \x01(\tR\rchangeAddress\"\xa7\x01\n" + + "\x11DaoWithdrawPhase2\x128\n" + + "\fdeposit_cell\x18\x01 \x01(\v2\x15.TW.Nervos.Proto.CellR\vdepositCell\x12@\n" + + "\x10withdrawing_cell\x18\x02 \x01(\v2\x15.TW.Nervos.Proto.CellR\x0fwithdrawingCell\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x04R\x06amount\"\xbc\x04\n" + + "\fSigningInput\x12\x19\n" + + "\bbyte_fee\x18\x01 \x01(\x04R\abyteFee\x12\x1f\n" + + "\vprivate_key\x18\x02 \x03(\fR\n" + + "privateKey\x12)\n" + + "\x04cell\x18\x03 \x03(\v2\x15.TW.Nervos.Proto.CellR\x04cell\x124\n" + + "\x04plan\x18\x04 \x01(\v2 .TW.Nervos.Proto.TransactionPlanR\x04plan\x12J\n" + + "\x0fnative_transfer\x18\x05 \x01(\v2\x1f.TW.Nervos.Proto.NativeTransferH\x00R\x0enativeTransfer\x12D\n" + + "\rsudt_transfer\x18\x06 \x01(\v2\x1d.TW.Nervos.Proto.SudtTransferH\x00R\fsudtTransfer\x12>\n" + + "\vdao_deposit\x18\a \x01(\v2\x1b.TW.Nervos.Proto.DaoDepositH\x00R\n" + + "daoDeposit\x12T\n" + + "\x13dao_withdraw_phase1\x18\b \x01(\v2\".TW.Nervos.Proto.DaoWithdrawPhase1H\x00R\x11daoWithdrawPhase1\x12T\n" + + "\x13dao_withdraw_phase2\x18\t \x01(\v2\".TW.Nervos.Proto.DaoWithdrawPhase2H\x00R\x11daoWithdrawPhase2B\x11\n" + + "\x0foperation_oneof\"\xe0\x02\n" + + "\x04Cell\x126\n" + + "\tout_point\x18\x01 \x01(\v2\x19.TW.Nervos.Proto.OutPointR\boutPoint\x12\x1a\n" + + "\bcapacity\x18\x02 \x01(\x04R\bcapacity\x12+\n" + + "\x04lock\x18\x03 \x01(\v2\x17.TW.Nervos.Proto.ScriptR\x04lock\x12+\n" + + "\x04type\x18\x04 \x01(\v2\x17.TW.Nervos.Proto.ScriptR\x04type\x12\x12\n" + + "\x04data\x18\x05 \x01(\fR\x04data\x12!\n" + + "\fblock_number\x18\x06 \x01(\x04R\vblockNumber\x12\x1d\n" + + "\n" + + "block_hash\x18\a \x01(\fR\tblockHash\x12\x14\n" + + "\x05since\x18\b \x01(\x04R\x05since\x12\x1d\n" + + "\n" + + "input_type\x18\t \x01(\fR\tinputType\x12\x1f\n" + + "\voutput_type\x18\n" + + " \x01(\fR\n" + + "outputType\"\x96\x01\n" + + "\rSigningOutput\x12)\n" + + "\x10transaction_json\x18\x01 \x01(\tR\x0ftransactionJson\x12%\n" + + "\x0etransaction_id\x18\x02 \x01(\tR\rtransactionId\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05errorB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Nervos_proto_rawDescOnce sync.Once + file_Nervos_proto_rawDescData []byte +) + +func file_Nervos_proto_rawDescGZIP() []byte { + file_Nervos_proto_rawDescOnce.Do(func() { + file_Nervos_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Nervos_proto_rawDesc), len(file_Nervos_proto_rawDesc))) + }) + return file_Nervos_proto_rawDescData +} + +var file_Nervos_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_Nervos_proto_goTypes = []any{ + (*TransactionPlan)(nil), // 0: TW.Nervos.Proto.TransactionPlan + (*CellDep)(nil), // 1: TW.Nervos.Proto.CellDep + (*OutPoint)(nil), // 2: TW.Nervos.Proto.OutPoint + (*CellOutput)(nil), // 3: TW.Nervos.Proto.CellOutput + (*Script)(nil), // 4: TW.Nervos.Proto.Script + (*NativeTransfer)(nil), // 5: TW.Nervos.Proto.NativeTransfer + (*SudtTransfer)(nil), // 6: TW.Nervos.Proto.SudtTransfer + (*DaoDeposit)(nil), // 7: TW.Nervos.Proto.DaoDeposit + (*DaoWithdrawPhase1)(nil), // 8: TW.Nervos.Proto.DaoWithdrawPhase1 + (*DaoWithdrawPhase2)(nil), // 9: TW.Nervos.Proto.DaoWithdrawPhase2 + (*SigningInput)(nil), // 10: TW.Nervos.Proto.SigningInput + (*Cell)(nil), // 11: TW.Nervos.Proto.Cell + (*SigningOutput)(nil), // 12: TW.Nervos.Proto.SigningOutput + (common.SigningError)(0), // 13: TW.Common.Proto.SigningError +} +var file_Nervos_proto_depIdxs = []int32{ + 1, // 0: TW.Nervos.Proto.TransactionPlan.cell_deps:type_name -> TW.Nervos.Proto.CellDep + 11, // 1: TW.Nervos.Proto.TransactionPlan.selected_cells:type_name -> TW.Nervos.Proto.Cell + 3, // 2: TW.Nervos.Proto.TransactionPlan.outputs:type_name -> TW.Nervos.Proto.CellOutput + 13, // 3: TW.Nervos.Proto.TransactionPlan.error:type_name -> TW.Common.Proto.SigningError + 2, // 4: TW.Nervos.Proto.CellDep.out_point:type_name -> TW.Nervos.Proto.OutPoint + 4, // 5: TW.Nervos.Proto.CellOutput.lock:type_name -> TW.Nervos.Proto.Script + 4, // 6: TW.Nervos.Proto.CellOutput.type:type_name -> TW.Nervos.Proto.Script + 11, // 7: TW.Nervos.Proto.DaoWithdrawPhase1.deposit_cell:type_name -> TW.Nervos.Proto.Cell + 11, // 8: TW.Nervos.Proto.DaoWithdrawPhase2.deposit_cell:type_name -> TW.Nervos.Proto.Cell + 11, // 9: TW.Nervos.Proto.DaoWithdrawPhase2.withdrawing_cell:type_name -> TW.Nervos.Proto.Cell + 11, // 10: TW.Nervos.Proto.SigningInput.cell:type_name -> TW.Nervos.Proto.Cell + 0, // 11: TW.Nervos.Proto.SigningInput.plan:type_name -> TW.Nervos.Proto.TransactionPlan + 5, // 12: TW.Nervos.Proto.SigningInput.native_transfer:type_name -> TW.Nervos.Proto.NativeTransfer + 6, // 13: TW.Nervos.Proto.SigningInput.sudt_transfer:type_name -> TW.Nervos.Proto.SudtTransfer + 7, // 14: TW.Nervos.Proto.SigningInput.dao_deposit:type_name -> TW.Nervos.Proto.DaoDeposit + 8, // 15: TW.Nervos.Proto.SigningInput.dao_withdraw_phase1:type_name -> TW.Nervos.Proto.DaoWithdrawPhase1 + 9, // 16: TW.Nervos.Proto.SigningInput.dao_withdraw_phase2:type_name -> TW.Nervos.Proto.DaoWithdrawPhase2 + 2, // 17: TW.Nervos.Proto.Cell.out_point:type_name -> TW.Nervos.Proto.OutPoint + 4, // 18: TW.Nervos.Proto.Cell.lock:type_name -> TW.Nervos.Proto.Script + 4, // 19: TW.Nervos.Proto.Cell.type:type_name -> TW.Nervos.Proto.Script + 13, // 20: TW.Nervos.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_Nervos_proto_init() } +func file_Nervos_proto_init() { + if File_Nervos_proto != nil { + return + } + file_Nervos_proto_msgTypes[10].OneofWrappers = []any{ + (*SigningInput_NativeTransfer)(nil), + (*SigningInput_SudtTransfer)(nil), + (*SigningInput_DaoDeposit)(nil), + (*SigningInput_DaoWithdrawPhase1)(nil), + (*SigningInput_DaoWithdrawPhase2)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Nervos_proto_rawDesc), len(file_Nervos_proto_rawDesc)), + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Nervos_proto_goTypes, + DependencyIndexes: file_Nervos_proto_depIdxs, + MessageInfos: file_Nervos_proto_msgTypes, + }.Build() + File_Nervos_proto = out.File + file_Nervos_proto_goTypes = nil + file_Nervos_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/nimiq/Nimiq.pb.go b/wrapper/go-wrapper/protos/nimiq/Nimiq.pb.go new file mode 100644 index 00000000000..b5b0a930132 --- /dev/null +++ b/wrapper/go-wrapper/protos/nimiq/Nimiq.pb.go @@ -0,0 +1,286 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Nimiq.proto + +package nimiq + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NetworkId int32 + +const ( + NetworkId_UseDefault NetworkId = 0 + // Default PoW Mainnet. + NetworkId_Mainnet NetworkId = 42 + // PoS Mainnet starting at the PoW block height 3’456’000. + NetworkId_MainnetAlbatross NetworkId = 24 +) + +// Enum value maps for NetworkId. +var ( + NetworkId_name = map[int32]string{ + 0: "UseDefault", + 42: "Mainnet", + 24: "MainnetAlbatross", + } + NetworkId_value = map[string]int32{ + "UseDefault": 0, + "Mainnet": 42, + "MainnetAlbatross": 24, + } +) + +func (x NetworkId) Enum() *NetworkId { + p := new(NetworkId) + *p = x + return p +} + +func (x NetworkId) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NetworkId) Descriptor() protoreflect.EnumDescriptor { + return file_Nimiq_proto_enumTypes[0].Descriptor() +} + +func (NetworkId) Type() protoreflect.EnumType { + return &file_Nimiq_proto_enumTypes[0] +} + +func (x NetworkId) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NetworkId.Descriptor instead. +func (NetworkId) EnumDescriptor() ([]byte, []int) { + return file_Nimiq_proto_rawDescGZIP(), []int{0} +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Destination address + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + // Amount of the transfer + Value uint64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` + // Fee amount + Fee uint64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` + // Validity start, in block height + ValidityStartHeight uint32 `protobuf:"varint,5,opt,name=validity_start_height,json=validityStartHeight,proto3" json:"validity_start_height,omitempty"` + // Network ID. + NetworkId NetworkId `protobuf:"varint,6,opt,name=network_id,json=networkId,proto3,enum=TW.Nimiq.Proto.NetworkId" json:"network_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Nimiq_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Nimiq_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Nimiq_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *SigningInput) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *SigningInput) GetFee() uint64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *SigningInput) GetValidityStartHeight() uint32 { + if x != nil { + return x.ValidityStartHeight + } + return 0 +} + +func (x *SigningInput) GetNetworkId() NetworkId { + if x != nil { + return x.NetworkId + } + return NetworkId_UseDefault +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The encoded transaction + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Nimiq_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Nimiq_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Nimiq_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +var File_Nimiq_proto protoreflect.FileDescriptor + +const file_Nimiq_proto_rawDesc = "" + + "\n" + + "\vNimiq.proto\x12\x0eTW.Nimiq.Proto\"\xe7\x01\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12 \n" + + "\vdestination\x18\x02 \x01(\tR\vdestination\x12\x14\n" + + "\x05value\x18\x03 \x01(\x04R\x05value\x12\x10\n" + + "\x03fee\x18\x04 \x01(\x04R\x03fee\x122\n" + + "\x15validity_start_height\x18\x05 \x01(\rR\x13validityStartHeight\x128\n" + + "\n" + + "network_id\x18\x06 \x01(\x0e2\x19.TW.Nimiq.Proto.NetworkIdR\tnetworkId\")\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded*>\n" + + "\tNetworkId\x12\x0e\n" + + "\n" + + "UseDefault\x10\x00\x12\v\n" + + "\aMainnet\x10*\x12\x14\n" + + "\x10MainnetAlbatross\x10\x18B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Nimiq_proto_rawDescOnce sync.Once + file_Nimiq_proto_rawDescData []byte +) + +func file_Nimiq_proto_rawDescGZIP() []byte { + file_Nimiq_proto_rawDescOnce.Do(func() { + file_Nimiq_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Nimiq_proto_rawDesc), len(file_Nimiq_proto_rawDesc))) + }) + return file_Nimiq_proto_rawDescData +} + +var file_Nimiq_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Nimiq_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Nimiq_proto_goTypes = []any{ + (NetworkId)(0), // 0: TW.Nimiq.Proto.NetworkId + (*SigningInput)(nil), // 1: TW.Nimiq.Proto.SigningInput + (*SigningOutput)(nil), // 2: TW.Nimiq.Proto.SigningOutput +} +var file_Nimiq_proto_depIdxs = []int32{ + 0, // 0: TW.Nimiq.Proto.SigningInput.network_id:type_name -> TW.Nimiq.Proto.NetworkId + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Nimiq_proto_init() } +func file_Nimiq_proto_init() { + if File_Nimiq_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Nimiq_proto_rawDesc), len(file_Nimiq_proto_rawDesc)), + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Nimiq_proto_goTypes, + DependencyIndexes: file_Nimiq_proto_depIdxs, + EnumInfos: file_Nimiq_proto_enumTypes, + MessageInfos: file_Nimiq_proto_msgTypes, + }.Build() + File_Nimiq_proto = out.File + file_Nimiq_proto_goTypes = nil + file_Nimiq_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/nuls/NULS.pb.go b/wrapper/go-wrapper/protos/nuls/NULS.pb.go new file mode 100644 index 00000000000..0c738ff924f --- /dev/null +++ b/wrapper/go-wrapper/protos/nuls/NULS.pb.go @@ -0,0 +1,722 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: NULS.proto + +package nuls + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transaction from address +type TransactionCoinFrom struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Source address + FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` + // Chain ID + AssetsChainid uint32 `protobuf:"varint,2,opt,name=assets_chainid,json=assetsChainid,proto3" json:"assets_chainid,omitempty"` + // ID of the asset + AssetsId uint32 `protobuf:"varint,3,opt,name=assets_id,json=assetsId,proto3" json:"assets_id,omitempty"` + // transaction out amount (256-bit number) + IdAmount []byte `protobuf:"bytes,4,opt,name=id_amount,json=idAmount,proto3" json:"id_amount,omitempty"` + // Nonce, 8 bytes + Nonce []byte `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + // lock status: 1 locked; 0 unlocked + Locked uint32 `protobuf:"varint,6,opt,name=locked,proto3" json:"locked,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionCoinFrom) Reset() { + *x = TransactionCoinFrom{} + mi := &file_NULS_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionCoinFrom) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionCoinFrom) ProtoMessage() {} + +func (x *TransactionCoinFrom) ProtoReflect() protoreflect.Message { + mi := &file_NULS_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionCoinFrom.ProtoReflect.Descriptor instead. +func (*TransactionCoinFrom) Descriptor() ([]byte, []int) { + return file_NULS_proto_rawDescGZIP(), []int{0} +} + +func (x *TransactionCoinFrom) GetFromAddress() string { + if x != nil { + return x.FromAddress + } + return "" +} + +func (x *TransactionCoinFrom) GetAssetsChainid() uint32 { + if x != nil { + return x.AssetsChainid + } + return 0 +} + +func (x *TransactionCoinFrom) GetAssetsId() uint32 { + if x != nil { + return x.AssetsId + } + return 0 +} + +func (x *TransactionCoinFrom) GetIdAmount() []byte { + if x != nil { + return x.IdAmount + } + return nil +} + +func (x *TransactionCoinFrom) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *TransactionCoinFrom) GetLocked() uint32 { + if x != nil { + return x.Locked + } + return 0 +} + +// Transaction to a destination +type TransactionCoinTo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // destination address + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Chain ID + AssetsChainid uint32 `protobuf:"varint,2,opt,name=assets_chainid,json=assetsChainid,proto3" json:"assets_chainid,omitempty"` + // ID of the asset + AssetsId uint32 `protobuf:"varint,3,opt,name=assets_id,json=assetsId,proto3" json:"assets_id,omitempty"` + // transaction amount (uint256, serialized big endian) + IdAmount []byte `protobuf:"bytes,4,opt,name=id_amount,json=idAmount,proto3" json:"id_amount,omitempty"` + // lock time + LockTime uint32 `protobuf:"varint,5,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionCoinTo) Reset() { + *x = TransactionCoinTo{} + mi := &file_NULS_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionCoinTo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionCoinTo) ProtoMessage() {} + +func (x *TransactionCoinTo) ProtoReflect() protoreflect.Message { + mi := &file_NULS_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionCoinTo.ProtoReflect.Descriptor instead. +func (*TransactionCoinTo) Descriptor() ([]byte, []int) { + return file_NULS_proto_rawDescGZIP(), []int{1} +} + +func (x *TransactionCoinTo) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransactionCoinTo) GetAssetsChainid() uint32 { + if x != nil { + return x.AssetsChainid + } + return 0 +} + +func (x *TransactionCoinTo) GetAssetsId() uint32 { + if x != nil { + return x.AssetsId + } + return 0 +} + +func (x *TransactionCoinTo) GetIdAmount() []byte { + if x != nil { + return x.IdAmount + } + return nil +} + +func (x *TransactionCoinTo) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +// A signature +type Signature struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Length of public key data + PkeyLen uint32 `protobuf:"varint,1,opt,name=pkey_len,json=pkeyLen,proto3" json:"pkey_len,omitempty"` + // The public key + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The length of the signature + SigLen uint32 `protobuf:"varint,3,opt,name=sig_len,json=sigLen,proto3" json:"sig_len,omitempty"` + // The signature data + Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Signature) Reset() { + *x = Signature{} + mi := &file_NULS_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature) ProtoMessage() {} + +func (x *Signature) ProtoReflect() protoreflect.Message { + mi := &file_NULS_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_NULS_proto_rawDescGZIP(), []int{2} +} + +func (x *Signature) GetPkeyLen() uint32 { + if x != nil { + return x.PkeyLen + } + return 0 +} + +func (x *Signature) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *Signature) GetSigLen() uint32 { + if x != nil { + return x.SigLen + } + return 0 +} + +func (x *Signature) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +// A transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // transaction type + Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` + // Timestamp of the transaction + Timestamp uint32 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Optional string remark + Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark,omitempty"` + // The raw data + TxData []byte `protobuf:"bytes,4,opt,name=tx_data,json=txData,proto3" json:"tx_data,omitempty"` + // CoinFrom + Input []*TransactionCoinFrom `protobuf:"bytes,5,rep,name=input,proto3" json:"input,omitempty"` + // CoinTo + Output []*TransactionCoinTo `protobuf:"bytes,6,rep,name=output,proto3" json:"output,omitempty"` + // Signature + TxSigs *Signature `protobuf:"bytes,7,opt,name=tx_sigs,json=txSigs,proto3" json:"tx_sigs,omitempty"` + // Tx hash + Hash uint32 `protobuf:"varint,8,opt,name=hash,proto3" json:"hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_NULS_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_NULS_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_NULS_proto_rawDescGZIP(), []int{3} +} + +func (x *Transaction) GetType() uint32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *Transaction) GetTimestamp() uint32 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Transaction) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +func (x *Transaction) GetTxData() []byte { + if x != nil { + return x.TxData + } + return nil +} + +func (x *Transaction) GetInput() []*TransactionCoinFrom { + if x != nil { + return x.Input + } + return nil +} + +func (x *Transaction) GetOutput() []*TransactionCoinTo { + if x != nil { + return x.Output + } + return nil +} + +func (x *Transaction) GetTxSigs() *Signature { + if x != nil { + return x.TxSigs + } + return nil +} + +func (x *Transaction) GetHash() uint32 { + if x != nil { + return x.Hash + } + return 0 +} + +// Input data necessary to create a signed order. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Source address + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + // Destination address + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + // Transfer amount (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // Chain ID + ChainId uint32 `protobuf:"varint,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // Asset ID + IdassetsId uint32 `protobuf:"varint,6,opt,name=idassets_id,json=idassetsId,proto3" json:"idassets_id,omitempty"` + // The last 8 bytes of latest transaction hash + Nonce []byte `protobuf:"bytes,7,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Optional memo remark + Remark string `protobuf:"bytes,8,opt,name=remark,proto3" json:"remark,omitempty"` + // Account balance + Balance []byte `protobuf:"bytes,9,opt,name=balance,proto3" json:"balance,omitempty"` + // time, accurate to the second + Timestamp uint32 `protobuf:"varint,10,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // external address paying fee, required for token transfer, optional for NULS transfer, depending on if an external fee payer is provided. If provided, it will be the fee paying address. + FeePayer string `protobuf:"bytes,11,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + // fee payer address nonce, required for token transfer, optional for NULS transfer, depending on if fee_payer is provided. + FeePayerNonce []byte `protobuf:"bytes,12,opt,name=fee_payer_nonce,json=feePayerNonce,proto3" json:"fee_payer_nonce,omitempty"` + // fee payer address private key, required for token transfer, optional for NULS transfer, depending on if fee_payer is provided. + FeePayerPrivateKey []byte `protobuf:"bytes,13,opt,name=fee_payer_private_key,json=feePayerPrivateKey,proto3" json:"fee_payer_private_key,omitempty"` + // fee payer NULS balance, it is required for token transfer. optional for NULS transfer, depending on if fee_payer is provided. + FeePayerBalance []byte `protobuf:"bytes,14,opt,name=fee_payer_balance,json=feePayerBalance,proto3" json:"fee_payer_balance,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_NULS_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_NULS_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_NULS_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *SigningInput) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *SigningInput) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SigningInput) GetChainId() uint32 { + if x != nil { + return x.ChainId + } + return 0 +} + +func (x *SigningInput) GetIdassetsId() uint32 { + if x != nil { + return x.IdassetsId + } + return 0 +} + +func (x *SigningInput) GetNonce() []byte { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *SigningInput) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +func (x *SigningInput) GetBalance() []byte { + if x != nil { + return x.Balance + } + return nil +} + +func (x *SigningInput) GetTimestamp() uint32 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SigningInput) GetFeePayer() string { + if x != nil { + return x.FeePayer + } + return "" +} + +func (x *SigningInput) GetFeePayerNonce() []byte { + if x != nil { + return x.FeePayerNonce + } + return nil +} + +func (x *SigningInput) GetFeePayerPrivateKey() []byte { + if x != nil { + return x.FeePayerPrivateKey + } + return nil +} + +func (x *SigningInput) GetFeePayerBalance() []byte { + if x != nil { + return x.FeePayerBalance + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Encoded transaction + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_NULS_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_NULS_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_NULS_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_NULS_proto protoreflect.FileDescriptor + +const file_NULS_proto_rawDesc = "" + + "\n" + + "\n" + + "NULS.proto\x12\rTW.NULS.Proto\x1a\fCommon.proto\"\xc7\x01\n" + + "\x13TransactionCoinFrom\x12!\n" + + "\ffrom_address\x18\x01 \x01(\tR\vfromAddress\x12%\n" + + "\x0eassets_chainid\x18\x02 \x01(\rR\rassetsChainid\x12\x1b\n" + + "\tassets_id\x18\x03 \x01(\rR\bassetsId\x12\x1b\n" + + "\tid_amount\x18\x04 \x01(\fR\bidAmount\x12\x14\n" + + "\x05nonce\x18\x05 \x01(\fR\x05nonce\x12\x16\n" + + "\x06locked\x18\x06 \x01(\rR\x06locked\"\xb0\x01\n" + + "\x11TransactionCoinTo\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12%\n" + + "\x0eassets_chainid\x18\x02 \x01(\rR\rassetsChainid\x12\x1b\n" + + "\tassets_id\x18\x03 \x01(\rR\bassetsId\x12\x1b\n" + + "\tid_amount\x18\x04 \x01(\fR\bidAmount\x12\x1b\n" + + "\tlock_time\x18\x05 \x01(\rR\blockTime\"|\n" + + "\tSignature\x12\x19\n" + + "\bpkey_len\x18\x01 \x01(\rR\apkeyLen\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\x17\n" + + "\asig_len\x18\x03 \x01(\rR\x06sigLen\x12\x1c\n" + + "\tsignature\x18\x04 \x01(\fR\tsignature\"\xab\x02\n" + + "\vTransaction\x12\x12\n" + + "\x04type\x18\x01 \x01(\rR\x04type\x12\x1c\n" + + "\ttimestamp\x18\x02 \x01(\rR\ttimestamp\x12\x16\n" + + "\x06remark\x18\x03 \x01(\tR\x06remark\x12\x17\n" + + "\atx_data\x18\x04 \x01(\fR\x06txData\x128\n" + + "\x05input\x18\x05 \x03(\v2\".TW.NULS.Proto.TransactionCoinFromR\x05input\x128\n" + + "\x06output\x18\x06 \x03(\v2 .TW.NULS.Proto.TransactionCoinToR\x06output\x121\n" + + "\atx_sigs\x18\a \x01(\v2\x18.TW.NULS.Proto.SignatureR\x06txSigs\x12\x12\n" + + "\x04hash\x18\b \x01(\rR\x04hash\"\xb1\x03\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x12\n" + + "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\x12\x16\n" + + "\x06amount\x18\x04 \x01(\fR\x06amount\x12\x19\n" + + "\bchain_id\x18\x05 \x01(\rR\achainId\x12\x1f\n" + + "\vidassets_id\x18\x06 \x01(\rR\n" + + "idassetsId\x12\x14\n" + + "\x05nonce\x18\a \x01(\fR\x05nonce\x12\x16\n" + + "\x06remark\x18\b \x01(\tR\x06remark\x12\x18\n" + + "\abalance\x18\t \x01(\fR\abalance\x12\x1c\n" + + "\ttimestamp\x18\n" + + " \x01(\rR\ttimestamp\x12\x1b\n" + + "\tfee_payer\x18\v \x01(\tR\bfeePayer\x12&\n" + + "\x0ffee_payer_nonce\x18\f \x01(\fR\rfeePayerNonce\x121\n" + + "\x15fee_payer_private_key\x18\r \x01(\fR\x12feePayerPrivateKey\x12*\n" + + "\x11fee_payer_balance\x18\x0e \x01(\fR\x0ffeePayerBalance\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_NULS_proto_rawDescOnce sync.Once + file_NULS_proto_rawDescData []byte +) + +func file_NULS_proto_rawDescGZIP() []byte { + file_NULS_proto_rawDescOnce.Do(func() { + file_NULS_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_NULS_proto_rawDesc), len(file_NULS_proto_rawDesc))) + }) + return file_NULS_proto_rawDescData +} + +var file_NULS_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_NULS_proto_goTypes = []any{ + (*TransactionCoinFrom)(nil), // 0: TW.NULS.Proto.TransactionCoinFrom + (*TransactionCoinTo)(nil), // 1: TW.NULS.Proto.TransactionCoinTo + (*Signature)(nil), // 2: TW.NULS.Proto.Signature + (*Transaction)(nil), // 3: TW.NULS.Proto.Transaction + (*SigningInput)(nil), // 4: TW.NULS.Proto.SigningInput + (*SigningOutput)(nil), // 5: TW.NULS.Proto.SigningOutput + (common.SigningError)(0), // 6: TW.Common.Proto.SigningError +} +var file_NULS_proto_depIdxs = []int32{ + 0, // 0: TW.NULS.Proto.Transaction.input:type_name -> TW.NULS.Proto.TransactionCoinFrom + 1, // 1: TW.NULS.Proto.Transaction.output:type_name -> TW.NULS.Proto.TransactionCoinTo + 2, // 2: TW.NULS.Proto.Transaction.tx_sigs:type_name -> TW.NULS.Proto.Signature + 6, // 3: TW.NULS.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_NULS_proto_init() } +func file_NULS_proto_init() { + if File_NULS_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_NULS_proto_rawDesc), len(file_NULS_proto_rawDesc)), + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_NULS_proto_goTypes, + DependencyIndexes: file_NULS_proto_depIdxs, + MessageInfos: file_NULS_proto_msgTypes, + }.Build() + File_NULS_proto = out.File + file_NULS_proto_goTypes = nil + file_NULS_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/oasis/Oasis.pb.go b/wrapper/go-wrapper/protos/oasis/Oasis.pb.go new file mode 100644 index 00000000000..46b9c0b3659 --- /dev/null +++ b/wrapper/go-wrapper/protos/oasis/Oasis.pb.go @@ -0,0 +1,564 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Oasis.proto + +package oasis + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transfer +type TransferMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // destination address + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + // Gas price + GasPrice uint64 `protobuf:"varint,2,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Amount values strings prefixed by zero. e.g. "\u000010000000" + GasAmount string `protobuf:"bytes,3,opt,name=gas_amount,json=gasAmount,proto3" json:"gas_amount,omitempty"` + // Amount values strings prefixed by zero + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint64 `protobuf:"varint,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Context, see https://docs.oasis.dev/oasis-core/common-functionality/crypto#domain-separation + Context string `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferMessage) Reset() { + *x = TransferMessage{} + mi := &file_Oasis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferMessage) ProtoMessage() {} + +func (x *TransferMessage) ProtoReflect() protoreflect.Message { + mi := &file_Oasis_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferMessage.ProtoReflect.Descriptor instead. +func (*TransferMessage) Descriptor() ([]byte, []int) { + return file_Oasis_proto_rawDescGZIP(), []int{0} +} + +func (x *TransferMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TransferMessage) GetGasPrice() uint64 { + if x != nil { + return x.GasPrice + } + return 0 +} + +func (x *TransferMessage) GetGasAmount() string { + if x != nil { + return x.GasAmount + } + return "" +} + +func (x *TransferMessage) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *TransferMessage) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *TransferMessage) GetContext() string { + if x != nil { + return x.Context + } + return "" +} + +type EscrowMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + GasPrice uint64 `protobuf:"varint,1,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + GasAmount string `protobuf:"bytes,2,opt,name=gas_amount,json=gasAmount,proto3" json:"gas_amount,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"` + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + Context string `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EscrowMessage) Reset() { + *x = EscrowMessage{} + mi := &file_Oasis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EscrowMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EscrowMessage) ProtoMessage() {} + +func (x *EscrowMessage) ProtoReflect() protoreflect.Message { + mi := &file_Oasis_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EscrowMessage.ProtoReflect.Descriptor instead. +func (*EscrowMessage) Descriptor() ([]byte, []int) { + return file_Oasis_proto_rawDescGZIP(), []int{1} +} + +func (x *EscrowMessage) GetGasPrice() uint64 { + if x != nil { + return x.GasPrice + } + return 0 +} + +func (x *EscrowMessage) GetGasAmount() string { + if x != nil { + return x.GasAmount + } + return "" +} + +func (x *EscrowMessage) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *EscrowMessage) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *EscrowMessage) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *EscrowMessage) GetContext() string { + if x != nil { + return x.Context + } + return "" +} + +type ReclaimEscrowMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + GasPrice uint64 `protobuf:"varint,1,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + GasAmount string `protobuf:"bytes,2,opt,name=gas_amount,json=gasAmount,proto3" json:"gas_amount,omitempty"` + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"` + Shares string `protobuf:"bytes,5,opt,name=shares,proto3" json:"shares,omitempty"` + Context string `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReclaimEscrowMessage) Reset() { + *x = ReclaimEscrowMessage{} + mi := &file_Oasis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReclaimEscrowMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReclaimEscrowMessage) ProtoMessage() {} + +func (x *ReclaimEscrowMessage) ProtoReflect() protoreflect.Message { + mi := &file_Oasis_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReclaimEscrowMessage.ProtoReflect.Descriptor instead. +func (*ReclaimEscrowMessage) Descriptor() ([]byte, []int) { + return file_Oasis_proto_rawDescGZIP(), []int{2} +} + +func (x *ReclaimEscrowMessage) GetGasPrice() uint64 { + if x != nil { + return x.GasPrice + } + return 0 +} + +func (x *ReclaimEscrowMessage) GetGasAmount() string { + if x != nil { + return x.GasAmount + } + return "" +} + +func (x *ReclaimEscrowMessage) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *ReclaimEscrowMessage) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *ReclaimEscrowMessage) GetShares() string { + if x != nil { + return x.Shares + } + return "" +} + +func (x *ReclaimEscrowMessage) GetContext() string { + if x != nil { + return x.Context + } + return "" +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Transfer payload + // + // Types that are valid to be assigned to Message: + // + // *SigningInput_Transfer + // *SigningInput_Escrow + // *SigningInput_ReclaimEscrow + Message isSigningInput_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Oasis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Oasis_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Oasis_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetMessage() isSigningInput_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *SigningInput) GetTransfer() *TransferMessage { + if x != nil { + if x, ok := x.Message.(*SigningInput_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *SigningInput) GetEscrow() *EscrowMessage { + if x != nil { + if x, ok := x.Message.(*SigningInput_Escrow); ok { + return x.Escrow + } + } + return nil +} + +func (x *SigningInput) GetReclaimEscrow() *ReclaimEscrowMessage { + if x != nil { + if x, ok := x.Message.(*SigningInput_ReclaimEscrow); ok { + return x.ReclaimEscrow + } + } + return nil +} + +type isSigningInput_Message interface { + isSigningInput_Message() +} + +type SigningInput_Transfer struct { + Transfer *TransferMessage `protobuf:"bytes,2,opt,name=transfer,proto3,oneof"` +} + +type SigningInput_Escrow struct { + Escrow *EscrowMessage `protobuf:"bytes,3,opt,name=escrow,proto3,oneof"` +} + +type SigningInput_ReclaimEscrow struct { + ReclaimEscrow *ReclaimEscrowMessage `protobuf:"bytes,4,opt,name=reclaimEscrow,proto3,oneof"` +} + +func (*SigningInput_Transfer) isSigningInput_Message() {} + +func (*SigningInput_Escrow) isSigningInput_Message() {} + +func (*SigningInput_ReclaimEscrow) isSigningInput_Message() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Oasis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Oasis_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Oasis_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Oasis_proto protoreflect.FileDescriptor + +const file_Oasis_proto_rawDesc = "" + + "\n" + + "\vOasis.proto\x12\x0eTW.Oasis.Proto\x1a\fCommon.proto\"\xa5\x01\n" + + "\x0fTransferMessage\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x1b\n" + + "\tgas_price\x18\x02 \x01(\x04R\bgasPrice\x12\x1d\n" + + "\n" + + "gas_amount\x18\x03 \x01(\tR\tgasAmount\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x12\x14\n" + + "\x05nonce\x18\x05 \x01(\x04R\x05nonce\x12\x18\n" + + "\acontext\x18\x06 \x01(\tR\acontext\"\xad\x01\n" + + "\rEscrowMessage\x12\x1b\n" + + "\tgas_price\x18\x01 \x01(\x04R\bgasPrice\x12\x1d\n" + + "\n" + + "gas_amount\x18\x02 \x01(\tR\tgasAmount\x12\x14\n" + + "\x05nonce\x18\x03 \x01(\x04R\x05nonce\x12\x18\n" + + "\aaccount\x18\x04 \x01(\tR\aaccount\x12\x16\n" + + "\x06amount\x18\x05 \x01(\tR\x06amount\x12\x18\n" + + "\acontext\x18\x06 \x01(\tR\acontext\"\xb4\x01\n" + + "\x14ReclaimEscrowMessage\x12\x1b\n" + + "\tgas_price\x18\x01 \x01(\x04R\bgasPrice\x12\x1d\n" + + "\n" + + "gas_amount\x18\x02 \x01(\tR\tgasAmount\x12\x14\n" + + "\x05nonce\x18\x03 \x01(\x04R\x05nonce\x12\x18\n" + + "\aaccount\x18\x04 \x01(\tR\aaccount\x12\x16\n" + + "\x06shares\x18\x05 \x01(\tR\x06shares\x12\x18\n" + + "\acontext\x18\x06 \x01(\tR\acontext\"\x80\x02\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12=\n" + + "\btransfer\x18\x02 \x01(\v2\x1f.TW.Oasis.Proto.TransferMessageH\x00R\btransfer\x127\n" + + "\x06escrow\x18\x03 \x01(\v2\x1d.TW.Oasis.Proto.EscrowMessageH\x00R\x06escrow\x12L\n" + + "\rreclaimEscrow\x18\x04 \x01(\v2$.TW.Oasis.Proto.ReclaimEscrowMessageH\x00R\rreclaimEscrowB\t\n" + + "\amessage\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Oasis_proto_rawDescOnce sync.Once + file_Oasis_proto_rawDescData []byte +) + +func file_Oasis_proto_rawDescGZIP() []byte { + file_Oasis_proto_rawDescOnce.Do(func() { + file_Oasis_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Oasis_proto_rawDesc), len(file_Oasis_proto_rawDesc))) + }) + return file_Oasis_proto_rawDescData +} + +var file_Oasis_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_Oasis_proto_goTypes = []any{ + (*TransferMessage)(nil), // 0: TW.Oasis.Proto.TransferMessage + (*EscrowMessage)(nil), // 1: TW.Oasis.Proto.EscrowMessage + (*ReclaimEscrowMessage)(nil), // 2: TW.Oasis.Proto.ReclaimEscrowMessage + (*SigningInput)(nil), // 3: TW.Oasis.Proto.SigningInput + (*SigningOutput)(nil), // 4: TW.Oasis.Proto.SigningOutput + (common.SigningError)(0), // 5: TW.Common.Proto.SigningError +} +var file_Oasis_proto_depIdxs = []int32{ + 0, // 0: TW.Oasis.Proto.SigningInput.transfer:type_name -> TW.Oasis.Proto.TransferMessage + 1, // 1: TW.Oasis.Proto.SigningInput.escrow:type_name -> TW.Oasis.Proto.EscrowMessage + 2, // 2: TW.Oasis.Proto.SigningInput.reclaimEscrow:type_name -> TW.Oasis.Proto.ReclaimEscrowMessage + 5, // 3: TW.Oasis.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_Oasis_proto_init() } +func file_Oasis_proto_init() { + if File_Oasis_proto != nil { + return + } + file_Oasis_proto_msgTypes[3].OneofWrappers = []any{ + (*SigningInput_Transfer)(nil), + (*SigningInput_Escrow)(nil), + (*SigningInput_ReclaimEscrow)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Oasis_proto_rawDesc), len(file_Oasis_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Oasis_proto_goTypes, + DependencyIndexes: file_Oasis_proto_depIdxs, + MessageInfos: file_Oasis_proto_msgTypes, + }.Build() + File_Oasis_proto = out.File + file_Oasis_proto_goTypes = nil + file_Oasis_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/ontology/Ontology.pb.go b/wrapper/go-wrapper/protos/ontology/Ontology.pb.go new file mode 100644 index 00000000000..557edf9faf4 --- /dev/null +++ b/wrapper/go-wrapper/protos/ontology/Ontology.pb.go @@ -0,0 +1,309 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Ontology.proto + +package ontology + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Contract ID, e.g. "ONT" + Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` + // Method, e.g. "transfer" + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + // The secret private key used for signing (32 bytes). + OwnerPrivateKey []byte `protobuf:"bytes,3,opt,name=owner_private_key,json=ownerPrivateKey,proto3" json:"owner_private_key,omitempty"` + // base58 encode address string (160-bit number) + ToAddress string `protobuf:"bytes,4,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Transfer amount + Amount uint64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` + // Private key of the payer + PayerPrivateKey []byte `protobuf:"bytes,6,opt,name=payer_private_key,json=payerPrivateKey,proto3" json:"payer_private_key,omitempty"` + // Gas price + GasPrice uint64 `protobuf:"varint,7,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // Limit for gas used + GasLimit uint64 `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // base58 encode address string (160-bit number) + QueryAddress string `protobuf:"bytes,9,opt,name=query_address,json=queryAddress,proto3" json:"query_address,omitempty"` + // Nonce (should be larger than in the last transaction of the account) + Nonce uint32 `protobuf:"varint,10,opt,name=nonce,proto3" json:"nonce,omitempty"` + // base58 encode address string (160-bit number) + OwnerAddress string `protobuf:"bytes,11,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // base58 encode address string (160-bit number) + PayerAddress string `protobuf:"bytes,12,opt,name=payer_address,json=payerAddress,proto3" json:"payer_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Ontology_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Ontology_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Ontology_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetContract() string { + if x != nil { + return x.Contract + } + return "" +} + +func (x *SigningInput) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *SigningInput) GetOwnerPrivateKey() []byte { + if x != nil { + return x.OwnerPrivateKey + } + return nil +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *SigningInput) GetPayerPrivateKey() []byte { + if x != nil { + return x.PayerPrivateKey + } + return nil +} + +func (x *SigningInput) GetGasPrice() uint64 { + if x != nil { + return x.GasPrice + } + return 0 +} + +func (x *SigningInput) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *SigningInput) GetQueryAddress() string { + if x != nil { + return x.QueryAddress + } + return "" +} + +func (x *SigningInput) GetNonce() uint32 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *SigningInput) GetPayerAddress() string { + if x != nil { + return x.PayerAddress + } + return "" +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Ontology_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Ontology_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Ontology_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Ontology_proto protoreflect.FileDescriptor + +const file_Ontology_proto_rawDesc = "" + + "\n" + + "\x0eOntology.proto\x12\x11TW.Ontology.Proto\x1a\fCommon.proto\"\x90\x03\n" + + "\fSigningInput\x12\x1a\n" + + "\bcontract\x18\x01 \x01(\tR\bcontract\x12\x16\n" + + "\x06method\x18\x02 \x01(\tR\x06method\x12*\n" + + "\x11owner_private_key\x18\x03 \x01(\fR\x0fownerPrivateKey\x12\x1d\n" + + "\n" + + "to_address\x18\x04 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x05 \x01(\x04R\x06amount\x12*\n" + + "\x11payer_private_key\x18\x06 \x01(\fR\x0fpayerPrivateKey\x12\x1b\n" + + "\tgas_price\x18\a \x01(\x04R\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\b \x01(\x04R\bgasLimit\x12#\n" + + "\rquery_address\x18\t \x01(\tR\fqueryAddress\x12\x14\n" + + "\x05nonce\x18\n" + + " \x01(\rR\x05nonce\x12#\n" + + "\rowner_address\x18\v \x01(\tR\fownerAddress\x12#\n" + + "\rpayer_address\x18\f \x01(\tR\fpayerAddress\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Ontology_proto_rawDescOnce sync.Once + file_Ontology_proto_rawDescData []byte +) + +func file_Ontology_proto_rawDescGZIP() []byte { + file_Ontology_proto_rawDescOnce.Do(func() { + file_Ontology_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Ontology_proto_rawDesc), len(file_Ontology_proto_rawDesc))) + }) + return file_Ontology_proto_rawDescData +} + +var file_Ontology_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Ontology_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Ontology.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Ontology.Proto.SigningOutput + (common.SigningError)(0), // 2: TW.Common.Proto.SigningError +} +var file_Ontology_proto_depIdxs = []int32{ + 2, // 0: TW.Ontology.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Ontology_proto_init() } +func file_Ontology_proto_init() { + if File_Ontology_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Ontology_proto_rawDesc), len(file_Ontology_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Ontology_proto_goTypes, + DependencyIndexes: file_Ontology_proto_depIdxs, + MessageInfos: file_Ontology_proto_msgTypes, + }.Build() + File_Ontology_proto = out.File + file_Ontology_proto_goTypes = nil + file_Ontology_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/pactus/Pactus.pb.go b/wrapper/go-wrapper/protos/pactus/Pactus.pb.go new file mode 100644 index 00000000000..0d4b2ae2d9f --- /dev/null +++ b/wrapper/go-wrapper/protos/pactus/Pactus.pb.go @@ -0,0 +1,504 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Pactus.proto + +package pactus + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TransactionMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The lock time for the transaction. + LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // The transaction fee in NanoPAC. + Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` + // A memo string for the transaction (optional). + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` + // Types that are valid to be assigned to Payload: + // + // *TransactionMessage_Transfer + // *TransactionMessage_Bond + Payload isTransactionMessage_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionMessage) Reset() { + *x = TransactionMessage{} + mi := &file_Pactus_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionMessage) ProtoMessage() {} + +func (x *TransactionMessage) ProtoReflect() protoreflect.Message { + mi := &file_Pactus_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionMessage.ProtoReflect.Descriptor instead. +func (*TransactionMessage) Descriptor() ([]byte, []int) { + return file_Pactus_proto_rawDescGZIP(), []int{0} +} + +func (x *TransactionMessage) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *TransactionMessage) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionMessage) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *TransactionMessage) GetPayload() isTransactionMessage_Payload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *TransactionMessage) GetTransfer() *TransferPayload { + if x != nil { + if x, ok := x.Payload.(*TransactionMessage_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *TransactionMessage) GetBond() *BondPayload { + if x != nil { + if x, ok := x.Payload.(*TransactionMessage_Bond); ok { + return x.Bond + } + } + return nil +} + +type isTransactionMessage_Payload interface { + isTransactionMessage_Payload() +} + +type TransactionMessage_Transfer struct { + Transfer *TransferPayload `protobuf:"bytes,10,opt,name=transfer,proto3,oneof"` +} + +type TransactionMessage_Bond struct { + Bond *BondPayload `protobuf:"bytes,11,opt,name=bond,proto3,oneof"` +} + +func (*TransactionMessage_Transfer) isTransactionMessage_Payload() {} + +func (*TransactionMessage_Bond) isTransactionMessage_Payload() {} + +// Transfer payload for creating a Transfer transaction between two accounts. +type TransferPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The sender's account address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's account address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The amount to be transferred, specified in NanoPAC. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferPayload) Reset() { + *x = TransferPayload{} + mi := &file_Pactus_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferPayload) ProtoMessage() {} + +func (x *TransferPayload) ProtoReflect() protoreflect.Message { + mi := &file_Pactus_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferPayload.ProtoReflect.Descriptor instead. +func (*TransferPayload) Descriptor() ([]byte, []int) { + return file_Pactus_proto_rawDescGZIP(), []int{1} +} + +func (x *TransferPayload) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *TransferPayload) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *TransferPayload) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Bond payload for creating a Bond transaction from an account to a validator. +type BondPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The sender's account address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's validator address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The stake amount in NanoPAC. + Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` + // The public key of the validator (only set when creating a new validator). + PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BondPayload) Reset() { + *x = BondPayload{} + mi := &file_Pactus_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BondPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BondPayload) ProtoMessage() {} + +func (x *BondPayload) ProtoReflect() protoreflect.Message { + mi := &file_Pactus_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BondPayload.ProtoReflect.Descriptor instead. +func (*BondPayload) Descriptor() ([]byte, []int) { + return file_Pactus_proto_rawDescGZIP(), []int{2} +} + +func (x *BondPayload) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *BondPayload) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *BondPayload) GetStake() int64 { + if x != nil { + return x.Stake + } + return 0 +} + +func (x *BondPayload) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + Transaction *TransactionMessage `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Pactus_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Pactus_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Pactus_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTransaction() *TransactionMessage { + if x != nil { + return x.Transaction + } + return nil +} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction ID (Hash). + TransactionId []byte `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // Signed and encoded transaction bytes. + SignedTransactionData []byte `protobuf:"bytes,2,opt,name=signed_transaction_data,json=signedTransactionData,proto3" json:"signed_transaction_data,omitempty"` + // Signature the signed transaction. + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + // A possible error, `OK` if none. + Error common.SigningError `protobuf:"varint,4,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Detailed error message, if any. + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Pactus_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Pactus_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Pactus_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningOutput) GetTransactionId() []byte { + if x != nil { + return x.TransactionId + } + return nil +} + +func (x *SigningOutput) GetSignedTransactionData() []byte { + if x != nil { + return x.SignedTransactionData + } + return nil +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Pactus_proto protoreflect.FileDescriptor + +const file_Pactus_proto_rawDesc = "" + + "\n" + + "\fPactus.proto\x12\x0fTW.Pactus.Proto\x1a\fCommon.proto\"\xd6\x01\n" + + "\x12TransactionMessage\x12\x1b\n" + + "\tlock_time\x18\x01 \x01(\rR\blockTime\x12\x10\n" + + "\x03fee\x18\x02 \x01(\x03R\x03fee\x12\x12\n" + + "\x04memo\x18\x03 \x01(\tR\x04memo\x12>\n" + + "\btransfer\x18\n" + + " \x01(\v2 .TW.Pactus.Proto.TransferPayloadH\x00R\btransfer\x122\n" + + "\x04bond\x18\v \x01(\v2\x1c.TW.Pactus.Proto.BondPayloadH\x00R\x04bondB\t\n" + + "\apayload\"]\n" + + "\x0fTransferPayload\x12\x16\n" + + "\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n" + + "\breceiver\x18\x02 \x01(\tR\breceiver\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"v\n" + + "\vBondPayload\x12\x16\n" + + "\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n" + + "\breceiver\x18\x02 \x01(\tR\breceiver\x12\x14\n" + + "\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n" + + "\n" + + "public_key\x18\x04 \x01(\tR\tpublicKey\"v\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12E\n" + + "\vtransaction\x18\x02 \x01(\v2#.TW.Pactus.Proto.TransactionMessageR\vtransaction\"\xe6\x01\n" + + "\rSigningOutput\x12%\n" + + "\x0etransaction_id\x18\x01 \x01(\fR\rtransactionId\x126\n" + + "\x17signed_transaction_data\x18\x02 \x01(\fR\x15signedTransactionData\x12\x1c\n" + + "\tsignature\x18\x03 \x01(\fR\tsignature\x123\n" + + "\x05error\x18\x04 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x05 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Pactus_proto_rawDescOnce sync.Once + file_Pactus_proto_rawDescData []byte +) + +func file_Pactus_proto_rawDescGZIP() []byte { + file_Pactus_proto_rawDescOnce.Do(func() { + file_Pactus_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Pactus_proto_rawDesc), len(file_Pactus_proto_rawDesc))) + }) + return file_Pactus_proto_rawDescData +} + +var file_Pactus_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_Pactus_proto_goTypes = []any{ + (*TransactionMessage)(nil), // 0: TW.Pactus.Proto.TransactionMessage + (*TransferPayload)(nil), // 1: TW.Pactus.Proto.TransferPayload + (*BondPayload)(nil), // 2: TW.Pactus.Proto.BondPayload + (*SigningInput)(nil), // 3: TW.Pactus.Proto.SigningInput + (*SigningOutput)(nil), // 4: TW.Pactus.Proto.SigningOutput + (common.SigningError)(0), // 5: TW.Common.Proto.SigningError +} +var file_Pactus_proto_depIdxs = []int32{ + 1, // 0: TW.Pactus.Proto.TransactionMessage.transfer:type_name -> TW.Pactus.Proto.TransferPayload + 2, // 1: TW.Pactus.Proto.TransactionMessage.bond:type_name -> TW.Pactus.Proto.BondPayload + 0, // 2: TW.Pactus.Proto.SigningInput.transaction:type_name -> TW.Pactus.Proto.TransactionMessage + 5, // 3: TW.Pactus.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_Pactus_proto_init() } +func file_Pactus_proto_init() { + if File_Pactus_proto != nil { + return + } + file_Pactus_proto_msgTypes[0].OneofWrappers = []any{ + (*TransactionMessage_Transfer)(nil), + (*TransactionMessage_Bond)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Pactus_proto_rawDesc), len(file_Pactus_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Pactus_proto_goTypes, + DependencyIndexes: file_Pactus_proto_depIdxs, + MessageInfos: file_Pactus_proto_msgTypes, + }.Build() + File_Pactus_proto = out.File + file_Pactus_proto_goTypes = nil + file_Pactus_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/polkadot/Polkadot.pb.go b/wrapper/go-wrapper/protos/polkadot/Polkadot.pb.go new file mode 100644 index 00000000000..2eb99e49dd7 --- /dev/null +++ b/wrapper/go-wrapper/protos/polkadot/Polkadot.pb.go @@ -0,0 +1,1900 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Polkadot.proto + +package polkadot + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Destination options for reward +type RewardDestination int32 + +const ( + RewardDestination_STAKED RewardDestination = 0 + RewardDestination_STASH RewardDestination = 1 + RewardDestination_CONTROLLER RewardDestination = 2 +) + +// Enum value maps for RewardDestination. +var ( + RewardDestination_name = map[int32]string{ + 0: "STAKED", + 1: "STASH", + 2: "CONTROLLER", + } + RewardDestination_value = map[string]int32{ + "STAKED": 0, + "STASH": 1, + "CONTROLLER": 2, + } +) + +func (x RewardDestination) Enum() *RewardDestination { + p := new(RewardDestination) + *p = x + return p +} + +func (x RewardDestination) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RewardDestination) Descriptor() protoreflect.EnumDescriptor { + return file_Polkadot_proto_enumTypes[0].Descriptor() +} + +func (RewardDestination) Type() protoreflect.EnumType { + return &file_Polkadot_proto_enumTypes[0] +} + +func (x RewardDestination) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RewardDestination.Descriptor instead. +func (RewardDestination) EnumDescriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{0} +} + +// An era, a period defined by a starting block and length +type Era struct { + state protoimpl.MessageState `protogen:"open.v1"` + // recent block number (called phase in polkadot code), should match block hash + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + // length of period, calculated from block number, e.g. 64 + Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Era) Reset() { + *x = Era{} + mi := &file_Polkadot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Era) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Era) ProtoMessage() {} + +func (x *Era) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Era.ProtoReflect.Descriptor instead. +func (*Era) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{0} +} + +func (x *Era) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *Era) GetPeriod() uint64 { + if x != nil { + return x.Period + } + return 0 +} + +// Readable decoded call indices can be found at https://www.subscan.io/ +type CustomCallIndices struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Module index. + ModuleIndex int32 `protobuf:"varint,4,opt,name=module_index,json=moduleIndex,proto3" json:"module_index,omitempty"` + // Method index. + MethodIndex int32 `protobuf:"varint,5,opt,name=method_index,json=methodIndex,proto3" json:"method_index,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomCallIndices) Reset() { + *x = CustomCallIndices{} + mi := &file_Polkadot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomCallIndices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomCallIndices) ProtoMessage() {} + +func (x *CustomCallIndices) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomCallIndices.ProtoReflect.Descriptor instead. +func (*CustomCallIndices) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{1} +} + +func (x *CustomCallIndices) GetModuleIndex() int32 { + if x != nil { + return x.ModuleIndex + } + return 0 +} + +func (x *CustomCallIndices) GetMethodIndex() int32 { + if x != nil { + return x.MethodIndex + } + return 0 +} + +// Optional call indices. +// Must be set if `SigningInput::network` is different from `Polkadot` and `Kusama`. +type CallIndices struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *CallIndices_Custom + Variant isCallIndices_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallIndices) Reset() { + *x = CallIndices{} + mi := &file_Polkadot_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallIndices) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallIndices) ProtoMessage() {} + +func (x *CallIndices) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallIndices.ProtoReflect.Descriptor instead. +func (*CallIndices) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{2} +} + +func (x *CallIndices) GetVariant() isCallIndices_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *CallIndices) GetCustom() *CustomCallIndices { + if x != nil { + if x, ok := x.Variant.(*CallIndices_Custom); ok { + return x.Custom + } + } + return nil +} + +type isCallIndices_Variant interface { + isCallIndices_Variant() +} + +type CallIndices_Custom struct { + Custom *CustomCallIndices `protobuf:"bytes,1,opt,name=custom,proto3,oneof"` +} + +func (*CallIndices_Custom) isCallIndices_Variant() {} + +// Balance transfer transaction +type Balance struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to MessageOneof: + // + // *Balance_Transfer_ + // *Balance_BatchTransfer_ + // *Balance_AssetTransfer_ + // *Balance_BatchAssetTransfer_ + MessageOneof isBalance_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Balance) Reset() { + *x = Balance{} + mi := &file_Polkadot_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Balance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balance) ProtoMessage() {} + +func (x *Balance) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balance.ProtoReflect.Descriptor instead. +func (*Balance) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{3} +} + +func (x *Balance) GetMessageOneof() isBalance_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *Balance) GetTransfer() *Balance_Transfer { + if x != nil { + if x, ok := x.MessageOneof.(*Balance_Transfer_); ok { + return x.Transfer + } + } + return nil +} + +func (x *Balance) GetBatchTransfer() *Balance_BatchTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*Balance_BatchTransfer_); ok { + return x.BatchTransfer + } + } + return nil +} + +func (x *Balance) GetAssetTransfer() *Balance_AssetTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*Balance_AssetTransfer_); ok { + return x.AssetTransfer + } + } + return nil +} + +func (x *Balance) GetBatchAssetTransfer() *Balance_BatchAssetTransfer { + if x != nil { + if x, ok := x.MessageOneof.(*Balance_BatchAssetTransfer_); ok { + return x.BatchAssetTransfer + } + } + return nil +} + +type isBalance_MessageOneof interface { + isBalance_MessageOneof() +} + +type Balance_Transfer_ struct { + Transfer *Balance_Transfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"` +} + +type Balance_BatchTransfer_ struct { + BatchTransfer *Balance_BatchTransfer `protobuf:"bytes,2,opt,name=batchTransfer,proto3,oneof"` +} + +type Balance_AssetTransfer_ struct { + AssetTransfer *Balance_AssetTransfer `protobuf:"bytes,3,opt,name=asset_transfer,json=assetTransfer,proto3,oneof"` +} + +type Balance_BatchAssetTransfer_ struct { + BatchAssetTransfer *Balance_BatchAssetTransfer `protobuf:"bytes,4,opt,name=batch_asset_transfer,json=batchAssetTransfer,proto3,oneof"` +} + +func (*Balance_Transfer_) isBalance_MessageOneof() {} + +func (*Balance_BatchTransfer_) isBalance_MessageOneof() {} + +func (*Balance_AssetTransfer_) isBalance_MessageOneof() {} + +func (*Balance_BatchAssetTransfer_) isBalance_MessageOneof() {} + +// Staking transaction +type Staking struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Payload messsage + // + // Types that are valid to be assigned to MessageOneof: + // + // *Staking_Bond_ + // *Staking_BondAndNominate_ + // *Staking_BondExtra_ + // *Staking_Unbond_ + // *Staking_WithdrawUnbonded_ + // *Staking_Nominate_ + // *Staking_Chill_ + // *Staking_ChillAndUnbond_ + // *Staking_Rebond_ + MessageOneof isStaking_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking) Reset() { + *x = Staking{} + mi := &file_Polkadot_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking) ProtoMessage() {} + +func (x *Staking) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking.ProtoReflect.Descriptor instead. +func (*Staking) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4} +} + +func (x *Staking) GetMessageOneof() isStaking_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *Staking) GetBond() *Staking_Bond { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_Bond_); ok { + return x.Bond + } + } + return nil +} + +func (x *Staking) GetBondAndNominate() *Staking_BondAndNominate { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_BondAndNominate_); ok { + return x.BondAndNominate + } + } + return nil +} + +func (x *Staking) GetBondExtra() *Staking_BondExtra { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_BondExtra_); ok { + return x.BondExtra + } + } + return nil +} + +func (x *Staking) GetUnbond() *Staking_Unbond { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_Unbond_); ok { + return x.Unbond + } + } + return nil +} + +func (x *Staking) GetWithdrawUnbonded() *Staking_WithdrawUnbonded { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_WithdrawUnbonded_); ok { + return x.WithdrawUnbonded + } + } + return nil +} + +func (x *Staking) GetNominate() *Staking_Nominate { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_Nominate_); ok { + return x.Nominate + } + } + return nil +} + +func (x *Staking) GetChill() *Staking_Chill { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_Chill_); ok { + return x.Chill + } + } + return nil +} + +func (x *Staking) GetChillAndUnbond() *Staking_ChillAndUnbond { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_ChillAndUnbond_); ok { + return x.ChillAndUnbond + } + } + return nil +} + +func (x *Staking) GetRebond() *Staking_Rebond { + if x != nil { + if x, ok := x.MessageOneof.(*Staking_Rebond_); ok { + return x.Rebond + } + } + return nil +} + +type isStaking_MessageOneof interface { + isStaking_MessageOneof() +} + +type Staking_Bond_ struct { + Bond *Staking_Bond `protobuf:"bytes,1,opt,name=bond,proto3,oneof"` +} + +type Staking_BondAndNominate_ struct { + BondAndNominate *Staking_BondAndNominate `protobuf:"bytes,2,opt,name=bond_and_nominate,json=bondAndNominate,proto3,oneof"` +} + +type Staking_BondExtra_ struct { + BondExtra *Staking_BondExtra `protobuf:"bytes,3,opt,name=bond_extra,json=bondExtra,proto3,oneof"` +} + +type Staking_Unbond_ struct { + Unbond *Staking_Unbond `protobuf:"bytes,4,opt,name=unbond,proto3,oneof"` +} + +type Staking_WithdrawUnbonded_ struct { + WithdrawUnbonded *Staking_WithdrawUnbonded `protobuf:"bytes,5,opt,name=withdraw_unbonded,json=withdrawUnbonded,proto3,oneof"` +} + +type Staking_Nominate_ struct { + Nominate *Staking_Nominate `protobuf:"bytes,6,opt,name=nominate,proto3,oneof"` +} + +type Staking_Chill_ struct { + Chill *Staking_Chill `protobuf:"bytes,7,opt,name=chill,proto3,oneof"` +} + +type Staking_ChillAndUnbond_ struct { + ChillAndUnbond *Staking_ChillAndUnbond `protobuf:"bytes,8,opt,name=chill_and_unbond,json=chillAndUnbond,proto3,oneof"` +} + +type Staking_Rebond_ struct { + Rebond *Staking_Rebond `protobuf:"bytes,9,opt,name=rebond,proto3,oneof"` +} + +func (*Staking_Bond_) isStaking_MessageOneof() {} + +func (*Staking_BondAndNominate_) isStaking_MessageOneof() {} + +func (*Staking_BondExtra_) isStaking_MessageOneof() {} + +func (*Staking_Unbond_) isStaking_MessageOneof() {} + +func (*Staking_WithdrawUnbonded_) isStaking_MessageOneof() {} + +func (*Staking_Nominate_) isStaking_MessageOneof() {} + +func (*Staking_Chill_) isStaking_MessageOneof() {} + +func (*Staking_ChillAndUnbond_) isStaking_MessageOneof() {} + +func (*Staking_Rebond_) isStaking_MessageOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Recent block hash, or genesis hash if era is not set + BlockHash []byte `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // Genesis block hash (identifies the chain) + GenesisHash []byte `protobuf:"bytes,2,opt,name=genesis_hash,json=genesisHash,proto3" json:"genesis_hash,omitempty"` + // Current account nonce + Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Specification version, e.g. 26. + SpecVersion uint32 `protobuf:"varint,4,opt,name=spec_version,json=specVersion,proto3" json:"spec_version,omitempty"` + // Transaction version, e.g. 5. + TransactionVersion uint32 `protobuf:"varint,5,opt,name=transaction_version,json=transactionVersion,proto3" json:"transaction_version,omitempty"` + // Optional tip to pay, big integer + Tip []byte `protobuf:"bytes,6,opt,name=tip,proto3" json:"tip,omitempty"` + // Optional time validity limit, recommended, for replay-protection. Empty means Immortal. + Era *Era `protobuf:"bytes,7,opt,name=era,proto3" json:"era,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,8,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Network type + Network uint32 `protobuf:"varint,9,opt,name=network,proto3" json:"network,omitempty"` + // Whether enable MultiAddress + MultiAddress bool `protobuf:"varint,10,opt,name=multi_address,json=multiAddress,proto3" json:"multi_address,omitempty"` + // Payload message + // + // Types that are valid to be assigned to MessageOneof: + // + // *SigningInput_BalanceCall + // *SigningInput_StakingCall + MessageOneof isSigningInput_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Polkadot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{5} +} + +func (x *SigningInput) GetBlockHash() []byte { + if x != nil { + return x.BlockHash + } + return nil +} + +func (x *SigningInput) GetGenesisHash() []byte { + if x != nil { + return x.GenesisHash + } + return nil +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetSpecVersion() uint32 { + if x != nil { + return x.SpecVersion + } + return 0 +} + +func (x *SigningInput) GetTransactionVersion() uint32 { + if x != nil { + return x.TransactionVersion + } + return 0 +} + +func (x *SigningInput) GetTip() []byte { + if x != nil { + return x.Tip + } + return nil +} + +func (x *SigningInput) GetEra() *Era { + if x != nil { + return x.Era + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetNetwork() uint32 { + if x != nil { + return x.Network + } + return 0 +} + +func (x *SigningInput) GetMultiAddress() bool { + if x != nil { + return x.MultiAddress + } + return false +} + +func (x *SigningInput) GetMessageOneof() isSigningInput_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *SigningInput) GetBalanceCall() *Balance { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_BalanceCall); ok { + return x.BalanceCall + } + } + return nil +} + +func (x *SigningInput) GetStakingCall() *Staking { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_StakingCall); ok { + return x.StakingCall + } + } + return nil +} + +type isSigningInput_MessageOneof interface { + isSigningInput_MessageOneof() +} + +type SigningInput_BalanceCall struct { + BalanceCall *Balance `protobuf:"bytes,11,opt,name=balance_call,json=balanceCall,proto3,oneof"` +} + +type SigningInput_StakingCall struct { + StakingCall *Staking `protobuf:"bytes,12,opt,name=staking_call,json=stakingCall,proto3,oneof"` +} + +func (*SigningInput_BalanceCall) isSigningInput_MessageOneof() {} + +func (*SigningInput_StakingCall) isSigningInput_MessageOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Polkadot_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{6} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// transfer +type Balance_Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // destination address + ToAddress string `protobuf:"bytes,1,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // max 32 chars + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,4,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Balance_Transfer) Reset() { + *x = Balance_Transfer{} + mi := &file_Polkadot_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Balance_Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balance_Transfer) ProtoMessage() {} + +func (x *Balance_Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balance_Transfer.ProtoReflect.Descriptor instead. +func (*Balance_Transfer) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Balance_Transfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Balance_Transfer) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Balance_Transfer) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *Balance_Transfer) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// batch tranfer +type Balance_BatchTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,1,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + Transfers []*Balance_Transfer `protobuf:"bytes,2,rep,name=transfers,proto3" json:"transfers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Balance_BatchTransfer) Reset() { + *x = Balance_BatchTransfer{} + mi := &file_Polkadot_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Balance_BatchTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balance_BatchTransfer) ProtoMessage() {} + +func (x *Balance_BatchTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balance_BatchTransfer.ProtoReflect.Descriptor instead. +func (*Balance_BatchTransfer) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *Balance_BatchTransfer) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +func (x *Balance_BatchTransfer) GetTransfers() []*Balance_Transfer { + if x != nil { + return x.Transfers + } + return nil +} + +// asset transfer +type Balance_AssetTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,1,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + // destination + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // value - BigInteger + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // asset identifier + AssetId uint32 `protobuf:"varint,4,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` + // fee asset identifier + FeeAssetId uint32 `protobuf:"varint,5,opt,name=fee_asset_id,json=feeAssetId,proto3" json:"fee_asset_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Balance_AssetTransfer) Reset() { + *x = Balance_AssetTransfer{} + mi := &file_Polkadot_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Balance_AssetTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balance_AssetTransfer) ProtoMessage() {} + +func (x *Balance_AssetTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balance_AssetTransfer.ProtoReflect.Descriptor instead. +func (*Balance_AssetTransfer) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{3, 2} +} + +func (x *Balance_AssetTransfer) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +func (x *Balance_AssetTransfer) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *Balance_AssetTransfer) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Balance_AssetTransfer) GetAssetId() uint32 { + if x != nil { + return x.AssetId + } + return 0 +} + +func (x *Balance_AssetTransfer) GetFeeAssetId() uint32 { + if x != nil { + return x.FeeAssetId + } + return 0 +} + +// batch asset transfer +type Balance_BatchAssetTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,1,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + // fee asset identifier + FeeAssetId uint32 `protobuf:"varint,2,opt,name=fee_asset_id,json=feeAssetId,proto3" json:"fee_asset_id,omitempty"` + Transfers []*Balance_AssetTransfer `protobuf:"bytes,3,rep,name=transfers,proto3" json:"transfers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Balance_BatchAssetTransfer) Reset() { + *x = Balance_BatchAssetTransfer{} + mi := &file_Polkadot_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Balance_BatchAssetTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Balance_BatchAssetTransfer) ProtoMessage() {} + +func (x *Balance_BatchAssetTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Balance_BatchAssetTransfer.ProtoReflect.Descriptor instead. +func (*Balance_BatchAssetTransfer) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{3, 3} +} + +func (x *Balance_BatchAssetTransfer) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +func (x *Balance_BatchAssetTransfer) GetFeeAssetId() uint32 { + if x != nil { + return x.FeeAssetId + } + return 0 +} + +func (x *Balance_BatchAssetTransfer) GetTransfers() []*Balance_AssetTransfer { + if x != nil { + return x.Transfers + } + return nil +} + +// Bond to a controller +type Staking_Bond struct { + state protoimpl.MessageState `protogen:"open.v1"` + // controller ID (optional) + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // destination for rewards + RewardDestination RewardDestination `protobuf:"varint,3,opt,name=reward_destination,json=rewardDestination,proto3,enum=TW.Polkadot.Proto.RewardDestination" json:"reward_destination,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,4,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Bond) Reset() { + *x = Staking_Bond{} + mi := &file_Polkadot_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Bond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Bond) ProtoMessage() {} + +func (x *Staking_Bond) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Bond.ProtoReflect.Descriptor instead. +func (*Staking_Bond) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *Staking_Bond) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Staking_Bond) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Staking_Bond) GetRewardDestination() RewardDestination { + if x != nil { + return x.RewardDestination + } + return RewardDestination_STAKED +} + +func (x *Staking_Bond) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// Bond to a controller, with nominators +type Staking_BondAndNominate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // controller ID (optional) + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // destination for rewards + RewardDestination RewardDestination `protobuf:"varint,3,opt,name=reward_destination,json=rewardDestination,proto3,enum=TW.Polkadot.Proto.RewardDestination" json:"reward_destination,omitempty"` + // list of nominators + Nominators []string `protobuf:"bytes,4,rep,name=nominators,proto3" json:"nominators,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,5,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + // Staking.Bond call indices + BondCallIndices *CallIndices `protobuf:"bytes,6,opt,name=bond_call_indices,json=bondCallIndices,proto3" json:"bond_call_indices,omitempty"` + // Staking.Nominate call indices + NominateCallIndices *CallIndices `protobuf:"bytes,7,opt,name=nominate_call_indices,json=nominateCallIndices,proto3" json:"nominate_call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_BondAndNominate) Reset() { + *x = Staking_BondAndNominate{} + mi := &file_Polkadot_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_BondAndNominate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_BondAndNominate) ProtoMessage() {} + +func (x *Staking_BondAndNominate) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_BondAndNominate.ProtoReflect.Descriptor instead. +func (*Staking_BondAndNominate) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *Staking_BondAndNominate) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Staking_BondAndNominate) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Staking_BondAndNominate) GetRewardDestination() RewardDestination { + if x != nil { + return x.RewardDestination + } + return RewardDestination_STAKED +} + +func (x *Staking_BondAndNominate) GetNominators() []string { + if x != nil { + return x.Nominators + } + return nil +} + +func (x *Staking_BondAndNominate) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +func (x *Staking_BondAndNominate) GetBondCallIndices() *CallIndices { + if x != nil { + return x.BondCallIndices + } + return nil +} + +func (x *Staking_BondAndNominate) GetNominateCallIndices() *CallIndices { + if x != nil { + return x.NominateCallIndices + } + return nil +} + +// Bond extra amount +type Staking_BondExtra struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,2,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_BondExtra) Reset() { + *x = Staking_BondExtra{} + mi := &file_Polkadot_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_BondExtra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_BondExtra) ProtoMessage() {} + +func (x *Staking_BondExtra) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_BondExtra.ProtoReflect.Descriptor instead. +func (*Staking_BondExtra) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 2} +} + +func (x *Staking_BondExtra) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Staking_BondExtra) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// Unbond +type Staking_Unbond struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,2,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Unbond) Reset() { + *x = Staking_Unbond{} + mi := &file_Polkadot_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Unbond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Unbond) ProtoMessage() {} + +func (x *Staking_Unbond) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Unbond.ProtoReflect.Descriptor instead. +func (*Staking_Unbond) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 3} +} + +func (x *Staking_Unbond) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Staking_Unbond) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// Rebond +type Staking_Rebond struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,2,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Rebond) Reset() { + *x = Staking_Rebond{} + mi := &file_Polkadot_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Rebond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Rebond) ProtoMessage() {} + +func (x *Staking_Rebond) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Rebond.ProtoReflect.Descriptor instead. +func (*Staking_Rebond) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 4} +} + +func (x *Staking_Rebond) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Staking_Rebond) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// Withdraw unbonded amounts +type Staking_WithdrawUnbonded struct { + state protoimpl.MessageState `protogen:"open.v1"` + SlashingSpans int32 `protobuf:"varint,1,opt,name=slashing_spans,json=slashingSpans,proto3" json:"slashing_spans,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,2,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_WithdrawUnbonded) Reset() { + *x = Staking_WithdrawUnbonded{} + mi := &file_Polkadot_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_WithdrawUnbonded) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_WithdrawUnbonded) ProtoMessage() {} + +func (x *Staking_WithdrawUnbonded) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_WithdrawUnbonded.ProtoReflect.Descriptor instead. +func (*Staking_WithdrawUnbonded) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 5} +} + +func (x *Staking_WithdrawUnbonded) GetSlashingSpans() int32 { + if x != nil { + return x.SlashingSpans + } + return 0 +} + +func (x *Staking_WithdrawUnbonded) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// Nominate +type Staking_Nominate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // list of nominators + Nominators []string `protobuf:"bytes,1,rep,name=nominators,proto3" json:"nominators,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,2,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Nominate) Reset() { + *x = Staking_Nominate{} + mi := &file_Polkadot_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Nominate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Nominate) ProtoMessage() {} + +func (x *Staking_Nominate) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Nominate.ProtoReflect.Descriptor instead. +func (*Staking_Nominate) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 6} +} + +func (x *Staking_Nominate) GetNominators() []string { + if x != nil { + return x.Nominators + } + return nil +} + +func (x *Staking_Nominate) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +// Chill and unbound +type Staking_ChillAndUnbond struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,2,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + // Staking.Chill call indices + ChillCallIndices *CallIndices `protobuf:"bytes,3,opt,name=chill_call_indices,json=chillCallIndices,proto3" json:"chill_call_indices,omitempty"` + // Staking.Unbond call indices + UnbondCallIndices *CallIndices `protobuf:"bytes,4,opt,name=unbond_call_indices,json=unbondCallIndices,proto3" json:"unbond_call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_ChillAndUnbond) Reset() { + *x = Staking_ChillAndUnbond{} + mi := &file_Polkadot_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_ChillAndUnbond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_ChillAndUnbond) ProtoMessage() {} + +func (x *Staking_ChillAndUnbond) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_ChillAndUnbond.ProtoReflect.Descriptor instead. +func (*Staking_ChillAndUnbond) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 7} +} + +func (x *Staking_ChillAndUnbond) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Staking_ChillAndUnbond) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +func (x *Staking_ChillAndUnbond) GetChillCallIndices() *CallIndices { + if x != nil { + return x.ChillCallIndices + } + return nil +} + +func (x *Staking_ChillAndUnbond) GetUnbondCallIndices() *CallIndices { + if x != nil { + return x.UnbondCallIndices + } + return nil +} + +// Chill +type Staking_Chill struct { + state protoimpl.MessageState `protogen:"open.v1"` + // call indices + CallIndices *CallIndices `protobuf:"bytes,1,opt,name=call_indices,json=callIndices,proto3" json:"call_indices,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Staking_Chill) Reset() { + *x = Staking_Chill{} + mi := &file_Polkadot_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Staking_Chill) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Staking_Chill) ProtoMessage() {} + +func (x *Staking_Chill) ProtoReflect() protoreflect.Message { + mi := &file_Polkadot_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Staking_Chill.ProtoReflect.Descriptor instead. +func (*Staking_Chill) Descriptor() ([]byte, []int) { + return file_Polkadot_proto_rawDescGZIP(), []int{4, 8} +} + +func (x *Staking_Chill) GetCallIndices() *CallIndices { + if x != nil { + return x.CallIndices + } + return nil +} + +var File_Polkadot_proto protoreflect.FileDescriptor + +const file_Polkadot_proto_rawDesc = "" + + "\n" + + "\x0ePolkadot.proto\x12\x11TW.Polkadot.Proto\x1a\fCommon.proto\"@\n" + + "\x03Era\x12!\n" + + "\fblock_number\x18\x01 \x01(\x04R\vblockNumber\x12\x16\n" + + "\x06period\x18\x02 \x01(\x04R\x06period\"Y\n" + + "\x11CustomCallIndices\x12!\n" + + "\fmodule_index\x18\x04 \x01(\x05R\vmoduleIndex\x12!\n" + + "\fmethod_index\x18\x05 \x01(\x05R\vmethodIndex\"X\n" + + "\vCallIndices\x12>\n" + + "\x06custom\x18\x01 \x01(\v2$.TW.Polkadot.Proto.CustomCallIndicesH\x00R\x06customB\t\n" + + "\avariant\"\xa1\b\n" + + "\aBalance\x12A\n" + + "\btransfer\x18\x01 \x01(\v2#.TW.Polkadot.Proto.Balance.TransferH\x00R\btransfer\x12P\n" + + "\rbatchTransfer\x18\x02 \x01(\v2(.TW.Polkadot.Proto.Balance.BatchTransferH\x00R\rbatchTransfer\x12Q\n" + + "\x0easset_transfer\x18\x03 \x01(\v2(.TW.Polkadot.Proto.Balance.AssetTransferH\x00R\rassetTransfer\x12a\n" + + "\x14batch_asset_transfer\x18\x04 \x01(\v2-.TW.Polkadot.Proto.Balance.BatchAssetTransferH\x00R\x12batchAssetTransfer\x1a\x96\x01\n" + + "\bTransfer\x12\x1d\n" + + "\n" + + "to_address\x18\x01 \x01(\tR\ttoAddress\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value\x12\x12\n" + + "\x04memo\x18\x03 \x01(\tR\x04memo\x12A\n" + + "\fcall_indices\x18\x04 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1a\x95\x01\n" + + "\rBatchTransfer\x12A\n" + + "\fcall_indices\x18\x01 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x12A\n" + + "\ttransfers\x18\x02 \x03(\v2#.TW.Polkadot.Proto.Balance.TransferR\ttransfers\x1a\xc4\x01\n" + + "\rAssetTransfer\x12A\n" + + "\fcall_indices\x18\x01 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12\x14\n" + + "\x05value\x18\x03 \x01(\fR\x05value\x12\x19\n" + + "\basset_id\x18\x04 \x01(\rR\aassetId\x12 \n" + + "\ffee_asset_id\x18\x05 \x01(\rR\n" + + "feeAssetId\x1a\xc1\x01\n" + + "\x12BatchAssetTransfer\x12A\n" + + "\fcall_indices\x18\x01 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x12 \n" + + "\ffee_asset_id\x18\x02 \x01(\rR\n" + + "feeAssetId\x12F\n" + + "\ttransfers\x18\x03 \x03(\v2(.TW.Polkadot.Proto.Balance.AssetTransferR\ttransfersB\x0f\n" + + "\rmessage_oneof\"\x84\x11\n" + + "\aStaking\x125\n" + + "\x04bond\x18\x01 \x01(\v2\x1f.TW.Polkadot.Proto.Staking.BondH\x00R\x04bond\x12X\n" + + "\x11bond_and_nominate\x18\x02 \x01(\v2*.TW.Polkadot.Proto.Staking.BondAndNominateH\x00R\x0fbondAndNominate\x12E\n" + + "\n" + + "bond_extra\x18\x03 \x01(\v2$.TW.Polkadot.Proto.Staking.BondExtraH\x00R\tbondExtra\x12;\n" + + "\x06unbond\x18\x04 \x01(\v2!.TW.Polkadot.Proto.Staking.UnbondH\x00R\x06unbond\x12Z\n" + + "\x11withdraw_unbonded\x18\x05 \x01(\v2+.TW.Polkadot.Proto.Staking.WithdrawUnbondedH\x00R\x10withdrawUnbonded\x12A\n" + + "\bnominate\x18\x06 \x01(\v2#.TW.Polkadot.Proto.Staking.NominateH\x00R\bnominate\x128\n" + + "\x05chill\x18\a \x01(\v2 .TW.Polkadot.Proto.Staking.ChillH\x00R\x05chill\x12U\n" + + "\x10chill_and_unbond\x18\b \x01(\v2).TW.Polkadot.Proto.Staking.ChillAndUnbondH\x00R\x0echillAndUnbond\x12;\n" + + "\x06rebond\x18\t \x01(\v2!.TW.Polkadot.Proto.Staking.RebondH\x00R\x06rebond\x1a\xd4\x01\n" + + "\x04Bond\x12\x1e\n" + + "\n" + + "controller\x18\x01 \x01(\tR\n" + + "controller\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value\x12S\n" + + "\x12reward_destination\x18\x03 \x01(\x0e2$.TW.Polkadot.Proto.RewardDestinationR\x11rewardDestination\x12A\n" + + "\fcall_indices\x18\x04 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1a\x9f\x03\n" + + "\x0fBondAndNominate\x12\x1e\n" + + "\n" + + "controller\x18\x01 \x01(\tR\n" + + "controller\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value\x12S\n" + + "\x12reward_destination\x18\x03 \x01(\x0e2$.TW.Polkadot.Proto.RewardDestinationR\x11rewardDestination\x12\x1e\n" + + "\n" + + "nominators\x18\x04 \x03(\tR\n" + + "nominators\x12A\n" + + "\fcall_indices\x18\x05 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x12J\n" + + "\x11bond_call_indices\x18\x06 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\x0fbondCallIndices\x12R\n" + + "\x15nominate_call_indices\x18\a \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\x13nominateCallIndices\x1ad\n" + + "\tBondExtra\x12\x14\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + + "\fcall_indices\x18\x02 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1aa\n" + + "\x06Unbond\x12\x14\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + + "\fcall_indices\x18\x02 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1aa\n" + + "\x06Rebond\x12\x14\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + + "\fcall_indices\x18\x02 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1a|\n" + + "\x10WithdrawUnbonded\x12%\n" + + "\x0eslashing_spans\x18\x01 \x01(\x05R\rslashingSpans\x12A\n" + + "\fcall_indices\x18\x02 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1am\n" + + "\bNominate\x12\x1e\n" + + "\n" + + "nominators\x18\x01 \x03(\tR\n" + + "nominators\x12A\n" + + "\fcall_indices\x18\x02 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x1a\x87\x02\n" + + "\x0eChillAndUnbond\x12\x14\n" + + "\x05value\x18\x01 \x01(\fR\x05value\x12A\n" + + "\fcall_indices\x18\x02 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndices\x12L\n" + + "\x12chill_call_indices\x18\x03 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\x10chillCallIndices\x12N\n" + + "\x13unbond_call_indices\x18\x04 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\x11unbondCallIndices\x1aJ\n" + + "\x05Chill\x12A\n" + + "\fcall_indices\x18\x01 \x01(\v2\x1e.TW.Polkadot.Proto.CallIndicesR\vcallIndicesB\x0f\n" + + "\rmessage_oneof\"\xe9\x03\n" + + "\fSigningInput\x12\x1d\n" + + "\n" + + "block_hash\x18\x01 \x01(\fR\tblockHash\x12!\n" + + "\fgenesis_hash\x18\x02 \x01(\fR\vgenesisHash\x12\x14\n" + + "\x05nonce\x18\x03 \x01(\x04R\x05nonce\x12!\n" + + "\fspec_version\x18\x04 \x01(\rR\vspecVersion\x12/\n" + + "\x13transaction_version\x18\x05 \x01(\rR\x12transactionVersion\x12\x10\n" + + "\x03tip\x18\x06 \x01(\fR\x03tip\x12(\n" + + "\x03era\x18\a \x01(\v2\x16.TW.Polkadot.Proto.EraR\x03era\x12\x1f\n" + + "\vprivate_key\x18\b \x01(\fR\n" + + "privateKey\x12\x18\n" + + "\anetwork\x18\t \x01(\rR\anetwork\x12#\n" + + "\rmulti_address\x18\n" + + " \x01(\bR\fmultiAddress\x12?\n" + + "\fbalance_call\x18\v \x01(\v2\x1a.TW.Polkadot.Proto.BalanceH\x00R\vbalanceCall\x12?\n" + + "\fstaking_call\x18\f \x01(\v2\x1a.TW.Polkadot.Proto.StakingH\x00R\vstakingCallB\x0f\n" + + "\rmessage_oneof\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage*:\n" + + "\x11RewardDestination\x12\n" + + "\n" + + "\x06STAKED\x10\x00\x12\t\n" + + "\x05STASH\x10\x01\x12\x0e\n" + + "\n" + + "CONTROLLER\x10\x02B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Polkadot_proto_rawDescOnce sync.Once + file_Polkadot_proto_rawDescData []byte +) + +func file_Polkadot_proto_rawDescGZIP() []byte { + file_Polkadot_proto_rawDescOnce.Do(func() { + file_Polkadot_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Polkadot_proto_rawDesc), len(file_Polkadot_proto_rawDesc))) + }) + return file_Polkadot_proto_rawDescData +} + +var file_Polkadot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Polkadot_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_Polkadot_proto_goTypes = []any{ + (RewardDestination)(0), // 0: TW.Polkadot.Proto.RewardDestination + (*Era)(nil), // 1: TW.Polkadot.Proto.Era + (*CustomCallIndices)(nil), // 2: TW.Polkadot.Proto.CustomCallIndices + (*CallIndices)(nil), // 3: TW.Polkadot.Proto.CallIndices + (*Balance)(nil), // 4: TW.Polkadot.Proto.Balance + (*Staking)(nil), // 5: TW.Polkadot.Proto.Staking + (*SigningInput)(nil), // 6: TW.Polkadot.Proto.SigningInput + (*SigningOutput)(nil), // 7: TW.Polkadot.Proto.SigningOutput + (*Balance_Transfer)(nil), // 8: TW.Polkadot.Proto.Balance.Transfer + (*Balance_BatchTransfer)(nil), // 9: TW.Polkadot.Proto.Balance.BatchTransfer + (*Balance_AssetTransfer)(nil), // 10: TW.Polkadot.Proto.Balance.AssetTransfer + (*Balance_BatchAssetTransfer)(nil), // 11: TW.Polkadot.Proto.Balance.BatchAssetTransfer + (*Staking_Bond)(nil), // 12: TW.Polkadot.Proto.Staking.Bond + (*Staking_BondAndNominate)(nil), // 13: TW.Polkadot.Proto.Staking.BondAndNominate + (*Staking_BondExtra)(nil), // 14: TW.Polkadot.Proto.Staking.BondExtra + (*Staking_Unbond)(nil), // 15: TW.Polkadot.Proto.Staking.Unbond + (*Staking_Rebond)(nil), // 16: TW.Polkadot.Proto.Staking.Rebond + (*Staking_WithdrawUnbonded)(nil), // 17: TW.Polkadot.Proto.Staking.WithdrawUnbonded + (*Staking_Nominate)(nil), // 18: TW.Polkadot.Proto.Staking.Nominate + (*Staking_ChillAndUnbond)(nil), // 19: TW.Polkadot.Proto.Staking.ChillAndUnbond + (*Staking_Chill)(nil), // 20: TW.Polkadot.Proto.Staking.Chill + (common.SigningError)(0), // 21: TW.Common.Proto.SigningError +} +var file_Polkadot_proto_depIdxs = []int32{ + 2, // 0: TW.Polkadot.Proto.CallIndices.custom:type_name -> TW.Polkadot.Proto.CustomCallIndices + 8, // 1: TW.Polkadot.Proto.Balance.transfer:type_name -> TW.Polkadot.Proto.Balance.Transfer + 9, // 2: TW.Polkadot.Proto.Balance.batchTransfer:type_name -> TW.Polkadot.Proto.Balance.BatchTransfer + 10, // 3: TW.Polkadot.Proto.Balance.asset_transfer:type_name -> TW.Polkadot.Proto.Balance.AssetTransfer + 11, // 4: TW.Polkadot.Proto.Balance.batch_asset_transfer:type_name -> TW.Polkadot.Proto.Balance.BatchAssetTransfer + 12, // 5: TW.Polkadot.Proto.Staking.bond:type_name -> TW.Polkadot.Proto.Staking.Bond + 13, // 6: TW.Polkadot.Proto.Staking.bond_and_nominate:type_name -> TW.Polkadot.Proto.Staking.BondAndNominate + 14, // 7: TW.Polkadot.Proto.Staking.bond_extra:type_name -> TW.Polkadot.Proto.Staking.BondExtra + 15, // 8: TW.Polkadot.Proto.Staking.unbond:type_name -> TW.Polkadot.Proto.Staking.Unbond + 17, // 9: TW.Polkadot.Proto.Staking.withdraw_unbonded:type_name -> TW.Polkadot.Proto.Staking.WithdrawUnbonded + 18, // 10: TW.Polkadot.Proto.Staking.nominate:type_name -> TW.Polkadot.Proto.Staking.Nominate + 20, // 11: TW.Polkadot.Proto.Staking.chill:type_name -> TW.Polkadot.Proto.Staking.Chill + 19, // 12: TW.Polkadot.Proto.Staking.chill_and_unbond:type_name -> TW.Polkadot.Proto.Staking.ChillAndUnbond + 16, // 13: TW.Polkadot.Proto.Staking.rebond:type_name -> TW.Polkadot.Proto.Staking.Rebond + 1, // 14: TW.Polkadot.Proto.SigningInput.era:type_name -> TW.Polkadot.Proto.Era + 4, // 15: TW.Polkadot.Proto.SigningInput.balance_call:type_name -> TW.Polkadot.Proto.Balance + 5, // 16: TW.Polkadot.Proto.SigningInput.staking_call:type_name -> TW.Polkadot.Proto.Staking + 21, // 17: TW.Polkadot.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 3, // 18: TW.Polkadot.Proto.Balance.Transfer.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 19: TW.Polkadot.Proto.Balance.BatchTransfer.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 8, // 20: TW.Polkadot.Proto.Balance.BatchTransfer.transfers:type_name -> TW.Polkadot.Proto.Balance.Transfer + 3, // 21: TW.Polkadot.Proto.Balance.AssetTransfer.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 22: TW.Polkadot.Proto.Balance.BatchAssetTransfer.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 10, // 23: TW.Polkadot.Proto.Balance.BatchAssetTransfer.transfers:type_name -> TW.Polkadot.Proto.Balance.AssetTransfer + 0, // 24: TW.Polkadot.Proto.Staking.Bond.reward_destination:type_name -> TW.Polkadot.Proto.RewardDestination + 3, // 25: TW.Polkadot.Proto.Staking.Bond.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 0, // 26: TW.Polkadot.Proto.Staking.BondAndNominate.reward_destination:type_name -> TW.Polkadot.Proto.RewardDestination + 3, // 27: TW.Polkadot.Proto.Staking.BondAndNominate.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 28: TW.Polkadot.Proto.Staking.BondAndNominate.bond_call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 29: TW.Polkadot.Proto.Staking.BondAndNominate.nominate_call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 30: TW.Polkadot.Proto.Staking.BondExtra.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 31: TW.Polkadot.Proto.Staking.Unbond.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 32: TW.Polkadot.Proto.Staking.Rebond.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 33: TW.Polkadot.Proto.Staking.WithdrawUnbonded.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 34: TW.Polkadot.Proto.Staking.Nominate.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 35: TW.Polkadot.Proto.Staking.ChillAndUnbond.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 36: TW.Polkadot.Proto.Staking.ChillAndUnbond.chill_call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 37: TW.Polkadot.Proto.Staking.ChillAndUnbond.unbond_call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 3, // 38: TW.Polkadot.Proto.Staking.Chill.call_indices:type_name -> TW.Polkadot.Proto.CallIndices + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 39, // [39:39] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name +} + +func init() { file_Polkadot_proto_init() } +func file_Polkadot_proto_init() { + if File_Polkadot_proto != nil { + return + } + file_Polkadot_proto_msgTypes[2].OneofWrappers = []any{ + (*CallIndices_Custom)(nil), + } + file_Polkadot_proto_msgTypes[3].OneofWrappers = []any{ + (*Balance_Transfer_)(nil), + (*Balance_BatchTransfer_)(nil), + (*Balance_AssetTransfer_)(nil), + (*Balance_BatchAssetTransfer_)(nil), + } + file_Polkadot_proto_msgTypes[4].OneofWrappers = []any{ + (*Staking_Bond_)(nil), + (*Staking_BondAndNominate_)(nil), + (*Staking_BondExtra_)(nil), + (*Staking_Unbond_)(nil), + (*Staking_WithdrawUnbonded_)(nil), + (*Staking_Nominate_)(nil), + (*Staking_Chill_)(nil), + (*Staking_ChillAndUnbond_)(nil), + (*Staking_Rebond_)(nil), + } + file_Polkadot_proto_msgTypes[5].OneofWrappers = []any{ + (*SigningInput_BalanceCall)(nil), + (*SigningInput_StakingCall)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Polkadot_proto_rawDesc), len(file_Polkadot_proto_rawDesc)), + NumEnums: 1, + NumMessages: 20, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Polkadot_proto_goTypes, + DependencyIndexes: file_Polkadot_proto_depIdxs, + EnumInfos: file_Polkadot_proto_enumTypes, + MessageInfos: file_Polkadot_proto_msgTypes, + }.Build() + File_Polkadot_proto = out.File + file_Polkadot_proto_goTypes = nil + file_Polkadot_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/ripple/Ripple.pb.go b/wrapper/go-wrapper/protos/ripple/Ripple.pb.go new file mode 100644 index 00000000000..59b58d9a208 --- /dev/null +++ b/wrapper/go-wrapper/protos/ripple/Ripple.pb.go @@ -0,0 +1,1167 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Ripple.proto + +package ripple + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// https://xrpl.org/currency-formats.html#token-amounts +type CurrencyAmount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Currency code + // https://xrpl.org/currency-formats.html#currency-codes + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + // String number + // https://xrpl.org/currency-formats.html#string-numbers + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // Account + // https://xrpl.org/accounts.html + Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CurrencyAmount) Reset() { + *x = CurrencyAmount{} + mi := &file_Ripple_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CurrencyAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrencyAmount) ProtoMessage() {} + +func (x *CurrencyAmount) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CurrencyAmount.ProtoReflect.Descriptor instead. +func (*CurrencyAmount) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{0} +} + +func (x *CurrencyAmount) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *CurrencyAmount) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *CurrencyAmount) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +// https://xrpl.org/trustset.html +type OperationTrustSet struct { + state protoimpl.MessageState `protogen:"open.v1"` + LimitAmount *CurrencyAmount `protobuf:"bytes,1,opt,name=limit_amount,json=limitAmount,proto3" json:"limit_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationTrustSet) Reset() { + *x = OperationTrustSet{} + mi := &file_Ripple_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationTrustSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationTrustSet) ProtoMessage() {} + +func (x *OperationTrustSet) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationTrustSet.ProtoReflect.Descriptor instead. +func (*OperationTrustSet) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{1} +} + +func (x *OperationTrustSet) GetLimitAmount() *CurrencyAmount { + if x != nil { + return x.LimitAmount + } + return nil +} + +// https://xrpl.org/payment.html +type OperationPayment struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transfer amount + // + // Types that are valid to be assigned to AmountOneof: + // + // *OperationPayment_Amount + // *OperationPayment_CurrencyAmount + AmountOneof isOperationPayment_AmountOneof `protobuf_oneof:"amount_oneof"` + // Target account + Destination string `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"` + // A Destination Tag + // It must fit uint32 + DestinationTag uint64 `protobuf:"varint,4,opt,name=destination_tag,json=destinationTag,proto3" json:"destination_tag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationPayment) Reset() { + *x = OperationPayment{} + mi := &file_Ripple_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationPayment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationPayment) ProtoMessage() {} + +func (x *OperationPayment) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationPayment.ProtoReflect.Descriptor instead. +func (*OperationPayment) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{2} +} + +func (x *OperationPayment) GetAmountOneof() isOperationPayment_AmountOneof { + if x != nil { + return x.AmountOneof + } + return nil +} + +func (x *OperationPayment) GetAmount() int64 { + if x != nil { + if x, ok := x.AmountOneof.(*OperationPayment_Amount); ok { + return x.Amount + } + } + return 0 +} + +func (x *OperationPayment) GetCurrencyAmount() *CurrencyAmount { + if x != nil { + if x, ok := x.AmountOneof.(*OperationPayment_CurrencyAmount); ok { + return x.CurrencyAmount + } + } + return nil +} + +func (x *OperationPayment) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *OperationPayment) GetDestinationTag() uint64 { + if x != nil { + return x.DestinationTag + } + return 0 +} + +type isOperationPayment_AmountOneof interface { + isOperationPayment_AmountOneof() +} + +type OperationPayment_Amount struct { + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3,oneof"` +} + +type OperationPayment_CurrencyAmount struct { + CurrencyAmount *CurrencyAmount `protobuf:"bytes,2,opt,name=currency_amount,json=currencyAmount,proto3,oneof"` +} + +func (*OperationPayment_Amount) isOperationPayment_AmountOneof() {} + +func (*OperationPayment_CurrencyAmount) isOperationPayment_AmountOneof() {} + +// https://xrpl.org/escrowcreate.html +type OperationEscrowCreate struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Escrow amount + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Beneficiary account + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + // Destination Tag + // It must fit uint32 + DestinationTag uint64 `protobuf:"varint,3,opt,name=destination_tag,json=destinationTag,proto3" json:"destination_tag,omitempty"` + // Escrow expire time + // It must fit uint32 + CancelAfter uint64 `protobuf:"varint,4,opt,name=cancel_after,json=cancelAfter,proto3" json:"cancel_after,omitempty"` + // Escrow release time + // It must fit uint32 + FinishAfter uint64 `protobuf:"varint,5,opt,name=finish_after,json=finishAfter,proto3" json:"finish_after,omitempty"` + // Hex-encoded crypto condition + // https://datatracker.ietf.org/doc/html/draft-thomas-crypto-conditions-02#section-8.1 + Condition string `protobuf:"bytes,6,opt,name=condition,proto3" json:"condition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationEscrowCreate) Reset() { + *x = OperationEscrowCreate{} + mi := &file_Ripple_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationEscrowCreate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationEscrowCreate) ProtoMessage() {} + +func (x *OperationEscrowCreate) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationEscrowCreate.ProtoReflect.Descriptor instead. +func (*OperationEscrowCreate) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{3} +} + +func (x *OperationEscrowCreate) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *OperationEscrowCreate) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *OperationEscrowCreate) GetDestinationTag() uint64 { + if x != nil { + return x.DestinationTag + } + return 0 +} + +func (x *OperationEscrowCreate) GetCancelAfter() uint64 { + if x != nil { + return x.CancelAfter + } + return 0 +} + +func (x *OperationEscrowCreate) GetFinishAfter() uint64 { + if x != nil { + return x.FinishAfter + } + return 0 +} + +func (x *OperationEscrowCreate) GetCondition() string { + if x != nil { + return x.Condition + } + return "" +} + +// https://xrpl.org/escrowcancel.html +type OperationEscrowCancel struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Funding account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // Escrow transaction sequence + OfferSequence uint32 `protobuf:"varint,2,opt,name=offer_sequence,json=offerSequence,proto3" json:"offer_sequence,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationEscrowCancel) Reset() { + *x = OperationEscrowCancel{} + mi := &file_Ripple_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationEscrowCancel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationEscrowCancel) ProtoMessage() {} + +func (x *OperationEscrowCancel) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationEscrowCancel.ProtoReflect.Descriptor instead. +func (*OperationEscrowCancel) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{4} +} + +func (x *OperationEscrowCancel) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *OperationEscrowCancel) GetOfferSequence() uint32 { + if x != nil { + return x.OfferSequence + } + return 0 +} + +// https://xrpl.org/escrowfinish.html +type OperationEscrowFinish struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Funding account + Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` + // Escrow transaction sequence + OfferSequence uint32 `protobuf:"varint,2,opt,name=offer_sequence,json=offerSequence,proto3" json:"offer_sequence,omitempty"` + // Hex-encoded crypto condition + Condition string `protobuf:"bytes,3,opt,name=condition,proto3" json:"condition,omitempty"` + // Hex-encoded fulfillment matching condition + Fulfillment string `protobuf:"bytes,4,opt,name=fulfillment,proto3" json:"fulfillment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationEscrowFinish) Reset() { + *x = OperationEscrowFinish{} + mi := &file_Ripple_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationEscrowFinish) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationEscrowFinish) ProtoMessage() {} + +func (x *OperationEscrowFinish) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationEscrowFinish.ProtoReflect.Descriptor instead. +func (*OperationEscrowFinish) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{5} +} + +func (x *OperationEscrowFinish) GetOwner() string { + if x != nil { + return x.Owner + } + return "" +} + +func (x *OperationEscrowFinish) GetOfferSequence() uint32 { + if x != nil { + return x.OfferSequence + } + return 0 +} + +func (x *OperationEscrowFinish) GetCondition() string { + if x != nil { + return x.Condition + } + return "" +} + +func (x *OperationEscrowFinish) GetFulfillment() string { + if x != nil { + return x.Fulfillment + } + return "" +} + +// https://xrpl.org/nftokenburn.html +type OperationNFTokenBurn struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Hex-encoded H256 NFTokenId + NftokenId string `protobuf:"bytes,1,opt,name=nftoken_id,json=nftokenId,proto3" json:"nftoken_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationNFTokenBurn) Reset() { + *x = OperationNFTokenBurn{} + mi := &file_Ripple_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationNFTokenBurn) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationNFTokenBurn) ProtoMessage() {} + +func (x *OperationNFTokenBurn) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationNFTokenBurn.ProtoReflect.Descriptor instead. +func (*OperationNFTokenBurn) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{6} +} + +func (x *OperationNFTokenBurn) GetNftokenId() string { + if x != nil { + return x.NftokenId + } + return "" +} + +// https://xrpl.org/nftokencreateoffer.html +type OperationNFTokenCreateOffer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Hex-encoded Hash256 NFTokenId + NftokenId string `protobuf:"bytes,1,opt,name=nftoken_id,json=nftokenId,proto3" json:"nftoken_id,omitempty"` + // Destination account + Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationNFTokenCreateOffer) Reset() { + *x = OperationNFTokenCreateOffer{} + mi := &file_Ripple_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationNFTokenCreateOffer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationNFTokenCreateOffer) ProtoMessage() {} + +func (x *OperationNFTokenCreateOffer) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationNFTokenCreateOffer.ProtoReflect.Descriptor instead. +func (*OperationNFTokenCreateOffer) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{7} +} + +func (x *OperationNFTokenCreateOffer) GetNftokenId() string { + if x != nil { + return x.NftokenId + } + return "" +} + +func (x *OperationNFTokenCreateOffer) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +// https://xrpl.org/nftokenacceptoffer.html +type OperationNFTokenAcceptOffer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Hex-encoded Hash256 NFTokenOffer + SellOffer string `protobuf:"bytes,1,opt,name=sell_offer,json=sellOffer,proto3" json:"sell_offer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationNFTokenAcceptOffer) Reset() { + *x = OperationNFTokenAcceptOffer{} + mi := &file_Ripple_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationNFTokenAcceptOffer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationNFTokenAcceptOffer) ProtoMessage() {} + +func (x *OperationNFTokenAcceptOffer) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationNFTokenAcceptOffer.ProtoReflect.Descriptor instead. +func (*OperationNFTokenAcceptOffer) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{8} +} + +func (x *OperationNFTokenAcceptOffer) GetSellOffer() string { + if x != nil { + return x.SellOffer + } + return "" +} + +// https://xrpl.org/nftokencanceloffer.html +type OperationNFTokenCancelOffer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Hex-encoded Vector256 NFTokenOffers + TokenOffers []string `protobuf:"bytes,1,rep,name=token_offers,json=tokenOffers,proto3" json:"token_offers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationNFTokenCancelOffer) Reset() { + *x = OperationNFTokenCancelOffer{} + mi := &file_Ripple_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationNFTokenCancelOffer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationNFTokenCancelOffer) ProtoMessage() {} + +func (x *OperationNFTokenCancelOffer) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationNFTokenCancelOffer.ProtoReflect.Descriptor instead. +func (*OperationNFTokenCancelOffer) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{9} +} + +func (x *OperationNFTokenCancelOffer) GetTokenOffers() []string { + if x != nil { + return x.TokenOffers + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transfer fee + Fee int64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` + // Account sequence number + Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Ledger sequence number + LastLedgerSequence uint32 `protobuf:"varint,3,opt,name=last_ledger_sequence,json=lastLedgerSequence,proto3" json:"last_ledger_sequence,omitempty"` + // Source account + Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"` + // Transaction flags, optional + // It must fit uint32 + Flags uint64 `protobuf:"varint,5,opt,name=flags,proto3" json:"flags,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Types that are valid to be assigned to OperationOneof: + // + // *SigningInput_OpTrustSet + // *SigningInput_OpPayment + // *SigningInput_OpNftokenBurn + // *SigningInput_OpNftokenCreateOffer + // *SigningInput_OpNftokenAcceptOffer + // *SigningInput_OpNftokenCancelOffer + // *SigningInput_OpEscrowCreate + // *SigningInput_OpEscrowCancel + // *SigningInput_OpEscrowFinish + OperationOneof isSigningInput_OperationOneof `protobuf_oneof:"operation_oneof"` + // Only used by tss chain-integration. + PublicKey []byte `protobuf:"bytes,15,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Generate a transaction from its JSON representation. + // The following parameters can be replaced from the `SigningInput` Protobuf: + // * Account + // * SigningPubKey + // * Fee + // * Sequence + // * LastLedgerSequence + RawJson string `protobuf:"bytes,20,opt,name=raw_json,json=rawJson,proto3" json:"raw_json,omitempty"` + // Arbitrary integer used to identify the reason for this payment, or a sender on whose behalf this transaction is made. + // Conventionally, a refund should specify the initial payment's SourceTag as the refund payment's DestinationTag. + // It must fit uint32. + SourceTag uint64 `protobuf:"varint,25,opt,name=source_tag,json=sourceTag,proto3" json:"source_tag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Ripple_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{10} +} + +func (x *SigningInput) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *SigningInput) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *SigningInput) GetLastLedgerSequence() uint32 { + if x != nil { + return x.LastLedgerSequence + } + return 0 +} + +func (x *SigningInput) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *SigningInput) GetFlags() uint64 { + if x != nil { + return x.Flags + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetOperationOneof() isSigningInput_OperationOneof { + if x != nil { + return x.OperationOneof + } + return nil +} + +func (x *SigningInput) GetOpTrustSet() *OperationTrustSet { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpTrustSet); ok { + return x.OpTrustSet + } + } + return nil +} + +func (x *SigningInput) GetOpPayment() *OperationPayment { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpPayment); ok { + return x.OpPayment + } + } + return nil +} + +func (x *SigningInput) GetOpNftokenBurn() *OperationNFTokenBurn { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpNftokenBurn); ok { + return x.OpNftokenBurn + } + } + return nil +} + +func (x *SigningInput) GetOpNftokenCreateOffer() *OperationNFTokenCreateOffer { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpNftokenCreateOffer); ok { + return x.OpNftokenCreateOffer + } + } + return nil +} + +func (x *SigningInput) GetOpNftokenAcceptOffer() *OperationNFTokenAcceptOffer { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpNftokenAcceptOffer); ok { + return x.OpNftokenAcceptOffer + } + } + return nil +} + +func (x *SigningInput) GetOpNftokenCancelOffer() *OperationNFTokenCancelOffer { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpNftokenCancelOffer); ok { + return x.OpNftokenCancelOffer + } + } + return nil +} + +func (x *SigningInput) GetOpEscrowCreate() *OperationEscrowCreate { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpEscrowCreate); ok { + return x.OpEscrowCreate + } + } + return nil +} + +func (x *SigningInput) GetOpEscrowCancel() *OperationEscrowCancel { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpEscrowCancel); ok { + return x.OpEscrowCancel + } + } + return nil +} + +func (x *SigningInput) GetOpEscrowFinish() *OperationEscrowFinish { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpEscrowFinish); ok { + return x.OpEscrowFinish + } + } + return nil +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *SigningInput) GetRawJson() string { + if x != nil { + return x.RawJson + } + return "" +} + +func (x *SigningInput) GetSourceTag() uint64 { + if x != nil { + return x.SourceTag + } + return 0 +} + +type isSigningInput_OperationOneof interface { + isSigningInput_OperationOneof() +} + +type SigningInput_OpTrustSet struct { + OpTrustSet *OperationTrustSet `protobuf:"bytes,7,opt,name=op_trust_set,json=opTrustSet,proto3,oneof"` +} + +type SigningInput_OpPayment struct { + OpPayment *OperationPayment `protobuf:"bytes,8,opt,name=op_payment,json=opPayment,proto3,oneof"` +} + +type SigningInput_OpNftokenBurn struct { + OpNftokenBurn *OperationNFTokenBurn `protobuf:"bytes,9,opt,name=op_nftoken_burn,json=opNftokenBurn,proto3,oneof"` +} + +type SigningInput_OpNftokenCreateOffer struct { + OpNftokenCreateOffer *OperationNFTokenCreateOffer `protobuf:"bytes,10,opt,name=op_nftoken_create_offer,json=opNftokenCreateOffer,proto3,oneof"` +} + +type SigningInput_OpNftokenAcceptOffer struct { + OpNftokenAcceptOffer *OperationNFTokenAcceptOffer `protobuf:"bytes,11,opt,name=op_nftoken_accept_offer,json=opNftokenAcceptOffer,proto3,oneof"` +} + +type SigningInput_OpNftokenCancelOffer struct { + OpNftokenCancelOffer *OperationNFTokenCancelOffer `protobuf:"bytes,12,opt,name=op_nftoken_cancel_offer,json=opNftokenCancelOffer,proto3,oneof"` +} + +type SigningInput_OpEscrowCreate struct { + OpEscrowCreate *OperationEscrowCreate `protobuf:"bytes,16,opt,name=op_escrow_create,json=opEscrowCreate,proto3,oneof"` +} + +type SigningInput_OpEscrowCancel struct { + OpEscrowCancel *OperationEscrowCancel `protobuf:"bytes,17,opt,name=op_escrow_cancel,json=opEscrowCancel,proto3,oneof"` +} + +type SigningInput_OpEscrowFinish struct { + OpEscrowFinish *OperationEscrowFinish `protobuf:"bytes,18,opt,name=op_escrow_finish,json=opEscrowFinish,proto3,oneof"` +} + +func (*SigningInput_OpTrustSet) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpPayment) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpNftokenBurn) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpNftokenCreateOffer) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpNftokenAcceptOffer) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpNftokenCancelOffer) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpEscrowCreate) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpEscrowCancel) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpEscrowFinish) isSigningInput_OperationOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Encoded transaction + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Optional error + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Ripple_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Ripple_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Ripple_proto_rawDescGZIP(), []int{11} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Ripple_proto protoreflect.FileDescriptor + +const file_Ripple_proto_rawDesc = "" + + "\n" + + "\fRipple.proto\x12\x0fTW.Ripple.Proto\x1a\fCommon.proto\"Z\n" + + "\x0eCurrencyAmount\x12\x1a\n" + + "\bcurrency\x18\x01 \x01(\tR\bcurrency\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value\x12\x16\n" + + "\x06issuer\x18\x03 \x01(\tR\x06issuer\"W\n" + + "\x11OperationTrustSet\x12B\n" + + "\flimit_amount\x18\x01 \x01(\v2\x1f.TW.Ripple.Proto.CurrencyAmountR\vlimitAmount\"\xd3\x01\n" + + "\x10OperationPayment\x12\x18\n" + + "\x06amount\x18\x01 \x01(\x03H\x00R\x06amount\x12J\n" + + "\x0fcurrency_amount\x18\x02 \x01(\v2\x1f.TW.Ripple.Proto.CurrencyAmountH\x00R\x0ecurrencyAmount\x12 \n" + + "\vdestination\x18\x03 \x01(\tR\vdestination\x12'\n" + + "\x0fdestination_tag\x18\x04 \x01(\x04R\x0edestinationTagB\x0e\n" + + "\famount_oneof\"\xde\x01\n" + + "\x15OperationEscrowCreate\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12 \n" + + "\vdestination\x18\x02 \x01(\tR\vdestination\x12'\n" + + "\x0fdestination_tag\x18\x03 \x01(\x04R\x0edestinationTag\x12!\n" + + "\fcancel_after\x18\x04 \x01(\x04R\vcancelAfter\x12!\n" + + "\ffinish_after\x18\x05 \x01(\x04R\vfinishAfter\x12\x1c\n" + + "\tcondition\x18\x06 \x01(\tR\tcondition\"T\n" + + "\x15OperationEscrowCancel\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12%\n" + + "\x0eoffer_sequence\x18\x02 \x01(\rR\rofferSequence\"\x94\x01\n" + + "\x15OperationEscrowFinish\x12\x14\n" + + "\x05owner\x18\x01 \x01(\tR\x05owner\x12%\n" + + "\x0eoffer_sequence\x18\x02 \x01(\rR\rofferSequence\x12\x1c\n" + + "\tcondition\x18\x03 \x01(\tR\tcondition\x12 \n" + + "\vfulfillment\x18\x04 \x01(\tR\vfulfillment\"5\n" + + "\x14OperationNFTokenBurn\x12\x1d\n" + + "\n" + + "nftoken_id\x18\x01 \x01(\tR\tnftokenId\"^\n" + + "\x1bOperationNFTokenCreateOffer\x12\x1d\n" + + "\n" + + "nftoken_id\x18\x01 \x01(\tR\tnftokenId\x12 \n" + + "\vdestination\x18\x02 \x01(\tR\vdestination\"<\n" + + "\x1bOperationNFTokenAcceptOffer\x12\x1d\n" + + "\n" + + "sell_offer\x18\x01 \x01(\tR\tsellOffer\"@\n" + + "\x1bOperationNFTokenCancelOffer\x12!\n" + + "\ftoken_offers\x18\x01 \x03(\tR\vtokenOffers\"\xb9\b\n" + + "\fSigningInput\x12\x10\n" + + "\x03fee\x18\x01 \x01(\x03R\x03fee\x12\x1a\n" + + "\bsequence\x18\x02 \x01(\rR\bsequence\x120\n" + + "\x14last_ledger_sequence\x18\x03 \x01(\rR\x12lastLedgerSequence\x12\x18\n" + + "\aaccount\x18\x04 \x01(\tR\aaccount\x12\x14\n" + + "\x05flags\x18\x05 \x01(\x04R\x05flags\x12\x1f\n" + + "\vprivate_key\x18\x06 \x01(\fR\n" + + "privateKey\x12F\n" + + "\fop_trust_set\x18\a \x01(\v2\".TW.Ripple.Proto.OperationTrustSetH\x00R\n" + + "opTrustSet\x12B\n" + + "\n" + + "op_payment\x18\b \x01(\v2!.TW.Ripple.Proto.OperationPaymentH\x00R\topPayment\x12O\n" + + "\x0fop_nftoken_burn\x18\t \x01(\v2%.TW.Ripple.Proto.OperationNFTokenBurnH\x00R\ropNftokenBurn\x12e\n" + + "\x17op_nftoken_create_offer\x18\n" + + " \x01(\v2,.TW.Ripple.Proto.OperationNFTokenCreateOfferH\x00R\x14opNftokenCreateOffer\x12e\n" + + "\x17op_nftoken_accept_offer\x18\v \x01(\v2,.TW.Ripple.Proto.OperationNFTokenAcceptOfferH\x00R\x14opNftokenAcceptOffer\x12e\n" + + "\x17op_nftoken_cancel_offer\x18\f \x01(\v2,.TW.Ripple.Proto.OperationNFTokenCancelOfferH\x00R\x14opNftokenCancelOffer\x12R\n" + + "\x10op_escrow_create\x18\x10 \x01(\v2&.TW.Ripple.Proto.OperationEscrowCreateH\x00R\x0eopEscrowCreate\x12R\n" + + "\x10op_escrow_cancel\x18\x11 \x01(\v2&.TW.Ripple.Proto.OperationEscrowCancelH\x00R\x0eopEscrowCancel\x12R\n" + + "\x10op_escrow_finish\x18\x12 \x01(\v2&.TW.Ripple.Proto.OperationEscrowFinishH\x00R\x0eopEscrowFinish\x12\x1d\n" + + "\n" + + "public_key\x18\x0f \x01(\fR\tpublicKey\x12\x19\n" + + "\braw_json\x18\x14 \x01(\tR\arawJson\x12\x1d\n" + + "\n" + + "source_tag\x18\x19 \x01(\x04R\tsourceTagB\x11\n" + + "\x0foperation_oneof\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Ripple_proto_rawDescOnce sync.Once + file_Ripple_proto_rawDescData []byte +) + +func file_Ripple_proto_rawDescGZIP() []byte { + file_Ripple_proto_rawDescOnce.Do(func() { + file_Ripple_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Ripple_proto_rawDesc), len(file_Ripple_proto_rawDesc))) + }) + return file_Ripple_proto_rawDescData +} + +var file_Ripple_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_Ripple_proto_goTypes = []any{ + (*CurrencyAmount)(nil), // 0: TW.Ripple.Proto.CurrencyAmount + (*OperationTrustSet)(nil), // 1: TW.Ripple.Proto.OperationTrustSet + (*OperationPayment)(nil), // 2: TW.Ripple.Proto.OperationPayment + (*OperationEscrowCreate)(nil), // 3: TW.Ripple.Proto.OperationEscrowCreate + (*OperationEscrowCancel)(nil), // 4: TW.Ripple.Proto.OperationEscrowCancel + (*OperationEscrowFinish)(nil), // 5: TW.Ripple.Proto.OperationEscrowFinish + (*OperationNFTokenBurn)(nil), // 6: TW.Ripple.Proto.OperationNFTokenBurn + (*OperationNFTokenCreateOffer)(nil), // 7: TW.Ripple.Proto.OperationNFTokenCreateOffer + (*OperationNFTokenAcceptOffer)(nil), // 8: TW.Ripple.Proto.OperationNFTokenAcceptOffer + (*OperationNFTokenCancelOffer)(nil), // 9: TW.Ripple.Proto.OperationNFTokenCancelOffer + (*SigningInput)(nil), // 10: TW.Ripple.Proto.SigningInput + (*SigningOutput)(nil), // 11: TW.Ripple.Proto.SigningOutput + (common.SigningError)(0), // 12: TW.Common.Proto.SigningError +} +var file_Ripple_proto_depIdxs = []int32{ + 0, // 0: TW.Ripple.Proto.OperationTrustSet.limit_amount:type_name -> TW.Ripple.Proto.CurrencyAmount + 0, // 1: TW.Ripple.Proto.OperationPayment.currency_amount:type_name -> TW.Ripple.Proto.CurrencyAmount + 1, // 2: TW.Ripple.Proto.SigningInput.op_trust_set:type_name -> TW.Ripple.Proto.OperationTrustSet + 2, // 3: TW.Ripple.Proto.SigningInput.op_payment:type_name -> TW.Ripple.Proto.OperationPayment + 6, // 4: TW.Ripple.Proto.SigningInput.op_nftoken_burn:type_name -> TW.Ripple.Proto.OperationNFTokenBurn + 7, // 5: TW.Ripple.Proto.SigningInput.op_nftoken_create_offer:type_name -> TW.Ripple.Proto.OperationNFTokenCreateOffer + 8, // 6: TW.Ripple.Proto.SigningInput.op_nftoken_accept_offer:type_name -> TW.Ripple.Proto.OperationNFTokenAcceptOffer + 9, // 7: TW.Ripple.Proto.SigningInput.op_nftoken_cancel_offer:type_name -> TW.Ripple.Proto.OperationNFTokenCancelOffer + 3, // 8: TW.Ripple.Proto.SigningInput.op_escrow_create:type_name -> TW.Ripple.Proto.OperationEscrowCreate + 4, // 9: TW.Ripple.Proto.SigningInput.op_escrow_cancel:type_name -> TW.Ripple.Proto.OperationEscrowCancel + 5, // 10: TW.Ripple.Proto.SigningInput.op_escrow_finish:type_name -> TW.Ripple.Proto.OperationEscrowFinish + 12, // 11: TW.Ripple.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_Ripple_proto_init() } +func file_Ripple_proto_init() { + if File_Ripple_proto != nil { + return + } + file_Ripple_proto_msgTypes[2].OneofWrappers = []any{ + (*OperationPayment_Amount)(nil), + (*OperationPayment_CurrencyAmount)(nil), + } + file_Ripple_proto_msgTypes[10].OneofWrappers = []any{ + (*SigningInput_OpTrustSet)(nil), + (*SigningInput_OpPayment)(nil), + (*SigningInput_OpNftokenBurn)(nil), + (*SigningInput_OpNftokenCreateOffer)(nil), + (*SigningInput_OpNftokenAcceptOffer)(nil), + (*SigningInput_OpNftokenCancelOffer)(nil), + (*SigningInput_OpEscrowCreate)(nil), + (*SigningInput_OpEscrowCancel)(nil), + (*SigningInput_OpEscrowFinish)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Ripple_proto_rawDesc), len(file_Ripple_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Ripple_proto_goTypes, + DependencyIndexes: file_Ripple_proto_depIdxs, + MessageInfos: file_Ripple_proto_msgTypes, + }.Build() + File_Ripple_proto = out.File + file_Ripple_proto_goTypes = nil + file_Ripple_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/solana/Solana.pb.go b/wrapper/go-wrapper/protos/solana/Solana.pb.go new file mode 100644 index 00000000000..a4b4e0b67e3 --- /dev/null +++ b/wrapper/go-wrapper/protos/solana/Solana.pb.go @@ -0,0 +1,2582 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Solana.proto + +package solana + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TokenProgramId int32 + +const ( + TokenProgramId_TokenProgram TokenProgramId = 0 + TokenProgramId_Token2022Program TokenProgramId = 1 +) + +// Enum value maps for TokenProgramId. +var ( + TokenProgramId_name = map[int32]string{ + 0: "TokenProgram", + 1: "Token2022Program", + } + TokenProgramId_value = map[string]int32{ + "TokenProgram": 0, + "Token2022Program": 1, + } +) + +func (x TokenProgramId) Enum() *TokenProgramId { + p := new(TokenProgramId) + *p = x + return p +} + +func (x TokenProgramId) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TokenProgramId) Descriptor() protoreflect.EnumDescriptor { + return file_Solana_proto_enumTypes[0].Descriptor() +} + +func (TokenProgramId) Type() protoreflect.EnumType { + return &file_Solana_proto_enumTypes[0] +} + +func (x TokenProgramId) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TokenProgramId.Descriptor instead. +func (TokenProgramId) EnumDescriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{0} +} + +type Encoding int32 + +const ( + Encoding_Base58 Encoding = 0 + Encoding_Base64 Encoding = 1 +) + +// Enum value maps for Encoding. +var ( + Encoding_name = map[int32]string{ + 0: "Base58", + 1: "Base64", + } + Encoding_value = map[string]int32{ + "Base58": 0, + "Base64": 1, + } +) + +func (x Encoding) Enum() *Encoding { + p := new(Encoding) + *p = x + return p +} + +func (x Encoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Encoding) Descriptor() protoreflect.EnumDescriptor { + return file_Solana_proto_enumTypes[1].Descriptor() +} + +func (Encoding) Type() protoreflect.EnumType { + return &file_Solana_proto_enumTypes[1] +} + +func (x Encoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Encoding.Descriptor instead. +func (Encoding) EnumDescriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{1} +} + +// Transfer transaction +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // destination address + Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` + // amount + Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + // optional memo + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` + // optional referenced public keys + References []string `protobuf:"bytes,4,rep,name=references,proto3" json:"references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_Solana_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{0} +} + +func (x *Transfer) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *Transfer) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *Transfer) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *Transfer) GetReferences() []string { + if x != nil { + return x.References + } + return nil +} + +// Create and initialize a stake account, and delegate amount to it. +// Recommendation behavior is to not specify a stake account, and a new unique account will be created each time. +// Optionally a stake account pubkey can be specified, but it should not exist on chain. +type DelegateStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Validator's public key + ValidatorPubkey string `protobuf:"bytes,1,opt,name=validator_pubkey,json=validatorPubkey,proto3" json:"validator_pubkey,omitempty"` + // delegation amount + Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + // staking account + StakeAccount string `protobuf:"bytes,3,opt,name=stake_account,json=stakeAccount,proto3" json:"stake_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DelegateStake) Reset() { + *x = DelegateStake{} + mi := &file_Solana_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DelegateStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegateStake) ProtoMessage() {} + +func (x *DelegateStake) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DelegateStake.ProtoReflect.Descriptor instead. +func (*DelegateStake) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{1} +} + +func (x *DelegateStake) GetValidatorPubkey() string { + if x != nil { + return x.ValidatorPubkey + } + return "" +} + +func (x *DelegateStake) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *DelegateStake) GetStakeAccount() string { + if x != nil { + return x.StakeAccount + } + return "" +} + +// Deactivate staking on stake account +type DeactivateStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // staking account + StakeAccount string `protobuf:"bytes,1,opt,name=stake_account,json=stakeAccount,proto3" json:"stake_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeactivateStake) Reset() { + *x = DeactivateStake{} + mi := &file_Solana_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeactivateStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeactivateStake) ProtoMessage() {} + +func (x *DeactivateStake) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeactivateStake.ProtoReflect.Descriptor instead. +func (*DeactivateStake) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{2} +} + +func (x *DeactivateStake) GetStakeAccount() string { + if x != nil { + return x.StakeAccount + } + return "" +} + +// Deactivate staking on multiple stake account +type DeactivateAllStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // staking accounts + StakeAccounts []string `protobuf:"bytes,1,rep,name=stake_accounts,json=stakeAccounts,proto3" json:"stake_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeactivateAllStake) Reset() { + *x = DeactivateAllStake{} + mi := &file_Solana_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeactivateAllStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeactivateAllStake) ProtoMessage() {} + +func (x *DeactivateAllStake) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeactivateAllStake.ProtoReflect.Descriptor instead. +func (*DeactivateAllStake) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{3} +} + +func (x *DeactivateAllStake) GetStakeAccounts() []string { + if x != nil { + return x.StakeAccounts + } + return nil +} + +// Withdraw amount from stake account +type WithdrawStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // staking account + StakeAccount string `protobuf:"bytes,1,opt,name=stake_account,json=stakeAccount,proto3" json:"stake_account,omitempty"` + // withdrawal amount + Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WithdrawStake) Reset() { + *x = WithdrawStake{} + mi := &file_Solana_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WithdrawStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawStake) ProtoMessage() {} + +func (x *WithdrawStake) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawStake.ProtoReflect.Descriptor instead. +func (*WithdrawStake) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{4} +} + +func (x *WithdrawStake) GetStakeAccount() string { + if x != nil { + return x.StakeAccount + } + return "" +} + +func (x *WithdrawStake) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +// Technical structure to group a staking account and an amount +type StakeAccountValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + // staking account + StakeAccount string `protobuf:"bytes,1,opt,name=stake_account,json=stakeAccount,proto3" json:"stake_account,omitempty"` + // amount + Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StakeAccountValue) Reset() { + *x = StakeAccountValue{} + mi := &file_Solana_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StakeAccountValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StakeAccountValue) ProtoMessage() {} + +func (x *StakeAccountValue) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StakeAccountValue.ProtoReflect.Descriptor instead. +func (*StakeAccountValue) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{5} +} + +func (x *StakeAccountValue) GetStakeAccount() string { + if x != nil { + return x.StakeAccount + } + return "" +} + +func (x *StakeAccountValue) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +// Withdraw amounts from stake accounts +type WithdrawAllStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + StakeAccounts []*StakeAccountValue `protobuf:"bytes,1,rep,name=stake_accounts,json=stakeAccounts,proto3" json:"stake_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WithdrawAllStake) Reset() { + *x = WithdrawAllStake{} + mi := &file_Solana_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WithdrawAllStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawAllStake) ProtoMessage() {} + +func (x *WithdrawAllStake) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawAllStake.ProtoReflect.Descriptor instead. +func (*WithdrawAllStake) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{6} +} + +func (x *WithdrawAllStake) GetStakeAccounts() []*StakeAccountValue { + if x != nil { + return x.StakeAccounts + } + return nil +} + +// Create a token account under a main account for a token type +type CreateTokenAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // main account -- can be same as signer, or other main account (if done on some other account's behalf) + MainAddress string `protobuf:"bytes,1,opt,name=main_address,json=mainAddress,proto3" json:"main_address,omitempty"` + // Token minting address + TokenMintAddress string `protobuf:"bytes,2,opt,name=token_mint_address,json=tokenMintAddress,proto3" json:"token_mint_address,omitempty"` + // Token address + TokenAddress string `protobuf:"bytes,3,opt,name=token_address,json=tokenAddress,proto3" json:"token_address,omitempty"` + // optional token program id + TokenProgramId TokenProgramId `protobuf:"varint,4,opt,name=token_program_id,json=tokenProgramId,proto3,enum=TW.Solana.Proto.TokenProgramId" json:"token_program_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTokenAccount) Reset() { + *x = CreateTokenAccount{} + mi := &file_Solana_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTokenAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTokenAccount) ProtoMessage() {} + +func (x *CreateTokenAccount) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTokenAccount.ProtoReflect.Descriptor instead. +func (*CreateTokenAccount) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateTokenAccount) GetMainAddress() string { + if x != nil { + return x.MainAddress + } + return "" +} + +func (x *CreateTokenAccount) GetTokenMintAddress() string { + if x != nil { + return x.TokenMintAddress + } + return "" +} + +func (x *CreateTokenAccount) GetTokenAddress() string { + if x != nil { + return x.TokenAddress + } + return "" +} + +func (x *CreateTokenAccount) GetTokenProgramId() TokenProgramId { + if x != nil { + return x.TokenProgramId + } + return TokenProgramId_TokenProgram +} + +// Transfer tokens +type TokenTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Mint address of the token + TokenMintAddress string `protobuf:"bytes,1,opt,name=token_mint_address,json=tokenMintAddress,proto3" json:"token_mint_address,omitempty"` + // Source address + SenderTokenAddress string `protobuf:"bytes,2,opt,name=sender_token_address,json=senderTokenAddress,proto3" json:"sender_token_address,omitempty"` + // Destination address + RecipientTokenAddress string `protobuf:"bytes,3,opt,name=recipient_token_address,json=recipientTokenAddress,proto3" json:"recipient_token_address,omitempty"` + // Amount + Amount uint64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` + // Note: 8-bit value + Decimals uint32 `protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty"` + // optional memo§ + Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"` + // optional referenced public keys + References []string `protobuf:"bytes,7,rep,name=references,proto3" json:"references,omitempty"` + // optional token program id + TokenProgramId TokenProgramId `protobuf:"varint,8,opt,name=token_program_id,json=tokenProgramId,proto3,enum=TW.Solana.Proto.TokenProgramId" json:"token_program_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TokenTransfer) Reset() { + *x = TokenTransfer{} + mi := &file_Solana_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TokenTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenTransfer) ProtoMessage() {} + +func (x *TokenTransfer) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenTransfer.ProtoReflect.Descriptor instead. +func (*TokenTransfer) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{8} +} + +func (x *TokenTransfer) GetTokenMintAddress() string { + if x != nil { + return x.TokenMintAddress + } + return "" +} + +func (x *TokenTransfer) GetSenderTokenAddress() string { + if x != nil { + return x.SenderTokenAddress + } + return "" +} + +func (x *TokenTransfer) GetRecipientTokenAddress() string { + if x != nil { + return x.RecipientTokenAddress + } + return "" +} + +func (x *TokenTransfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TokenTransfer) GetDecimals() uint32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *TokenTransfer) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *TokenTransfer) GetReferences() []string { + if x != nil { + return x.References + } + return nil +} + +func (x *TokenTransfer) GetTokenProgramId() TokenProgramId { + if x != nil { + return x.TokenProgramId + } + return TokenProgramId_TokenProgram +} + +// CreateTokenAccount and TokenTransfer combined +type CreateAndTransferToken struct { + state protoimpl.MessageState `protogen:"open.v1"` + // main account -- can be same as signer, or other main account (if done on some other account's behalf) + RecipientMainAddress string `protobuf:"bytes,1,opt,name=recipient_main_address,json=recipientMainAddress,proto3" json:"recipient_main_address,omitempty"` + // Mint address of the token + TokenMintAddress string `protobuf:"bytes,2,opt,name=token_mint_address,json=tokenMintAddress,proto3" json:"token_mint_address,omitempty"` + // Token address for the recipient, will be created first + RecipientTokenAddress string `protobuf:"bytes,3,opt,name=recipient_token_address,json=recipientTokenAddress,proto3" json:"recipient_token_address,omitempty"` + // Sender's token address + SenderTokenAddress string `protobuf:"bytes,4,opt,name=sender_token_address,json=senderTokenAddress,proto3" json:"sender_token_address,omitempty"` + // amount + Amount uint64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` + // Note: 8-bit value + Decimals uint32 `protobuf:"varint,6,opt,name=decimals,proto3" json:"decimals,omitempty"` + // optional + Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` + // optional referenced public keys + References []string `protobuf:"bytes,8,rep,name=references,proto3" json:"references,omitempty"` + // optional token program id + TokenProgramId TokenProgramId `protobuf:"varint,9,opt,name=token_program_id,json=tokenProgramId,proto3,enum=TW.Solana.Proto.TokenProgramId" json:"token_program_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAndTransferToken) Reset() { + *x = CreateAndTransferToken{} + mi := &file_Solana_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAndTransferToken) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAndTransferToken) ProtoMessage() {} + +func (x *CreateAndTransferToken) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAndTransferToken.ProtoReflect.Descriptor instead. +func (*CreateAndTransferToken) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateAndTransferToken) GetRecipientMainAddress() string { + if x != nil { + return x.RecipientMainAddress + } + return "" +} + +func (x *CreateAndTransferToken) GetTokenMintAddress() string { + if x != nil { + return x.TokenMintAddress + } + return "" +} + +func (x *CreateAndTransferToken) GetRecipientTokenAddress() string { + if x != nil { + return x.RecipientTokenAddress + } + return "" +} + +func (x *CreateAndTransferToken) GetSenderTokenAddress() string { + if x != nil { + return x.SenderTokenAddress + } + return "" +} + +func (x *CreateAndTransferToken) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *CreateAndTransferToken) GetDecimals() uint32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *CreateAndTransferToken) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *CreateAndTransferToken) GetReferences() []string { + if x != nil { + return x.References + } + return nil +} + +func (x *CreateAndTransferToken) GetTokenProgramId() TokenProgramId { + if x != nil { + return x.TokenProgramId + } + return TokenProgramId_TokenProgram +} + +type CreateNonceAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Required for building pre-signing hash of a transaction + NonceAccount string `protobuf:"bytes,1,opt,name=nonce_account,json=nonceAccount,proto3" json:"nonce_account,omitempty"` + Rent uint64 `protobuf:"varint,2,opt,name=rent,proto3" json:"rent,omitempty"` + // Optional for building pre-signing hash of a transaction + NonceAccountPrivateKey []byte `protobuf:"bytes,3,opt,name=nonce_account_private_key,json=nonceAccountPrivateKey,proto3" json:"nonce_account_private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateNonceAccount) Reset() { + *x = CreateNonceAccount{} + mi := &file_Solana_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateNonceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNonceAccount) ProtoMessage() {} + +func (x *CreateNonceAccount) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNonceAccount.ProtoReflect.Descriptor instead. +func (*CreateNonceAccount) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateNonceAccount) GetNonceAccount() string { + if x != nil { + return x.NonceAccount + } + return "" +} + +func (x *CreateNonceAccount) GetRent() uint64 { + if x != nil { + return x.Rent + } + return 0 +} + +func (x *CreateNonceAccount) GetNonceAccountPrivateKey() []byte { + if x != nil { + return x.NonceAccountPrivateKey + } + return nil +} + +type WithdrawNonceAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + NonceAccount string `protobuf:"bytes,1,opt,name=nonce_account,json=nonceAccount,proto3" json:"nonce_account,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Value uint64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WithdrawNonceAccount) Reset() { + *x = WithdrawNonceAccount{} + mi := &file_Solana_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WithdrawNonceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawNonceAccount) ProtoMessage() {} + +func (x *WithdrawNonceAccount) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawNonceAccount.ProtoReflect.Descriptor instead. +func (*WithdrawNonceAccount) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{11} +} + +func (x *WithdrawNonceAccount) GetNonceAccount() string { + if x != nil { + return x.NonceAccount + } + return "" +} + +func (x *WithdrawNonceAccount) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *WithdrawNonceAccount) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +type AdvanceNonceAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + NonceAccount string `protobuf:"bytes,1,opt,name=nonce_account,json=nonceAccount,proto3" json:"nonce_account,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdvanceNonceAccount) Reset() { + *x = AdvanceNonceAccount{} + mi := &file_Solana_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdvanceNonceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdvanceNonceAccount) ProtoMessage() {} + +func (x *AdvanceNonceAccount) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdvanceNonceAccount.ProtoReflect.Descriptor instead. +func (*AdvanceNonceAccount) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{12} +} + +func (x *AdvanceNonceAccount) GetNonceAccount() string { + if x != nil { + return x.NonceAccount + } + return "" +} + +type PubkeySignature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pubkey string `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // base58 encoded signature. + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PubkeySignature) Reset() { + *x = PubkeySignature{} + mi := &file_Solana_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PubkeySignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubkeySignature) ProtoMessage() {} + +func (x *PubkeySignature) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PubkeySignature.ProtoReflect.Descriptor instead. +func (*PubkeySignature) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{13} +} + +func (x *PubkeySignature) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *PubkeySignature) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +type RawMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction signatures. + // If private keys are set in `SigningInput`, corresponding signatures will be overriden. + // It's also possible some or all the signatures are be used to compile a transaction if corresponding private keys are not set. + Signatures []*PubkeySignature `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` + // Types that are valid to be assigned to Message: + // + // *RawMessage_Legacy + // *RawMessage_V0 + Message isRawMessage_Message `protobuf_oneof:"message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawMessage) Reset() { + *x = RawMessage{} + mi := &file_Solana_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawMessage) ProtoMessage() {} + +func (x *RawMessage) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawMessage.ProtoReflect.Descriptor instead. +func (*RawMessage) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{14} +} + +func (x *RawMessage) GetSignatures() []*PubkeySignature { + if x != nil { + return x.Signatures + } + return nil +} + +func (x *RawMessage) GetMessage() isRawMessage_Message { + if x != nil { + return x.Message + } + return nil +} + +func (x *RawMessage) GetLegacy() *RawMessage_MessageLegacy { + if x != nil { + if x, ok := x.Message.(*RawMessage_Legacy); ok { + return x.Legacy + } + } + return nil +} + +func (x *RawMessage) GetV0() *RawMessage_MessageV0 { + if x != nil { + if x, ok := x.Message.(*RawMessage_V0); ok { + return x.V0 + } + } + return nil +} + +type isRawMessage_Message interface { + isRawMessage_Message() +} + +type RawMessage_Legacy struct { + Legacy *RawMessage_MessageLegacy `protobuf:"bytes,2,opt,name=legacy,proto3,oneof"` +} + +type RawMessage_V0 struct { + V0 *RawMessage_MessageV0 `protobuf:"bytes,3,opt,name=v0,proto3,oneof"` +} + +func (*RawMessage_Legacy) isRawMessage_Message() {} + +func (*RawMessage_V0) isRawMessage_Message() {} + +type DecodingTransactionOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Decoded transaction info. + Transaction *RawMessage `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DecodingTransactionOutput) Reset() { + *x = DecodingTransactionOutput{} + mi := &file_Solana_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DecodingTransactionOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DecodingTransactionOutput) ProtoMessage() {} + +func (x *DecodingTransactionOutput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DecodingTransactionOutput.ProtoReflect.Descriptor instead. +func (*DecodingTransactionOutput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{15} +} + +func (x *DecodingTransactionOutput) GetTransaction() *RawMessage { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *DecodingTransactionOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *DecodingTransactionOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Specific compute unit limit that the transaction is allowed to consume. +type PriorityFeePrice struct { + state protoimpl.MessageState `protogen:"open.v1"` + Price uint64 `protobuf:"varint,1,opt,name=price,proto3" json:"price,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PriorityFeePrice) Reset() { + *x = PriorityFeePrice{} + mi := &file_Solana_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PriorityFeePrice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PriorityFeePrice) ProtoMessage() {} + +func (x *PriorityFeePrice) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PriorityFeePrice.ProtoReflect.Descriptor instead. +func (*PriorityFeePrice) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{16} +} + +func (x *PriorityFeePrice) GetPrice() uint64 { + if x != nil { + return x.Price + } + return 0 +} + +// Compute unit price in "micro-lamports" to pay a higher transaction fee for higher transaction prioritization. +type PriorityFeeLimit struct { + state protoimpl.MessageState `protogen:"open.v1"` + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PriorityFeeLimit) Reset() { + *x = PriorityFeeLimit{} + mi := &file_Solana_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PriorityFeeLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PriorityFeeLimit) ProtoMessage() {} + +func (x *PriorityFeeLimit) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PriorityFeeLimit.ProtoReflect.Descriptor instead. +func (*PriorityFeeLimit) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{17} +} + +func (x *PriorityFeeLimit) GetLimit() uint32 { + if x != nil { + return x.Limit + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Relatively recent block hash + RecentBlockhash string `protobuf:"bytes,2,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` + V0Msg bool `protobuf:"varint,3,opt,name=v0_msg,json=v0Msg,proto3" json:"v0_msg,omitempty"` + // Payload message + // + // Types that are valid to be assigned to TransactionType: + // + // *SigningInput_TransferTransaction + // *SigningInput_DelegateStakeTransaction + // *SigningInput_DeactivateStakeTransaction + // *SigningInput_DeactivateAllStakeTransaction + // *SigningInput_WithdrawTransaction + // *SigningInput_WithdrawAllTransaction + // *SigningInput_CreateTokenAccountTransaction + // *SigningInput_TokenTransferTransaction + // *SigningInput_CreateAndTransferTokenTransaction + // *SigningInput_CreateNonceAccount + // *SigningInput_WithdrawNonceAccount + // *SigningInput_AdvanceNonceAccount + TransactionType isSigningInput_TransactionType `protobuf_oneof:"transaction_type"` + // Required for building pre-signing hash of a transaction + Sender string `protobuf:"bytes,14,opt,name=sender,proto3" json:"sender,omitempty"` + // Required for using durable transaction nonce + NonceAccount string `protobuf:"bytes,15,opt,name=nonce_account,json=nonceAccount,proto3" json:"nonce_account,omitempty"` + // Optional external fee payer private key. support: TokenTransfer, CreateAndTransferToken + FeePayerPrivateKey []byte `protobuf:"bytes,17,opt,name=fee_payer_private_key,json=feePayerPrivateKey,proto3" json:"fee_payer_private_key,omitempty"` + // Optional external fee payer. support: TokenTransfer, CreateAndTransferToken + FeePayer string `protobuf:"bytes,18,opt,name=fee_payer,json=feePayer,proto3" json:"fee_payer,omitempty"` + // Optional message plan. For signing an already prepared message. + RawMessage *RawMessage `protobuf:"bytes,20,opt,name=raw_message,json=rawMessage,proto3" json:"raw_message,omitempty"` + // Output transaction encoding. + TxEncoding Encoding `protobuf:"varint,21,opt,name=tx_encoding,json=txEncoding,proto3,enum=TW.Solana.Proto.Encoding" json:"tx_encoding,omitempty"` + // Optional. Set a specific compute unit limit that the transaction is allowed to consume. + // https://solana.com/docs/intro/transaction_fees#prioritization-fee + PriorityFeePrice *PriorityFeePrice `protobuf:"bytes,22,opt,name=priority_fee_price,json=priorityFeePrice,proto3" json:"priority_fee_price,omitempty"` + // Optional. Set a compute unit price in "micro-lamports" to pay a higher transaction + // fee for higher transaction prioritization. + // https://solana.com/docs/intro/transaction_fees#prioritization-fee + PriorityFeeLimit *PriorityFeeLimit `protobuf:"bytes,23,opt,name=priority_fee_limit,json=priorityFeeLimit,proto3" json:"priority_fee_limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Solana_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{18} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetRecentBlockhash() string { + if x != nil { + return x.RecentBlockhash + } + return "" +} + +func (x *SigningInput) GetV0Msg() bool { + if x != nil { + return x.V0Msg + } + return false +} + +func (x *SigningInput) GetTransactionType() isSigningInput_TransactionType { + if x != nil { + return x.TransactionType + } + return nil +} + +func (x *SigningInput) GetTransferTransaction() *Transfer { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_TransferTransaction); ok { + return x.TransferTransaction + } + } + return nil +} + +func (x *SigningInput) GetDelegateStakeTransaction() *DelegateStake { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_DelegateStakeTransaction); ok { + return x.DelegateStakeTransaction + } + } + return nil +} + +func (x *SigningInput) GetDeactivateStakeTransaction() *DeactivateStake { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_DeactivateStakeTransaction); ok { + return x.DeactivateStakeTransaction + } + } + return nil +} + +func (x *SigningInput) GetDeactivateAllStakeTransaction() *DeactivateAllStake { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_DeactivateAllStakeTransaction); ok { + return x.DeactivateAllStakeTransaction + } + } + return nil +} + +func (x *SigningInput) GetWithdrawTransaction() *WithdrawStake { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_WithdrawTransaction); ok { + return x.WithdrawTransaction + } + } + return nil +} + +func (x *SigningInput) GetWithdrawAllTransaction() *WithdrawAllStake { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_WithdrawAllTransaction); ok { + return x.WithdrawAllTransaction + } + } + return nil +} + +func (x *SigningInput) GetCreateTokenAccountTransaction() *CreateTokenAccount { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_CreateTokenAccountTransaction); ok { + return x.CreateTokenAccountTransaction + } + } + return nil +} + +func (x *SigningInput) GetTokenTransferTransaction() *TokenTransfer { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_TokenTransferTransaction); ok { + return x.TokenTransferTransaction + } + } + return nil +} + +func (x *SigningInput) GetCreateAndTransferTokenTransaction() *CreateAndTransferToken { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_CreateAndTransferTokenTransaction); ok { + return x.CreateAndTransferTokenTransaction + } + } + return nil +} + +func (x *SigningInput) GetCreateNonceAccount() *CreateNonceAccount { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_CreateNonceAccount); ok { + return x.CreateNonceAccount + } + } + return nil +} + +func (x *SigningInput) GetWithdrawNonceAccount() *WithdrawNonceAccount { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_WithdrawNonceAccount); ok { + return x.WithdrawNonceAccount + } + } + return nil +} + +func (x *SigningInput) GetAdvanceNonceAccount() *AdvanceNonceAccount { + if x != nil { + if x, ok := x.TransactionType.(*SigningInput_AdvanceNonceAccount); ok { + return x.AdvanceNonceAccount + } + } + return nil +} + +func (x *SigningInput) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *SigningInput) GetNonceAccount() string { + if x != nil { + return x.NonceAccount + } + return "" +} + +func (x *SigningInput) GetFeePayerPrivateKey() []byte { + if x != nil { + return x.FeePayerPrivateKey + } + return nil +} + +func (x *SigningInput) GetFeePayer() string { + if x != nil { + return x.FeePayer + } + return "" +} + +func (x *SigningInput) GetRawMessage() *RawMessage { + if x != nil { + return x.RawMessage + } + return nil +} + +func (x *SigningInput) GetTxEncoding() Encoding { + if x != nil { + return x.TxEncoding + } + return Encoding_Base58 +} + +func (x *SigningInput) GetPriorityFeePrice() *PriorityFeePrice { + if x != nil { + return x.PriorityFeePrice + } + return nil +} + +func (x *SigningInput) GetPriorityFeeLimit() *PriorityFeeLimit { + if x != nil { + return x.PriorityFeeLimit + } + return nil +} + +type isSigningInput_TransactionType interface { + isSigningInput_TransactionType() +} + +type SigningInput_TransferTransaction struct { + TransferTransaction *Transfer `protobuf:"bytes,4,opt,name=transfer_transaction,json=transferTransaction,proto3,oneof"` +} + +type SigningInput_DelegateStakeTransaction struct { + DelegateStakeTransaction *DelegateStake `protobuf:"bytes,5,opt,name=delegate_stake_transaction,json=delegateStakeTransaction,proto3,oneof"` +} + +type SigningInput_DeactivateStakeTransaction struct { + DeactivateStakeTransaction *DeactivateStake `protobuf:"bytes,6,opt,name=deactivate_stake_transaction,json=deactivateStakeTransaction,proto3,oneof"` +} + +type SigningInput_DeactivateAllStakeTransaction struct { + DeactivateAllStakeTransaction *DeactivateAllStake `protobuf:"bytes,7,opt,name=deactivate_all_stake_transaction,json=deactivateAllStakeTransaction,proto3,oneof"` +} + +type SigningInput_WithdrawTransaction struct { + WithdrawTransaction *WithdrawStake `protobuf:"bytes,8,opt,name=withdraw_transaction,json=withdrawTransaction,proto3,oneof"` +} + +type SigningInput_WithdrawAllTransaction struct { + WithdrawAllTransaction *WithdrawAllStake `protobuf:"bytes,9,opt,name=withdraw_all_transaction,json=withdrawAllTransaction,proto3,oneof"` +} + +type SigningInput_CreateTokenAccountTransaction struct { + CreateTokenAccountTransaction *CreateTokenAccount `protobuf:"bytes,10,opt,name=create_token_account_transaction,json=createTokenAccountTransaction,proto3,oneof"` +} + +type SigningInput_TokenTransferTransaction struct { + TokenTransferTransaction *TokenTransfer `protobuf:"bytes,11,opt,name=token_transfer_transaction,json=tokenTransferTransaction,proto3,oneof"` +} + +type SigningInput_CreateAndTransferTokenTransaction struct { + CreateAndTransferTokenTransaction *CreateAndTransferToken `protobuf:"bytes,12,opt,name=create_and_transfer_token_transaction,json=createAndTransferTokenTransaction,proto3,oneof"` +} + +type SigningInput_CreateNonceAccount struct { + CreateNonceAccount *CreateNonceAccount `protobuf:"bytes,13,opt,name=create_nonce_account,json=createNonceAccount,proto3,oneof"` +} + +type SigningInput_WithdrawNonceAccount struct { + WithdrawNonceAccount *WithdrawNonceAccount `protobuf:"bytes,16,opt,name=withdraw_nonce_account,json=withdrawNonceAccount,proto3,oneof"` +} + +type SigningInput_AdvanceNonceAccount struct { + AdvanceNonceAccount *AdvanceNonceAccount `protobuf:"bytes,19,opt,name=advance_nonce_account,json=advanceNonceAccount,proto3,oneof"` +} + +func (*SigningInput_TransferTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_DelegateStakeTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_DeactivateStakeTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_DeactivateAllStakeTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_WithdrawTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_WithdrawAllTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_CreateTokenAccountTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_TokenTransferTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_CreateAndTransferTokenTransaction) isSigningInput_TransactionType() {} + +func (*SigningInput_CreateNonceAccount) isSigningInput_TransactionType() {} + +func (*SigningInput_WithdrawNonceAccount) isSigningInput_TransactionType() {} + +func (*SigningInput_AdvanceNonceAccount) isSigningInput_TransactionType() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The encoded transaction + Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + // The encoded message. Can be used to estimate a transaction fee required to execute the message. + UnsignedTx string `protobuf:"bytes,4,opt,name=unsigned_tx,json=unsignedTx,proto3" json:"unsigned_tx,omitempty"` + // Transaction signatures (may include external signatures). + Signatures []*PubkeySignature `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Solana_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{19} +} + +func (x *SigningOutput) GetEncoded() string { + if x != nil { + return x.Encoded + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +func (x *SigningOutput) GetUnsignedTx() string { + if x != nil { + return x.UnsignedTx + } + return "" +} + +func (x *SigningOutput) GetSignatures() []*PubkeySignature { + if x != nil { + return x.Signatures + } + return nil +} + +// / Transaction pre-signing output +type PreSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signer list + Signers [][]byte `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` + // Pre-image data. There is no hashing for Solana presign image + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreSigningOutput) Reset() { + *x = PreSigningOutput{} + mi := &file_Solana_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreSigningOutput) ProtoMessage() {} + +func (x *PreSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreSigningOutput.ProtoReflect.Descriptor instead. +func (*PreSigningOutput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{20} +} + +func (x *PreSigningOutput) GetSigners() [][]byte { + if x != nil { + return x.Signers + } + return nil +} + +func (x *PreSigningOutput) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *PreSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *PreSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +type MessageSigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // A UTF-8 regular message to sign. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageSigningInput) Reset() { + *x = MessageSigningInput{} + mi := &file_Solana_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageSigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageSigningInput) ProtoMessage() {} + +func (x *MessageSigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageSigningInput.ProtoReflect.Descriptor instead. +func (*MessageSigningInput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{21} +} + +func (x *MessageSigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *MessageSigningInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type MessageSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The signature, Base58-encoded. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageSigningOutput) Reset() { + *x = MessageSigningOutput{} + mi := &file_Solana_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageSigningOutput) ProtoMessage() {} + +func (x *MessageSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageSigningOutput.ProtoReflect.Descriptor instead. +func (*MessageSigningOutput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{22} +} + +func (x *MessageSigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *MessageSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *MessageSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +type MessageVerifyingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The message signed. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Public key that will verify and recover the message from the signature. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The signature, Base58-encoded. + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageVerifyingInput) Reset() { + *x = MessageVerifyingInput{} + mi := &file_Solana_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageVerifyingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageVerifyingInput) ProtoMessage() {} + +func (x *MessageVerifyingInput) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageVerifyingInput.ProtoReflect.Descriptor instead. +func (*MessageVerifyingInput) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{23} +} + +func (x *MessageVerifyingInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MessageVerifyingInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *MessageVerifyingInput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +type RawMessage_MessageHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + NumRequiredSignatures uint32 `protobuf:"varint,1,opt,name=num_required_signatures,json=numRequiredSignatures,proto3" json:"num_required_signatures,omitempty"` + NumReadonlySignedAccounts uint32 `protobuf:"varint,2,opt,name=num_readonly_signed_accounts,json=numReadonlySignedAccounts,proto3" json:"num_readonly_signed_accounts,omitempty"` + NumReadonlyUnsignedAccounts uint32 `protobuf:"varint,3,opt,name=num_readonly_unsigned_accounts,json=numReadonlyUnsignedAccounts,proto3" json:"num_readonly_unsigned_accounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawMessage_MessageHeader) Reset() { + *x = RawMessage_MessageHeader{} + mi := &file_Solana_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawMessage_MessageHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawMessage_MessageHeader) ProtoMessage() {} + +func (x *RawMessage_MessageHeader) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawMessage_MessageHeader.ProtoReflect.Descriptor instead. +func (*RawMessage_MessageHeader) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *RawMessage_MessageHeader) GetNumRequiredSignatures() uint32 { + if x != nil { + return x.NumRequiredSignatures + } + return 0 +} + +func (x *RawMessage_MessageHeader) GetNumReadonlySignedAccounts() uint32 { + if x != nil { + return x.NumReadonlySignedAccounts + } + return 0 +} + +func (x *RawMessage_MessageHeader) GetNumReadonlyUnsignedAccounts() uint32 { + if x != nil { + return x.NumReadonlyUnsignedAccounts + } + return 0 +} + +type RawMessage_Instruction struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProgramId uint32 `protobuf:"varint,1,opt,name=program_id,json=programId,proto3" json:"program_id,omitempty"` + Accounts []uint32 `protobuf:"varint,2,rep,packed,name=accounts,proto3" json:"accounts,omitempty"` + ProgramData []byte `protobuf:"bytes,3,opt,name=program_data,json=programData,proto3" json:"program_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawMessage_Instruction) Reset() { + *x = RawMessage_Instruction{} + mi := &file_Solana_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawMessage_Instruction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawMessage_Instruction) ProtoMessage() {} + +func (x *RawMessage_Instruction) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawMessage_Instruction.ProtoReflect.Descriptor instead. +func (*RawMessage_Instruction) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{14, 1} +} + +func (x *RawMessage_Instruction) GetProgramId() uint32 { + if x != nil { + return x.ProgramId + } + return 0 +} + +func (x *RawMessage_Instruction) GetAccounts() []uint32 { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *RawMessage_Instruction) GetProgramData() []byte { + if x != nil { + return x.ProgramData + } + return nil +} + +type RawMessage_MessageAddressTableLookup struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountKey string `protobuf:"bytes,1,opt,name=account_key,json=accountKey,proto3" json:"account_key,omitempty"` + WritableIndexes []uint32 `protobuf:"varint,2,rep,packed,name=writable_indexes,json=writableIndexes,proto3" json:"writable_indexes,omitempty"` + ReadonlyIndexes []uint32 `protobuf:"varint,3,rep,packed,name=readonly_indexes,json=readonlyIndexes,proto3" json:"readonly_indexes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawMessage_MessageAddressTableLookup) Reset() { + *x = RawMessage_MessageAddressTableLookup{} + mi := &file_Solana_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawMessage_MessageAddressTableLookup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawMessage_MessageAddressTableLookup) ProtoMessage() {} + +func (x *RawMessage_MessageAddressTableLookup) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawMessage_MessageAddressTableLookup.ProtoReflect.Descriptor instead. +func (*RawMessage_MessageAddressTableLookup) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{14, 2} +} + +func (x *RawMessage_MessageAddressTableLookup) GetAccountKey() string { + if x != nil { + return x.AccountKey + } + return "" +} + +func (x *RawMessage_MessageAddressTableLookup) GetWritableIndexes() []uint32 { + if x != nil { + return x.WritableIndexes + } + return nil +} + +func (x *RawMessage_MessageAddressTableLookup) GetReadonlyIndexes() []uint32 { + if x != nil { + return x.ReadonlyIndexes + } + return nil +} + +type RawMessage_MessageLegacy struct { + state protoimpl.MessageState `protogen:"open.v1"` + Header *RawMessage_MessageHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + AccountKeys []string `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` + // Relatively recent block hash (base58 encoded). + RecentBlockhash string `protobuf:"bytes,3,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` + Instructions []*RawMessage_Instruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawMessage_MessageLegacy) Reset() { + *x = RawMessage_MessageLegacy{} + mi := &file_Solana_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawMessage_MessageLegacy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawMessage_MessageLegacy) ProtoMessage() {} + +func (x *RawMessage_MessageLegacy) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawMessage_MessageLegacy.ProtoReflect.Descriptor instead. +func (*RawMessage_MessageLegacy) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{14, 3} +} + +func (x *RawMessage_MessageLegacy) GetHeader() *RawMessage_MessageHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *RawMessage_MessageLegacy) GetAccountKeys() []string { + if x != nil { + return x.AccountKeys + } + return nil +} + +func (x *RawMessage_MessageLegacy) GetRecentBlockhash() string { + if x != nil { + return x.RecentBlockhash + } + return "" +} + +func (x *RawMessage_MessageLegacy) GetInstructions() []*RawMessage_Instruction { + if x != nil { + return x.Instructions + } + return nil +} + +type RawMessage_MessageV0 struct { + state protoimpl.MessageState `protogen:"open.v1"` + Header *RawMessage_MessageHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + AccountKeys []string `protobuf:"bytes,2,rep,name=account_keys,json=accountKeys,proto3" json:"account_keys,omitempty"` + // Relatively recent block hash (base58 encoded). + RecentBlockhash string `protobuf:"bytes,3,opt,name=recent_blockhash,json=recentBlockhash,proto3" json:"recent_blockhash,omitempty"` + Instructions []*RawMessage_Instruction `protobuf:"bytes,4,rep,name=instructions,proto3" json:"instructions,omitempty"` + AddressTableLookups []*RawMessage_MessageAddressTableLookup `protobuf:"bytes,5,rep,name=address_table_lookups,json=addressTableLookups,proto3" json:"address_table_lookups,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawMessage_MessageV0) Reset() { + *x = RawMessage_MessageV0{} + mi := &file_Solana_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawMessage_MessageV0) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawMessage_MessageV0) ProtoMessage() {} + +func (x *RawMessage_MessageV0) ProtoReflect() protoreflect.Message { + mi := &file_Solana_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawMessage_MessageV0.ProtoReflect.Descriptor instead. +func (*RawMessage_MessageV0) Descriptor() ([]byte, []int) { + return file_Solana_proto_rawDescGZIP(), []int{14, 4} +} + +func (x *RawMessage_MessageV0) GetHeader() *RawMessage_MessageHeader { + if x != nil { + return x.Header + } + return nil +} + +func (x *RawMessage_MessageV0) GetAccountKeys() []string { + if x != nil { + return x.AccountKeys + } + return nil +} + +func (x *RawMessage_MessageV0) GetRecentBlockhash() string { + if x != nil { + return x.RecentBlockhash + } + return "" +} + +func (x *RawMessage_MessageV0) GetInstructions() []*RawMessage_Instruction { + if x != nil { + return x.Instructions + } + return nil +} + +func (x *RawMessage_MessageV0) GetAddressTableLookups() []*RawMessage_MessageAddressTableLookup { + if x != nil { + return x.AddressTableLookups + } + return nil +} + +var File_Solana_proto protoreflect.FileDescriptor + +const file_Solana_proto_rawDesc = "" + + "\n" + + "\fSolana.proto\x12\x0fTW.Solana.Proto\x1a\fCommon.proto\"r\n" + + "\bTransfer\x12\x1c\n" + + "\trecipient\x18\x01 \x01(\tR\trecipient\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value\x12\x12\n" + + "\x04memo\x18\x03 \x01(\tR\x04memo\x12\x1e\n" + + "\n" + + "references\x18\x04 \x03(\tR\n" + + "references\"u\n" + + "\rDelegateStake\x12)\n" + + "\x10validator_pubkey\x18\x01 \x01(\tR\x0fvalidatorPubkey\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value\x12#\n" + + "\rstake_account\x18\x03 \x01(\tR\fstakeAccount\"6\n" + + "\x0fDeactivateStake\x12#\n" + + "\rstake_account\x18\x01 \x01(\tR\fstakeAccount\";\n" + + "\x12DeactivateAllStake\x12%\n" + + "\x0estake_accounts\x18\x01 \x03(\tR\rstakeAccounts\"J\n" + + "\rWithdrawStake\x12#\n" + + "\rstake_account\x18\x01 \x01(\tR\fstakeAccount\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value\"N\n" + + "\x11StakeAccountValue\x12#\n" + + "\rstake_account\x18\x01 \x01(\tR\fstakeAccount\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value\"]\n" + + "\x10WithdrawAllStake\x12I\n" + + "\x0estake_accounts\x18\x01 \x03(\v2\".TW.Solana.Proto.StakeAccountValueR\rstakeAccounts\"\xd5\x01\n" + + "\x12CreateTokenAccount\x12!\n" + + "\fmain_address\x18\x01 \x01(\tR\vmainAddress\x12,\n" + + "\x12token_mint_address\x18\x02 \x01(\tR\x10tokenMintAddress\x12#\n" + + "\rtoken_address\x18\x03 \x01(\tR\ftokenAddress\x12I\n" + + "\x10token_program_id\x18\x04 \x01(\x0e2\x1f.TW.Solana.Proto.TokenProgramIdR\x0etokenProgramId\"\xda\x02\n" + + "\rTokenTransfer\x12,\n" + + "\x12token_mint_address\x18\x01 \x01(\tR\x10tokenMintAddress\x120\n" + + "\x14sender_token_address\x18\x02 \x01(\tR\x12senderTokenAddress\x126\n" + + "\x17recipient_token_address\x18\x03 \x01(\tR\x15recipientTokenAddress\x12\x16\n" + + "\x06amount\x18\x04 \x01(\x04R\x06amount\x12\x1a\n" + + "\bdecimals\x18\x05 \x01(\rR\bdecimals\x12\x12\n" + + "\x04memo\x18\x06 \x01(\tR\x04memo\x12\x1e\n" + + "\n" + + "references\x18\a \x03(\tR\n" + + "references\x12I\n" + + "\x10token_program_id\x18\b \x01(\x0e2\x1f.TW.Solana.Proto.TokenProgramIdR\x0etokenProgramId\"\x99\x03\n" + + "\x16CreateAndTransferToken\x124\n" + + "\x16recipient_main_address\x18\x01 \x01(\tR\x14recipientMainAddress\x12,\n" + + "\x12token_mint_address\x18\x02 \x01(\tR\x10tokenMintAddress\x126\n" + + "\x17recipient_token_address\x18\x03 \x01(\tR\x15recipientTokenAddress\x120\n" + + "\x14sender_token_address\x18\x04 \x01(\tR\x12senderTokenAddress\x12\x16\n" + + "\x06amount\x18\x05 \x01(\x04R\x06amount\x12\x1a\n" + + "\bdecimals\x18\x06 \x01(\rR\bdecimals\x12\x12\n" + + "\x04memo\x18\a \x01(\tR\x04memo\x12\x1e\n" + + "\n" + + "references\x18\b \x03(\tR\n" + + "references\x12I\n" + + "\x10token_program_id\x18\t \x01(\x0e2\x1f.TW.Solana.Proto.TokenProgramIdR\x0etokenProgramId\"\x88\x01\n" + + "\x12CreateNonceAccount\x12#\n" + + "\rnonce_account\x18\x01 \x01(\tR\fnonceAccount\x12\x12\n" + + "\x04rent\x18\x02 \x01(\x04R\x04rent\x129\n" + + "\x19nonce_account_private_key\x18\x03 \x01(\fR\x16nonceAccountPrivateKey\"o\n" + + "\x14WithdrawNonceAccount\x12#\n" + + "\rnonce_account\x18\x01 \x01(\tR\fnonceAccount\x12\x1c\n" + + "\trecipient\x18\x02 \x01(\tR\trecipient\x12\x14\n" + + "\x05value\x18\x03 \x01(\x04R\x05value\":\n" + + "\x13AdvanceNonceAccount\x12#\n" + + "\rnonce_account\x18\x01 \x01(\tR\fnonceAccount\"G\n" + + "\x0fPubkeySignature\x12\x16\n" + + "\x06pubkey\x18\x01 \x01(\tR\x06pubkey\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\tR\tsignature\"\xfc\t\n" + + "\n" + + "RawMessage\x12@\n" + + "\n" + + "signatures\x18\x01 \x03(\v2 .TW.Solana.Proto.PubkeySignatureR\n" + + "signatures\x12C\n" + + "\x06legacy\x18\x02 \x01(\v2).TW.Solana.Proto.RawMessage.MessageLegacyH\x00R\x06legacy\x127\n" + + "\x02v0\x18\x03 \x01(\v2%.TW.Solana.Proto.RawMessage.MessageV0H\x00R\x02v0\x1a\xcd\x01\n" + + "\rMessageHeader\x126\n" + + "\x17num_required_signatures\x18\x01 \x01(\rR\x15numRequiredSignatures\x12?\n" + + "\x1cnum_readonly_signed_accounts\x18\x02 \x01(\rR\x19numReadonlySignedAccounts\x12C\n" + + "\x1enum_readonly_unsigned_accounts\x18\x03 \x01(\rR\x1bnumReadonlyUnsignedAccounts\x1ao\n" + + "\vInstruction\x12\x1d\n" + + "\n" + + "program_id\x18\x01 \x01(\rR\tprogramId\x12\x1e\n" + + "\baccounts\x18\x02 \x03(\rB\x02\x10\x01R\baccounts\x12!\n" + + "\fprogram_data\x18\x03 \x01(\fR\vprogramData\x1a\x9a\x01\n" + + "\x19MessageAddressTableLookup\x12\x1f\n" + + "\vaccount_key\x18\x01 \x01(\tR\n" + + "accountKey\x12-\n" + + "\x10writable_indexes\x18\x02 \x03(\rB\x02\x10\x01R\x0fwritableIndexes\x12-\n" + + "\x10readonly_indexes\x18\x03 \x03(\rB\x02\x10\x01R\x0freadonlyIndexes\x1a\xed\x01\n" + + "\rMessageLegacy\x12A\n" + + "\x06header\x18\x01 \x01(\v2).TW.Solana.Proto.RawMessage.MessageHeaderR\x06header\x12!\n" + + "\faccount_keys\x18\x02 \x03(\tR\vaccountKeys\x12)\n" + + "\x10recent_blockhash\x18\x03 \x01(\tR\x0frecentBlockhash\x12K\n" + + "\finstructions\x18\x04 \x03(\v2'.TW.Solana.Proto.RawMessage.InstructionR\finstructions\x1a\xd4\x02\n" + + "\tMessageV0\x12A\n" + + "\x06header\x18\x01 \x01(\v2).TW.Solana.Proto.RawMessage.MessageHeaderR\x06header\x12!\n" + + "\faccount_keys\x18\x02 \x03(\tR\vaccountKeys\x12)\n" + + "\x10recent_blockhash\x18\x03 \x01(\tR\x0frecentBlockhash\x12K\n" + + "\finstructions\x18\x04 \x03(\v2'.TW.Solana.Proto.RawMessage.InstructionR\finstructions\x12i\n" + + "\x15address_table_lookups\x18\x05 \x03(\v25.TW.Solana.Proto.RawMessage.MessageAddressTableLookupR\x13addressTableLookupsB\t\n" + + "\amessage\"\xb4\x01\n" + + "\x19DecodingTransactionOutput\x12=\n" + + "\vtransaction\x18\x01 \x01(\v2\x1b.TW.Solana.Proto.RawMessageR\vtransaction\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"(\n" + + "\x10PriorityFeePrice\x12\x14\n" + + "\x05price\x18\x01 \x01(\x04R\x05price\"(\n" + + "\x10PriorityFeeLimit\x12\x14\n" + + "\x05limit\x18\x02 \x01(\rR\x05limit\"\xc9\r\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12)\n" + + "\x10recent_blockhash\x18\x02 \x01(\tR\x0frecentBlockhash\x12\x15\n" + + "\x06v0_msg\x18\x03 \x01(\bR\x05v0Msg\x12N\n" + + "\x14transfer_transaction\x18\x04 \x01(\v2\x19.TW.Solana.Proto.TransferH\x00R\x13transferTransaction\x12^\n" + + "\x1adelegate_stake_transaction\x18\x05 \x01(\v2\x1e.TW.Solana.Proto.DelegateStakeH\x00R\x18delegateStakeTransaction\x12d\n" + + "\x1cdeactivate_stake_transaction\x18\x06 \x01(\v2 .TW.Solana.Proto.DeactivateStakeH\x00R\x1adeactivateStakeTransaction\x12n\n" + + " deactivate_all_stake_transaction\x18\a \x01(\v2#.TW.Solana.Proto.DeactivateAllStakeH\x00R\x1ddeactivateAllStakeTransaction\x12S\n" + + "\x14withdraw_transaction\x18\b \x01(\v2\x1e.TW.Solana.Proto.WithdrawStakeH\x00R\x13withdrawTransaction\x12]\n" + + "\x18withdraw_all_transaction\x18\t \x01(\v2!.TW.Solana.Proto.WithdrawAllStakeH\x00R\x16withdrawAllTransaction\x12n\n" + + " create_token_account_transaction\x18\n" + + " \x01(\v2#.TW.Solana.Proto.CreateTokenAccountH\x00R\x1dcreateTokenAccountTransaction\x12^\n" + + "\x1atoken_transfer_transaction\x18\v \x01(\v2\x1e.TW.Solana.Proto.TokenTransferH\x00R\x18tokenTransferTransaction\x12{\n" + + "%create_and_transfer_token_transaction\x18\f \x01(\v2'.TW.Solana.Proto.CreateAndTransferTokenH\x00R!createAndTransferTokenTransaction\x12W\n" + + "\x14create_nonce_account\x18\r \x01(\v2#.TW.Solana.Proto.CreateNonceAccountH\x00R\x12createNonceAccount\x12]\n" + + "\x16withdraw_nonce_account\x18\x10 \x01(\v2%.TW.Solana.Proto.WithdrawNonceAccountH\x00R\x14withdrawNonceAccount\x12Z\n" + + "\x15advance_nonce_account\x18\x13 \x01(\v2$.TW.Solana.Proto.AdvanceNonceAccountH\x00R\x13advanceNonceAccount\x12\x16\n" + + "\x06sender\x18\x0e \x01(\tR\x06sender\x12#\n" + + "\rnonce_account\x18\x0f \x01(\tR\fnonceAccount\x121\n" + + "\x15fee_payer_private_key\x18\x11 \x01(\fR\x12feePayerPrivateKey\x12\x1b\n" + + "\tfee_payer\x18\x12 \x01(\tR\bfeePayer\x12<\n" + + "\vraw_message\x18\x14 \x01(\v2\x1b.TW.Solana.Proto.RawMessageR\n" + + "rawMessage\x12:\n" + + "\vtx_encoding\x18\x15 \x01(\x0e2\x19.TW.Solana.Proto.EncodingR\n" + + "txEncoding\x12O\n" + + "\x12priority_fee_price\x18\x16 \x01(\v2!.TW.Solana.Proto.PriorityFeePriceR\x10priorityFeePrice\x12O\n" + + "\x12priority_fee_limit\x18\x17 \x01(\v2!.TW.Solana.Proto.PriorityFeeLimitR\x10priorityFeeLimitB\x12\n" + + "\x10transaction_type\"\xe6\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\tR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\x12\x1f\n" + + "\vunsigned_tx\x18\x04 \x01(\tR\n" + + "unsignedTx\x12@\n" + + "\n" + + "signatures\x18\x05 \x03(\v2 .TW.Solana.Proto.PubkeySignatureR\n" + + "signatures\"\x9a\x01\n" + + "\x10PreSigningOutput\x12\x18\n" + + "\asigners\x18\x01 \x03(\fR\asigners\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"P\n" + + "\x13MessageSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x8e\x01\n" + + "\x14MessageSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"n\n" + + "\x15MessageVerifyingInput\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\x1c\n" + + "\tsignature\x18\x03 \x01(\tR\tsignature*8\n" + + "\x0eTokenProgramId\x12\x10\n" + + "\fTokenProgram\x10\x00\x12\x14\n" + + "\x10Token2022Program\x10\x01*\"\n" + + "\bEncoding\x12\n" + + "\n" + + "\x06Base58\x10\x00\x12\n" + + "\n" + + "\x06Base64\x10\x01B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Solana_proto_rawDescOnce sync.Once + file_Solana_proto_rawDescData []byte +) + +func file_Solana_proto_rawDescGZIP() []byte { + file_Solana_proto_rawDescOnce.Do(func() { + file_Solana_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Solana_proto_rawDesc), len(file_Solana_proto_rawDesc))) + }) + return file_Solana_proto_rawDescData +} + +var file_Solana_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_Solana_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_Solana_proto_goTypes = []any{ + (TokenProgramId)(0), // 0: TW.Solana.Proto.TokenProgramId + (Encoding)(0), // 1: TW.Solana.Proto.Encoding + (*Transfer)(nil), // 2: TW.Solana.Proto.Transfer + (*DelegateStake)(nil), // 3: TW.Solana.Proto.DelegateStake + (*DeactivateStake)(nil), // 4: TW.Solana.Proto.DeactivateStake + (*DeactivateAllStake)(nil), // 5: TW.Solana.Proto.DeactivateAllStake + (*WithdrawStake)(nil), // 6: TW.Solana.Proto.WithdrawStake + (*StakeAccountValue)(nil), // 7: TW.Solana.Proto.StakeAccountValue + (*WithdrawAllStake)(nil), // 8: TW.Solana.Proto.WithdrawAllStake + (*CreateTokenAccount)(nil), // 9: TW.Solana.Proto.CreateTokenAccount + (*TokenTransfer)(nil), // 10: TW.Solana.Proto.TokenTransfer + (*CreateAndTransferToken)(nil), // 11: TW.Solana.Proto.CreateAndTransferToken + (*CreateNonceAccount)(nil), // 12: TW.Solana.Proto.CreateNonceAccount + (*WithdrawNonceAccount)(nil), // 13: TW.Solana.Proto.WithdrawNonceAccount + (*AdvanceNonceAccount)(nil), // 14: TW.Solana.Proto.AdvanceNonceAccount + (*PubkeySignature)(nil), // 15: TW.Solana.Proto.PubkeySignature + (*RawMessage)(nil), // 16: TW.Solana.Proto.RawMessage + (*DecodingTransactionOutput)(nil), // 17: TW.Solana.Proto.DecodingTransactionOutput + (*PriorityFeePrice)(nil), // 18: TW.Solana.Proto.PriorityFeePrice + (*PriorityFeeLimit)(nil), // 19: TW.Solana.Proto.PriorityFeeLimit + (*SigningInput)(nil), // 20: TW.Solana.Proto.SigningInput + (*SigningOutput)(nil), // 21: TW.Solana.Proto.SigningOutput + (*PreSigningOutput)(nil), // 22: TW.Solana.Proto.PreSigningOutput + (*MessageSigningInput)(nil), // 23: TW.Solana.Proto.MessageSigningInput + (*MessageSigningOutput)(nil), // 24: TW.Solana.Proto.MessageSigningOutput + (*MessageVerifyingInput)(nil), // 25: TW.Solana.Proto.MessageVerifyingInput + (*RawMessage_MessageHeader)(nil), // 26: TW.Solana.Proto.RawMessage.MessageHeader + (*RawMessage_Instruction)(nil), // 27: TW.Solana.Proto.RawMessage.Instruction + (*RawMessage_MessageAddressTableLookup)(nil), // 28: TW.Solana.Proto.RawMessage.MessageAddressTableLookup + (*RawMessage_MessageLegacy)(nil), // 29: TW.Solana.Proto.RawMessage.MessageLegacy + (*RawMessage_MessageV0)(nil), // 30: TW.Solana.Proto.RawMessage.MessageV0 + (common.SigningError)(0), // 31: TW.Common.Proto.SigningError +} +var file_Solana_proto_depIdxs = []int32{ + 7, // 0: TW.Solana.Proto.WithdrawAllStake.stake_accounts:type_name -> TW.Solana.Proto.StakeAccountValue + 0, // 1: TW.Solana.Proto.CreateTokenAccount.token_program_id:type_name -> TW.Solana.Proto.TokenProgramId + 0, // 2: TW.Solana.Proto.TokenTransfer.token_program_id:type_name -> TW.Solana.Proto.TokenProgramId + 0, // 3: TW.Solana.Proto.CreateAndTransferToken.token_program_id:type_name -> TW.Solana.Proto.TokenProgramId + 15, // 4: TW.Solana.Proto.RawMessage.signatures:type_name -> TW.Solana.Proto.PubkeySignature + 29, // 5: TW.Solana.Proto.RawMessage.legacy:type_name -> TW.Solana.Proto.RawMessage.MessageLegacy + 30, // 6: TW.Solana.Proto.RawMessage.v0:type_name -> TW.Solana.Proto.RawMessage.MessageV0 + 16, // 7: TW.Solana.Proto.DecodingTransactionOutput.transaction:type_name -> TW.Solana.Proto.RawMessage + 31, // 8: TW.Solana.Proto.DecodingTransactionOutput.error:type_name -> TW.Common.Proto.SigningError + 2, // 9: TW.Solana.Proto.SigningInput.transfer_transaction:type_name -> TW.Solana.Proto.Transfer + 3, // 10: TW.Solana.Proto.SigningInput.delegate_stake_transaction:type_name -> TW.Solana.Proto.DelegateStake + 4, // 11: TW.Solana.Proto.SigningInput.deactivate_stake_transaction:type_name -> TW.Solana.Proto.DeactivateStake + 5, // 12: TW.Solana.Proto.SigningInput.deactivate_all_stake_transaction:type_name -> TW.Solana.Proto.DeactivateAllStake + 6, // 13: TW.Solana.Proto.SigningInput.withdraw_transaction:type_name -> TW.Solana.Proto.WithdrawStake + 8, // 14: TW.Solana.Proto.SigningInput.withdraw_all_transaction:type_name -> TW.Solana.Proto.WithdrawAllStake + 9, // 15: TW.Solana.Proto.SigningInput.create_token_account_transaction:type_name -> TW.Solana.Proto.CreateTokenAccount + 10, // 16: TW.Solana.Proto.SigningInput.token_transfer_transaction:type_name -> TW.Solana.Proto.TokenTransfer + 11, // 17: TW.Solana.Proto.SigningInput.create_and_transfer_token_transaction:type_name -> TW.Solana.Proto.CreateAndTransferToken + 12, // 18: TW.Solana.Proto.SigningInput.create_nonce_account:type_name -> TW.Solana.Proto.CreateNonceAccount + 13, // 19: TW.Solana.Proto.SigningInput.withdraw_nonce_account:type_name -> TW.Solana.Proto.WithdrawNonceAccount + 14, // 20: TW.Solana.Proto.SigningInput.advance_nonce_account:type_name -> TW.Solana.Proto.AdvanceNonceAccount + 16, // 21: TW.Solana.Proto.SigningInput.raw_message:type_name -> TW.Solana.Proto.RawMessage + 1, // 22: TW.Solana.Proto.SigningInput.tx_encoding:type_name -> TW.Solana.Proto.Encoding + 18, // 23: TW.Solana.Proto.SigningInput.priority_fee_price:type_name -> TW.Solana.Proto.PriorityFeePrice + 19, // 24: TW.Solana.Proto.SigningInput.priority_fee_limit:type_name -> TW.Solana.Proto.PriorityFeeLimit + 31, // 25: TW.Solana.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 15, // 26: TW.Solana.Proto.SigningOutput.signatures:type_name -> TW.Solana.Proto.PubkeySignature + 31, // 27: TW.Solana.Proto.PreSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 31, // 28: TW.Solana.Proto.MessageSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 26, // 29: TW.Solana.Proto.RawMessage.MessageLegacy.header:type_name -> TW.Solana.Proto.RawMessage.MessageHeader + 27, // 30: TW.Solana.Proto.RawMessage.MessageLegacy.instructions:type_name -> TW.Solana.Proto.RawMessage.Instruction + 26, // 31: TW.Solana.Proto.RawMessage.MessageV0.header:type_name -> TW.Solana.Proto.RawMessage.MessageHeader + 27, // 32: TW.Solana.Proto.RawMessage.MessageV0.instructions:type_name -> TW.Solana.Proto.RawMessage.Instruction + 28, // 33: TW.Solana.Proto.RawMessage.MessageV0.address_table_lookups:type_name -> TW.Solana.Proto.RawMessage.MessageAddressTableLookup + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_Solana_proto_init() } +func file_Solana_proto_init() { + if File_Solana_proto != nil { + return + } + file_Solana_proto_msgTypes[14].OneofWrappers = []any{ + (*RawMessage_Legacy)(nil), + (*RawMessage_V0)(nil), + } + file_Solana_proto_msgTypes[18].OneofWrappers = []any{ + (*SigningInput_TransferTransaction)(nil), + (*SigningInput_DelegateStakeTransaction)(nil), + (*SigningInput_DeactivateStakeTransaction)(nil), + (*SigningInput_DeactivateAllStakeTransaction)(nil), + (*SigningInput_WithdrawTransaction)(nil), + (*SigningInput_WithdrawAllTransaction)(nil), + (*SigningInput_CreateTokenAccountTransaction)(nil), + (*SigningInput_TokenTransferTransaction)(nil), + (*SigningInput_CreateAndTransferTokenTransaction)(nil), + (*SigningInput_CreateNonceAccount)(nil), + (*SigningInput_WithdrawNonceAccount)(nil), + (*SigningInput_AdvanceNonceAccount)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Solana_proto_rawDesc), len(file_Solana_proto_rawDesc)), + NumEnums: 2, + NumMessages: 29, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Solana_proto_goTypes, + DependencyIndexes: file_Solana_proto_depIdxs, + EnumInfos: file_Solana_proto_enumTypes, + MessageInfos: file_Solana_proto_msgTypes, + }.Build() + File_Solana_proto = out.File + file_Solana_proto_goTypes = nil + file_Solana_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/stellar/Stellar.pb.go b/wrapper/go-wrapper/protos/stellar/Stellar.pb.go new file mode 100644 index 00000000000..cfd014505a5 --- /dev/null +++ b/wrapper/go-wrapper/protos/stellar/Stellar.pb.go @@ -0,0 +1,1143 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Stellar.proto + +package stellar + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A predicate (used in claim) +// Rest of predicates not currently supported +// See https://github.com/stellar/stellar-protocol/blob/master/core/cap-0023.md +type ClaimPredicate int32 + +const ( + ClaimPredicate_Predicate_unconditional ClaimPredicate = 0 +) + +// Enum value maps for ClaimPredicate. +var ( + ClaimPredicate_name = map[int32]string{ + 0: "Predicate_unconditional", + } + ClaimPredicate_value = map[string]int32{ + "Predicate_unconditional": 0, + } +) + +func (x ClaimPredicate) Enum() *ClaimPredicate { + p := new(ClaimPredicate) + *p = x + return p +} + +func (x ClaimPredicate) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClaimPredicate) Descriptor() protoreflect.EnumDescriptor { + return file_Stellar_proto_enumTypes[0].Descriptor() +} + +func (ClaimPredicate) Type() protoreflect.EnumType { + return &file_Stellar_proto_enumTypes[0] +} + +func (x ClaimPredicate) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClaimPredicate.Descriptor instead. +func (ClaimPredicate) EnumDescriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{0} +} + +// Represents an asset +// Note: alphanum12 currently not supported +type Asset struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Optional in case of non-native asset; the asset issuer address + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + // Optional in case of non-native asset; the asset alphanum4 code. + Alphanum4 string `protobuf:"bytes,2,opt,name=alphanum4,proto3" json:"alphanum4,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Asset) Reset() { + *x = Asset{} + mi := &file_Stellar_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Asset) ProtoMessage() {} + +func (x *Asset) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Asset.ProtoReflect.Descriptor instead. +func (*Asset) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{0} +} + +func (x *Asset) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *Asset) GetAlphanum4() string { + if x != nil { + return x.Alphanum4 + } + return "" +} + +// Create a new account +type OperationCreateAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // address + Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + // Amount (*10^7) + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationCreateAccount) Reset() { + *x = OperationCreateAccount{} + mi := &file_Stellar_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationCreateAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationCreateAccount) ProtoMessage() {} + +func (x *OperationCreateAccount) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationCreateAccount.ProtoReflect.Descriptor instead. +func (*OperationCreateAccount) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{1} +} + +func (x *OperationCreateAccount) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *OperationCreateAccount) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Perform payment +type OperationPayment struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Destination address + Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + // Optional, can be left empty for native asset + Asset *Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + // Amount (*10^7) + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationPayment) Reset() { + *x = OperationPayment{} + mi := &file_Stellar_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationPayment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationPayment) ProtoMessage() {} + +func (x *OperationPayment) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationPayment.ProtoReflect.Descriptor instead. +func (*OperationPayment) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{2} +} + +func (x *OperationPayment) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *OperationPayment) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *OperationPayment) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Change trust +type OperationChangeTrust struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The asset + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + // Validity (time bound to), unix time. Set to (now() + 2 * 365 * 86400) for 2 years; set to 0 for missing. + ValidBefore int64 `protobuf:"varint,2,opt,name=valid_before,json=validBefore,proto3" json:"valid_before,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationChangeTrust) Reset() { + *x = OperationChangeTrust{} + mi := &file_Stellar_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationChangeTrust) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationChangeTrust) ProtoMessage() {} + +func (x *OperationChangeTrust) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationChangeTrust.ProtoReflect.Descriptor instead. +func (*OperationChangeTrust) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{3} +} + +func (x *OperationChangeTrust) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *OperationChangeTrust) GetValidBefore() int64 { + if x != nil { + return x.ValidBefore + } + return 0 +} + +// Claimant: account & predicate +type Claimant struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Claimant account + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // predicate + Predicate ClaimPredicate `protobuf:"varint,2,opt,name=predicate,proto3,enum=TW.Stellar.Proto.ClaimPredicate" json:"predicate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Claimant) Reset() { + *x = Claimant{} + mi := &file_Stellar_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Claimant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Claimant) ProtoMessage() {} + +func (x *Claimant) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Claimant.ProtoReflect.Descriptor instead. +func (*Claimant) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{4} +} + +func (x *Claimant) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *Claimant) GetPredicate() ClaimPredicate { + if x != nil { + return x.Predicate + } + return ClaimPredicate_Predicate_unconditional +} + +// Create a claimable balance (2-phase transfer) +type OperationCreateClaimableBalance struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Optional, can be left empty for native asset + Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` + // Amount (*10^7) + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // One or more claimants + Claimants []*Claimant `protobuf:"bytes,3,rep,name=claimants,proto3" json:"claimants,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationCreateClaimableBalance) Reset() { + *x = OperationCreateClaimableBalance{} + mi := &file_Stellar_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationCreateClaimableBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationCreateClaimableBalance) ProtoMessage() {} + +func (x *OperationCreateClaimableBalance) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationCreateClaimableBalance.ProtoReflect.Descriptor instead. +func (*OperationCreateClaimableBalance) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{5} +} + +func (x *OperationCreateClaimableBalance) GetAsset() *Asset { + if x != nil { + return x.Asset + } + return nil +} + +func (x *OperationCreateClaimableBalance) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *OperationCreateClaimableBalance) GetClaimants() []*Claimant { + if x != nil { + return x.Claimants + } + return nil +} + +// Claim a claimable balance +type OperationClaimClaimableBalance struct { + state protoimpl.MessageState `protogen:"open.v1"` + // 32-byte balance ID hash + BalanceId []byte `protobuf:"bytes,1,opt,name=balance_id,json=balanceId,proto3" json:"balance_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationClaimClaimableBalance) Reset() { + *x = OperationClaimClaimableBalance{} + mi := &file_Stellar_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationClaimClaimableBalance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationClaimClaimableBalance) ProtoMessage() {} + +func (x *OperationClaimClaimableBalance) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationClaimClaimableBalance.ProtoReflect.Descriptor instead. +func (*OperationClaimClaimableBalance) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{6} +} + +func (x *OperationClaimClaimableBalance) GetBalanceId() []byte { + if x != nil { + return x.BalanceId + } + return nil +} + +// Empty memo (placeholder) +type MemoVoid struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoVoid) Reset() { + *x = MemoVoid{} + mi := &file_Stellar_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoVoid) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoVoid) ProtoMessage() {} + +func (x *MemoVoid) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoVoid.ProtoReflect.Descriptor instead. +func (*MemoVoid) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{7} +} + +// Memo with text +type MemoText struct { + state protoimpl.MessageState `protogen:"open.v1"` + Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoText) Reset() { + *x = MemoText{} + mi := &file_Stellar_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoText) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoText) ProtoMessage() {} + +func (x *MemoText) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoText.ProtoReflect.Descriptor instead. +func (*MemoText) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{8} +} + +func (x *MemoText) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +// Memo with an ID +type MemoId struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoId) Reset() { + *x = MemoId{} + mi := &file_Stellar_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoId) ProtoMessage() {} + +func (x *MemoId) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoId.ProtoReflect.Descriptor instead. +func (*MemoId) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{9} +} + +func (x *MemoId) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// Memo with a hash +type MemoHash struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MemoHash) Reset() { + *x = MemoHash{} + mi := &file_Stellar_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MemoHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoHash) ProtoMessage() {} + +func (x *MemoHash) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MemoHash.ProtoReflect.Descriptor instead. +func (*MemoHash) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{10} +} + +func (x *MemoHash) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction fee + Fee int32 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` + // Account sequence + Sequence int64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Source account + Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,4,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Wellknown passphrase, specific to the chain + Passphrase string `protobuf:"bytes,5,opt,name=passphrase,proto3" json:"passphrase,omitempty"` + // Payload message + // + // Types that are valid to be assigned to OperationOneof: + // + // *SigningInput_OpCreateAccount + // *SigningInput_OpPayment + // *SigningInput_OpChangeTrust + // *SigningInput_OpCreateClaimableBalance + // *SigningInput_OpClaimClaimableBalance + OperationOneof isSigningInput_OperationOneof `protobuf_oneof:"operation_oneof"` + // Memo + // + // Types that are valid to be assigned to MemoTypeOneof: + // + // *SigningInput_MemoVoid + // *SigningInput_MemoText + // *SigningInput_MemoId + // *SigningInput_MemoHash + // *SigningInput_MemoReturnHash + MemoTypeOneof isSigningInput_MemoTypeOneof `protobuf_oneof:"memo_type_oneof"` + TimeBounds int64 `protobuf:"varint,16,opt,name=time_bounds,json=timeBounds,proto3" json:"time_bounds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Stellar_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{11} +} + +func (x *SigningInput) GetFee() int32 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *SigningInput) GetSequence() int64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *SigningInput) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetPassphrase() string { + if x != nil { + return x.Passphrase + } + return "" +} + +func (x *SigningInput) GetOperationOneof() isSigningInput_OperationOneof { + if x != nil { + return x.OperationOneof + } + return nil +} + +func (x *SigningInput) GetOpCreateAccount() *OperationCreateAccount { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpCreateAccount); ok { + return x.OpCreateAccount + } + } + return nil +} + +func (x *SigningInput) GetOpPayment() *OperationPayment { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpPayment); ok { + return x.OpPayment + } + } + return nil +} + +func (x *SigningInput) GetOpChangeTrust() *OperationChangeTrust { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpChangeTrust); ok { + return x.OpChangeTrust + } + } + return nil +} + +func (x *SigningInput) GetOpCreateClaimableBalance() *OperationCreateClaimableBalance { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpCreateClaimableBalance); ok { + return x.OpCreateClaimableBalance + } + } + return nil +} + +func (x *SigningInput) GetOpClaimClaimableBalance() *OperationClaimClaimableBalance { + if x != nil { + if x, ok := x.OperationOneof.(*SigningInput_OpClaimClaimableBalance); ok { + return x.OpClaimClaimableBalance + } + } + return nil +} + +func (x *SigningInput) GetMemoTypeOneof() isSigningInput_MemoTypeOneof { + if x != nil { + return x.MemoTypeOneof + } + return nil +} + +func (x *SigningInput) GetMemoVoid() *MemoVoid { + if x != nil { + if x, ok := x.MemoTypeOneof.(*SigningInput_MemoVoid); ok { + return x.MemoVoid + } + } + return nil +} + +func (x *SigningInput) GetMemoText() *MemoText { + if x != nil { + if x, ok := x.MemoTypeOneof.(*SigningInput_MemoText); ok { + return x.MemoText + } + } + return nil +} + +func (x *SigningInput) GetMemoId() *MemoId { + if x != nil { + if x, ok := x.MemoTypeOneof.(*SigningInput_MemoId); ok { + return x.MemoId + } + } + return nil +} + +func (x *SigningInput) GetMemoHash() *MemoHash { + if x != nil { + if x, ok := x.MemoTypeOneof.(*SigningInput_MemoHash); ok { + return x.MemoHash + } + } + return nil +} + +func (x *SigningInput) GetMemoReturnHash() *MemoHash { + if x != nil { + if x, ok := x.MemoTypeOneof.(*SigningInput_MemoReturnHash); ok { + return x.MemoReturnHash + } + } + return nil +} + +func (x *SigningInput) GetTimeBounds() int64 { + if x != nil { + return x.TimeBounds + } + return 0 +} + +type isSigningInput_OperationOneof interface { + isSigningInput_OperationOneof() +} + +type SigningInput_OpCreateAccount struct { + OpCreateAccount *OperationCreateAccount `protobuf:"bytes,6,opt,name=op_create_account,json=opCreateAccount,proto3,oneof"` +} + +type SigningInput_OpPayment struct { + OpPayment *OperationPayment `protobuf:"bytes,7,opt,name=op_payment,json=opPayment,proto3,oneof"` +} + +type SigningInput_OpChangeTrust struct { + OpChangeTrust *OperationChangeTrust `protobuf:"bytes,8,opt,name=op_change_trust,json=opChangeTrust,proto3,oneof"` +} + +type SigningInput_OpCreateClaimableBalance struct { + OpCreateClaimableBalance *OperationCreateClaimableBalance `protobuf:"bytes,14,opt,name=op_create_claimable_balance,json=opCreateClaimableBalance,proto3,oneof"` +} + +type SigningInput_OpClaimClaimableBalance struct { + OpClaimClaimableBalance *OperationClaimClaimableBalance `protobuf:"bytes,15,opt,name=op_claim_claimable_balance,json=opClaimClaimableBalance,proto3,oneof"` +} + +func (*SigningInput_OpCreateAccount) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpPayment) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpChangeTrust) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpCreateClaimableBalance) isSigningInput_OperationOneof() {} + +func (*SigningInput_OpClaimClaimableBalance) isSigningInput_OperationOneof() {} + +type isSigningInput_MemoTypeOneof interface { + isSigningInput_MemoTypeOneof() +} + +type SigningInput_MemoVoid struct { + MemoVoid *MemoVoid `protobuf:"bytes,9,opt,name=memo_void,json=memoVoid,proto3,oneof"` +} + +type SigningInput_MemoText struct { + MemoText *MemoText `protobuf:"bytes,10,opt,name=memo_text,json=memoText,proto3,oneof"` +} + +type SigningInput_MemoId struct { + MemoId *MemoId `protobuf:"bytes,11,opt,name=memo_id,json=memoId,proto3,oneof"` +} + +type SigningInput_MemoHash struct { + MemoHash *MemoHash `protobuf:"bytes,12,opt,name=memo_hash,json=memoHash,proto3,oneof"` +} + +type SigningInput_MemoReturnHash struct { + MemoReturnHash *MemoHash `protobuf:"bytes,13,opt,name=memo_return_hash,json=memoReturnHash,proto3,oneof"` +} + +func (*SigningInput_MemoVoid) isSigningInput_MemoTypeOneof() {} + +func (*SigningInput_MemoText) isSigningInput_MemoTypeOneof() {} + +func (*SigningInput_MemoId) isSigningInput_MemoTypeOneof() {} + +func (*SigningInput_MemoHash) isSigningInput_MemoTypeOneof() {} + +func (*SigningInput_MemoReturnHash) isSigningInput_MemoTypeOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signature. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Stellar_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Stellar_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Stellar_proto_rawDescGZIP(), []int{12} +} + +func (x *SigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Stellar_proto protoreflect.FileDescriptor + +const file_Stellar_proto_rawDesc = "" + + "\n" + + "\rStellar.proto\x12\x10TW.Stellar.Proto\x1a\fCommon.proto\"=\n" + + "\x05Asset\x12\x16\n" + + "\x06issuer\x18\x01 \x01(\tR\x06issuer\x12\x1c\n" + + "\talphanum4\x18\x02 \x01(\tR\talphanum4\"R\n" + + "\x16OperationCreateAccount\x12 \n" + + "\vdestination\x18\x01 \x01(\tR\vdestination\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\"{\n" + + "\x10OperationPayment\x12 \n" + + "\vdestination\x18\x01 \x01(\tR\vdestination\x12-\n" + + "\x05asset\x18\x02 \x01(\v2\x17.TW.Stellar.Proto.AssetR\x05asset\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"h\n" + + "\x14OperationChangeTrust\x12-\n" + + "\x05asset\x18\x01 \x01(\v2\x17.TW.Stellar.Proto.AssetR\x05asset\x12!\n" + + "\fvalid_before\x18\x02 \x01(\x03R\vvalidBefore\"d\n" + + "\bClaimant\x12\x18\n" + + "\aaccount\x18\x01 \x01(\tR\aaccount\x12>\n" + + "\tpredicate\x18\x02 \x01(\x0e2 .TW.Stellar.Proto.ClaimPredicateR\tpredicate\"\xa2\x01\n" + + "\x1fOperationCreateClaimableBalance\x12-\n" + + "\x05asset\x18\x01 \x01(\v2\x17.TW.Stellar.Proto.AssetR\x05asset\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x128\n" + + "\tclaimants\x18\x03 \x03(\v2\x1a.TW.Stellar.Proto.ClaimantR\tclaimants\"?\n" + + "\x1eOperationClaimClaimableBalance\x12\x1d\n" + + "\n" + + "balance_id\x18\x01 \x01(\fR\tbalanceId\"\n" + + "\n" + + "\bMemoVoid\"\x1e\n" + + "\bMemoText\x12\x12\n" + + "\x04text\x18\x01 \x01(\tR\x04text\"\x18\n" + + "\x06MemoId\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"\x1e\n" + + "\bMemoHash\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\"\xe0\a\n" + + "\fSigningInput\x12\x10\n" + + "\x03fee\x18\x01 \x01(\x05R\x03fee\x12\x1a\n" + + "\bsequence\x18\x02 \x01(\x03R\bsequence\x12\x18\n" + + "\aaccount\x18\x03 \x01(\tR\aaccount\x12\x1f\n" + + "\vprivate_key\x18\x04 \x01(\fR\n" + + "privateKey\x12\x1e\n" + + "\n" + + "passphrase\x18\x05 \x01(\tR\n" + + "passphrase\x12V\n" + + "\x11op_create_account\x18\x06 \x01(\v2(.TW.Stellar.Proto.OperationCreateAccountH\x00R\x0fopCreateAccount\x12C\n" + + "\n" + + "op_payment\x18\a \x01(\v2\".TW.Stellar.Proto.OperationPaymentH\x00R\topPayment\x12P\n" + + "\x0fop_change_trust\x18\b \x01(\v2&.TW.Stellar.Proto.OperationChangeTrustH\x00R\ropChangeTrust\x12r\n" + + "\x1bop_create_claimable_balance\x18\x0e \x01(\v21.TW.Stellar.Proto.OperationCreateClaimableBalanceH\x00R\x18opCreateClaimableBalance\x12o\n" + + "\x1aop_claim_claimable_balance\x18\x0f \x01(\v20.TW.Stellar.Proto.OperationClaimClaimableBalanceH\x00R\x17opClaimClaimableBalance\x129\n" + + "\tmemo_void\x18\t \x01(\v2\x1a.TW.Stellar.Proto.MemoVoidH\x01R\bmemoVoid\x129\n" + + "\tmemo_text\x18\n" + + " \x01(\v2\x1a.TW.Stellar.Proto.MemoTextH\x01R\bmemoText\x123\n" + + "\amemo_id\x18\v \x01(\v2\x18.TW.Stellar.Proto.MemoIdH\x01R\x06memoId\x129\n" + + "\tmemo_hash\x18\f \x01(\v2\x1a.TW.Stellar.Proto.MemoHashH\x01R\bmemoHash\x12F\n" + + "\x10memo_return_hash\x18\r \x01(\v2\x1a.TW.Stellar.Proto.MemoHashH\x01R\x0ememoReturnHash\x12\x1f\n" + + "\vtime_bounds\x18\x10 \x01(\x03R\n" + + "timeBoundsB\x11\n" + + "\x0foperation_oneofB\x11\n" + + "\x0fmemo_type_oneof\"\x87\x01\n" + + "\rSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage*-\n" + + "\x0eClaimPredicate\x12\x1b\n" + + "\x17Predicate_unconditional\x10\x00B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Stellar_proto_rawDescOnce sync.Once + file_Stellar_proto_rawDescData []byte +) + +func file_Stellar_proto_rawDescGZIP() []byte { + file_Stellar_proto_rawDescOnce.Do(func() { + file_Stellar_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Stellar_proto_rawDesc), len(file_Stellar_proto_rawDesc))) + }) + return file_Stellar_proto_rawDescData +} + +var file_Stellar_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Stellar_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_Stellar_proto_goTypes = []any{ + (ClaimPredicate)(0), // 0: TW.Stellar.Proto.ClaimPredicate + (*Asset)(nil), // 1: TW.Stellar.Proto.Asset + (*OperationCreateAccount)(nil), // 2: TW.Stellar.Proto.OperationCreateAccount + (*OperationPayment)(nil), // 3: TW.Stellar.Proto.OperationPayment + (*OperationChangeTrust)(nil), // 4: TW.Stellar.Proto.OperationChangeTrust + (*Claimant)(nil), // 5: TW.Stellar.Proto.Claimant + (*OperationCreateClaimableBalance)(nil), // 6: TW.Stellar.Proto.OperationCreateClaimableBalance + (*OperationClaimClaimableBalance)(nil), // 7: TW.Stellar.Proto.OperationClaimClaimableBalance + (*MemoVoid)(nil), // 8: TW.Stellar.Proto.MemoVoid + (*MemoText)(nil), // 9: TW.Stellar.Proto.MemoText + (*MemoId)(nil), // 10: TW.Stellar.Proto.MemoId + (*MemoHash)(nil), // 11: TW.Stellar.Proto.MemoHash + (*SigningInput)(nil), // 12: TW.Stellar.Proto.SigningInput + (*SigningOutput)(nil), // 13: TW.Stellar.Proto.SigningOutput + (common.SigningError)(0), // 14: TW.Common.Proto.SigningError +} +var file_Stellar_proto_depIdxs = []int32{ + 1, // 0: TW.Stellar.Proto.OperationPayment.asset:type_name -> TW.Stellar.Proto.Asset + 1, // 1: TW.Stellar.Proto.OperationChangeTrust.asset:type_name -> TW.Stellar.Proto.Asset + 0, // 2: TW.Stellar.Proto.Claimant.predicate:type_name -> TW.Stellar.Proto.ClaimPredicate + 1, // 3: TW.Stellar.Proto.OperationCreateClaimableBalance.asset:type_name -> TW.Stellar.Proto.Asset + 5, // 4: TW.Stellar.Proto.OperationCreateClaimableBalance.claimants:type_name -> TW.Stellar.Proto.Claimant + 2, // 5: TW.Stellar.Proto.SigningInput.op_create_account:type_name -> TW.Stellar.Proto.OperationCreateAccount + 3, // 6: TW.Stellar.Proto.SigningInput.op_payment:type_name -> TW.Stellar.Proto.OperationPayment + 4, // 7: TW.Stellar.Proto.SigningInput.op_change_trust:type_name -> TW.Stellar.Proto.OperationChangeTrust + 6, // 8: TW.Stellar.Proto.SigningInput.op_create_claimable_balance:type_name -> TW.Stellar.Proto.OperationCreateClaimableBalance + 7, // 9: TW.Stellar.Proto.SigningInput.op_claim_claimable_balance:type_name -> TW.Stellar.Proto.OperationClaimClaimableBalance + 8, // 10: TW.Stellar.Proto.SigningInput.memo_void:type_name -> TW.Stellar.Proto.MemoVoid + 9, // 11: TW.Stellar.Proto.SigningInput.memo_text:type_name -> TW.Stellar.Proto.MemoText + 10, // 12: TW.Stellar.Proto.SigningInput.memo_id:type_name -> TW.Stellar.Proto.MemoId + 11, // 13: TW.Stellar.Proto.SigningInput.memo_hash:type_name -> TW.Stellar.Proto.MemoHash + 11, // 14: TW.Stellar.Proto.SigningInput.memo_return_hash:type_name -> TW.Stellar.Proto.MemoHash + 14, // 15: TW.Stellar.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_Stellar_proto_init() } +func file_Stellar_proto_init() { + if File_Stellar_proto != nil { + return + } + file_Stellar_proto_msgTypes[11].OneofWrappers = []any{ + (*SigningInput_OpCreateAccount)(nil), + (*SigningInput_OpPayment)(nil), + (*SigningInput_OpChangeTrust)(nil), + (*SigningInput_OpCreateClaimableBalance)(nil), + (*SigningInput_OpClaimClaimableBalance)(nil), + (*SigningInput_MemoVoid)(nil), + (*SigningInput_MemoText)(nil), + (*SigningInput_MemoId)(nil), + (*SigningInput_MemoHash)(nil), + (*SigningInput_MemoReturnHash)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Stellar_proto_rawDesc), len(file_Stellar_proto_rawDesc)), + NumEnums: 1, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Stellar_proto_goTypes, + DependencyIndexes: file_Stellar_proto_depIdxs, + EnumInfos: file_Stellar_proto_enumTypes, + MessageInfos: file_Stellar_proto_msgTypes, + }.Build() + File_Stellar_proto = out.File + file_Stellar_proto_goTypes = nil + file_Stellar_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/sui/Sui.pb.go b/wrapper/go-wrapper/protos/sui/Sui.pb.go new file mode 100644 index 00000000000..fd0bc84211a --- /dev/null +++ b/wrapper/go-wrapper/protos/sui/Sui.pb.go @@ -0,0 +1,1228 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Sui.proto + +package sui + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Object info (including Coins). +type ObjectRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Hex string representing the object ID. + ObjectId string `protobuf:"bytes,1,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"` + // Object version. + Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // Base58 string representing the object digest. + ObjectDigest string `protobuf:"bytes,3,opt,name=object_digest,json=objectDigest,proto3" json:"object_digest,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ObjectRef) Reset() { + *x = ObjectRef{} + mi := &file_Sui_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ObjectRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObjectRef) ProtoMessage() {} + +func (x *ObjectRef) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObjectRef.ProtoReflect.Descriptor instead. +func (*ObjectRef) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{0} +} + +func (x *ObjectRef) GetObjectId() string { + if x != nil { + return x.ObjectId + } + return "" +} + +func (x *ObjectRef) GetVersion() uint64 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *ObjectRef) GetObjectDigest() string { + if x != nil { + return x.ObjectDigest + } + return "" +} + +// Optional amount. +type Amount struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Amount) Reset() { + *x = Amount{} + mi := &file_Sui_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Amount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Amount) ProtoMessage() {} + +func (x *Amount) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Amount.ProtoReflect.Descriptor instead. +func (*Amount) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{1} +} + +func (x *Amount) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Base64 encoded msg to sign (string) +type SignDirect struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Obtain by calling any write RpcJson on SUI + UnsignedTxMsg string `protobuf:"bytes,1,opt,name=unsigned_tx_msg,json=unsignedTxMsg,proto3" json:"unsigned_tx_msg,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignDirect) Reset() { + *x = SignDirect{} + mi := &file_Sui_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignDirect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignDirect) ProtoMessage() {} + +func (x *SignDirect) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignDirect.ProtoReflect.Descriptor instead. +func (*SignDirect) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{2} +} + +func (x *SignDirect) GetUnsignedTxMsg() string { + if x != nil { + return x.UnsignedTxMsg + } + return "" +} + +// Send `Coin` to a list of addresses, where T can be any coin type, following a list of amounts. +// The object specified in the gas field will be used to pay the gas fee for the transaction. +// The gas object can not appear in input_coins. +// https://docs.sui.io/sui-api-ref#unsafe_pay +type Pay struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The Sui coins to be used in this transaction, including the coin for gas payment. + InputCoins []*ObjectRef `protobuf:"bytes,1,rep,name=input_coins,json=inputCoins,proto3" json:"input_coins,omitempty"` + // The recipients' addresses, the length of this vector must be the same as amounts. + Recipients []string `protobuf:"bytes,2,rep,name=recipients,proto3" json:"recipients,omitempty"` + // The amounts to be transferred to recipients, following the same order. + Amounts []uint64 `protobuf:"varint,3,rep,packed,name=amounts,proto3" json:"amounts,omitempty"` + // Gas object to be used in this transaction. + Gas *ObjectRef `protobuf:"bytes,4,opt,name=gas,proto3" json:"gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Pay) Reset() { + *x = Pay{} + mi := &file_Sui_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Pay) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Pay) ProtoMessage() {} + +func (x *Pay) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Pay.ProtoReflect.Descriptor instead. +func (*Pay) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{3} +} + +func (x *Pay) GetInputCoins() []*ObjectRef { + if x != nil { + return x.InputCoins + } + return nil +} + +func (x *Pay) GetRecipients() []string { + if x != nil { + return x.Recipients + } + return nil +} + +func (x *Pay) GetAmounts() []uint64 { + if x != nil { + return x.Amounts + } + return nil +} + +func (x *Pay) GetGas() *ObjectRef { + if x != nil { + return x.Gas + } + return nil +} + +// Send SUI coins to a list of addresses, following a list of amounts. +// This is for SUI coin only and does not require a separate gas coin object. +// https://docs.sui.io/sui-api-ref#unsafe_paysui +type PaySui struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The Sui coins to be used in this transaction, including the coin for gas payment. + InputCoins []*ObjectRef `protobuf:"bytes,1,rep,name=input_coins,json=inputCoins,proto3" json:"input_coins,omitempty"` + // The recipients' addresses, the length of this vector must be the same as amounts. + Recipients []string `protobuf:"bytes,2,rep,name=recipients,proto3" json:"recipients,omitempty"` + // The amounts to be transferred to recipients, following the same order. + Amounts []uint64 `protobuf:"varint,3,rep,packed,name=amounts,proto3" json:"amounts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaySui) Reset() { + *x = PaySui{} + mi := &file_Sui_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaySui) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaySui) ProtoMessage() {} + +func (x *PaySui) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaySui.ProtoReflect.Descriptor instead. +func (*PaySui) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{4} +} + +func (x *PaySui) GetInputCoins() []*ObjectRef { + if x != nil { + return x.InputCoins + } + return nil +} + +func (x *PaySui) GetRecipients() []string { + if x != nil { + return x.Recipients + } + return nil +} + +func (x *PaySui) GetAmounts() []uint64 { + if x != nil { + return x.Amounts + } + return nil +} + +// Send all SUI coins to one recipient. +// This is for SUI coin only and does not require a separate gas coin object. +// https://docs.sui.io/sui-api-ref#unsafe_payallsui +type PayAllSui struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The Sui coins to be used in this transaction, including the coin for gas payment. + InputCoins []*ObjectRef `protobuf:"bytes,1,rep,name=input_coins,json=inputCoins,proto3" json:"input_coins,omitempty"` + // The recipient address. + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PayAllSui) Reset() { + *x = PayAllSui{} + mi := &file_Sui_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PayAllSui) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayAllSui) ProtoMessage() {} + +func (x *PayAllSui) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PayAllSui.ProtoReflect.Descriptor instead. +func (*PayAllSui) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{5} +} + +func (x *PayAllSui) GetInputCoins() []*ObjectRef { + if x != nil { + return x.InputCoins + } + return nil +} + +func (x *PayAllSui) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +// Add stake to a validator's staking pool using multiple coins and amount. +// https://docs.sui.io/sui-api-ref#unsafe_requestaddstake +type RequestAddStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Coin objects to stake. + Coins []*ObjectRef `protobuf:"bytes,1,rep,name=coins,proto3" json:"coins,omitempty"` + // Optional stake amount. + Amount *Amount `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + // The validator's Sui address. + Validator string `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` + // Gas object to be used in this transaction. + Gas *ObjectRef `protobuf:"bytes,4,opt,name=gas,proto3" json:"gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestAddStake) Reset() { + *x = RequestAddStake{} + mi := &file_Sui_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestAddStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestAddStake) ProtoMessage() {} + +func (x *RequestAddStake) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestAddStake.ProtoReflect.Descriptor instead. +func (*RequestAddStake) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{6} +} + +func (x *RequestAddStake) GetCoins() []*ObjectRef { + if x != nil { + return x.Coins + } + return nil +} + +func (x *RequestAddStake) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *RequestAddStake) GetValidator() string { + if x != nil { + return x.Validator + } + return "" +} + +func (x *RequestAddStake) GetGas() *ObjectRef { + if x != nil { + return x.Gas + } + return nil +} + +// Withdraw stake from a validator's staking pool. +// https://docs.sui.io/sui-api-ref#unsafe_requestwithdrawstake +type RequestWithdrawStake struct { + state protoimpl.MessageState `protogen:"open.v1"` + // StakedSui object ID. + StakedSui *ObjectRef `protobuf:"bytes,1,opt,name=staked_sui,json=stakedSui,proto3" json:"staked_sui,omitempty"` + // Gas object to be used in this transaction. + Gas *ObjectRef `protobuf:"bytes,2,opt,name=gas,proto3" json:"gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestWithdrawStake) Reset() { + *x = RequestWithdrawStake{} + mi := &file_Sui_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestWithdrawStake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestWithdrawStake) ProtoMessage() {} + +func (x *RequestWithdrawStake) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestWithdrawStake.ProtoReflect.Descriptor instead. +func (*RequestWithdrawStake) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{7} +} + +func (x *RequestWithdrawStake) GetStakedSui() *ObjectRef { + if x != nil { + return x.StakedSui + } + return nil +} + +func (x *RequestWithdrawStake) GetGas() *ObjectRef { + if x != nil { + return x.Gas + } + return nil +} + +// / Transfer an object from one address to another. The object's type must allow public transfers. +// / https://docs.sui.io/sui-api-ref#unsafe_transferobject +type TransferObject struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Object ID to be transferred. + Object *ObjectRef `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + // The recipient address. + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + // Gas object to be used in this transaction. + Gas *ObjectRef `protobuf:"bytes,3,opt,name=gas,proto3" json:"gas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferObject) Reset() { + *x = TransferObject{} + mi := &file_Sui_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferObject) ProtoMessage() {} + +func (x *TransferObject) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferObject.ProtoReflect.Descriptor instead. +func (*TransferObject) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{8} +} + +func (x *TransferObject) GetObject() *ObjectRef { + if x != nil { + return x.Object + } + return nil +} + +func (x *TransferObject) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *TransferObject) GetGas() *ObjectRef { + if x != nil { + return x.Gas + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Private key to sign the transaction (bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Optional transaction signer. + // Needs to be set if no private key provided at `TransactionCompiler` module. + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` + // Types that are valid to be assigned to TransactionPayload: + // + // *SigningInput_SignDirectMessage + // *SigningInput_Pay + // *SigningInput_PaySui + // *SigningInput_PayAllSui + // *SigningInput_RequestAddStake + // *SigningInput_RequestWithdrawStake + // *SigningInput_TransferObject + // *SigningInput_RawJson + TransactionPayload isSigningInput_TransactionPayload `protobuf_oneof:"transaction_payload"` + // The gas budget, the transaction will fail if the gas cost exceed the budget. + GasBudget uint64 `protobuf:"varint,12,opt,name=gas_budget,json=gasBudget,proto3" json:"gas_budget,omitempty"` + // Reference gas price. + ReferenceGasPrice uint64 `protobuf:"varint,13,opt,name=reference_gas_price,json=referenceGasPrice,proto3" json:"reference_gas_price,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Sui_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{9} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *SigningInput) GetTransactionPayload() isSigningInput_TransactionPayload { + if x != nil { + return x.TransactionPayload + } + return nil +} + +func (x *SigningInput) GetSignDirectMessage() *SignDirect { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_SignDirectMessage); ok { + return x.SignDirectMessage + } + } + return nil +} + +func (x *SigningInput) GetPay() *Pay { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_Pay); ok { + return x.Pay + } + } + return nil +} + +func (x *SigningInput) GetPaySui() *PaySui { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_PaySui); ok { + return x.PaySui + } + } + return nil +} + +func (x *SigningInput) GetPayAllSui() *PayAllSui { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_PayAllSui); ok { + return x.PayAllSui + } + } + return nil +} + +func (x *SigningInput) GetRequestAddStake() *RequestAddStake { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_RequestAddStake); ok { + return x.RequestAddStake + } + } + return nil +} + +func (x *SigningInput) GetRequestWithdrawStake() *RequestWithdrawStake { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_RequestWithdrawStake); ok { + return x.RequestWithdrawStake + } + } + return nil +} + +func (x *SigningInput) GetTransferObject() *TransferObject { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_TransferObject); ok { + return x.TransferObject + } + } + return nil +} + +func (x *SigningInput) GetRawJson() string { + if x != nil { + if x, ok := x.TransactionPayload.(*SigningInput_RawJson); ok { + return x.RawJson + } + } + return "" +} + +func (x *SigningInput) GetGasBudget() uint64 { + if x != nil { + return x.GasBudget + } + return 0 +} + +func (x *SigningInput) GetReferenceGasPrice() uint64 { + if x != nil { + return x.ReferenceGasPrice + } + return 0 +} + +type isSigningInput_TransactionPayload interface { + isSigningInput_TransactionPayload() +} + +type SigningInput_SignDirectMessage struct { + SignDirectMessage *SignDirect `protobuf:"bytes,3,opt,name=sign_direct_message,json=signDirectMessage,proto3,oneof"` +} + +type SigningInput_Pay struct { + Pay *Pay `protobuf:"bytes,4,opt,name=pay,proto3,oneof"` +} + +type SigningInput_PaySui struct { + PaySui *PaySui `protobuf:"bytes,5,opt,name=pay_sui,json=paySui,proto3,oneof"` +} + +type SigningInput_PayAllSui struct { + PayAllSui *PayAllSui `protobuf:"bytes,6,opt,name=pay_all_sui,json=payAllSui,proto3,oneof"` +} + +type SigningInput_RequestAddStake struct { + RequestAddStake *RequestAddStake `protobuf:"bytes,7,opt,name=request_add_stake,json=requestAddStake,proto3,oneof"` +} + +type SigningInput_RequestWithdrawStake struct { + RequestWithdrawStake *RequestWithdrawStake `protobuf:"bytes,8,opt,name=request_withdraw_stake,json=requestWithdrawStake,proto3,oneof"` +} + +type SigningInput_TransferObject struct { + TransferObject *TransferObject `protobuf:"bytes,9,opt,name=transfer_object,json=transferObject,proto3,oneof"` +} + +type SigningInput_RawJson struct { + RawJson string `protobuf:"bytes,10,opt,name=raw_json,json=rawJson,proto3,oneof"` +} + +func (*SigningInput_SignDirectMessage) isSigningInput_TransactionPayload() {} + +func (*SigningInput_Pay) isSigningInput_TransactionPayload() {} + +func (*SigningInput_PaySui) isSigningInput_TransactionPayload() {} + +func (*SigningInput_PayAllSui) isSigningInput_TransactionPayload() {} + +func (*SigningInput_RequestAddStake) isSigningInput_TransactionPayload() {} + +func (*SigningInput_RequestWithdrawStake) isSigningInput_TransactionPayload() {} + +func (*SigningInput_TransferObject) isSigningInput_TransactionPayload() {} + +func (*SigningInput_RawJson) isSigningInput_TransactionPayload() {} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / The raw transaction without indent in base64 + UnsignedTx string `protobuf:"bytes,1,opt,name=unsigned_tx,json=unsignedTx,proto3" json:"unsigned_tx,omitempty"` + // / The signature encoded in base64 + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // Error code, 0 is ok, other codes will be treated as errors. + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // Error description. + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Sui_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{10} +} + +func (x *SigningOutput) GetUnsignedTx() string { + if x != nil { + return x.UnsignedTx + } + return "" +} + +func (x *SigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Message signing input. +type MessageSigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // A UTF-8 regular message to sign. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageSigningInput) Reset() { + *x = MessageSigningInput{} + mi := &file_Sui_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageSigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageSigningInput) ProtoMessage() {} + +func (x *MessageSigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageSigningInput.ProtoReflect.Descriptor instead. +func (*MessageSigningInput) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{11} +} + +func (x *MessageSigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *MessageSigningInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Message signing output. +type MessageSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The signature, a 97-byte array encoded in base64. + // The first byte indicates the signature scheme (currently set to 0x00, as we only support ED25519). + // The following 64 bytes represent the raw ED25519 signature, while the next 32 bytes contain the public key. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageSigningOutput) Reset() { + *x = MessageSigningOutput{} + mi := &file_Sui_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageSigningOutput) ProtoMessage() {} + +func (x *MessageSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageSigningOutput.ProtoReflect.Descriptor instead. +func (*MessageSigningOutput) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{12} +} + +func (x *MessageSigningOutput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *MessageSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *MessageSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// Message verifying input. +type MessageVerifyingInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The message signed. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Public key that will verify the message. + // It must be equal to the public key encoded in the signature. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The signature, a 97-byte array encoded in base64. + // Same as the signature field in MessageSigningOutput. + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageVerifyingInput) Reset() { + *x = MessageVerifyingInput{} + mi := &file_Sui_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageVerifyingInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageVerifyingInput) ProtoMessage() {} + +func (x *MessageVerifyingInput) ProtoReflect() protoreflect.Message { + mi := &file_Sui_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageVerifyingInput.ProtoReflect.Descriptor instead. +func (*MessageVerifyingInput) Descriptor() ([]byte, []int) { + return file_Sui_proto_rawDescGZIP(), []int{13} +} + +func (x *MessageVerifyingInput) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *MessageVerifyingInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *MessageVerifyingInput) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +var File_Sui_proto protoreflect.FileDescriptor + +const file_Sui_proto_rawDesc = "" + + "\n" + + "\tSui.proto\x12\fTW.Sui.Proto\x1a\fCommon.proto\"g\n" + + "\tObjectRef\x12\x1b\n" + + "\tobject_id\x18\x01 \x01(\tR\bobjectId\x12\x18\n" + + "\aversion\x18\x02 \x01(\x04R\aversion\x12#\n" + + "\robject_digest\x18\x03 \x01(\tR\fobjectDigest\" \n" + + "\x06Amount\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x04R\x06amount\"4\n" + + "\n" + + "SignDirect\x12&\n" + + "\x0funsigned_tx_msg\x18\x01 \x01(\tR\runsignedTxMsg\"\xa4\x01\n" + + "\x03Pay\x128\n" + + "\vinput_coins\x18\x01 \x03(\v2\x17.TW.Sui.Proto.ObjectRefR\n" + + "inputCoins\x12\x1e\n" + + "\n" + + "recipients\x18\x02 \x03(\tR\n" + + "recipients\x12\x18\n" + + "\aamounts\x18\x03 \x03(\x04R\aamounts\x12)\n" + + "\x03gas\x18\x04 \x01(\v2\x17.TW.Sui.Proto.ObjectRefR\x03gas\"|\n" + + "\x06PaySui\x128\n" + + "\vinput_coins\x18\x01 \x03(\v2\x17.TW.Sui.Proto.ObjectRefR\n" + + "inputCoins\x12\x1e\n" + + "\n" + + "recipients\x18\x02 \x03(\tR\n" + + "recipients\x12\x18\n" + + "\aamounts\x18\x03 \x03(\x04R\aamounts\"c\n" + + "\tPayAllSui\x128\n" + + "\vinput_coins\x18\x01 \x03(\v2\x17.TW.Sui.Proto.ObjectRefR\n" + + "inputCoins\x12\x1c\n" + + "\trecipient\x18\x02 \x01(\tR\trecipient\"\xb7\x01\n" + + "\x0fRequestAddStake\x12-\n" + + "\x05coins\x18\x01 \x03(\v2\x17.TW.Sui.Proto.ObjectRefR\x05coins\x12,\n" + + "\x06amount\x18\x02 \x01(\v2\x14.TW.Sui.Proto.AmountR\x06amount\x12\x1c\n" + + "\tvalidator\x18\x03 \x01(\tR\tvalidator\x12)\n" + + "\x03gas\x18\x04 \x01(\v2\x17.TW.Sui.Proto.ObjectRefR\x03gas\"y\n" + + "\x14RequestWithdrawStake\x126\n" + + "\n" + + "staked_sui\x18\x01 \x01(\v2\x17.TW.Sui.Proto.ObjectRefR\tstakedSui\x12)\n" + + "\x03gas\x18\x02 \x01(\v2\x17.TW.Sui.Proto.ObjectRefR\x03gas\"\x8a\x01\n" + + "\x0eTransferObject\x12/\n" + + "\x06object\x18\x01 \x01(\v2\x17.TW.Sui.Proto.ObjectRefR\x06object\x12\x1c\n" + + "\trecipient\x18\x02 \x01(\tR\trecipient\x12)\n" + + "\x03gas\x18\x03 \x01(\v2\x17.TW.Sui.Proto.ObjectRefR\x03gas\"\x9b\x05\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x16\n" + + "\x06signer\x18\x02 \x01(\tR\x06signer\x12J\n" + + "\x13sign_direct_message\x18\x03 \x01(\v2\x18.TW.Sui.Proto.SignDirectH\x00R\x11signDirectMessage\x12%\n" + + "\x03pay\x18\x04 \x01(\v2\x11.TW.Sui.Proto.PayH\x00R\x03pay\x12/\n" + + "\apay_sui\x18\x05 \x01(\v2\x14.TW.Sui.Proto.PaySuiH\x00R\x06paySui\x129\n" + + "\vpay_all_sui\x18\x06 \x01(\v2\x17.TW.Sui.Proto.PayAllSuiH\x00R\tpayAllSui\x12K\n" + + "\x11request_add_stake\x18\a \x01(\v2\x1d.TW.Sui.Proto.RequestAddStakeH\x00R\x0frequestAddStake\x12Z\n" + + "\x16request_withdraw_stake\x18\b \x01(\v2\".TW.Sui.Proto.RequestWithdrawStakeH\x00R\x14requestWithdrawStake\x12G\n" + + "\x0ftransfer_object\x18\t \x01(\v2\x1c.TW.Sui.Proto.TransferObjectH\x00R\x0etransferObject\x12\x1b\n" + + "\braw_json\x18\n" + + " \x01(\tH\x00R\arawJson\x12\x1d\n" + + "\n" + + "gas_budget\x18\f \x01(\x04R\tgasBudget\x12.\n" + + "\x13reference_gas_price\x18\r \x01(\x04R\x11referenceGasPriceB\x15\n" + + "\x13transaction_payload\"\xa8\x01\n" + + "\rSigningOutput\x12\x1f\n" + + "\vunsigned_tx\x18\x01 \x01(\tR\n" + + "unsignedTx\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"P\n" + + "\x13MessageSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"\x8e\x01\n" + + "\x14MessageSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\tR\tsignature\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"n\n" + + "\x15MessageVerifyingInput\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12\x1c\n" + + "\tsignature\x18\x03 \x01(\tR\tsignatureB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Sui_proto_rawDescOnce sync.Once + file_Sui_proto_rawDescData []byte +) + +func file_Sui_proto_rawDescGZIP() []byte { + file_Sui_proto_rawDescOnce.Do(func() { + file_Sui_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Sui_proto_rawDesc), len(file_Sui_proto_rawDesc))) + }) + return file_Sui_proto_rawDescData +} + +var file_Sui_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_Sui_proto_goTypes = []any{ + (*ObjectRef)(nil), // 0: TW.Sui.Proto.ObjectRef + (*Amount)(nil), // 1: TW.Sui.Proto.Amount + (*SignDirect)(nil), // 2: TW.Sui.Proto.SignDirect + (*Pay)(nil), // 3: TW.Sui.Proto.Pay + (*PaySui)(nil), // 4: TW.Sui.Proto.PaySui + (*PayAllSui)(nil), // 5: TW.Sui.Proto.PayAllSui + (*RequestAddStake)(nil), // 6: TW.Sui.Proto.RequestAddStake + (*RequestWithdrawStake)(nil), // 7: TW.Sui.Proto.RequestWithdrawStake + (*TransferObject)(nil), // 8: TW.Sui.Proto.TransferObject + (*SigningInput)(nil), // 9: TW.Sui.Proto.SigningInput + (*SigningOutput)(nil), // 10: TW.Sui.Proto.SigningOutput + (*MessageSigningInput)(nil), // 11: TW.Sui.Proto.MessageSigningInput + (*MessageSigningOutput)(nil), // 12: TW.Sui.Proto.MessageSigningOutput + (*MessageVerifyingInput)(nil), // 13: TW.Sui.Proto.MessageVerifyingInput + (common.SigningError)(0), // 14: TW.Common.Proto.SigningError +} +var file_Sui_proto_depIdxs = []int32{ + 0, // 0: TW.Sui.Proto.Pay.input_coins:type_name -> TW.Sui.Proto.ObjectRef + 0, // 1: TW.Sui.Proto.Pay.gas:type_name -> TW.Sui.Proto.ObjectRef + 0, // 2: TW.Sui.Proto.PaySui.input_coins:type_name -> TW.Sui.Proto.ObjectRef + 0, // 3: TW.Sui.Proto.PayAllSui.input_coins:type_name -> TW.Sui.Proto.ObjectRef + 0, // 4: TW.Sui.Proto.RequestAddStake.coins:type_name -> TW.Sui.Proto.ObjectRef + 1, // 5: TW.Sui.Proto.RequestAddStake.amount:type_name -> TW.Sui.Proto.Amount + 0, // 6: TW.Sui.Proto.RequestAddStake.gas:type_name -> TW.Sui.Proto.ObjectRef + 0, // 7: TW.Sui.Proto.RequestWithdrawStake.staked_sui:type_name -> TW.Sui.Proto.ObjectRef + 0, // 8: TW.Sui.Proto.RequestWithdrawStake.gas:type_name -> TW.Sui.Proto.ObjectRef + 0, // 9: TW.Sui.Proto.TransferObject.object:type_name -> TW.Sui.Proto.ObjectRef + 0, // 10: TW.Sui.Proto.TransferObject.gas:type_name -> TW.Sui.Proto.ObjectRef + 2, // 11: TW.Sui.Proto.SigningInput.sign_direct_message:type_name -> TW.Sui.Proto.SignDirect + 3, // 12: TW.Sui.Proto.SigningInput.pay:type_name -> TW.Sui.Proto.Pay + 4, // 13: TW.Sui.Proto.SigningInput.pay_sui:type_name -> TW.Sui.Proto.PaySui + 5, // 14: TW.Sui.Proto.SigningInput.pay_all_sui:type_name -> TW.Sui.Proto.PayAllSui + 6, // 15: TW.Sui.Proto.SigningInput.request_add_stake:type_name -> TW.Sui.Proto.RequestAddStake + 7, // 16: TW.Sui.Proto.SigningInput.request_withdraw_stake:type_name -> TW.Sui.Proto.RequestWithdrawStake + 8, // 17: TW.Sui.Proto.SigningInput.transfer_object:type_name -> TW.Sui.Proto.TransferObject + 14, // 18: TW.Sui.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 14, // 19: TW.Sui.Proto.MessageSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_Sui_proto_init() } +func file_Sui_proto_init() { + if File_Sui_proto != nil { + return + } + file_Sui_proto_msgTypes[9].OneofWrappers = []any{ + (*SigningInput_SignDirectMessage)(nil), + (*SigningInput_Pay)(nil), + (*SigningInput_PaySui)(nil), + (*SigningInput_PayAllSui)(nil), + (*SigningInput_RequestAddStake)(nil), + (*SigningInput_RequestWithdrawStake)(nil), + (*SigningInput_TransferObject)(nil), + (*SigningInput_RawJson)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Sui_proto_rawDesc), len(file_Sui_proto_rawDesc)), + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Sui_proto_goTypes, + DependencyIndexes: file_Sui_proto_depIdxs, + MessageInfos: file_Sui_proto_msgTypes, + }.Build() + File_Sui_proto = out.File + file_Sui_proto_goTypes = nil + file_Sui_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/tezos/Tezos.pb.go b/wrapper/go-wrapper/protos/tezos/Tezos.pb.go new file mode 100644 index 00000000000..89694c4529f --- /dev/null +++ b/wrapper/go-wrapper/protos/tezos/Tezos.pb.go @@ -0,0 +1,1056 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Tezos.proto + +package tezos + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Operation types +type Operation_OperationKind int32 + +const ( + // Note: Proto3 semantics require a zero value. + Operation_ENDORSEMENT Operation_OperationKind = 0 + Operation_REVEAL Operation_OperationKind = 107 + Operation_TRANSACTION Operation_OperationKind = 108 + Operation_DELEGATION Operation_OperationKind = 110 +) + +// Enum value maps for Operation_OperationKind. +var ( + Operation_OperationKind_name = map[int32]string{ + 0: "ENDORSEMENT", + 107: "REVEAL", + 108: "TRANSACTION", + 110: "DELEGATION", + } + Operation_OperationKind_value = map[string]int32{ + "ENDORSEMENT": 0, + "REVEAL": 107, + "TRANSACTION": 108, + "DELEGATION": 110, + } +) + +func (x Operation_OperationKind) Enum() *Operation_OperationKind { + p := new(Operation_OperationKind) + *p = x + return p +} + +func (x Operation_OperationKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Operation_OperationKind) Descriptor() protoreflect.EnumDescriptor { + return file_Tezos_proto_enumTypes[0].Descriptor() +} + +func (Operation_OperationKind) Type() protoreflect.EnumType { + return &file_Tezos_proto_enumTypes[0] +} + +func (x Operation_OperationKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Operation_OperationKind.Descriptor instead. +func (Operation_OperationKind) EnumDescriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{3, 0} +} + +// Input data necessary to create a signed Tezos transaction. +// Next field: 3 +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // One or more operations + OperationList *OperationList `protobuf:"bytes,1,opt,name=operation_list,json=operationList,proto3" json:"operation_list,omitempty"` + // Encoded operation bytes obtained with $RPC_URL/chains/main/blocks/head/helpers/forge/operations, operation_list will be ignored. + EncodedOperations []byte `protobuf:"bytes,2,opt,name=encoded_operations,json=encodedOperations,proto3" json:"encoded_operations,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,3,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Tezos_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetOperationList() *OperationList { + if x != nil { + return x.OperationList + } + return nil +} + +func (x *SigningInput) GetEncodedOperations() []byte { + if x != nil { + return x.EncodedOperations + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +// Result containing the signed and encoded transaction. +// Next field: 2 +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The encoded transaction + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Tezos_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// A list of operations and a branch. +// Next field: 3 +type OperationList struct { + state protoimpl.MessageState `protogen:"open.v1"` + // branch + Branch string `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"` + // list of operations + Operations []*Operation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationList) Reset() { + *x = OperationList{} + mi := &file_Tezos_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationList) ProtoMessage() {} + +func (x *OperationList) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationList.ProtoReflect.Descriptor instead. +func (*OperationList) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{2} +} + +func (x *OperationList) GetBranch() string { + if x != nil { + return x.Branch + } + return "" +} + +func (x *OperationList) GetOperations() []*Operation { + if x != nil { + return x.Operations + } + return nil +} + +// An operation that can be applied to the Tezos blockchain. +// Next field: 12 +type Operation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // counter + Counter int64 `protobuf:"varint,1,opt,name=counter,proto3" json:"counter,omitempty"` + // source account + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + // fee + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + // gas limit + GasLimit int64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // storage limit + StorageLimit int64 `protobuf:"varint,5,opt,name=storage_limit,json=storageLimit,proto3" json:"storage_limit,omitempty"` + // Operation type + Kind Operation_OperationKind `protobuf:"varint,7,opt,name=kind,proto3,enum=TW.Tezos.Proto.Operation_OperationKind" json:"kind,omitempty"` + // Operation specific data depending on the type of the operation. + // + // Types that are valid to be assigned to OperationData: + // + // *Operation_RevealOperationData + // *Operation_TransactionOperationData + // *Operation_DelegationOperationData + OperationData isOperation_OperationData `protobuf_oneof:"operation_data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Operation) Reset() { + *x = Operation{} + mi := &file_Tezos_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{3} +} + +func (x *Operation) GetCounter() int64 { + if x != nil { + return x.Counter + } + return 0 +} + +func (x *Operation) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *Operation) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *Operation) GetGasLimit() int64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *Operation) GetStorageLimit() int64 { + if x != nil { + return x.StorageLimit + } + return 0 +} + +func (x *Operation) GetKind() Operation_OperationKind { + if x != nil { + return x.Kind + } + return Operation_ENDORSEMENT +} + +func (x *Operation) GetOperationData() isOperation_OperationData { + if x != nil { + return x.OperationData + } + return nil +} + +func (x *Operation) GetRevealOperationData() *RevealOperationData { + if x != nil { + if x, ok := x.OperationData.(*Operation_RevealOperationData); ok { + return x.RevealOperationData + } + } + return nil +} + +func (x *Operation) GetTransactionOperationData() *TransactionOperationData { + if x != nil { + if x, ok := x.OperationData.(*Operation_TransactionOperationData); ok { + return x.TransactionOperationData + } + } + return nil +} + +func (x *Operation) GetDelegationOperationData() *DelegationOperationData { + if x != nil { + if x, ok := x.OperationData.(*Operation_DelegationOperationData); ok { + return x.DelegationOperationData + } + } + return nil +} + +type isOperation_OperationData interface { + isOperation_OperationData() +} + +type Operation_RevealOperationData struct { + RevealOperationData *RevealOperationData `protobuf:"bytes,8,opt,name=reveal_operation_data,json=revealOperationData,proto3,oneof"` +} + +type Operation_TransactionOperationData struct { + TransactionOperationData *TransactionOperationData `protobuf:"bytes,9,opt,name=transaction_operation_data,json=transactionOperationData,proto3,oneof"` +} + +type Operation_DelegationOperationData struct { + DelegationOperationData *DelegationOperationData `protobuf:"bytes,11,opt,name=delegation_operation_data,json=delegationOperationData,proto3,oneof"` +} + +func (*Operation_RevealOperationData) isOperation_OperationData() {} + +func (*Operation_TransactionOperationData) isOperation_OperationData() {} + +func (*Operation_DelegationOperationData) isOperation_OperationData() {} + +type FA12Parameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + Entrypoint string `protobuf:"bytes,1,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FA12Parameters) Reset() { + *x = FA12Parameters{} + mi := &file_Tezos_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FA12Parameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FA12Parameters) ProtoMessage() {} + +func (x *FA12Parameters) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FA12Parameters.ProtoReflect.Descriptor instead. +func (*FA12Parameters) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{4} +} + +func (x *FA12Parameters) GetEntrypoint() string { + if x != nil { + return x.Entrypoint + } + return "" +} + +func (x *FA12Parameters) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *FA12Parameters) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *FA12Parameters) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Txs struct { + state protoimpl.MessageState `protogen:"open.v1"` + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Txs) Reset() { + *x = Txs{} + mi := &file_Tezos_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Txs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Txs) ProtoMessage() {} + +func (x *Txs) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Txs.ProtoReflect.Descriptor instead. +func (*Txs) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{5} +} + +func (x *Txs) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Txs) GetTokenId() string { + if x != nil { + return x.TokenId + } + return "" +} + +func (x *Txs) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type TxObject struct { + state protoimpl.MessageState `protogen:"open.v1"` + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + Txs []*Txs `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TxObject) Reset() { + *x = TxObject{} + mi := &file_Tezos_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TxObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxObject) ProtoMessage() {} + +func (x *TxObject) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TxObject.ProtoReflect.Descriptor instead. +func (*TxObject) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{6} +} + +func (x *TxObject) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *TxObject) GetTxs() []*Txs { + if x != nil { + return x.Txs + } + return nil +} + +type FA2Parameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + Entrypoint string `protobuf:"bytes,1,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"` + TxsObject []*TxObject `protobuf:"bytes,2,rep,name=txs_object,json=txsObject,proto3" json:"txs_object,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FA2Parameters) Reset() { + *x = FA2Parameters{} + mi := &file_Tezos_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FA2Parameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FA2Parameters) ProtoMessage() {} + +func (x *FA2Parameters) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FA2Parameters.ProtoReflect.Descriptor instead. +func (*FA2Parameters) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{7} +} + +func (x *FA2Parameters) GetEntrypoint() string { + if x != nil { + return x.Entrypoint + } + return "" +} + +func (x *FA2Parameters) GetTxsObject() []*TxObject { + if x != nil { + return x.TxsObject + } + return nil +} + +// Generic operation parameters +type OperationParameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Parameters: + // + // *OperationParameters_Fa12Parameters + // *OperationParameters_Fa2Parameters + Parameters isOperationParameters_Parameters `protobuf_oneof:"parameters"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationParameters) Reset() { + *x = OperationParameters{} + mi := &file_Tezos_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationParameters) ProtoMessage() {} + +func (x *OperationParameters) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationParameters.ProtoReflect.Descriptor instead. +func (*OperationParameters) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{8} +} + +func (x *OperationParameters) GetParameters() isOperationParameters_Parameters { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *OperationParameters) GetFa12Parameters() *FA12Parameters { + if x != nil { + if x, ok := x.Parameters.(*OperationParameters_Fa12Parameters); ok { + return x.Fa12Parameters + } + } + return nil +} + +func (x *OperationParameters) GetFa2Parameters() *FA2Parameters { + if x != nil { + if x, ok := x.Parameters.(*OperationParameters_Fa2Parameters); ok { + return x.Fa2Parameters + } + } + return nil +} + +type isOperationParameters_Parameters interface { + isOperationParameters_Parameters() +} + +type OperationParameters_Fa12Parameters struct { + Fa12Parameters *FA12Parameters `protobuf:"bytes,1,opt,name=fa12_parameters,json=fa12Parameters,proto3,oneof"` +} + +type OperationParameters_Fa2Parameters struct { + Fa2Parameters *FA2Parameters `protobuf:"bytes,2,opt,name=fa2_parameters,json=fa2Parameters,proto3,oneof"` +} + +func (*OperationParameters_Fa12Parameters) isOperationParameters_Parameters() {} + +func (*OperationParameters_Fa2Parameters) isOperationParameters_Parameters() {} + +// Transaction operation specific data. +// Next field: 3 +type TransactionOperationData struct { + state protoimpl.MessageState `protogen:"open.v1"` + Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + EncodedParameter []byte `protobuf:"bytes,3,opt,name=encoded_parameter,json=encodedParameter,proto3" json:"encoded_parameter,omitempty"` + Parameters *OperationParameters `protobuf:"bytes,4,opt,name=parameters,proto3" json:"parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOperationData) Reset() { + *x = TransactionOperationData{} + mi := &file_Tezos_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOperationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOperationData) ProtoMessage() {} + +func (x *TransactionOperationData) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOperationData.ProtoReflect.Descriptor instead. +func (*TransactionOperationData) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{9} +} + +func (x *TransactionOperationData) GetDestination() string { + if x != nil { + return x.Destination + } + return "" +} + +func (x *TransactionOperationData) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TransactionOperationData) GetEncodedParameter() []byte { + if x != nil { + return x.EncodedParameter + } + return nil +} + +func (x *TransactionOperationData) GetParameters() *OperationParameters { + if x != nil { + return x.Parameters + } + return nil +} + +// Reveal operation specific data. +// Next field: 2 +type RevealOperationData struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RevealOperationData) Reset() { + *x = RevealOperationData{} + mi := &file_Tezos_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RevealOperationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevealOperationData) ProtoMessage() {} + +func (x *RevealOperationData) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevealOperationData.ProtoReflect.Descriptor instead. +func (*RevealOperationData) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{10} +} + +func (x *RevealOperationData) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Delegation operation specific data. +// Next field: 2 +type DelegationOperationData struct { + state protoimpl.MessageState `protogen:"open.v1"` + Delegate string `protobuf:"bytes,1,opt,name=delegate,proto3" json:"delegate,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DelegationOperationData) Reset() { + *x = DelegationOperationData{} + mi := &file_Tezos_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DelegationOperationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegationOperationData) ProtoMessage() {} + +func (x *DelegationOperationData) ProtoReflect() protoreflect.Message { + mi := &file_Tezos_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DelegationOperationData.ProtoReflect.Descriptor instead. +func (*DelegationOperationData) Descriptor() ([]byte, []int) { + return file_Tezos_proto_rawDescGZIP(), []int{11} +} + +func (x *DelegationOperationData) GetDelegate() string { + if x != nil { + return x.Delegate + } + return "" +} + +var File_Tezos_proto protoreflect.FileDescriptor + +const file_Tezos_proto_rawDesc = "" + + "\n" + + "\vTezos.proto\x12\x0eTW.Tezos.Proto\x1a\fCommon.proto\"\xa4\x01\n" + + "\fSigningInput\x12D\n" + + "\x0eoperation_list\x18\x01 \x01(\v2\x1d.TW.Tezos.Proto.OperationListR\roperationList\x12-\n" + + "\x12encoded_operations\x18\x02 \x01(\fR\x11encodedOperations\x12\x1f\n" + + "\vprivate_key\x18\x03 \x01(\fR\n" + + "privateKey\"\x83\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x123\n" + + "\x05error\x18\x02 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x03 \x01(\tR\ferrorMessage\"b\n" + + "\rOperationList\x12\x16\n" + + "\x06branch\x18\x01 \x01(\tR\x06branch\x129\n" + + "\n" + + "operations\x18\x02 \x03(\v2\x19.TW.Tezos.Proto.OperationR\n" + + "operations\"\xdb\x04\n" + + "\tOperation\x12\x18\n" + + "\acounter\x18\x01 \x01(\x03R\acounter\x12\x16\n" + + "\x06source\x18\x02 \x01(\tR\x06source\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x12\x1b\n" + + "\tgas_limit\x18\x04 \x01(\x03R\bgasLimit\x12#\n" + + "\rstorage_limit\x18\x05 \x01(\x03R\fstorageLimit\x12;\n" + + "\x04kind\x18\a \x01(\x0e2'.TW.Tezos.Proto.Operation.OperationKindR\x04kind\x12Y\n" + + "\x15reveal_operation_data\x18\b \x01(\v2#.TW.Tezos.Proto.RevealOperationDataH\x00R\x13revealOperationData\x12h\n" + + "\x1atransaction_operation_data\x18\t \x01(\v2(.TW.Tezos.Proto.TransactionOperationDataH\x00R\x18transactionOperationData\x12e\n" + + "\x19delegation_operation_data\x18\v \x01(\v2'.TW.Tezos.Proto.DelegationOperationDataH\x00R\x17delegationOperationData\"M\n" + + "\rOperationKind\x12\x0f\n" + + "\vENDORSEMENT\x10\x00\x12\n" + + "\n" + + "\x06REVEAL\x10k\x12\x0f\n" + + "\vTRANSACTION\x10l\x12\x0e\n" + + "\n" + + "DELEGATION\x10nB\x10\n" + + "\x0eoperation_data\"j\n" + + "\x0eFA12Parameters\x12\x1e\n" + + "\n" + + "entrypoint\x18\x01 \x01(\tR\n" + + "entrypoint\x12\x12\n" + + "\x04from\x18\x02 \x01(\tR\x04from\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\x12\x14\n" + + "\x05value\x18\x04 \x01(\tR\x05value\"H\n" + + "\x03Txs\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x19\n" + + "\btoken_id\x18\x02 \x01(\tR\atokenId\x12\x16\n" + + "\x06amount\x18\x03 \x01(\tR\x06amount\"E\n" + + "\bTxObject\x12\x12\n" + + "\x04from\x18\x01 \x01(\tR\x04from\x12%\n" + + "\x03txs\x18\x02 \x03(\v2\x13.TW.Tezos.Proto.TxsR\x03txs\"h\n" + + "\rFA2Parameters\x12\x1e\n" + + "\n" + + "entrypoint\x18\x01 \x01(\tR\n" + + "entrypoint\x127\n" + + "\n" + + "txs_object\x18\x02 \x03(\v2\x18.TW.Tezos.Proto.TxObjectR\ttxsObject\"\xb6\x01\n" + + "\x13OperationParameters\x12I\n" + + "\x0ffa12_parameters\x18\x01 \x01(\v2\x1e.TW.Tezos.Proto.FA12ParametersH\x00R\x0efa12Parameters\x12F\n" + + "\x0efa2_parameters\x18\x02 \x01(\v2\x1d.TW.Tezos.Proto.FA2ParametersH\x00R\rfa2ParametersB\f\n" + + "\n" + + "parameters\"\xc6\x01\n" + + "\x18TransactionOperationData\x12 \n" + + "\vdestination\x18\x01 \x01(\tR\vdestination\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12+\n" + + "\x11encoded_parameter\x18\x03 \x01(\fR\x10encodedParameter\x12C\n" + + "\n" + + "parameters\x18\x04 \x01(\v2#.TW.Tezos.Proto.OperationParametersR\n" + + "parameters\"4\n" + + "\x13RevealOperationData\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\fR\tpublicKey\"5\n" + + "\x17DelegationOperationData\x12\x1a\n" + + "\bdelegate\x18\x01 \x01(\tR\bdelegateB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Tezos_proto_rawDescOnce sync.Once + file_Tezos_proto_rawDescData []byte +) + +func file_Tezos_proto_rawDescGZIP() []byte { + file_Tezos_proto_rawDescOnce.Do(func() { + file_Tezos_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Tezos_proto_rawDesc), len(file_Tezos_proto_rawDesc))) + }) + return file_Tezos_proto_rawDescData +} + +var file_Tezos_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_Tezos_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_Tezos_proto_goTypes = []any{ + (Operation_OperationKind)(0), // 0: TW.Tezos.Proto.Operation.OperationKind + (*SigningInput)(nil), // 1: TW.Tezos.Proto.SigningInput + (*SigningOutput)(nil), // 2: TW.Tezos.Proto.SigningOutput + (*OperationList)(nil), // 3: TW.Tezos.Proto.OperationList + (*Operation)(nil), // 4: TW.Tezos.Proto.Operation + (*FA12Parameters)(nil), // 5: TW.Tezos.Proto.FA12Parameters + (*Txs)(nil), // 6: TW.Tezos.Proto.Txs + (*TxObject)(nil), // 7: TW.Tezos.Proto.TxObject + (*FA2Parameters)(nil), // 8: TW.Tezos.Proto.FA2Parameters + (*OperationParameters)(nil), // 9: TW.Tezos.Proto.OperationParameters + (*TransactionOperationData)(nil), // 10: TW.Tezos.Proto.TransactionOperationData + (*RevealOperationData)(nil), // 11: TW.Tezos.Proto.RevealOperationData + (*DelegationOperationData)(nil), // 12: TW.Tezos.Proto.DelegationOperationData + (common.SigningError)(0), // 13: TW.Common.Proto.SigningError +} +var file_Tezos_proto_depIdxs = []int32{ + 3, // 0: TW.Tezos.Proto.SigningInput.operation_list:type_name -> TW.Tezos.Proto.OperationList + 13, // 1: TW.Tezos.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // 2: TW.Tezos.Proto.OperationList.operations:type_name -> TW.Tezos.Proto.Operation + 0, // 3: TW.Tezos.Proto.Operation.kind:type_name -> TW.Tezos.Proto.Operation.OperationKind + 11, // 4: TW.Tezos.Proto.Operation.reveal_operation_data:type_name -> TW.Tezos.Proto.RevealOperationData + 10, // 5: TW.Tezos.Proto.Operation.transaction_operation_data:type_name -> TW.Tezos.Proto.TransactionOperationData + 12, // 6: TW.Tezos.Proto.Operation.delegation_operation_data:type_name -> TW.Tezos.Proto.DelegationOperationData + 6, // 7: TW.Tezos.Proto.TxObject.txs:type_name -> TW.Tezos.Proto.Txs + 7, // 8: TW.Tezos.Proto.FA2Parameters.txs_object:type_name -> TW.Tezos.Proto.TxObject + 5, // 9: TW.Tezos.Proto.OperationParameters.fa12_parameters:type_name -> TW.Tezos.Proto.FA12Parameters + 8, // 10: TW.Tezos.Proto.OperationParameters.fa2_parameters:type_name -> TW.Tezos.Proto.FA2Parameters + 9, // 11: TW.Tezos.Proto.TransactionOperationData.parameters:type_name -> TW.Tezos.Proto.OperationParameters + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_Tezos_proto_init() } +func file_Tezos_proto_init() { + if File_Tezos_proto != nil { + return + } + file_Tezos_proto_msgTypes[3].OneofWrappers = []any{ + (*Operation_RevealOperationData)(nil), + (*Operation_TransactionOperationData)(nil), + (*Operation_DelegationOperationData)(nil), + } + file_Tezos_proto_msgTypes[8].OneofWrappers = []any{ + (*OperationParameters_Fa12Parameters)(nil), + (*OperationParameters_Fa2Parameters)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Tezos_proto_rawDesc), len(file_Tezos_proto_rawDesc)), + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Tezos_proto_goTypes, + DependencyIndexes: file_Tezos_proto_depIdxs, + EnumInfos: file_Tezos_proto_enumTypes, + MessageInfos: file_Tezos_proto_msgTypes, + }.Build() + File_Tezos_proto = out.File + file_Tezos_proto_goTypes = nil + file_Tezos_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/theopennetwork/TheOpenNetwork.pb.go b/wrapper/go-wrapper/protos/theopennetwork/TheOpenNetwork.pb.go new file mode 100644 index 00000000000..fa2c647f709 --- /dev/null +++ b/wrapper/go-wrapper/protos/theopennetwork/TheOpenNetwork.pb.go @@ -0,0 +1,653 @@ +// SPDX-License-Identifier: Apache-2.0 +// +// Copyright © 2017 Trust Wallet. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: TheOpenNetwork.proto + +package theopennetwork + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type WalletVersion int32 + +const ( + WalletVersion_WALLET_V3_R1 WalletVersion = 0 + WalletVersion_WALLET_V3_R2 WalletVersion = 1 + WalletVersion_WALLET_V4_R2 WalletVersion = 2 + WalletVersion_WALLET_V5_R1 WalletVersion = 3 +) + +// Enum value maps for WalletVersion. +var ( + WalletVersion_name = map[int32]string{ + 0: "WALLET_V3_R1", + 1: "WALLET_V3_R2", + 2: "WALLET_V4_R2", + 3: "WALLET_V5_R1", + } + WalletVersion_value = map[string]int32{ + "WALLET_V3_R1": 0, + "WALLET_V3_R2": 1, + "WALLET_V4_R2": 2, + "WALLET_V5_R1": 3, + } +) + +func (x WalletVersion) Enum() *WalletVersion { + p := new(WalletVersion) + *p = x + return p +} + +func (x WalletVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WalletVersion) Descriptor() protoreflect.EnumDescriptor { + return file_TheOpenNetwork_proto_enumTypes[0].Descriptor() +} + +func (WalletVersion) Type() protoreflect.EnumType { + return &file_TheOpenNetwork_proto_enumTypes[0] +} + +func (x WalletVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WalletVersion.Descriptor instead. +func (WalletVersion) EnumDescriptor() ([]byte, []int) { + return file_TheOpenNetwork_proto_rawDescGZIP(), []int{0} +} + +type SendMode int32 + +const ( + SendMode_DEFAULT SendMode = 0 + SendMode_PAY_FEES_SEPARATELY SendMode = 1 + SendMode_IGNORE_ACTION_PHASE_ERRORS SendMode = 2 + SendMode_DESTROY_ON_ZERO_BALANCE SendMode = 32 + SendMode_ATTACH_ALL_INBOUND_MESSAGE_VALUE SendMode = 64 + SendMode_ATTACH_ALL_CONTRACT_BALANCE SendMode = 128 +) + +// Enum value maps for SendMode. +var ( + SendMode_name = map[int32]string{ + 0: "DEFAULT", + 1: "PAY_FEES_SEPARATELY", + 2: "IGNORE_ACTION_PHASE_ERRORS", + 32: "DESTROY_ON_ZERO_BALANCE", + 64: "ATTACH_ALL_INBOUND_MESSAGE_VALUE", + 128: "ATTACH_ALL_CONTRACT_BALANCE", + } + SendMode_value = map[string]int32{ + "DEFAULT": 0, + "PAY_FEES_SEPARATELY": 1, + "IGNORE_ACTION_PHASE_ERRORS": 2, + "DESTROY_ON_ZERO_BALANCE": 32, + "ATTACH_ALL_INBOUND_MESSAGE_VALUE": 64, + "ATTACH_ALL_CONTRACT_BALANCE": 128, + } +) + +func (x SendMode) Enum() *SendMode { + p := new(SendMode) + *p = x + return p +} + +func (x SendMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SendMode) Descriptor() protoreflect.EnumDescriptor { + return file_TheOpenNetwork_proto_enumTypes[1].Descriptor() +} + +func (SendMode) Type() protoreflect.EnumType { + return &file_TheOpenNetwork_proto_enumTypes[1] +} + +func (x SendMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SendMode.Descriptor instead. +func (SendMode) EnumDescriptor() ([]byte, []int) { + return file_TheOpenNetwork_proto_rawDescGZIP(), []int{1} +} + +type Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Recipient address + Dest string `protobuf:"bytes,1,opt,name=dest,proto3" json:"dest,omitempty"` + // Amount to send in nanotons + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Send mode (optional, 0 by default) + // Learn more: https://ton.org/docs/develop/func/stdlib#send_raw_message + Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"` + // Transfer comment message (optional, empty by default) + // Ignored if `custom_payload` is specified + Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"` + // If the address is bounceable + Bounceable bool `protobuf:"varint,5,opt,name=bounceable,proto3" json:"bounceable,omitempty"` + // Optional raw one-cell BoC encoded in Base64. + // Can be used to deploy a smart contract. + StateInit string `protobuf:"bytes,6,opt,name=state_init,json=stateInit,proto3" json:"state_init,omitempty"` + // One of the Transfer message payloads (optional). + // + // Types that are valid to be assigned to Payload: + // + // *Transfer_JettonTransfer + // *Transfer_CustomPayload + Payload isTransfer_Payload `protobuf_oneof:"payload"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transfer) Reset() { + *x = Transfer{} + mi := &file_TheOpenNetwork_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transfer) ProtoMessage() {} + +func (x *Transfer) ProtoReflect() protoreflect.Message { + mi := &file_TheOpenNetwork_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transfer.ProtoReflect.Descriptor instead. +func (*Transfer) Descriptor() ([]byte, []int) { + return file_TheOpenNetwork_proto_rawDescGZIP(), []int{0} +} + +func (x *Transfer) GetDest() string { + if x != nil { + return x.Dest + } + return "" +} + +func (x *Transfer) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *Transfer) GetMode() uint32 { + if x != nil { + return x.Mode + } + return 0 +} + +func (x *Transfer) GetComment() string { + if x != nil { + return x.Comment + } + return "" +} + +func (x *Transfer) GetBounceable() bool { + if x != nil { + return x.Bounceable + } + return false +} + +func (x *Transfer) GetStateInit() string { + if x != nil { + return x.StateInit + } + return "" +} + +func (x *Transfer) GetPayload() isTransfer_Payload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Transfer) GetJettonTransfer() *JettonTransfer { + if x != nil { + if x, ok := x.Payload.(*Transfer_JettonTransfer); ok { + return x.JettonTransfer + } + } + return nil +} + +func (x *Transfer) GetCustomPayload() string { + if x != nil { + if x, ok := x.Payload.(*Transfer_CustomPayload); ok { + return x.CustomPayload + } + } + return "" +} + +type isTransfer_Payload interface { + isTransfer_Payload() +} + +type Transfer_JettonTransfer struct { + // Jetton transfer payload. + JettonTransfer *JettonTransfer `protobuf:"bytes,7,opt,name=jetton_transfer,json=jettonTransfer,proto3,oneof"` +} + +type Transfer_CustomPayload struct { + // TON transfer with custom payload (contract call). Raw one-cell BoC encoded in Base64. + CustomPayload string `protobuf:"bytes,8,opt,name=custom_payload,json=customPayload,proto3,oneof"` +} + +func (*Transfer_JettonTransfer) isTransfer_Payload() {} + +func (*Transfer_CustomPayload) isTransfer_Payload() {} + +type JettonTransfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Arbitrary request number. Default is 0. Optional field. + QueryId uint64 `protobuf:"varint,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` + // Amount of transferred jettons in elementary integer units. The real value transferred is jetton_amount multiplied by ten to the power of token decimal precision + JettonAmount uint64 `protobuf:"varint,2,opt,name=jetton_amount,json=jettonAmount,proto3" json:"jetton_amount,omitempty"` + // Address of the new owner of the jettons. + ToOwner string `protobuf:"bytes,3,opt,name=to_owner,json=toOwner,proto3" json:"to_owner,omitempty"` + // Address where to send a response with confirmation of a successful transfer and the rest of the incoming message Toncoins. Usually the sender should get back their toncoins. + ResponseAddress string `protobuf:"bytes,4,opt,name=response_address,json=responseAddress,proto3" json:"response_address,omitempty"` + // Amount in nanotons to forward to recipient. Basically minimum amount - 1 nanoton should be used + ForwardAmount uint64 `protobuf:"varint,5,opt,name=forward_amount,json=forwardAmount,proto3" json:"forward_amount,omitempty"` + // Optional raw one-cell BoC encoded in Base64. + // Can be used in the case of mintless jetton transfers. + CustomPayload string `protobuf:"bytes,6,opt,name=custom_payload,json=customPayload,proto3" json:"custom_payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JettonTransfer) Reset() { + *x = JettonTransfer{} + mi := &file_TheOpenNetwork_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JettonTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JettonTransfer) ProtoMessage() {} + +func (x *JettonTransfer) ProtoReflect() protoreflect.Message { + mi := &file_TheOpenNetwork_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JettonTransfer.ProtoReflect.Descriptor instead. +func (*JettonTransfer) Descriptor() ([]byte, []int) { + return file_TheOpenNetwork_proto_rawDescGZIP(), []int{1} +} + +func (x *JettonTransfer) GetQueryId() uint64 { + if x != nil { + return x.QueryId + } + return 0 +} + +func (x *JettonTransfer) GetJettonAmount() uint64 { + if x != nil { + return x.JettonAmount + } + return 0 +} + +func (x *JettonTransfer) GetToOwner() string { + if x != nil { + return x.ToOwner + } + return "" +} + +func (x *JettonTransfer) GetResponseAddress() string { + if x != nil { + return x.ResponseAddress + } + return "" +} + +func (x *JettonTransfer) GetForwardAmount() uint64 { + if x != nil { + return x.ForwardAmount + } + return 0 +} + +func (x *JettonTransfer) GetCustomPayload() string { + if x != nil { + return x.CustomPayload + } + return "" +} + +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Public key of the signer (32 bytes). Used when transaction is going to be signed externally. + PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Up to 4 internal messages. + Messages []*Transfer `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` + // Message counter (optional, 0 by default used for the first deploy) + // This field is required, because we need to protect the smart contract against "replay attacks" + // Learn more: https://ton.org/docs/develop/smart-contracts/guidelines/external-messages + SequenceNumber uint32 `protobuf:"varint,4,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` + // Expiration UNIX timestamp (optional, now() + 60 by default) + ExpireAt uint32 `protobuf:"varint,5,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty"` + // Wallet version + WalletVersion WalletVersion `protobuf:"varint,6,opt,name=wallet_version,json=walletVersion,proto3,enum=TW.TheOpenNetwork.Proto.WalletVersion" json:"wallet_version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_TheOpenNetwork_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_TheOpenNetwork_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_TheOpenNetwork_proto_rawDescGZIP(), []int{2} +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *SigningInput) GetMessages() []*Transfer { + if x != nil { + return x.Messages + } + return nil +} + +func (x *SigningInput) GetSequenceNumber() uint32 { + if x != nil { + return x.SequenceNumber + } + return 0 +} + +func (x *SigningInput) GetExpireAt() uint32 { + if x != nil { + return x.ExpireAt + } + return 0 +} + +func (x *SigningInput) GetWalletVersion() WalletVersion { + if x != nil { + return x.WalletVersion + } + return WalletVersion_WALLET_V3_R1 +} + +// Transaction signing output. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and base64 encoded BOC message + Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Transaction Cell hash + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_TheOpenNetwork_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_TheOpenNetwork_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_TheOpenNetwork_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningOutput) GetEncoded() string { + if x != nil { + return x.Encoded + } + return "" +} + +func (x *SigningOutput) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_TheOpenNetwork_proto protoreflect.FileDescriptor + +const file_TheOpenNetwork_proto_rawDesc = "" + + "\n" + + "\x14TheOpenNetwork.proto\x12\x17TW.TheOpenNetwork.Proto\x1a\fCommon.proto\"\xab\x02\n" + + "\bTransfer\x12\x12\n" + + "\x04dest\x18\x01 \x01(\tR\x04dest\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x04R\x06amount\x12\x12\n" + + "\x04mode\x18\x03 \x01(\rR\x04mode\x12\x18\n" + + "\acomment\x18\x04 \x01(\tR\acomment\x12\x1e\n" + + "\n" + + "bounceable\x18\x05 \x01(\bR\n" + + "bounceable\x12\x1d\n" + + "\n" + + "state_init\x18\x06 \x01(\tR\tstateInit\x12R\n" + + "\x0fjetton_transfer\x18\a \x01(\v2'.TW.TheOpenNetwork.Proto.JettonTransferH\x00R\x0ejettonTransfer\x12'\n" + + "\x0ecustom_payload\x18\b \x01(\tH\x00R\rcustomPayloadB\t\n" + + "\apayload\"\xe4\x01\n" + + "\x0eJettonTransfer\x12\x19\n" + + "\bquery_id\x18\x01 \x01(\x04R\aqueryId\x12#\n" + + "\rjetton_amount\x18\x02 \x01(\x04R\fjettonAmount\x12\x19\n" + + "\bto_owner\x18\x03 \x01(\tR\atoOwner\x12)\n" + + "\x10response_address\x18\x04 \x01(\tR\x0fresponseAddress\x12%\n" + + "\x0eforward_amount\x18\x05 \x01(\x04R\rforwardAmount\x12%\n" + + "\x0ecustom_payload\x18\x06 \x01(\tR\rcustomPayload\"\xa2\x02\n" + + "\fSigningInput\x12\x1f\n" + + "\vprivate_key\x18\x01 \x01(\fR\n" + + "privateKey\x12\x1d\n" + + "\n" + + "public_key\x18\x02 \x01(\fR\tpublicKey\x12=\n" + + "\bmessages\x18\x03 \x03(\v2!.TW.TheOpenNetwork.Proto.TransferR\bmessages\x12'\n" + + "\x0fsequence_number\x18\x04 \x01(\rR\x0esequenceNumber\x12\x1b\n" + + "\texpire_at\x18\x05 \x01(\rR\bexpireAt\x12M\n" + + "\x0ewallet_version\x18\x06 \x01(\x0e2&.TW.TheOpenNetwork.Proto.WalletVersionR\rwalletVersion\"\x97\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\tR\aencoded\x12\x12\n" + + "\x04hash\x18\x02 \x01(\fR\x04hash\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessage*W\n" + + "\rWalletVersion\x12\x10\n" + + "\fWALLET_V3_R1\x10\x00\x12\x10\n" + + "\fWALLET_V3_R2\x10\x01\x12\x10\n" + + "\fWALLET_V4_R2\x10\x02\x12\x10\n" + + "\fWALLET_V5_R1\x10\x03*\xb5\x01\n" + + "\bSendMode\x12\v\n" + + "\aDEFAULT\x10\x00\x12\x17\n" + + "\x13PAY_FEES_SEPARATELY\x10\x01\x12\x1e\n" + + "\x1aIGNORE_ACTION_PHASE_ERRORS\x10\x02\x12\x1b\n" + + "\x17DESTROY_ON_ZERO_BALANCE\x10 \x12$\n" + + " ATTACH_ALL_INBOUND_MESSAGE_VALUE\x10@\x12 \n" + + "\x1bATTACH_ALL_CONTRACT_BALANCE\x10\x80\x01B\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_TheOpenNetwork_proto_rawDescOnce sync.Once + file_TheOpenNetwork_proto_rawDescData []byte +) + +func file_TheOpenNetwork_proto_rawDescGZIP() []byte { + file_TheOpenNetwork_proto_rawDescOnce.Do(func() { + file_TheOpenNetwork_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_TheOpenNetwork_proto_rawDesc), len(file_TheOpenNetwork_proto_rawDesc))) + }) + return file_TheOpenNetwork_proto_rawDescData +} + +var file_TheOpenNetwork_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_TheOpenNetwork_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_TheOpenNetwork_proto_goTypes = []any{ + (WalletVersion)(0), // 0: TW.TheOpenNetwork.Proto.WalletVersion + (SendMode)(0), // 1: TW.TheOpenNetwork.Proto.SendMode + (*Transfer)(nil), // 2: TW.TheOpenNetwork.Proto.Transfer + (*JettonTransfer)(nil), // 3: TW.TheOpenNetwork.Proto.JettonTransfer + (*SigningInput)(nil), // 4: TW.TheOpenNetwork.Proto.SigningInput + (*SigningOutput)(nil), // 5: TW.TheOpenNetwork.Proto.SigningOutput + (common.SigningError)(0), // 6: TW.Common.Proto.SigningError +} +var file_TheOpenNetwork_proto_depIdxs = []int32{ + 3, // 0: TW.TheOpenNetwork.Proto.Transfer.jetton_transfer:type_name -> TW.TheOpenNetwork.Proto.JettonTransfer + 2, // 1: TW.TheOpenNetwork.Proto.SigningInput.messages:type_name -> TW.TheOpenNetwork.Proto.Transfer + 0, // 2: TW.TheOpenNetwork.Proto.SigningInput.wallet_version:type_name -> TW.TheOpenNetwork.Proto.WalletVersion + 6, // 3: TW.TheOpenNetwork.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_TheOpenNetwork_proto_init() } +func file_TheOpenNetwork_proto_init() { + if File_TheOpenNetwork_proto != nil { + return + } + file_TheOpenNetwork_proto_msgTypes[0].OneofWrappers = []any{ + (*Transfer_JettonTransfer)(nil), + (*Transfer_CustomPayload)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_TheOpenNetwork_proto_rawDesc), len(file_TheOpenNetwork_proto_rawDesc)), + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_TheOpenNetwork_proto_goTypes, + DependencyIndexes: file_TheOpenNetwork_proto_depIdxs, + EnumInfos: file_TheOpenNetwork_proto_enumTypes, + MessageInfos: file_TheOpenNetwork_proto_msgTypes, + }.Build() + File_TheOpenNetwork_proto = out.File + file_TheOpenNetwork_proto_goTypes = nil + file_TheOpenNetwork_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/theta/Theta.pb.go b/wrapper/go-wrapper/protos/theta/Theta.pb.go new file mode 100644 index 00000000000..dabfc551815 --- /dev/null +++ b/wrapper/go-wrapper/protos/theta/Theta.pb.go @@ -0,0 +1,280 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Theta.proto + +package theta + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// / Input data necessary to create a signed transaction +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Chain ID string, mainnet, testnet and privatenet + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // / Recipient address + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // / Theta token amount to send in wei (uint256, serialized big endian) + ThetaAmount []byte `protobuf:"bytes,3,opt,name=theta_amount,json=thetaAmount,proto3" json:"theta_amount,omitempty"` + // / TFuel token amount to send in wei (uint256, serialized big endian) + TfuelAmount []byte `protobuf:"bytes,4,opt,name=tfuel_amount,json=tfuelAmount,proto3" json:"tfuel_amount,omitempty"` + // / Sequence number of the transaction for the sender address + Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` + // / Fee amount in TFuel wei for the transaction (uint256, serialized big endian) + Fee []byte `protobuf:"bytes,6,opt,name=fee,proto3" json:"fee,omitempty"` + // / The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,7,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // / Public key + PublicKey []byte `protobuf:"bytes,8,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Theta_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Theta_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Theta_proto_rawDescGZIP(), []int{0} +} + +func (x *SigningInput) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *SigningInput) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *SigningInput) GetThetaAmount() []byte { + if x != nil { + return x.ThetaAmount + } + return nil +} + +func (x *SigningInput) GetTfuelAmount() []byte { + if x != nil { + return x.TfuelAmount + } + return nil +} + +func (x *SigningInput) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *SigningInput) GetFee() []byte { + if x != nil { + return x.Fee + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Signed and encoded transaction bytes + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // / Signature + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Theta_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Theta_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Theta_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_Theta_proto protoreflect.FileDescriptor + +const file_Theta_proto_rawDesc = "" + + "\n" + + "\vTheta.proto\x12\x0eTW.Theta.Proto\x1a\fCommon.proto\"\xfc\x01\n" + + "\fSigningInput\x12\x19\n" + + "\bchain_id\x18\x01 \x01(\tR\achainId\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12!\n" + + "\ftheta_amount\x18\x03 \x01(\fR\vthetaAmount\x12!\n" + + "\ftfuel_amount\x18\x04 \x01(\fR\vtfuelAmount\x12\x1a\n" + + "\bsequence\x18\x05 \x01(\x04R\bsequence\x12\x10\n" + + "\x03fee\x18\x06 \x01(\fR\x03fee\x12\x1f\n" + + "\vprivate_key\x18\a \x01(\fR\n" + + "privateKey\x12\x1d\n" + + "\n" + + "public_key\x18\b \x01(\fR\tpublicKey\"\xa1\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Theta_proto_rawDescOnce sync.Once + file_Theta_proto_rawDescData []byte +) + +func file_Theta_proto_rawDescGZIP() []byte { + file_Theta_proto_rawDescOnce.Do(func() { + file_Theta_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Theta_proto_rawDesc), len(file_Theta_proto_rawDesc))) + }) + return file_Theta_proto_rawDescData +} + +var file_Theta_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Theta_proto_goTypes = []any{ + (*SigningInput)(nil), // 0: TW.Theta.Proto.SigningInput + (*SigningOutput)(nil), // 1: TW.Theta.Proto.SigningOutput + (common.SigningError)(0), // 2: TW.Common.Proto.SigningError +} +var file_Theta_proto_depIdxs = []int32{ + 2, // 0: TW.Theta.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_Theta_proto_init() } +func file_Theta_proto_init() { + if File_Theta_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Theta_proto_rawDesc), len(file_Theta_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Theta_proto_goTypes, + DependencyIndexes: file_Theta_proto_depIdxs, + MessageInfos: file_Theta_proto_msgTypes, + }.Build() + File_Theta_proto = out.File + file_Theta_proto_goTypes = nil + file_Theta_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/transactioncompiler/TransactionCompiler.pb.go b/wrapper/go-wrapper/protos/transactioncompiler/TransactionCompiler.pb.go new file mode 100644 index 00000000000..4ff85c917f3 --- /dev/null +++ b/wrapper/go-wrapper/protos/transactioncompiler/TransactionCompiler.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: TransactionCompiler.proto + +package transactioncompiler + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// / Transaction pre-signing output +type PreSigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Pre-image data hash that will be used for signing + DataHash []byte `protobuf:"bytes,1,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"` + // / Pre-image data + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // / error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // / error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PreSigningOutput) Reset() { + *x = PreSigningOutput{} + mi := &file_TransactionCompiler_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PreSigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreSigningOutput) ProtoMessage() {} + +func (x *PreSigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_TransactionCompiler_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreSigningOutput.ProtoReflect.Descriptor instead. +func (*PreSigningOutput) Descriptor() ([]byte, []int) { + return file_TransactionCompiler_proto_rawDescGZIP(), []int{0} +} + +func (x *PreSigningOutput) GetDataHash() []byte { + if x != nil { + return x.DataHash + } + return nil +} + +func (x *PreSigningOutput) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *PreSigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *PreSigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_TransactionCompiler_proto protoreflect.FileDescriptor + +const file_TransactionCompiler_proto_rawDesc = "" + + "\n" + + "\x19TransactionCompiler.proto\x12\x13TW.TxCompiler.Proto\x1a\fCommon.proto\"\x9d\x01\n" + + "\x10PreSigningOutput\x12\x1b\n" + + "\tdata_hash\x18\x01 \x01(\fR\bdataHash\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_TransactionCompiler_proto_rawDescOnce sync.Once + file_TransactionCompiler_proto_rawDescData []byte +) + +func file_TransactionCompiler_proto_rawDescGZIP() []byte { + file_TransactionCompiler_proto_rawDescOnce.Do(func() { + file_TransactionCompiler_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_TransactionCompiler_proto_rawDesc), len(file_TransactionCompiler_proto_rawDesc))) + }) + return file_TransactionCompiler_proto_rawDescData +} + +var file_TransactionCompiler_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_TransactionCompiler_proto_goTypes = []any{ + (*PreSigningOutput)(nil), // 0: TW.TxCompiler.Proto.PreSigningOutput + (common.SigningError)(0), // 1: TW.Common.Proto.SigningError +} +var file_TransactionCompiler_proto_depIdxs = []int32{ + 1, // 0: TW.TxCompiler.Proto.PreSigningOutput.error:type_name -> TW.Common.Proto.SigningError + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_TransactionCompiler_proto_init() } +func file_TransactionCompiler_proto_init() { + if File_TransactionCompiler_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_TransactionCompiler_proto_rawDesc), len(file_TransactionCompiler_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_TransactionCompiler_proto_goTypes, + DependencyIndexes: file_TransactionCompiler_proto_depIdxs, + MessageInfos: file_TransactionCompiler_proto_msgTypes, + }.Build() + File_TransactionCompiler_proto = out.File + file_TransactionCompiler_proto_goTypes = nil + file_TransactionCompiler_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/tron/Tron.pb.go b/wrapper/go-wrapper/protos/tron/Tron.pb.go new file mode 100644 index 00000000000..cc001675294 --- /dev/null +++ b/wrapper/go-wrapper/protos/tron/Tron.pb.go @@ -0,0 +1,1907 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Tron.proto + +package tron + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A transfer transaction +type TransferContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address. + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Recipient address. + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to send. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferContract) Reset() { + *x = TransferContract{} + mi := &file_Tron_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferContract) ProtoMessage() {} + +func (x *TransferContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferContract.ProtoReflect.Descriptor instead. +func (*TransferContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{0} +} + +func (x *TransferContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *TransferContract) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransferContract) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Asset transfer +type TransferAssetContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Asset name. + AssetName string `protobuf:"bytes,1,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"` + // Sender address. + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Recipient address. + ToAddress string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to send. + Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferAssetContract) Reset() { + *x = TransferAssetContract{} + mi := &file_Tron_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferAssetContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferAssetContract) ProtoMessage() {} + +func (x *TransferAssetContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferAssetContract.ProtoReflect.Descriptor instead. +func (*TransferAssetContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{1} +} + +func (x *TransferAssetContract) GetAssetName() string { + if x != nil { + return x.AssetName + } + return "" +} + +func (x *TransferAssetContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *TransferAssetContract) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransferAssetContract) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// TRC20 token transfer +type TransferTRC20Contract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Contract name. + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // Sender address. + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Recipient address. + ToAddress string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + // Amount to send, (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferTRC20Contract) Reset() { + *x = TransferTRC20Contract{} + mi := &file_Tron_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferTRC20Contract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferTRC20Contract) ProtoMessage() {} + +func (x *TransferTRC20Contract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferTRC20Contract.ProtoReflect.Descriptor instead. +func (*TransferTRC20Contract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{2} +} + +func (x *TransferTRC20Contract) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *TransferTRC20Contract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *TransferTRC20Contract) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *TransferTRC20Contract) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// Freeze balance +type FreezeBalanceContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address. + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Frozen balance. Minimum 1 + FrozenBalance int64 `protobuf:"varint,2,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"` + // Frozen duration + FrozenDuration int64 `protobuf:"varint,3,opt,name=frozen_duration,json=frozenDuration,proto3" json:"frozen_duration,omitempty"` + // Resource type: BANDWIDTH | ENERGY + Resource string `protobuf:"bytes,10,opt,name=resource,proto3" json:"resource,omitempty"` + // Receiver address + ReceiverAddress string `protobuf:"bytes,15,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FreezeBalanceContract) Reset() { + *x = FreezeBalanceContract{} + mi := &file_Tron_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FreezeBalanceContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FreezeBalanceContract) ProtoMessage() {} + +func (x *FreezeBalanceContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FreezeBalanceContract.ProtoReflect.Descriptor instead. +func (*FreezeBalanceContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{3} +} + +func (x *FreezeBalanceContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *FreezeBalanceContract) GetFrozenBalance() int64 { + if x != nil { + return x.FrozenBalance + } + return 0 +} + +func (x *FreezeBalanceContract) GetFrozenDuration() int64 { + if x != nil { + return x.FrozenDuration + } + return 0 +} + +func (x *FreezeBalanceContract) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *FreezeBalanceContract) GetReceiverAddress() string { + if x != nil { + return x.ReceiverAddress + } + return "" +} + +// stake TRX to obtain TRON Power (voting rights) and bandwidth or energy. +type FreezeBalanceV2Contract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of transaction initiator, data type is string + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Amount of TRX to be staked, unit is sun, data type is uint256 + FrozenBalance int64 `protobuf:"varint,2,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"` + // Resource type, "BANDWIDTH" or "ENERGY", data type is string + Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FreezeBalanceV2Contract) Reset() { + *x = FreezeBalanceV2Contract{} + mi := &file_Tron_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FreezeBalanceV2Contract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FreezeBalanceV2Contract) ProtoMessage() {} + +func (x *FreezeBalanceV2Contract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FreezeBalanceV2Contract.ProtoReflect.Descriptor instead. +func (*FreezeBalanceV2Contract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{4} +} + +func (x *FreezeBalanceV2Contract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *FreezeBalanceV2Contract) GetFrozenBalance() int64 { + if x != nil { + return x.FrozenBalance + } + return 0 +} + +func (x *FreezeBalanceV2Contract) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +// Unstake TRX to release bandwidth and energy and at the same time TRON Power will be reduced and all corresponding votes will be canceled. +type UnfreezeBalanceV2Contract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of transaction initiator, data type is string + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Amount of TRX to be unstaked, unit is sun, data type is uint256 + UnfreezeBalance int64 `protobuf:"varint,2,opt,name=unfreeze_balance,json=unfreezeBalance,proto3" json:"unfreeze_balance,omitempty"` + // Resource type, "BANDWIDTH" or "ENERGY", data type is string + Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnfreezeBalanceV2Contract) Reset() { + *x = UnfreezeBalanceV2Contract{} + mi := &file_Tron_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnfreezeBalanceV2Contract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnfreezeBalanceV2Contract) ProtoMessage() {} + +func (x *UnfreezeBalanceV2Contract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnfreezeBalanceV2Contract.ProtoReflect.Descriptor instead. +func (*UnfreezeBalanceV2Contract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{5} +} + +func (x *UnfreezeBalanceV2Contract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *UnfreezeBalanceV2Contract) GetUnfreezeBalance() int64 { + if x != nil { + return x.UnfreezeBalance + } + return 0 +} + +func (x *UnfreezeBalanceV2Contract) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +// withdraw unfrozen balance +type WithdrawExpireUnfreezeContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of transaction initiator, data type is string + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WithdrawExpireUnfreezeContract) Reset() { + *x = WithdrawExpireUnfreezeContract{} + mi := &file_Tron_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WithdrawExpireUnfreezeContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawExpireUnfreezeContract) ProtoMessage() {} + +func (x *WithdrawExpireUnfreezeContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawExpireUnfreezeContract.ProtoReflect.Descriptor instead. +func (*WithdrawExpireUnfreezeContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{6} +} + +func (x *WithdrawExpireUnfreezeContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +// delegate resource +type DelegateResourceContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of transaction initiator, data type is string + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Resource type, "BANDWIDTH" or "ENERGY", data type is string + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + // Amount of TRX staked for resource to be delegated, unit is sun, data type is uint256 + Balance int64 `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"` + // Receiver address of resource to be delegated to + ReceiverAddress string `protobuf:"bytes,4,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` + // Whether it is locked, if it is set to true, the delegated resources cannot be undelegated within 3 days. + // When the lock time is not over, if the owner delegates the same resources using the lock to the same address, + // the lock time will be reset to 3 days + Lock bool `protobuf:"varint,5,opt,name=lock,proto3" json:"lock,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DelegateResourceContract) Reset() { + *x = DelegateResourceContract{} + mi := &file_Tron_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DelegateResourceContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelegateResourceContract) ProtoMessage() {} + +func (x *DelegateResourceContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DelegateResourceContract.ProtoReflect.Descriptor instead. +func (*DelegateResourceContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{7} +} + +func (x *DelegateResourceContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *DelegateResourceContract) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *DelegateResourceContract) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *DelegateResourceContract) GetReceiverAddress() string { + if x != nil { + return x.ReceiverAddress + } + return "" +} + +func (x *DelegateResourceContract) GetLock() bool { + if x != nil { + return x.Lock + } + return false +} + +// undelegate resource +type UnDelegateResourceContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Address of transaction initiator, data type is string + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Resource type, "BANDWIDTH" or "ENERGY", data type is string + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + // Amount of TRX staked for resource to be undelegated, unit is sun, data type is uint256 + Balance int64 `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"` + // Receiver address of resource to be delegated to, data type is string + ReceiverAddress string `protobuf:"bytes,4,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnDelegateResourceContract) Reset() { + *x = UnDelegateResourceContract{} + mi := &file_Tron_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnDelegateResourceContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnDelegateResourceContract) ProtoMessage() {} + +func (x *UnDelegateResourceContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnDelegateResourceContract.ProtoReflect.Descriptor instead. +func (*UnDelegateResourceContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{8} +} + +func (x *UnDelegateResourceContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *UnDelegateResourceContract) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *UnDelegateResourceContract) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *UnDelegateResourceContract) GetReceiverAddress() string { + if x != nil { + return x.ReceiverAddress + } + return "" +} + +// Unfreeze balance +type UnfreezeBalanceContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Resource type: BANDWIDTH | ENERGY + Resource string `protobuf:"bytes,10,opt,name=resource,proto3" json:"resource,omitempty"` + // Receiver address + ReceiverAddress string `protobuf:"bytes,15,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnfreezeBalanceContract) Reset() { + *x = UnfreezeBalanceContract{} + mi := &file_Tron_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnfreezeBalanceContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnfreezeBalanceContract) ProtoMessage() {} + +func (x *UnfreezeBalanceContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnfreezeBalanceContract.ProtoReflect.Descriptor instead. +func (*UnfreezeBalanceContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{9} +} + +func (x *UnfreezeBalanceContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *UnfreezeBalanceContract) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *UnfreezeBalanceContract) GetReceiverAddress() string { + if x != nil { + return x.ReceiverAddress + } + return "" +} + +// Unfreeze asset +type UnfreezeAssetContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnfreezeAssetContract) Reset() { + *x = UnfreezeAssetContract{} + mi := &file_Tron_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnfreezeAssetContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnfreezeAssetContract) ProtoMessage() {} + +func (x *UnfreezeAssetContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnfreezeAssetContract.ProtoReflect.Descriptor instead. +func (*UnfreezeAssetContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{10} +} + +func (x *UnfreezeAssetContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +// Vote asset +type VoteAssetContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Vote addresses + VoteAddress []string `protobuf:"bytes,2,rep,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty"` + Support bool `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty"` + Count int32 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VoteAssetContract) Reset() { + *x = VoteAssetContract{} + mi := &file_Tron_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VoteAssetContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VoteAssetContract) ProtoMessage() {} + +func (x *VoteAssetContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VoteAssetContract.ProtoReflect.Descriptor instead. +func (*VoteAssetContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{11} +} + +func (x *VoteAssetContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *VoteAssetContract) GetVoteAddress() []string { + if x != nil { + return x.VoteAddress + } + return nil +} + +func (x *VoteAssetContract) GetSupport() bool { + if x != nil { + return x.Support + } + return false +} + +func (x *VoteAssetContract) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +// Vote witness +type VoteWitnessContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Owner + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // The votes + Votes []*VoteWitnessContract_Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` + Support bool `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VoteWitnessContract) Reset() { + *x = VoteWitnessContract{} + mi := &file_Tron_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VoteWitnessContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VoteWitnessContract) ProtoMessage() {} + +func (x *VoteWitnessContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VoteWitnessContract.ProtoReflect.Descriptor instead. +func (*VoteWitnessContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{12} +} + +func (x *VoteWitnessContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *VoteWitnessContract) GetVotes() []*VoteWitnessContract_Vote { + if x != nil { + return x.Votes + } + return nil +} + +func (x *VoteWitnessContract) GetSupport() bool { + if x != nil { + return x.Support + } + return false +} + +// Withdraw balance +type WithdrawBalanceContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sender address + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WithdrawBalanceContract) Reset() { + *x = WithdrawBalanceContract{} + mi := &file_Tron_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WithdrawBalanceContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawBalanceContract) ProtoMessage() {} + +func (x *WithdrawBalanceContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawBalanceContract.ProtoReflect.Descriptor instead. +func (*WithdrawBalanceContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{13} +} + +func (x *WithdrawBalanceContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +// Smart contract call +type TriggerSmartContract struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Owner + OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` + // Contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // amount + CallValue int64 `protobuf:"varint,3,opt,name=call_value,json=callValue,proto3" json:"call_value,omitempty"` + // call data + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + // token value + CallTokenValue int64 `protobuf:"varint,5,opt,name=call_token_value,json=callTokenValue,proto3" json:"call_token_value,omitempty"` + // ID of the token + TokenId int64 `protobuf:"varint,6,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TriggerSmartContract) Reset() { + *x = TriggerSmartContract{} + mi := &file_Tron_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TriggerSmartContract) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TriggerSmartContract) ProtoMessage() {} + +func (x *TriggerSmartContract) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TriggerSmartContract.ProtoReflect.Descriptor instead. +func (*TriggerSmartContract) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{14} +} + +func (x *TriggerSmartContract) GetOwnerAddress() string { + if x != nil { + return x.OwnerAddress + } + return "" +} + +func (x *TriggerSmartContract) GetContractAddress() string { + if x != nil { + return x.ContractAddress + } + return "" +} + +func (x *TriggerSmartContract) GetCallValue() int64 { + if x != nil { + return x.CallValue + } + return 0 +} + +func (x *TriggerSmartContract) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *TriggerSmartContract) GetCallTokenValue() int64 { + if x != nil { + return x.CallTokenValue + } + return 0 +} + +func (x *TriggerSmartContract) GetTokenId() int64 { + if x != nil { + return x.TokenId + } + return 0 +} + +// Info from block header +type BlockHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + // creation timestamp + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // root + TxTrieRoot []byte `protobuf:"bytes,2,opt,name=tx_trie_root,json=txTrieRoot,proto3" json:"tx_trie_root,omitempty"` + // hash of the parent + ParentHash []byte `protobuf:"bytes,3,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` + Number int64 `protobuf:"varint,7,opt,name=number,proto3" json:"number,omitempty"` + WitnessAddress []byte `protobuf:"bytes,9,opt,name=witness_address,json=witnessAddress,proto3" json:"witness_address,omitempty"` + Version int32 `protobuf:"varint,10,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BlockHeader) Reset() { + *x = BlockHeader{} + mi := &file_Tron_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BlockHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockHeader) ProtoMessage() {} + +func (x *BlockHeader) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead. +func (*BlockHeader) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{15} +} + +func (x *BlockHeader) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *BlockHeader) GetTxTrieRoot() []byte { + if x != nil { + return x.TxTrieRoot + } + return nil +} + +func (x *BlockHeader) GetParentHash() []byte { + if x != nil { + return x.ParentHash + } + return nil +} + +func (x *BlockHeader) GetNumber() int64 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *BlockHeader) GetWitnessAddress() []byte { + if x != nil { + return x.WitnessAddress + } + return nil +} + +func (x *BlockHeader) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +// Transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction timestamp in milliseconds. + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Transaction expiration time in milliseconds. + Expiration int64 `protobuf:"varint,2,opt,name=expiration,proto3" json:"expiration,omitempty"` + // Transaction block header. + BlockHeader *BlockHeader `protobuf:"bytes,3,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"` + // Transaction fee limit. + FeeLimit int64 `protobuf:"varint,4,opt,name=fee_limit,json=feeLimit,proto3" json:"fee_limit,omitempty"` + // Transaction memo. + Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` + // Contract. + // + // Types that are valid to be assigned to ContractOneof: + // + // *Transaction_Transfer + // *Transaction_TransferAsset + // *Transaction_FreezeBalance + // *Transaction_UnfreezeBalance + // *Transaction_UnfreezeAsset + // *Transaction_WithdrawBalance + // *Transaction_VoteAsset + // *Transaction_VoteWitness + // *Transaction_TriggerSmartContract + // *Transaction_TransferTrc20Contract + // *Transaction_FreezeBalanceV2 + // *Transaction_UnfreezeBalanceV2 + // *Transaction_WithdrawExpireUnfreeze + // *Transaction_DelegateResource + // *Transaction_UndelegateResource + ContractOneof isTransaction_ContractOneof `protobuf_oneof:"contract_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Tron_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{16} +} + +func (x *Transaction) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Transaction) GetExpiration() int64 { + if x != nil { + return x.Expiration + } + return 0 +} + +func (x *Transaction) GetBlockHeader() *BlockHeader { + if x != nil { + return x.BlockHeader + } + return nil +} + +func (x *Transaction) GetFeeLimit() int64 { + if x != nil { + return x.FeeLimit + } + return 0 +} + +func (x *Transaction) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *Transaction) GetContractOneof() isTransaction_ContractOneof { + if x != nil { + return x.ContractOneof + } + return nil +} + +func (x *Transaction) GetTransfer() *TransferContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_Transfer); ok { + return x.Transfer + } + } + return nil +} + +func (x *Transaction) GetTransferAsset() *TransferAssetContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_TransferAsset); ok { + return x.TransferAsset + } + } + return nil +} + +func (x *Transaction) GetFreezeBalance() *FreezeBalanceContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_FreezeBalance); ok { + return x.FreezeBalance + } + } + return nil +} + +func (x *Transaction) GetUnfreezeBalance() *UnfreezeBalanceContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_UnfreezeBalance); ok { + return x.UnfreezeBalance + } + } + return nil +} + +func (x *Transaction) GetUnfreezeAsset() *UnfreezeAssetContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_UnfreezeAsset); ok { + return x.UnfreezeAsset + } + } + return nil +} + +func (x *Transaction) GetWithdrawBalance() *WithdrawBalanceContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_WithdrawBalance); ok { + return x.WithdrawBalance + } + } + return nil +} + +func (x *Transaction) GetVoteAsset() *VoteAssetContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_VoteAsset); ok { + return x.VoteAsset + } + } + return nil +} + +func (x *Transaction) GetVoteWitness() *VoteWitnessContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_VoteWitness); ok { + return x.VoteWitness + } + } + return nil +} + +func (x *Transaction) GetTriggerSmartContract() *TriggerSmartContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_TriggerSmartContract); ok { + return x.TriggerSmartContract + } + } + return nil +} + +func (x *Transaction) GetTransferTrc20Contract() *TransferTRC20Contract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_TransferTrc20Contract); ok { + return x.TransferTrc20Contract + } + } + return nil +} + +func (x *Transaction) GetFreezeBalanceV2() *FreezeBalanceV2Contract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_FreezeBalanceV2); ok { + return x.FreezeBalanceV2 + } + } + return nil +} + +func (x *Transaction) GetUnfreezeBalanceV2() *UnfreezeBalanceV2Contract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_UnfreezeBalanceV2); ok { + return x.UnfreezeBalanceV2 + } + } + return nil +} + +func (x *Transaction) GetWithdrawExpireUnfreeze() *WithdrawExpireUnfreezeContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_WithdrawExpireUnfreeze); ok { + return x.WithdrawExpireUnfreeze + } + } + return nil +} + +func (x *Transaction) GetDelegateResource() *DelegateResourceContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_DelegateResource); ok { + return x.DelegateResource + } + } + return nil +} + +func (x *Transaction) GetUndelegateResource() *UnDelegateResourceContract { + if x != nil { + if x, ok := x.ContractOneof.(*Transaction_UndelegateResource); ok { + return x.UndelegateResource + } + } + return nil +} + +type isTransaction_ContractOneof interface { + isTransaction_ContractOneof() +} + +type Transaction_Transfer struct { + Transfer *TransferContract `protobuf:"bytes,10,opt,name=transfer,proto3,oneof"` +} + +type Transaction_TransferAsset struct { + TransferAsset *TransferAssetContract `protobuf:"bytes,11,opt,name=transfer_asset,json=transferAsset,proto3,oneof"` +} + +type Transaction_FreezeBalance struct { + FreezeBalance *FreezeBalanceContract `protobuf:"bytes,12,opt,name=freeze_balance,json=freezeBalance,proto3,oneof"` +} + +type Transaction_UnfreezeBalance struct { + UnfreezeBalance *UnfreezeBalanceContract `protobuf:"bytes,13,opt,name=unfreeze_balance,json=unfreezeBalance,proto3,oneof"` +} + +type Transaction_UnfreezeAsset struct { + UnfreezeAsset *UnfreezeAssetContract `protobuf:"bytes,14,opt,name=unfreeze_asset,json=unfreezeAsset,proto3,oneof"` +} + +type Transaction_WithdrawBalance struct { + WithdrawBalance *WithdrawBalanceContract `protobuf:"bytes,15,opt,name=withdraw_balance,json=withdrawBalance,proto3,oneof"` +} + +type Transaction_VoteAsset struct { + VoteAsset *VoteAssetContract `protobuf:"bytes,16,opt,name=vote_asset,json=voteAsset,proto3,oneof"` +} + +type Transaction_VoteWitness struct { + VoteWitness *VoteWitnessContract `protobuf:"bytes,17,opt,name=vote_witness,json=voteWitness,proto3,oneof"` +} + +type Transaction_TriggerSmartContract struct { + TriggerSmartContract *TriggerSmartContract `protobuf:"bytes,18,opt,name=trigger_smart_contract,json=triggerSmartContract,proto3,oneof"` +} + +type Transaction_TransferTrc20Contract struct { + TransferTrc20Contract *TransferTRC20Contract `protobuf:"bytes,19,opt,name=transfer_trc20_contract,json=transferTrc20Contract,proto3,oneof"` +} + +type Transaction_FreezeBalanceV2 struct { + FreezeBalanceV2 *FreezeBalanceV2Contract `protobuf:"bytes,20,opt,name=freeze_balance_v2,json=freezeBalanceV2,proto3,oneof"` +} + +type Transaction_UnfreezeBalanceV2 struct { + UnfreezeBalanceV2 *UnfreezeBalanceV2Contract `protobuf:"bytes,21,opt,name=unfreeze_balance_v2,json=unfreezeBalanceV2,proto3,oneof"` +} + +type Transaction_WithdrawExpireUnfreeze struct { + WithdrawExpireUnfreeze *WithdrawExpireUnfreezeContract `protobuf:"bytes,23,opt,name=withdraw_expire_unfreeze,json=withdrawExpireUnfreeze,proto3,oneof"` +} + +type Transaction_DelegateResource struct { + DelegateResource *DelegateResourceContract `protobuf:"bytes,24,opt,name=delegate_resource,json=delegateResource,proto3,oneof"` +} + +type Transaction_UndelegateResource struct { + UndelegateResource *UnDelegateResourceContract `protobuf:"bytes,25,opt,name=undelegate_resource,json=undelegateResource,proto3,oneof"` +} + +func (*Transaction_Transfer) isTransaction_ContractOneof() {} + +func (*Transaction_TransferAsset) isTransaction_ContractOneof() {} + +func (*Transaction_FreezeBalance) isTransaction_ContractOneof() {} + +func (*Transaction_UnfreezeBalance) isTransaction_ContractOneof() {} + +func (*Transaction_UnfreezeAsset) isTransaction_ContractOneof() {} + +func (*Transaction_WithdrawBalance) isTransaction_ContractOneof() {} + +func (*Transaction_VoteAsset) isTransaction_ContractOneof() {} + +func (*Transaction_VoteWitness) isTransaction_ContractOneof() {} + +func (*Transaction_TriggerSmartContract) isTransaction_ContractOneof() {} + +func (*Transaction_TransferTrc20Contract) isTransaction_ContractOneof() {} + +func (*Transaction_FreezeBalanceV2) isTransaction_ContractOneof() {} + +func (*Transaction_UnfreezeBalanceV2) isTransaction_ContractOneof() {} + +func (*Transaction_WithdrawExpireUnfreeze) isTransaction_ContractOneof() {} + +func (*Transaction_DelegateResource) isTransaction_ContractOneof() {} + +func (*Transaction_UndelegateResource) isTransaction_ContractOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction. + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // For direct sign in Tron, we just have to sign the txId returned by the DApp json payload. + TxId string `protobuf:"bytes,3,opt,name=txId,proto3" json:"txId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Tron_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{17} +} + +func (x *SigningInput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTxId() string { + if x != nil { + return x.TxId + } + return "" +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction identifier. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Signature. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + RefBlockBytes []byte `protobuf:"bytes,3,opt,name=ref_block_bytes,json=refBlockBytes,proto3" json:"ref_block_bytes,omitempty"` + RefBlockHash []byte `protobuf:"bytes,4,opt,name=ref_block_hash,json=refBlockHash,proto3" json:"ref_block_hash,omitempty"` + // Result in JSON + Json string `protobuf:"bytes,5,opt,name=json,proto3" json:"json,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,6,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,7,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Tron_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{18} +} + +func (x *SigningOutput) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetRefBlockBytes() []byte { + if x != nil { + return x.RefBlockBytes + } + return nil +} + +func (x *SigningOutput) GetRefBlockHash() []byte { + if x != nil { + return x.RefBlockHash + } + return nil +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// A vote +type VoteWitnessContract_Vote struct { + state protoimpl.MessageState `protogen:"open.v1"` + // address + VoteAddress string `protobuf:"bytes,1,opt,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty"` + // vote count + VoteCount int64 `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VoteWitnessContract_Vote) Reset() { + *x = VoteWitnessContract_Vote{} + mi := &file_Tron_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VoteWitnessContract_Vote) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VoteWitnessContract_Vote) ProtoMessage() {} + +func (x *VoteWitnessContract_Vote) ProtoReflect() protoreflect.Message { + mi := &file_Tron_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VoteWitnessContract_Vote.ProtoReflect.Descriptor instead. +func (*VoteWitnessContract_Vote) Descriptor() ([]byte, []int) { + return file_Tron_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *VoteWitnessContract_Vote) GetVoteAddress() string { + if x != nil { + return x.VoteAddress + } + return "" +} + +func (x *VoteWitnessContract_Vote) GetVoteCount() int64 { + if x != nil { + return x.VoteCount + } + return 0 +} + +var File_Tron_proto protoreflect.FileDescriptor + +const file_Tron_proto_rawDesc = "" + + "\n" + + "\n" + + "Tron.proto\x12\rTW.Tron.Proto\x1a\fCommon.proto\"n\n" + + "\x10TransferContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x03 \x01(\x03R\x06amount\"\x92\x01\n" + + "\x15TransferAssetContract\x12\x1d\n" + + "\n" + + "asset_name\x18\x01 \x01(\tR\tassetName\x12#\n" + + "\rowner_address\x18\x02 \x01(\tR\fownerAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x03 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x04 \x01(\x03R\x06amount\"\x9e\x01\n" + + "\x15TransferTRC20Contract\x12)\n" + + "\x10contract_address\x18\x01 \x01(\tR\x0fcontractAddress\x12#\n" + + "\rowner_address\x18\x02 \x01(\tR\fownerAddress\x12\x1d\n" + + "\n" + + "to_address\x18\x03 \x01(\tR\ttoAddress\x12\x16\n" + + "\x06amount\x18\x04 \x01(\fR\x06amount\"\xd3\x01\n" + + "\x15FreezeBalanceContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12%\n" + + "\x0efrozen_balance\x18\x02 \x01(\x03R\rfrozenBalance\x12'\n" + + "\x0ffrozen_duration\x18\x03 \x01(\x03R\x0efrozenDuration\x12\x1a\n" + + "\bresource\x18\n" + + " \x01(\tR\bresource\x12)\n" + + "\x10receiver_address\x18\x0f \x01(\tR\x0freceiverAddress\"\x81\x01\n" + + "\x17FreezeBalanceV2Contract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12%\n" + + "\x0efrozen_balance\x18\x02 \x01(\x03R\rfrozenBalance\x12\x1a\n" + + "\bresource\x18\x03 \x01(\tR\bresource\"\x87\x01\n" + + "\x19UnfreezeBalanceV2Contract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12)\n" + + "\x10unfreeze_balance\x18\x02 \x01(\x03R\x0funfreezeBalance\x12\x1a\n" + + "\bresource\x18\x03 \x01(\tR\bresource\"E\n" + + "\x1eWithdrawExpireUnfreezeContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\"\xb4\x01\n" + + "\x18DelegateResourceContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12\x1a\n" + + "\bresource\x18\x02 \x01(\tR\bresource\x12\x18\n" + + "\abalance\x18\x03 \x01(\x03R\abalance\x12)\n" + + "\x10receiver_address\x18\x04 \x01(\tR\x0freceiverAddress\x12\x12\n" + + "\x04lock\x18\x05 \x01(\bR\x04lock\"\xa2\x01\n" + + "\x1aUnDelegateResourceContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12\x1a\n" + + "\bresource\x18\x02 \x01(\tR\bresource\x12\x18\n" + + "\abalance\x18\x03 \x01(\x03R\abalance\x12)\n" + + "\x10receiver_address\x18\x04 \x01(\tR\x0freceiverAddress\"\x85\x01\n" + + "\x17UnfreezeBalanceContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12\x1a\n" + + "\bresource\x18\n" + + " \x01(\tR\bresource\x12)\n" + + "\x10receiver_address\x18\x0f \x01(\tR\x0freceiverAddress\"<\n" + + "\x15UnfreezeAssetContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\"\x8b\x01\n" + + "\x11VoteAssetContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12!\n" + + "\fvote_address\x18\x02 \x03(\tR\vvoteAddress\x12\x18\n" + + "\asupport\x18\x03 \x01(\bR\asupport\x12\x14\n" + + "\x05count\x18\x05 \x01(\x05R\x05count\"\xdd\x01\n" + + "\x13VoteWitnessContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12=\n" + + "\x05votes\x18\x02 \x03(\v2'.TW.Tron.Proto.VoteWitnessContract.VoteR\x05votes\x12\x18\n" + + "\asupport\x18\x03 \x01(\bR\asupport\x1aH\n" + + "\x04Vote\x12!\n" + + "\fvote_address\x18\x01 \x01(\tR\vvoteAddress\x12\x1d\n" + + "\n" + + "vote_count\x18\x02 \x01(\x03R\tvoteCount\">\n" + + "\x17WithdrawBalanceContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\"\xde\x01\n" + + "\x14TriggerSmartContract\x12#\n" + + "\rowner_address\x18\x01 \x01(\tR\fownerAddress\x12)\n" + + "\x10contract_address\x18\x02 \x01(\tR\x0fcontractAddress\x12\x1d\n" + + "\n" + + "call_value\x18\x03 \x01(\x03R\tcallValue\x12\x12\n" + + "\x04data\x18\x04 \x01(\fR\x04data\x12(\n" + + "\x10call_token_value\x18\x05 \x01(\x03R\x0ecallTokenValue\x12\x19\n" + + "\btoken_id\x18\x06 \x01(\x03R\atokenId\"\xc9\x01\n" + + "\vBlockHeader\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12 \n" + + "\ftx_trie_root\x18\x02 \x01(\fR\n" + + "txTrieRoot\x12\x1f\n" + + "\vparent_hash\x18\x03 \x01(\fR\n" + + "parentHash\x12\x16\n" + + "\x06number\x18\a \x01(\x03R\x06number\x12'\n" + + "\x0fwitness_address\x18\t \x01(\fR\x0ewitnessAddress\x12\x18\n" + + "\aversion\x18\n" + + " \x01(\x05R\aversion\"\xbf\v\n" + + "\vTransaction\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12\x1e\n" + + "\n" + + "expiration\x18\x02 \x01(\x03R\n" + + "expiration\x12=\n" + + "\fblock_header\x18\x03 \x01(\v2\x1a.TW.Tron.Proto.BlockHeaderR\vblockHeader\x12\x1b\n" + + "\tfee_limit\x18\x04 \x01(\x03R\bfeeLimit\x12\x12\n" + + "\x04memo\x18\x05 \x01(\tR\x04memo\x12=\n" + + "\btransfer\x18\n" + + " \x01(\v2\x1f.TW.Tron.Proto.TransferContractH\x00R\btransfer\x12M\n" + + "\x0etransfer_asset\x18\v \x01(\v2$.TW.Tron.Proto.TransferAssetContractH\x00R\rtransferAsset\x12M\n" + + "\x0efreeze_balance\x18\f \x01(\v2$.TW.Tron.Proto.FreezeBalanceContractH\x00R\rfreezeBalance\x12S\n" + + "\x10unfreeze_balance\x18\r \x01(\v2&.TW.Tron.Proto.UnfreezeBalanceContractH\x00R\x0funfreezeBalance\x12M\n" + + "\x0eunfreeze_asset\x18\x0e \x01(\v2$.TW.Tron.Proto.UnfreezeAssetContractH\x00R\runfreezeAsset\x12S\n" + + "\x10withdraw_balance\x18\x0f \x01(\v2&.TW.Tron.Proto.WithdrawBalanceContractH\x00R\x0fwithdrawBalance\x12A\n" + + "\n" + + "vote_asset\x18\x10 \x01(\v2 .TW.Tron.Proto.VoteAssetContractH\x00R\tvoteAsset\x12G\n" + + "\fvote_witness\x18\x11 \x01(\v2\".TW.Tron.Proto.VoteWitnessContractH\x00R\vvoteWitness\x12[\n" + + "\x16trigger_smart_contract\x18\x12 \x01(\v2#.TW.Tron.Proto.TriggerSmartContractH\x00R\x14triggerSmartContract\x12^\n" + + "\x17transfer_trc20_contract\x18\x13 \x01(\v2$.TW.Tron.Proto.TransferTRC20ContractH\x00R\x15transferTrc20Contract\x12T\n" + + "\x11freeze_balance_v2\x18\x14 \x01(\v2&.TW.Tron.Proto.FreezeBalanceV2ContractH\x00R\x0ffreezeBalanceV2\x12Z\n" + + "\x13unfreeze_balance_v2\x18\x15 \x01(\v2(.TW.Tron.Proto.UnfreezeBalanceV2ContractH\x00R\x11unfreezeBalanceV2\x12i\n" + + "\x18withdraw_expire_unfreeze\x18\x17 \x01(\v2-.TW.Tron.Proto.WithdrawExpireUnfreezeContractH\x00R\x16withdrawExpireUnfreeze\x12V\n" + + "\x11delegate_resource\x18\x18 \x01(\v2'.TW.Tron.Proto.DelegateResourceContractH\x00R\x10delegateResource\x12\\\n" + + "\x13undelegate_resource\x18\x19 \x01(\v2).TW.Tron.Proto.UnDelegateResourceContractH\x00R\x12undelegateResourceB\x10\n" + + "\x0econtract_oneof\"\x81\x01\n" + + "\fSigningInput\x12<\n" + + "\vtransaction\x18\x01 \x01(\v2\x1a.TW.Tron.Proto.TransactionR\vtransaction\x12\x1f\n" + + "\vprivate_key\x18\x02 \x01(\fR\n" + + "privateKey\x12\x12\n" + + "\x04txId\x18\x03 \x01(\tR\x04txId\"\xf9\x01\n" + + "\rSigningOutput\x12\x0e\n" + + "\x02id\x18\x01 \x01(\fR\x02id\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x12&\n" + + "\x0fref_block_bytes\x18\x03 \x01(\fR\rrefBlockBytes\x12$\n" + + "\x0eref_block_hash\x18\x04 \x01(\fR\frefBlockHash\x12\x12\n" + + "\x04json\x18\x05 \x01(\tR\x04json\x123\n" + + "\x05error\x18\x06 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\a \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Tron_proto_rawDescOnce sync.Once + file_Tron_proto_rawDescData []byte +) + +func file_Tron_proto_rawDescGZIP() []byte { + file_Tron_proto_rawDescOnce.Do(func() { + file_Tron_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Tron_proto_rawDesc), len(file_Tron_proto_rawDesc))) + }) + return file_Tron_proto_rawDescData +} + +var file_Tron_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_Tron_proto_goTypes = []any{ + (*TransferContract)(nil), // 0: TW.Tron.Proto.TransferContract + (*TransferAssetContract)(nil), // 1: TW.Tron.Proto.TransferAssetContract + (*TransferTRC20Contract)(nil), // 2: TW.Tron.Proto.TransferTRC20Contract + (*FreezeBalanceContract)(nil), // 3: TW.Tron.Proto.FreezeBalanceContract + (*FreezeBalanceV2Contract)(nil), // 4: TW.Tron.Proto.FreezeBalanceV2Contract + (*UnfreezeBalanceV2Contract)(nil), // 5: TW.Tron.Proto.UnfreezeBalanceV2Contract + (*WithdrawExpireUnfreezeContract)(nil), // 6: TW.Tron.Proto.WithdrawExpireUnfreezeContract + (*DelegateResourceContract)(nil), // 7: TW.Tron.Proto.DelegateResourceContract + (*UnDelegateResourceContract)(nil), // 8: TW.Tron.Proto.UnDelegateResourceContract + (*UnfreezeBalanceContract)(nil), // 9: TW.Tron.Proto.UnfreezeBalanceContract + (*UnfreezeAssetContract)(nil), // 10: TW.Tron.Proto.UnfreezeAssetContract + (*VoteAssetContract)(nil), // 11: TW.Tron.Proto.VoteAssetContract + (*VoteWitnessContract)(nil), // 12: TW.Tron.Proto.VoteWitnessContract + (*WithdrawBalanceContract)(nil), // 13: TW.Tron.Proto.WithdrawBalanceContract + (*TriggerSmartContract)(nil), // 14: TW.Tron.Proto.TriggerSmartContract + (*BlockHeader)(nil), // 15: TW.Tron.Proto.BlockHeader + (*Transaction)(nil), // 16: TW.Tron.Proto.Transaction + (*SigningInput)(nil), // 17: TW.Tron.Proto.SigningInput + (*SigningOutput)(nil), // 18: TW.Tron.Proto.SigningOutput + (*VoteWitnessContract_Vote)(nil), // 19: TW.Tron.Proto.VoteWitnessContract.Vote + (common.SigningError)(0), // 20: TW.Common.Proto.SigningError +} +var file_Tron_proto_depIdxs = []int32{ + 19, // 0: TW.Tron.Proto.VoteWitnessContract.votes:type_name -> TW.Tron.Proto.VoteWitnessContract.Vote + 15, // 1: TW.Tron.Proto.Transaction.block_header:type_name -> TW.Tron.Proto.BlockHeader + 0, // 2: TW.Tron.Proto.Transaction.transfer:type_name -> TW.Tron.Proto.TransferContract + 1, // 3: TW.Tron.Proto.Transaction.transfer_asset:type_name -> TW.Tron.Proto.TransferAssetContract + 3, // 4: TW.Tron.Proto.Transaction.freeze_balance:type_name -> TW.Tron.Proto.FreezeBalanceContract + 9, // 5: TW.Tron.Proto.Transaction.unfreeze_balance:type_name -> TW.Tron.Proto.UnfreezeBalanceContract + 10, // 6: TW.Tron.Proto.Transaction.unfreeze_asset:type_name -> TW.Tron.Proto.UnfreezeAssetContract + 13, // 7: TW.Tron.Proto.Transaction.withdraw_balance:type_name -> TW.Tron.Proto.WithdrawBalanceContract + 11, // 8: TW.Tron.Proto.Transaction.vote_asset:type_name -> TW.Tron.Proto.VoteAssetContract + 12, // 9: TW.Tron.Proto.Transaction.vote_witness:type_name -> TW.Tron.Proto.VoteWitnessContract + 14, // 10: TW.Tron.Proto.Transaction.trigger_smart_contract:type_name -> TW.Tron.Proto.TriggerSmartContract + 2, // 11: TW.Tron.Proto.Transaction.transfer_trc20_contract:type_name -> TW.Tron.Proto.TransferTRC20Contract + 4, // 12: TW.Tron.Proto.Transaction.freeze_balance_v2:type_name -> TW.Tron.Proto.FreezeBalanceV2Contract + 5, // 13: TW.Tron.Proto.Transaction.unfreeze_balance_v2:type_name -> TW.Tron.Proto.UnfreezeBalanceV2Contract + 6, // 14: TW.Tron.Proto.Transaction.withdraw_expire_unfreeze:type_name -> TW.Tron.Proto.WithdrawExpireUnfreezeContract + 7, // 15: TW.Tron.Proto.Transaction.delegate_resource:type_name -> TW.Tron.Proto.DelegateResourceContract + 8, // 16: TW.Tron.Proto.Transaction.undelegate_resource:type_name -> TW.Tron.Proto.UnDelegateResourceContract + 16, // 17: TW.Tron.Proto.SigningInput.transaction:type_name -> TW.Tron.Proto.Transaction + 20, // 18: TW.Tron.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_Tron_proto_init() } +func file_Tron_proto_init() { + if File_Tron_proto != nil { + return + } + file_Tron_proto_msgTypes[16].OneofWrappers = []any{ + (*Transaction_Transfer)(nil), + (*Transaction_TransferAsset)(nil), + (*Transaction_FreezeBalance)(nil), + (*Transaction_UnfreezeBalance)(nil), + (*Transaction_UnfreezeAsset)(nil), + (*Transaction_WithdrawBalance)(nil), + (*Transaction_VoteAsset)(nil), + (*Transaction_VoteWitness)(nil), + (*Transaction_TriggerSmartContract)(nil), + (*Transaction_TransferTrc20Contract)(nil), + (*Transaction_FreezeBalanceV2)(nil), + (*Transaction_UnfreezeBalanceV2)(nil), + (*Transaction_WithdrawExpireUnfreeze)(nil), + (*Transaction_DelegateResource)(nil), + (*Transaction_UndelegateResource)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Tron_proto_rawDesc), len(file_Tron_proto_rawDesc)), + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Tron_proto_goTypes, + DependencyIndexes: file_Tron_proto_depIdxs, + MessageInfos: file_Tron_proto_msgTypes, + }.Build() + File_Tron_proto = out.File + file_Tron_proto_goTypes = nil + file_Tron_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/utxo/Utxo.pb.go b/wrapper/go-wrapper/protos/utxo/Utxo.pb.go new file mode 100644 index 00000000000..9836c8c8157 --- /dev/null +++ b/wrapper/go-wrapper/protos/utxo/Utxo.pb.go @@ -0,0 +1,356 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Utxo.proto + +package utxo + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Bitcoin transaction out-point reference. +type OutPoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The hash of the referenced transaction (network byte order, usually needs to be reversed). + // The referenced transaction ID in REVERSED order. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The position in the previous transactions output that this input references. + Vout uint32 `protobuf:"varint,2,opt,name=vout,proto3" json:"vout,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + mi := &file_Utxo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_Utxo_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_Utxo_proto_rawDescGZIP(), []int{0} +} + +func (x *OutPoint) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *OutPoint) GetVout() uint32 { + if x != nil { + return x.Vout + } + return 0 +} + +type TransactionInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Reference to the previous transaction's output. + OutPoint *OutPoint `protobuf:"bytes,1,opt,name=out_point,json=outPoint,proto3" json:"out_point,omitempty"` + // The sequence number, used for timelocks, replace-by-fee, etc. + Sequence uint32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` + // The script for claiming the input (non-Segwit/non-Taproot). + ScriptSig []byte `protobuf:"bytes,3,opt,name=script_sig,json=scriptSig,proto3" json:"script_sig,omitempty"` + // The script for claiming the input (Segit/Taproot). + WitnessItems [][]byte `protobuf:"bytes,4,rep,name=witness_items,json=witnessItems,proto3" json:"witness_items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionInput) Reset() { + *x = TransactionInput{} + mi := &file_Utxo_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInput) ProtoMessage() {} + +func (x *TransactionInput) ProtoReflect() protoreflect.Message { + mi := &file_Utxo_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionInput.ProtoReflect.Descriptor instead. +func (*TransactionInput) Descriptor() ([]byte, []int) { + return file_Utxo_proto_rawDescGZIP(), []int{1} +} + +func (x *TransactionInput) GetOutPoint() *OutPoint { + if x != nil { + return x.OutPoint + } + return nil +} + +func (x *TransactionInput) GetSequence() uint32 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *TransactionInput) GetScriptSig() []byte { + if x != nil { + return x.ScriptSig + } + return nil +} + +func (x *TransactionInput) GetWitnessItems() [][]byte { + if x != nil { + return x.WitnessItems + } + return nil +} + +type TransactionOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The condition for claiming the output. + ScriptPubkey []byte `protobuf:"bytes,1,opt,name=script_pubkey,json=scriptPubkey,proto3" json:"script_pubkey,omitempty"` + // The amount of satoshis to spend. + Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionOutput) Reset() { + *x = TransactionOutput{} + mi := &file_Utxo_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionOutput) ProtoMessage() {} + +func (x *TransactionOutput) ProtoReflect() protoreflect.Message { + mi := &file_Utxo_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionOutput.ProtoReflect.Descriptor instead. +func (*TransactionOutput) Descriptor() ([]byte, []int) { + return file_Utxo_proto_rawDescGZIP(), []int{2} +} + +func (x *TransactionOutput) GetScriptPubkey() []byte { + if x != nil { + return x.ScriptPubkey + } + return nil +} + +func (x *TransactionOutput) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The protocol version, is currently expected to be 1 or 2 (BIP68). + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Block height or timestamp indicating at what point transactions can be included in a block. + // Zero by default. + LockTime uint32 `protobuf:"varint,2,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // The transaction inputs. + Inputs []*TransactionInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // The transaction outputs. + Outputs []*TransactionOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Utxo_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Utxo_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Utxo_proto_rawDescGZIP(), []int{3} +} + +func (x *Transaction) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Transaction) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *Transaction) GetInputs() []*TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *Transaction) GetOutputs() []*TransactionOutput { + if x != nil { + return x.Outputs + } + return nil +} + +var File_Utxo_proto protoreflect.FileDescriptor + +const file_Utxo_proto_rawDesc = "" + + "\n" + + "\n" + + "Utxo.proto\x12\rTW.Utxo.Proto\"2\n" + + "\bOutPoint\x12\x12\n" + + "\x04hash\x18\x01 \x01(\fR\x04hash\x12\x12\n" + + "\x04vout\x18\x02 \x01(\rR\x04vout\"\xa8\x01\n" + + "\x10TransactionInput\x124\n" + + "\tout_point\x18\x01 \x01(\v2\x17.TW.Utxo.Proto.OutPointR\boutPoint\x12\x1a\n" + + "\bsequence\x18\x02 \x01(\rR\bsequence\x12\x1d\n" + + "\n" + + "script_sig\x18\x03 \x01(\fR\tscriptSig\x12#\n" + + "\rwitness_items\x18\x04 \x03(\fR\fwitnessItems\"N\n" + + "\x11TransactionOutput\x12#\n" + + "\rscript_pubkey\x18\x01 \x01(\fR\fscriptPubkey\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value\"\xb9\x01\n" + + "\vTransaction\x12\x18\n" + + "\aversion\x18\x01 \x01(\rR\aversion\x12\x1b\n" + + "\tlock_time\x18\x02 \x01(\rR\blockTime\x127\n" + + "\x06inputs\x18\x03 \x03(\v2\x1f.TW.Utxo.Proto.TransactionInputR\x06inputs\x12:\n" + + "\aoutputs\x18\x04 \x03(\v2 .TW.Utxo.Proto.TransactionOutputR\aoutputsB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Utxo_proto_rawDescOnce sync.Once + file_Utxo_proto_rawDescData []byte +) + +func file_Utxo_proto_rawDescGZIP() []byte { + file_Utxo_proto_rawDescOnce.Do(func() { + file_Utxo_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Utxo_proto_rawDesc), len(file_Utxo_proto_rawDesc))) + }) + return file_Utxo_proto_rawDescData +} + +var file_Utxo_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_Utxo_proto_goTypes = []any{ + (*OutPoint)(nil), // 0: TW.Utxo.Proto.OutPoint + (*TransactionInput)(nil), // 1: TW.Utxo.Proto.TransactionInput + (*TransactionOutput)(nil), // 2: TW.Utxo.Proto.TransactionOutput + (*Transaction)(nil), // 3: TW.Utxo.Proto.Transaction +} +var file_Utxo_proto_depIdxs = []int32{ + 0, // 0: TW.Utxo.Proto.TransactionInput.out_point:type_name -> TW.Utxo.Proto.OutPoint + 1, // 1: TW.Utxo.Proto.Transaction.inputs:type_name -> TW.Utxo.Proto.TransactionInput + 2, // 2: TW.Utxo.Proto.Transaction.outputs:type_name -> TW.Utxo.Proto.TransactionOutput + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_Utxo_proto_init() } +func file_Utxo_proto_init() { + if File_Utxo_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Utxo_proto_rawDesc), len(file_Utxo_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Utxo_proto_goTypes, + DependencyIndexes: file_Utxo_proto_depIdxs, + MessageInfos: file_Utxo_proto_msgTypes, + }.Build() + File_Utxo_proto = out.File + file_Utxo_proto_goTypes = nil + file_Utxo_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/vechain/VeChain.pb.go b/wrapper/go-wrapper/protos/vechain/VeChain.pb.go new file mode 100644 index 00000000000..3f94ca708be --- /dev/null +++ b/wrapper/go-wrapper/protos/vechain/VeChain.pb.go @@ -0,0 +1,364 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: VeChain.proto + +package vechain + +import ( + common "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/common" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A clause, between a sender and destination +type Clause struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Recipient address. + To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` + // / Transaction amount (uint256, serialized big endian) + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // / Payload data. + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Clause) Reset() { + *x = Clause{} + mi := &file_VeChain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Clause) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Clause) ProtoMessage() {} + +func (x *Clause) ProtoReflect() protoreflect.Message { + mi := &file_VeChain_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Clause.ProtoReflect.Descriptor instead. +func (*Clause) Descriptor() ([]byte, []int) { + return file_VeChain_proto_rawDescGZIP(), []int{0} +} + +func (x *Clause) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Clause) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Clause) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Last byte of the genesis block ID which is used to identify a blockchain to prevent the cross-chain replay attack. + ChainTag uint32 `protobuf:"varint,1,opt,name=chain_tag,json=chainTag,proto3" json:"chain_tag,omitempty"` + // / Reference to a specific block. + BlockRef uint64 `protobuf:"varint,2,opt,name=block_ref,json=blockRef,proto3" json:"block_ref,omitempty"` + // / How long, in terms of the number of blocks, the transaction will be allowed to be mined in VeChainThor. + Expiration uint32 `protobuf:"varint,3,opt,name=expiration,proto3" json:"expiration,omitempty"` + // / An array of Clause objects. + // / + // / Each clause contains fields To, Value and Data to enable a single transaction to carry multiple tasks issued + // / by the transaction sender. + Clauses []*Clause `protobuf:"bytes,4,rep,name=clauses,proto3" json:"clauses,omitempty"` + // / Coefficient used to calculate the gas price for the transaction. + GasPriceCoef uint32 `protobuf:"varint,5,opt,name=gas_price_coef,json=gasPriceCoef,proto3" json:"gas_price_coef,omitempty"` + // / Maximum amount of gas allowed to pay for the transaction. + Gas uint64 `protobuf:"varint,6,opt,name=gas,proto3" json:"gas,omitempty"` + // / ID of the transaction on which the current transaction depends. + DependsOn []byte `protobuf:"bytes,7,opt,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"` + // / Number set by user. + Nonce uint64 `protobuf:"varint,8,opt,name=nonce,proto3" json:"nonce,omitempty"` + // / The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,9,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_VeChain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_VeChain_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_VeChain_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningInput) GetChainTag() uint32 { + if x != nil { + return x.ChainTag + } + return 0 +} + +func (x *SigningInput) GetBlockRef() uint64 { + if x != nil { + return x.BlockRef + } + return 0 +} + +func (x *SigningInput) GetExpiration() uint32 { + if x != nil { + return x.Expiration + } + return 0 +} + +func (x *SigningInput) GetClauses() []*Clause { + if x != nil { + return x.Clauses + } + return nil +} + +func (x *SigningInput) GetGasPriceCoef() uint32 { + if x != nil { + return x.GasPriceCoef + } + return 0 +} + +func (x *SigningInput) GetGas() uint64 { + if x != nil { + return x.Gas + } + return 0 +} + +func (x *SigningInput) GetDependsOn() []byte { + if x != nil { + return x.DependsOn + } + return nil +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed and encoded transaction bytes. + Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` + // Signature. + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // error code, 0 is ok, other codes will be treated as errors + Error common.SigningError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"` + // error code description + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_VeChain_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_VeChain_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_VeChain_proto_rawDescGZIP(), []int{2} +} + +func (x *SigningOutput) GetEncoded() []byte { + if x != nil { + return x.Encoded + } + return nil +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetError() common.SigningError { + if x != nil { + return x.Error + } + return common.SigningError(0) +} + +func (x *SigningOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +var File_VeChain_proto protoreflect.FileDescriptor + +const file_VeChain_proto_rawDesc = "" + + "\n" + + "\rVeChain.proto\x12\x10TW.VeChain.Proto\x1a\fCommon.proto\"B\n" + + "\x06Clause\x12\x0e\n" + + "\x02to\x18\x01 \x01(\tR\x02to\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value\x12\x12\n" + + "\x04data\x18\x03 \x01(\fR\x04data\"\xaa\x02\n" + + "\fSigningInput\x12\x1b\n" + + "\tchain_tag\x18\x01 \x01(\rR\bchainTag\x12\x1b\n" + + "\tblock_ref\x18\x02 \x01(\x04R\bblockRef\x12\x1e\n" + + "\n" + + "expiration\x18\x03 \x01(\rR\n" + + "expiration\x122\n" + + "\aclauses\x18\x04 \x03(\v2\x18.TW.VeChain.Proto.ClauseR\aclauses\x12$\n" + + "\x0egas_price_coef\x18\x05 \x01(\rR\fgasPriceCoef\x12\x10\n" + + "\x03gas\x18\x06 \x01(\x04R\x03gas\x12\x1d\n" + + "\n" + + "depends_on\x18\a \x01(\fR\tdependsOn\x12\x14\n" + + "\x05nonce\x18\b \x01(\x04R\x05nonce\x12\x1f\n" + + "\vprivate_key\x18\t \x01(\fR\n" + + "privateKey\"\xa1\x01\n" + + "\rSigningOutput\x12\x18\n" + + "\aencoded\x18\x01 \x01(\fR\aencoded\x12\x1c\n" + + "\tsignature\x18\x02 \x01(\fR\tsignature\x123\n" + + "\x05error\x18\x03 \x01(\x0e2\x1d.TW.Common.Proto.SigningErrorR\x05error\x12#\n" + + "\rerror_message\x18\x04 \x01(\tR\ferrorMessageB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_VeChain_proto_rawDescOnce sync.Once + file_VeChain_proto_rawDescData []byte +) + +func file_VeChain_proto_rawDescGZIP() []byte { + file_VeChain_proto_rawDescOnce.Do(func() { + file_VeChain_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_VeChain_proto_rawDesc), len(file_VeChain_proto_rawDesc))) + }) + return file_VeChain_proto_rawDescData +} + +var file_VeChain_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_VeChain_proto_goTypes = []any{ + (*Clause)(nil), // 0: TW.VeChain.Proto.Clause + (*SigningInput)(nil), // 1: TW.VeChain.Proto.SigningInput + (*SigningOutput)(nil), // 2: TW.VeChain.Proto.SigningOutput + (common.SigningError)(0), // 3: TW.Common.Proto.SigningError +} +var file_VeChain_proto_depIdxs = []int32{ + 0, // 0: TW.VeChain.Proto.SigningInput.clauses:type_name -> TW.VeChain.Proto.Clause + 3, // 1: TW.VeChain.Proto.SigningOutput.error:type_name -> TW.Common.Proto.SigningError + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_VeChain_proto_init() } +func file_VeChain_proto_init() { + if File_VeChain_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_VeChain_proto_rawDesc), len(file_VeChain_proto_rawDesc)), + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_VeChain_proto_goTypes, + DependencyIndexes: file_VeChain_proto_depIdxs, + MessageInfos: file_VeChain_proto_msgTypes, + }.Build() + File_VeChain_proto = out.File + file_VeChain_proto_goTypes = nil + file_VeChain_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/waves/Waves.pb.go b/wrapper/go-wrapper/protos/waves/Waves.pb.go new file mode 100644 index 00000000000..6e0f850d90e --- /dev/null +++ b/wrapper/go-wrapper/protos/waves/Waves.pb.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Waves.proto + +package waves + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Transfer transaction +type TransferMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // asset ID + Asset string `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"` + // minimum 0.001 Waves (100000 Wavelets) for now + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + // asset of the fee + FeeAsset string `protobuf:"bytes,4,opt,name=fee_asset,json=feeAsset,proto3" json:"fee_asset,omitempty"` + // destination address + To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` + // any 140 bytes payload, will be displayed to the client as utf-8 string + Attachment []byte `protobuf:"bytes,6,opt,name=attachment,proto3" json:"attachment,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferMessage) Reset() { + *x = TransferMessage{} + mi := &file_Waves_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferMessage) ProtoMessage() {} + +func (x *TransferMessage) ProtoReflect() protoreflect.Message { + mi := &file_Waves_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferMessage.ProtoReflect.Descriptor instead. +func (*TransferMessage) Descriptor() ([]byte, []int) { + return file_Waves_proto_rawDescGZIP(), []int{0} +} + +func (x *TransferMessage) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *TransferMessage) GetAsset() string { + if x != nil { + return x.Asset + } + return "" +} + +func (x *TransferMessage) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransferMessage) GetFeeAsset() string { + if x != nil { + return x.FeeAsset + } + return "" +} + +func (x *TransferMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *TransferMessage) GetAttachment() []byte { + if x != nil { + return x.Attachment + } + return nil +} + +// Lease transaction +type LeaseMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // amount + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // destination + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // minimum 0.001 Waves (100000 Wavelets) for now + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LeaseMessage) Reset() { + *x = LeaseMessage{} + mi := &file_Waves_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LeaseMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LeaseMessage) ProtoMessage() {} + +func (x *LeaseMessage) ProtoReflect() protoreflect.Message { + mi := &file_Waves_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LeaseMessage.ProtoReflect.Descriptor instead. +func (*LeaseMessage) Descriptor() ([]byte, []int) { + return file_Waves_proto_rawDescGZIP(), []int{1} +} + +func (x *LeaseMessage) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *LeaseMessage) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *LeaseMessage) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Cancel Lease transaction +type CancelLeaseMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Lease ID to cancel + LeaseId string `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` + // Fee used + Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelLeaseMessage) Reset() { + *x = CancelLeaseMessage{} + mi := &file_Waves_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelLeaseMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelLeaseMessage) ProtoMessage() {} + +func (x *CancelLeaseMessage) ProtoReflect() protoreflect.Message { + mi := &file_Waves_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelLeaseMessage.ProtoReflect.Descriptor instead. +func (*CancelLeaseMessage) Descriptor() ([]byte, []int) { + return file_Waves_proto_rawDescGZIP(), []int{2} +} + +func (x *CancelLeaseMessage) GetLeaseId() string { + if x != nil { + return x.LeaseId + } + return "" +} + +func (x *CancelLeaseMessage) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // in millis + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // Payload message + // + // Types that are valid to be assigned to MessageOneof: + // + // *SigningInput_TransferMessage + // *SigningInput_LeaseMessage + // *SigningInput_CancelLeaseMessage + MessageOneof isSigningInput_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Waves_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Waves_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Waves_proto_rawDescGZIP(), []int{3} +} + +func (x *SigningInput) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetMessageOneof() isSigningInput_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *SigningInput) GetTransferMessage() *TransferMessage { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_TransferMessage); ok { + return x.TransferMessage + } + } + return nil +} + +func (x *SigningInput) GetLeaseMessage() *LeaseMessage { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_LeaseMessage); ok { + return x.LeaseMessage + } + } + return nil +} + +func (x *SigningInput) GetCancelLeaseMessage() *CancelLeaseMessage { + if x != nil { + if x, ok := x.MessageOneof.(*SigningInput_CancelLeaseMessage); ok { + return x.CancelLeaseMessage + } + } + return nil +} + +type isSigningInput_MessageOneof interface { + isSigningInput_MessageOneof() +} + +type SigningInput_TransferMessage struct { + TransferMessage *TransferMessage `protobuf:"bytes,3,opt,name=transfer_message,json=transferMessage,proto3,oneof"` +} + +type SigningInput_LeaseMessage struct { + LeaseMessage *LeaseMessage `protobuf:"bytes,4,opt,name=lease_message,json=leaseMessage,proto3,oneof"` +} + +type SigningInput_CancelLeaseMessage struct { + CancelLeaseMessage *CancelLeaseMessage `protobuf:"bytes,5,opt,name=cancel_lease_message,json=cancelLeaseMessage,proto3,oneof"` +} + +func (*SigningInput_TransferMessage) isSigningInput_MessageOneof() {} + +func (*SigningInput_LeaseMessage) isSigningInput_MessageOneof() {} + +func (*SigningInput_CancelLeaseMessage) isSigningInput_MessageOneof() {} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // signature data + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // transaction in JSON format + Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Waves_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Waves_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Waves_proto_rawDescGZIP(), []int{4} +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +var File_Waves_proto protoreflect.FileDescriptor + +const file_Waves_proto_rawDesc = "" + + "\n" + + "\vWaves.proto\x12\x0eTW.Waves.Proto\"\x9e\x01\n" + + "\x0fTransferMessage\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12\x14\n" + + "\x05asset\x18\x02 \x01(\tR\x05asset\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x12\x1b\n" + + "\tfee_asset\x18\x04 \x01(\tR\bfeeAsset\x12\x0e\n" + + "\x02to\x18\x05 \x01(\tR\x02to\x12\x1e\n" + + "\n" + + "attachment\x18\x06 \x01(\fR\n" + + "attachment\"H\n" + + "\fLeaseMessage\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12\x0e\n" + + "\x02to\x18\x02 \x01(\tR\x02to\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\"A\n" + + "\x12CancelLeaseMessage\x12\x19\n" + + "\blease_id\x18\x01 \x01(\tR\aleaseId\x12\x10\n" + + "\x03fee\x18\x02 \x01(\x03R\x03fee\"\xc9\x02\n" + + "\fSigningInput\x12\x1c\n" + + "\ttimestamp\x18\x01 \x01(\x03R\ttimestamp\x12\x1f\n" + + "\vprivate_key\x18\x02 \x01(\fR\n" + + "privateKey\x12L\n" + + "\x10transfer_message\x18\x03 \x01(\v2\x1f.TW.Waves.Proto.TransferMessageH\x00R\x0ftransferMessage\x12C\n" + + "\rlease_message\x18\x04 \x01(\v2\x1c.TW.Waves.Proto.LeaseMessageH\x00R\fleaseMessage\x12V\n" + + "\x14cancel_lease_message\x18\x05 \x01(\v2\".TW.Waves.Proto.CancelLeaseMessageH\x00R\x12cancelLeaseMessageB\x0f\n" + + "\rmessage_oneof\"A\n" + + "\rSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x12\n" + + "\x04json\x18\x02 \x01(\tR\x04jsonB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Waves_proto_rawDescOnce sync.Once + file_Waves_proto_rawDescData []byte +) + +func file_Waves_proto_rawDescGZIP() []byte { + file_Waves_proto_rawDescOnce.Do(func() { + file_Waves_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Waves_proto_rawDesc), len(file_Waves_proto_rawDesc))) + }) + return file_Waves_proto_rawDescData +} + +var file_Waves_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_Waves_proto_goTypes = []any{ + (*TransferMessage)(nil), // 0: TW.Waves.Proto.TransferMessage + (*LeaseMessage)(nil), // 1: TW.Waves.Proto.LeaseMessage + (*CancelLeaseMessage)(nil), // 2: TW.Waves.Proto.CancelLeaseMessage + (*SigningInput)(nil), // 3: TW.Waves.Proto.SigningInput + (*SigningOutput)(nil), // 4: TW.Waves.Proto.SigningOutput +} +var file_Waves_proto_depIdxs = []int32{ + 0, // 0: TW.Waves.Proto.SigningInput.transfer_message:type_name -> TW.Waves.Proto.TransferMessage + 1, // 1: TW.Waves.Proto.SigningInput.lease_message:type_name -> TW.Waves.Proto.LeaseMessage + 2, // 2: TW.Waves.Proto.SigningInput.cancel_lease_message:type_name -> TW.Waves.Proto.CancelLeaseMessage + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_Waves_proto_init() } +func file_Waves_proto_init() { + if File_Waves_proto != nil { + return + } + file_Waves_proto_msgTypes[3].OneofWrappers = []any{ + (*SigningInput_TransferMessage)(nil), + (*SigningInput_LeaseMessage)(nil), + (*SigningInput_CancelLeaseMessage)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Waves_proto_rawDesc), len(file_Waves_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Waves_proto_goTypes, + DependencyIndexes: file_Waves_proto_depIdxs, + MessageInfos: file_Waves_proto_msgTypes, + }.Build() + File_Waves_proto = out.File + file_Waves_proto_goTypes = nil + file_Waves_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/zcash/Zcash.pb.go b/wrapper/go-wrapper/protos/zcash/Zcash.pb.go new file mode 100644 index 00000000000..3f0eb0ef455 --- /dev/null +++ b/wrapper/go-wrapper/protos/zcash/Zcash.pb.go @@ -0,0 +1,273 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Zcash.proto + +package zcash + +import ( + utxo "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/utxo" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TransactionBuilderExtraData struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Currently, `branch_id` is the only configurable Zcash specific parameter. + // There can also be `version_group_id` configured in the future. + BranchId []byte `protobuf:"bytes,1,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + // Zero in most cases. + ExpiryHeight uint32 `protobuf:"varint,2,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + // Whether to calculate the fee according to ZIP-0317 for the given transaction + // https://zips.z.cash/zip-0317#fee-calculation + Zip_0317 bool `protobuf:"varint,3,opt,name=zip_0317,json=zip0317,proto3" json:"zip_0317,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionBuilderExtraData) Reset() { + *x = TransactionBuilderExtraData{} + mi := &file_Zcash_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionBuilderExtraData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionBuilderExtraData) ProtoMessage() {} + +func (x *TransactionBuilderExtraData) ProtoReflect() protoreflect.Message { + mi := &file_Zcash_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionBuilderExtraData.ProtoReflect.Descriptor instead. +func (*TransactionBuilderExtraData) Descriptor() ([]byte, []int) { + return file_Zcash_proto_rawDescGZIP(), []int{0} +} + +func (x *TransactionBuilderExtraData) GetBranchId() []byte { + if x != nil { + return x.BranchId + } + return nil +} + +func (x *TransactionBuilderExtraData) GetExpiryHeight() uint32 { + if x != nil { + return x.ExpiryHeight + } + return 0 +} + +func (x *TransactionBuilderExtraData) GetZip_0317() bool { + if x != nil { + return x.Zip_0317 + } + return false +} + +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // / Transaction version. + // / Currently, version 4 (0x80000004) is supported only. + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // If transaction version is 4 (0x80000004), version group ID is 0x892F2085. + VersionGroupId uint32 `protobuf:"varint,2,opt,name=version_group_id,json=versionGroupId,proto3" json:"version_group_id,omitempty"` + // The transaction inputs. + Inputs []*utxo.TransactionInput `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"` + // The transaction outputs. + Outputs []*utxo.TransactionOutput `protobuf:"bytes,4,rep,name=outputs,proto3" json:"outputs,omitempty"` + // Block height or timestamp indicating at what point transactions can be included in a block. + // Zero by default. + LockTime uint32 `protobuf:"varint,5,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // Expiry height. + ExpiryHeight uint32 `protobuf:"varint,6,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + // Sapling value balance for the transaction. + // Always 0 for a transparent transaction. + SaplingValueBalance int64 `protobuf:"varint,7,opt,name=sapling_value_balance,json=saplingValueBalance,proto3" json:"sapling_value_balance,omitempty"` + // Consensus branch ID for the epoch of the block containing the transaction. + BranchId []byte `protobuf:"bytes,8,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Zcash_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Zcash_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Zcash_proto_rawDescGZIP(), []int{1} +} + +func (x *Transaction) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Transaction) GetVersionGroupId() uint32 { + if x != nil { + return x.VersionGroupId + } + return 0 +} + +func (x *Transaction) GetInputs() []*utxo.TransactionInput { + if x != nil { + return x.Inputs + } + return nil +} + +func (x *Transaction) GetOutputs() []*utxo.TransactionOutput { + if x != nil { + return x.Outputs + } + return nil +} + +func (x *Transaction) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *Transaction) GetExpiryHeight() uint32 { + if x != nil { + return x.ExpiryHeight + } + return 0 +} + +func (x *Transaction) GetSaplingValueBalance() int64 { + if x != nil { + return x.SaplingValueBalance + } + return 0 +} + +func (x *Transaction) GetBranchId() []byte { + if x != nil { + return x.BranchId + } + return nil +} + +var File_Zcash_proto protoreflect.FileDescriptor + +const file_Zcash_proto_rawDesc = "" + + "\n" + + "\vZcash.proto\x12\x0eTW.Zcash.Proto\x1a\n" + + "Utxo.proto\"z\n" + + "\x1bTransactionBuilderExtraData\x12\x1b\n" + + "\tbranch_id\x18\x01 \x01(\fR\bbranchId\x12#\n" + + "\rexpiry_height\x18\x02 \x01(\rR\fexpiryHeight\x12\x19\n" + + "\bzip_0317\x18\x03 \x01(\bR\azip0317\"\xd9\x02\n" + + "\vTransaction\x12\x18\n" + + "\aversion\x18\x01 \x01(\rR\aversion\x12(\n" + + "\x10version_group_id\x18\x02 \x01(\rR\x0eversionGroupId\x127\n" + + "\x06inputs\x18\x03 \x03(\v2\x1f.TW.Utxo.Proto.TransactionInputR\x06inputs\x12:\n" + + "\aoutputs\x18\x04 \x03(\v2 .TW.Utxo.Proto.TransactionOutputR\aoutputs\x12\x1b\n" + + "\tlock_time\x18\x05 \x01(\rR\blockTime\x12#\n" + + "\rexpiry_height\x18\x06 \x01(\rR\fexpiryHeight\x122\n" + + "\x15sapling_value_balance\x18\a \x01(\x03R\x13saplingValueBalance\x12\x1b\n" + + "\tbranch_id\x18\b \x01(\fR\bbranchIdB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Zcash_proto_rawDescOnce sync.Once + file_Zcash_proto_rawDescData []byte +) + +func file_Zcash_proto_rawDescGZIP() []byte { + file_Zcash_proto_rawDescOnce.Do(func() { + file_Zcash_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Zcash_proto_rawDesc), len(file_Zcash_proto_rawDesc))) + }) + return file_Zcash_proto_rawDescData +} + +var file_Zcash_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_Zcash_proto_goTypes = []any{ + (*TransactionBuilderExtraData)(nil), // 0: TW.Zcash.Proto.TransactionBuilderExtraData + (*Transaction)(nil), // 1: TW.Zcash.Proto.Transaction + (*utxo.TransactionInput)(nil), // 2: TW.Utxo.Proto.TransactionInput + (*utxo.TransactionOutput)(nil), // 3: TW.Utxo.Proto.TransactionOutput +} +var file_Zcash_proto_depIdxs = []int32{ + 2, // 0: TW.Zcash.Proto.Transaction.inputs:type_name -> TW.Utxo.Proto.TransactionInput + 3, // 1: TW.Zcash.Proto.Transaction.outputs:type_name -> TW.Utxo.Proto.TransactionOutput + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_Zcash_proto_init() } +func file_Zcash_proto_init() { + if File_Zcash_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Zcash_proto_rawDesc), len(file_Zcash_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Zcash_proto_goTypes, + DependencyIndexes: file_Zcash_proto_depIdxs, + MessageInfos: file_Zcash_proto_msgTypes, + }.Build() + File_Zcash_proto = out.File + file_Zcash_proto_goTypes = nil + file_Zcash_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/protos/zilliqa/Zilliqa.pb.go b/wrapper/go-wrapper/protos/zilliqa/Zilliqa.pb.go new file mode 100644 index 00000000000..d62630b1964 --- /dev/null +++ b/wrapper/go-wrapper/protos/zilliqa/Zilliqa.pb.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v3.20.3 +// source: Zilliqa.proto + +package zilliqa + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Generic transaction +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to MessageOneof: + // + // *Transaction_Transfer_ + // *Transaction_RawTransaction + MessageOneof isTransaction_MessageOneof `protobuf_oneof:"message_oneof"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_Zilliqa_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_Zilliqa_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_Zilliqa_proto_rawDescGZIP(), []int{0} +} + +func (x *Transaction) GetMessageOneof() isTransaction_MessageOneof { + if x != nil { + return x.MessageOneof + } + return nil +} + +func (x *Transaction) GetTransfer() *Transaction_Transfer { + if x != nil { + if x, ok := x.MessageOneof.(*Transaction_Transfer_); ok { + return x.Transfer + } + } + return nil +} + +func (x *Transaction) GetRawTransaction() *Transaction_Raw { + if x != nil { + if x, ok := x.MessageOneof.(*Transaction_RawTransaction); ok { + return x.RawTransaction + } + } + return nil +} + +type isTransaction_MessageOneof interface { + isTransaction_MessageOneof() +} + +type Transaction_Transfer_ struct { + Transfer *Transaction_Transfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"` +} + +type Transaction_RawTransaction struct { + RawTransaction *Transaction_Raw `protobuf:"bytes,2,opt,name=raw_transaction,json=rawTransaction,proto3,oneof"` +} + +func (*Transaction_Transfer_) isTransaction_MessageOneof() {} + +func (*Transaction_RawTransaction) isTransaction_MessageOneof() {} + +// Input data necessary to create a signed transaction. +type SigningInput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Transaction version + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // Nonce + Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Recipient's address. + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + // GasPrice (256-bit number) + GasPrice []byte `protobuf:"bytes,4,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` + // GasLimit + GasLimit uint64 `protobuf:"varint,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // The secret private key used for signing (32 bytes). + PrivateKey []byte `protobuf:"bytes,6,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The payload transaction + Transaction *Transaction `protobuf:"bytes,7,opt,name=transaction,proto3" json:"transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningInput) Reset() { + *x = SigningInput{} + mi := &file_Zilliqa_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningInput) ProtoMessage() {} + +func (x *SigningInput) ProtoReflect() protoreflect.Message { + mi := &file_Zilliqa_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningInput.ProtoReflect.Descriptor instead. +func (*SigningInput) Descriptor() ([]byte, []int) { + return file_Zilliqa_proto_rawDescGZIP(), []int{1} +} + +func (x *SigningInput) GetVersion() uint32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *SigningInput) GetNonce() uint64 { + if x != nil { + return x.Nonce + } + return 0 +} + +func (x *SigningInput) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *SigningInput) GetGasPrice() []byte { + if x != nil { + return x.GasPrice + } + return nil +} + +func (x *SigningInput) GetGasLimit() uint64 { + if x != nil { + return x.GasLimit + } + return 0 +} + +func (x *SigningInput) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *SigningInput) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +// Result containing the signed and encoded transaction. +type SigningOutput struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed signature bytes. + Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` + // JSON transaction with signature + Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SigningOutput) Reset() { + *x = SigningOutput{} + mi := &file_Zilliqa_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SigningOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SigningOutput) ProtoMessage() {} + +func (x *SigningOutput) ProtoReflect() protoreflect.Message { + mi := &file_Zilliqa_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead. +func (*SigningOutput) Descriptor() ([]byte, []int) { + return file_Zilliqa_proto_rawDescGZIP(), []int{2} +} + +func (x *SigningOutput) GetSignature() []byte { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SigningOutput) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +// Transfer transaction +type Transaction_Transfer struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to send (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_Transfer) Reset() { + *x = Transaction_Transfer{} + mi := &file_Zilliqa_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_Transfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_Transfer) ProtoMessage() {} + +func (x *Transaction_Transfer) ProtoReflect() protoreflect.Message { + mi := &file_Zilliqa_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_Transfer.ProtoReflect.Descriptor instead. +func (*Transaction_Transfer) Descriptor() ([]byte, []int) { + return file_Zilliqa_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Transaction_Transfer) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +// Generic contract call +type Transaction_Raw struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amount to send (uint256, serialized big endian) + Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // Smart contract code + Code []byte `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // String-ified JSON object specifying the transition parameter + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction_Raw) Reset() { + *x = Transaction_Raw{} + mi := &file_Zilliqa_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction_Raw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction_Raw) ProtoMessage() {} + +func (x *Transaction_Raw) ProtoReflect() protoreflect.Message { + mi := &file_Zilliqa_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction_Raw.ProtoReflect.Descriptor instead. +func (*Transaction_Raw) Descriptor() ([]byte, []int) { + return file_Zilliqa_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Transaction_Raw) GetAmount() []byte { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Transaction_Raw) GetCode() []byte { + if x != nil { + return x.Code + } + return nil +} + +func (x *Transaction_Raw) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +var File_Zilliqa_proto protoreflect.FileDescriptor + +const file_Zilliqa_proto_rawDesc = "" + + "\n" + + "\rZilliqa.proto\x12\x10TW.Zilliqa.Proto\"\x9d\x02\n" + + "\vTransaction\x12D\n" + + "\btransfer\x18\x01 \x01(\v2&.TW.Zilliqa.Proto.Transaction.TransferH\x00R\btransfer\x12L\n" + + "\x0fraw_transaction\x18\x02 \x01(\v2!.TW.Zilliqa.Proto.Transaction.RawH\x00R\x0erawTransaction\x1a\"\n" + + "\bTransfer\x12\x16\n" + + "\x06amount\x18\x01 \x01(\fR\x06amount\x1aE\n" + + "\x03Raw\x12\x16\n" + + "\x06amount\x18\x01 \x01(\fR\x06amount\x12\x12\n" + + "\x04code\x18\x02 \x01(\fR\x04code\x12\x12\n" + + "\x04data\x18\x03 \x01(\fR\x04dataB\x0f\n" + + "\rmessage_oneof\"\xea\x01\n" + + "\fSigningInput\x12\x18\n" + + "\aversion\x18\x01 \x01(\rR\aversion\x12\x14\n" + + "\x05nonce\x18\x02 \x01(\x04R\x05nonce\x12\x0e\n" + + "\x02to\x18\x03 \x01(\tR\x02to\x12\x1b\n" + + "\tgas_price\x18\x04 \x01(\fR\bgasPrice\x12\x1b\n" + + "\tgas_limit\x18\x05 \x01(\x04R\bgasLimit\x12\x1f\n" + + "\vprivate_key\x18\x06 \x01(\fR\n" + + "privateKey\x12?\n" + + "\vtransaction\x18\a \x01(\v2\x1d.TW.Zilliqa.Proto.TransactionR\vtransaction\"A\n" + + "\rSigningOutput\x12\x1c\n" + + "\tsignature\x18\x01 \x01(\fR\tsignature\x12\x12\n" + + "\x04json\x18\x02 \x01(\tR\x04jsonB\x17\n" + + "\x15wallet.core.jni.protob\x06proto3" + +var ( + file_Zilliqa_proto_rawDescOnce sync.Once + file_Zilliqa_proto_rawDescData []byte +) + +func file_Zilliqa_proto_rawDescGZIP() []byte { + file_Zilliqa_proto_rawDescOnce.Do(func() { + file_Zilliqa_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_Zilliqa_proto_rawDesc), len(file_Zilliqa_proto_rawDesc))) + }) + return file_Zilliqa_proto_rawDescData +} + +var file_Zilliqa_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_Zilliqa_proto_goTypes = []any{ + (*Transaction)(nil), // 0: TW.Zilliqa.Proto.Transaction + (*SigningInput)(nil), // 1: TW.Zilliqa.Proto.SigningInput + (*SigningOutput)(nil), // 2: TW.Zilliqa.Proto.SigningOutput + (*Transaction_Transfer)(nil), // 3: TW.Zilliqa.Proto.Transaction.Transfer + (*Transaction_Raw)(nil), // 4: TW.Zilliqa.Proto.Transaction.Raw +} +var file_Zilliqa_proto_depIdxs = []int32{ + 3, // 0: TW.Zilliqa.Proto.Transaction.transfer:type_name -> TW.Zilliqa.Proto.Transaction.Transfer + 4, // 1: TW.Zilliqa.Proto.Transaction.raw_transaction:type_name -> TW.Zilliqa.Proto.Transaction.Raw + 0, // 2: TW.Zilliqa.Proto.SigningInput.transaction:type_name -> TW.Zilliqa.Proto.Transaction + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_Zilliqa_proto_init() } +func file_Zilliqa_proto_init() { + if File_Zilliqa_proto != nil { + return + } + file_Zilliqa_proto_msgTypes[0].OneofWrappers = []any{ + (*Transaction_Transfer_)(nil), + (*Transaction_RawTransaction)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_Zilliqa_proto_rawDesc), len(file_Zilliqa_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_Zilliqa_proto_goTypes, + DependencyIndexes: file_Zilliqa_proto_depIdxs, + MessageInfos: file_Zilliqa_proto_msgTypes, + }.Build() + File_Zilliqa_proto = out.File + file_Zilliqa_proto_goTypes = nil + file_Zilliqa_proto_depIdxs = nil +} diff --git a/wrapper/go-wrapper/sample/cardano.go b/wrapper/go-wrapper/sample/cardano.go new file mode 100644 index 00000000000..5859ba2bf16 --- /dev/null +++ b/wrapper/go-wrapper/sample/cardano.go @@ -0,0 +1,104 @@ +package sample + +import ( + "encoding/hex" + "errors" + "fmt" + + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/core" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/cardano" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/transactioncompiler" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/types" + "google.golang.org/protobuf/proto" +) + +// Using real succesfull transation: +func TestCardano() { + fmt.Println("Test Cardano") + txHash1, _ := hex.DecodeString("8316e5007d61fb90652cabb41141972a38b5bc60954d602cf843476aa3f67f63") + utxo1 := cardano.TxInput{ + OutPoint: &cardano.OutPoint{ + TxHash: txHash1, + OutputIndex: 0, + }, + Address: "Ae2tdPwUPEZ6vkqxSjJxaQYmDxHf5DTnxtZ67pFLJGTb9LTnCGkDP6ca3f8", + Amount: 2500000, + } + + txHash2, _ := hex.DecodeString("e29392c59c903fefb905730587d22cae8bda30bd8d9aeec3eca082ae77675946") + utxo2 := cardano.TxInput{ + OutPoint: &cardano.OutPoint{ + TxHash: txHash2, + OutputIndex: 0, + }, + Address: "Ae2tdPwUPEZ6vkqxSjJxaQYmDxHf5DTnxtZ67pFLJGTb9LTnCGkDP6ca3f8", + Amount: 1700000, + } + + transferMessage := cardano.Transfer{ + ToAddress: "addr1q90uh2eawrdc9vaemftgd50l28yrh9lqxtjjh4z6dnn0u7ggasexxdyyk9f05atygnjlccsjsggtc87hhqjna32fpv5qeq96ls", + ChangeAddress: "addr1qx55ymlqemndq8gluv40v58pu76a2tp4mzjnyx8n6zrp2vtzrs43a0057y0edkn8lh9su8vh5lnhs4npv6l9tuvncv8swc7t08", + Amount: 3000000, + UseMaxAmount: false, + } + var privateKeys [][]byte + privateKeyData, _ := hex.DecodeString("98f266d1aac660179bc2f456033941238ee6b2beb8ed0f9f34c9902816781f5a9903d1d395d6ab887b65ea5e344ef09b449507c21a75f0ce8c59d0ed1c6764eba7f484aa383806735c46fd769c679ee41f8952952036a6e2338ada940b8a91f4e890ca4eb6bec44bf751b5a843174534af64d6ad1f44e0613db78a7018781f5aa151d2997f52059466b715d8eefab30a78b874ae6ef4931fa58bb21ef8ce2423d46f19d0fbf75afb0b9a24e31d533f4fd74cee3b56e162568e8defe37123afc4") + privateKeys = append(privateKeys, privateKeyData) + + input := cardano.SigningInput{ + Utxos: []*cardano.TxInput{&utxo1, &utxo2}, + PrivateKey: privateKeys, + TransferMessage: &transferMessage, + Ttl: 190000000, + } + + txInputData, _ := proto.Marshal(&input) + msgForSign := core.PreImageHashes(core.CoinTypeCardano, txInputData) + + var preSigningOutput transactioncompiler.PreSigningOutput + proto.Unmarshal(msgForSign, &preSigningOutput) + + var output cardano.SigningOutput + err := core.CreateSignedTx(&input, core.CoinTypeCardano, &output) + if err != nil { + panic(err) + } + + twPrivateKey, err := core.PrivateKeyCreateWithData(privateKeyData) + if err != nil { + panic(err) + } + + dataForSign := types.TWDataCreateWithGoBytes(preSigningOutput.DataHash) + signature := core.PrivateKeySign(twPrivateKey, dataForSign, core.CurveED25519ExtendedCardano) + if signature == nil { + panic(errors.New("signature is nil")) + } + + pub := core.TWPrivateKeyGetPublicKeyEd25519Cardano(twPrivateKey) + if pub == nil { + panic(errors.New("publickey pointer is nil")) + } + + pubValue := core.PublicKeyDescription(pub) + if pubValue == nil { + panic(errors.New("no value for publickey")) + } + + pubKeyBytes, _ := hex.DecodeString(types.TWStringGoString(pubValue)) + if pubKeyBytes == nil { + panic(errors.New("no value for publickey")) + } + + fmt.Println("\nData for signing", preSigningOutput.DataHash) + fmt.Println("\nSignature:", types.TWDataGoBytes(signature)) + fmt.Println("\nPublicKey bytes", pubKeyBytes) + + valid := core.PublicKeyVerify(pubKeyBytes, core.PublicKeyTypeED25519Cardano, types.TWDataGoBytes(signature), preSigningOutput.DataHash) + if !valid { + panic(errors.New("verification failed")) + } + fmt.Println("\nSignature veryfication:", valid) + core.PrivateKeyDelete(twPrivateKey) + fmt.Println("\nDone Test") +} diff --git a/wrapper/go-wrapper/sample/external_signing.go b/wrapper/go-wrapper/sample/external_signing.go new file mode 100644 index 00000000000..bafca5d34bb --- /dev/null +++ b/wrapper/go-wrapper/sample/external_signing.go @@ -0,0 +1,378 @@ +package sample + +import ( + "encoding/hex" + "fmt" + "math/big" + + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/core" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/binance" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoin" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/bitcoinv2" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/ethereum" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/transactioncompiler" + "github.com/Cramiumlabs/wallet-core/wrapper/go-wrapper/protos/utxo" + + "google.golang.org/protobuf/proto" +) + +func ExternalSigningDemo() { + fmt.Println("") + // SignExternalBinanceDemo() + // SignExternalEthereumDemo() + // SignExternalBitcoinDemo() + SignExternalLitecoinDemo() +} + +func SignExternalBinanceDemo() { + fmt.Println("==> Signing with External Signature - Binance Demo") + + coin := core.CoinTypeBinance + + // bnb1grpf0955h0ykzq3ar5nmum7y6gdfl6lxfn46h2 + fromAddress, _ := hex.DecodeString("40c2979694bbc961023d1d27be6fc4d21a9febe6") + // bnb1hlly02l6ahjsgxw9wlcswnlwdhg4xhx38yxpd5 + toAddress, _ := hex.DecodeString("bffe47abfaede50419c577f1074fee6dd1535cd1") + + inOutToken := binance.SendOrder_Token{ + Denom: "BNB", + Amount: 1, + } + + orderInput := binance.SendOrder_Input{ + Address: fromAddress, + Coins: []*binance.SendOrder_Token{&inOutToken}, + } + orderOutput := binance.SendOrder_Output{ + Address: toAddress, + Coins: []*binance.SendOrder_Token{&inOutToken}, + } + + input := binance.SigningInput{ + ChainId: "Binance-Chain-Nile", + OrderOneof: &binance.SigningInput_SendOrder{ + SendOrder: &binance.SendOrder{ + Inputs: []*binance.SendOrder_Input{&orderInput}, + Outputs: []*binance.SendOrder_Output{&orderOutput}, + }, + }, + } + + fmt.Println("\n==> Step 1: Prepare transaction input (protobuf)") + txInputData, _ := proto.Marshal(&input) + fmt.Println("txInputData len: ", len(txInputData)) + + fmt.Println("\n==> Step 2: Obtain preimage hash") + hashes := core.PreImageHashes(coin, txInputData) + fmt.Println("hash(es): ", len(hashes), hex.EncodeToString(hashes)) + + var preSigningOutput transactioncompiler.PreSigningOutput + proto.Unmarshal(hashes, &preSigningOutput) + + fmt.Println("\n==> Step 3: Compile transaction info") + // Simulate signature, normally obtained from signature server + signature, _ := hex.DecodeString("1b1181faec30b60a2ddaa2804c253cf264c69180ec31814929b5de62088c0c5a45e8a816d1208fc5366bb8b041781a6771248550d04094c3d7a504f9e8310679") + publicKey, _ := hex.DecodeString("026a35920088d98c3888ca68c53dfc93f4564602606cbb87f0fe5ee533db38e502") + txOutput := core.CompileWithSignatures(coin, txInputData, [][]byte{signature}, [][]byte{publicKey}) + + var output binance.SigningOutput + proto.Unmarshal(txOutput, &output) + fmt.Println("final txOutput proto: ", len(txOutput)) + fmt.Println("output.encoded: ", len(output.Encoded), hex.EncodeToString(output.Encoded)) + + fmt.Println("\n==> Double check signature validity (result should be true)") + verifyRes := core.PublicKeyVerify(publicKey, core.PublicKeyTypeSECP256k1, signature, preSigningOutput.DataHash) + fmt.Println(verifyRes) + + fmt.Println("") +} + +func SignExternalEthereumDemo() { + fmt.Println("==> Signing with External Signature - Ethereum Demo") + + coin := core.CoinTypeEthereum + + fmt.Println("\n==> Step 1: Prepare transaction input (protobuf)") + var input ethereum.SigningInput + input.Transaction = ðereum.Transaction{ + TransactionOneof: ðereum.Transaction_Transfer_{ + Transfer: ðereum.Transaction_Transfer{ + Amount: big.NewInt(1000000000000000000).Bytes(), + }, + }, + } + input.ChainId = big.NewInt(1).Bytes() + input.ToAddress = "0x3535353535353535353535353535353535353535" + input.Nonce = big.NewInt(11).Bytes() + input.GasPrice = big.NewInt(20000000000).Bytes() + input.GasLimit = big.NewInt(21000).Bytes() + input.TxMode = ethereum.TransactionMode_Legacy + txInputData, _ := proto.Marshal(&input) + fmt.Println("txInputData len: ", len(txInputData)) + + fmt.Println("\n==> Step 2: Obtain preimage hash") + hashes := core.PreImageHashes(coin, txInputData) + fmt.Println("hash(es): ", len(hashes), hex.EncodeToString(hashes)) + + var preSigningOutput transactioncompiler.PreSigningOutput + proto.Unmarshal(hashes, &preSigningOutput) + + fmt.Println("\n==> Step 3: Compile transaction info") + // Simulate signature, normally obtained from signature server + signature, _ := hex.DecodeString("360a84fb41ad07f07c845fedc34cde728421803ebbaae392fc39c116b29fc07b53bd9d1376e15a191d844db458893b928f3efbfee90c9febf51ab84c9796677900") + publicKey, _ := hex.DecodeString("044bc2a31265153f07e70e0bab08724e6b85e217f8cd628ceb62974247bb493382ce28cab79ad7119ee1ad3ebcdb98a16805211530ecc6cfefa1b88e6dff99232a") + txOutput := core.CompileWithSignatures(coin, txInputData, [][]byte{signature}, [][]byte{publicKey}) + + fmt.Println("final txOutput proto: ", len(txOutput)) + var output ethereum.SigningOutput + _ = proto.Unmarshal(txOutput, &output) + fmt.Println("output.encoded: ", len(output.Encoded), hex.EncodeToString(output.Encoded)) + + fmt.Println("\n==> Double check signature validity (result should be true)") + verifyRes := core.PublicKeyVerify(publicKey, core.PublicKeyTypeSECP256k1Extended, signature, preSigningOutput.DataHash) + fmt.Println(verifyRes) + + fmt.Println("") +} + +func SignExternalBitcoinDemo() { + fmt.Println("==> Signing with External Signature - Bitcoin Demo") + + fmt.Println("\n==> Step 1: Prepare transaction input (protobuf)") + + revUtxoHash0, _ := hex.DecodeString("07c42b969286be06fae38528c85f0a1ce508d4df837eb5ac4cf5f2a7a9d65fa8") + revUtxoHash1, _ := hex.DecodeString("d6892a5aa54e3b8fe430efd23f49a8950733aaa9d7c915d9989179f48dd1905e") + revUtxoHash2, _ := hex.DecodeString("6021efcf7555f90627364339fc921139dd40a06ccb2cb2a2a4f8f4ea7a2dc74d") + inPubKey0, _ := hex.DecodeString("024bc2a31265153f07e70e0bab08724e6b85e217f8cd628ceb62974247bb493382") + inPubKey1, _ := hex.DecodeString("0217142f69535e4dad0dc7060df645c55a174cc1bfa5b9eb2e59aad2ae96072dfc") + inPubKeyHash0, _ := hex.DecodeString("bd92088bb7e82d611a9b94fbb74a0908152b784f") + inPubKeyHash1, _ := hex.DecodeString("6641abedacf9483b793afe1718689cc9420bbb1c") + ownAddress := "bc1qhkfq3zahaqkkzx5mjnamwjsfpq2jk7z00ppggv" + + // Input UTXO infos + type UtxoInfo struct { + revUtxoHash []byte + publicKey []byte + address string + amount int + index int + } + + utxoInfos := [...]UtxoInfo{ + // first + {revUtxoHash0, inPubKey0, ownAddress, 600000, 0}, + // second UTXO, with same pubkey + {revUtxoHash1, inPubKey0, ownAddress, 500000, 1}, + // third UTXO, with different pubkey + {revUtxoHash2, inPubKey1, "bc1qveq6hmdvl9yrk7f6lct3s6yue9pqhwcuxedggg", 400000, 0}, + } + + // Signature infos, indexed by pubkeyhash+hash + type SignatureInfo struct { + signature []byte + publicKey []byte + } + inSig0, _ := hex.DecodeString("304402201857bc6e6e48b46046a4bd204136fc77e24c240943fb5a1f0e86387aae59b34902200a7f31478784e51c49f46ef072745a4f263d7efdbc9c6784aa2571ff4f6f2a40") + inSig1, _ := hex.DecodeString("3044022041294880caa09bb1b653775310fcdd1458da6b8e7d7fae34e37966414fe115820220646397c9d2513edc5974ecc336e9b287de0cdf071c366f3b3dc3ff309213e4e4") + inSig2, _ := hex.DecodeString("30440220764e3d5b3971c4b3e70b23fb700a7462a6fe519d9830e863a1f8388c402ad0b102207e777f7972c636961f92375a2774af3b7a2a04190251bbcb31d19c70927952dc") + signatureInfos := map[string]SignatureInfo{ + hex.EncodeToString(inPubKeyHash0) + "+" + "a296bead4172007be69b21971a790e076388666c162a9505698415f1b003ebd7": {inSig0, inPubKey0}, + hex.EncodeToString(inPubKeyHash1) + "+" + "505f527f00e15fcc5a2d2416c9970beb57dfdfaca99e572a01f143b24dd8fab6": {inSig1, inPubKey1}, + hex.EncodeToString(inPubKeyHash0) + "+" + "60ed6e9371e5ddc72fd88e46a12cb2f68516ebd307c0fd31b1b55cf767272101": {inSig2, inPubKey0}, + } + + coin := core.CoinTypeBitcoin + + // Setup input for Plan + input := bitcoin.SigningInput{ + HashType: uint32(core.BitcoinSigHashTypeAll), + Amount: 1200000, + ByteFee: 1, + ToAddress: "bc1q2dsdlq3343vk29runkgv4yc292hmq53jedfjmp", + ChangeAddress: ownAddress, + Utxo: []*bitcoin.UnspentTransaction{}, + CoinType: uint32(coin), + Scripts: map[string][]byte{}, + } + + // process UTXOs + for i := 0; i < len(utxoInfos); i++ { + address := utxoInfos[i].address + fmt.Println("utxo", i, ": ", address, utxoInfos[i].amount) + + lockScript := core.BitcoinScriptLockScriptForAddress(address, coin) + fmt.Println(" lockScript: ", hex.EncodeToString(lockScript)) + keyHash := core.BitcoinScriptMatchPayToWitnessPublicKeyHash(lockScript) + fmt.Println(" keyHash: ", hex.EncodeToString(keyHash)) + redeemScript := core.BitcoinScriptBuildPayToPublicKeyHash(keyHash) + fmt.Println(" redeemScript: ", hex.EncodeToString(redeemScript)) + input.Scripts[hex.EncodeToString(keyHash)] = redeemScript + + utxo := bitcoin.UnspentTransaction{ + OutPoint: &bitcoin.OutPoint{ + Hash: utxoInfos[i].revUtxoHash, + Index: uint32(utxoInfos[i].index), + Sequence: 4294967295, + }, + Amount: int64(utxoInfos[i].amount), + Script: lockScript, + } + input.Utxo = append(input.Utxo, &utxo) + } + + txInputData, _ := proto.Marshal(&input) + fmt.Println("txInputData len: ", len(txInputData)) + + fmt.Println("\n==> Step 2: Obtain preimage hashes") + hashes := core.PreImageHashes(coin, txInputData) + + var preSigningOutput bitcoin.PreSigningOutput + proto.Unmarshal(hashes, &preSigningOutput) + fmt.Println("hashes+pubkeyhashes: ", len(preSigningOutput.HashPublicKeys)) + for _, h := range preSigningOutput.HashPublicKeys { + fmt.Println(" ", hex.EncodeToString(h.DataHash), hex.EncodeToString(h.PublicKeyHash)) + } + + fmt.Println("\n==> Step 3: Compile transaction info") + // Simulate signature, normally obtained from signature server + signatureVec := [][]byte{} + pubkeyVec := [][]byte{} + for _, h := range preSigningOutput.HashPublicKeys { + preImageHash := h.DataHash + pubkeyHash := h.PublicKeyHash + key := hex.EncodeToString(pubkeyHash) + "+" + hex.EncodeToString(preImageHash) + sigInfo := signatureInfos[key] + + signatureVec = append(signatureVec, sigInfo.signature) + pubkeyVec = append(pubkeyVec, sigInfo.publicKey) + + // Verify signature (pubkey & hash & signature) + verifyRes := core.PublicKeyVerifyAsDER(sigInfo.publicKey, core.PublicKeyTypeSECP256k1, sigInfo.signature, preImageHash) + fmt.Println("signature verification:", verifyRes) + } + txOutput := core.CompileWithSignatures(coin, txInputData, signatureVec, pubkeyVec) + + fmt.Println("final txOutput proto: ", len(txOutput)) + var output bitcoin.SigningOutput + _ = proto.Unmarshal(txOutput, &output) + fmt.Println("output.encoded: ", len(output.Encoded), hex.EncodeToString(output.Encoded)) + + fmt.Println("") +} + +func SignExternalLitecoinDemo() { + + mn := "scheme unfold sea follow canvas food average knife stamp random collect slot" + + // bitcoin wallet + bw, err := core.CreateWalletWithMnemonic(mn, core.CoinTypeLitecoin) + privateKey, _ := hex.DecodeString(bw.PriKey) + fmt.Println("Pri", (bw.PriKey)) + fmt.Println("Pub", (bw.PubKey)) + + utxoHash0, _ := hex.DecodeString("4b2698a851b2a38ebef43c2af7da4726058b3a88e6dda4cace43d2e944d99227") + + utxoHash0 = ReverseBytes(utxoHash0) + + inPubKey0, _ := hex.DecodeString("039ca3f93a9a0aabd4a940b9246ce174a4e7e796798fc7f7c02a5cbc85dd88b2fe") + // inPubkeyHash0, _ := hex.DecodeString("5ffe562c595838c8efec448fdddfbb9bca0de17f") + // Real signature from witness + inSig0, _ := hex.DecodeString("3045022100a44ab9bd7124a17598c641636d5e31b9e47ce2ecbaca11a969a18e7039edefad022054be2a8eda90e062dd0827833085423092af4c82b7ee4c8058bfad7d97c1954f") + + chainInfo := &bitcoinv2.ChainInfo{ + P2PkhPrefix: 48, + P2ShPrefix: 50, + } + + signingInput := bitcoinv2.SigningInput{ + DangerousUseFixedSchnorrRng: true, + ChainInfo: chainInfo, + PrivateKeys: [][]byte{privateKey}, + Transaction: &bitcoinv2.SigningInput_Builder{ + Builder: &bitcoinv2.TransactionBuilder{ + DustPolicy: &bitcoinv2.TransactionBuilder_FixedDustThreshold{ + FixedDustThreshold: 546, + }, + }, + }, + } + + builder := signingInput.Transaction.(*bitcoinv2.SigningInput_Builder).Builder + builder.Version = bitcoinv2.TransactionVersion_V1 + builder.InputSelector = bitcoinv2.InputSelector_UseAll + + utxo0 := &bitcoinv2.Input{ + OutPoint: &utxo.OutPoint{ + Hash: utxoHash0, + Vout: 0, + }, + Sequence: &bitcoinv2.Input_Sequence{ + Sequence: 0xffffffff, + }, + Value: 95118, + SighashType: uint32(core.BitcoinSigHashTypeAll), + ClaimingScript: &bitcoinv2.Input_ScriptBuilder{ + ScriptBuilder: &bitcoinv2.Input_InputBuilder{ + Variant: &bitcoinv2.Input_InputBuilder_P2Wpkh{ + P2Wpkh: &bitcoinv2.PublicKeyOrHash{ + Variant: &bitcoinv2.PublicKeyOrHash_Pubkey{ + Pubkey: inPubKey0, + }, + }, + }, + }, + }, + } + + out0 := bitcoinv2.Output{ + Value: int64(94118), + ToRecipient: &bitcoinv2.Output_ToAddress{ + ToAddress: "ltc1qzwus8mmd8y302aw20wg84whhszj6h0ay75vyhm", + }, + } + + builder.Inputs = make([]*bitcoinv2.Input, 0) + builder.Inputs = append(builder.Inputs, utxo0) + + builder.Outputs = make([]*bitcoinv2.Output, 0) + builder.Outputs = append(builder.Outputs, &out0) + + // Setup input + legacySigning := bitcoin.SigningInput{ + SigningV2: &signingInput, + } + + txInputData, e := proto.Marshal(&legacySigning) + fmt.Println("e:", e) + + var signingOutput bitcoin.SigningOutput + e = core.CreateSignedTx(&legacySigning, core.CoinTypeLitecoin, &signingOutput) + fmt.Println("", e) + fmt.Println("", hex.EncodeToString(signingOutput.SigningResultV2.Encoded)) + + // Step 2: Preimage hashes + hashes := core.PreImageHashes(core.CoinTypeLitecoin, txInputData) + + var preSigningOutput bitcoin.PreSigningOutput + err = proto.Unmarshal(hashes, &preSigningOutput) + + fmt.Println("PreimagesHash", err, preSigningOutput.PreSigningResultV2.Sighashes) + + SignData := preSigningOutput.PreSigningResultV2.Sighashes[0].Sighash + verifyRes := core.PublicKeyVerifyAsDER(inPubKey0, core.PublicKeyTypeSECP256k1, inSig0, SignData) + fmt.Println("signature verification:", verifyRes) +} + +type SignatureInfo struct { + signature []byte + publicKey []byte +} + +func ReverseBytes(b []byte) []byte { + n := len(b) + reversed := make([]byte, n) + for i := 0; i < n; i++ { + reversed[i] = b[n-1-i] + } + return reversed +} diff --git a/wrapper/go-wrapper/types/twdata.go b/wrapper/go-wrapper/types/twdata.go new file mode 100644 index 00000000000..e84f61a1287 --- /dev/null +++ b/wrapper/go-wrapper/types/twdata.go @@ -0,0 +1,31 @@ +package types + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" + +import ( + "encoding/hex" + "unsafe" +) + +// C.TWData -> Go byte[] +func TWDataGoBytes(d unsafe.Pointer) []byte { + cBytes := C.TWDataBytes(d) + cSize := C.TWDataSize(d) + return C.GoBytes(unsafe.Pointer(cBytes), C.int(cSize)) +} + +// Go byte[] -> C.TWData +func TWDataCreateWithGoBytes(d []byte) unsafe.Pointer { + cBytes := C.CBytes(d) + defer C.free(unsafe.Pointer(cBytes)) + data := C.TWDataCreateWithBytes((*C.uchar)(cBytes), C.ulong(len(d))) + return data +} + +// C.TWData -> Go hex string +func TWDataHexString(d unsafe.Pointer) string { + return hex.EncodeToString(TWDataGoBytes(d)) +} diff --git a/wrapper/go-wrapper/types/twstring.go b/wrapper/go-wrapper/types/twstring.go new file mode 100644 index 00000000000..c60b3c4c0bf --- /dev/null +++ b/wrapper/go-wrapper/types/twstring.go @@ -0,0 +1,23 @@ +package types + +// #cgo CFLAGS: -I../../../include +// #cgo LDFLAGS: -L../../../libs/linux-amd64 -lTrustWalletCore -lwallet_core_rs -lprotobuf -lTrezorCrypto -lstdc++ -lm +// #include +import "C" + +import ( + "unsafe" +) + +// C.TWString -> Go string +func TWStringGoString(s unsafe.Pointer) string { + return C.GoString(C.TWStringUTF8Bytes(s)) +} + +// Go string -> C.TWString +func TWStringCreateWithGoString(s string) unsafe.Pointer { + cStr := C.CString(s) + defer C.free(unsafe.Pointer(cStr)) + str := C.TWStringCreateWithUTF8Bytes(cStr) + return str +}