From 821609d310ffe253a8ae952bb3488778e43c3b51 Mon Sep 17 00:00:00 2001 From: cawthorne Date: Wed, 18 Mar 2026 05:43:52 +0000 Subject: [PATCH 1/3] aptos sdk: add view request and write reply support --- capabilities/blockchain/aptos/client.pb.go | 1653 +++++++++++++++++ capabilities/blockchain/aptos/client_sdk.go | 208 +++ .../blockchain/aptos/client_sdk_test.go | 36 + capabilities/blockchain/aptos/generate.go | 2 + .../blockchain/aptos/generate/main.go | 23 + capabilities/blockchain/aptos/go.mod | 20 + capabilities/blockchain/aptos/go.sum | 20 + generator/protos/utils.go | 28 +- go.md | 3 + go.mod | 2 +- go.sum | 4 +- 11 files changed, 1995 insertions(+), 4 deletions(-) create mode 100644 capabilities/blockchain/aptos/client.pb.go create mode 100644 capabilities/blockchain/aptos/client_sdk.go create mode 100644 capabilities/blockchain/aptos/client_sdk_test.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..02b2f254 --- /dev/null +++ b/capabilities/blockchain/aptos/client.pb.go @@ -0,0 +1,1653 @@ +// 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 ReceiverContractExecutionStatus int32 + +const ( + ReceiverContractExecutionStatus_RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS ReceiverContractExecutionStatus = 0 + ReceiverContractExecutionStatus_RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED ReceiverContractExecutionStatus = 1 +) + +// Enum value maps for ReceiverContractExecutionStatus. +var ( + ReceiverContractExecutionStatus_name = map[int32]string{ + 0: "RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS", + 1: "RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED", + } + ReceiverContractExecutionStatus_value = map[string]int32{ + "RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS": 0, + "RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED": 1, + } +) + +func (x ReceiverContractExecutionStatus) Enum() *ReceiverContractExecutionStatus { + p := new(ReceiverContractExecutionStatus) + *p = x + return p +} + +func (x ReceiverContractExecutionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ReceiverContractExecutionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[3].Descriptor() +} + +func (ReceiverContractExecutionStatus) Type() protoreflect.EnumType { + return &file_capabilities_blockchain_aptos_v1alpha_client_proto_enumTypes[3] +} + +func (x ReceiverContractExecutionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ReceiverContractExecutionStatus.Descriptor instead. +func (ReceiverContractExecutionStatus) EnumDescriptor() ([]byte, []int) { + return file_capabilities_blockchain_aptos_v1alpha_client_proto_rawDescGZIP(), []int{3} +} + +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"` + ReceiverContractExecutionStatus *ReceiverContractExecutionStatus `protobuf:"varint,2,opt,name=receiver_contract_execution_status,json=receiverContractExecutionStatus,proto3,enum=capabilities.blockchain.aptos.v1alpha.ReceiverContractExecutionStatus,oneof" json:"receiver_contract_execution_status,omitempty"` + TxHash *string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3,oneof" json:"tx_hash,omitempty"` // transaction hash (hex string with 0x prefix) + TransactionFee *uint64 `protobuf:"varint,4,opt,name=transaction_fee,json=transactionFee,proto3,oneof" json:"transaction_fee,omitempty"` // gas used in octas + ErrorMessage *string `protobuf:"bytes,5,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) GetReceiverContractExecutionStatus() ReceiverContractExecutionStatus { + if x != nil && x.ReceiverContractExecutionStatus != nil { + return *x.ReceiverContractExecutionStatus + } + return ReceiverContractExecutionStatus_RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS +} + +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\"\xca\x03\n" + + "\x10WriteReportReply\x12L\n" + + "\ttx_status\x18\x01 \x01(\x0e2/.capabilities.blockchain.aptos.v1alpha.TxStatusR\btxStatus\x12\x98\x01\n" + + "\"receiver_contract_execution_status\x18\x02 \x01(\x0e2F.capabilities.blockchain.aptos.v1alpha.ReceiverContractExecutionStatusH\x00R\x1freceiverContractExecutionStatus\x88\x01\x01\x12\x1c\n" + + "\atx_hash\x18\x03 \x01(\tH\x01R\x06txHash\x88\x01\x01\x12,\n" + + "\x0ftransaction_fee\x18\x04 \x01(\x04H\x02R\x0etransactionFee\x88\x01\x01\x12(\n" + + "\rerror_message\x18\x05 \x01(\tH\x03R\ferrorMessage\x88\x01\x01B%\n" + + "#_receiver_contract_execution_statusB\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\a*\x82\x01\n" + + "\x1fReceiverContractExecutionStatus\x12.\n" + + "*RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS\x10\x00\x12/\n" + + "+RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED\x10\x012\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, 4) +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 + (ReceiverContractExecutionStatus)(0), // 3: capabilities.blockchain.aptos.v1alpha.ReceiverContractExecutionStatus + (*AccountAPTBalanceRequest)(nil), // 4: capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceRequest + (*AccountAPTBalanceReply)(nil), // 5: capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceReply + (*ViewRequest)(nil), // 6: capabilities.blockchain.aptos.v1alpha.ViewRequest + (*ViewReply)(nil), // 7: capabilities.blockchain.aptos.v1alpha.ViewReply + (*ViewPayload)(nil), // 8: capabilities.blockchain.aptos.v1alpha.ViewPayload + (*ModuleID)(nil), // 9: capabilities.blockchain.aptos.v1alpha.ModuleID + (*TypeTag)(nil), // 10: capabilities.blockchain.aptos.v1alpha.TypeTag + (*VectorTag)(nil), // 11: capabilities.blockchain.aptos.v1alpha.VectorTag + (*StructTag)(nil), // 12: capabilities.blockchain.aptos.v1alpha.StructTag + (*GenericTag)(nil), // 13: capabilities.blockchain.aptos.v1alpha.GenericTag + (*TransactionByHashRequest)(nil), // 14: capabilities.blockchain.aptos.v1alpha.TransactionByHashRequest + (*TransactionByHashReply)(nil), // 15: capabilities.blockchain.aptos.v1alpha.TransactionByHashReply + (*Transaction)(nil), // 16: capabilities.blockchain.aptos.v1alpha.Transaction + (*AccountTransactionsRequest)(nil), // 17: capabilities.blockchain.aptos.v1alpha.AccountTransactionsRequest + (*AccountTransactionsReply)(nil), // 18: capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply + (*SubmitTransactionRequest)(nil), // 19: capabilities.blockchain.aptos.v1alpha.SubmitTransactionRequest + (*SubmitTransactionReply)(nil), // 20: capabilities.blockchain.aptos.v1alpha.SubmitTransactionReply + (*GasConfig)(nil), // 21: capabilities.blockchain.aptos.v1alpha.GasConfig + (*WriteReportRequest)(nil), // 22: capabilities.blockchain.aptos.v1alpha.WriteReportRequest + (*WriteReportReply)(nil), // 23: capabilities.blockchain.aptos.v1alpha.WriteReportReply + (*sdk.ReportResponse)(nil), // 24: sdk.v1alpha.ReportResponse +} +var file_capabilities_blockchain_aptos_v1alpha_client_proto_depIdxs = []int32{ + 8, // 0: capabilities.blockchain.aptos.v1alpha.ViewRequest.payload:type_name -> capabilities.blockchain.aptos.v1alpha.ViewPayload + 9, // 1: capabilities.blockchain.aptos.v1alpha.ViewPayload.module:type_name -> capabilities.blockchain.aptos.v1alpha.ModuleID + 10, // 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 + 11, // 4: capabilities.blockchain.aptos.v1alpha.TypeTag.vector:type_name -> capabilities.blockchain.aptos.v1alpha.VectorTag + 12, // 5: capabilities.blockchain.aptos.v1alpha.TypeTag.struct:type_name -> capabilities.blockchain.aptos.v1alpha.StructTag + 13, // 6: capabilities.blockchain.aptos.v1alpha.TypeTag.generic:type_name -> capabilities.blockchain.aptos.v1alpha.GenericTag + 10, // 7: capabilities.blockchain.aptos.v1alpha.VectorTag.element_type:type_name -> capabilities.blockchain.aptos.v1alpha.TypeTag + 10, // 8: capabilities.blockchain.aptos.v1alpha.StructTag.type_params:type_name -> capabilities.blockchain.aptos.v1alpha.TypeTag + 16, // 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 + 16, // 11: capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply.transactions:type_name -> capabilities.blockchain.aptos.v1alpha.Transaction + 9, // 12: capabilities.blockchain.aptos.v1alpha.SubmitTransactionRequest.receiver_module_id:type_name -> capabilities.blockchain.aptos.v1alpha.ModuleID + 21, // 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 + 21, // 15: capabilities.blockchain.aptos.v1alpha.WriteReportRequest.gas_config:type_name -> capabilities.blockchain.aptos.v1alpha.GasConfig + 24, // 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.WriteReportReply.receiver_contract_execution_status:type_name -> capabilities.blockchain.aptos.v1alpha.ReceiverContractExecutionStatus + 4, // 19: capabilities.blockchain.aptos.v1alpha.Client.AccountAPTBalance:input_type -> capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceRequest + 6, // 20: capabilities.blockchain.aptos.v1alpha.Client.View:input_type -> capabilities.blockchain.aptos.v1alpha.ViewRequest + 14, // 21: capabilities.blockchain.aptos.v1alpha.Client.TransactionByHash:input_type -> capabilities.blockchain.aptos.v1alpha.TransactionByHashRequest + 17, // 22: capabilities.blockchain.aptos.v1alpha.Client.AccountTransactions:input_type -> capabilities.blockchain.aptos.v1alpha.AccountTransactionsRequest + 22, // 23: capabilities.blockchain.aptos.v1alpha.Client.WriteReport:input_type -> capabilities.blockchain.aptos.v1alpha.WriteReportRequest + 5, // 24: capabilities.blockchain.aptos.v1alpha.Client.AccountAPTBalance:output_type -> capabilities.blockchain.aptos.v1alpha.AccountAPTBalanceReply + 7, // 25: capabilities.blockchain.aptos.v1alpha.Client.View:output_type -> capabilities.blockchain.aptos.v1alpha.ViewReply + 15, // 26: capabilities.blockchain.aptos.v1alpha.Client.TransactionByHash:output_type -> capabilities.blockchain.aptos.v1alpha.TransactionByHashReply + 18, // 27: capabilities.blockchain.aptos.v1alpha.Client.AccountTransactions:output_type -> capabilities.blockchain.aptos.v1alpha.AccountTransactionsReply + 23, // 28: capabilities.blockchain.aptos.v1alpha.Client.WriteReport:output_type -> capabilities.blockchain.aptos.v1alpha.WriteReportReply + 24, // [24:29] is the sub-list for method output_type + 19, // [19:24] 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_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: 4, + 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.go b/capabilities/blockchain/aptos/client_sdk.go new file mode 100644 index 00000000..8d52bd76 --- /dev/null +++ b/capabilities/blockchain/aptos/client_sdk.go @@ -0,0 +1,208 @@ + +// 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: // receiver_contract_execution_status enum (varint) + if typ != protowire.VarintType { + return nil, fmt.Errorf("decode WriteReportReply.receiver_contract_execution_status: unexpected wire type %d", typ) + } + v, m := protowire.ConsumeVarint(b) + if m < 0 { + return nil, fmt.Errorf("decode WriteReportReply.receiver_contract_execution_status varint: %v", protowire.ParseError(m)) + } + status := ReceiverContractExecutionStatus(v) + out.ReceiverContractExecutionStatus = &status + b = b[m:] + case 3: // 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 4: // 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 5: // 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/client_sdk_test.go b/capabilities/blockchain/aptos/client_sdk_test.go new file mode 100644 index 00000000..1b657964 --- /dev/null +++ b/capabilities/blockchain/aptos/client_sdk_test.go @@ -0,0 +1,36 @@ +package aptos + +import ( + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" +) + +func TestDecodeWriteReportReply_NewWireShape(t *testing.T) { + t.Parallel() + + txHash := "0xabc123" + txFee := uint64(42) + errMsg := "receiver execution failed" + replyBytes, err := proto.Marshal(&WriteReportReply{ + TxStatus: TxStatus_TX_STATUS_ABORTED, + ReceiverContractExecutionStatus: ReceiverContractExecutionStatus_RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED.Enum(), + TxHash: &txHash, + TransactionFee: &txFee, + ErrorMessage: &errMsg, + }) + require.NoError(t, err) + + reply, err := decodeWriteReportReply(replyBytes) + require.NoError(t, err) + require.Equal(t, TxStatus_TX_STATUS_ABORTED, reply.TxStatus) + require.NotNil(t, reply.ReceiverContractExecutionStatus) + require.Equal(t, ReceiverContractExecutionStatus_RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED, *reply.ReceiverContractExecutionStatus) + require.NotNil(t, reply.TxHash) + require.Equal(t, txHash, *reply.TxHash) + require.NotNil(t, reply.TransactionFee) + require.Equal(t, txFee, *reply.TransactionFee) + require.NotNil(t, reply.ErrorMessage) + require.Equal(t, errMsg, *reply.ErrorMessage) +} 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..84a3f45b --- /dev/null +++ b/capabilities/blockchain/aptos/generate/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/smartcontractkit/chainlink-protos/cre/go/installer/pkg" + "github.com/smartcontractkit/cre-sdk-go/generator/protos" +) + +func main() { + gen, err := protos.NewGeneratorAndInstallToolsForCapability() + if err != nil { + panic(err) + } + gen.Plugins = []pkg.Plugin{pkg.GoPlugin} + if err := gen.Generate(&pkg.CapabilityConfig{ + Category: "blockchain", + Pkg: "aptos", + MajorVersion: 1, + PreReleaseTag: "alpha", + Files: []string{"client.proto"}, + }); err != nil { + panic(err) + } +} diff --git a/capabilities/blockchain/aptos/go.mod b/capabilities/blockchain/aptos/go.mod new file mode 100644 index 00000000..9664d73a --- /dev/null +++ b/capabilities/blockchain/aptos/go.mod @@ -0,0 +1,20 @@ +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-20260318054214-bad7873faa1c + github.com/smartcontractkit/cre-sdk-go v1.5.0 + github.com/stretchr/testify v1.11.1 + google.golang.org/protobuf v1.36.11 +) + +require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-viper/mapstructure/v2 v2.4.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/shopspring/decimal v1.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // 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..d534753c --- /dev/null +++ b/capabilities/blockchain/aptos/go.sum @@ -0,0 +1,20 @@ +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-20260318054214-bad7873faa1c h1:m+XflniQiuMPvcKtiWpnsqpOiRNcONKrhF5zwpR2QJM= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260318054214-bad7873faa1c/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.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/generator/protos/utils.go b/generator/protos/utils.go index d9637f6f..1cead05c 100644 --- a/generator/protos/utils.go +++ b/generator/protos/utils.go @@ -43,7 +43,13 @@ func installFromMod() error { pluginDir, err := downloadPlugin(plugin, pluginVersion) if err != nil { - return err + localPluginDir, localErr := findLocalPluginDir(".") + if localErr != nil { + return err + } + + fmt.Printf("Falling back to local plugin source at %s after download failure: %v\n", localPluginDir, err) + return buildPlugin(localPluginDir) } return buildPlugin(pluginDir) @@ -115,3 +121,23 @@ func buildPlugin(pluginDir string) error { return nil } + +func findLocalPluginDir(start string) (string, error) { + root, err := filepath.Abs(start) + if err != nil { + return "", fmt.Errorf("failed to resolve working directory: %w", err) + } + + for { + pluginDir := filepath.Join(root, "generator", "protoc-gen-cre") + if _, err := os.Stat(filepath.Join(pluginDir, "go.mod")); err == nil { + return pluginDir, nil + } + + parent := filepath.Dir(root) + if parent == root { + return "", fmt.Errorf("failed to find local protoc plugin dir from %s", start) + } + root = parent + } +} diff --git a/go.md b/go.md index bdaf36c4..30677a88 100644 --- a/go.md +++ b/go.md @@ -28,6 +28,8 @@ flowchart LR click chainlink-protos/workflows/go href "https://github.com/smartcontractkit/chainlink-protos" cre-sdk-go --> chainlink-protos/cre/go click cre-sdk-go href "https://github.com/smartcontractkit/cre-sdk-go" + cre-sdk-go/capabilities/blockchain/aptos --> cre-sdk-go + click cre-sdk-go/capabilities/blockchain/aptos href "https://github.com/smartcontractkit/cre-sdk-go" cre-sdk-go/capabilities/blockchain/evm --> cre-sdk-go click cre-sdk-go/capabilities/blockchain/evm href "https://github.com/smartcontractkit/cre-sdk-go" cre-sdk-go/capabilities/networking/confidentialhttp --> cre-sdk-go @@ -62,6 +64,7 @@ flowchart LR subgraph cre-sdk-go-repo[cre-sdk-go] cre-sdk-go + cre-sdk-go/capabilities/blockchain/aptos cre-sdk-go/capabilities/blockchain/evm cre-sdk-go/capabilities/networking/confidentialhttp cre-sdk-go/capabilities/networking/http diff --git a/go.mod b/go.mod index 6794989d..b39422c6 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.25.3 require ( github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260217043601-5cc966896c4f + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260318054214-bad7873faa1c github.com/stretchr/testify v1.11.1 google.golang.org/protobuf v1.36.11 ) diff --git a/go.sum b/go.sum index f9797b73..d534753c 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI 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-20260217043601-5cc966896c4f h1:MHlgzqiDPyDV397bZkzS9TtWXb3FR9Pb8FR9cP9h0As= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260217043601-5cc966896c4f/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260318054214-bad7873faa1c h1:m+XflniQiuMPvcKtiWpnsqpOiRNcONKrhF5zwpR2QJM= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260318054214-bad7873faa1c/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.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= From 94ed014393bc44d0a6bd9e6c9fbf4c13be28e0ee Mon Sep 17 00:00:00 2001 From: cawthorne Date: Wed, 18 Mar 2026 18:08:30 +0000 Subject: [PATCH 2/3] go: trim evm sdk module bump --- capabilities/blockchain/evm/go.mod | 2 +- capabilities/blockchain/evm/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/capabilities/blockchain/evm/go.mod b/capabilities/blockchain/evm/go.mod index 4587dd8b..0784e84c 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-20260316212326-56621684c29d + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260227170625-e0e1c4094174 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 c986f700..397e3cbc 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-20260316212326-56621684c29d h1:mgWV1gu/VTn/lR9G4MYd5xqz+emvrS0rCP+y+3mRpoo= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260316212326-56621684c29d/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= +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/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 f93534767286c4666baf74bc8b59dde38fff81a9 Mon Sep 17 00:00:00 2001 From: cawthorne Date: Wed, 18 Mar 2026 18:25:36 +0000 Subject: [PATCH 3/3] proto: regenerate evm sdk client --- capabilities/blockchain/evm/client.pb.go | 46 +---------- capabilities/blockchain/evm/client_sdk_gen.go | 76 ------------------- 2 files changed, 4 insertions(+), 118 deletions(-) diff --git a/capabilities/blockchain/evm/client.pb.go b/capabilities/blockchain/evm/client.pb.go index 16a07847..15dba1e0 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\xbb\x17\n" + + "\x11TX_STATUS_SUCCESS\x10\x022\xa9\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\x80\x0e\x82\xb5\x18\xfb\r\b\x01\x12\tevm@1.0.0\x1a\xeb\r\n" + - "\rChainSelector\x12\xd9\r\x12\xd6\r\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" + "$\n" + "\x17apechain-testnet-curtis\x10\xc1ô\xf8\x8dĒ\xb2\x89\x01\n" + "\x17\n" + @@ -1817,28 +1817,14 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x1bbinance_smart_chain-mainnet\x10\xcf\xf7\x94\xf1\xd8핸\x9d\x01\n" + "(\n" + "\x1bbinance_smart_chain-testnet\x10\xfb\xad\xbe\x9c\x80\xae䊸\x01\n" + - "\x18\n" + - "\fcelo-mainnet\x10\x86\xd4\xe8؆\x93\x88\xd7\x12\n" + - "\x1a\n" + - "\x0ecronos-testnet\x10\xfd\xd9\xee\xad\xe0\xde\xda\xc8)\n" + - "\"\n" + - "\x15dtcc-testnet-andesite\x10҃\xe3Й\x96\xe5\xa4\xd7\x01\n" + "\x1c\n" + "\x10ethereum-mainnet\x10\x95\xf6\xf1\xe4ϲ\xa6\xc2E\n" + "'\n" + "\x1bethereum-mainnet-arbitrum-1\x10\xc4\xe8\x8d͎\x9b\xa1\xd7D\n" + "$\n" + "\x17ethereum-mainnet-base-1\x10\x82\xff\xab\xa2\xfe\xb9\x90\xd3\xdd\x01\n" + - "\"\n" + - "\x16ethereum-mainnet-ink-1\x10\xa0\xb0\xa6\xe9\xb7檄0\n" + - "$\n" + - "\x18ethereum-mainnet-linea-1\x10\xb6\xba\xe9\x98˽\xb0\x9b@\n" + - "%\n" + - "\x19ethereum-mainnet-mantle-1\x10\x8a紕簃\xcc\x15\n" + "'\n" + "\x1bethereum-mainnet-optimism-1\x10\xb8\x95\x8f\xc3\xf7\xfe\xd0\xe93\n" + - "&\n" + - "\x19ethereum-mainnet-scroll-1\x10\xb8\xbc\xe4\xebľȟ\xb7\x01\n" + ")\n" + "\x1dethereum-mainnet-worldchain-1\x10\x87ﺷŶ¸\x1c\n" + "%\n" + @@ -1853,20 +1839,12 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x1fethereum-testnet-sepolia-base-1\x10\xb8ʹ\xef\xf6\x90\xaeȏ\x01\n" + ",\n" + " ethereum-testnet-sepolia-linea-1\x10\xeb\xaa\xd4\xfe\x82\xf9\xe6\xafO\n" + - "-\n" + - "!ethereum-testnet-sepolia-mantle-1\x10\xd5Ƹ\xee\xcd\xf6\xf2\xa6r\n" + "/\n" + "#ethereum-testnet-sepolia-optimism-1\x10\x9f\x86š\xbe\xd8\xc3\xc0H\n" + - "-\n" + - "!ethereum-testnet-sepolia-scroll-1\x10\x8b鴾ۺ\xed\xd1\x1f\n" + - "0\n" + - "#ethereum-testnet-sepolia-unichain-1\x10\xb4\xde\xfe\xe0엩\x96\xc4\x01\n" + "1\n" + "%ethereum-testnet-sepolia-worldchain-1\x10\xba\xdf\xe0\xc5ǩ\xf3\xc5I\n" + "-\n" + "!ethereum-testnet-sepolia-zksync-1\x10\xb7\xc1\xfc\xfd\xf2Ā\xde_\n" + - " \n" + - "\x14gnosis_chain-mainnet\x10\xf4\x92\xad\xda\U000a2bba\x06\n" + "\x1f\n" + "\x13hyperliquid-testnet\x10\x88\xce\xddȗ\xe0ɽ;\n" + " \n" + @@ -1875,16 +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" + - "\x1b\n" + - "\x0fmegaeth-mainnet\x10ꕶȼ\xe4\xa6\xc8T\n" + - "\x1e\n" + - "\x11megaeth-testnet-2\x10\xe3\x8dވ\xb1\x8f\xfd\x93\xfd\x01\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" + - "\x1b\n" + - "\x0eplasma-mainnet\x10\xf8\x9b\xf1\xd1\xda\xc9\xd5Ɓ\x01\n" + "\x1a\n" + "\x0eplasma-testnet\x10՛\xbf\xa5ô\x99\x877\n" + "\x1b\n" + @@ -1892,15 +1862,7 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "!\n" + "\x14polygon-testnet-amoy\x10͏\xd6\xdf\xf1ǐ\xfa\xe1\x01\n" + "$\n" + - "\x18private-testnet-andesite\x10Ԧ\x98\xa5\xc1\x8f\xdc\xfc_\n" + - "\x19\n" + - "\rsonic-mainnet\x10Ѳ\xe5\xed٠\xb2\x9d\x17\n" + - "\x19\n" + - "\rsonic-testnet\x10Ȉ\xfbԴ\xc6\xfa\xbc\x18\n" + - "\x18\n" + - "\vtac-testnet\x10\xd5ۍ\xe3\xfb\x9f\x93׃\x01\n" + - "\x1b\n" + - "\x0exlayer-testnet\x10ɾ\xa1\xb4\xad̼ݍ\x01b\x06proto3" + "\x18private-testnet-andesite\x10Ԧ\x98\xa5\xc1\x8f\xdc\xfc_b\x06proto3" var ( file_capabilities_blockchain_evm_v1alpha_client_proto_rawDescOnce sync.Once diff --git a/capabilities/blockchain/evm/client_sdk_gen.go b/capabilities/blockchain/evm/client_sdk_gen.go index 17704aac..1f8e5fd5 100644 --- a/capabilities/blockchain/evm/client_sdk_gen.go +++ b/capabilities/blockchain/evm/client_sdk_gen.go @@ -330,28 +330,14 @@ const BinanceSmartChainMainnet = 11344663589394136015 const BinanceSmartChainTestnet = 13264668187771770619 -const CeloMainnet = 1346049177634351622 - -const CronosTestnet = 2995292832068775165 - -const DtccTestnetAndesite = 15513093881969820114 - const EthereumMainnet = 5009297550715157269 const EthereumMainnetArbitrum1 = 4949039107694359620 const EthereumMainnetBase1 = 15971525489660198786 -const EthereumMainnetInk1 = 3461204551265785888 - -const EthereumMainnetLinea1 = 4627098889531055414 - -const EthereumMainnetMantle1 = 1556008542357238666 - const EthereumMainnetOptimism1 = 3734403246176062136 -const EthereumMainnetScroll1 = 13204309965629103672 - const EthereumMainnetWorldchain1 = 2049429975587534727 const EthereumMainnetXlayer1 = 3016212468291539606 @@ -366,20 +352,12 @@ const EthereumTestnetSepoliaBase1 = 10344971235874465080 const EthereumTestnetSepoliaLinea1 = 5719461335882077547 -const EthereumTestnetSepoliaMantle1 = 8236463271206331221 - const EthereumTestnetSepoliaOptimism1 = 5224473277236331295 -const EthereumTestnetSepoliaScroll1 = 2279865765895943307 - -const EthereumTestnetSepoliaUnichain1 = 14135854469784514356 - const EthereumTestnetSepoliaWorldchain1 = 5299555114858065850 const EthereumTestnetSepoliaZksync1 = 6898391096552792247 -const GnosisChainMainnet = 465200170687744372 - const HyperliquidTestnet = 4286062357653186312 const InkTestnetSepolia = 9763904284804119144 @@ -388,16 +366,8 @@ const JovayMainnet = 1523760397290643893 const JovayTestnet = 945045181441419236 -const MegaethMainnet = 6093540873831549674 - -const MegaethTestnet2 = 18241817625092392675 - -const PharosAtlanticTestnet = 16098325658947243212 - const PharosMainnet = 7801139999541420232 -const PlasmaMainnet = 9335212494177455608 - const PlasmaTestnet = 3967220077692964309 const PolygonMainnet = 4051577828743386545 @@ -406,14 +376,6 @@ const PolygonTestnetAmoy = 16281711391670634445 const PrivateTestnetAndesite = 6915682381028791124 -const SonicMainnet = 1673871237479749969 - -const SonicTestnet = 1763698235108410440 - -const TacTestnet = 9488606126177218005 - -const XlayerTestnet = 10212741611335999305 - func ChainSelectorFromName(name string) (uint64, error) { switch name { case "apechain-testnet-curtis": @@ -428,28 +390,14 @@ func ChainSelectorFromName(name string) (uint64, error) { return BinanceSmartChainMainnet, nil case "binance_smart_chain-testnet": return BinanceSmartChainTestnet, nil - case "celo-mainnet": - return CeloMainnet, nil - case "cronos-testnet": - return CronosTestnet, nil - case "dtcc-testnet-andesite": - return DtccTestnetAndesite, nil case "ethereum-mainnet": return EthereumMainnet, nil case "ethereum-mainnet-arbitrum-1": return EthereumMainnetArbitrum1, nil case "ethereum-mainnet-base-1": return EthereumMainnetBase1, nil - case "ethereum-mainnet-ink-1": - return EthereumMainnetInk1, nil - case "ethereum-mainnet-linea-1": - return EthereumMainnetLinea1, nil - case "ethereum-mainnet-mantle-1": - return EthereumMainnetMantle1, nil case "ethereum-mainnet-optimism-1": return EthereumMainnetOptimism1, nil - case "ethereum-mainnet-scroll-1": - return EthereumMainnetScroll1, nil case "ethereum-mainnet-worldchain-1": return EthereumMainnetWorldchain1, nil case "ethereum-mainnet-xlayer-1": @@ -464,20 +412,12 @@ func ChainSelectorFromName(name string) (uint64, error) { return EthereumTestnetSepoliaBase1, nil case "ethereum-testnet-sepolia-linea-1": return EthereumTestnetSepoliaLinea1, nil - case "ethereum-testnet-sepolia-mantle-1": - return EthereumTestnetSepoliaMantle1, nil case "ethereum-testnet-sepolia-optimism-1": return EthereumTestnetSepoliaOptimism1, nil - case "ethereum-testnet-sepolia-scroll-1": - return EthereumTestnetSepoliaScroll1, nil - case "ethereum-testnet-sepolia-unichain-1": - return EthereumTestnetSepoliaUnichain1, nil case "ethereum-testnet-sepolia-worldchain-1": return EthereumTestnetSepoliaWorldchain1, nil case "ethereum-testnet-sepolia-zksync-1": return EthereumTestnetSepoliaZksync1, nil - case "gnosis_chain-mainnet": - return GnosisChainMainnet, nil case "hyperliquid-testnet": return HyperliquidTestnet, nil case "ink-testnet-sepolia": @@ -486,16 +426,8 @@ func ChainSelectorFromName(name string) (uint64, error) { return JovayMainnet, nil case "jovay-testnet": return JovayTestnet, nil - case "megaeth-mainnet": - return MegaethMainnet, nil - case "megaeth-testnet-2": - return MegaethTestnet2, nil - case "pharos-atlantic-testnet": - return PharosAtlanticTestnet, nil case "pharos-mainnet": return PharosMainnet, nil - case "plasma-mainnet": - return PlasmaMainnet, nil case "plasma-testnet": return PlasmaTestnet, nil case "polygon-mainnet": @@ -504,14 +436,6 @@ func ChainSelectorFromName(name string) (uint64, error) { return PolygonTestnetAmoy, nil case "private-testnet-andesite": return PrivateTestnetAndesite, nil - case "sonic-mainnet": - return SonicMainnet, nil - case "sonic-testnet": - return SonicTestnet, nil - case "tac-testnet": - return TacTestnet, nil - case "xlayer-testnet": - return XlayerTestnet, nil default: return 0, errors.New("unknown ChainSelector" + name) }