Skip to content

Commit

Permalink
fix: Rename UpdatePassword to RotatePassword (#188)
Browse files Browse the repository at this point in the history
In PR gnolang/gno#2700, the keybase API method
`Update` is renamed to `Rotate` because "Update" is too general. (This
method only changes the password.) We want Gno Native Kit to closely
follow the core APIs, so this PR renames `UpdatePassword` to
`RotatePassword`.

* In go.mod, use the latest gnolang/gno .
* In the API, rename UpdatePassword to RotatePassword. Run `make
regenerate` .
* Push to buf the latest API and update expo dependencies.

---------

Signed-off-by: Jeff Thompson <[email protected]>
  • Loading branch information
jefft0 authored Oct 17, 2024
1 parent 4bb275d commit 1e39391
Show file tree
Hide file tree
Showing 20 changed files with 248 additions and 241 deletions.
50 changes: 25 additions & 25 deletions api/gen/csharp/Gnonativetypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ static GnonativetypesReflection() {
"R2V0Q2hhaW5JRFJlc3BvbnNlEhkKCGNoYWluX2lkGAEgASgJUgdjaGFpbklk",
"IkoKElNldFBhc3N3b3JkUmVxdWVzdBIaCghwYXNzd29yZBgBIAEoCVIIcGFz",
"c3dvcmQSGAoHYWRkcmVzcxgCIAEoDFIHYWRkcmVzcyIVChNTZXRQYXNzd29y",
"ZFJlc3BvbnNlIlgKFVVwZGF0ZVBhc3N3b3JkUmVxdWVzdBIhCgxuZXdfcGFz",
"ZFJlc3BvbnNlIlgKFVJvdGF0ZVBhc3N3b3JkUmVxdWVzdBIhCgxuZXdfcGFz",
"c3dvcmQYASABKAlSC25ld1Bhc3N3b3JkEhwKCWFkZHJlc3NlcxgCIAMoDFIJ",
"YWRkcmVzc2VzIhgKFlVwZGF0ZVBhc3N3b3JkUmVzcG9uc2UiHwodR2VuZXJh",
"YWRkcmVzc2VzIhgKFlJvdGF0ZVBhc3N3b3JkUmVzcG9uc2UiHwodR2VuZXJh",
"dGVSZWNvdmVyeVBocmFzZVJlcXVlc3QiOAoeR2VuZXJhdGVSZWNvdmVyeVBo",
"cmFzZVJlc3BvbnNlEhYKBnBocmFzZRgBIAEoCVIGcGhyYXNlImQKB0tleUlu",
"Zm8SEgoEdHlwZRgBIAEoDVIEdHlwZRISCgRuYW1lGAIgASgJUgRuYW1lEhcK",
Expand Down Expand Up @@ -147,8 +147,8 @@ static GnonativetypesReflection() {
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.GetChainIDResponse), global::Land.Gno.Gnonative.V1.GetChainIDResponse.Parser, new[]{ "ChainId" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.SetPasswordRequest), global::Land.Gno.Gnonative.V1.SetPasswordRequest.Parser, new[]{ "Password", "Address" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.SetPasswordResponse), global::Land.Gno.Gnonative.V1.SetPasswordResponse.Parser, null, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.UpdatePasswordRequest), global::Land.Gno.Gnonative.V1.UpdatePasswordRequest.Parser, new[]{ "NewPassword", "Addresses" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.UpdatePasswordResponse), global::Land.Gno.Gnonative.V1.UpdatePasswordResponse.Parser, null, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.RotatePasswordRequest), global::Land.Gno.Gnonative.V1.RotatePasswordRequest.Parser, new[]{ "NewPassword", "Addresses" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.RotatePasswordResponse), global::Land.Gno.Gnonative.V1.RotatePasswordResponse.Parser, null, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.GenerateRecoveryPhraseRequest), global::Land.Gno.Gnonative.V1.GenerateRecoveryPhraseRequest.Parser, null, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.GenerateRecoveryPhraseResponse), global::Land.Gno.Gnonative.V1.GenerateRecoveryPhraseResponse.Parser, new[]{ "Phrase" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.KeyInfo), global::Land.Gno.Gnonative.V1.KeyInfo.Parser, new[]{ "Type", "Name", "PubKey", "Address" }, null, null, null, null),
Expand Down Expand Up @@ -2054,16 +2054,16 @@ public void MergeFrom(pb::CodedInputStream input) {
}

