diff --git a/wallet/manager.go b/wallet/manager.go
index 50dca6f97..2361d9ff8 100644
--- a/wallet/manager.go
+++ b/wallet/manager.go
@@ -143,7 +143,7 @@ func (wm *Manager) SignRawTransaction(
}
func (wm *Manager) GetNewAddress(
- walletName, label string,
+ walletName, label, password string,
addressType crypto.AddressType,
) (*vault.AddressInfo, error) {
wlt, ok := wm.wallets[walletName]
@@ -168,8 +168,16 @@ func (wm *Manager) GetNewAddress(
addressInfo = info
case crypto.AddressTypeEd25519Account:
- return nil, status.Errorf(codes.InvalidArgument, "not supported yet")
+ if password == "" {
+ return nil, status.Errorf(codes.InvalidArgument, "password cannot be empty when address type is Ed25519")
+ }
+
+ info, err := wlt.NewEd25519AccountAddress(label, password)
+ if err != nil {
+ return nil, err
+ }
+ addressInfo = info
case crypto.AddressTypeTreasury:
return nil, status.Errorf(codes.InvalidArgument, "invalid address type")
diff --git a/www/grpc/gen/dart/blockchain.pb.dart b/www/grpc/gen/dart/blockchain.pb.dart
index 8ecf905fb..32465c8d3 100644
--- a/www/grpc/gen/dart/blockchain.pb.dart
+++ b/www/grpc/gen/dart/blockchain.pb.dart
@@ -1026,23 +1026,23 @@ class GetConsensusInfoRequest extends $pb.GeneratedMessage {
class GetConsensusInfoResponse extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetConsensusInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
- ..pc
+
+ proposal
+ Proposal
+
+ The proposal of the consensus info.
+
+
+
+ proposal.height
+ uint32
+
+ The height of the proposal.
+
+
+
+ proposal.round
+ int32
+
+ The round of the proposal.
+
+
+
+ proposal.block_data
+ string
+
+ The block data of the proposal.
+
+
+
+ proposal.signature_data
+ string
+
+ The signature data of the proposal.
+
+
- instances
repeated ConsensusInfo
@@ -1513,42 +1548,7 @@ committee.
The change-proposer value of the vote.
-
- proposal
- Proposal
-
- The proposal of the consensus info.
-
-
-
- proposal.height
- uint32
-
- The height of the proposal.
-
-
-
- proposal.round
- int32
-
- The round of the proposal.
-
-
-
- proposal.block_data
- string
-
- The block data of the proposal.
-
-
-
-
+
### GetAccount
@@ -2924,6 +2924,8 @@ public key.proposal.signature_data
- string
-
- The signature data of the proposal.
-
-
- * List of consensus instances. + * The proposal of the consensus info. ** - *
repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * .pactus.Proposal proposal = 1 [json_name = "proposal"];
+ * @return Whether the proposal field is set.
*/
- java.util.List- * List of consensus instances. + * The proposal of the consensus info. ** - *
repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * .pactus.Proposal proposal = 1 [json_name = "proposal"];
+ * @return The proposal.
*/
- pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index);
+ pactus.blockchain.BlockchainOuterClass.Proposal getProposal();
/**
* - * List of consensus instances. + * The proposal of the consensus info. ** - *
repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * .pactus.Proposal proposal = 1 [json_name = "proposal"];
*/
- int getInstancesCount();
+ pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder();
+
/**
* * List of consensus instances. ** - *
repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
- java.util.List extends pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder>
- getInstancesOrBuilderList();
+ java.util.List* List of consensus instances. ** - *
repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
- pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder(
- int index);
-
+ pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index);
/**
* - * The proposal of the consensus info. + * List of consensus instances. ** - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- * @return Whether the proposal field is set.
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
- boolean hasProposal();
+ int getInstancesCount();
/**
* - * The proposal of the consensus info. + * List of consensus instances. ** - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- * @return The proposal.
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
- pactus.blockchain.BlockchainOuterClass.Proposal getProposal();
+ java.util.List extends pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder>
+ getInstancesOrBuilderList();
/**
* - * The proposal of the consensus info. + * List of consensus instances. ** - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
- pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder();
+ pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder(
+ int index);
}
/**
* @@ -13167,102 +13167,102 @@ protected java.lang.Object newInstance( pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class); } - public static final int INSTANCES_FIELD_NUMBER = 1; - private java.util.List* - *instances_; + public static final int PROPOSAL_FIELD_NUMBER = 1; + private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; /** * - * List of consensus instances. + * The proposal of the consensus info. ** - *repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ * @return Whether the proposal field is set. */ @java.lang.Override - public java.util.ListgetInstancesList() { - return instances_; + public boolean hasProposal() { + return proposal_ != null; } /** * - * List of consensus instances. + * The proposal of the consensus info. ** - *repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ * @return The proposal. */ @java.lang.Override - public java.util.List extends pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder> - getInstancesOrBuilderList() { - return instances_; + public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { + return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; } /** *- * List of consensus instances. + * The proposal of the consensus info. ** - *repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ *.pactus.Proposal proposal = 1 [json_name = "proposal"];
*/ @java.lang.Override - public int getInstancesCount() { - return instances_.size(); + public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { + return getProposal(); } + + public static final int INSTANCES_FIELD_NUMBER = 2; + private java.util.Listinstances_; /** * * List of consensus instances. ** - *repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ *repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/ @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) { - return instances_.get(index); + public java.util.ListgetInstancesList() { + return instances_; } /** * * List of consensus instances. ** - *repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ *repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/ @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( - int index) { - return instances_.get(index); + public java.util.List extends pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder> + getInstancesOrBuilderList() { + return instances_; } - - public static final int PROPOSAL_FIELD_NUMBER = 6; - private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; /** *- * The proposal of the consensus info. + * List of consensus instances. ** - *.pactus.Proposal proposal = 6 [json_name = "proposal"];
- * @return Whether the proposal field is set. + *repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/ @java.lang.Override - public boolean hasProposal() { - return proposal_ != null; + public int getInstancesCount() { + return instances_.size(); } /** *- * The proposal of the consensus info. + * List of consensus instances. ** - *.pactus.Proposal proposal = 6 [json_name = "proposal"];
- * @return The proposal. + *repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/ @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { - return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) { + return instances_.get(index); } /** *- * The proposal of the consensus info. + * List of consensus instances. ** - *.pactus.Proposal proposal = 6 [json_name = "proposal"];
+ *repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/ @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { - return getProposal(); + public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( + int index) { + return instances_.get(index); } private byte memoizedIsInitialized = -1; @@ -13279,11 +13279,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(1, instances_.get(i)); - } if (proposal_ != null) { - output.writeMessage(6, getProposal()); + output.writeMessage(1, getProposal()); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(2, instances_.get(i)); } getUnknownFields().writeTo(output); } @@ -13294,13 +13294,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < instances_.size(); i++) { + if (proposal_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, instances_.get(i)); + .computeMessageSize(1, getProposal()); } - if (proposal_ != null) { + for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getProposal()); + .computeMessageSize(2, instances_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -13317,13 +13317,13 @@ public boolean equals(final java.lang.Object obj) { } pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse other = (pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse) obj; - if (!getInstancesList() - .equals(other.getInstancesList())) return false; if (hasProposal() != other.hasProposal()) return false; if (hasProposal()) { if (!getProposal() .equals(other.getProposal())) return false; } + if (!getInstancesList() + .equals(other.getInstancesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13335,14 +13335,14 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } if (hasProposal()) { hash = (37 * hash) + PROPOSAL_FIELD_NUMBER; hash = (53 * hash) + getProposal().hashCode(); } + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -13475,6 +13475,12 @@ private Builder( @java.lang.Override public Builder clear() { super.clear(); + if (proposalBuilder_ == null) { + proposal_ = null; + } else { + proposal_ = null; + proposalBuilder_ = null; + } if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); } else { @@ -13482,12 +13488,6 @@ public Builder clear() { instancesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); - if (proposalBuilder_ == null) { - proposal_ = null; - } else { - proposal_ = null; - proposalBuilder_ = null; - } return this; } @@ -13515,6 +13515,11 @@ public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse build() { public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse buildPartial() { pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse result = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse(this); int from_bitField0_ = bitField0_; + if (proposalBuilder_ == null) { + result.proposal_ = proposal_; + } else { + result.proposal_ = proposalBuilder_.build(); + } if (instancesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { instances_ = java.util.Collections.unmodifiableList(instances_); @@ -13524,11 +13529,6 @@ public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse buildPart } else { result.instances_ = instancesBuilder_.build(); } - if (proposalBuilder_ == null) { - result.proposal_ = proposal_; - } else { - result.proposal_ = proposalBuilder_.build(); - } onBuilt(); return result; } @@ -13577,6 +13577,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse other) { if (other == pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance()) return this; + if (other.hasProposal()) { + mergeProposal(other.getProposal()); + } if (instancesBuilder_ == null) { if (!other.instances_.isEmpty()) { if (instances_.isEmpty()) { @@ -13603,9 +13606,6 @@ public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfo } } } - if (other.hasProposal()) { - mergeProposal(other.getProposal()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -13633,6 +13633,13 @@ public Builder mergeFrom( done = true; break; case 10: { + input.readMessage( + getProposalFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { pactus.blockchain.BlockchainOuterClass.ConsensusInfo m = input.readMessage( pactus.blockchain.BlockchainOuterClass.ConsensusInfo.parser(), @@ -13644,14 +13651,7 @@ public Builder mergeFrom( instancesBuilder_.addMessage(m); } break; - } // case 10 - case 50: { - input.readMessage( - getProposalFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 50 + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -13669,6 +13669,161 @@ public Builder mergeFrom( } private int bitField0_; + private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> proposalBuilder_; + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ * @return Whether the proposal field is set. + */ + public boolean hasProposal() { + return proposalBuilder_ != null || proposal_ != null; + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ * @return The proposal. + */ + public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { + if (proposalBuilder_ == null) { + return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } else { + return proposalBuilder_.getMessage(); + } + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + public Builder setProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { + if (proposalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proposal_ = value; + onChanged(); + } else { + proposalBuilder_.setMessage(value); + } + + return this; + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + public Builder setProposal( + pactus.blockchain.BlockchainOuterClass.Proposal.Builder builderForValue) { + if (proposalBuilder_ == null) { + proposal_ = builderForValue.build(); + onChanged(); + } else { + proposalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + public Builder mergeProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { + if (proposalBuilder_ == null) { + if (proposal_ != null) { + proposal_ = + pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder(proposal_).mergeFrom(value).buildPartial(); + } else { + proposal_ = value; + } + onChanged(); + } else { + proposalBuilder_.mergeFrom(value); + } + + return this; + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + public Builder clearProposal() { + if (proposalBuilder_ == null) { + proposal_ = null; + onChanged(); + } else { + proposal_ = null; + proposalBuilder_ = null; + } + + return this; + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + public pactus.blockchain.BlockchainOuterClass.Proposal.Builder getProposalBuilder() { + + onChanged(); + return getProposalFieldBuilder().getBuilder(); + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { + if (proposalBuilder_ != null) { + return proposalBuilder_.getMessageOrBuilder(); + } else { + return proposal_ == null ? + pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } + } + /** + *+ * The proposal of the consensus info. + *+ * + *.pactus.Proposal proposal = 1 [json_name = "proposal"];
+ */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> + getProposalFieldBuilder() { + if (proposalBuilder_ == null) { + proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder>( + getProposal(), + getParentForChildren(), + isClean()); + proposal_ = null; + } + return proposalBuilder_; + } + private java.util.Listinstances_ = java.util.Collections.emptyList(); private void ensureInstancesIsMutable() { @@ -13686,7 +13841,7 @@ private void ensureInstancesIsMutable() { * List of consensus instances. *
repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public java.util.Listrepeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public int getInstancesCount() {
if (instancesBuilder_ == null) {
@@ -13714,7 +13869,7 @@ public int getInstancesCount() {
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) {
if (instancesBuilder_ == null) {
@@ -13728,7 +13883,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int ind
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder setInstances(
int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) {
@@ -13749,7 +13904,7 @@ public Builder setInstances(
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder setInstances(
int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) {
@@ -13767,7 +13922,7 @@ public Builder setInstances(
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder addInstances(pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) {
if (instancesBuilder_ == null) {
@@ -13787,7 +13942,7 @@ public Builder addInstances(pactus.blockchain.BlockchainOuterClass.ConsensusInfo
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder addInstances(
int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) {
@@ -13808,7 +13963,7 @@ public Builder addInstances(
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder addInstances(
pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) {
@@ -13826,7 +13981,7 @@ public Builder addInstances(
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder addInstances(
int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) {
@@ -13844,7 +13999,7 @@ public Builder addInstances(
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder addAllInstances(
java.lang.Iterable extends pactus.blockchain.BlockchainOuterClass.ConsensusInfo> values) {
@@ -13863,7 +14018,7 @@ public Builder addAllInstances(
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder clearInstances() {
if (instancesBuilder_ == null) {
@@ -13880,7 +14035,7 @@ public Builder clearInstances() {
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public Builder removeInstances(int index) {
if (instancesBuilder_ == null) {
@@ -13897,7 +14052,7 @@ public Builder removeInstances(int index) {
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder getInstancesBuilder(
int index) {
@@ -13908,7 +14063,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder getInstances
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder(
int index) {
@@ -13922,7 +14077,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstance
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public java.util.List extends pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder>
getInstancesOrBuilderList() {
@@ -13937,7 +14092,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstance
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder() {
return getInstancesFieldBuilder().addBuilder(
@@ -13948,7 +14103,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstances
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder(
int index) {
@@ -13960,7 +14115,7 @@ public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstances
* List of consensus instances.
*
*
- * repeated .pactus.ConsensusInfo instances = 1 [json_name = "instances"];
+ * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"];
*/
public java.util.List- * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- * @return Whether the proposal field is set.
- */
- public boolean hasProposal() {
- return proposalBuilder_ != null || proposal_ != null;
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- * @return The proposal.
- */
- public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() {
- if (proposalBuilder_ == null) {
- return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_;
- } else {
- return proposalBuilder_.getMessage();
- }
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- public Builder setProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) {
- if (proposalBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- proposal_ = value;
- onChanged();
- } else {
- proposalBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- public Builder setProposal(
- pactus.blockchain.BlockchainOuterClass.Proposal.Builder builderForValue) {
- if (proposalBuilder_ == null) {
- proposal_ = builderForValue.build();
- onChanged();
- } else {
- proposalBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- public Builder mergeProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) {
- if (proposalBuilder_ == null) {
- if (proposal_ != null) {
- proposal_ =
- pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder(proposal_).mergeFrom(value).buildPartial();
- } else {
- proposal_ = value;
- }
- onChanged();
- } else {
- proposalBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- public Builder clearProposal() {
- if (proposalBuilder_ == null) {
- proposal_ = null;
- onChanged();
- } else {
- proposal_ = null;
- proposalBuilder_ = null;
- }
-
- return this;
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- public pactus.blockchain.BlockchainOuterClass.Proposal.Builder getProposalBuilder() {
-
- onChanged();
- return getProposalFieldBuilder().getBuilder();
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() {
- if (proposalBuilder_ != null) {
- return proposalBuilder_.getMessageOrBuilder();
- } else {
- return proposal_ == null ?
- pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_;
- }
- }
- /**
- * - * The proposal of the consensus info. - *- * - *
.pactus.Proposal proposal = 6 [json_name = "proposal"];
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder>
- getProposalFieldBuilder() {
- if (proposalBuilder_ == null) {
- proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder>(
- getProposal(),
- getParentForChildren(),
- isClean());
- proposal_ = null;
- }
- return proposalBuilder_;
- }
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -24764,9 +24764,9 @@ public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType
"sPruned\022%\n\016pruning_height\030\t \001(\rR\rpruning" +
"Height\022&\n\017last_block_time\030\n \001(\003R\rlastBlo" +
"ckTime\"\031\n\027GetConsensusInfoRequest\"}\n\030Get" +
- "ConsensusInfoResponse\0223\n\tinstances\030\001 \003(\013" +
- "2\025.pactus.ConsensusInfoR\tinstances\022,\n\010pr" +
- "oposal\030\006 \001(\0132\020.pactus.ProposalR\010proposal" +
+ "ConsensusInfoResponse\022,\n\010proposal\030\001 \001(\0132" +
+ "\020.pactus.ProposalR\010proposal\0223\n\tinstances" +
+ "\030\002 \003(\0132\025.pactus.ConsensusInfoR\tinstances" +
"\"Q\n\027GetTxPoolContentRequest\0226\n\014payload_t" +
"ype\030\001 \001(\0162\023.pactus.PayloadTypeR\013payloadT" +
"ype\"E\n\030GetTxPoolContentResponse\022)\n\003txs\030\001" +
@@ -24952,7 +24952,7 @@ public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType
internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_pactus_GetConsensusInfoResponse_descriptor,
- new java.lang.String[] { "Instances", "Proposal", });
+ new java.lang.String[] { "Proposal", "Instances", });
internal_static_pactus_GetTxPoolContentRequest_descriptor =
getDescriptor().getMessageTypes().get(19);
internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable = new
diff --git a/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java b/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java
index 9cf8b97d7..6e9fad838 100644
--- a/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java
+++ b/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java
@@ -48,6 +48,15 @@ public enum AddressType
* ADDRESS_TYPE_BLS_ACCOUNT = 2;
*/
ADDRESS_TYPE_BLS_ACCOUNT(2),
+ /**
+ * + * Account address type with Ed25519 signature scheme. + * Note: Generating a new Ed25519 address requires the wallet password. + *+ * + *
ADDRESS_TYPE_ED25519_ACCOUNT = 3;
+ */
+ ADDRESS_TYPE_ED25519_ACCOUNT(3),
UNRECOGNIZED(-1),
;
@@ -76,6 +85,15 @@ public enum AddressType
* ADDRESS_TYPE_BLS_ACCOUNT = 2;
*/
public static final int ADDRESS_TYPE_BLS_ACCOUNT_VALUE = 2;
+ /**
+ * + * Account address type with Ed25519 signature scheme. + * Note: Generating a new Ed25519 address requires the wallet password. + *+ * + *
ADDRESS_TYPE_ED25519_ACCOUNT = 3;
+ */
+ public static final int ADDRESS_TYPE_ED25519_ACCOUNT_VALUE = 3;
public final int getNumber() {
@@ -105,6 +123,7 @@ public static AddressType forNumber(int value) {
case 0: return ADDRESS_TYPE_TREASURY;
case 1: return ADDRESS_TYPE_VALIDATOR;
case 2: return ADDRESS_TYPE_BLS_ACCOUNT;
+ case 3: return ADDRESS_TYPE_ED25519_ACCOUNT;
default: return null;
}
}
@@ -4188,6 +4207,26 @@ public interface GetNewAddressRequestOrBuilder extends
*/
com.google.protobuf.ByteString
getLabelBytes();
+
+ /**
+ * + * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *
string password = 4 [json_name = "password"];
+ * @return The password.
+ */
+ java.lang.String getPassword();
+ /**
+ * + * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *
string password = 4 [json_name = "password"];
+ * @return The bytes for password.
+ */
+ com.google.protobuf.ByteString
+ getPasswordBytes();
}
/**
* @@ -4209,6 +4248,7 @@ private GetNewAddressRequest() { walletName_ = ""; addressType_ = 0; label_ = ""; + password_ = ""; } @java.lang.Override @@ -4355,6 +4395,52 @@ public java.lang.String getLabel() { } } + public static final int PASSWORD_FIELD_NUMBER = 4; + private volatile java.lang.Object password_; + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -4378,6 +4464,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, label_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); + } getUnknownFields().writeTo(output); } @@ -4397,6 +4486,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, label_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4417,6 +4509,8 @@ public boolean equals(final java.lang.Object obj) { if (addressType_ != other.addressType_) return false; if (!getLabel() .equals(other.getLabel())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4434,6 +4528,8 @@ public int hashCode() { hash = (53 * hash) + addressType_; hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4572,6 +4668,8 @@ public Builder clear() { label_ = ""; + password_ = ""; + return this; } @@ -4601,6 +4699,7 @@ public pactus.wallet.WalletOuterClass.GetNewAddressRequest buildPartial() { result.walletName_ = walletName_; result.addressType_ = addressType_; result.label_ = label_; + result.password_ = password_; onBuilt(); return result; } @@ -4660,6 +4759,10 @@ public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetNewAddressRequest oth label_ = other.label_; onChanged(); } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4701,6 +4804,11 @@ public Builder mergeFrom( break; } // case 26 + case 34: { + password_ = input.readStringRequireUtf8(); + + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -4982,6 +5090,102 @@ public Builder setLabelBytes( onChanged(); return this; } + + private java.lang.Object password_ = ""; + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + *+ * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + *+ * + *string password = 4 [json_name = "password"];
+ * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -17275,69 +17479,71 @@ public pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstanceForT "t_name\030\001 \001(\tR\nwalletName\022\030\n\007address\030\002 \001(" + "\tR\007address\"S\n\031GetAddressHistoryResponse\022" + "6\n\014history_info\030\001 \003(\0132\023.pactus.HistoryIn" + - "foR\013historyInfo\"\205\001\n\024GetNewAddressRequest" + + "foR\013historyInfo\"\241\001\n\024GetNewAddressRequest" + "\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\0226\n\014add" + "ress_type\030\002 \001(\0162\023.pactus.AddressTypeR\013ad" + - "dressType\022\024\n\005label\030\003 \001(\tR\005label\"p\n\025GetNe" + - "wAddressResponse\022\037\n\013wallet_name\030\001 \001(\tR\nw" + - "alletName\0226\n\014address_info\030\002 \001(\0132\023.pactus" + - ".AddressInfoR\013addressInfo\"o\n\024RestoreWall" + - "etRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalletNa" + - "me\022\032\n\010mnemonic\030\002 \001(\tR\010mnemonic\022\032\n\010passwo" + - "rd\030\003 \001(\tR\010password\"8\n\025RestoreWalletRespo" + - "nse\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\"R\n\023" + - "CreateWalletRequest\022\037\n\013wallet_name\030\001 \001(\t" + - "R\nwalletName\022\032\n\010password\030\004 \001(\tR\010password" + - "\"2\n\024CreateWalletResponse\022\032\n\010mnemonic\030\002 \001" + - "(\tR\010mnemonic\"4\n\021LoadWalletRequest\022\037\n\013wal" + - "let_name\030\001 \001(\tR\nwalletName\"5\n\022LoadWallet" + - "Response\022\037\n\013wallet_name\030\001 \001(\tR\nwalletNam" + - "e\"6\n\023UnloadWalletRequest\022\037\n\013wallet_name\030" + - "\001 \001(\tR\nwalletName\"7\n\024UnloadWalletRespons" + - "e\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\";\n\032Ge" + - "tValidatorAddressRequest\022\035\n\npublic_key\030\001" + - " \001(\tR\tpublicKey\"7\n\033GetValidatorAddressRe" + - "sponse\022\030\n\007address\030\001 \001(\tR\007address\"\201\001\n\031Sig" + - "nRawTransactionRequest\022\037\n\013wallet_name\030\001 " + - "\001(\tR\nwalletName\022\'\n\017raw_transaction\030\002 \001(\t" + - "R\016rawTransaction\022\032\n\010password\030\003 \001(\tR\010pass" + - "word\"y\n\032SignRawTransactionResponse\022%\n\016tr" + - "ansaction_id\030\001 \001(\tR\rtransactionId\0224\n\026sig" + - "ned_raw_transaction\030\002 \001(\tR\024signedRawTran" + - "saction\"9\n\026GetTotalBalanceRequest\022\037\n\013wal" + - "let_name\030\001 \001(\tR\nwalletName\"_\n\027GetTotalBa" + - "lanceResponse\022\037\n\013wallet_name\030\001 \001(\tR\nwall" + - "etName\022#\n\rtotal_balance\030\002 \001(\003R\014totalBala" + - "nce\"\205\001\n\022SignMessageRequest\022\037\n\013wallet_nam" + - "e\030\001 \001(\tR\nwalletName\022\032\n\010password\030\002 \001(\tR\010p" + - "assword\022\030\n\007address\030\003 \001(\tR\007address\022\030\n\007mes" + - "sage\030\004 \001(\tR\007message\"3\n\023SignMessageRespon" + - "se\022\034\n\tsignature\030\001 \001(\tR\tsignature*b\n\013Addr" + - "essType\022\031\n\025ADDRESS_TYPE_TREASURY\020\000\022\032\n\026AD" + - "DRESS_TYPE_VALIDATOR\020\001\022\034\n\030ADDRESS_TYPE_B" + - "LS_ACCOUNT\020\0022\262\006\n\006Wallet\022I\n\014CreateWallet\022" + - "\033.pactus.CreateWalletRequest\032\034.pactus.Cr" + - "eateWalletResponse\022L\n\rRestoreWallet\022\034.pa" + - "ctus.RestoreWalletRequest\032\035.pactus.Resto" + - "reWalletResponse\022C\n\nLoadWallet\022\031.pactus." + - "LoadWalletRequest\032\032.pactus.LoadWalletRes" + - "ponse\022I\n\014UnloadWallet\022\033.pactus.UnloadWal" + - "letRequest\032\034.pactus.UnloadWalletResponse" + - "\022R\n\017GetTotalBalance\022\036.pactus.GetTotalBal" + - "anceRequest\032\037.pactus.GetTotalBalanceResp" + - "onse\022[\n\022SignRawTransaction\022!.pactus.Sign" + - "RawTransactionRequest\032\".pactus.SignRawTr" + - "ansactionResponse\022^\n\023GetValidatorAddress" + - "\022\".pactus.GetValidatorAddressRequest\032#.p" + - "actus.GetValidatorAddressResponse\022L\n\rGet" + - "NewAddress\022\034.pactus.GetNewAddressRequest" + - "\032\035.pactus.GetNewAddressResponse\022X\n\021GetAd" + - "dressHistory\022 .pactus.GetAddressHistoryR" + - "equest\032!.pactus.GetAddressHistoryRespons" + - "e\022F\n\013SignMessage\022\032.pactus.SignMessageReq" + - "uest\032\033.pactus.SignMessageResponseBA\n\rpac" + - "tus.walletZ0github.com/pactus-project/pa" + - "ctus/www/grpc/pactusb\006proto3" + "dressType\022\024\n\005label\030\003 \001(\tR\005label\022\032\n\010passw" + + "ord\030\004 \001(\tR\010password\"p\n\025GetNewAddressResp" + + "onse\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\0226\n" + + "\014address_info\030\002 \001(\0132\023.pactus.AddressInfo" + + "R\013addressInfo\"o\n\024RestoreWalletRequest\022\037\n" + + "\013wallet_name\030\001 \001(\tR\nwalletName\022\032\n\010mnemon" + + "ic\030\002 \001(\tR\010mnemonic\022\032\n\010password\030\003 \001(\tR\010pa" + + "ssword\"8\n\025RestoreWalletResponse\022\037\n\013walle" + + "t_name\030\001 \001(\tR\nwalletName\"R\n\023CreateWallet" + + "Request\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName" + + "\022\032\n\010password\030\004 \001(\tR\010password\"2\n\024CreateWa" + + "lletResponse\022\032\n\010mnemonic\030\002 \001(\tR\010mnemonic" + + "\"4\n\021LoadWalletRequest\022\037\n\013wallet_name\030\001 \001" + + "(\tR\nwalletName\"5\n\022LoadWalletResponse\022\037\n\013" + + "wallet_name\030\001 \001(\tR\nwalletName\"6\n\023UnloadW" + + "alletRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalle" + + "tName\"7\n\024UnloadWalletResponse\022\037\n\013wallet_" + + "name\030\001 \001(\tR\nwalletName\";\n\032GetValidatorAd" + + "dressRequest\022\035\n\npublic_key\030\001 \001(\tR\tpublic" + + "Key\"7\n\033GetValidatorAddressResponse\022\030\n\007ad" + + "dress\030\001 \001(\tR\007address\"\201\001\n\031SignRawTransact" + + "ionRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalletN" + + "ame\022\'\n\017raw_transaction\030\002 \001(\tR\016rawTransac" + + "tion\022\032\n\010password\030\003 \001(\tR\010password\"y\n\032Sign" + + "RawTransactionResponse\022%\n\016transaction_id" + + "\030\001 \001(\tR\rtransactionId\0224\n\026signed_raw_tran" + + "saction\030\002 \001(\tR\024signedRawTransaction\"9\n\026G" + + "etTotalBalanceRequest\022\037\n\013wallet_name\030\001 \001" + + "(\tR\nwalletName\"_\n\027GetTotalBalanceRespons" + + "e\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\022#\n\rto" + + "tal_balance\030\002 \001(\003R\014totalBalance\"\205\001\n\022Sign" + + "MessageRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwal" + + "letName\022\032\n\010password\030\002 \001(\tR\010password\022\030\n\007a" + + "ddress\030\003 \001(\tR\007address\022\030\n\007message\030\004 \001(\tR\007" + + "message\"3\n\023SignMessageResponse\022\034\n\tsignat" + + "ure\030\001 \001(\tR\tsignature*\204\001\n\013AddressType\022\031\n\025" + + "ADDRESS_TYPE_TREASURY\020\000\022\032\n\026ADDRESS_TYPE_" + + "VALIDATOR\020\001\022\034\n\030ADDRESS_TYPE_BLS_ACCOUNT\020" + + "\002\022 \n\034ADDRESS_TYPE_ED25519_ACCOUNT\020\0032\262\006\n\006" + + "Wallet\022I\n\014CreateWallet\022\033.pactus.CreateWa" + + "lletRequest\032\034.pactus.CreateWalletRespons" + + "e\022L\n\rRestoreWallet\022\034.pactus.RestoreWalle" + + "tRequest\032\035.pactus.RestoreWalletResponse\022" + + "C\n\nLoadWallet\022\031.pactus.LoadWalletRequest" + + "\032\032.pactus.LoadWalletResponse\022I\n\014UnloadWa" + + "llet\022\033.pactus.UnloadWalletRequest\032\034.pact" + + "us.UnloadWalletResponse\022R\n\017GetTotalBalan" + + "ce\022\036.pactus.GetTotalBalanceRequest\032\037.pac" + + "tus.GetTotalBalanceResponse\022[\n\022SignRawTr" + + "ansaction\022!.pactus.SignRawTransactionReq" + + "uest\032\".pactus.SignRawTransactionResponse" + + "\022^\n\023GetValidatorAddress\022\".pactus.GetVali" + + "datorAddressRequest\032#.pactus.GetValidato" + + "rAddressResponse\022L\n\rGetNewAddress\022\034.pact" + + "us.GetNewAddressRequest\032\035.pactus.GetNewA" + + "ddressResponse\022X\n\021GetAddressHistory\022 .pa" + + "ctus.GetAddressHistoryRequest\032!.pactus.G" + + "etAddressHistoryResponse\022F\n\013SignMessage\022" + + "\032.pactus.SignMessageRequest\032\033.pactus.Sig" + + "nMessageResponseBA\n\rpactus.walletZ0githu" + + "b.com/pactus-project/pactus/www/grpc/pac" + + "tusb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -17373,7 +17579,7 @@ public pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstanceForT internal_static_pactus_GetNewAddressRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetNewAddressRequest_descriptor, - new java.lang.String[] { "WalletName", "AddressType", "Label", }); + new java.lang.String[] { "WalletName", "AddressType", "Label", "Password", }); internal_static_pactus_GetNewAddressResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_pactus_GetNewAddressResponse_fieldAccessorTable = new diff --git a/www/grpc/gen/js/blockchain_pb.js b/www/grpc/gen/js/blockchain_pb.js index e9f2d347e..4a3457f9b 100644 --- a/www/grpc/gen/js/blockchain_pb.js +++ b/www/grpc/gen/js/blockchain_pb.js @@ -3550,7 +3550,7 @@ proto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter = function(message, * @private {!Array} * @const */ -proto.pactus.GetConsensusInfoResponse.repeatedFields_ = [1]; +proto.pactus.GetConsensusInfoResponse.repeatedFields_ = [2]; @@ -3583,9 +3583,9 @@ proto.pactus.GetConsensusInfoResponse.prototype.toObject = function(opt_includeI */ proto.pactus.GetConsensusInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { + proposal: (f = msg.getProposal()) && proto.pactus.Proposal.toObject(includeInstance, f), instancesList: jspb.Message.toObjectList(msg.getInstancesList(), - proto.pactus.ConsensusInfo.toObject, includeInstance), - proposal: (f = msg.getProposal()) && proto.pactus.Proposal.toObject(includeInstance, f) + proto.pactus.ConsensusInfo.toObject, includeInstance) }; if (includeInstance) { @@ -3623,15 +3623,15 @@ proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader = function(msg var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.pactus.ConsensusInfo; - reader.readMessage(value,proto.pactus.ConsensusInfo.deserializeBinaryFromReader); - msg.addInstances(value); - break; - case 6: var value = new proto.pactus.Proposal; reader.readMessage(value,proto.pactus.Proposal.deserializeBinaryFromReader); msg.setProposal(value); break; + case 2: + var value = new proto.pactus.ConsensusInfo; + reader.readMessage(value,proto.pactus.ConsensusInfo.deserializeBinaryFromReader); + msg.addInstances(value); + break; default: reader.skipField(); break; @@ -3661,97 +3661,97 @@ proto.pactus.GetConsensusInfoResponse.prototype.serializeBinary = function() { */ proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getInstancesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.pactus.ConsensusInfo.serializeBinaryToWriter - ); - } f = message.getProposal(); if (f != null) { writer.writeMessage( - 6, + 1, f, proto.pactus.Proposal.serializeBinaryToWriter ); } + f = message.getInstancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.pactus.ConsensusInfo.serializeBinaryToWriter + ); + } }; /** - * repeated ConsensusInfo instances = 1; - * @return {!Array} + * optional Proposal proposal = 1; + * @return {?proto.pactus.Proposal} */ -proto.pactus.GetConsensusInfoResponse.prototype.getInstancesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.pactus.ConsensusInfo, 1)); +proto.pactus.GetConsensusInfoResponse.prototype.getProposal = function() { + return /** @type{?proto.pactus.Proposal} */ ( + jspb.Message.getWrapperField(this, proto.pactus.Proposal, 1)); }; /** - * @param {!Array} value + * @param {?proto.pactus.Proposal|undefined} value * @return {!proto.pactus.GetConsensusInfoResponse} returns this */ -proto.pactus.GetConsensusInfoResponse.prototype.setInstancesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.pactus.GetConsensusInfoResponse.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.pactus.ConsensusInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.ConsensusInfo} + * Clears the message field making it undefined. + * @return {!proto.pactus.GetConsensusInfoResponse} returns this */ -proto.pactus.GetConsensusInfoResponse.prototype.addInstances = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.ConsensusInfo, opt_index); +proto.pactus.GetConsensusInfoResponse.prototype.clearProposal = function() { + return this.setProposal(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetConsensusInfoResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.pactus.GetConsensusInfoResponse.prototype.clearInstancesList = function() { - return this.setInstancesList([]); +proto.pactus.GetConsensusInfoResponse.prototype.hasProposal = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional Proposal proposal = 6; - * @return {?proto.pactus.Proposal} + * repeated ConsensusInfo instances = 2; + * @return {!Array} */ -proto.pactus.GetConsensusInfoResponse.prototype.getProposal = function() { - return /** @type{?proto.pactus.Proposal} */ ( - jspb.Message.getWrapperField(this, proto.pactus.Proposal, 6)); +proto.pactus.GetConsensusInfoResponse.prototype.getInstancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.ConsensusInfo, 2)); }; /** - * @param {?proto.pactus.Proposal|undefined} value + * @param {!Array} value * @return {!proto.pactus.GetConsensusInfoResponse} returns this */ -proto.pactus.GetConsensusInfoResponse.prototype.setProposal = function(value) { - return jspb.Message.setWrapperField(this, 6, value); +proto.pactus.GetConsensusInfoResponse.prototype.setInstancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetConsensusInfoResponse} returns this + * @param {!proto.pactus.ConsensusInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.ConsensusInfo} */ -proto.pactus.GetConsensusInfoResponse.prototype.clearProposal = function() { - return this.setProposal(undefined); +proto.pactus.GetConsensusInfoResponse.prototype.addInstances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.ConsensusInfo, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetConsensusInfoResponse} returns this */ -proto.pactus.GetConsensusInfoResponse.prototype.hasProposal = function() { - return jspb.Message.getField(this, 6) != null; +proto.pactus.GetConsensusInfoResponse.prototype.clearInstancesList = function() { + return this.setInstancesList([]); }; diff --git a/www/grpc/gen/js/wallet_pb.js b/www/grpc/gen/js/wallet_pb.js index 4e53e90ea..af1e74bb4 100644 --- a/www/grpc/gen/js/wallet_pb.js +++ b/www/grpc/gen/js/wallet_pb.js @@ -1332,7 +1332,8 @@ proto.pactus.GetNewAddressRequest.toObject = function(includeInstance, msg) { var f, obj = { walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), addressType: jspb.Message.getFieldWithDefault(msg, 2, 0), - label: jspb.Message.getFieldWithDefault(msg, 3, "") + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + password: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -1381,6 +1382,10 @@ proto.pactus.GetNewAddressRequest.deserializeBinaryFromReader = function(msg, re var value = /** @type {string} */ (reader.readString()); msg.setLabel(value); break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; default: reader.skipField(); break; @@ -1431,6 +1436,13 @@ proto.pactus.GetNewAddressRequest.serializeBinaryToWriter = function(message, wr f ); } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; @@ -1488,6 +1500,24 @@ proto.pactus.GetNewAddressRequest.prototype.setLabel = function(value) { }; +/** + * optional string password = 4; + * @return {string} + */ +proto.pactus.GetNewAddressRequest.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNewAddressRequest} returns this + */ +proto.pactus.GetNewAddressRequest.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + @@ -4055,7 +4085,8 @@ proto.pactus.SignMessageResponse.prototype.setSignature = function(value) { proto.pactus.AddressType = { ADDRESS_TYPE_TREASURY: 0, ADDRESS_TYPE_VALIDATOR: 1, - ADDRESS_TYPE_BLS_ACCOUNT: 2 + ADDRESS_TYPE_BLS_ACCOUNT: 2, + ADDRESS_TYPE_ED25519_ACCOUNT: 3 }; goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/python/blockchain_pb2.py b/www/grpc/gen/python/blockchain_pb2.py index f79c1ad09..71699b150 100644 --- a/www/grpc/gen/python/blockchain_pb2.py +++ b/www/grpc/gen/python/blockchain_pb2.py @@ -14,7 +14,7 @@ import transaction_pb2 as transaction__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x62lockchain.proto\x12\x06pactus\x1a\x11transaction.proto\"-\n\x11GetAccountRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"C\n\x12GetAccountResponse\x12-\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x13.pactus.AccountInfoR\x07\x61\x63\x63ount\"\x1e\n\x1cGetValidatorAddressesRequest\"=\n\x1dGetValidatorAddressesResponse\x12\x1c\n\taddresses\x18\x01 \x03(\tR\taddresses\"/\n\x13GetValidatorRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x1bGetValidatorByNumberRequest\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\"K\n\x14GetValidatorResponse\x12\x33\n\tvalidator\x18\x01 \x01(\x0b\x32\x15.pactus.ValidatorInfoR\tvalidator\"/\n\x13GetPublicKeyRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x14GetPublicKeyResponse\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"_\n\x0fGetBlockRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x34\n\tverbosity\x18\x02 \x01(\x0e\x32\x16.pactus.BlockVerbosityR\tverbosity\"\x83\x02\n\x10GetBlockResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x12\n\x04hash\x18\x02 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\tR\x04\x64\x61ta\x12\x1d\n\nblock_time\x18\x04 \x01(\rR\tblockTime\x12/\n\x06header\x18\x05 \x01(\x0b\x32\x17.pactus.BlockHeaderInfoR\x06header\x12\x34\n\tprev_cert\x18\x06 \x01(\x0b\x32\x17.pactus.CertificateInfoR\x08prevCert\x12)\n\x03txs\x18\x07 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"-\n\x13GetBlockHashRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"*\n\x14GetBlockHashResponse\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"+\n\x15GetBlockHeightRequest\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"0\n\x16GetBlockHeightResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"\x1a\n\x18GetBlockchainInfoRequest\"\xc1\x03\n\x19GetBlockchainInfoResponse\x12*\n\x11last_block_height\x18\x01 \x01(\rR\x0flastBlockHeight\x12&\n\x0flast_block_hash\x18\x02 \x01(\tR\rlastBlockHash\x12%\n\x0etotal_accounts\x18\x03 \x01(\x05R\rtotalAccounts\x12)\n\x10total_validators\x18\x04 \x01(\x05R\x0ftotalValidators\x12\x1f\n\x0btotal_power\x18\x05 \x01(\x03R\ntotalPower\x12\'\n\x0f\x63ommittee_power\x18\x06 \x01(\x03R\x0e\x63ommitteePower\x12H\n\x14\x63ommittee_validators\x18\x07 \x03(\x0b\x32\x15.pactus.ValidatorInfoR\x13\x63ommitteeValidators\x12\x1b\n\tis_pruned\x18\x08 \x01(\x08R\x08isPruned\x12%\n\x0epruning_height\x18\t \x01(\rR\rpruningHeight\x12&\n\x0flast_block_time\x18\n \x01(\x03R\rlastBlockTime\"\x19\n\x17GetConsensusInfoRequest\"}\n\x18GetConsensusInfoResponse\x12\x33\n\tinstances\x18\x01 \x03(\x0b\x32\x15.pactus.ConsensusInfoR\tinstances\x12,\n\x08proposal\x18\x06 \x01(\x0b\x32\x10.pactus.ProposalR\x08proposal\"Q\n\x17GetTxPoolContentRequest\x12\x36\n\x0cpayload_type\x18\x01 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\"E\n\x18GetTxPoolContentResponse\x12)\n\x03txs\x18\x01 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"\xdc\x02\n\rValidatorInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\x12\x16\n\x06number\x18\x04 \x01(\x05R\x06number\x12\x14\n\x05stake\x18\x05 \x01(\x03R\x05stake\x12.\n\x13last_bonding_height\x18\x06 \x01(\rR\x11lastBondingHeight\x12\x32\n\x15last_sortition_height\x18\x07 \x01(\rR\x13lastSortitionHeight\x12)\n\x10unbonding_height\x18\x08 \x01(\rR\x0funbondingHeight\x12\x18\n\x07\x61\x64\x64ress\x18\t \x01(\tR\x07\x61\x64\x64ress\x12-\n\x12\x61vailability_score\x18\n \x01(\x01R\x11\x61vailabilityScore\"\x81\x01\n\x0b\x41\x63\x63ountInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12\x18\n\x07\x62\x61lance\x18\x04 \x01(\x03R\x07\x62\x61lance\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"\xc4\x01\n\x0f\x42lockHeaderInfo\x12\x18\n\x07version\x18\x01 \x01(\x05R\x07version\x12&\n\x0fprev_block_hash\x18\x02 \x01(\tR\rprevBlockHash\x12\x1d\n\nstate_root\x18\x03 \x01(\tR\tstateRoot\x12%\n\x0esortition_seed\x18\x04 \x01(\tR\rsortitionSeed\x12)\n\x10proposer_address\x18\x05 \x01(\tR\x0fproposerAddress\"\x97\x01\n\x0f\x43\x65rtificateInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1e\n\ncommitters\x18\x03 \x03(\x05R\ncommitters\x12\x1c\n\tabsentees\x18\x04 \x03(\x05R\tabsentees\x12\x1c\n\tsignature\x18\x05 \x01(\tR\tsignature\"\xb1\x01\n\x08VoteInfo\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x10.pactus.VoteTypeR\x04type\x12\x14\n\x05voter\x18\x02 \x01(\tR\x05voter\x12\x1d\n\nblock_hash\x18\x03 \x01(\tR\tblockHash\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12\x19\n\x08\x63p_round\x18\x05 \x01(\x05R\x07\x63pRound\x12\x19\n\x08\x63p_value\x18\x06 \x01(\x05R\x07\x63pValue\"\x97\x01\n\rConsensusInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\x12\x16\n\x06height\x18\x03 \x01(\rR\x06height\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12&\n\x05votes\x18\x05 \x03(\x0b\x32\x10.pactus.VoteInfoR\x05votes\"~\n\x08Proposal\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1d\n\nblock_data\x18\x03 \x01(\tR\tblockData\x12%\n\x0esignature_data\x18\x04 \x01(\tR\rsignatureData*H\n\x0e\x42lockVerbosity\x12\x0e\n\nBLOCK_DATA\x10\x00\x12\x0e\n\nBLOCK_INFO\x10\x01\x12\x16\n\x12\x42LOCK_TRANSACTIONS\x10\x02*\\\n\x08VoteType\x12\x10\n\x0cVOTE_UNKNOWN\x10\x00\x12\x10\n\x0cVOTE_PREPARE\x10\x01\x12\x12\n\x0eVOTE_PRECOMMIT\x10\x02\x12\x18\n\x14VOTE_CHANGE_PROPOSER\x10\x03\x32\x8b\x07\n\nBlockchain\x12=\n\x08GetBlock\x12\x17.pactus.GetBlockRequest\x1a\x18.pactus.GetBlockResponse\x12I\n\x0cGetBlockHash\x12\x1b.pactus.GetBlockHashRequest\x1a\x1c.pactus.GetBlockHashResponse\x12O\n\x0eGetBlockHeight\x12\x1d.pactus.GetBlockHeightRequest\x1a\x1e.pactus.GetBlockHeightResponse\x12X\n\x11GetBlockchainInfo\x12 .pactus.GetBlockchainInfoRequest\x1a!.pactus.GetBlockchainInfoResponse\x12U\n\x10GetConsensusInfo\x12\x1f.pactus.GetConsensusInfoRequest\x1a .pactus.GetConsensusInfoResponse\x12\x43\n\nGetAccount\x12\x19.pactus.GetAccountRequest\x1a\x1a.pactus.GetAccountResponse\x12I\n\x0cGetValidator\x12\x1b.pactus.GetValidatorRequest\x1a\x1c.pactus.GetValidatorResponse\x12Y\n\x14GetValidatorByNumber\x12#.pactus.GetValidatorByNumberRequest\x1a\x1c.pactus.GetValidatorResponse\x12\x64\n\x15GetValidatorAddresses\x12$.pactus.GetValidatorAddressesRequest\x1a%.pactus.GetValidatorAddressesResponse\x12I\n\x0cGetPublicKey\x12\x1b.pactus.GetPublicKeyRequest\x1a\x1c.pactus.GetPublicKeyResponse\x12U\n\x10GetTxPoolContent\x12\x1f.pactus.GetTxPoolContentRequest\x1a .pactus.GetTxPoolContentResponseBE\n\x11pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x62lockchain.proto\x12\x06pactus\x1a\x11transaction.proto\"-\n\x11GetAccountRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"C\n\x12GetAccountResponse\x12-\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x13.pactus.AccountInfoR\x07\x61\x63\x63ount\"\x1e\n\x1cGetValidatorAddressesRequest\"=\n\x1dGetValidatorAddressesResponse\x12\x1c\n\taddresses\x18\x01 \x03(\tR\taddresses\"/\n\x13GetValidatorRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x1bGetValidatorByNumberRequest\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\"K\n\x14GetValidatorResponse\x12\x33\n\tvalidator\x18\x01 \x01(\x0b\x32\x15.pactus.ValidatorInfoR\tvalidator\"/\n\x13GetPublicKeyRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x14GetPublicKeyResponse\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"_\n\x0fGetBlockRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x34\n\tverbosity\x18\x02 \x01(\x0e\x32\x16.pactus.BlockVerbosityR\tverbosity\"\x83\x02\n\x10GetBlockResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x12\n\x04hash\x18\x02 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\tR\x04\x64\x61ta\x12\x1d\n\nblock_time\x18\x04 \x01(\rR\tblockTime\x12/\n\x06header\x18\x05 \x01(\x0b\x32\x17.pactus.BlockHeaderInfoR\x06header\x12\x34\n\tprev_cert\x18\x06 \x01(\x0b\x32\x17.pactus.CertificateInfoR\x08prevCert\x12)\n\x03txs\x18\x07 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"-\n\x13GetBlockHashRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"*\n\x14GetBlockHashResponse\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"+\n\x15GetBlockHeightRequest\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"0\n\x16GetBlockHeightResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"\x1a\n\x18GetBlockchainInfoRequest\"\xc1\x03\n\x19GetBlockchainInfoResponse\x12*\n\x11last_block_height\x18\x01 \x01(\rR\x0flastBlockHeight\x12&\n\x0flast_block_hash\x18\x02 \x01(\tR\rlastBlockHash\x12%\n\x0etotal_accounts\x18\x03 \x01(\x05R\rtotalAccounts\x12)\n\x10total_validators\x18\x04 \x01(\x05R\x0ftotalValidators\x12\x1f\n\x0btotal_power\x18\x05 \x01(\x03R\ntotalPower\x12\'\n\x0f\x63ommittee_power\x18\x06 \x01(\x03R\x0e\x63ommitteePower\x12H\n\x14\x63ommittee_validators\x18\x07 \x03(\x0b\x32\x15.pactus.ValidatorInfoR\x13\x63ommitteeValidators\x12\x1b\n\tis_pruned\x18\x08 \x01(\x08R\x08isPruned\x12%\n\x0epruning_height\x18\t \x01(\rR\rpruningHeight\x12&\n\x0flast_block_time\x18\n \x01(\x03R\rlastBlockTime\"\x19\n\x17GetConsensusInfoRequest\"}\n\x18GetConsensusInfoResponse\x12,\n\x08proposal\x18\x01 \x01(\x0b\x32\x10.pactus.ProposalR\x08proposal\x12\x33\n\tinstances\x18\x02 \x03(\x0b\x32\x15.pactus.ConsensusInfoR\tinstances\"Q\n\x17GetTxPoolContentRequest\x12\x36\n\x0cpayload_type\x18\x01 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\"E\n\x18GetTxPoolContentResponse\x12)\n\x03txs\x18\x01 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"\xdc\x02\n\rValidatorInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\x12\x16\n\x06number\x18\x04 \x01(\x05R\x06number\x12\x14\n\x05stake\x18\x05 \x01(\x03R\x05stake\x12.\n\x13last_bonding_height\x18\x06 \x01(\rR\x11lastBondingHeight\x12\x32\n\x15last_sortition_height\x18\x07 \x01(\rR\x13lastSortitionHeight\x12)\n\x10unbonding_height\x18\x08 \x01(\rR\x0funbondingHeight\x12\x18\n\x07\x61\x64\x64ress\x18\t \x01(\tR\x07\x61\x64\x64ress\x12-\n\x12\x61vailability_score\x18\n \x01(\x01R\x11\x61vailabilityScore\"\x81\x01\n\x0b\x41\x63\x63ountInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12\x18\n\x07\x62\x61lance\x18\x04 \x01(\x03R\x07\x62\x61lance\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"\xc4\x01\n\x0f\x42lockHeaderInfo\x12\x18\n\x07version\x18\x01 \x01(\x05R\x07version\x12&\n\x0fprev_block_hash\x18\x02 \x01(\tR\rprevBlockHash\x12\x1d\n\nstate_root\x18\x03 \x01(\tR\tstateRoot\x12%\n\x0esortition_seed\x18\x04 \x01(\tR\rsortitionSeed\x12)\n\x10proposer_address\x18\x05 \x01(\tR\x0fproposerAddress\"\x97\x01\n\x0f\x43\x65rtificateInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1e\n\ncommitters\x18\x03 \x03(\x05R\ncommitters\x12\x1c\n\tabsentees\x18\x04 \x03(\x05R\tabsentees\x12\x1c\n\tsignature\x18\x05 \x01(\tR\tsignature\"\xb1\x01\n\x08VoteInfo\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x10.pactus.VoteTypeR\x04type\x12\x14\n\x05voter\x18\x02 \x01(\tR\x05voter\x12\x1d\n\nblock_hash\x18\x03 \x01(\tR\tblockHash\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12\x19\n\x08\x63p_round\x18\x05 \x01(\x05R\x07\x63pRound\x12\x19\n\x08\x63p_value\x18\x06 \x01(\x05R\x07\x63pValue\"\x97\x01\n\rConsensusInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\x12\x16\n\x06height\x18\x03 \x01(\rR\x06height\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12&\n\x05votes\x18\x05 \x03(\x0b\x32\x10.pactus.VoteInfoR\x05votes\"~\n\x08Proposal\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1d\n\nblock_data\x18\x03 \x01(\tR\tblockData\x12%\n\x0esignature_data\x18\x04 \x01(\tR\rsignatureData*H\n\x0e\x42lockVerbosity\x12\x0e\n\nBLOCK_DATA\x10\x00\x12\x0e\n\nBLOCK_INFO\x10\x01\x12\x16\n\x12\x42LOCK_TRANSACTIONS\x10\x02*\\\n\x08VoteType\x12\x10\n\x0cVOTE_UNKNOWN\x10\x00\x12\x10\n\x0cVOTE_PREPARE\x10\x01\x12\x12\n\x0eVOTE_PRECOMMIT\x10\x02\x12\x18\n\x14VOTE_CHANGE_PROPOSER\x10\x03\x32\x8b\x07\n\nBlockchain\x12=\n\x08GetBlock\x12\x17.pactus.GetBlockRequest\x1a\x18.pactus.GetBlockResponse\x12I\n\x0cGetBlockHash\x12\x1b.pactus.GetBlockHashRequest\x1a\x1c.pactus.GetBlockHashResponse\x12O\n\x0eGetBlockHeight\x12\x1d.pactus.GetBlockHeightRequest\x1a\x1e.pactus.GetBlockHeightResponse\x12X\n\x11GetBlockchainInfo\x12 .pactus.GetBlockchainInfoRequest\x1a!.pactus.GetBlockchainInfoResponse\x12U\n\x10GetConsensusInfo\x12\x1f.pactus.GetConsensusInfoRequest\x1a .pactus.GetConsensusInfoResponse\x12\x43\n\nGetAccount\x12\x19.pactus.GetAccountRequest\x1a\x1a.pactus.GetAccountResponse\x12I\n\x0cGetValidator\x12\x1b.pactus.GetValidatorRequest\x1a\x1c.pactus.GetValidatorResponse\x12Y\n\x14GetValidatorByNumber\x12#.pactus.GetValidatorByNumberRequest\x1a\x1c.pactus.GetValidatorResponse\x12\x64\n\x15GetValidatorAddresses\x12$.pactus.GetValidatorAddressesRequest\x1a%.pactus.GetValidatorAddressesResponse\x12I\n\x0cGetPublicKey\x12\x1b.pactus.GetPublicKeyRequest\x1a\x1c.pactus.GetPublicKeyResponse\x12U\n\x10GetTxPoolContent\x12\x1f.pactus.GetTxPoolContentRequest\x1a .pactus.GetTxPoolContentResponseBE\n\x11pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'blockchain_pb2', globals()) diff --git a/www/grpc/gen/python/blockchain_pb2.pyi b/www/grpc/gen/python/blockchain_pb2.pyi index 85a5b127d..27b2a9848 100644 --- a/www/grpc/gen/python/blockchain_pb2.pyi +++ b/www/grpc/gen/python/blockchain_pb2.pyi @@ -162,10 +162,12 @@ class GetConsensusInfoRequest(_message.Message): def __init__(self) -> None: ... class GetConsensusInfoResponse(_message.Message): - __slots__ = ("instances",) + __slots__ = ("proposal", "instances") + PROPOSAL_FIELD_NUMBER: _ClassVar[int] INSTANCES_FIELD_NUMBER: _ClassVar[int] + proposal: Proposal instances: _containers.RepeatedCompositeFieldContainer[ConsensusInfo] - def __init__(self, instances: _Optional[_Iterable[_Union[ConsensusInfo, _Mapping]]] = ...) -> None: ... + def __init__(self, proposal: _Optional[_Union[Proposal, _Mapping]] = ..., instances: _Optional[_Iterable[_Union[ConsensusInfo, _Mapping]]] = ...) -> None: ... class GetTxPoolContentRequest(_message.Message): __slots__ = ("payload_type",) @@ -274,3 +276,15 @@ class ConsensusInfo(_message.Message): round: int votes: _containers.RepeatedCompositeFieldContainer[VoteInfo] def __init__(self, address: _Optional[str] = ..., active: bool = ..., height: _Optional[int] = ..., round: _Optional[int] = ..., votes: _Optional[_Iterable[_Union[VoteInfo, _Mapping]]] = ...) -> None: ... + +class Proposal(_message.Message): + __slots__ = ("height", "round", "block_data", "signature_data") + HEIGHT_FIELD_NUMBER: _ClassVar[int] + ROUND_FIELD_NUMBER: _ClassVar[int] + BLOCK_DATA_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_DATA_FIELD_NUMBER: _ClassVar[int] + height: int + round: int + block_data: str + signature_data: str + def __init__(self, height: _Optional[int] = ..., round: _Optional[int] = ..., block_data: _Optional[str] = ..., signature_data: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/wallet_pb2.py b/www/grpc/gen/python/wallet_pb2.py index 5dfe4de4d..2f2b028d4 100644 --- a/www/grpc/gen/python/wallet_pb2.py +++ b/www/grpc/gen/python/wallet_pb2.py @@ -14,7 +14,7 @@ import transaction_pb2 as transaction__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cwallet.proto\x12\x06pactus\x1a\x11transaction.proto\"p\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x1d\n\npublic_key\x18\x02 \x01(\tR\tpublicKey\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x12\n\x04path\x18\x04 \x01(\tR\x04path\"\xa5\x01\n\x0bHistoryInfo\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x12\n\x04time\x18\x02 \x01(\rR\x04time\x12!\n\x0cpayload_type\x18\x03 \x01(\tR\x0bpayloadType\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12\x16\n\x06\x61mount\x18\x05 \x01(\x03R\x06\x61mount\"U\n\x18GetAddressHistoryRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x01(\tR\x07\x61\x64\x64ress\"S\n\x19GetAddressHistoryResponse\x12\x36\n\x0chistory_info\x18\x01 \x03(\x0b\x32\x13.pactus.HistoryInfoR\x0bhistoryInfo\"\x85\x01\n\x14GetNewAddressRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_type\x18\x02 \x01(\x0e\x32\x13.pactus.AddressTypeR\x0b\x61\x64\x64ressType\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\"p\n\x15GetNewAddressResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_info\x18\x02 \x01(\x0b\x32\x13.pactus.AddressInfoR\x0b\x61\x64\x64ressInfo\"o\n\x14RestoreWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"8\n\x15RestoreWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"R\n\x13\x43reateWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"2\n\x14\x43reateWalletResponse\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\"4\n\x11LoadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"5\n\x12LoadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"6\n\x13UnloadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"7\n\x14UnloadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\";\n\x1aGetValidatorAddressRequest\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"7\n\x1bGetValidatorAddressResponse\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"\x81\x01\n\x19SignRawTransactionRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\'\n\x0fraw_transaction\x18\x02 \x01(\tR\x0erawTransaction\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"y\n\x1aSignRawTransactionResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x34\n\x16signed_raw_transaction\x18\x02 \x01(\tR\x14signedRawTransaction\"9\n\x16GetTotalBalanceRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"_\n\x17GetTotalBalanceResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12#\n\rtotal_balance\x18\x02 \x01(\x03R\x0ctotalBalance\"\x85\x01\n\x12SignMessageRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12\x18\n\x07message\x18\x04 \x01(\tR\x07message\"3\n\x13SignMessageResponse\x12\x1c\n\tsignature\x18\x01 \x01(\tR\tsignature*b\n\x0b\x41\x64\x64ressType\x12\x19\n\x15\x41\x44\x44RESS_TYPE_TREASURY\x10\x00\x12\x1a\n\x16\x41\x44\x44RESS_TYPE_VALIDATOR\x10\x01\x12\x1c\n\x18\x41\x44\x44RESS_TYPE_BLS_ACCOUNT\x10\x02\x32\xb2\x06\n\x06Wallet\x12I\n\x0c\x43reateWallet\x12\x1b.pactus.CreateWalletRequest\x1a\x1c.pactus.CreateWalletResponse\x12L\n\rRestoreWallet\x12\x1c.pactus.RestoreWalletRequest\x1a\x1d.pactus.RestoreWalletResponse\x12\x43\n\nLoadWallet\x12\x19.pactus.LoadWalletRequest\x1a\x1a.pactus.LoadWalletResponse\x12I\n\x0cUnloadWallet\x12\x1b.pactus.UnloadWalletRequest\x1a\x1c.pactus.UnloadWalletResponse\x12R\n\x0fGetTotalBalance\x12\x1e.pactus.GetTotalBalanceRequest\x1a\x1f.pactus.GetTotalBalanceResponse\x12[\n\x12SignRawTransaction\x12!.pactus.SignRawTransactionRequest\x1a\".pactus.SignRawTransactionResponse\x12^\n\x13GetValidatorAddress\x12\".pactus.GetValidatorAddressRequest\x1a#.pactus.GetValidatorAddressResponse\x12L\n\rGetNewAddress\x12\x1c.pactus.GetNewAddressRequest\x1a\x1d.pactus.GetNewAddressResponse\x12X\n\x11GetAddressHistory\x12 .pactus.GetAddressHistoryRequest\x1a!.pactus.GetAddressHistoryResponse\x12\x46\n\x0bSignMessage\x12\x1a.pactus.SignMessageRequest\x1a\x1b.pactus.SignMessageResponseBA\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cwallet.proto\x12\x06pactus\x1a\x11transaction.proto\"p\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x1d\n\npublic_key\x18\x02 \x01(\tR\tpublicKey\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x12\n\x04path\x18\x04 \x01(\tR\x04path\"\xa5\x01\n\x0bHistoryInfo\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x12\n\x04time\x18\x02 \x01(\rR\x04time\x12!\n\x0cpayload_type\x18\x03 \x01(\tR\x0bpayloadType\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12\x16\n\x06\x61mount\x18\x05 \x01(\x03R\x06\x61mount\"U\n\x18GetAddressHistoryRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x01(\tR\x07\x61\x64\x64ress\"S\n\x19GetAddressHistoryResponse\x12\x36\n\x0chistory_info\x18\x01 \x03(\x0b\x32\x13.pactus.HistoryInfoR\x0bhistoryInfo\"\xa1\x01\n\x14GetNewAddressRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_type\x18\x02 \x01(\x0e\x32\x13.pactus.AddressTypeR\x0b\x61\x64\x64ressType\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"p\n\x15GetNewAddressResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_info\x18\x02 \x01(\x0b\x32\x13.pactus.AddressInfoR\x0b\x61\x64\x64ressInfo\"o\n\x14RestoreWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"8\n\x15RestoreWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"R\n\x13\x43reateWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"2\n\x14\x43reateWalletResponse\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\"4\n\x11LoadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"5\n\x12LoadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"6\n\x13UnloadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"7\n\x14UnloadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\";\n\x1aGetValidatorAddressRequest\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"7\n\x1bGetValidatorAddressResponse\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"\x81\x01\n\x19SignRawTransactionRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\'\n\x0fraw_transaction\x18\x02 \x01(\tR\x0erawTransaction\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"y\n\x1aSignRawTransactionResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x34\n\x16signed_raw_transaction\x18\x02 \x01(\tR\x14signedRawTransaction\"9\n\x16GetTotalBalanceRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"_\n\x17GetTotalBalanceResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12#\n\rtotal_balance\x18\x02 \x01(\x03R\x0ctotalBalance\"\x85\x01\n\x12SignMessageRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12\x18\n\x07message\x18\x04 \x01(\tR\x07message\"3\n\x13SignMessageResponse\x12\x1c\n\tsignature\x18\x01 \x01(\tR\tsignature*\x84\x01\n\x0b\x41\x64\x64ressType\x12\x19\n\x15\x41\x44\x44RESS_TYPE_TREASURY\x10\x00\x12\x1a\n\x16\x41\x44\x44RESS_TYPE_VALIDATOR\x10\x01\x12\x1c\n\x18\x41\x44\x44RESS_TYPE_BLS_ACCOUNT\x10\x02\x12 \n\x1c\x41\x44\x44RESS_TYPE_ED25519_ACCOUNT\x10\x03\x32\xb2\x06\n\x06Wallet\x12I\n\x0c\x43reateWallet\x12\x1b.pactus.CreateWalletRequest\x1a\x1c.pactus.CreateWalletResponse\x12L\n\rRestoreWallet\x12\x1c.pactus.RestoreWalletRequest\x1a\x1d.pactus.RestoreWalletResponse\x12\x43\n\nLoadWallet\x12\x19.pactus.LoadWalletRequest\x1a\x1a.pactus.LoadWalletResponse\x12I\n\x0cUnloadWallet\x12\x1b.pactus.UnloadWalletRequest\x1a\x1c.pactus.UnloadWalletResponse\x12R\n\x0fGetTotalBalance\x12\x1e.pactus.GetTotalBalanceRequest\x1a\x1f.pactus.GetTotalBalanceResponse\x12[\n\x12SignRawTransaction\x12!.pactus.SignRawTransactionRequest\x1a\".pactus.SignRawTransactionResponse\x12^\n\x13GetValidatorAddress\x12\".pactus.GetValidatorAddressRequest\x1a#.pactus.GetValidatorAddressResponse\x12L\n\rGetNewAddress\x12\x1c.pactus.GetNewAddressRequest\x1a\x1d.pactus.GetNewAddressResponse\x12X\n\x11GetAddressHistory\x12 .pactus.GetAddressHistoryRequest\x1a!.pactus.GetAddressHistoryResponse\x12\x46\n\x0bSignMessage\x12\x1a.pactus.SignMessageRequest\x1a\x1b.pactus.SignMessageResponseBA\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wallet_pb2', globals()) @@ -22,8 +22,8 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactus' - _ADDRESSTYPE._serialized_start=1994 - _ADDRESSTYPE._serialized_end=2092 + _ADDRESSTYPE._serialized_start=2023 + _ADDRESSTYPE._serialized_end=2155 _ADDRESSINFO._serialized_start=43 _ADDRESSINFO._serialized_end=155 _HISTORYINFO._serialized_start=158 @@ -33,41 +33,41 @@ _GETADDRESSHISTORYRESPONSE._serialized_start=412 _GETADDRESSHISTORYRESPONSE._serialized_end=495 _GETNEWADDRESSREQUEST._serialized_start=498 - _GETNEWADDRESSREQUEST._serialized_end=631 - _GETNEWADDRESSRESPONSE._serialized_start=633 - _GETNEWADDRESSRESPONSE._serialized_end=745 - _RESTOREWALLETREQUEST._serialized_start=747 - _RESTOREWALLETREQUEST._serialized_end=858 - _RESTOREWALLETRESPONSE._serialized_start=860 - _RESTOREWALLETRESPONSE._serialized_end=916 - _CREATEWALLETREQUEST._serialized_start=918 - _CREATEWALLETREQUEST._serialized_end=1000 - _CREATEWALLETRESPONSE._serialized_start=1002 - _CREATEWALLETRESPONSE._serialized_end=1052 - _LOADWALLETREQUEST._serialized_start=1054 - _LOADWALLETREQUEST._serialized_end=1106 - _LOADWALLETRESPONSE._serialized_start=1108 - _LOADWALLETRESPONSE._serialized_end=1161 - _UNLOADWALLETREQUEST._serialized_start=1163 - _UNLOADWALLETREQUEST._serialized_end=1217 - _UNLOADWALLETRESPONSE._serialized_start=1219 - _UNLOADWALLETRESPONSE._serialized_end=1274 - _GETVALIDATORADDRESSREQUEST._serialized_start=1276 - _GETVALIDATORADDRESSREQUEST._serialized_end=1335 - _GETVALIDATORADDRESSRESPONSE._serialized_start=1337 - _GETVALIDATORADDRESSRESPONSE._serialized_end=1392 - _SIGNRAWTRANSACTIONREQUEST._serialized_start=1395 - _SIGNRAWTRANSACTIONREQUEST._serialized_end=1524 - _SIGNRAWTRANSACTIONRESPONSE._serialized_start=1526 - _SIGNRAWTRANSACTIONRESPONSE._serialized_end=1647 - _GETTOTALBALANCEREQUEST._serialized_start=1649 - _GETTOTALBALANCEREQUEST._serialized_end=1706 - _GETTOTALBALANCERESPONSE._serialized_start=1708 - _GETTOTALBALANCERESPONSE._serialized_end=1803 - _SIGNMESSAGEREQUEST._serialized_start=1806 - _SIGNMESSAGEREQUEST._serialized_end=1939 - _SIGNMESSAGERESPONSE._serialized_start=1941 - _SIGNMESSAGERESPONSE._serialized_end=1992 - _WALLET._serialized_start=2095 - _WALLET._serialized_end=2913 + _GETNEWADDRESSREQUEST._serialized_end=659 + _GETNEWADDRESSRESPONSE._serialized_start=661 + _GETNEWADDRESSRESPONSE._serialized_end=773 + _RESTOREWALLETREQUEST._serialized_start=775 + _RESTOREWALLETREQUEST._serialized_end=886 + _RESTOREWALLETRESPONSE._serialized_start=888 + _RESTOREWALLETRESPONSE._serialized_end=944 + _CREATEWALLETREQUEST._serialized_start=946 + _CREATEWALLETREQUEST._serialized_end=1028 + _CREATEWALLETRESPONSE._serialized_start=1030 + _CREATEWALLETRESPONSE._serialized_end=1080 + _LOADWALLETREQUEST._serialized_start=1082 + _LOADWALLETREQUEST._serialized_end=1134 + _LOADWALLETRESPONSE._serialized_start=1136 + _LOADWALLETRESPONSE._serialized_end=1189 + _UNLOADWALLETREQUEST._serialized_start=1191 + _UNLOADWALLETREQUEST._serialized_end=1245 + _UNLOADWALLETRESPONSE._serialized_start=1247 + _UNLOADWALLETRESPONSE._serialized_end=1302 + _GETVALIDATORADDRESSREQUEST._serialized_start=1304 + _GETVALIDATORADDRESSREQUEST._serialized_end=1363 + _GETVALIDATORADDRESSRESPONSE._serialized_start=1365 + _GETVALIDATORADDRESSRESPONSE._serialized_end=1420 + _SIGNRAWTRANSACTIONREQUEST._serialized_start=1423 + _SIGNRAWTRANSACTIONREQUEST._serialized_end=1552 + _SIGNRAWTRANSACTIONRESPONSE._serialized_start=1554 + _SIGNRAWTRANSACTIONRESPONSE._serialized_end=1675 + _GETTOTALBALANCEREQUEST._serialized_start=1677 + _GETTOTALBALANCEREQUEST._serialized_end=1734 + _GETTOTALBALANCERESPONSE._serialized_start=1736 + _GETTOTALBALANCERESPONSE._serialized_end=1831 + _SIGNMESSAGEREQUEST._serialized_start=1834 + _SIGNMESSAGEREQUEST._serialized_end=1967 + _SIGNMESSAGERESPONSE._serialized_start=1969 + _SIGNMESSAGERESPONSE._serialized_end=2020 + _WALLET._serialized_start=2158 + _WALLET._serialized_end=2976 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/wallet_pb2.pyi b/www/grpc/gen/python/wallet_pb2.pyi index 023fad277..7cb1ab386 100644 --- a/www/grpc/gen/python/wallet_pb2.pyi +++ b/www/grpc/gen/python/wallet_pb2.pyi @@ -12,9 +12,11 @@ class AddressType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): ADDRESS_TYPE_TREASURY: _ClassVar[AddressType] ADDRESS_TYPE_VALIDATOR: _ClassVar[AddressType] ADDRESS_TYPE_BLS_ACCOUNT: _ClassVar[AddressType] + ADDRESS_TYPE_ED25519_ACCOUNT: _ClassVar[AddressType] ADDRESS_TYPE_TREASURY: AddressType ADDRESS_TYPE_VALIDATOR: AddressType ADDRESS_TYPE_BLS_ACCOUNT: AddressType +ADDRESS_TYPE_ED25519_ACCOUNT: AddressType class AddressInfo(_message.Message): __slots__ = ("address", "public_key", "label", "path") @@ -57,14 +59,16 @@ class GetAddressHistoryResponse(_message.Message): def __init__(self, history_info: _Optional[_Iterable[_Union[HistoryInfo, _Mapping]]] = ...) -> None: ... class GetNewAddressRequest(_message.Message): - __slots__ = ("wallet_name", "address_type", "label") + __slots__ = ("wallet_name", "address_type", "label", "password") WALLET_NAME_FIELD_NUMBER: _ClassVar[int] ADDRESS_TYPE_FIELD_NUMBER: _ClassVar[int] LABEL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] wallet_name: str address_type: AddressType label: str - def __init__(self, wallet_name: _Optional[str] = ..., address_type: _Optional[_Union[AddressType, str]] = ..., label: _Optional[str] = ...) -> None: ... + password: str + def __init__(self, wallet_name: _Optional[str] = ..., address_type: _Optional[_Union[AddressType, str]] = ..., label: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... class GetNewAddressResponse(_message.Message): __slots__ = ("wallet_name", "address_info") diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index d9b89a303..f5f5e27b2 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -545,12 +545,12 @@ pub struct GetConsensusInfoRequest { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConsensusInfoResponse { - /// List of consensus instances. - #[prost(message, repeated, tag="1")] - pub instances: ::prost::alloc::vec::Vec , /// The proposal of the consensus info. - #[prost(message, optional, tag="6")] + #[prost(message, optional, tag="1")] pub proposal: ::core::option::Option , + /// List of consensus instances. + #[prost(message, repeated, tag="2")] + pub instances: ::prost::alloc::vec::Vec , } /// Request message to retrieve transactions in the transaction pool. #[allow(clippy::derive_partial_eq_without_eq)] @@ -1062,6 +1062,9 @@ pub struct GetNewAddressRequest { /// A label for the new address. #[prost(string, tag="3")] pub label: ::prost::alloc::string::String, + /// Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + #[prost(string, tag="4")] + pub password: ::prost::alloc::string::String, } /// Response message containing the newly generated address. #[allow(clippy::derive_partial_eq_without_eq)] @@ -1245,6 +1248,9 @@ pub enum AddressType { Validator = 1, /// Account address type with BLS signature scheme. BlsAccount = 2, + /// Account address type with Ed25519 signature scheme. + /// Note: Generating a new Ed25519 address requires the wallet password. + Ed25519Account = 3, } impl AddressType { /// String value of the enum field names used in the ProtoBuf definition. @@ -1256,6 +1262,7 @@ impl AddressType { AddressType::Treasury => "ADDRESS_TYPE_TREASURY", AddressType::Validator => "ADDRESS_TYPE_VALIDATOR", AddressType::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT", + AddressType::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1264,6 +1271,7 @@ impl AddressType { "ADDRESS_TYPE_TREASURY" => Some(Self::Treasury), "ADDRESS_TYPE_VALIDATOR" => Some(Self::Validator), "ADDRESS_TYPE_BLS_ACCOUNT" => Some(Self::BlsAccount), + "ADDRESS_TYPE_ED25519_ACCOUNT" => Some(Self::Ed25519Account), _ => None, } } diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index c62bf4ab1..c6ab16ca7 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -315,6 +315,7 @@ impl serde::Serialize for AddressType { Self::Treasury => "ADDRESS_TYPE_TREASURY", Self::Validator => "ADDRESS_TYPE_VALIDATOR", Self::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT", + Self::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT", }; serializer.serialize_str(variant) } @@ -329,6 +330,7 @@ impl<'de> serde::Deserialize<'de> for AddressType { "ADDRESS_TYPE_TREASURY", "ADDRESS_TYPE_VALIDATOR", "ADDRESS_TYPE_BLS_ACCOUNT", + "ADDRESS_TYPE_ED25519_ACCOUNT", ]; struct GeneratedVisitor; @@ -374,6 +376,7 @@ impl<'de> serde::Deserialize<'de> for AddressType { "ADDRESS_TYPE_TREASURY" => Ok(AddressType::Treasury), "ADDRESS_TYPE_VALIDATOR" => Ok(AddressType::Validator), "ADDRESS_TYPE_BLS_ACCOUNT" => Ok(AddressType::BlsAccount), + "ADDRESS_TYPE_ED25519_ACCOUNT" => Ok(AddressType::Ed25519Account), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -3191,19 +3194,19 @@ impl serde::Serialize for GetConsensusInfoResponse { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.instances.is_empty() { - len += 1; - } if self.proposal.is_some() { len += 1; } - let mut struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoResponse", len)?; if !self.instances.is_empty() { - struct_ser.serialize_field("instances", &self.instances)?; + len += 1; } + let mut struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoResponse", len)?; if let Some(v) = self.proposal.as_ref() { struct_ser.serialize_field("proposal", v)?; } + if !self.instances.is_empty() { + struct_ser.serialize_field("instances", &self.instances)?; + } struct_ser.end() } } @@ -3214,14 +3217,14 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "instances", "proposal", + "instances", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Instances, Proposal, + Instances, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize (deserializer: D) -> std::result::Result @@ -3243,8 +3246,8 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { E: serde::de::Error, { match value { - "instances" => Ok(GeneratedField::Instances), "proposal" => Ok(GeneratedField::Proposal), + "instances" => Ok(GeneratedField::Instances), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3264,27 +3267,27 @@ impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { where V: serde::de::MapAccess<'de>, { - let mut instances__ = None; let mut proposal__ = None; + let mut instances__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::Instances => { - if instances__.is_some() { - return Err(serde::de::Error::duplicate_field("instances")); - } - instances__ = Some(map.next_value()?); - } GeneratedField::Proposal => { if proposal__.is_some() { return Err(serde::de::Error::duplicate_field("proposal")); } proposal__ = map.next_value()?; } + GeneratedField::Instances => { + if instances__.is_some() { + return Err(serde::de::Error::duplicate_field("instances")); + } + instances__ = Some(map.next_value()?); + } } } Ok(GetConsensusInfoResponse { - instances: instances__.unwrap_or_default(), proposal: proposal__, + instances: instances__.unwrap_or_default(), }) } } @@ -3616,6 +3619,9 @@ impl serde::Serialize for GetNewAddressRequest { if !self.label.is_empty() { len += 1; } + if !self.password.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetNewAddressRequest", len)?; if !self.wallet_name.is_empty() { struct_ser.serialize_field("walletName", &self.wallet_name)?; @@ -3628,6 +3634,9 @@ impl serde::Serialize for GetNewAddressRequest { if !self.label.is_empty() { struct_ser.serialize_field("label", &self.label)?; } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } struct_ser.end() } } @@ -3643,6 +3652,7 @@ impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { "address_type", "addressType", "label", + "password", ]; #[allow(clippy::enum_variant_names)] @@ -3650,6 +3660,7 @@ impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { WalletName, AddressType, Label, + Password, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize (deserializer: D) -> std::result::Result @@ -3674,6 +3685,7 @@ impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), "addressType" | "address_type" => Ok(GeneratedField::AddressType), "label" => Ok(GeneratedField::Label), + "password" => Ok(GeneratedField::Password), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3696,6 +3708,7 @@ impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { let mut wallet_name__ = None; let mut address_type__ = None; let mut label__ = None; + let mut password__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::WalletName => { @@ -3716,12 +3729,19 @@ impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { } label__ = Some(map.next_value()?); } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map.next_value()?); + } } } Ok(GetNewAddressRequest { wallet_name: wallet_name__.unwrap_or_default(), address_type: address_type__.unwrap_or_default(), label: label__.unwrap_or_default(), + password: password__.unwrap_or_default(), }) } } diff --git a/www/grpc/proto/wallet.proto b/www/grpc/proto/wallet.proto index 9deaa99bb..8b8c7d88a 100644 --- a/www/grpc/proto/wallet.proto +++ b/www/grpc/proto/wallet.proto @@ -55,6 +55,9 @@ enum AddressType { ADDRESS_TYPE_VALIDATOR = 1; // Account address type with BLS signature scheme. ADDRESS_TYPE_BLS_ACCOUNT = 2; + // Account address type with Ed25519 signature scheme. + // Note: Generating a new Ed25519 address requires the wallet password. + ADDRESS_TYPE_ED25519_ACCOUNT = 3; } // Message containing address information. @@ -105,6 +108,8 @@ message GetNewAddressRequest { AddressType address_type = 2; // A label for the new address. string label = 3; + // Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + string password = 4; } // Response message containing the newly generated address. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index 293fcad78..ef57177be 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -971,14 +971,15 @@ }, { "name": "addressType", - "description": "The type of address to generate.\n\n - ADDRESS_TYPE_TREASURY: Treasury address type.\nShould not be used to generate new addresses.\n - ADDRESS_TYPE_VALIDATOR: Validator address type.\n - ADDRESS_TYPE_BLS_ACCOUNT: Account address type with BLS signature scheme.", + "description": "The type of address to generate.\n\n - ADDRESS_TYPE_TREASURY: Treasury address type.\nShould not be used to generate new addresses.\n - ADDRESS_TYPE_VALIDATOR: Validator address type.\n - ADDRESS_TYPE_BLS_ACCOUNT: Account address type with BLS signature scheme.\n - ADDRESS_TYPE_ED25519_ACCOUNT: Account address type with Ed25519 signature scheme.\nNote: Generating a new Ed25519 address requires the wallet password.", "in": "query", "required": false, "type": "string", "enum": [ "ADDRESS_TYPE_TREASURY", "ADDRESS_TYPE_VALIDATOR", - "ADDRESS_TYPE_BLS_ACCOUNT" + "ADDRESS_TYPE_BLS_ACCOUNT", + "ADDRESS_TYPE_ED25519_ACCOUNT" ], "default": "ADDRESS_TYPE_TREASURY" }, @@ -988,6 +989,13 @@ "in": "query", "required": false, "type": "string" + }, + { + "name": "password", + "description": "Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1325,10 +1333,11 @@ "enum": [ "ADDRESS_TYPE_TREASURY", "ADDRESS_TYPE_VALIDATOR", - "ADDRESS_TYPE_BLS_ACCOUNT" + "ADDRESS_TYPE_BLS_ACCOUNT", + "ADDRESS_TYPE_ED25519_ACCOUNT" ], "default": "ADDRESS_TYPE_TREASURY", - "description": "Enum for the address type.\n\n - ADDRESS_TYPE_TREASURY: Treasury address type.\nShould not be used to generate new addresses.\n - ADDRESS_TYPE_VALIDATOR: Validator address type.\n - ADDRESS_TYPE_BLS_ACCOUNT: Account address type with BLS signature scheme." + "description": "Enum for the address type.\n\n - ADDRESS_TYPE_TREASURY: Treasury address type.\nShould not be used to generate new addresses.\n - ADDRESS_TYPE_VALIDATOR: Validator address type.\n - ADDRESS_TYPE_BLS_ACCOUNT: Account address type with BLS signature scheme.\n - ADDRESS_TYPE_ED25519_ACCOUNT: Account address type with Ed25519 signature scheme.\nNote: Generating a new Ed25519 address requires the wallet password." }, "pactusBlockHeaderInfo": { "type": "object", @@ -1636,6 +1645,10 @@ "pactusGetConsensusInfoResponse": { "type": "object", "properties": { + "proposal": { + "$ref": "#/definitions/pactusProposal", + "description": "The proposal of the consensus info." + }, "instances": { "type": "array", "items": { @@ -1643,10 +1656,6 @@ "$ref": "#/definitions/pactusConsensusInfo" }, "description": "List of consensus instances." - }, - "proposal": { - "$ref": "#/definitions/pactusProposal", - "description": "The proposal of the consensus info." } }, "description": "Message containing the response with consensus information." diff --git a/www/grpc/wallet.go b/www/grpc/wallet.go index 1c32744a1..b9f018bd4 100644 --- a/www/grpc/wallet.go +++ b/www/grpc/wallet.go @@ -158,6 +158,7 @@ func (s *walletServer) GetNewAddress(_ context.Context, data, err := s.walletManager.GetNewAddress( req.WalletName, req.Label, + req.Password, crypto.AddressType(req.AddressType), ) if err != nil {