From 09878ccd9448f42e7666dc8e03e6668bcbe1ad52 Mon Sep 17 00:00:00 2001 From: Jeff Thompson Date: Fri, 9 Feb 2024 12:06:13 +0100 Subject: [PATCH] chore: Update CallRequest with a list of MsgCall Signed-off-by: Jeff Thompson --- api/gen/csharp/Gnonativetypes.cs | 481 ++++++++++++------ api/gen/es/gnonativetypes_pb.d.ts | 45 +- api/gen/es/gnonativetypes_pb.js | 26 +- api/gen/go/gnonativetypes.pb.go | 341 ++++++++----- api/gnonativetypes.proto | 16 +- api/gnonativetypes/gnonativetypes.go | 18 +- api/gnonativetypes/package.go | 1 + .../gnoboard/src/api/gnonativetypes_pb.d.ts | 115 ++++- .../gnoboard/src/api/gnonativetypes_pb.js | 49 +- .../gnoboard/src/hooks/use-gno.ts | 11 +- .../hello/src/api/gnonativetypes_pb.d.ts | 115 ++++- .../hello/src/api/gnonativetypes_pb.js | 49 +- .../react-native/hello/src/hooks/use-gno.ts | 11 +- service/api.go | 22 +- templates/es/use-gno-web.ts | 1 + templates/es/use-gno.ts | 11 +- 16 files changed, 946 insertions(+), 366 deletions(-) diff --git a/api/gen/csharp/Gnonativetypes.cs b/api/gen/csharp/Gnonativetypes.cs index f5789d95..0fa0e6a3 100644 --- a/api/gen/csharp/Gnonativetypes.cs +++ b/api/gen/csharp/Gnonativetypes.cs @@ -88,26 +88,27 @@ static GnonativetypesReflection() { "b25zZRIWCgZyZXN1bHQYASABKAlSBnJlc3VsdCJRCgxRRXZhbFJlcXVlc3QS", "IQoMcGFja2FnZV9wYXRoGAEgASgJUgtwYWNrYWdlUGF0aBIeCgpleHByZXNz", "aW9uGAIgASgJUgpleHByZXNzaW9uIicKDVFFdmFsUmVzcG9uc2USFgoGcmVz", - "dWx0GAEgASgJUgZyZXN1bHQitgEKC0NhbGxSZXF1ZXN0EiEKDHBhY2thZ2Vf", - "cGF0aBgBIAEoCVILcGFja2FnZVBhdGgSEAoDZm5jGAIgASgJUgNmbmMSEgoE", - "YXJncxgDIAMoCVIEYXJncxIXCgdnYXNfZmVlGAQgASgJUgZnYXNGZWUSHQoK", - "Z2FzX3dhbnRlZBgFIAEoElIJZ2FzV2FudGVkEhIKBHNlbmQYBiABKAlSBHNl", - "bmQSEgoEbWVtbxgHIAEoCVIEbWVtbyImCgxDYWxsUmVzcG9uc2USFgoGcmVz", - "dWx0GAEgASgMUgZyZXN1bHQicgoKUnVuUmVxdWVzdBIYCgdwYWNrYWdlGAEg", - "ASgJUgdwYWNrYWdlEhcKB2dhc19mZWUYAiABKAlSBmdhc0ZlZRIdCgpnYXNf", - "d2FudGVkGAMgASgSUglnYXNXYW50ZWQSEgoEbWVtbxgEIAEoCVIEbWVtbyIl", - "CgtSdW5SZXNwb25zZRIWCgZyZXN1bHQYASABKAlSBnJlc3VsdCIyChZBZGRy", - "ZXNzVG9CZWNoMzJSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAxSB2FkZHJlc3Mi", - "QAoXQWRkcmVzc1RvQmVjaDMyUmVzcG9uc2USJQoOYmVjaDMyX2FkZHJlc3MY", - "ASABKAlSDWJlY2gzMkFkZHJlc3MiQQoYQWRkcmVzc0Zyb21CZWNoMzJSZXF1", - "ZXN0EiUKDmJlY2gzMl9hZGRyZXNzGAEgASgJUg1iZWNoMzJBZGRyZXNzIjUK", - "GUFkZHJlc3NGcm9tQmVjaDMyUmVzcG9uc2USGAoHYWRkcmVzcxgBIAEoDFIH", - "YWRkcmVzcyIiCgxIZWxsb1JlcXVlc3QSEgoEbmFtZRgBIAEoCVIETmFtZSIr", - "Cg1IZWxsb1Jlc3BvbnNlEhoKCGdyZWV0aW5nGAEgASgJUghHcmVldGluZyIo", - "ChJIZWxsb1N0cmVhbVJlcXVlc3QSEgoEbmFtZRgBIAEoCVIETmFtZSIxChNI", - "ZWxsb1N0cmVhbVJlc3BvbnNlEhoKCGdyZWV0aW5nGAEgASgJUghHcmVldGlu", - "Z0IpWidnaXRodWIuY29tL2dub2xhbmcvZ25vbmF0aXZlL2FwaS9nZW4vZ29i", - "BnByb3RvMw==")); + "dWx0GAEgASgJUgZyZXN1bHQiZgoHTXNnQ2FsbBIhCgxwYWNrYWdlX3BhdGgY", + "ASABKAlSC3BhY2thZ2VQYXRoEhAKA2ZuYxgCIAEoCVIDZm5jEhIKBGFyZ3MY", + "AyADKAlSBGFyZ3MSEgoEc2VuZBgEIAEoCVIEc2VuZCKNAQoLQ2FsbFJlcXVl", + "c3QSFwoHZ2FzX2ZlZRgBIAEoCVIGZ2FzRmVlEh0KCmdhc193YW50ZWQYAiAB", + "KBJSCWdhc1dhbnRlZBISCgRtZW1vGAMgASgJUgRtZW1vEjIKBG1zZ3MYBCAD", + "KAsyHi5sYW5kLmduby5nbm9uYXRpdmUudjEuTXNnQ2FsbFIETXNncyImCgxD", + "YWxsUmVzcG9uc2USFgoGcmVzdWx0GAEgASgMUgZyZXN1bHQicgoKUnVuUmVx", + "dWVzdBIYCgdwYWNrYWdlGAEgASgJUgdwYWNrYWdlEhcKB2dhc19mZWUYAiAB", + "KAlSBmdhc0ZlZRIdCgpnYXNfd2FudGVkGAMgASgSUglnYXNXYW50ZWQSEgoE", + "bWVtbxgEIAEoCVIEbWVtbyIlCgtSdW5SZXNwb25zZRIWCgZyZXN1bHQYASAB", + "KAlSBnJlc3VsdCIyChZBZGRyZXNzVG9CZWNoMzJSZXF1ZXN0EhgKB2FkZHJl", + "c3MYASABKAxSB2FkZHJlc3MiQAoXQWRkcmVzc1RvQmVjaDMyUmVzcG9uc2US", + "JQoOYmVjaDMyX2FkZHJlc3MYASABKAlSDWJlY2gzMkFkZHJlc3MiQQoYQWRk", + "cmVzc0Zyb21CZWNoMzJSZXF1ZXN0EiUKDmJlY2gzMl9hZGRyZXNzGAEgASgJ", + "Ug1iZWNoMzJBZGRyZXNzIjUKGUFkZHJlc3NGcm9tQmVjaDMyUmVzcG9uc2US", + "GAoHYWRkcmVzcxgBIAEoDFIHYWRkcmVzcyIiCgxIZWxsb1JlcXVlc3QSEgoE", + "bmFtZRgBIAEoCVIETmFtZSIrCg1IZWxsb1Jlc3BvbnNlEhoKCGdyZWV0aW5n", + "GAEgASgJUghHcmVldGluZyIoChJIZWxsb1N0cmVhbVJlcXVlc3QSEgoEbmFt", + "ZRgBIAEoCVIETmFtZSIxChNIZWxsb1N0cmVhbVJlc3BvbnNlEhoKCGdyZWV0", + "aW5nGAEgASgJUghHcmVldGluZ0IpWidnaXRodWIuY29tL2dub2xhbmcvZ25v", + "bmF0aXZlL2FwaS9nZW4vZ29iBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { @@ -156,7 +157,8 @@ static GnonativetypesReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.RenderResponse), global::Land.Gno.Gnonative.V1.RenderResponse.Parser, new[]{ "Result" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.QEvalRequest), global::Land.Gno.Gnonative.V1.QEvalRequest.Parser, new[]{ "PackagePath", "Expression" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.QEvalResponse), global::Land.Gno.Gnonative.V1.QEvalResponse.Parser, new[]{ "Result" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.CallRequest), global::Land.Gno.Gnonative.V1.CallRequest.Parser, new[]{ "PackagePath", "Fnc", "Args", "GasFee", "GasWanted", "Send", "Memo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.MsgCall), global::Land.Gno.Gnonative.V1.MsgCall.Parser, new[]{ "PackagePath", "Fnc", "Args", "Send" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.CallRequest), global::Land.Gno.Gnonative.V1.CallRequest.Parser, new[]{ "GasFee", "GasWanted", "Memo", "Msgs" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.CallResponse), global::Land.Gno.Gnonative.V1.CallResponse.Parser, new[]{ "Result" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.RunRequest), global::Land.Gno.Gnonative.V1.RunRequest.Parser, new[]{ "Package", "GasFee", "GasWanted", "Memo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Land.Gno.Gnonative.V1.RunResponse), global::Land.Gno.Gnonative.V1.RunResponse.Parser, new[]{ "Result" }, null, null, null, null), @@ -9213,16 +9215,16 @@ public void MergeFrom(pb::CodedInputStream input) { } [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] - public sealed partial class CallRequest : pb::IMessage + public sealed partial class MsgCall : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CallRequest()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MsgCall()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -9238,7 +9240,7 @@ public sealed partial class CallRequest : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CallRequest() { + public MsgCall() { OnConstruction(); } @@ -9246,21 +9248,18 @@ public CallRequest() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CallRequest(CallRequest other) : this() { + public MsgCall(MsgCall other) : this() { packagePath_ = other.packagePath_; fnc_ = other.fnc_; args_ = other.args_.Clone(); - gasFee_ = other.gasFee_; - gasWanted_ = other.gasWanted_; send_ = other.send_; - memo_ = other.memo_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CallRequest Clone() { - return new CallRequest(this); + public MsgCall Clone() { + return new MsgCall(this); } /// Field number for the "package_path" field. @@ -9300,6 +9299,7 @@ public string Fnc { private readonly pbc::RepeatedField args_ = new pbc::RepeatedField(); /// /// list of arguments specific to the function + /// Example: ["1", "1", "2", "my reply"] /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -9307,32 +9307,8 @@ public string Fnc { get { return args_; } } - /// Field number for the "gas_fee" field. - public const int GasFeeFieldNumber = 4; - private string gasFee_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string GasFee { - get { return gasFee_; } - set { - gasFee_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "gas_wanted" field. - public const int GasWantedFieldNumber = 5; - private long gasWanted_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long GasWanted { - get { return gasWanted_; } - set { - gasWanted_ = value; - } - } - /// Field number for the "send" field. - public const int SendFieldNumber = 6; + public const int SendFieldNumber = 4; private string send_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -9343,27 +9319,15 @@ public string Send { } } - /// Field number for the "memo" field. - public const int MemoFieldNumber = 7; - private string memo_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Memo { - get { return memo_; } - set { - memo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as CallRequest); + return Equals(other as MsgCall); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(CallRequest other) { + public bool Equals(MsgCall other) { if (ReferenceEquals(other, null)) { return false; } @@ -9373,10 +9337,7 @@ public bool Equals(CallRequest other) { if (PackagePath != other.PackagePath) return false; if (Fnc != other.Fnc) return false; if(!args_.Equals(other.args_)) return false; - if (GasFee != other.GasFee) return false; - if (GasWanted != other.GasWanted) return false; if (Send != other.Send) return false; - if (Memo != other.Memo) return false; return Equals(_unknownFields, other._unknownFields); } @@ -9387,10 +9348,7 @@ public override int GetHashCode() { if (PackagePath.Length != 0) hash ^= PackagePath.GetHashCode(); if (Fnc.Length != 0) hash ^= Fnc.GetHashCode(); hash ^= args_.GetHashCode(); - if (GasFee.Length != 0) hash ^= GasFee.GetHashCode(); - if (GasWanted != 0L) hash ^= GasWanted.GetHashCode(); if (Send.Length != 0) hash ^= Send.GetHashCode(); - if (Memo.Length != 0) hash ^= Memo.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9418,22 +9376,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteString(Fnc); } args_.WriteTo(output, _repeated_args_codec); - if (GasFee.Length != 0) { - output.WriteRawTag(34); - output.WriteString(GasFee); - } - if (GasWanted != 0L) { - output.WriteRawTag(40); - output.WriteSInt64(GasWanted); - } if (Send.Length != 0) { - output.WriteRawTag(50); + output.WriteRawTag(34); output.WriteString(Send); } - if (Memo.Length != 0) { - output.WriteRawTag(58); - output.WriteString(Memo); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -9453,22 +9399,10 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteString(Fnc); } args_.WriteTo(ref output, _repeated_args_codec); - if (GasFee.Length != 0) { - output.WriteRawTag(34); - output.WriteString(GasFee); - } - if (GasWanted != 0L) { - output.WriteRawTag(40); - output.WriteSInt64(GasWanted); - } if (Send.Length != 0) { - output.WriteRawTag(50); + output.WriteRawTag(34); output.WriteString(Send); } - if (Memo.Length != 0) { - output.WriteRawTag(58); - output.WriteString(Memo); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -9486,18 +9420,9 @@ public int CalculateSize() { size += 1 + pb::CodedOutputStream.ComputeStringSize(Fnc); } size += args_.CalculateSize(_repeated_args_codec); - if (GasFee.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(GasFee); - } - if (GasWanted != 0L) { - size += 1 + pb::CodedOutputStream.ComputeSInt64Size(GasWanted); - } if (Send.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Send); } - if (Memo.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Memo); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9506,7 +9431,7 @@ public int CalculateSize() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(CallRequest other) { + public void MergeFrom(MsgCall other) { if (other == null) { return; } @@ -9517,18 +9442,9 @@ public void MergeFrom(CallRequest other) { Fnc = other.Fnc; } args_.Add(other.args_); - if (other.GasFee.Length != 0) { - GasFee = other.GasFee; - } - if (other.GasWanted != 0L) { - GasWanted = other.GasWanted; - } if (other.Send.Length != 0) { Send = other.Send; } - if (other.Memo.Length != 0) { - Memo = other.Memo; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -9557,21 +9473,9 @@ public void MergeFrom(pb::CodedInputStream input) { break; } case 34: { - GasFee = input.ReadString(); - break; - } - case 40: { - GasWanted = input.ReadSInt64(); - break; - } - case 50: { Send = input.ReadString(); break; } - case 58: { - Memo = input.ReadString(); - break; - } } } #endif @@ -9600,21 +9504,302 @@ public void MergeFrom(pb::CodedInputStream input) { break; } case 34: { + Send = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CallRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CallRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[46]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CallRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CallRequest(CallRequest other) : this() { + gasFee_ = other.gasFee_; + gasWanted_ = other.gasWanted_; + memo_ = other.memo_; + msgs_ = other.msgs_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CallRequest Clone() { + return new CallRequest(this); + } + + /// Field number for the "gas_fee" field. + public const int GasFeeFieldNumber = 1; + private string gasFee_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GasFee { + get { return gasFee_; } + set { + gasFee_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "gas_wanted" field. + public const int GasWantedFieldNumber = 2; + private long gasWanted_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long GasWanted { + get { return gasWanted_; } + set { + gasWanted_ = value; + } + } + + /// Field number for the "memo" field. + public const int MemoFieldNumber = 3; + private string memo_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Memo { + get { return memo_; } + set { + memo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "msgs" field. + public const int MsgsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_msgs_codec + = pb::FieldCodec.ForMessage(34, global::Land.Gno.Gnonative.V1.MsgCall.Parser); + private readonly pbc::RepeatedField msgs_ = new pbc::RepeatedField(); + /// + /// list of calls to make in one transaction + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Msgs { + get { return msgs_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CallRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CallRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (GasFee != other.GasFee) return false; + if (GasWanted != other.GasWanted) return false; + if (Memo != other.Memo) return false; + if(!msgs_.Equals(other.msgs_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (GasFee.Length != 0) hash ^= GasFee.GetHashCode(); + if (GasWanted != 0L) hash ^= GasWanted.GetHashCode(); + if (Memo.Length != 0) hash ^= Memo.GetHashCode(); + hash ^= msgs_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (GasFee.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GasFee); + } + if (GasWanted != 0L) { + output.WriteRawTag(16); + output.WriteSInt64(GasWanted); + } + if (Memo.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Memo); + } + msgs_.WriteTo(output, _repeated_msgs_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (GasFee.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GasFee); + } + if (GasWanted != 0L) { + output.WriteRawTag(16); + output.WriteSInt64(GasWanted); + } + if (Memo.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Memo); + } + msgs_.WriteTo(ref output, _repeated_msgs_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (GasFee.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GasFee); + } + if (GasWanted != 0L) { + size += 1 + pb::CodedOutputStream.ComputeSInt64Size(GasWanted); + } + if (Memo.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Memo); + } + size += msgs_.CalculateSize(_repeated_msgs_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CallRequest other) { + if (other == null) { + return; + } + if (other.GasFee.Length != 0) { + GasFee = other.GasFee; + } + if (other.GasWanted != 0L) { + GasWanted = other.GasWanted; + } + if (other.Memo.Length != 0) { + Memo = other.Memo; + } + msgs_.Add(other.msgs_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { GasFee = input.ReadString(); break; } - case 40: { + case 16: { GasWanted = input.ReadSInt64(); break; } - case 50: { - Send = input.ReadString(); + case 26: { + Memo = input.ReadString(); + break; + } + case 34: { + msgs_.AddEntriesFrom(input, _repeated_msgs_codec); break; } - case 58: { + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + GasFee = input.ReadString(); + break; + } + case 16: { + GasWanted = input.ReadSInt64(); + break; + } + case 26: { Memo = input.ReadString(); break; } + case 34: { + msgs_.AddEntriesFrom(ref input, _repeated_msgs_codec); + break; + } } } } @@ -9637,7 +9822,7 @@ public sealed partial class CallResponse : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[46]; } + get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[47]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -9827,7 +10012,7 @@ public sealed partial class RunRequest : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[47]; } + get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[48]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -10135,7 +10320,7 @@ public sealed partial class RunResponse : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[48]; } + get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[49]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -10328,7 +10513,7 @@ public sealed partial class AddressToBech32Request : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[53]; } + get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[54]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -11278,7 +11463,7 @@ public sealed partial class HelloResponse : pb::IMessage [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[54]; } + get { return global::Land.Gno.Gnonative.V1.GnonativetypesReflection.Descriptor.MessageTypes[55]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -11468,7 +11653,7 @@ public sealed partial class HelloStreamRequest : pb::IMessage { } /** - * @generated from message land.gno.gnonative.v1.CallRequest + * @generated from message land.gno.gnonative.v1.MsgCall */ -export declare class CallRequest extends Message { +export declare class MsgCall extends Message { /** * Example: "gno.land/r/demo/boards" * @@ -1188,30 +1188,57 @@ export declare class CallRequest extends Message { /** * list of arguments specific to the function + * Example: ["1", "1", "2", "my reply"] * * @generated from field: repeated string args = 3; */ args: string[]; /** - * @generated from field: string gas_fee = 4; + * @generated from field: string send = 4; + */ + send: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.MsgCall"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgCall; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgCall; + + static fromJsonString(jsonString: string, options?: Partial): MsgCall; + + static equals(a: MsgCall | PlainMessage | undefined, b: MsgCall | PlainMessage | undefined): boolean; +} + +/** + * @generated from message land.gno.gnonative.v1.CallRequest + */ +export declare class CallRequest extends Message { + /** + * @generated from field: string gas_fee = 1; */ gasFee: string; /** - * @generated from field: sint64 gas_wanted = 5; + * @generated from field: sint64 gas_wanted = 2; */ gasWanted: bigint; /** - * @generated from field: string send = 6; + * @generated from field: string memo = 3; */ - send: string; + memo: string; /** - * @generated from field: string memo = 7; + * list of calls to make in one transaction + * + * @generated from field: repeated land.gno.gnonative.v1.MsgCall msgs = 4 [json_name = "Msgs"]; */ - memo: string; + msgs: MsgCall[]; constructor(data?: PartialMessage); diff --git a/api/gen/es/gnonativetypes_pb.js b/api/gen/es/gnonativetypes_pb.js index 61e0fe91..79f05306 100644 --- a/api/gen/es/gnonativetypes_pb.js +++ b/api/gen/es/gnonativetypes_pb.js @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.7.0 +// @generated by protoc-gen-es v1.7.2 // @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -463,18 +463,28 @@ export const QEvalResponse = proto3.makeMessageType( ); /** - * @generated from message land.gno.gnonative.v1.CallRequest + * @generated from message land.gno.gnonative.v1.MsgCall */ -export const CallRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CallRequest", +export const MsgCall = proto3.makeMessageType( + "land.gno.gnonative.v1.MsgCall", () => [ { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "fnc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 6, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message land.gno.gnonative.v1.CallRequest + */ +export const CallRequest = proto3.makeMessageType( + "land.gno.gnonative.v1.CallRequest", + () => [ + { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, + { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgCall, repeated: true }, ], ); diff --git a/api/gen/go/gnonativetypes.pb.go b/api/gen/go/gnonativetypes.pb.go index 1aaafafe..7c828b2e 100644 --- a/api/gen/go/gnonativetypes.pb.go +++ b/api/gen/go/gnonativetypes.pb.go @@ -2228,7 +2228,7 @@ func (x *QEvalResponse) GetResult() string { return "" } -type CallRequest struct { +type MsgCall struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2238,15 +2238,13 @@ type CallRequest struct { // Example: "CreateReply" Fnc string `protobuf:"bytes,2,opt,name=fnc,proto3" json:"fnc,omitempty"` // list of arguments specific to the function - Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` - GasFee string `protobuf:"bytes,4,opt,name=gas_fee,json=gasFee,proto3" json:"gas_fee,omitempty"` - GasWanted int64 `protobuf:"zigzag64,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - Send string `protobuf:"bytes,6,opt,name=send,proto3" json:"send,omitempty"` - Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` + // Example: ["1", "1", "2", "my reply"] + Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` + Send string `protobuf:"bytes,4,opt,name=send,proto3" json:"send,omitempty"` } -func (x *CallRequest) Reset() { - *x = CallRequest{} +func (x *MsgCall) Reset() { + *x = MsgCall{} if protoimpl.UnsafeEnabled { mi := &file_gnonativetypes_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2254,13 +2252,13 @@ func (x *CallRequest) Reset() { } } -func (x *CallRequest) String() string { +func (x *MsgCall) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CallRequest) ProtoMessage() {} +func (*MsgCall) ProtoMessage() {} -func (x *CallRequest) ProtoReflect() protoreflect.Message { +func (x *MsgCall) ProtoReflect() protoreflect.Message { mi := &file_gnonativetypes_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2272,32 +2270,83 @@ func (x *CallRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CallRequest.ProtoReflect.Descriptor instead. -func (*CallRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgCall.ProtoReflect.Descriptor instead. +func (*MsgCall) Descriptor() ([]byte, []int) { return file_gnonativetypes_proto_rawDescGZIP(), []int{45} } -func (x *CallRequest) GetPackagePath() string { +func (x *MsgCall) GetPackagePath() string { if x != nil { return x.PackagePath } return "" } -func (x *CallRequest) GetFnc() string { +func (x *MsgCall) GetFnc() string { if x != nil { return x.Fnc } return "" } -func (x *CallRequest) GetArgs() []string { +func (x *MsgCall) GetArgs() []string { if x != nil { return x.Args } return nil } +func (x *MsgCall) GetSend() string { + if x != nil { + return x.Send + } + return "" +} + +type CallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GasFee string `protobuf:"bytes,1,opt,name=gas_fee,json=gasFee,proto3" json:"gas_fee,omitempty"` + GasWanted int64 `protobuf:"zigzag64,2,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` + // list of calls to make in one transaction + Msgs []*MsgCall `protobuf:"bytes,4,rep,name=msgs,json=Msgs,proto3" json:"msgs,omitempty"` +} + +func (x *CallRequest) Reset() { + *x = CallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gnonativetypes_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CallRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallRequest) ProtoMessage() {} + +func (x *CallRequest) ProtoReflect() protoreflect.Message { + mi := &file_gnonativetypes_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallRequest.ProtoReflect.Descriptor instead. +func (*CallRequest) Descriptor() ([]byte, []int) { + return file_gnonativetypes_proto_rawDescGZIP(), []int{46} +} + func (x *CallRequest) GetGasFee() string { if x != nil { return x.GasFee @@ -2312,18 +2361,18 @@ func (x *CallRequest) GetGasWanted() int64 { return 0 } -func (x *CallRequest) GetSend() string { +func (x *CallRequest) GetMemo() string { if x != nil { - return x.Send + return x.Memo } return "" } -func (x *CallRequest) GetMemo() string { +func (x *CallRequest) GetMsgs() []*MsgCall { if x != nil { - return x.Memo + return x.Msgs } - return "" + return nil } type CallResponse struct { @@ -2337,7 +2386,7 @@ type CallResponse struct { func (x *CallResponse) Reset() { *x = CallResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[46] + mi := &file_gnonativetypes_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2350,7 +2399,7 @@ func (x *CallResponse) String() string { func (*CallResponse) ProtoMessage() {} func (x *CallResponse) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[46] + mi := &file_gnonativetypes_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2363,7 +2412,7 @@ func (x *CallResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CallResponse.ProtoReflect.Descriptor instead. func (*CallResponse) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{46} + return file_gnonativetypes_proto_rawDescGZIP(), []int{47} } func (x *CallResponse) GetResult() []byte { @@ -2390,7 +2439,7 @@ type RunRequest struct { func (x *RunRequest) Reset() { *x = RunRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[47] + mi := &file_gnonativetypes_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2403,7 +2452,7 @@ func (x *RunRequest) String() string { func (*RunRequest) ProtoMessage() {} func (x *RunRequest) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[47] + mi := &file_gnonativetypes_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2416,7 +2465,7 @@ func (x *RunRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RunRequest.ProtoReflect.Descriptor instead. func (*RunRequest) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{47} + return file_gnonativetypes_proto_rawDescGZIP(), []int{48} } func (x *RunRequest) GetPackage() string { @@ -2459,7 +2508,7 @@ type RunResponse struct { func (x *RunResponse) Reset() { *x = RunResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[48] + mi := &file_gnonativetypes_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2472,7 +2521,7 @@ func (x *RunResponse) String() string { func (*RunResponse) ProtoMessage() {} func (x *RunResponse) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[48] + mi := &file_gnonativetypes_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2485,7 +2534,7 @@ func (x *RunResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RunResponse.ProtoReflect.Descriptor instead. func (*RunResponse) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{48} + return file_gnonativetypes_proto_rawDescGZIP(), []int{49} } func (x *RunResponse) GetResult() string { @@ -2506,7 +2555,7 @@ type AddressToBech32Request struct { func (x *AddressToBech32Request) Reset() { *x = AddressToBech32Request{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[49] + mi := &file_gnonativetypes_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2519,7 +2568,7 @@ func (x *AddressToBech32Request) String() string { func (*AddressToBech32Request) ProtoMessage() {} func (x *AddressToBech32Request) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[49] + mi := &file_gnonativetypes_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2532,7 +2581,7 @@ func (x *AddressToBech32Request) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressToBech32Request.ProtoReflect.Descriptor instead. func (*AddressToBech32Request) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{49} + return file_gnonativetypes_proto_rawDescGZIP(), []int{50} } func (x *AddressToBech32Request) GetAddress() []byte { @@ -2553,7 +2602,7 @@ type AddressToBech32Response struct { func (x *AddressToBech32Response) Reset() { *x = AddressToBech32Response{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[50] + mi := &file_gnonativetypes_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2566,7 +2615,7 @@ func (x *AddressToBech32Response) String() string { func (*AddressToBech32Response) ProtoMessage() {} func (x *AddressToBech32Response) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[50] + mi := &file_gnonativetypes_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2579,7 +2628,7 @@ func (x *AddressToBech32Response) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressToBech32Response.ProtoReflect.Descriptor instead. func (*AddressToBech32Response) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{50} + return file_gnonativetypes_proto_rawDescGZIP(), []int{51} } func (x *AddressToBech32Response) GetBech32Address() string { @@ -2600,7 +2649,7 @@ type AddressFromBech32Request struct { func (x *AddressFromBech32Request) Reset() { *x = AddressFromBech32Request{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[51] + mi := &file_gnonativetypes_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2613,7 +2662,7 @@ func (x *AddressFromBech32Request) String() string { func (*AddressFromBech32Request) ProtoMessage() {} func (x *AddressFromBech32Request) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[51] + mi := &file_gnonativetypes_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2626,7 +2675,7 @@ func (x *AddressFromBech32Request) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressFromBech32Request.ProtoReflect.Descriptor instead. func (*AddressFromBech32Request) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{51} + return file_gnonativetypes_proto_rawDescGZIP(), []int{52} } func (x *AddressFromBech32Request) GetBech32Address() string { @@ -2647,7 +2696,7 @@ type AddressFromBech32Response struct { func (x *AddressFromBech32Response) Reset() { *x = AddressFromBech32Response{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[52] + mi := &file_gnonativetypes_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2660,7 +2709,7 @@ func (x *AddressFromBech32Response) String() string { func (*AddressFromBech32Response) ProtoMessage() {} func (x *AddressFromBech32Response) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[52] + mi := &file_gnonativetypes_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2673,7 +2722,7 @@ func (x *AddressFromBech32Response) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressFromBech32Response.ProtoReflect.Descriptor instead. func (*AddressFromBech32Response) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{52} + return file_gnonativetypes_proto_rawDescGZIP(), []int{53} } func (x *AddressFromBech32Response) GetAddress() []byte { @@ -2694,7 +2743,7 @@ type HelloRequest struct { func (x *HelloRequest) Reset() { *x = HelloRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[53] + mi := &file_gnonativetypes_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2707,7 +2756,7 @@ func (x *HelloRequest) String() string { func (*HelloRequest) ProtoMessage() {} func (x *HelloRequest) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[53] + mi := &file_gnonativetypes_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2720,7 +2769,7 @@ func (x *HelloRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead. func (*HelloRequest) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{53} + return file_gnonativetypes_proto_rawDescGZIP(), []int{54} } func (x *HelloRequest) GetName() string { @@ -2741,7 +2790,7 @@ type HelloResponse struct { func (x *HelloResponse) Reset() { *x = HelloResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[54] + mi := &file_gnonativetypes_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2754,7 +2803,7 @@ func (x *HelloResponse) String() string { func (*HelloResponse) ProtoMessage() {} func (x *HelloResponse) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[54] + mi := &file_gnonativetypes_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2767,7 +2816,7 @@ func (x *HelloResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead. func (*HelloResponse) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{54} + return file_gnonativetypes_proto_rawDescGZIP(), []int{55} } func (x *HelloResponse) GetGreeting() string { @@ -2788,7 +2837,7 @@ type HelloStreamRequest struct { func (x *HelloStreamRequest) Reset() { *x = HelloStreamRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[55] + mi := &file_gnonativetypes_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2801,7 +2850,7 @@ func (x *HelloStreamRequest) String() string { func (*HelloStreamRequest) ProtoMessage() {} func (x *HelloStreamRequest) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[55] + mi := &file_gnonativetypes_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2814,7 +2863,7 @@ func (x *HelloStreamRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HelloStreamRequest.ProtoReflect.Descriptor instead. func (*HelloStreamRequest) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{55} + return file_gnonativetypes_proto_rawDescGZIP(), []int{56} } func (x *HelloStreamRequest) GetName() string { @@ -2835,7 +2884,7 @@ type HelloStreamResponse struct { func (x *HelloStreamResponse) Reset() { *x = HelloStreamResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gnonativetypes_proto_msgTypes[56] + mi := &file_gnonativetypes_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2848,7 +2897,7 @@ func (x *HelloStreamResponse) String() string { func (*HelloStreamResponse) ProtoMessage() {} func (x *HelloStreamResponse) ProtoReflect() protoreflect.Message { - mi := &file_gnonativetypes_proto_msgTypes[56] + mi := &file_gnonativetypes_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2861,7 +2910,7 @@ func (x *HelloStreamResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HelloStreamResponse.ProtoReflect.Descriptor instead. func (*HelloStreamResponse) Descriptor() ([]byte, []int) { - return file_gnonativetypes_proto_rawDescGZIP(), []int{56} + return file_gnonativetypes_proto_rawDescGZIP(), []int{57} } func (x *HelloStreamResponse) GetGreeting() string { @@ -3055,59 +3104,63 @@ var file_gnonativetypes_proto_rawDesc = []byte{ 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x0a, 0x0d, 0x51, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x0b, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x50, 0x61, 0x74, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x6e, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x66, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x61, - 0x73, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x61, 0x73, - 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, - 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x61, - 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0x72, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x61, - 0x73, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x61, 0x73, - 0x46, 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, - 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x25, 0x0a, 0x0b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x32, 0x0a, - 0x16, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x40, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x42, 0x65, - 0x63, 0x68, 0x33, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, - 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x41, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x72, - 0x6f, 0x6d, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x25, 0x0a, 0x0e, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x35, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, - 0x0c, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x47, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x28, - 0x0a, 0x12, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x48, 0x65, 0x6c, 0x6c, - 0x6f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x47, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x29, 0x5a, 0x27, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6e, 0x6f, 0x6c, 0x61, 0x6e, - 0x67, 0x2f, 0x67, 0x6e, 0x6f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x22, 0x66, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x10, 0x0a, 0x03, 0x66, 0x6e, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x6e, + 0x63, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x65, 0x6e, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x0b, 0x43, 0x61, + 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x61, 0x73, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x61, 0x73, 0x46, + 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x32, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x61, 0x6e, 0x64, 0x2e, 0x67, 0x6e, 0x6f, 0x2e, 0x67, + 0x6e, 0x6f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x61, 0x6c, 0x6c, 0x52, 0x04, 0x4d, 0x73, 0x67, 0x73, 0x22, 0x26, 0x0a, 0x0c, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x72, 0x0a, 0x0a, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x61, 0x73, + 0x5f, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x61, 0x73, 0x46, + 0x65, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x25, 0x0a, 0x0b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x32, 0x0a, 0x16, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x22, 0x40, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x42, 0x65, 0x63, + 0x68, 0x33, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, + 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x41, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x72, 0x6f, + 0x6d, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x35, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x65, 0x63, 0x68, 0x33, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x0c, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0x2b, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x47, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x28, 0x0a, + 0x12, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x13, 0x48, 0x65, 0x6c, 0x6c, 0x6f, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x47, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6e, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2f, 0x67, 0x6e, 0x6f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3122,7 +3175,7 @@ func file_gnonativetypes_proto_rawDescGZIP() []byte { return file_gnonativetypes_proto_rawDescData } -var file_gnonativetypes_proto_msgTypes = make([]protoimpl.MessageInfo, 57) +var file_gnonativetypes_proto_msgTypes = make([]protoimpl.MessageInfo, 58) var file_gnonativetypes_proto_goTypes = []interface{}{ (*SetRemoteRequest)(nil), // 0: land.gno.gnonative.v1.SetRemoteRequest (*SetRemoteResponse)(nil), // 1: land.gno.gnonative.v1.SetRemoteResponse @@ -3169,18 +3222,19 @@ var file_gnonativetypes_proto_goTypes = []interface{}{ (*RenderResponse)(nil), // 42: land.gno.gnonative.v1.RenderResponse (*QEvalRequest)(nil), // 43: land.gno.gnonative.v1.QEvalRequest (*QEvalResponse)(nil), // 44: land.gno.gnonative.v1.QEvalResponse - (*CallRequest)(nil), // 45: land.gno.gnonative.v1.CallRequest - (*CallResponse)(nil), // 46: land.gno.gnonative.v1.CallResponse - (*RunRequest)(nil), // 47: land.gno.gnonative.v1.RunRequest - (*RunResponse)(nil), // 48: land.gno.gnonative.v1.RunResponse - (*AddressToBech32Request)(nil), // 49: land.gno.gnonative.v1.AddressToBech32Request - (*AddressToBech32Response)(nil), // 50: land.gno.gnonative.v1.AddressToBech32Response - (*AddressFromBech32Request)(nil), // 51: land.gno.gnonative.v1.AddressFromBech32Request - (*AddressFromBech32Response)(nil), // 52: land.gno.gnonative.v1.AddressFromBech32Response - (*HelloRequest)(nil), // 53: land.gno.gnonative.v1.HelloRequest - (*HelloResponse)(nil), // 54: land.gno.gnonative.v1.HelloResponse - (*HelloStreamRequest)(nil), // 55: land.gno.gnonative.v1.HelloStreamRequest - (*HelloStreamResponse)(nil), // 56: land.gno.gnonative.v1.HelloStreamResponse + (*MsgCall)(nil), // 45: land.gno.gnonative.v1.MsgCall + (*CallRequest)(nil), // 46: land.gno.gnonative.v1.CallRequest + (*CallResponse)(nil), // 47: land.gno.gnonative.v1.CallResponse + (*RunRequest)(nil), // 48: land.gno.gnonative.v1.RunRequest + (*RunResponse)(nil), // 49: land.gno.gnonative.v1.RunResponse + (*AddressToBech32Request)(nil), // 50: land.gno.gnonative.v1.AddressToBech32Request + (*AddressToBech32Response)(nil), // 51: land.gno.gnonative.v1.AddressToBech32Response + (*AddressFromBech32Request)(nil), // 52: land.gno.gnonative.v1.AddressFromBech32Request + (*AddressFromBech32Response)(nil), // 53: land.gno.gnonative.v1.AddressFromBech32Response + (*HelloRequest)(nil), // 54: land.gno.gnonative.v1.HelloRequest + (*HelloResponse)(nil), // 55: land.gno.gnonative.v1.HelloResponse + (*HelloStreamRequest)(nil), // 56: land.gno.gnonative.v1.HelloStreamRequest + (*HelloStreamResponse)(nil), // 57: land.gno.gnonative.v1.HelloStreamResponse } var file_gnonativetypes_proto_depIdxs = []int32{ 13, // 0: land.gno.gnonative.v1.BaseAccount.coins:type_name -> land.gno.gnonative.v1.Coin @@ -3192,11 +3246,12 @@ var file_gnonativetypes_proto_depIdxs = []int32{ 12, // 6: land.gno.gnonative.v1.SelectAccountResponse.key:type_name -> land.gno.gnonative.v1.KeyInfo 12, // 7: land.gno.gnonative.v1.GetActiveAccountResponse.key:type_name -> land.gno.gnonative.v1.KeyInfo 14, // 8: land.gno.gnonative.v1.QueryAccountResponse.account_info:type_name -> land.gno.gnonative.v1.BaseAccount - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 45, // 9: land.gno.gnonative.v1.CallRequest.msgs:type_name -> land.gno.gnonative.v1.MsgCall + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_gnonativetypes_proto_init() } @@ -3746,7 +3801,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallRequest); i { + switch v := v.(*MsgCall); i { case 0: return &v.state case 1: @@ -3758,7 +3813,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallResponse); i { + switch v := v.(*CallRequest); i { case 0: return &v.state case 1: @@ -3770,7 +3825,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunRequest); i { + switch v := v.(*CallResponse); i { case 0: return &v.state case 1: @@ -3782,7 +3837,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RunResponse); i { + switch v := v.(*RunRequest); i { case 0: return &v.state case 1: @@ -3794,7 +3849,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressToBech32Request); i { + switch v := v.(*RunResponse); i { case 0: return &v.state case 1: @@ -3806,7 +3861,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressToBech32Response); i { + switch v := v.(*AddressToBech32Request); i { case 0: return &v.state case 1: @@ -3818,7 +3873,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressFromBech32Request); i { + switch v := v.(*AddressToBech32Response); i { case 0: return &v.state case 1: @@ -3830,7 +3885,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressFromBech32Response); i { + switch v := v.(*AddressFromBech32Request); i { case 0: return &v.state case 1: @@ -3842,7 +3897,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelloRequest); i { + switch v := v.(*AddressFromBech32Response); i { case 0: return &v.state case 1: @@ -3854,7 +3909,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelloResponse); i { + switch v := v.(*HelloRequest); i { case 0: return &v.state case 1: @@ -3866,7 +3921,7 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HelloStreamRequest); i { + switch v := v.(*HelloResponse); i { case 0: return &v.state case 1: @@ -3878,6 +3933,18 @@ func file_gnonativetypes_proto_init() { } } file_gnonativetypes_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HelloStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gnonativetypes_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HelloStreamResponse); i { case 0: return &v.state @@ -3896,7 +3963,7 @@ func file_gnonativetypes_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gnonativetypes_proto_rawDesc, NumEnums: 0, - NumMessages: 57, + NumMessages: 58, NumExtensions: 0, NumServices: 0, }, diff --git a/api/gnonativetypes.proto b/api/gnonativetypes.proto index cc220bfe..35502c1a 100644 --- a/api/gnonativetypes.proto +++ b/api/gnonativetypes.proto @@ -208,17 +208,23 @@ message QEvalResponse { string result = 1; } -message CallRequest { +message MsgCall { // Example: "gno.land/r/demo/boards" string package_path = 1; // Example: "CreateReply" string fnc = 2; // list of arguments specific to the function + // Example: ["1", "1", "2", "my reply"] repeated string args = 3; - string gas_fee = 4; - sint64 gas_wanted = 5; - string send = 6; - string memo = 7; + string send = 4; +} + +message CallRequest { + string gas_fee = 1; + sint64 gas_wanted = 2; + string memo = 3; + // list of calls to make in one transaction + repeated MsgCall msgs = 4 [json_name = "Msgs"]; } message CallResponse { diff --git a/api/gnonativetypes/gnonativetypes.go b/api/gnonativetypes/gnonativetypes.go index b2d31fee..52f87b44 100644 --- a/api/gnonativetypes/gnonativetypes.go +++ b/api/gnonativetypes/gnonativetypes.go @@ -204,17 +204,23 @@ type QEvalResponse struct { Result string `json:"result" yaml:"result"` } -type CallRequest struct { +type MsgCall struct { // Example: "gno.land/r/demo/boards" PackagePath string `json:"package_path" yaml:"package_path"` // Example: "CreateReply" Fnc string `json:"fnc" yaml:"fnc"` // list of arguments specific to the function - Args []string `json:"args" yaml:"args"` - GasFee string `json:"gas_fee" yaml:"gas_fee"` - GasWanted int64 `json:"gas_wanted" yaml:"gas_wanted"` - Send string `json:"send" yaml:"send"` - Memo string `json:"memo" yaml:"memo"` + // Example: ["1", "1", "2", "my reply"] + Args []string `json:"args" yaml:"args"` + Send string `json:"send" yaml:"send"` +} + +type CallRequest struct { + GasFee string `json:"gas_fee" yaml:"gas_fee"` + GasWanted int64 `json:"gas_wanted" yaml:"gas_wanted"` + Memo string `json:"memo" yaml:"memo"` + // list of calls to make in one transaction + Msgs []MsgCall } type CallResponse struct { diff --git a/api/gnonativetypes/package.go b/api/gnonativetypes/package.go index 950a69c6..c0ed7235 100644 --- a/api/gnonativetypes/package.go +++ b/api/gnonativetypes/package.go @@ -57,6 +57,7 @@ var Package = amino.RegisterPackage(amino.NewPackage( RenderResponse{}, QEvalRequest{}, QEvalResponse{}, + MsgCall{}, CallRequest{}, CallResponse{}, RunRequest{}, diff --git a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts b/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts index 942e5d6e..7e814bf6 100644 --- a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts +++ b/examples/react-native/gnoboard/src/api/gnonativetypes_pb.d.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.5.1 +// @generated by protoc-gen-es v1.7.2 // @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -1169,9 +1169,9 @@ export declare class QEvalResponse extends Message { } /** - * @generated from message land.gno.gnonative.v1.CallRequest + * @generated from message land.gno.gnonative.v1.MsgCall */ -export declare class CallRequest extends Message { +export declare class MsgCall extends Message { /** * Example: "gno.land/r/demo/boards" * @@ -1188,30 +1188,57 @@ export declare class CallRequest extends Message { /** * list of arguments specific to the function + * Example: ["1", "1", "2", "my reply"] * * @generated from field: repeated string args = 3; */ args: string[]; /** - * @generated from field: string gas_fee = 4; + * @generated from field: string send = 4; + */ + send: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.MsgCall"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgCall; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgCall; + + static fromJsonString(jsonString: string, options?: Partial): MsgCall; + + static equals(a: MsgCall | PlainMessage | undefined, b: MsgCall | PlainMessage | undefined): boolean; +} + +/** + * @generated from message land.gno.gnonative.v1.CallRequest + */ +export declare class CallRequest extends Message { + /** + * @generated from field: string gas_fee = 1; */ gasFee: string; /** - * @generated from field: sint64 gas_wanted = 5; + * @generated from field: sint64 gas_wanted = 2; */ gasWanted: bigint; /** - * @generated from field: string send = 6; + * @generated from field: string memo = 3; */ - send: string; + memo: string; /** - * @generated from field: string memo = 7; + * list of calls to make in one transaction + * + * @generated from field: repeated land.gno.gnonative.v1.MsgCall msgs = 4 [json_name = "Msgs"]; */ - memo: string; + msgs: MsgCall[]; constructor(data?: PartialMessage); @@ -1252,6 +1279,76 @@ export declare class CallResponse extends Message { static equals(a: CallResponse | PlainMessage | undefined, b: CallResponse | PlainMessage | undefined): boolean; } +/** + * @generated from message land.gno.gnonative.v1.RunRequest + */ +export declare class RunRequest extends Message { + /** + * The code for the script package. Must have main(). + * Example: "package main\nfunc main() {\n println(\"Hello\")\n}" + * + * @generated from field: string package = 1; + */ + package: string; + + /** + * @generated from field: string gas_fee = 2; + */ + gasFee: string; + + /** + * @generated from field: sint64 gas_wanted = 3; + */ + gasWanted: bigint; + + /** + * Memo is optional + * + * @generated from field: string memo = 4; + */ + memo: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.RunRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RunRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RunRequest; + + static fromJsonString(jsonString: string, options?: Partial): RunRequest; + + static equals(a: RunRequest | PlainMessage | undefined, b: RunRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message land.gno.gnonative.v1.RunResponse + */ +export declare class RunResponse extends Message { + /** + * The "console" output from the run + * + * @generated from field: string result = 1; + */ + result: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.RunResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RunResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RunResponse; + + static fromJsonString(jsonString: string, options?: Partial): RunResponse; + + static equals(a: RunResponse | PlainMessage | undefined, b: RunResponse | PlainMessage | undefined): boolean; +} + /** * @generated from message land.gno.gnonative.v1.AddressToBech32Request */ diff --git a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js b/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js index d611b719..79f05306 100644 --- a/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js +++ b/examples/react-native/gnoboard/src/api/gnonativetypes_pb.js @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.5.1 +// @generated by protoc-gen-es v1.7.2 // @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -463,18 +463,28 @@ export const QEvalResponse = proto3.makeMessageType( ); /** - * @generated from message land.gno.gnonative.v1.CallRequest + * @generated from message land.gno.gnonative.v1.MsgCall */ -export const CallRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CallRequest", +export const MsgCall = proto3.makeMessageType( + "land.gno.gnonative.v1.MsgCall", () => [ { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "fnc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 6, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message land.gno.gnonative.v1.CallRequest + */ +export const CallRequest = proto3.makeMessageType( + "land.gno.gnonative.v1.CallRequest", + () => [ + { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, + { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgCall, repeated: true }, ], ); @@ -488,6 +498,29 @@ export const CallResponse = proto3.makeMessageType( ], ); +/** + * @generated from message land.gno.gnonative.v1.RunRequest + */ +export const RunRequest = proto3.makeMessageType( + "land.gno.gnonative.v1.RunRequest", + () => [ + { no: 1, name: "package", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, + { no: 4, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message land.gno.gnonative.v1.RunResponse + */ +export const RunResponse = proto3.makeMessageType( + "land.gno.gnonative.v1.RunResponse", + () => [ + { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + /** * @generated from message land.gno.gnonative.v1.AddressToBech32Request */ diff --git a/examples/react-native/gnoboard/src/hooks/use-gno.ts b/examples/react-native/gnoboard/src/hooks/use-gno.ts index 24c6539b..45d6730d 100644 --- a/examples/react-native/gnoboard/src/hooks/use-gno.ts +++ b/examples/react-native/gnoboard/src/hooks/use-gno.ts @@ -23,6 +23,7 @@ import { QueryRequest } from '@gno/api/gnonativetypes_pb'; import { QueryResponse } from '@gno/api/gnonativetypes_pb'; import { RenderRequest } from '@gno/api/gnonativetypes_pb'; import { QEvalRequest } from '@gno/api/gnonativetypes_pb'; +import { MsgCall } from '@gno/api/gnonativetypes_pb'; import { CallRequest } from '@gno/api/gnonativetypes_pb'; import { CallResponse } from '@gno/api/gnonativetypes_pb'; import { AddressToBech32Request } from '@gno/api/gnonativetypes_pb'; @@ -281,13 +282,15 @@ export const useGno = (): GnoResponse => { const client = await getClient(); const reponse = client.call( new CallRequest({ - packagePath, - fnc, - args, gasFee, gasWanted: BigInt(gasWanted), - send, memo, + msgs: [new MsgCall({ + packagePath, + fnc, + args, + send, + })], }), ); return reponse; diff --git a/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts b/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts index 942e5d6e..7e814bf6 100644 --- a/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts +++ b/examples/react-native/hello/src/api/gnonativetypes_pb.d.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.5.1 +// @generated by protoc-gen-es v1.7.2 // @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -1169,9 +1169,9 @@ export declare class QEvalResponse extends Message { } /** - * @generated from message land.gno.gnonative.v1.CallRequest + * @generated from message land.gno.gnonative.v1.MsgCall */ -export declare class CallRequest extends Message { +export declare class MsgCall extends Message { /** * Example: "gno.land/r/demo/boards" * @@ -1188,30 +1188,57 @@ export declare class CallRequest extends Message { /** * list of arguments specific to the function + * Example: ["1", "1", "2", "my reply"] * * @generated from field: repeated string args = 3; */ args: string[]; /** - * @generated from field: string gas_fee = 4; + * @generated from field: string send = 4; + */ + send: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.MsgCall"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): MsgCall; + + static fromJson(jsonValue: JsonValue, options?: Partial): MsgCall; + + static fromJsonString(jsonString: string, options?: Partial): MsgCall; + + static equals(a: MsgCall | PlainMessage | undefined, b: MsgCall | PlainMessage | undefined): boolean; +} + +/** + * @generated from message land.gno.gnonative.v1.CallRequest + */ +export declare class CallRequest extends Message { + /** + * @generated from field: string gas_fee = 1; */ gasFee: string; /** - * @generated from field: sint64 gas_wanted = 5; + * @generated from field: sint64 gas_wanted = 2; */ gasWanted: bigint; /** - * @generated from field: string send = 6; + * @generated from field: string memo = 3; */ - send: string; + memo: string; /** - * @generated from field: string memo = 7; + * list of calls to make in one transaction + * + * @generated from field: repeated land.gno.gnonative.v1.MsgCall msgs = 4 [json_name = "Msgs"]; */ - memo: string; + msgs: MsgCall[]; constructor(data?: PartialMessage); @@ -1252,6 +1279,76 @@ export declare class CallResponse extends Message { static equals(a: CallResponse | PlainMessage | undefined, b: CallResponse | PlainMessage | undefined): boolean; } +/** + * @generated from message land.gno.gnonative.v1.RunRequest + */ +export declare class RunRequest extends Message { + /** + * The code for the script package. Must have main(). + * Example: "package main\nfunc main() {\n println(\"Hello\")\n}" + * + * @generated from field: string package = 1; + */ + package: string; + + /** + * @generated from field: string gas_fee = 2; + */ + gasFee: string; + + /** + * @generated from field: sint64 gas_wanted = 3; + */ + gasWanted: bigint; + + /** + * Memo is optional + * + * @generated from field: string memo = 4; + */ + memo: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.RunRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RunRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): RunRequest; + + static fromJsonString(jsonString: string, options?: Partial): RunRequest; + + static equals(a: RunRequest | PlainMessage | undefined, b: RunRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message land.gno.gnonative.v1.RunResponse + */ +export declare class RunResponse extends Message { + /** + * The "console" output from the run + * + * @generated from field: string result = 1; + */ + result: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "land.gno.gnonative.v1.RunResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): RunResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): RunResponse; + + static fromJsonString(jsonString: string, options?: Partial): RunResponse; + + static equals(a: RunResponse | PlainMessage | undefined, b: RunResponse | PlainMessage | undefined): boolean; +} + /** * @generated from message land.gno.gnonative.v1.AddressToBech32Request */ diff --git a/examples/react-native/hello/src/api/gnonativetypes_pb.js b/examples/react-native/hello/src/api/gnonativetypes_pb.js index d611b719..79f05306 100644 --- a/examples/react-native/hello/src/api/gnonativetypes_pb.js +++ b/examples/react-native/hello/src/api/gnonativetypes_pb.js @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.5.1 +// @generated by protoc-gen-es v1.7.2 // @generated from file gnonativetypes.proto (package land.gno.gnonative.v1, syntax proto3) /* eslint-disable */ // @ts-nocheck @@ -463,18 +463,28 @@ export const QEvalResponse = proto3.makeMessageType( ); /** - * @generated from message land.gno.gnonative.v1.CallRequest + * @generated from message land.gno.gnonative.v1.MsgCall */ -export const CallRequest = proto3.makeMessageType( - "land.gno.gnonative.v1.CallRequest", +export const MsgCall = proto3.makeMessageType( + "land.gno.gnonative.v1.MsgCall", () => [ { no: 1, name: "package_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "fnc", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "args", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, - { no: 6, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "send", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message land.gno.gnonative.v1.CallRequest + */ +export const CallRequest = proto3.makeMessageType( + "land.gno.gnonative.v1.CallRequest", + () => [ + { no: 1, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, + { no: 3, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "msgs", jsonName: "Msgs", kind: "message", T: MsgCall, repeated: true }, ], ); @@ -488,6 +498,29 @@ export const CallResponse = proto3.makeMessageType( ], ); +/** + * @generated from message land.gno.gnonative.v1.RunRequest + */ +export const RunRequest = proto3.makeMessageType( + "land.gno.gnonative.v1.RunRequest", + () => [ + { no: 1, name: "package", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "gas_wanted", kind: "scalar", T: 18 /* ScalarType.SINT64 */ }, + { no: 4, name: "memo", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message land.gno.gnonative.v1.RunResponse + */ +export const RunResponse = proto3.makeMessageType( + "land.gno.gnonative.v1.RunResponse", + () => [ + { no: 1, name: "result", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + /** * @generated from message land.gno.gnonative.v1.AddressToBech32Request */ diff --git a/examples/react-native/hello/src/hooks/use-gno.ts b/examples/react-native/hello/src/hooks/use-gno.ts index 24c6539b..45d6730d 100644 --- a/examples/react-native/hello/src/hooks/use-gno.ts +++ b/examples/react-native/hello/src/hooks/use-gno.ts @@ -23,6 +23,7 @@ import { QueryRequest } from '@gno/api/gnonativetypes_pb'; import { QueryResponse } from '@gno/api/gnonativetypes_pb'; import { RenderRequest } from '@gno/api/gnonativetypes_pb'; import { QEvalRequest } from '@gno/api/gnonativetypes_pb'; +import { MsgCall } from '@gno/api/gnonativetypes_pb'; import { CallRequest } from '@gno/api/gnonativetypes_pb'; import { CallResponse } from '@gno/api/gnonativetypes_pb'; import { AddressToBech32Request } from '@gno/api/gnonativetypes_pb'; @@ -281,13 +282,15 @@ export const useGno = (): GnoResponse => { const client = await getClient(); const reponse = client.call( new CallRequest({ - packagePath, - fnc, - args, gasFee, gasWanted: BigInt(gasWanted), - send, memo, + msgs: [new MsgCall({ + packagePath, + fnc, + args, + send, + })], }), ); return reponse; diff --git a/service/api.go b/service/api.go index 2a087188..ec6eae7b 100644 --- a/service/api.go +++ b/service/api.go @@ -337,7 +337,9 @@ func (s *gnoNativeService) QEval(ctx context.Context, req *connect.Request[api_g } func (s *gnoNativeService) Call(ctx context.Context, req *connect.Request[api_gen.CallRequest], stream *connect.ServerStream[api_gen.CallResponse]) error { - s.logger.Debug("Call", zap.String("package", req.Msg.PackagePath), zap.String("function", req.Msg.Fnc), zap.Any("args", req.Msg.Args)) + for _, msg := range req.Msg.Msgs { + s.logger.Debug("Call", zap.String("package", msg.PackagePath), zap.String("function", msg.Fnc), zap.Any("args", msg.Args)) + } s.lock.RLock() if s.activeAccount == nil { @@ -352,12 +354,18 @@ func (s *gnoNativeService) Call(ctx context.Context, req *connect.Request[api_ge Memo: req.Msg.Memo, } - bres, err := s.client.Call(cfg, gnoclient.MsgCall{ - PkgPath: req.Msg.PackagePath, - FuncName: req.Msg.Fnc, - Args: req.Msg.Args, - Send: req.Msg.Send, - }) + msgs := make([]gnoclient.MsgCall, 0) + + for _, msg := range req.Msg.Msgs { + msgs = append(msgs, gnoclient.MsgCall{ + PkgPath: msg.PackagePath, + FuncName: msg.Fnc, + Args: msg.Args, + Send: msg.Send, + }) + } + + bres, err := s.client.Call(cfg, msgs...) if err != nil { return getGrpcError(err) } diff --git a/templates/es/use-gno-web.ts b/templates/es/use-gno-web.ts index 1b92ce0e..e385ea5d 100644 --- a/templates/es/use-gno-web.ts +++ b/templates/es/use-gno-web.ts @@ -30,6 +30,7 @@ import { QueryRequest } from "./gnonativetypes_pb"; import { QueryResponse } from "./gnonativetypes_pb"; import { RenderRequest } from "./gnonativetypes_pb"; import { QEvalRequest } from "./gnonativetypes_pb"; +import { MsgCall } from '@gno/api/gnonativetypes_pb'; import { CallRequest } from "./gnonativetypes_pb"; import { CallResponse } from "./gnonativetypes_pb"; import { AddressToBech32Request } from "./gnonativetypes_pb"; diff --git a/templates/es/use-gno.ts b/templates/es/use-gno.ts index 375fa405..44e2d3d8 100644 --- a/templates/es/use-gno.ts +++ b/templates/es/use-gno.ts @@ -30,6 +30,7 @@ import { QueryRequest } from "./gnonativetypes_pb"; import { QueryResponse } from "./gnonativetypes_pb"; import { RenderRequest } from "./gnonativetypes_pb"; import { QEvalRequest } from "./gnonativetypes_pb"; +import { MsgCall } from '@gno/api/gnonativetypes_pb'; import { CallRequest } from "./gnonativetypes_pb"; import { CallResponse } from "./gnonativetypes_pb"; import { AddressToBech32Request } from "./gnonativetypes_pb"; @@ -337,13 +338,15 @@ export const useGno = (): GnoResponse => { const client = await getClient(); const reponse = client.call( new CallRequest({ - packagePath, - fnc, - args, gasFee, gasWanted: BigInt(gasWanted), - send, memo, + msgs: [new MsgCall({ + packagePath, + fnc, + args, + send, + })], }), ); return reponse;