Skip to content

Commit

Permalink
add explicit hex message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-L2L committed Nov 4, 2024
1 parent a5ddfc0 commit e56d062
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
11 changes: 9 additions & 2 deletions proto/cusf/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ package cusf.common.v1;

import "google/protobuf/wrappers.proto";

/// Consensus-encoded hex
/// Consensus-encoded hex.
/// Variable length data uses a length prefix.
message ConsensusHex {
google.protobuf.StringValue hex = 1;
}

/// Reverse-encoded hex
/// Hex encoding of byte arrays/vectors.
/// Length prefixes are not used.
message Hex {
google.protobuf.StringValue hex = 1;
}

/// Reverse consensus-encoded hex
message ReverseHex {
google.protobuf.StringValue hex = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion proto/cusf/mainchain/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ message SidechainDeclaration {
google.protobuf.StringValue title = 1;
google.protobuf.StringValue description = 2;
cusf.common.v1.ConsensusHex hash_id_1 = 3;
cusf.common.v1.ConsensusHex hash_id_2 = 4;
cusf.common.v1.Hex hash_id_2 = 4;
}
oneof sidechain_declaration {
V0 v0 = 1;
Expand Down
12 changes: 6 additions & 6 deletions proto/cusf/mainchain/v1/validator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ enum Network {
NETWORK_TESTNET = 5;
}

message Output {
cusf.common.v1.ConsensusHex address = 2;
uint64 value_sats = 3;
}

message Deposit {
uint64 sequence_number = 1;
message Output {
cusf.common.v1.Hex address = 2;
google.protobuf.UInt64Value value_sats = 3;
}

google.protobuf.UInt64Value sequence_number = 1;
OutPoint outpoint = 2;
Output output = 3;
}
Expand Down
2 changes: 1 addition & 1 deletion proto/cusf/mainchain/v1/wallet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ message CreateBmmCriticalDataTransactionResponse {

message CreateDepositTransactionRequest {
google.protobuf.UInt32Value sidechain_id = 1;
cusf.common.v1.ConsensusHex address = 2;
cusf.common.v1.Hex address = 2;
google.protobuf.UInt64Value value_sats = 3;
google.protobuf.UInt64Value fee_sats = 4;
}
Expand Down

0 comments on commit e56d062

Please sign in to comment.