[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class UpdatePasswordRequest : pb::IMessage<UpdatePasswordRequest>
public sealed partial class RotatePasswordRequest : pb::IMessage<RotatePasswordRequest>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<UpdatePasswordRequest> _parser = new pb::MessageParser<UpdatePasswordRequest>(() => new UpdatePasswordRequest());
private static readonly pb::MessageParser<RotatePasswordRequest> _parser = new pb::MessageParser<RotatePasswordRequest>(() => new RotatePasswordRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<UpdatePasswordRequest> Parser { get { return _parser; } }
public static pb::MessageParser<RotatePasswordRequest> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Expand All @@ -2079,24 +2079,24 @@ public sealed partial class UpdatePasswordRequest : pb::IMessage<UpdatePasswordR

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UpdatePasswordRequest() {
public RotatePasswordRequest() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UpdatePasswordRequest(UpdatePasswordRequest other) : this() {
public RotatePasswordRequest(RotatePasswordRequest other) : this() {
newPassword_ = other.newPassword_;
addresses_ = other.addresses_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UpdatePasswordRequest Clone() {
return new UpdatePasswordRequest(this);
public RotatePasswordRequest Clone() {
return new RotatePasswordRequest(this);
}

/// <summary>Field number for the "new_password" field.</summary>
Expand All @@ -2117,7 +2117,7 @@ public string NewPassword {
= pb::FieldCodec.ForBytes(18);
private readonly pbc::RepeatedField<pb::ByteString> addresses_ = new pbc::RepeatedField<pb::ByteString>();
/// <summary>
/// The addresses of the account to update the password
/// The addresses of the account to rotate the password
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Expand All @@ -2128,12 +2128,12 @@ public string NewPassword {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as UpdatePasswordRequest);
return Equals(other as RotatePasswordRequest);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(UpdatePasswordRequest other) {
public bool Equals(RotatePasswordRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
Expand Down Expand Up @@ -2211,7 +2211,7 @@ public int CalculateSize() {

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(UpdatePasswordRequest other) {
public void MergeFrom(RotatePasswordRequest other) {
if (other == null) {
return;
}
Expand Down Expand Up @@ -2281,16 +2281,16 @@ public void MergeFrom(pb::CodedInputStream input) {
}

[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
public sealed partial class UpdatePasswordResponse : pb::IMessage<UpdatePasswordResponse>
public sealed partial class RotatePasswordResponse : pb::IMessage<RotatePasswordResponse>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<UpdatePasswordResponse> _parser = new pb::MessageParser<UpdatePasswordResponse>(() => new UpdatePasswordResponse());
private static readonly pb::MessageParser<RotatePasswordResponse> _parser = new pb::MessageParser<RotatePasswordResponse>(() => new RotatePasswordResponse());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<UpdatePasswordResponse> Parser { get { return _parser; } }
public static pb::MessageParser<RotatePasswordResponse> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Expand All @@ -2306,33 +2306,33 @@ public sealed partial class UpdatePasswordResponse : pb::IMessage<UpdatePassword

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UpdatePasswordResponse() {
public RotatePasswordResponse() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UpdatePasswordResponse(UpdatePasswordResponse other) : this() {
public RotatePasswordResponse(RotatePasswordResponse other) : this() {
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public UpdatePasswordResponse Clone() {
return new UpdatePasswordResponse(this);
public RotatePasswordResponse Clone() {
return new RotatePasswordResponse(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as UpdatePasswordResponse);
return Equals(other as RotatePasswordResponse);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(UpdatePasswordResponse other) {
public bool Equals(RotatePasswordResponse other) {
if (ReferenceEquals(other, null)) {
return false;
}
Expand Down Expand Up @@ -2392,7 +2392,7 @@ public int CalculateSize() {

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(UpdatePasswordResponse other) {
public void MergeFrom(RotatePasswordResponse other) {
if (other == null) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions api/gen/csharp/Rpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ static RpcReflection() {
"by5nbm9uYXRpdmUudjEuQWN0aXZhdGVBY2NvdW50UmVzcG9uc2USZAoLU2V0",
"UGFzc3dvcmQSKS5sYW5kLmduby5nbm9uYXRpdmUudjEuU2V0UGFzc3dvcmRS",
"ZXF1ZXN0GioubGFuZC5nbm8uZ25vbmF0aXZlLnYxLlNldFBhc3N3b3JkUmVz",
"cG9uc2USbQoOVXBkYXRlUGFzc3dvcmQSLC5sYW5kLmduby5nbm9uYXRpdmUu",
"djEuVXBkYXRlUGFzc3dvcmRSZXF1ZXN0Gi0ubGFuZC5nbm8uZ25vbmF0aXZl",
"LnYxLlVwZGF0ZVBhc3N3b3JkUmVzcG9uc2USfAoTR2V0QWN0aXZhdGVkQWNj",
"cG9uc2USbQoOUm90YXRlUGFzc3dvcmQSLC5sYW5kLmduby5nbm9uYXRpdmUu",
"djEuUm90YXRlUGFzc3dvcmRSZXF1ZXN0Gi0ubGFuZC5nbm8uZ25vbmF0aXZl",
"LnYxLlJvdGF0ZVBhc3N3b3JkUmVzcG9uc2USfAoTR2V0QWN0aXZhdGVkQWNj",
"b3VudBIxLmxhbmQuZ25vLmdub25hdGl2ZS52MS5HZXRBY3RpdmF0ZWRBY2Nv",
"dW50UmVxdWVzdBoyLmxhbmQuZ25vLmdub25hdGl2ZS52MS5HZXRBY3RpdmF0",
"ZWRBY2NvdW50UmVzcG9uc2USZwoMUXVlcnlBY2NvdW50EioubGFuZC5nbm8u",
Expand Down
Loading

0 comments on commit 1e39391

Please sign in to comment.