From db5a4ede0b6f297bbc8af5b273d4ffc72f1e17aa Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 17 Feb 2026 10:39:18 +0000 Subject: [PATCH 1/9] Adding aptos capability --- .../blockchain/aptos/v1alpha/client.proto | 213 +++++++++++++++++ cre/go/installer/pkg/embedded_gen.go | 219 ++++++++++++++++++ 2 files changed, 432 insertions(+) create mode 100644 cre/capabilities/blockchain/aptos/v1alpha/client.proto diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto new file mode 100644 index 00000000..7982b213 --- /dev/null +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -0,0 +1,213 @@ +syntax = "proto3"; +package capabilities.blockchain.aptos.v1alpha; + +import "sdk/v1alpha/sdk.proto"; +import "tools/generator/v1alpha/cre_metadata.proto"; + +// Transaction execution status returned by the forwarder. +enum TxStatus { + TX_STATUS_FATAL = 0; // unrecoverable failure + TX_STATUS_ABORTED = 1; // not executed / dropped + TX_STATUS_SUCCESS = 2; // executed successfully +} + +// ========== AccountAPTBalance ========== + +message AccountAPTBalanceRequest { + bytes address = 1; // 32-byte address +} + +message AccountAPTBalanceReply { + uint64 value = 1; +} + +// ========== View ========== + +message ViewRequest { + ViewPayload payload = 1; +} + +message ViewReply { + bytes data = 1; +} + +message ViewPayload { + ModuleID module = 1; + string function = 2; + repeated TypeTag arg_types = 3; + repeated bytes args = 4; +} + +message ModuleID { + bytes address = 1; // 32-byte address + string name = 2; +} + +message TypeTag { + TypeTagType type = 1; + oneof value { + VectorTag vector = 2; + StructTag struct = 3; + GenericTag generic = 4; + } +} + +enum TypeTagType { + TYPE_TAG_BOOL = 0; + TYPE_TAG_U8 = 1; + TYPE_TAG_U16 = 2; + TYPE_TAG_U32 = 3; + TYPE_TAG_U64 = 4; + TYPE_TAG_U128 = 5; + TYPE_TAG_U256 = 6; + TYPE_TAG_ADDRESS = 7; + TYPE_TAG_SIGNER = 8; + TYPE_TAG_VECTOR = 9; + TYPE_TAG_STRUCT = 10; + TYPE_TAG_GENERIC = 11; +} + +message VectorTag { + TypeTag element_type = 1; +} + +message StructTag { + bytes address = 1; // 32-byte address + string module = 2; + string name = 3; + repeated TypeTag type_params = 4; +} + +message GenericTag { + uint32 index = 1; +} + +// ========== EventsByHandle ========== + +message EventsByHandleRequest { + bytes account = 1; // 32-byte address + string event_handle = 2; // Event handle struct tag + string field_name = 3; // Field in the event handle struct + optional uint64 start = 4; // Starting sequence number + optional uint64 limit = 5; // Number of events to return (default 100) +} + +message EventsByHandleReply { + repeated Event events = 1; +} + +message Event { + uint64 version = 1; // Block version of the event + string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent + optional GUID guid = 3; // Unique identifier (V1 events only) + uint64 sequence_number = 4; // Sequence number (V1 events only) + bytes data = 5; // Event data as raw bytes +} + +message GUID { + uint64 creation_number = 1; // Number of the GUID + bytes account_address = 2; // 32-byte account address of creator +} + +// ========== TransactionByHash ========== + +message TransactionByHashRequest { + string hash = 1; // Transaction hash (hex string with 0x prefix) +} + +message TransactionByHashReply { + optional Transaction transaction = 1; +} + +enum TransactionVariant { + 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; +} + +message Transaction { + TransactionVariant type = 1; + string hash = 2; + optional uint64 version = 3; // nil for pending transactions + optional bool success = 4; // nil for pending/genesis transactions + bytes data = 5; // Raw transaction data +} + +// ========== SubmitTransaction ========== + +message SubmitTransactionRequest { + ModuleID receiver_module_id = 1; + bytes encoded_payload = 2; + optional GasConfig gas_config = 3; +} + +message SubmitTransactionReply { + optional PendingTransaction pending_transaction = 1; +} + +message GasConfig { + uint64 max_gas_amount = 1; // Maximum gas units willing to pay + uint64 gas_unit_price = 2; // Price per gas unit in octas +} + +message PendingTransaction { + string hash = 1; // Transaction hash (hex string with 0x prefix) + bytes sender = 2; // 32-byte sender address + uint64 sequence_number = 3; // Sequence number + optional uint64 replay_protection_nonce = 4; // Optional nonce for replay protection + uint64 max_gas_amount = 5; // Maximum gas amount + uint64 gas_unit_price = 6; // Gas unit price + uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds + bytes payload = 8; // Transaction payload as raw bytes + bytes signature = 9; // Signature as raw bytes +} + +// ========== WriteReport ========== + +message WriteReportRequest { + bytes receiver = 1; // 32-byte Aptos account address of the receiver module + optional GasConfig gas_config = 2; // optional gas configuration + sdk.v1alpha.ReportResponse report = 3; // signed report from consensus +} + +message WriteReportReply { + TxStatus tx_status = 1; + optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) + optional uint64 transaction_fee = 3; // gas used in octas + optional string error_message = 4; +} + +// ========== Service ========== + +service Client { + option (tools.generator.v1alpha.capability) = { + mode: MODE_DON + capability_id: "aptos@1.0.0" + labels: { + // from https://github.com/smartcontractkit/chain-selectors/blob/main/selectors_aptos.yml + key: "ChainSelector" + value: { + uint64_label: { + defaults: [ + { + key: "aptos-mainnet" + value: 4741433654826277614 + }, + { + key: "aptos-testnet" + value: 743186221051783445 + } + ] + } + } + } + }; + + rpc WriteReport(WriteReportRequest) returns (WriteReportReply); +} + diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index d20b63cf..5130580b 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -1,6 +1,221 @@ // Code generated by github.com/smartcontractkit/chainlink-protos/cre/go/installer/bootstrap. DO NOT EDIT.\n") package pkg +const blockchainAptosV1alphaClientEmbedded = `syntax = "proto3"; +package capabilities.blockchain.aptos.v1alpha; + +import "sdk/v1alpha/sdk.proto"; +import "tools/generator/v1alpha/cre_metadata.proto"; + +// Transaction execution status returned by the forwarder. +enum TxStatus { + TX_STATUS_FATAL = 0; // unrecoverable failure + TX_STATUS_ABORTED = 1; // not executed / dropped + TX_STATUS_SUCCESS = 2; // executed successfully +} + +// ========== AccountAPTBalance ========== + +message AccountAPTBalanceRequest { + bytes address = 1; // 32-byte address +} + +message AccountAPTBalanceReply { + uint64 value = 1; +} + +// ========== View ========== + +message ViewRequest { + ViewPayload payload = 1; +} + +message ViewReply { + bytes data = 1; +} + +message ViewPayload { + ModuleID module = 1; + string function = 2; + repeated TypeTag arg_types = 3; + repeated bytes args = 4; +} + +message ModuleID { + bytes address = 1; // 32-byte address + string name = 2; +} + +message TypeTag { + TypeTagType type = 1; + oneof value { + VectorTag vector = 2; + StructTag struct = 3; + GenericTag generic = 4; + } +} + +enum TypeTagType { + TYPE_TAG_BOOL = 0; + TYPE_TAG_U8 = 1; + TYPE_TAG_U16 = 2; + TYPE_TAG_U32 = 3; + TYPE_TAG_U64 = 4; + TYPE_TAG_U128 = 5; + TYPE_TAG_U256 = 6; + TYPE_TAG_ADDRESS = 7; + TYPE_TAG_SIGNER = 8; + TYPE_TAG_VECTOR = 9; + TYPE_TAG_STRUCT = 10; + TYPE_TAG_GENERIC = 11; +} + +message VectorTag { + TypeTag element_type = 1; +} + +message StructTag { + bytes address = 1; // 32-byte address + string module = 2; + string name = 3; + repeated TypeTag type_params = 4; +} + +message GenericTag { + uint32 index = 1; +} + +// ========== EventsByHandle ========== + +message EventsByHandleRequest { + bytes account = 1; // 32-byte address + string event_handle = 2; // Event handle struct tag + string field_name = 3; // Field in the event handle struct + optional uint64 start = 4; // Starting sequence number + optional uint64 limit = 5; // Number of events to return (default 100) +} + +message EventsByHandleReply { + repeated Event events = 1; +} + +message Event { + uint64 version = 1; // Block version of the event + string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent + optional GUID guid = 3; // Unique identifier (V1 events only) + uint64 sequence_number = 4; // Sequence number (V1 events only) + bytes data = 5; // Event data as raw bytes +} + +message GUID { + uint64 creation_number = 1; // Number of the GUID + bytes account_address = 2; // 32-byte account address of creator +} + +// ========== TransactionByHash ========== + +message TransactionByHashRequest { + string hash = 1; // Transaction hash (hex string with 0x prefix) +} + +message TransactionByHashReply { + optional Transaction transaction = 1; +} + +enum TransactionVariant { + 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; +} + +message Transaction { + TransactionVariant type = 1; + string hash = 2; + optional uint64 version = 3; // nil for pending transactions + optional bool success = 4; // nil for pending/genesis transactions + bytes data = 5; // Raw transaction data +} + +// ========== SubmitTransaction ========== + +message SubmitTransactionRequest { + ModuleID receiver_module_id = 1; + bytes encoded_payload = 2; + optional GasConfig gas_config = 3; +} + +message SubmitTransactionReply { + optional PendingTransaction pending_transaction = 1; +} + +message GasConfig { + uint64 max_gas_amount = 1; // Maximum gas units willing to pay + uint64 gas_unit_price = 2; // Price per gas unit in octas +} + +message PendingTransaction { + string hash = 1; // Transaction hash (hex string with 0x prefix) + bytes sender = 2; // 32-byte sender address + uint64 sequence_number = 3; // Sequence number + optional uint64 replay_protection_nonce = 4; // Optional nonce for replay protection + uint64 max_gas_amount = 5; // Maximum gas amount + uint64 gas_unit_price = 6; // Gas unit price + uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds + bytes payload = 8; // Transaction payload as raw bytes + bytes signature = 9; // Signature as raw bytes +} + +// ========== WriteReport ========== + +message WriteReportRequest { + bytes receiver = 1; // 32-byte Aptos account address of the receiver module + optional GasConfig gas_config = 2; // optional gas configuration + sdk.v1alpha.ReportResponse report = 3; // signed report from consensus +} + +message WriteReportReply { + TxStatus tx_status = 1; + optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) + optional uint64 transaction_fee = 3; // gas used in octas + optional string error_message = 4; +} + +// ========== Service ========== + +service Client { + option (tools.generator.v1alpha.capability) = { + mode: MODE_DON + capability_id: "aptos@1.0.0" + labels: { + // from https://github.com/smartcontractkit/chain-selectors/blob/main/selectors_aptos.yml + key: "ChainSelector" + value: { + uint64_label: { + defaults: [ + { + key: "aptos-mainnet" + value: 4741433654826277614 + }, + { + key: "aptos-testnet" + value: 743186221051783445 + } + ] + } + } + } + }; + + rpc WriteReport(WriteReportRequest) returns (WriteReportReply); +} + +` + const blockchainEvmV1alphaClientEmbedded = `syntax = "proto3"; package capabilities.blockchain.evm.v1alpha; @@ -1595,6 +1810,10 @@ message Decimal { ` var allFiles = []*embeddedFile{ + { + name: "capabilities/blockchain/aptos/v1alpha/client.proto", + content: blockchainAptosV1alphaClientEmbedded, + }, { name: "capabilities/blockchain/evm/v1alpha/client.proto", content: blockchainEvmV1alphaClientEmbedded, From 52dae36ff7f325a205a8861015c202d56c8e6b73 Mon Sep 17 00:00:00 2001 From: "app-token-issuer-engops[bot]" <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 11:03:07 +0000 Subject: [PATCH 2/9] Auto-fix: buf format, gofmt, go generate, go mod tidy --- .../blockchain/aptos/v1alpha/client.proto | 75 +++++++++---------- cre/go/installer/pkg/embedded_gen.go | 75 +++++++++---------- 2 files changed, 74 insertions(+), 76 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index 7982b213..81b42739 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -6,15 +6,15 @@ import "tools/generator/v1alpha/cre_metadata.proto"; // Transaction execution status returned by the forwarder. enum TxStatus { - TX_STATUS_FATAL = 0; // unrecoverable failure - TX_STATUS_ABORTED = 1; // not executed / dropped - TX_STATUS_SUCCESS = 2; // executed successfully + TX_STATUS_FATAL = 0; // unrecoverable failure + TX_STATUS_ABORTED = 1; // not executed / dropped + TX_STATUS_SUCCESS = 2; // executed successfully } // ========== AccountAPTBalance ========== message AccountAPTBalanceRequest { - bytes address = 1; // 32-byte address + bytes address = 1; // 32-byte address } message AccountAPTBalanceReply { @@ -39,7 +39,7 @@ message ViewPayload { } message ModuleID { - bytes address = 1; // 32-byte address + bytes address = 1; // 32-byte address string name = 2; } @@ -72,7 +72,7 @@ message VectorTag { } message StructTag { - bytes address = 1; // 32-byte address + bytes address = 1; // 32-byte address string module = 2; string name = 3; repeated TypeTag type_params = 4; @@ -85,11 +85,11 @@ message GenericTag { // ========== EventsByHandle ========== message EventsByHandleRequest { - bytes account = 1; // 32-byte address - string event_handle = 2; // Event handle struct tag - string field_name = 3; // Field in the event handle struct - optional uint64 start = 4; // Starting sequence number - optional uint64 limit = 5; // Number of events to return (default 100) + bytes account = 1; // 32-byte address + string event_handle = 2; // Event handle struct tag + string field_name = 3; // Field in the event handle struct + optional uint64 start = 4; // Starting sequence number + optional uint64 limit = 5; // Number of events to return (default 100) } message EventsByHandleReply { @@ -97,22 +97,22 @@ message EventsByHandleReply { } message Event { - uint64 version = 1; // Block version of the event - string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent - optional GUID guid = 3; // Unique identifier (V1 events only) - uint64 sequence_number = 4; // Sequence number (V1 events only) - bytes data = 5; // Event data as raw bytes + uint64 version = 1; // Block version of the event + string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent + optional GUID guid = 3; // Unique identifier (V1 events only) + uint64 sequence_number = 4; // Sequence number (V1 events only) + bytes data = 5; // Event data as raw bytes } message GUID { - uint64 creation_number = 1; // Number of the GUID - bytes account_address = 2; // 32-byte account address of creator + uint64 creation_number = 1; // Number of the GUID + bytes account_address = 2; // 32-byte account address of creator } // ========== TransactionByHash ========== message TransactionByHashRequest { - string hash = 1; // Transaction hash (hex string with 0x prefix) + string hash = 1; // Transaction hash (hex string with 0x prefix) } message TransactionByHashReply { @@ -133,9 +133,9 @@ enum TransactionVariant { message Transaction { TransactionVariant type = 1; string hash = 2; - optional uint64 version = 3; // nil for pending transactions - optional bool success = 4; // nil for pending/genesis transactions - bytes data = 5; // Raw transaction data + optional uint64 version = 3; // nil for pending transactions + optional bool success = 4; // nil for pending/genesis transactions + bytes data = 5; // Raw transaction data } // ========== SubmitTransaction ========== @@ -151,34 +151,34 @@ message SubmitTransactionReply { } message GasConfig { - uint64 max_gas_amount = 1; // Maximum gas units willing to pay - uint64 gas_unit_price = 2; // Price per gas unit in octas + uint64 max_gas_amount = 1; // Maximum gas units willing to pay + uint64 gas_unit_price = 2; // Price per gas unit in octas } message PendingTransaction { - string hash = 1; // Transaction hash (hex string with 0x prefix) - bytes sender = 2; // 32-byte sender address - uint64 sequence_number = 3; // Sequence number + string hash = 1; // Transaction hash (hex string with 0x prefix) + bytes sender = 2; // 32-byte sender address + uint64 sequence_number = 3; // Sequence number optional uint64 replay_protection_nonce = 4; // Optional nonce for replay protection - uint64 max_gas_amount = 5; // Maximum gas amount - uint64 gas_unit_price = 6; // Gas unit price - uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds - bytes payload = 8; // Transaction payload as raw bytes - bytes signature = 9; // Signature as raw bytes + uint64 max_gas_amount = 5; // Maximum gas amount + uint64 gas_unit_price = 6; // Gas unit price + uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds + bytes payload = 8; // Transaction payload as raw bytes + bytes signature = 9; // Signature as raw bytes } // ========== WriteReport ========== message WriteReportRequest { - bytes receiver = 1; // 32-byte Aptos account address of the receiver module - optional GasConfig gas_config = 2; // optional gas configuration - sdk.v1alpha.ReportResponse report = 3; // signed report from consensus + bytes receiver = 1; // 32-byte Aptos account address of the receiver module + optional GasConfig gas_config = 2; // optional gas configuration + sdk.v1alpha.ReportResponse report = 3; // signed report from consensus } message WriteReportReply { TxStatus tx_status = 1; - optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) - optional uint64 transaction_fee = 3; // gas used in octas + optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) + optional uint64 transaction_fee = 3; // gas used in octas optional string error_message = 4; } @@ -210,4 +210,3 @@ service Client { rpc WriteReport(WriteReportRequest) returns (WriteReportReply); } - diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 5130580b..e566ae41 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -9,15 +9,15 @@ import "tools/generator/v1alpha/cre_metadata.proto"; // Transaction execution status returned by the forwarder. enum TxStatus { - TX_STATUS_FATAL = 0; // unrecoverable failure - TX_STATUS_ABORTED = 1; // not executed / dropped - TX_STATUS_SUCCESS = 2; // executed successfully + TX_STATUS_FATAL = 0; // unrecoverable failure + TX_STATUS_ABORTED = 1; // not executed / dropped + TX_STATUS_SUCCESS = 2; // executed successfully } // ========== AccountAPTBalance ========== message AccountAPTBalanceRequest { - bytes address = 1; // 32-byte address + bytes address = 1; // 32-byte address } message AccountAPTBalanceReply { @@ -42,7 +42,7 @@ message ViewPayload { } message ModuleID { - bytes address = 1; // 32-byte address + bytes address = 1; // 32-byte address string name = 2; } @@ -75,7 +75,7 @@ message VectorTag { } message StructTag { - bytes address = 1; // 32-byte address + bytes address = 1; // 32-byte address string module = 2; string name = 3; repeated TypeTag type_params = 4; @@ -88,11 +88,11 @@ message GenericTag { // ========== EventsByHandle ========== message EventsByHandleRequest { - bytes account = 1; // 32-byte address - string event_handle = 2; // Event handle struct tag - string field_name = 3; // Field in the event handle struct - optional uint64 start = 4; // Starting sequence number - optional uint64 limit = 5; // Number of events to return (default 100) + bytes account = 1; // 32-byte address + string event_handle = 2; // Event handle struct tag + string field_name = 3; // Field in the event handle struct + optional uint64 start = 4; // Starting sequence number + optional uint64 limit = 5; // Number of events to return (default 100) } message EventsByHandleReply { @@ -100,22 +100,22 @@ message EventsByHandleReply { } message Event { - uint64 version = 1; // Block version of the event - string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent - optional GUID guid = 3; // Unique identifier (V1 events only) - uint64 sequence_number = 4; // Sequence number (V1 events only) - bytes data = 5; // Event data as raw bytes + uint64 version = 1; // Block version of the event + string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent + optional GUID guid = 3; // Unique identifier (V1 events only) + uint64 sequence_number = 4; // Sequence number (V1 events only) + bytes data = 5; // Event data as raw bytes } message GUID { - uint64 creation_number = 1; // Number of the GUID - bytes account_address = 2; // 32-byte account address of creator + uint64 creation_number = 1; // Number of the GUID + bytes account_address = 2; // 32-byte account address of creator } // ========== TransactionByHash ========== message TransactionByHashRequest { - string hash = 1; // Transaction hash (hex string with 0x prefix) + string hash = 1; // Transaction hash (hex string with 0x prefix) } message TransactionByHashReply { @@ -136,9 +136,9 @@ enum TransactionVariant { message Transaction { TransactionVariant type = 1; string hash = 2; - optional uint64 version = 3; // nil for pending transactions - optional bool success = 4; // nil for pending/genesis transactions - bytes data = 5; // Raw transaction data + optional uint64 version = 3; // nil for pending transactions + optional bool success = 4; // nil for pending/genesis transactions + bytes data = 5; // Raw transaction data } // ========== SubmitTransaction ========== @@ -154,34 +154,34 @@ message SubmitTransactionReply { } message GasConfig { - uint64 max_gas_amount = 1; // Maximum gas units willing to pay - uint64 gas_unit_price = 2; // Price per gas unit in octas + uint64 max_gas_amount = 1; // Maximum gas units willing to pay + uint64 gas_unit_price = 2; // Price per gas unit in octas } message PendingTransaction { - string hash = 1; // Transaction hash (hex string with 0x prefix) - bytes sender = 2; // 32-byte sender address - uint64 sequence_number = 3; // Sequence number + string hash = 1; // Transaction hash (hex string with 0x prefix) + bytes sender = 2; // 32-byte sender address + uint64 sequence_number = 3; // Sequence number optional uint64 replay_protection_nonce = 4; // Optional nonce for replay protection - uint64 max_gas_amount = 5; // Maximum gas amount - uint64 gas_unit_price = 6; // Gas unit price - uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds - bytes payload = 8; // Transaction payload as raw bytes - bytes signature = 9; // Signature as raw bytes + uint64 max_gas_amount = 5; // Maximum gas amount + uint64 gas_unit_price = 6; // Gas unit price + uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds + bytes payload = 8; // Transaction payload as raw bytes + bytes signature = 9; // Signature as raw bytes } // ========== WriteReport ========== message WriteReportRequest { - bytes receiver = 1; // 32-byte Aptos account address of the receiver module - optional GasConfig gas_config = 2; // optional gas configuration - sdk.v1alpha.ReportResponse report = 3; // signed report from consensus + bytes receiver = 1; // 32-byte Aptos account address of the receiver module + optional GasConfig gas_config = 2; // optional gas configuration + sdk.v1alpha.ReportResponse report = 3; // signed report from consensus } message WriteReportReply { TxStatus tx_status = 1; - optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) - optional uint64 transaction_fee = 3; // gas used in octas + optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) + optional uint64 transaction_fee = 3; // gas used in octas optional string error_message = 4; } @@ -213,7 +213,6 @@ service Client { rpc WriteReport(WriteReportRequest) returns (WriteReportReply); } - ` const blockchainEvmV1alphaClientEmbedded = `syntax = "proto3"; From 7cc66f3020aec446eb864fd0f7460fd940c2d306 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Wed, 18 Feb 2026 17:08:24 +0000 Subject: [PATCH 3/9] update types --- .../blockchain/aptos/v1alpha/client.proto | 16 +++------------- cre/go/installer/pkg/embedded_gen.go | 16 +++------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index 7982b213..f2b7aea9 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -147,7 +147,9 @@ message SubmitTransactionRequest { } message SubmitTransactionReply { - optional PendingTransaction pending_transaction = 1; + TxStatus tx_status = 1; + string tx_hash = 2; + string tx_idempotency_key = 3; } message GasConfig { @@ -155,18 +157,6 @@ message GasConfig { uint64 gas_unit_price = 2; // Price per gas unit in octas } -message PendingTransaction { - string hash = 1; // Transaction hash (hex string with 0x prefix) - bytes sender = 2; // 32-byte sender address - uint64 sequence_number = 3; // Sequence number - optional uint64 replay_protection_nonce = 4; // Optional nonce for replay protection - uint64 max_gas_amount = 5; // Maximum gas amount - uint64 gas_unit_price = 6; // Gas unit price - uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds - bytes payload = 8; // Transaction payload as raw bytes - bytes signature = 9; // Signature as raw bytes -} - // ========== WriteReport ========== message WriteReportRequest { diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 5130580b..b56683ac 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -150,7 +150,9 @@ message SubmitTransactionRequest { } message SubmitTransactionReply { - optional PendingTransaction pending_transaction = 1; + TxStatus tx_status = 1; + string tx_hash = 2; + string tx_idempotency_key = 3; } message GasConfig { @@ -158,18 +160,6 @@ message GasConfig { uint64 gas_unit_price = 2; // Price per gas unit in octas } -message PendingTransaction { - string hash = 1; // Transaction hash (hex string with 0x prefix) - bytes sender = 2; // 32-byte sender address - uint64 sequence_number = 3; // Sequence number - optional uint64 replay_protection_nonce = 4; // Optional nonce for replay protection - uint64 max_gas_amount = 5; // Maximum gas amount - uint64 gas_unit_price = 6; // Gas unit price - uint64 expiration_timestamp_secs = 7; // Expiration timestamp in seconds - bytes payload = 8; // Transaction payload as raw bytes - bytes signature = 9; // Signature as raw bytes -} - // ========== WriteReport ========== message WriteReportRequest { From b0487ee07d0ab5ff213154111ab88dfd9ee26091 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Thu, 26 Feb 2026 12:20:02 +0000 Subject: [PATCH 4/9] typetagtype to typetagkind --- .../blockchain/aptos/v1alpha/client.proto | 43 ++++++------------- cre/go/installer/pkg/embedded_gen.go | 43 ++++++------------- 2 files changed, 28 insertions(+), 58 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index 11605bf8..bce3f78f 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -44,7 +44,7 @@ message ModuleID { } message TypeTag { - TypeTagType type = 1; + TypeTagKind kind = 1; oneof value { VectorTag vector = 2; StructTag struct = 3; @@ -52,7 +52,7 @@ message TypeTag { } } -enum TypeTagType { +enum TypeTagKind { TYPE_TAG_BOOL = 0; TYPE_TAG_U8 = 1; TYPE_TAG_U16 = 2; @@ -82,33 +82,6 @@ message GenericTag { uint32 index = 1; } -// ========== EventsByHandle ========== - -message EventsByHandleRequest { - bytes account = 1; // 32-byte address - string event_handle = 2; // Event handle struct tag - string field_name = 3; // Field in the event handle struct - optional uint64 start = 4; // Starting sequence number - optional uint64 limit = 5; // Number of events to return (default 100) -} - -message EventsByHandleReply { - repeated Event events = 1; -} - -message Event { - uint64 version = 1; // Block version of the event - string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent - optional GUID guid = 3; // Unique identifier (V1 events only) - uint64 sequence_number = 4; // Sequence number (V1 events only) - bytes data = 5; // Event data as raw bytes -} - -message GUID { - uint64 creation_number = 1; // Number of the GUID - bytes account_address = 2; // 32-byte account address of creator -} - // ========== TransactionByHash ========== message TransactionByHashRequest { @@ -138,6 +111,18 @@ message Transaction { bytes data = 5; // Raw transaction data } +// ========== AccountTransactions ========== + +message AccountTransactionsRequest { + bytes address = 1; // 32-byte address + optional uint64 start = 2; // Starting version number; nil for most recent + optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) +} + +message AccountTransactionsReply { + repeated Transaction transactions = 1; +} + // ========== SubmitTransaction ========== message SubmitTransactionRequest { diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index bb28f40f..29a8c2e2 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -47,7 +47,7 @@ message ModuleID { } message TypeTag { - TypeTagType type = 1; + TypeTagKind kind = 1; oneof value { VectorTag vector = 2; StructTag struct = 3; @@ -55,7 +55,7 @@ message TypeTag { } } -enum TypeTagType { +enum TypeTagKind { TYPE_TAG_BOOL = 0; TYPE_TAG_U8 = 1; TYPE_TAG_U16 = 2; @@ -85,33 +85,6 @@ message GenericTag { uint32 index = 1; } -// ========== EventsByHandle ========== - -message EventsByHandleRequest { - bytes account = 1; // 32-byte address - string event_handle = 2; // Event handle struct tag - string field_name = 3; // Field in the event handle struct - optional uint64 start = 4; // Starting sequence number - optional uint64 limit = 5; // Number of events to return (default 100) -} - -message EventsByHandleReply { - repeated Event events = 1; -} - -message Event { - uint64 version = 1; // Block version of the event - string type = 2; // Fully qualified name e.g. 0x1::coin::WithdrawEvent - optional GUID guid = 3; // Unique identifier (V1 events only) - uint64 sequence_number = 4; // Sequence number (V1 events only) - bytes data = 5; // Event data as raw bytes -} - -message GUID { - uint64 creation_number = 1; // Number of the GUID - bytes account_address = 2; // 32-byte account address of creator -} - // ========== TransactionByHash ========== message TransactionByHashRequest { @@ -141,6 +114,18 @@ message Transaction { bytes data = 5; // Raw transaction data } +// ========== AccountTransactions ========== + +message AccountTransactionsRequest { + bytes address = 1; // 32-byte address + optional uint64 start = 2; // Starting version number; nil for most recent + optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) +} + +message AccountTransactionsReply { + repeated Transaction transactions = 1; +} + // ========== SubmitTransaction ========== message SubmitTransactionRequest { From db534f77b7aef029d432d8a8fcf23ba9d6da4584 Mon Sep 17 00:00:00 2001 From: "app-token-issuer-engops[bot]" <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 12:21:16 +0000 Subject: [PATCH 5/9] Auto-fix: buf format, gofmt, go generate, go mod tidy --- cre/capabilities/blockchain/aptos/v1alpha/client.proto | 6 +++--- cre/go/installer/pkg/embedded_gen.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index bce3f78f..341eaa76 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -114,9 +114,9 @@ message Transaction { // ========== AccountTransactions ========== message AccountTransactionsRequest { - bytes address = 1; // 32-byte address - optional uint64 start = 2; // Starting version number; nil for most recent - optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) + bytes address = 1; // 32-byte address + optional uint64 start = 2; // Starting version number; nil for most recent + optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) } message AccountTransactionsReply { diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 29a8c2e2..85f003e1 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -117,9 +117,9 @@ message Transaction { // ========== AccountTransactions ========== message AccountTransactionsRequest { - bytes address = 1; // 32-byte address - optional uint64 start = 2; // Starting version number; nil for most recent - optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) + bytes address = 1; // 32-byte address + optional uint64 start = 2; // Starting version number; nil for most recent + optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) } message AccountTransactionsReply { From 2eaa79e8ee04cb60c3aca9d44074ec41c87d0716 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Thu, 26 Feb 2026 12:24:21 +0000 Subject: [PATCH 6/9] TYPE_TAG_KIND_ --- cre/capabilities/blockchain/aptos/v1alpha/client.proto | 2 +- cre/go/installer/pkg/embedded_gen.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index bce3f78f..65c21407 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -53,7 +53,7 @@ message TypeTag { } enum TypeTagKind { - TYPE_TAG_BOOL = 0; + TYPE_TAG_KIND_BOOL = 0; TYPE_TAG_U8 = 1; TYPE_TAG_U16 = 2; TYPE_TAG_U32 = 3; diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 29a8c2e2..46b4a818 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -56,7 +56,7 @@ message TypeTag { } enum TypeTagKind { - TYPE_TAG_BOOL = 0; + TYPE_TAG_KIND_BOOL = 0; TYPE_TAG_U8 = 1; TYPE_TAG_U16 = 2; TYPE_TAG_U32 = 3; From 142f0babd8f2d21562d81070e2d2b07d0a128aed Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Thu, 26 Feb 2026 12:29:11 +0000 Subject: [PATCH 7/9] enum fix --- .../blockchain/aptos/v1alpha/client.proto | 22 +++++++++---------- cre/go/installer/pkg/embedded_gen.go | 22 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index bb3d6129..3872b205 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -54,17 +54,17 @@ message TypeTag { enum TypeTagKind { TYPE_TAG_KIND_BOOL = 0; - TYPE_TAG_U8 = 1; - TYPE_TAG_U16 = 2; - TYPE_TAG_U32 = 3; - TYPE_TAG_U64 = 4; - TYPE_TAG_U128 = 5; - TYPE_TAG_U256 = 6; - TYPE_TAG_ADDRESS = 7; - TYPE_TAG_SIGNER = 8; - TYPE_TAG_VECTOR = 9; - TYPE_TAG_STRUCT = 10; - TYPE_TAG_GENERIC = 11; + 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; } message VectorTag { diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 07143887..b46d0696 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -57,17 +57,17 @@ message TypeTag { enum TypeTagKind { TYPE_TAG_KIND_BOOL = 0; - TYPE_TAG_U8 = 1; - TYPE_TAG_U16 = 2; - TYPE_TAG_U32 = 3; - TYPE_TAG_U64 = 4; - TYPE_TAG_U128 = 5; - TYPE_TAG_U256 = 6; - TYPE_TAG_ADDRESS = 7; - TYPE_TAG_SIGNER = 8; - TYPE_TAG_VECTOR = 9; - TYPE_TAG_STRUCT = 10; - TYPE_TAG_GENERIC = 11; + 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; } message VectorTag { From afa0a398e3c36d404e7c1ff44edad41d331b0c11 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Thu, 26 Feb 2026 12:56:00 +0000 Subject: [PATCH 8/9] add rpc methods --- cre/capabilities/blockchain/aptos/v1alpha/client.proto | 5 +++++ cre/go/installer/pkg/embedded_gen.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index 3872b205..6937a64e 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -183,5 +183,10 @@ service Client { } }; + rpc AccountAPTBalance(AccountAPTBalanceRequest) returns (AccountAPTBalanceReply); + rpc View(ViewRequest) returns (ViewReply); + rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashReply); + rpc AccountTransactions(AccountTransactionsRequest) returns (AccountTransactionsReply); + rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); rpc WriteReport(WriteReportRequest) returns (WriteReportReply); } diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index b46d0696..dc8a2d97 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -186,6 +186,11 @@ service Client { } }; + rpc AccountAPTBalance(AccountAPTBalanceRequest) returns (AccountAPTBalanceReply); + rpc View(ViewRequest) returns (ViewReply); + rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashReply); + rpc AccountTransactions(AccountTransactionsRequest) returns (AccountTransactionsReply); + rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); rpc WriteReport(WriteReportRequest) returns (WriteReportReply); } ` From 6313f95ae2c150c1e0027191836e8211ea2d9c49 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Thu, 26 Feb 2026 12:57:49 +0000 Subject: [PATCH 9/9] remove submittx --- cre/capabilities/blockchain/aptos/v1alpha/client.proto | 1 - cre/go/installer/pkg/embedded_gen.go | 1 - 2 files changed, 2 deletions(-) diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto index 6937a64e..bd3f2003 100644 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ b/cre/capabilities/blockchain/aptos/v1alpha/client.proto @@ -187,6 +187,5 @@ service Client { rpc View(ViewRequest) returns (ViewReply); rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashReply); rpc AccountTransactions(AccountTransactionsRequest) returns (AccountTransactionsReply); - rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); rpc WriteReport(WriteReportRequest) returns (WriteReportReply); } diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 58c39035..aaea3c4a 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -190,7 +190,6 @@ service Client { rpc View(ViewRequest) returns (ViewReply); rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashReply); rpc AccountTransactions(AccountTransactionsRequest) returns (AccountTransactionsReply); - rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionReply); rpc WriteReport(WriteReportRequest) returns (WriteReportReply); } `