From 4d3d6b7c54eda1e9b961607e6bdd62d20129baab Mon Sep 17 00:00:00 2001 From: amit-momin <108959691+amit-momin@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:29:29 -0600 Subject: [PATCH 1/2] Add pharos atlantic support (#116) * Added pharos atlantic support * Force CI * Force CI --- capabilities/blockchain/evm/client.pb.go | 8 +++++--- capabilities/blockchain/evm/client_sdk_gen.go | 4 ++++ capabilities/blockchain/evm/go.mod | 2 +- capabilities/blockchain/evm/go.sum | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/capabilities/blockchain/evm/client.pb.go b/capabilities/blockchain/evm/client.pb.go index 15dba1e0..d007bd86 100644 --- a/capabilities/blockchain/evm/client.pb.go +++ b/capabilities/blockchain/evm/client.pb.go @@ -1791,7 +1791,7 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\bTxStatus\x12\x13\n" + "\x0fTX_STATUS_FATAL\x10\x00\x12\x16\n" + "\x12TX_STATUS_REVERTED\x10\x01\x12\x15\n" + - "\x11TX_STATUS_SUCCESS\x10\x022\xa9\x12\n" + + "\x11TX_STATUS_SUCCESS\x10\x022\xcf\x12\n" + "\x06Client\x12\x80\x01\n" + "\fCallContract\x128.capabilities.blockchain.evm.v1alpha.CallContractRequest\x1a6.capabilities.blockchain.evm.v1alpha.CallContractReply\x12z\n" + "\n" + @@ -1803,8 +1803,8 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x0eHeaderByNumber\x12:.capabilities.blockchain.evm.v1alpha.HeaderByNumberRequest\x1a8.capabilities.blockchain.evm.v1alpha.HeaderByNumberReply\x12v\n" + "\n" + "LogTrigger\x12<.capabilities.blockchain.evm.v1alpha.FilterLogTriggerRequest\x1a(.capabilities.blockchain.evm.v1alpha.Log0\x01\x12}\n" + - "\vWriteReport\x127.capabilities.blockchain.evm.v1alpha.WriteReportRequest\x1a5.capabilities.blockchain.evm.v1alpha.WriteReportReply\x1a\xee\b\x82\xb5\x18\xe9\b\b\x01\x12\tevm@1.0.0\x1a\xd9\b\n" + - "\rChainSelector\x12\xc7\b\x12\xc4\b\n" + + "\vWriteReport\x127.capabilities.blockchain.evm.v1alpha.WriteReportRequest\x1a5.capabilities.blockchain.evm.v1alpha.WriteReportReply\x1a\x94\t\x82\xb5\x18\x8f\t\b\x01\x12\tevm@1.0.0\x1a\xff\b\n" + + "\rChainSelector\x12\xed\b\x12\xea\b\n" + "$\n" + "\x17apechain-testnet-curtis\x10\xc1ô\xf8\x8dĒ\xb2\x89\x01\n" + "\x17\n" + @@ -1853,6 +1853,8 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\rjovay-mainnet\x10\xb5\xc3Ě\xa1\x80ߒ\x15\n" + "\x19\n" + "\rjovay-testnet\x10\xe4ϊ\x84\u07b2ގ\r\n" + + "$\n" + + "\x17pharos-atlantic-testnet\x10̙\xed\xe0μ\xaf\xb4\xdf\x01\n" + "\x1a\n" + "\x0epharos-mainnet\x10\xc8\xc1\x87\x9e\xf5\xef͡l\n" + "\x1a\n" + diff --git a/capabilities/blockchain/evm/client_sdk_gen.go b/capabilities/blockchain/evm/client_sdk_gen.go index 1f8e5fd5..5d89779d 100644 --- a/capabilities/blockchain/evm/client_sdk_gen.go +++ b/capabilities/blockchain/evm/client_sdk_gen.go @@ -366,6 +366,8 @@ const JovayMainnet = 1523760397290643893 const JovayTestnet = 945045181441419236 +const PharosAtlanticTestnet = 16098325658947243212 + const PharosMainnet = 7801139999541420232 const PlasmaTestnet = 3967220077692964309 @@ -426,6 +428,8 @@ func ChainSelectorFromName(name string) (uint64, error) { return JovayMainnet, nil case "jovay-testnet": return JovayTestnet, nil + case "pharos-atlantic-testnet": + return PharosAtlanticTestnet, nil case "pharos-mainnet": return PharosMainnet, nil case "plasma-testnet": diff --git a/capabilities/blockchain/evm/go.mod b/capabilities/blockchain/evm/go.mod index 0784e84c..055d7b07 100644 --- a/capabilities/blockchain/evm/go.mod +++ b/capabilities/blockchain/evm/go.mod @@ -4,7 +4,7 @@ go 1.25.3 require ( github.com/ethereum/go-ethereum v1.16.9 - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260227170625-e0e1c4094174 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260304171818-4962d40dc235 github.com/smartcontractkit/cre-sdk-go v1.0.1-0.20251111122439-00032d582c18 github.com/stretchr/testify v1.11.1 google.golang.org/protobuf v1.36.8 diff --git a/capabilities/blockchain/evm/go.sum b/capabilities/blockchain/evm/go.sum index 397e3cbc..cd32d196 100644 --- a/capabilities/blockchain/evm/go.sum +++ b/capabilities/blockchain/evm/go.sum @@ -45,8 +45,8 @@ github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1 github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260227170625-e0e1c4094174 h1:FEyNf4k8c7Tqe26fJg7BlC2U3pjUAu41yJes+ZmiQrU= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260227170625-e0e1c4094174/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260304171818-4962d40dc235 h1:tWckyqO1Fw/9nTOdUfDgaVzMCSdZTEU7nfpe6kWqNCE= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260304171818-4962d40dc235/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= github.com/smartcontractkit/cre-sdk-go v1.0.1-0.20251111122439-00032d582c18 h1:x8NX+vQzScvg4XbKDA0NF8hfxpruOjR78fag3SxhwOo= github.com/smartcontractkit/cre-sdk-go v1.0.1-0.20251111122439-00032d582c18/go.mod h1:sgiRyHUiPcxp1e/EMnaJ+ddMFL4MbE3UMZ2MORAAS9U= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= From d08647a6b874006869bb307d674ca155a854fac8 Mon Sep 17 00:00:00 2001 From: cawthorne Date: Wed, 11 Mar 2026 20:52:59 +0000 Subject: [PATCH 2/2] Add Aptos ViewRequest Capability --- capabilities/blockchain/aptos/client.pb.go | 1592 +++++++++++++++++ .../blockchain/aptos/client_sdk_gen.go | 197 ++ capabilities/blockchain/aptos/generate.go | 2 + .../blockchain/aptos/generate/main.go | 43 + capabilities/blockchain/aptos/go.mod | 16 + capabilities/blockchain/aptos/go.sum | 18 + 6 files changed, 1868 insertions(+) create mode 100644 capabilities/blockchain/aptos/client.pb.go create mode 100644 capabilities/blockchain/aptos/client_sdk_gen.go create mode 100644 capabilities/blockchain/aptos/generate.go create mode 100644 capabilities/blockchain/aptos/generate/main.go create mode 100644 capabilities/blockchain/aptos/go.mod create mode 100644 capabilities/blockchain/aptos/go.sum diff --git a/capabilities/blockchain/aptos/client.pb.go b/capabilities/blockchain/aptos/client.pb.go new file mode 100644 index 00000000..8770a267 --- /dev/null +++ b/capabilities/blockchain/aptos/client.pb.go @@ -0,0 +1,1592 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v5.29.3 +// source: capabilities/blockchain/aptos/v1alpha/client.proto + +package aptos + +import ( + sdk "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" + _ "github.com/smartcontractkit/chainlink-protos/cre/go/tools/generator" + 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 execution status returned by the forwarder. +type TxStatus int32 + +const ( + TxStatus_TX_STATUS_FATAL TxStatus = 0 // unrecoverable failure + TxStatus_TX_STATUS_ABORTED TxStatus = 1 // not executed / dropped + TxStatus_TX_STATUS_SUCCESS TxStatus = 2 // executed successfully +) + +// Enum value maps for TxStatus. +var ( + TxStatus_name = map[int32]string{ + 0: "TX_STATUS_FATAL", + 1: "TX_STATUS_ABORTED", + 2: "TX_STATUS_SUCCESS", + } + TxStatus_value = map[string]int32{ + "TX_STATUS_FATAL": 0, + "TX_STATUS_ABORTED": 1, + "TX_STATUS_SUCCESS": 2, + } +) + +func (x TxStatus) Enum() *TxStatus { + p := new(TxStatus) + *p = x + return p +} + +func (x TxStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TxStatus) Descriptor() protoreflect.EnumDescriptor { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[0].Descriptor() +} + +func (TxStatus) Type() protoreflect.EnumType { + return &file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[0] +} + +func (x TxStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TxStatus.Descriptor instead. +func (TxStatus) EnumDescriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{0} +} + +type TypeTagKind int32 + +const ( + TypeTagKind_TYPE_TAG_KIND_BOOL TypeTagKind = 0 + TypeTagKind_TYPE_TAG_KIND_U8 TypeTagKind = 1 + TypeTagKind_TYPE_TAG_KIND_U16 TypeTagKind = 2 + TypeTagKind_TYPE_TAG_KIND_U32 TypeTagKind = 3 + TypeTagKind_TYPE_TAG_KIND_U64 TypeTagKind = 4 + TypeTagKind_TYPE_TAG_KIND_U128 TypeTagKind = 5 + TypeTagKind_TYPE_TAG_KIND_U256 TypeTagKind = 6 + TypeTagKind_TYPE_TAG_KIND_ADDRESS TypeTagKind = 7 + TypeTagKind_TYPE_TAG_KIND_SIGNER TypeTagKind = 8 + TypeTagKind_TYPE_TAG_KIND_VECTOR TypeTagKind = 9 + TypeTagKind_TYPE_TAG_KIND_STRUCT TypeTagKind = 10 + TypeTagKind_TYPE_TAG_KIND_GENERIC TypeTagKind = 11 +) + +// Enum value maps for TypeTagKind. +var ( + TypeTagKind_name = map[int32]string{ + 0: "TYPE_TAG_KIND_BOOL", + 1: "TYPE_TAG_KIND_U8", + 2: "TYPE_TAG_KIND_U16", + 3: "TYPE_TAG_KIND_U32", + 4: "TYPE_TAG_KIND_U64", + 5: "TYPE_TAG_KIND_U128", + 6: "TYPE_TAG_KIND_U256", + 7: "TYPE_TAG_KIND_ADDRESS", + 8: "TYPE_TAG_KIND_SIGNER", + 9: "TYPE_TAG_KIND_VECTOR", + 10: "TYPE_TAG_KIND_STRUCT", + 11: "TYPE_TAG_KIND_GENERIC", + } + TypeTagKind_value = map[string]int32{ + "TYPE_TAG_KIND_BOOL": 0, + "TYPE_TAG_KIND_U8": 1, + "TYPE_TAG_KIND_U16": 2, + "TYPE_TAG_KIND_U32": 3, + "TYPE_TAG_KIND_U64": 4, + "TYPE_TAG_KIND_U128": 5, + "TYPE_TAG_KIND_U256": 6, + "TYPE_TAG_KIND_ADDRESS": 7, + "TYPE_TAG_KIND_SIGNER": 8, + "TYPE_TAG_KIND_VECTOR": 9, + "TYPE_TAG_KIND_STRUCT": 10, + "TYPE_TAG_KIND_GENERIC": 11, + } +) + +func (x TypeTagKind) Enum() *TypeTagKind { + p := new(TypeTagKind) + *p = x + return p +} + +func (x TypeTagKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TypeTagKind) Descriptor() protoreflect.EnumDescriptor { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[1].Descriptor() +} + +func (TypeTagKind) Type() protoreflect.EnumType { + return &file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[1] +} + +func (x TypeTagKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TypeTagKind.Descriptor instead. +func (TypeTagKind) EnumDescriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{1} +} + +type TransactionVariant int32 + +const ( + TransactionVariant_TRANSACTION_VARIANT_PENDING TransactionVariant = 0 + TransactionVariant_TRANSACTION_VARIANT_USER TransactionVariant = 1 + TransactionVariant_TRANSACTION_VARIANT_GENESIS TransactionVariant = 2 + TransactionVariant_TRANSACTION_VARIANT_BLOCK_METADATA TransactionVariant = 3 + TransactionVariant_TRANSACTION_VARIANT_BLOCK_EPILOGUE TransactionVariant = 4 + TransactionVariant_TRANSACTION_VARIANT_STATE_CHECKPOINT TransactionVariant = 5 + TransactionVariant_TRANSACTION_VARIANT_VALIDATOR TransactionVariant = 6 + TransactionVariant_TRANSACTION_VARIANT_UNKNOWN TransactionVariant = 7 +) + +// Enum value maps for TransactionVariant. +var ( + TransactionVariant_name = map[int32]string{ + 0: "TRANSACTION_VARIANT_PENDING", + 1: "TRANSACTION_VARIANT_USER", + 2: "TRANSACTION_VARIANT_GENESIS", + 3: "TRANSACTION_VARIANT_BLOCK_METADATA", + 4: "TRANSACTION_VARIANT_BLOCK_EPILOGUE", + 5: "TRANSACTION_VARIANT_STATE_CHECKPOINT", + 6: "TRANSACTION_VARIANT_VALIDATOR", + 7: "TRANSACTION_VARIANT_UNKNOWN", + } + TransactionVariant_value = map[string]int32{ + "TRANSACTION_VARIANT_PENDING": 0, + "TRANSACTION_VARIANT_USER": 1, + "TRANSACTION_VARIANT_GENESIS": 2, + "TRANSACTION_VARIANT_BLOCK_METADATA": 3, + "TRANSACTION_VARIANT_BLOCK_EPILOGUE": 4, + "TRANSACTION_VARIANT_STATE_CHECKPOINT": 5, + "TRANSACTION_VARIANT_VALIDATOR": 6, + "TRANSACTION_VARIANT_UNKNOWN": 7, + } +) + +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_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[2].Descriptor() +} + +func (TransactionVariant) Type() protoreflect.EnumType { + return &file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[2] +} + +func (x TransactionVariant) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionVariant.Descriptor instead. +func (TransactionVariant) EnumDescriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{2} +} + +type AccountAPTBalanceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 32-byte address + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountAPTBalanceRequest) Reset() { + *x = AccountAPTBalanceRequest{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountAPTBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountAPTBalanceRequest) ProtoMessage() {} + +func (x *AccountAPTBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 AccountAPTBalanceRequest.ProtoReflect.Descriptor instead. +func (*AccountAPTBalanceRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{0} +} + +func (x *AccountAPTBalanceRequest) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +type AccountAPTBalanceReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountAPTBalanceReply) Reset() { + *x = AccountAPTBalanceReply{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountAPTBalanceReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountAPTBalanceReply) ProtoMessage() {} + +func (x *AccountAPTBalanceReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 AccountAPTBalanceReply.ProtoReflect.Descriptor instead. +func (*AccountAPTBalanceReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountAPTBalanceReply) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +type ViewRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Payload *ViewPayload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + LedgerVersion *uint64 `protobuf:"varint,2,opt,name=ledger_version,json=ledgerVersion,proto3,oneof" json:"ledger_version,omitempty"` // nil means use latest ledger version + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ViewRequest) Reset() { + *x = ViewRequest{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ViewRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewRequest) ProtoMessage() {} + +func (x *ViewRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 ViewRequest.ProtoReflect.Descriptor instead. +func (*ViewRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{2} +} + +func (x *ViewRequest) GetPayload() *ViewPayload { + if x != nil { + return x.Payload + } + return nil +} + +func (x *ViewRequest) GetLedgerVersion() uint64 { + if x != nil && x.LedgerVersion != nil { + return *x.LedgerVersion + } + return 0 +} + +type ViewReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ViewReply) Reset() { + *x = ViewReply{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ViewReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewReply) ProtoMessage() {} + +func (x *ViewReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 ViewReply.ProtoReflect.Descriptor instead. +func (*ViewReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{3} +} + +func (x *ViewReply) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type ViewPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + Module *ModuleID `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"` + Function string `protobuf:"bytes,2,opt,name=function,proto3" json:"function,omitempty"` + ArgTypes []*TypeTag `protobuf:"bytes,3,rep,name=arg_types,json=argTypes,proto3" json:"arg_types,omitempty"` + Args [][]byte `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ViewPayload) Reset() { + *x = ViewPayload{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ViewPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewPayload) ProtoMessage() {} + +func (x *ViewPayload) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 ViewPayload.ProtoReflect.Descriptor instead. +func (*ViewPayload) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{4} +} + +func (x *ViewPayload) GetModule() *ModuleID { + if x != nil { + return x.Module + } + return nil +} + +func (x *ViewPayload) GetFunction() string { + if x != nil { + return x.Function + } + return "" +} + +func (x *ViewPayload) GetArgTypes() []*TypeTag { + if x != nil { + return x.ArgTypes + } + return nil +} + +func (x *ViewPayload) GetArgs() [][]byte { + if x != nil { + return x.Args + } + return nil +} + +type ModuleID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 32-byte address + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleID) Reset() { + *x = ModuleID{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleID) ProtoMessage() {} + +func (x *ModuleID) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 ModuleID.ProtoReflect.Descriptor instead. +func (*ModuleID) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{5} +} + +func (x *ModuleID) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *ModuleID) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type TypeTag struct { + state protoimpl.MessageState `protogen:"open.v1"` + Kind TypeTagKind `protobuf:"varint,1,opt,name=kind,proto3,enum=capabilities.blockchain.aptos.v1alpha.TypeTagKind" json:"kind,omitempty"` + // Types that are valid to be assigned to Value: + // + // *TypeTag_Vector + // *TypeTag_Struct + // *TypeTag_Generic + Value isTypeTag_Value `protobuf_oneof:"value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TypeTag) Reset() { + *x = TypeTag{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TypeTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypeTag) ProtoMessage() {} + +func (x *TypeTag) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 TypeTag.ProtoReflect.Descriptor instead. +func (*TypeTag) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{6} +} + +func (x *TypeTag) GetKind() TypeTagKind { + if x != nil { + return x.Kind + } + return TypeTagKind_TYPE_TAG_KIND_BOOL +} + +func (x *TypeTag) GetValue() isTypeTag_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *TypeTag) GetVector() *VectorTag { + if x != nil { + if x, ok := x.Value.(*TypeTag_Vector); ok { + return x.Vector + } + } + return nil +} + +func (x *TypeTag) GetStruct() *StructTag { + if x != nil { + if x, ok := x.Value.(*TypeTag_Struct); ok { + return x.Struct + } + } + return nil +} + +func (x *TypeTag) GetGeneric() *GenericTag { + if x != nil { + if x, ok := x.Value.(*TypeTag_Generic); ok { + return x.Generic + } + } + return nil +} + +type isTypeTag_Value interface { + isTypeTag_Value() +} + +type TypeTag_Vector struct { + Vector *VectorTag `protobuf:"bytes,2,opt,name=vector,proto3,oneof"` +} + +type TypeTag_Struct struct { + Struct *StructTag `protobuf:"bytes,3,opt,name=struct,proto3,oneof"` +} + +type TypeTag_Generic struct { + Generic *GenericTag `protobuf:"bytes,4,opt,name=generic,proto3,oneof"` +} + +func (*TypeTag_Vector) isTypeTag_Value() {} + +func (*TypeTag_Struct) isTypeTag_Value() {} + +func (*TypeTag_Generic) isTypeTag_Value() {} + +type VectorTag struct { + state protoimpl.MessageState `protogen:"open.v1"` + ElementType *TypeTag `protobuf:"bytes,1,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VectorTag) Reset() { + *x = VectorTag{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VectorTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VectorTag) ProtoMessage() {} + +func (x *VectorTag) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 VectorTag.ProtoReflect.Descriptor instead. +func (*VectorTag) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{7} +} + +func (x *VectorTag) GetElementType() *TypeTag { + if x != nil { + return x.ElementType + } + return nil +} + +type StructTag struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 32-byte address + Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + TypeParams []*TypeTag `protobuf:"bytes,4,rep,name=type_params,json=typeParams,proto3" json:"type_params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StructTag) Reset() { + *x = StructTag{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[8] + 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_capabilities_blockchain_aptos_v1alpha_client_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 StructTag.ProtoReflect.Descriptor instead. +func (*StructTag) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{8} +} + +func (x *StructTag) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *StructTag) GetModule() string { + if x != nil { + return x.Module + } + return "" +} + +func (x *StructTag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StructTag) GetTypeParams() []*TypeTag { + if x != nil { + return x.TypeParams + } + return nil +} + +type GenericTag 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 *GenericTag) Reset() { + *x = GenericTag{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GenericTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericTag) ProtoMessage() {} + +func (x *GenericTag) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 GenericTag.ProtoReflect.Descriptor instead. +func (*GenericTag) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{9} +} + +func (x *GenericTag) GetIndex() uint32 { + if x != nil { + return x.Index + } + return 0 +} + +type TransactionByHashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // Transaction hash (hex string with 0x prefix) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionByHashRequest) Reset() { + *x = TransactionByHashRequest{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionByHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionByHashRequest) ProtoMessage() {} + +func (x *TransactionByHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 TransactionByHashRequest.ProtoReflect.Descriptor instead. +func (*TransactionByHashRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{10} +} + +func (x *TransactionByHashRequest) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +type TransactionByHashReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3,oneof" json:"transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionByHashReply) Reset() { + *x = TransactionByHashReply{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionByHashReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionByHashReply) ProtoMessage() {} + +func (x *TransactionByHashReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 TransactionByHashReply.ProtoReflect.Descriptor instead. +func (*TransactionByHashReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{11} +} + +func (x *TransactionByHashReply) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type TransactionVariant `protobuf:"varint,1,opt,name=type,proto3,enum=capabilities.blockchain.aptos.v1alpha.TransactionVariant" json:"type,omitempty"` + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Version *uint64 `protobuf:"varint,3,opt,name=version,proto3,oneof" json:"version,omitempty"` // nil for pending transactions + Success *bool `protobuf:"varint,4,opt,name=success,proto3,oneof" json:"success,omitempty"` // nil for pending/genesis transactions + Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // Raw transaction data + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[12] + 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_capabilities_blockchain_aptos_v1alpha_client_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.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{12} +} + +func (x *Transaction) GetType() TransactionVariant { + if x != nil { + return x.Type + } + return TransactionVariant_TRANSACTION_VARIANT_PENDING +} + +func (x *Transaction) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *Transaction) GetVersion() uint64 { + if x != nil && x.Version != nil { + return *x.Version + } + return 0 +} + +func (x *Transaction) GetSuccess() bool { + if x != nil && x.Success != nil { + return *x.Success + } + return false +} + +func (x *Transaction) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type AccountTransactionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // 32-byte address + Start *uint64 `protobuf:"varint,2,opt,name=start,proto3,oneof" json:"start,omitempty"` // Starting version number; nil for most recent + Limit *uint64 `protobuf:"varint,3,opt,name=limit,proto3,oneof" json:"limit,omitempty"` // Number of transactions to return; nil for default (~100) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountTransactionsRequest) Reset() { + *x = AccountTransactionsRequest{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountTransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountTransactionsRequest) ProtoMessage() {} + +func (x *AccountTransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 AccountTransactionsRequest.ProtoReflect.Descriptor instead. +func (*AccountTransactionsRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{13} +} + +func (x *AccountTransactionsRequest) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *AccountTransactionsRequest) GetStart() uint64 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *AccountTransactionsRequest) GetLimit() uint64 { + if x != nil && x.Limit != nil { + return *x.Limit + } + return 0 +} + +type AccountTransactionsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Transactions []*Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountTransactionsReply) Reset() { + *x = AccountTransactionsReply{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountTransactionsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountTransactionsReply) ProtoMessage() {} + +func (x *AccountTransactionsReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 AccountTransactionsReply.ProtoReflect.Descriptor instead. +func (*AccountTransactionsReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{14} +} + +func (x *AccountTransactionsReply) GetTransactions() []*Transaction { + if x != nil { + return x.Transactions + } + return nil +} + +type SubmitTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReceiverModuleId *ModuleID `protobuf:"bytes,1,opt,name=receiver_module_id,json=receiverModuleId,proto3" json:"receiver_module_id,omitempty"` + EncodedPayload []byte `protobuf:"bytes,2,opt,name=encoded_payload,json=encodedPayload,proto3" json:"encoded_payload,omitempty"` + GasConfig *GasConfig `protobuf:"bytes,3,opt,name=gas_config,json=gasConfig,proto3,oneof" json:"gas_config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitTransactionRequest) Reset() { + *x = SubmitTransactionRequest{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubmitTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitTransactionRequest) ProtoMessage() {} + +func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 SubmitTransactionRequest.ProtoReflect.Descriptor instead. +func (*SubmitTransactionRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{15} +} + +func (x *SubmitTransactionRequest) GetReceiverModuleId() *ModuleID { + if x != nil { + return x.ReceiverModuleId + } + return nil +} + +func (x *SubmitTransactionRequest) GetEncodedPayload() []byte { + if x != nil { + return x.EncodedPayload + } + return nil +} + +func (x *SubmitTransactionRequest) GetGasConfig() *GasConfig { + if x != nil { + return x.GasConfig + } + return nil +} + +type SubmitTransactionReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + TxStatus TxStatus `protobuf:"varint,1,opt,name=tx_status,json=txStatus,proto3,enum=capabilities.blockchain.aptos.v1alpha.TxStatus" json:"tx_status,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + TxIdempotencyKey string `protobuf:"bytes,3,opt,name=tx_idempotency_key,json=txIdempotencyKey,proto3" json:"tx_idempotency_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubmitTransactionReply) Reset() { + *x = SubmitTransactionReply{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubmitTransactionReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubmitTransactionReply) ProtoMessage() {} + +func (x *SubmitTransactionReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 SubmitTransactionReply.ProtoReflect.Descriptor instead. +func (*SubmitTransactionReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{16} +} + +func (x *SubmitTransactionReply) GetTxStatus() TxStatus { + if x != nil { + return x.TxStatus + } + return TxStatus_TX_STATUS_FATAL +} + +func (x *SubmitTransactionReply) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *SubmitTransactionReply) GetTxIdempotencyKey() string { + if x != nil { + return x.TxIdempotencyKey + } + return "" +} + +type GasConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + MaxGasAmount uint64 `protobuf:"varint,1,opt,name=max_gas_amount,json=maxGasAmount,proto3" json:"max_gas_amount,omitempty"` // Maximum gas units willing to pay + GasUnitPrice uint64 `protobuf:"varint,2,opt,name=gas_unit_price,json=gasUnitPrice,proto3" json:"gas_unit_price,omitempty"` // Price per gas unit in octas + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GasConfig) Reset() { + *x = GasConfig{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GasConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GasConfig) ProtoMessage() {} + +func (x *GasConfig) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 GasConfig.ProtoReflect.Descriptor instead. +func (*GasConfig) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{17} +} + +func (x *GasConfig) GetMaxGasAmount() uint64 { + if x != nil { + return x.MaxGasAmount + } + return 0 +} + +func (x *GasConfig) GetGasUnitPrice() uint64 { + if x != nil { + return x.GasUnitPrice + } + return 0 +} + +type WriteReportRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Receiver []byte `protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"` // 32-byte Aptos account address of the receiver module + GasConfig *GasConfig `protobuf:"bytes,2,opt,name=gas_config,json=gasConfig,proto3,oneof" json:"gas_config,omitempty"` // optional gas configuration + Report *sdk.ReportResponse `protobuf:"bytes,3,opt,name=report,proto3" json:"report,omitempty"` // signed report from consensus + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WriteReportRequest) Reset() { + *x = WriteReportRequest{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WriteReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteReportRequest) ProtoMessage() {} + +func (x *WriteReportRequest) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 WriteReportRequest.ProtoReflect.Descriptor instead. +func (*WriteReportRequest) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{18} +} + +func (x *WriteReportRequest) GetReceiver() []byte { + if x != nil { + return x.Receiver + } + return nil +} + +func (x *WriteReportRequest) GetGasConfig() *GasConfig { + if x != nil { + return x.GasConfig + } + return nil +} + +func (x *WriteReportRequest) GetReport() *sdk.ReportResponse { + if x != nil { + return x.Report + } + return nil +} + +type WriteReportReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + TxStatus TxStatus `protobuf:"varint,1,opt,name=tx_status,json=txStatus,proto3,enum=capabilities.blockchain.aptos.v1alpha.TxStatus" json:"tx_status,omitempty"` + TxHash *string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3,oneof" json:"tx_hash,omitempty"` // transaction hash (hex string with 0x prefix) + TransactionFee *uint64 `protobuf:"varint,3,opt,name=transaction_fee,json=transactionFee,proto3,oneof" json:"transaction_fee,omitempty"` // gas used in octas + ErrorMessage *string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3,oneof" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WriteReportReply) Reset() { + *x = WriteReportReply{} + mi := &file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WriteReportReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteReportReply) ProtoMessage() {} + +func (x *WriteReportReply) ProtoReflect() protoreflect.Message { + mi := &file_capabilities_blockchain_aptos_v1alpha_client_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 WriteReportReply.ProtoReflect.Descriptor instead. +func (*WriteReportReply) Descriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{19} +} + +func (x *WriteReportReply) GetTxStatus() TxStatus { + if x != nil { + return x.TxStatus + } + return TxStatus_TX_STATUS_FATAL +} + +func (x *WriteReportReply) GetTxHash() string { + if x != nil && x.TxHash != nil { + return *x.TxHash + } + return "" +} + +func (x *WriteReportReply) GetTransactionFee() uint64 { + if x != nil && x.TransactionFee != nil { + return *x.TransactionFee + } + return 0 +} + +func (x *WriteReportReply) GetErrorMessage() string { + if x != nil && x.ErrorMessage != nil { + return *x.ErrorMessage + } + return "" +} + +var File_capabilities_blockchain_aptos_v1alpha_client_proto protoreflect.FileDescriptor + +const file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDesc = "" + + "\n" + + "2capabilities/blockchain/aptos/v1alpha/client.proto\x12%capabilities.blockchain.aptos.v1alpha\x1a\x15sdk/v1alpha/sdk.proto\x1a*tools/generator/v1alpha/cre_metadata.proto\"4\n" + + "\x18AccountAPTBalanceRequest\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\".\n" + + "\x16AccountAPTBalanceReply\x12\x14\n" + + "\x05value\x18\x01 \x01(\x04R\x05value\"\x9a\x01\n" + + "\vViewRequest\x12L\n" + + "\apayload\x18\x01 \x01(\v22.capabilities.blockchain.aptos.v1alpha.ViewPayloadR\apayload\x12*\n" + + "\x0eledger_version\x18\x02 \x01(\x04H\x00R\rledgerVersion\x88\x01\x01B\x11\n" + + "\x0f_ledger_version\"\x1f\n" + + "\tViewReply\x12\x12\n" + + "\x04data\x18\x01 \x01(\fR\x04data\"\xd3\x01\n" + + "\vViewPayload\x12G\n" + + "\x06module\x18\x01 \x01(\v2/.capabilities.blockchain.aptos.v1alpha.ModuleIDR\x06module\x12\x1a\n" + + "\bfunction\x18\x02 \x01(\tR\bfunction\x12K\n" + + "\targ_types\x18\x03 \x03(\v2..capabilities.blockchain.aptos.v1alpha.TypeTagR\bargTypes\x12\x12\n" + + "\x04args\x18\x04 \x03(\fR\x04args\"8\n" + + "\bModuleID\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"\xc1\x02\n" + + "\aTypeTag\x12F\n" + + "\x04kind\x18\x01 \x01(\x0e22.capabilities.blockchain.aptos.v1alpha.TypeTagKindR\x04kind\x12J\n" + + "\x06vector\x18\x02 \x01(\v20.capabilities.blockchain.aptos.v1alpha.VectorTagH\x00R\x06vector\x12J\n" + + "\x06struct\x18\x03 \x01(\v20.capabilities.blockchain.aptos.v1alpha.StructTagH\x00R\x06struct\x12M\n" + + "\ageneric\x18\x04 \x01(\v21.capabilities.blockchain.aptos.v1alpha.GenericTagH\x00R\agenericB\a\n" + + "\x05value\"^\n" + + "\tVectorTag\x12Q\n" + + "\felement_type\x18\x01 \x01(\v2..capabilities.blockchain.aptos.v1alpha.TypeTagR\velementType\"\xa2\x01\n" + + "\tStructTag\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\x12\x16\n" + + "\x06module\x18\x02 \x01(\tR\x06module\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12O\n" + + "\vtype_params\x18\x04 \x03(\v2..capabilities.blockchain.aptos.v1alpha.TypeTagR\n" + + "typeParams\"\"\n" + + "\n" + + "GenericTag\x12\x14\n" + + "\x05index\x18\x01 \x01(\rR\x05index\".\n" + + "\x18TransactionByHashRequest\x12\x12\n" + + "\x04hash\x18\x01 \x01(\tR\x04hash\"\x83\x01\n" + + "\x16TransactionByHashReply\x12Y\n" + + "\vtransaction\x18\x01 \x01(\v22.capabilities.blockchain.aptos.v1alpha.TransactionH\x00R\vtransaction\x88\x01\x01B\x0e\n" + + "\f_transaction\"\xda\x01\n" + + "\vTransaction\x12M\n" + + "\x04type\x18\x01 \x01(\x0e29.capabilities.blockchain.aptos.v1alpha.TransactionVariantR\x04type\x12\x12\n" + + "\x04hash\x18\x02 \x01(\tR\x04hash\x12\x1d\n" + + "\aversion\x18\x03 \x01(\x04H\x00R\aversion\x88\x01\x01\x12\x1d\n" + + "\asuccess\x18\x04 \x01(\bH\x01R\asuccess\x88\x01\x01\x12\x12\n" + + "\x04data\x18\x05 \x01(\fR\x04dataB\n" + + "\n" + + "\b_versionB\n" + + "\n" + + "\b_success\"\x80\x01\n" + + "\x1aAccountTransactionsRequest\x12\x18\n" + + "\aaddress\x18\x01 \x01(\fR\aaddress\x12\x19\n" + + "\x05start\x18\x02 \x01(\x04H\x00R\x05start\x88\x01\x01\x12\x19\n" + + "\x05limit\x18\x03 \x01(\x04H\x01R\x05limit\x88\x01\x01B\b\n" + + "\x06_startB\b\n" + + "\x06_limit\"r\n" + + "\x18AccountTransactionsReply\x12V\n" + + "\ftransactions\x18\x01 \x03(\v22.capabilities.blockchain.aptos.v1alpha.TransactionR\ftransactions\"\x87\x02\n" + + "\x18SubmitTransactionRequest\x12]\n" + + "\x12receiver_module_id\x18\x01 \x01(\v2/.capabilities.blockchain.aptos.v1alpha.ModuleIDR\x10receiverModuleId\x12'\n" + + "\x0fencoded_payload\x18\x02 \x01(\fR\x0eencodedPayload\x12T\n" + + "\n" + + "gas_config\x18\x03 \x01(\v20.capabilities.blockchain.aptos.v1alpha.GasConfigH\x00R\tgasConfig\x88\x01\x01B\r\n" + + "\v_gas_config\"\xad\x01\n" + + "\x16SubmitTransactionReply\x12L\n" + + "\ttx_status\x18\x01 \x01(\x0e2/.capabilities.blockchain.aptos.v1alpha.TxStatusR\btxStatus\x12\x17\n" + + "\atx_hash\x18\x02 \x01(\tR\x06txHash\x12,\n" + + "\x12tx_idempotency_key\x18\x03 \x01(\tR\x10txIdempotencyKey\"W\n" + + "\tGasConfig\x12$\n" + + "\x0emax_gas_amount\x18\x01 \x01(\x04R\fmaxGasAmount\x12$\n" + + "\x0egas_unit_price\x18\x02 \x01(\x04R\fgasUnitPrice\"\xca\x01\n" + + "\x12WriteReportRequest\x12\x1a\n" + + "\breceiver\x18\x01 \x01(\fR\breceiver\x12T\n" + + "\n" + + "gas_config\x18\x02 \x01(\v20.capabilities.blockchain.aptos.v1alpha.GasConfigH\x00R\tgasConfig\x88\x01\x01\x123\n" + + "\x06report\x18\x03 \x01(\v2\x1b.sdk.v1alpha.ReportResponseR\x06reportB\r\n" + + "\v_gas_config\"\x88\x02\n" + + "\x10WriteReportReply\x12L\n" + + "\ttx_status\x18\x01 \x01(\x0e2/.capabilities.blockchain.aptos.v1alpha.TxStatusR\btxStatus\x12\x1c\n" + + "\atx_hash\x18\x02 \x01(\tH\x00R\x06txHash\x88\x01\x01\x12,\n" + + "\x0ftransaction_fee\x18\x03 \x01(\x04H\x01R\x0etransactionFee\x88\x01\x01\x12(\n" + + "\rerror_message\x18\x04 \x01(\tH\x02R\ferrorMessage\x88\x01\x01B\n" + + "\n" + + "\b_tx_hashB\x12\n" + + "\x10_transaction_feeB\x10\n" + + "\x0e_error_message*M\n" + + "\bTxStatus\x12\x13\n" + + "\x0fTX_STATUS_FATAL\x10\x00\x12\x15\n" + + "\x11TX_STATUS_ABORTED\x10\x01\x12\x15\n" + + "\x11TX_STATUS_SUCCESS\x10\x02*\xb4\x02\n" + + "\vTypeTagKind\x12\x16\n" + + "\x12TYPE_TAG_KIND_BOOL\x10\x00\x12\x14\n" + + "\x10TYPE_TAG_KIND_U8\x10\x01\x12\x15\n" + + "\x11TYPE_TAG_KIND_U16\x10\x02\x12\x15\n" + + "\x11TYPE_TAG_KIND_U32\x10\x03\x12\x15\n" + + "\x11TYPE_TAG_KIND_U64\x10\x04\x12\x16\n" + + "\x12TYPE_TAG_KIND_U128\x10\x05\x12\x16\n" + + "\x12TYPE_TAG_KIND_U256\x10\x06\x12\x19\n" + + "\x15TYPE_TAG_KIND_ADDRESS\x10\a\x12\x18\n" + + "\x14TYPE_TAG_KIND_SIGNER\x10\b\x12\x18\n" + + "\x14TYPE_TAG_KIND_VECTOR\x10\t\x12\x18\n" + + "\x14TYPE_TAG_KIND_STRUCT\x10\n" + + "\x12\x19\n" + + "\x15TYPE_TAG_KIND_GENERIC\x10\v*\xb2\x02\n" + + "\x12TransactionVariant\x12\x1f\n" + + "\x1bTRANSACTION_VARIANT_PENDING\x10\x00\x12\x1c\n" + + "\x18TRANSACTION_VARIANT_USER\x10\x01\x12\x1f\n" + + "\x1bTRANSACTION_VARIANT_GENESIS\x10\x02\x12&\n" + + "\"TRANSACTION_VARIANT_BLOCK_METADATA\x10\x03\x12&\n" + + "\"TRANSACTION_VARIANT_BLOCK_EPILOGUE\x10\x04\x12(\n" + + "$TRANSACTION_VARIANT_STATE_CHECKPOINT\x10\x05\x12!\n" + + "\x1dTRANSACTION_VARIANT_VALIDATOR\x10\x06\x12\x1f\n" + + "\x1bTRANSACTION_VARIANT_UNKNOWN\x10\a2\xa2\x06\n" + + "\x06Client\x12\x93\x01\n" + + "\x11AccountAPTBalance\x12?.capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceRequest\x1a=.capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceReply\x12l\n" + + "\x04View\x122.capabilities.blockchain.aptos.v1alpha.ViewRequest\x1a0.capabilities.blockchain.aptos.v1alpha.ViewReply\x12\x93\x01\n" + + "\x11TransactionByHash\x12?.capabilities.blockchain.aptos.v1alpha.TransactionByHashRequest\x1a=.capabilities.blockchain.aptos.v1alpha.TransactionByHashReply\x12\x99\x01\n" + + "\x13AccountTransactions\x12A.capabilities.blockchain.aptos.v1alpha.AccountTransactionsRequest\x1a?.capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply\x12\x81\x01\n" + + "\vWriteReport\x129.capabilities.blockchain.aptos.v1alpha.WriteReportRequest\x1a7.capabilities.blockchain.aptos.v1alpha.WriteReportReply\x1a^\x82\xb5\x18Z\b\x01\x12\vaptos@1.0.0\x1aI\n" + + "\rChainSelector\x128\x126\n" + + "\x19\n" + + "\raptos-mainnet\x10\ued42\x90\x9b\x99\xbd\xe6A\n" + + "\x19\n" + + "\raptos-testnet\x10\x95҆\x9e\xe3\xfd\x94\xa8\n" + + "b\x06proto3" + +var ( + file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescOnce sync.Once + file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescData []byte +) + +func file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP() []byte { + file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescOnce.Do(func() { + file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDesc), len(file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDesc))) + }) + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescData +} + +var file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_capabilities_blockchain_aptos_v1alpha_client_proto_goTypes = []any{ + (TxStatus)(0), // 0: capabilities.blockchain.aptos.v1alpha.TxStatus + (TypeTagKind)(0), // 1: capabilities.blockchain.aptos.v1alpha.TypeTagKind + (TransactionVariant)(0), // 2: capabilities.blockchain.aptos.v1alpha.TransactionVariant + (*AccountAPTBalanceRequest)(nil), // 3: capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceRequest + (*AccountAPTBalanceReply)(nil), // 4: capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceReply + (*ViewRequest)(nil), // 5: capabilities.blockchain.aptos.v1alpha.ViewRequest + (*ViewReply)(nil), // 6: capabilities.blockchain.aptos.v1alpha.ViewReply + (*ViewPayload)(nil), // 7: capabilities.blockchain.aptos.v1alpha.ViewPayload + (*ModuleID)(nil), // 8: capabilities.blockchain.aptos.v1alpha.ModuleID + (*TypeTag)(nil), // 9: capabilities.blockchain.aptos.v1alpha.TypeTag + (*VectorTag)(nil), // 10: capabilities.blockchain.aptos.v1alpha.VectorTag + (*StructTag)(nil), // 11: capabilities.blockchain.aptos.v1alpha.StructTag + (*GenericTag)(nil), // 12: capabilities.blockchain.aptos.v1alpha.GenericTag + (*TransactionByHashRequest)(nil), // 13: capabilities.blockchain.aptos.v1alpha.TransactionByHashRequest + (*TransactionByHashReply)(nil), // 14: capabilities.blockchain.aptos.v1alpha.TransactionByHashReply + (*Transaction)(nil), // 15: capabilities.blockchain.aptos.v1alpha.Transaction + (*AccountTransactionsRequest)(nil), // 16: capabilities.blockchain.aptos.v1alpha.AccountTransactionsRequest + (*AccountTransactionsReply)(nil), // 17: capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply + (*SubmitTransactionRequest)(nil), // 18: capabilities.blockchain.aptos.v1alpha.SubmitTransactionRequest + (*SubmitTransactionReply)(nil), // 19: capabilities.blockchain.aptos.v1alpha.SubmitTransactionReply + (*GasConfig)(nil), // 20: capabilities.blockchain.aptos.v1alpha.GasConfig + (*WriteReportRequest)(nil), // 21: capabilities.blockchain.aptos.v1alpha.WriteReportRequest + (*WriteReportReply)(nil), // 22: capabilities.blockchain.aptos.v1alpha.WriteReportReply + (*sdk.ReportResponse)(nil), // 23: sdk.v1alpha.ReportResponse +} +var file_capabilities_blockchain_aptos_v1alpha_client_proto_depIdxs = []int32{ + 7, // 0: capabilities.blockchain.aptos.v1alpha.ViewRequest.payload:type_name -> capabilities.blockchain.aptos.v1alpha.ViewPayload + 8, // 1: capabilities.blockchain.aptos.v1alpha.ViewPayload.module:type_name -> capabilities.blockchain.aptos.v1alpha.ModuleID + 9, // 2: capabilities.blockchain.aptos.v1alpha.ViewPayload.arg_types:type_name -> capabilities.blockchain.aptos.v1alpha.TypeTag + 1, // 3: capabilities.blockchain.aptos.v1alpha.TypeTag.kind:type_name -> capabilities.blockchain.aptos.v1alpha.TypeTagKind + 10, // 4: capabilities.blockchain.aptos.v1alpha.TypeTag.vector:type_name -> capabilities.blockchain.aptos.v1alpha.VectorTag + 11, // 5: capabilities.blockchain.aptos.v1alpha.TypeTag.struct:type_name -> capabilities.blockchain.aptos.v1alpha.StructTag + 12, // 6: capabilities.blockchain.aptos.v1alpha.TypeTag.generic:type_name -> capabilities.blockchain.aptos.v1alpha.GenericTag + 9, // 7: capabilities.blockchain.aptos.v1alpha.VectorTag.element_type:type_name -> capabilities.blockchain.aptos.v1alpha.TypeTag + 9, // 8: capabilities.blockchain.aptos.v1alpha.StructTag.type_params:type_name -> capabilities.blockchain.aptos.v1alpha.TypeTag + 15, // 9: capabilities.blockchain.aptos.v1alpha.TransactionByHashReply.transaction:type_name -> capabilities.blockchain.aptos.v1alpha.Transaction + 2, // 10: capabilities.blockchain.aptos.v1alpha.Transaction.type:type_name -> capabilities.blockchain.aptos.v1alpha.TransactionVariant + 15, // 11: capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply.transactions:type_name -> capabilities.blockchain.aptos.v1alpha.Transaction + 8, // 12: capabilities.blockchain.aptos.v1alpha.SubmitTransactionRequest.receiver_module_id:type_name -> capabilities.blockchain.aptos.v1alpha.ModuleID + 20, // 13: capabilities.blockchain.aptos.v1alpha.SubmitTransactionRequest.gas_config:type_name -> capabilities.blockchain.aptos.v1alpha.GasConfig + 0, // 14: capabilities.blockchain.aptos.v1alpha.SubmitTransactionReply.tx_status:type_name -> capabilities.blockchain.aptos.v1alpha.TxStatus + 20, // 15: capabilities.blockchain.aptos.v1alpha.WriteReportRequest.gas_config:type_name -> capabilities.blockchain.aptos.v1alpha.GasConfig + 23, // 16: capabilities.blockchain.aptos.v1alpha.WriteReportRequest.report:type_name -> sdk.v1alpha.ReportResponse + 0, // 17: capabilities.blockchain.aptos.v1alpha.WriteReportReply.tx_status:type_name -> capabilities.blockchain.aptos.v1alpha.TxStatus + 3, // 18: capabilities.blockchain.aptos.v1alpha.Client.AccountAPTBalance:input_type -> capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceRequest + 5, // 19: capabilities.blockchain.aptos.v1alpha.Client.View:input_type -> capabilities.blockchain.aptos.v1alpha.ViewRequest + 13, // 20: capabilities.blockchain.aptos.v1alpha.Client.TransactionByHash:input_type -> capabilities.blockchain.aptos.v1alpha.TransactionByHashRequest + 16, // 21: capabilities.blockchain.aptos.v1alpha.Client.AccountTransactions:input_type -> capabilities.blockchain.aptos.v1alpha.AccountTransactionsRequest + 21, // 22: capabilities.blockchain.aptos.v1alpha.Client.WriteReport:input_type -> capabilities.blockchain.aptos.v1alpha.WriteReportRequest + 4, // 23: capabilities.blockchain.aptos.v1alpha.Client.AccountAPTBalance:output_type -> capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceReply + 6, // 24: capabilities.blockchain.aptos.v1alpha.Client.View:output_type -> capabilities.blockchain.aptos.v1alpha.ViewReply + 14, // 25: capabilities.blockchain.aptos.v1alpha.Client.TransactionByHash:output_type -> capabilities.blockchain.aptos.v1alpha.TransactionByHashReply + 17, // 26: capabilities.blockchain.aptos.v1alpha.Client.AccountTransactions:output_type -> capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply + 22, // 27: capabilities.blockchain.aptos.v1alpha.Client.WriteReport:output_type -> capabilities.blockchain.aptos.v1alpha.WriteReportReply + 23, // [23:28] is the sub-list for method output_type + 18, // [18:23] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_capabilities_blockchain_aptos_v1alpha_client_proto_init() } +func file_capabilities_blockchain_aptos_v1alpha_client_proto_init() { + if File_capabilities_blockchain_aptos_v1alpha_client_proto != nil { + return + } + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[2].OneofWrappers = []any{} + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[6].OneofWrappers = []any{ + (*TypeTag_Vector)(nil), + (*TypeTag_Struct)(nil), + (*TypeTag_Generic)(nil), + } + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[11].OneofWrappers = []any{} + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[12].OneofWrappers = []any{} + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[13].OneofWrappers = []any{} + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[15].OneofWrappers = []any{} + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[18].OneofWrappers = []any{} + file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes[19].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDesc), len(file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDesc)), + NumEnums: 3, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_capabilities_blockchain_aptos_v1alpha_client_proto_goTypes, + DependencyIndexes: file_capabilities_blockchain_aptos_v1alpha_client_proto_depIdxs, + EnumInfos: file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes, + MessageInfos: file_capabilities_blockchain_aptos_v1alpha_client_proto_msgTypes, + }.Build() + File_capabilities_blockchain_aptos_v1alpha_client_proto = out.File + file_capabilities_blockchain_aptos_v1alpha_client_proto_goTypes = nil + file_capabilities_blockchain_aptos_v1alpha_client_proto_depIdxs = nil +} diff --git a/capabilities/blockchain/aptos/client_sdk_gen.go b/capabilities/blockchain/aptos/client_sdk_gen.go new file mode 100644 index 00000000..8231829d --- /dev/null +++ b/capabilities/blockchain/aptos/client_sdk_gen.go @@ -0,0 +1,197 @@ +// Hand-written Aptos SDK client (mirrors evm client_sdk_gen pattern). +// Capability ID: aptos:ChainSelector:@1.0.0, method "View". + +package aptos + +import ( + "errors" + "fmt" + "strconv" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + + sdkpb "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" + "github.com/smartcontractkit/cre-sdk-go/cre" +) + +type Client struct { + ChainSelector uint64 +} + +func (c *Client) WriteReport(runtime cre.Runtime, input *WriteReportRequest) cre.Promise[*WriteReportReply] { + if input == nil { + return cre.PromiseFromResult[*WriteReportReply](nil, errors.New("nil WriteReportRequest")) + } + + wrapped := &anypb.Any{} + err := anypb.MarshalFrom(wrapped, input, proto.MarshalOptions{Deterministic: true}) + if err != nil { + return cre.PromiseFromResult[*WriteReportReply](nil, err) + } + + capID := "aptos:ChainSelector:" + strconv.FormatUint(c.ChainSelector, 10) + "@1.0.0" + return cre.Then(runtime.CallCapability(&sdkpb.CapabilityRequest{ + Id: capID, + Payload: wrapped, + Method: "WriteReport", + }), func(i *sdkpb.CapabilityResponse) (_ *WriteReportReply, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("aptos write decode panic: %v", r) + } + }() + if i == nil { + return nil, errors.New("nil capability response") + } + switch payload := i.Response.(type) { + case *sdkpb.CapabilityResponse_Error: + return nil, errors.New(payload.Error) + case *sdkpb.CapabilityResponse_Payload: + if payload.Payload == nil { + return nil, errors.New("nil capability payload") + } + return decodeWriteReportReply(payload.Payload.Value) + default: + return nil, errors.New("unexpected response type") + } + }) +} + +func (c *Client) View(runtime cre.Runtime, input *ViewRequest) cre.Promise[*ViewReply] { + if input == nil { + return cre.PromiseFromResult[*ViewReply](nil, errors.New("nil ViewRequest")) + } + + wrapped := &anypb.Any{} + err := anypb.MarshalFrom(wrapped, input, proto.MarshalOptions{Deterministic: true}) + if err != nil { + return cre.PromiseFromResult[*ViewReply](nil, err) + } + capID := "aptos:ChainSelector:" + strconv.FormatUint(c.ChainSelector, 10) + "@1.0.0" + capCallResponse := cre.Then(runtime.CallCapability(&sdkpb.CapabilityRequest{ + Id: capID, + Payload: wrapped, + Method: "View", + }), func(i *sdkpb.CapabilityResponse) (_ *ViewReply, err error) { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("aptos view decode panic: %v", r) + } + }() + if i == nil { + return nil, errors.New("nil capability response") + } + switch payload := i.Response.(type) { + case *sdkpb.CapabilityResponse_Error: + return nil, errors.New(payload.Error) + case *sdkpb.CapabilityResponse_Payload: + if payload.Payload == nil { + return nil, errors.New("nil capability payload") + } + return decodeViewReply(payload.Payload.Value) + default: + return nil, errors.New("unexpected response type") + } + }) + return capCallResponse +} + +// decodeWriteReportReply decodes capabilities.blockchain.aptos.v1alpha.WriteReportReply +// via protobuf wire parsing to avoid runtime reflection panics under WASM. +func decodeWriteReportReply(b []byte) (*WriteReportReply, error) { + out := &WriteReportReply{} + for len(b) > 0 { + num, typ, n := protowire.ConsumeTag(b) + if n < 0 { + return nil, fmt.Errorf("decode WriteReportReply tag: %v", protowire.ParseError(n)) + } + b = b[n:] + switch num { + case 1: // tx_status enum (varint) + if typ != protowire.VarintType { + return nil, fmt.Errorf("decode WriteReportReply.tx_status: unexpected wire type %d", typ) + } + v, m := protowire.ConsumeVarint(b) + if m < 0 { + return nil, fmt.Errorf("decode WriteReportReply.tx_status varint: %v", protowire.ParseError(m)) + } + out.TxStatus = TxStatus(v) + b = b[m:] + case 2: // tx_hash string + if typ != protowire.BytesType { + return nil, fmt.Errorf("decode WriteReportReply.tx_hash: unexpected wire type %d", typ) + } + v, m := protowire.ConsumeBytes(b) + if m < 0 { + return nil, fmt.Errorf("decode WriteReportReply.tx_hash bytes: %v", protowire.ParseError(m)) + } + txHash := string(v) + out.TxHash = &txHash + b = b[m:] + case 3: // transaction_fee varint + if typ != protowire.VarintType { + return nil, fmt.Errorf("decode WriteReportReply.transaction_fee: unexpected wire type %d", typ) + } + v, m := protowire.ConsumeVarint(b) + if m < 0 { + return nil, fmt.Errorf("decode WriteReportReply.transaction_fee varint: %v", protowire.ParseError(m)) + } + fee := uint64(v) + out.TransactionFee = &fee + b = b[m:] + case 4: // error_message string + if typ != protowire.BytesType { + return nil, fmt.Errorf("decode WriteReportReply.error_message: unexpected wire type %d", typ) + } + v, m := protowire.ConsumeBytes(b) + if m < 0 { + return nil, fmt.Errorf("decode WriteReportReply.error_message bytes: %v", protowire.ParseError(m)) + } + msg := string(v) + out.ErrorMessage = &msg + b = b[m:] + default: + m := protowire.ConsumeFieldValue(num, typ, b) + if m < 0 { + return nil, fmt.Errorf("decode WriteReportReply skip field %d: %v", num, protowire.ParseError(m)) + } + b = b[m:] + } + } + return out, nil +} + +// decodeViewReply decodes capabilities.blockchain.aptos.v1alpha.ViewReply using +// protobuf wire parsing to avoid runtime reflection panics seen under WASM. +// ViewReply currently contains a single bytes field: data = 1. +func decodeViewReply(b []byte) (*ViewReply, error) { + out := &ViewReply{} + for len(b) > 0 { + num, typ, n := protowire.ConsumeTag(b) + if n < 0 { + return nil, fmt.Errorf("decode ViewReply tag: %v", protowire.ParseError(n)) + } + b = b[n:] + switch num { + case 1: // data bytes + if typ != protowire.BytesType { + return nil, fmt.Errorf("decode ViewReply.data: unexpected wire type %d", typ) + } + v, m := protowire.ConsumeBytes(b) + if m < 0 { + return nil, fmt.Errorf("decode ViewReply.data bytes: %v", protowire.ParseError(m)) + } + out.Data = append([]byte(nil), v...) + b = b[m:] + default: + m := protowire.ConsumeFieldValue(num, typ, b) + if m < 0 { + return nil, fmt.Errorf("decode ViewReply skip field %d: %v", num, protowire.ParseError(m)) + } + b = b[m:] + } + } + return out, nil +} diff --git a/capabilities/blockchain/aptos/generate.go b/capabilities/blockchain/aptos/generate.go new file mode 100644 index 00000000..c0edc453 --- /dev/null +++ b/capabilities/blockchain/aptos/generate.go @@ -0,0 +1,2 @@ +//go:generate go run ./generate +package aptos diff --git a/capabilities/blockchain/aptos/generate/main.go b/capabilities/blockchain/aptos/generate/main.go new file mode 100644 index 00000000..e6a07ddb --- /dev/null +++ b/capabilities/blockchain/aptos/generate/main.go @@ -0,0 +1,43 @@ +package main + +import ( + "os" + "path/filepath" + + "github.com/smartcontractkit/chainlink-protos/cre/go/installer/pkg" + "github.com/smartcontractkit/cre-sdk-go/generator/protos" +) + +func main() { + cwd, _ := os.Getwd() + root := cwd + for { + goMod := filepath.Join(root, "go.mod") + aptosDir := filepath.Join(root, "capabilities", "blockchain", "aptos") + if _, err := os.Stat(goMod); err == nil { + if _, err := os.Stat(aptosDir); err == nil { + break + } + } + parent := filepath.Dir(root) + if parent == root { + panic("run from cre-sdk-go repo root or from capabilities/blockchain/aptos") + } + root = parent + } + _ = os.Chdir(root) + gen, err := protos.NewGeneratorAndInstallToolsForCapability() + if err != nil { + panic(err) + } + config := &pkg.CapabilityConfig{ + Category: "blockchain", + Pkg: "aptos", + MajorVersion: 1, + PreReleaseTag: "alpha", + Files: []string{"client.proto"}, + } + if err := gen.GenerateMany(map[string]*pkg.CapabilityConfig{"capabilities/blockchain/aptos": config}); err != nil { + panic(err) + } +} diff --git a/capabilities/blockchain/aptos/go.mod b/capabilities/blockchain/aptos/go.mod new file mode 100644 index 00000000..84ae9758 --- /dev/null +++ b/capabilities/blockchain/aptos/go.mod @@ -0,0 +1,16 @@ +module github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/aptos + +go 1.25.3 + +require ( + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260310142526-ecda729848f6 + github.com/smartcontractkit/cre-sdk-go v1.5.0 + google.golang.org/protobuf v1.36.8 +) + +require ( + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/shopspring/decimal v1.4.0 // indirect +) + +replace github.com/smartcontractkit/cre-sdk-go => ../../.. diff --git a/capabilities/blockchain/aptos/go.sum b/capabilities/blockchain/aptos/go.sum new file mode 100644 index 00000000..0f9d9731 --- /dev/null +++ b/capabilities/blockchain/aptos/go.sum @@ -0,0 +1,18 @@ +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= +github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260310142526-ecda729848f6 h1:i15omvye/jtFlD48hqR88xt4bFcxMJqevNTJU1dgOQQ= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260310142526-ecda729848f6/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=