From 7ead42b74ec5a5265d64a7c712a5458233c4dbb4 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:33:00 +0900 Subject: [PATCH 01/13] feat: add admin params to opchild & fix ophost to charge registration fee (#43) * add admin params and fix ophost to charge registration fee * proto comment --- api/opinit/opchild/v1/tx.pulsar.go | 395 +++++++++++++++----------- api/opinit/opchild/v1/types.pulsar.go | 165 ++++++++--- api/opinit/ophost/v1/tx.pulsar.go | 206 +++++++------- api/opinit/ophost/v1/types.pulsar.go | 119 ++++---- proto/opinit/opchild/v1/types.proto | 6 + x/opchild/client/cli/genesis.go | 3 + x/opchild/client/cli/tx.go | 10 +- x/opchild/keeper/common_test.go | 3 +- x/opchild/keeper/msg_server.go | 13 +- x/opchild/keeper/msg_server_test.go | 19 +- x/opchild/keeper/params.go | 4 + x/opchild/types/params.go | 9 +- x/opchild/types/types.pb.go | 140 ++++++--- x/ophost/keeper/common_test.go | 44 ++- x/ophost/keeper/keeper.go | 24 +- x/ophost/keeper/msg_server.go | 14 + x/ophost/keeper/msg_server_test.go | 9 + x/ophost/types/expected_keeper.go | 4 + x/ophost/types/types.pb.go | 1 + 19 files changed, 736 insertions(+), 452 deletions(-) diff --git a/api/opinit/opchild/v1/tx.pulsar.go b/api/opinit/opchild/v1/tx.pulsar.go index 382df355..3d811003 100644 --- a/api/opinit/opchild/v1/tx.pulsar.go +++ b/api/opinit/opchild/v1/tx.pulsar.go @@ -933,14 +933,15 @@ func (x *fastReflection_MsgExecuteMessagesResponse) ProtoMethods() *protoiface.M } var ( - md_MsgFinalizeTokenDeposit protoreflect.MessageDescriptor - fd_MsgFinalizeTokenDeposit_sender protoreflect.FieldDescriptor - fd_MsgFinalizeTokenDeposit_from protoreflect.FieldDescriptor - fd_MsgFinalizeTokenDeposit_to protoreflect.FieldDescriptor - fd_MsgFinalizeTokenDeposit_amount protoreflect.FieldDescriptor - fd_MsgFinalizeTokenDeposit_sequence protoreflect.FieldDescriptor - fd_MsgFinalizeTokenDeposit_height protoreflect.FieldDescriptor - fd_MsgFinalizeTokenDeposit_data protoreflect.FieldDescriptor + md_MsgFinalizeTokenDeposit protoreflect.MessageDescriptor + fd_MsgFinalizeTokenDeposit_sender protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_from protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_to protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_amount protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_sequence protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_height protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_base_denom protoreflect.FieldDescriptor + fd_MsgFinalizeTokenDeposit_data protoreflect.FieldDescriptor ) func init() { @@ -952,6 +953,7 @@ func init() { fd_MsgFinalizeTokenDeposit_amount = md_MsgFinalizeTokenDeposit.Fields().ByName("amount") fd_MsgFinalizeTokenDeposit_sequence = md_MsgFinalizeTokenDeposit.Fields().ByName("sequence") fd_MsgFinalizeTokenDeposit_height = md_MsgFinalizeTokenDeposit.Fields().ByName("height") + fd_MsgFinalizeTokenDeposit_base_denom = md_MsgFinalizeTokenDeposit.Fields().ByName("base_denom") fd_MsgFinalizeTokenDeposit_data = md_MsgFinalizeTokenDeposit.Fields().ByName("data") } @@ -1056,6 +1058,12 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) Range(f func(protoreflect.Field return } } + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_MsgFinalizeTokenDeposit_base_denom, value) { + return + } + } if len(x.Data) != 0 { value := protoreflect.ValueOfBytes(x.Data) if !f(fd_MsgFinalizeTokenDeposit_data, value) { @@ -1089,6 +1097,8 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) Has(fd protoreflect.FieldDescri return x.Sequence != uint64(0) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.height": return x.Height != uint64(0) + case "opinit.opchild.v1.MsgFinalizeTokenDeposit.base_denom": + return x.BaseDenom != "" case "opinit.opchild.v1.MsgFinalizeTokenDeposit.data": return len(x.Data) != 0 default: @@ -1119,6 +1129,8 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) Clear(fd protoreflect.FieldDesc x.Sequence = uint64(0) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.height": x.Height = uint64(0) + case "opinit.opchild.v1.MsgFinalizeTokenDeposit.base_denom": + x.BaseDenom = "" case "opinit.opchild.v1.MsgFinalizeTokenDeposit.data": x.Data = nil default: @@ -1155,6 +1167,9 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) Get(descriptor protoreflect.Fie case "opinit.opchild.v1.MsgFinalizeTokenDeposit.height": value := x.Height return protoreflect.ValueOfUint64(value) + case "opinit.opchild.v1.MsgFinalizeTokenDeposit.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.data": value := x.Data return protoreflect.ValueOfBytes(value) @@ -1190,6 +1205,8 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) Set(fd protoreflect.FieldDescri x.Sequence = value.Uint() case "opinit.opchild.v1.MsgFinalizeTokenDeposit.height": x.Height = value.Uint() + case "opinit.opchild.v1.MsgFinalizeTokenDeposit.base_denom": + x.BaseDenom = value.Interface().(string) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.data": x.Data = value.Bytes() default: @@ -1227,6 +1244,8 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) Mutable(fd protoreflect.FieldDe panic(fmt.Errorf("field sequence of message opinit.opchild.v1.MsgFinalizeTokenDeposit is not mutable")) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.height": panic(fmt.Errorf("field height of message opinit.opchild.v1.MsgFinalizeTokenDeposit is not mutable")) + case "opinit.opchild.v1.MsgFinalizeTokenDeposit.base_denom": + panic(fmt.Errorf("field base_denom of message opinit.opchild.v1.MsgFinalizeTokenDeposit is not mutable")) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.data": panic(fmt.Errorf("field data of message opinit.opchild.v1.MsgFinalizeTokenDeposit is not mutable")) default: @@ -1255,6 +1274,8 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) NewField(fd protoreflect.FieldD return protoreflect.ValueOfUint64(uint64(0)) case "opinit.opchild.v1.MsgFinalizeTokenDeposit.height": return protoreflect.ValueOfUint64(uint64(0)) + case "opinit.opchild.v1.MsgFinalizeTokenDeposit.base_denom": + return protoreflect.ValueOfString("") case "opinit.opchild.v1.MsgFinalizeTokenDeposit.data": return protoreflect.ValueOfBytes(nil) default: @@ -1348,6 +1369,10 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) ProtoMethods() *protoiface.Meth if x.Height != 0 { n += 1 + runtime.Sov(uint64(x.Height)) } + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } l = len(x.Data) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -1386,6 +1411,13 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) ProtoMethods() *protoiface.Meth copy(dAtA[i:], x.Data) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) i-- + dAtA[i] = 0x42 + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- dAtA[i] = 0x3a } if x.Height != 0 { @@ -1653,6 +1685,38 @@ func (x *fastReflection_MsgFinalizeTokenDeposit) ProtoMethods() *protoiface.Meth } } case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } @@ -6805,8 +6869,10 @@ type MsgFinalizeTokenDeposit struct { Sequence uint64 `protobuf:"varint,5,opt,name=sequence,proto3" json:"sequence,omitempty"` // height is the height of l1 which is including the deposit message Height uint64 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"` + // base_denom is the l1 denomination of the sent coin. + BaseDenom string `protobuf:"bytes,7,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` // / data is a extra bytes for hooks. - Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` + Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` } func (x *MsgFinalizeTokenDeposit) Reset() { @@ -6871,6 +6937,13 @@ func (x *MsgFinalizeTokenDeposit) GetHeight() uint64 { return 0 } +func (x *MsgFinalizeTokenDeposit) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + func (x *MsgFinalizeTokenDeposit) GetData() []byte { if x != nil { return x.Data @@ -7346,7 +7419,7 @@ var file_opinit_opchild_v1_tx_proto_rawDesc = []byte{ 0xb0, 0x2a, 0x1a, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x87, 0x03, 0x0a, 0x17, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x03, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, @@ -7366,167 +7439,169 @@ var file_opinit_opchild_v1_tx_proto_rawDesc = []byte{ 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0c, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, - 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x02, 0x74, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x02, 0x74, 0x6f, 0x12, 0x4d, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1a, - 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x22, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x49, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0c, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, + 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x40, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, - 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, - 0x65, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, - 0x18, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x3a, 0x32, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xd6, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, - 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x6f, - 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x02, + 0x74, 0x6f, 0x12, 0x4d, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1a, 0xc8, + 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, + 0xb0, 0x2a, 0x22, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x40, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, - 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, - 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, + 0x72, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xaa, 0xdf, 0x1f, 0x28, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, - 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, - 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf7, 0x05, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x67, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, - 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x2d, 0x2e, - 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x14, - 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x1a, 0x32, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, - 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, 0x35, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x18, + 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x3a, 0x32, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xd6, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x6f, 0x70, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, + 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xbc, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, + 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, + 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, + 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, + 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf7, 0x05, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x67, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x2d, 0x2e, 0x6f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x14, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x12, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, + 0x32, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, - 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, 0x35, 0x2e, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, - 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, - 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, + 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, - 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x22, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, + 0x0c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x22, 0x2e, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, + 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, - 0x6f, 0x6c, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, - 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x15, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, + 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, + 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, + 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/opinit/opchild/v1/types.pulsar.go b/api/opinit/opchild/v1/types.pulsar.go index 1c4d1b84..d77cf483 100644 --- a/api/opinit/opchild/v1/types.pulsar.go +++ b/api/opinit/opchild/v1/types.pulsar.go @@ -75,6 +75,7 @@ var ( fd_Params_historical_entries protoreflect.FieldDescriptor fd_Params_min_gas_prices protoreflect.FieldDescriptor fd_Params_bridge_executor protoreflect.FieldDescriptor + fd_Params_admin protoreflect.FieldDescriptor ) func init() { @@ -84,6 +85,7 @@ func init() { fd_Params_historical_entries = md_Params.Fields().ByName("historical_entries") fd_Params_min_gas_prices = md_Params.Fields().ByName("min_gas_prices") fd_Params_bridge_executor = md_Params.Fields().ByName("bridge_executor") + fd_Params_admin = md_Params.Fields().ByName("admin") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -175,6 +177,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.Admin != "" { + value := protoreflect.ValueOfString(x.Admin) + if !f(fd_Params_admin, value) { + return + } + } } // Has reports whether a field is populated. @@ -198,6 +206,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return len(x.MinGasPrices) != 0 case "opinit.opchild.v1.Params.bridge_executor": return x.BridgeExecutor != "" + case "opinit.opchild.v1.Params.admin": + return x.Admin != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -222,6 +232,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.MinGasPrices = nil case "opinit.opchild.v1.Params.bridge_executor": x.BridgeExecutor = "" + case "opinit.opchild.v1.Params.admin": + x.Admin = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -253,6 +265,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "opinit.opchild.v1.Params.bridge_executor": value := x.BridgeExecutor return protoreflect.ValueOfString(value) + case "opinit.opchild.v1.Params.admin": + value := x.Admin + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -283,6 +298,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.MinGasPrices = *clv.list case "opinit.opchild.v1.Params.bridge_executor": x.BridgeExecutor = value.Interface().(string) + case "opinit.opchild.v1.Params.admin": + x.Admin = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -315,6 +332,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field historical_entries of message opinit.opchild.v1.Params is not mutable")) case "opinit.opchild.v1.Params.bridge_executor": panic(fmt.Errorf("field bridge_executor of message opinit.opchild.v1.Params is not mutable")) + case "opinit.opchild.v1.Params.admin": + panic(fmt.Errorf("field admin of message opinit.opchild.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -337,6 +356,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfList(&_Params_3_list{list: &list}) case "opinit.opchild.v1.Params.bridge_executor": return protoreflect.ValueOfString("") + case "opinit.opchild.v1.Params.admin": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -422,6 +443,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Admin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -451,6 +476,13 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Admin) > 0 { + i -= len(x.Admin) + copy(dAtA[i:], x.Admin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) + i-- + dAtA[i] = 0x2a + } if len(x.BridgeExecutor) > 0 { i -= len(x.BridgeExecutor) copy(dAtA[i:], x.BridgeExecutor) @@ -637,6 +669,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.BridgeExecutor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1804,6 +1868,8 @@ type Params struct { // the account address of bridge executor who can execute permissioned bridge // messages. BridgeExecutor string `protobuf:"bytes,4,opt,name=bridge_executor,json=bridgeExecutor,proto3" json:"bridge_executor,omitempty"` + // the account address of admin who can execute permissioned cosmos messages. + Admin string `protobuf:"bytes,5,opt,name=admin,proto3" json:"admin,omitempty"` } func (x *Params) Reset() { @@ -1854,6 +1920,13 @@ func (x *Params) GetBridgeExecutor() string { return "" } +func (x *Params) GetAdmin() string { + if x != nil { + return x.Admin + } + return "" +} + // Validator defines a validator, together with the total amount of the // Validator's bond shares and their exchange rate to coins. Slashing results in // a decrease in the exchange rate, allowing correct calculation of future @@ -1978,7 +2051,7 @@ var file_opinit_opchild_v1_types_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, - 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, + 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x61, 0x78, @@ -2003,49 +2076,53 @@ var file_opinit_opchild_v1_types_proto_rawDesc = []byte{ 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x1b, 0x98, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x6f, 0x70, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x09, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, - 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xf2, 0xde, 0x1f, 0x0e, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x22, 0x52, 0x07, 0x6d, - 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0f, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x74, - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x33, - 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xca, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, - 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x52, - 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x5f, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x07, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xd0, 0x01, 0xc8, 0xe1, 0x1e, 0x00, - 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, - 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, - 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, - 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, - 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, + 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xf2, 0xde, + 0x1f, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x3a, 0x1b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x0e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0xbb, 0x02, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, + 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, + 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, + 0x72, 0x22, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x74, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x42, 0x33, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, + 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xf2, + 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, + 0x77, 0x65, 0x72, 0x22, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x3a, + 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x5f, 0x0a, + 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x12, 0x45, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, + 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xd0, + 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/opinit/ophost/v1/tx.pulsar.go b/api/opinit/ophost/v1/tx.pulsar.go index bbc3ec7b..d84a4d86 100644 --- a/api/opinit/ophost/v1/tx.pulsar.go +++ b/api/opinit/ophost/v1/tx.pulsar.go @@ -11209,7 +11209,7 @@ var file_opinit_ophost_v1_tx_proto_rawDesc = []byte{ 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0x9f, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x72, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, @@ -11218,115 +11218,115 @@ var file_opinit_ophost_v1_tx_proto_rawDesc = []byte{ 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x5c, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x19, 0xf2, 0xde, - 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0x67, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, - 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xcd, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8c, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x59, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x1a, 0x29, 0x2e, - 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x22, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2c, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, + 0xb0, 0x2a, 0x19, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x67, 0x0a, 0x1a, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, + 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xcd, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, + 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x8c, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x59, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x2a, 0x2e, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, + 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5f, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x74, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, + 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x12, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, + 0x34, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x6f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x10, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x6f, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 0x72, 0x1a, 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, - 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x70, 0x69, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, - 0x17, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, 0x34, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, - 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x23, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, - 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x68, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, - 0x6e, 0x67, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x1a, 0x2d, 0x2e, 0x6f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0f, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x1a, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, - 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, - 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, - 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, - 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, + 0xc2, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/opinit/ophost/v1/types.pulsar.go b/api/opinit/ophost/v1/types.pulsar.go index 7dac3fa6..7fee9be2 100644 --- a/api/opinit/ophost/v1/types.pulsar.go +++ b/api/opinit/ophost/v1/types.pulsar.go @@ -3038,6 +3038,7 @@ func (x *BridgeConfig) GetMetadata() []byte { return nil } +// BatchInfo defines the set of batch information. type BatchInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3208,7 +3209,7 @@ var file_opinit_ophost_v1_types_proto_rawDesc = []byte{ 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x3a, 0x1a, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x70, 0x68, 0x6f, - 0x73, 0x74, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xad, 0x04, 0x0a, 0x0c, 0x42, 0x72, + 0x73, 0x74, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xb8, 0x04, 0x0a, 0x0c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, @@ -3216,66 +3217,66 @@ var file_opinit_ophost_v1_types_proto_rawDesc = []byte{ 0x6e, 0x67, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x62, 0x61, + 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x7a, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, - 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x1d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, - 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x7a, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, - 0xea, 0xde, 0x1f, 0x1d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, - 0x79, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x5d, - 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, - 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3f, 0x0a, 0x09, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x09, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x31, 0x5f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x31, 0x44, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0xa0, 0x01, - 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, - 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, - 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, - 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, - 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x7a, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, + 0xde, 0x1f, 0x1d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x73, 0x75, 0x62, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x7a, 0x0a, + 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x1d, 0x66, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x5d, 0x0a, 0x15, 0x73, 0x75, 0x62, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, + 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x3f, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, + 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x31, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x31, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x19, 0x0a, + 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0xa0, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, + 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0xc9, 0x01, 0xc8, 0xe1, + 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, + 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, + 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, + 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/opinit/opchild/v1/types.proto b/proto/opinit/opchild/v1/types.proto index b440c1d3..fcf21f8a 100644 --- a/proto/opinit/opchild/v1/types.proto +++ b/proto/opinit/opchild/v1/types.proto @@ -34,6 +34,12 @@ message Params { (amino.dont_omitempty) = true, (gogoproto.moretags) = "yaml:\"bridge_executor\"" ]; + // the account address of admin who can execute permissioned cosmos messages. + string admin = 5 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (amino.dont_omitempty) = true, + (gogoproto.moretags) = "yaml:\"admin\"" + ]; } // Validator defines a validator, together with the total amount of the diff --git a/x/opchild/client/cli/genesis.go b/x/opchild/client/cli/genesis.go index 557c96d4..444f1e1a 100644 --- a/x/opchild/client/cli/genesis.go +++ b/x/opchild/client/cli/genesis.go @@ -85,6 +85,9 @@ $ %s add-genesis-validator my-key-name --home=/path/to/home/dir --keyring-backen opchildState := opchildtypes.GetGenesisStateFromAppState(cdc, appState) opchildState.Validators = append((*opchildState).Validators, validator) + if opchildState.Params.Admin == "" { + opchildState.Params.Admin = addr.String() + } if opchildState.Params.BridgeExecutor == "" { opchildState.Params.BridgeExecutor = addr.String() } diff --git a/x/opchild/client/cli/tx.go b/x/opchild/client/cli/tx.go index 76030530..e7aacd79 100644 --- a/x/opchild/client/cli/tx.go +++ b/x/opchild/client/cli/tx.go @@ -7,7 +7,6 @@ import ( "cosmossdk.io/core/address" "github.com/spf13/cobra" - flag "github.com/spf13/pflag" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -80,8 +79,8 @@ func NewDepositCmd(ac address.Codec) *cobra.Command { } txf, msg, err := newBuildDepositMsg( - clientCtx, ac, txf, cmd.Flags(), - sequence, from, to, amount, baseDenom, + clientCtx, ac, txf, sequence, + from, to, amount, baseDenom, []byte(hookMsg), ) if err != nil { @@ -124,7 +123,7 @@ func NewWithdrawCmd(ac address.Codec) *cobra.Command { return err } - txf, msg, err := newBuildWithdrawMsg(clientCtx, ac, txf, cmd.Flags(), to, amount) + txf, msg, err := newBuildWithdrawMsg(clientCtx, ac, txf, to, amount) if err != nil { return err } @@ -203,7 +202,7 @@ Where proposal.json contains: return cmd } -func newBuildWithdrawMsg(clientCtx client.Context, ac address.Codec, txf tx.Factory, fs *flag.FlagSet, to sdk.AccAddress, amount sdk.Coin) (tx.Factory, *types.MsgInitiateTokenWithdrawal, error) { +func newBuildWithdrawMsg(clientCtx client.Context, ac address.Codec, txf tx.Factory, to sdk.AccAddress, amount sdk.Coin) (tx.Factory, *types.MsgInitiateTokenWithdrawal, error) { sender := clientCtx.GetFromAddress() senderAddr, err := ac.BytesToString(sender) if err != nil { @@ -227,7 +226,6 @@ func newBuildDepositMsg( clientCtx client.Context, ac address.Codec, txf tx.Factory, - fs *flag.FlagSet, sequence uint64, from, to sdk.AccAddress, amount sdk.Coin, diff --git a/x/opchild/keeper/common_test.go b/x/opchild/keeper/common_test.go index b0b80fc6..ef828231 100644 --- a/x/opchild/keeper/common_test.go +++ b/x/opchild/keeper/common_test.go @@ -312,8 +312,9 @@ func _createTestInput( ) opchildParams := opchildtypes.DefaultParams() + opchildParams.Admin = addrs[0].String() opchildParams.BridgeExecutor = addrs[0].String() - opchildKeeper.SetParams(ctx, opchildParams) + require.NoError(t, opchildKeeper.SetParams(ctx, opchildParams)) // register handlers to msg router opchildtypes.RegisterMsgServer(msgRouter, opchildkeeper.NewMsgServerImpl(*opchildKeeper)) diff --git a/x/opchild/keeper/msg_server.go b/x/opchild/keeper/msg_server.go index 732fbbb0..1adc8ec1 100644 --- a/x/opchild/keeper/msg_server.go +++ b/x/opchild/keeper/msg_server.go @@ -26,16 +26,15 @@ func NewMsgServerImpl(k Keeper) MsgServer { return MsgServer{k} } -// checkValidatorPermission checks if the sender is the one of validator -func (ms MsgServer) checkValidatorPermission(ctx context.Context, sender string) error { - addr, err := ms.authKeeper.AddressCodec().StringToBytes(sender) +// checkAdminPermission checks if the sender is the admin +func (ms MsgServer) checkAdminPermission(ctx context.Context, sender string) error { + params, err := ms.GetParams(ctx) if err != nil { return err } - valAddr := sdk.ValAddress(addr) - if _, found := ms.GetValidator(ctx, valAddr); !found { - return errors.Wrapf(sdkerrors.ErrUnauthorized, "the message is allowed to be executed by validator") + if params.Admin != sender { + return errors.Wrapf(sdkerrors.ErrUnauthorized, "the message is allowed to be executed by admin %s", params.Admin) } return nil @@ -69,7 +68,7 @@ func (ms MsgServer) ExecuteMessages(ctx context.Context, req *types.MsgExecuteMe } // permission check - if err := ms.checkValidatorPermission(ctx, req.Sender); err != nil { + if err := ms.checkAdminPermission(ctx, req.Sender); err != nil { return nil, err } diff --git a/x/opchild/keeper/msg_server_test.go b/x/opchild/keeper/msg_server_test.go index ac0ab5d6..e8dc9511 100644 --- a/x/opchild/keeper/msg_server_test.go +++ b/x/opchild/keeper/msg_server_test.go @@ -25,6 +25,14 @@ func Test_MsgServer_ExecuteMessages(t *testing.T) { ctx, input := createDefaultTestInput(t) ms := keeper.NewMsgServerImpl(input.OPChildKeeper) + + params, err := ms.GetParams(ctx) + require.NoError(t, err) + + // admin to 0 + params.Admin = addrsStr[0] + require.NoError(t, ms.SetParams(ctx, params)) + valPubKeys := testutilsims.CreateTestPubKeys(2) // register validator @@ -45,7 +53,15 @@ func Test_MsgServer_ExecuteMessages(t *testing.T) { removeMsg, err := types.NewMsgRemoveValidator(moduleAddr, valAddrsStr[0]) require.NoError(t, err) - msg, err := types.NewMsgExecuteMessages(addrsStr[0], []sdk.Msg{addMsg, removeMsg}) + // should failed with unauthorized + msg, err := types.NewMsgExecuteMessages(addrsStr[1], []sdk.Msg{addMsg, removeMsg}) + require.NoError(t, err) + + _, err = ms.ExecuteMessages(ctx, msg) + require.Error(t, err) + + // success + msg, err = types.NewMsgExecuteMessages(addrsStr[0], []sdk.Msg{addMsg, removeMsg}) require.NoError(t, err) _, err = ms.ExecuteMessages(ctx, msg) @@ -60,7 +76,6 @@ func Test_MsgServer_ExecuteMessages(t *testing.T) { require.Equal(t, vals[0].Moniker, "val2") // should failed with err (denom not sorted) - params := types.DefaultParams() params.MinGasPrices = sdk.DecCoins{{ Denom: "22222", Amount: math.LegacyNewDec(1), diff --git a/x/opchild/keeper/params.go b/x/opchild/keeper/params.go index 713e37bb..34c5cee9 100644 --- a/x/opchild/keeper/params.go +++ b/x/opchild/keeper/params.go @@ -19,6 +19,10 @@ func (k Keeper) BridgeExecutor(ctx context.Context) (sdk.AccAddress, error) { // SetParams sets the x/opchild module parameters. func (k Keeper) SetParams(ctx context.Context, params types.Params) error { + if err := params.Validate(k.authKeeper.AddressCodec()); err != nil { + return err + } + return k.Params.Set(ctx, params) } diff --git a/x/opchild/types/params.go b/x/opchild/types/params.go index 2b937694..1fa86b92 100644 --- a/x/opchild/types/params.go +++ b/x/opchild/types/params.go @@ -15,16 +15,18 @@ var ( // DefaultParams returns default move parameters func DefaultParams() Params { return NewParams( + "", + "", DefaultMaxValidators, DefaultHistoricalEntries, - "", DefaultMinGasPrices, ) } // NewParams creates a new Params instance -func NewParams(maxValidators, historicalEntries uint32, bridgeExecutor string, minGasPrice sdk.DecCoins) Params { +func NewParams(admin, bridgeExecutor string, maxValidators, historicalEntries uint32, minGasPrice sdk.DecCoins) Params { return Params{ + Admin: admin, BridgeExecutor: bridgeExecutor, MaxValidators: maxValidators, HistoricalEntries: historicalEntries, @@ -43,6 +45,9 @@ func (p Params) String() string { // Validate performs basic validation on move parameters func (p Params) Validate(ac address.Codec) error { + if _, err := ac.StringToBytes(p.Admin); err != nil { + return err + } if _, err := ac.StringToBytes(p.BridgeExecutor); err != nil { return err } diff --git a/x/opchild/types/types.pb.go b/x/opchild/types/types.pb.go index 659b2de5..d760b2a1 100644 --- a/x/opchild/types/types.pb.go +++ b/x/opchild/types/types.pb.go @@ -39,6 +39,8 @@ type Params struct { // the account address of bridge executor who can execute permissioned bridge // messages. BridgeExecutor string `protobuf:"bytes,4,opt,name=bridge_executor,json=bridgeExecutor,proto3" json:"bridge_executor,omitempty" yaml:"bridge_executor"` + // the account address of admin who can execute permissioned cosmos messages. + Admin string `protobuf:"bytes,5,opt,name=admin,proto3" json:"admin,omitempty" yaml:"admin"` } func (m *Params) Reset() { *m = Params{} } @@ -173,51 +175,53 @@ func init() { func init() { proto.RegisterFile("opinit/opchild/v1/types.proto", fileDescriptor_2cc6df244b706d68) } var fileDescriptor_2cc6df244b706d68 = []byte{ - // 698 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x54, 0xb1, 0x6f, 0xd3, 0x4e, - 0x14, 0xb6, 0x9b, 0xaa, 0x55, 0xdc, 0x36, 0x6d, 0xac, 0xf4, 0xf7, 0x4b, 0x5b, 0x6a, 0x47, 0x9e, - 0xa2, 0x42, 0x6c, 0xa5, 0x45, 0x42, 0xca, 0x44, 0x0d, 0x85, 0xa1, 0x48, 0x8d, 0x8c, 0x60, 0x60, - 0x31, 0x67, 0xfb, 0x70, 0x4f, 0x8d, 0xef, 0x2c, 0xdf, 0x25, 0x24, 0xff, 0x01, 0x62, 0x81, 0x91, - 0xb1, 0x63, 0x61, 0xea, 0xc0, 0xc6, 0x3f, 0x50, 0x31, 0x55, 0x4c, 0x4c, 0x06, 0xd2, 0xa1, 0xcc, - 0xf9, 0x0b, 0x90, 0x7d, 0x97, 0xa4, 0x84, 0x25, 0xb9, 0xf7, 0xbe, 0xef, 0xbd, 0x7b, 0xfe, 0xee, - 0xbb, 0x53, 0xb6, 0x49, 0x8c, 0x30, 0x62, 0x16, 0x89, 0xfd, 0x63, 0xd4, 0x09, 0xac, 0x5e, 0xd3, - 0x62, 0x83, 0x18, 0x52, 0x33, 0x4e, 0x08, 0x23, 0x6a, 0x99, 0xc3, 0xa6, 0x80, 0xcd, 0x5e, 0x73, - 0xb3, 0x0c, 0x22, 0x84, 0x89, 0x95, 0xff, 0x72, 0xd6, 0xa6, 0xe6, 0x13, 0x1a, 0x11, 0x6a, 0x79, - 0x80, 0x42, 0xab, 0xd7, 0xf4, 0x20, 0x03, 0x4d, 0xcb, 0x27, 0x08, 0x0b, 0x7c, 0x83, 0xe3, 0x6e, - 0x1e, 0x59, 0x3c, 0x10, 0x50, 0x25, 0x24, 0x21, 0xe1, 0xf9, 0x6c, 0x35, 0x2e, 0x08, 0x09, 0x09, - 0x3b, 0xd0, 0xca, 0x23, 0xaf, 0xfb, 0xca, 0x02, 0x78, 0x20, 0xa0, 0x2d, 0x06, 0x71, 0x00, 0x93, - 0x08, 0x61, 0x66, 0x01, 0xcf, 0x47, 0x37, 0xc7, 0x35, 0x3e, 0x16, 0x94, 0x85, 0x36, 0x48, 0x40, - 0x44, 0xd5, 0xfb, 0x4a, 0x29, 0x02, 0x7d, 0xb7, 0x07, 0x3a, 0x28, 0x00, 0x8c, 0x24, 0xb4, 0x2a, - 0xd7, 0xe4, 0xfa, 0x8a, 0xbd, 0x31, 0x4a, 0xf5, 0xf5, 0x01, 0x88, 0x3a, 0x2d, 0xe3, 0x6f, 0xdc, - 0x70, 0x56, 0x22, 0xd0, 0x7f, 0x3e, 0x89, 0xd5, 0x27, 0x8a, 0x7a, 0x8c, 0x28, 0x23, 0x09, 0xf2, - 0x41, 0xc7, 0x85, 0x98, 0x25, 0x08, 0xd2, 0xea, 0x5c, 0xde, 0x65, 0x7b, 0x94, 0xea, 0x1b, 0xbc, - 0xcb, 0xbf, 0x1c, 0xc3, 0x29, 0x4f, 0x93, 0x07, 0x3c, 0xa7, 0xbe, 0x93, 0x95, 0x52, 0x84, 0xb0, - 0x1b, 0x82, 0x4c, 0x07, 0xe4, 0x43, 0x5a, 0x2d, 0xd4, 0x0a, 0xf5, 0xa5, 0xdd, 0x5b, 0xa6, 0x10, - 0x24, 0x53, 0xcf, 0x14, 0xea, 0x99, 0x0f, 0xa1, 0xff, 0x80, 0x20, 0x6c, 0x1f, 0x5e, 0xa4, 0xba, - 0x34, 0x4a, 0xf5, 0x8a, 0x18, 0xf9, 0x66, 0x07, 0xe3, 0xd3, 0x0f, 0xfd, 0x76, 0x88, 0xd8, 0x71, - 0xd7, 0x33, 0x7d, 0x12, 0x09, 0x61, 0xc5, 0x5f, 0x83, 0x06, 0x27, 0x42, 0x1b, 0xd1, 0x8b, 0x3a, - 0xcb, 0x11, 0xc2, 0x8f, 0x01, 0x6d, 0xe7, 0xdb, 0xab, 0x2f, 0x95, 0x55, 0x2f, 0x41, 0x41, 0x08, - 0x5d, 0xd8, 0x87, 0x7e, 0x97, 0x91, 0xa4, 0x3a, 0x5f, 0x93, 0xeb, 0x45, 0xfb, 0xde, 0x28, 0xd5, - 0xff, 0xe3, 0xfb, 0xcd, 0x10, 0x8c, 0x6f, 0x9f, 0x1b, 0x15, 0x31, 0xee, 0x7e, 0x10, 0x24, 0x90, - 0xd2, 0xa7, 0x2c, 0x41, 0x38, 0x3c, 0xbb, 0x3e, 0xdf, 0x91, 0x9d, 0x12, 0xa7, 0x1f, 0x08, 0x76, - 0x6b, 0xeb, 0xc3, 0xa9, 0x2e, 0xfd, 0x3e, 0xd5, 0xe5, 0xb7, 0xd7, 0xe7, 0x3b, 0xa5, 0xb1, 0xc5, - 0xf8, 0x01, 0x19, 0x5f, 0xe6, 0x94, 0xe2, 0x44, 0x6d, 0xf5, 0x8e, 0xb2, 0x18, 0x11, 0x8c, 0x4e, - 0x60, 0x92, 0x9f, 0x53, 0xd1, 0x56, 0x47, 0xa9, 0x5e, 0x12, 0x1f, 0xcd, 0x01, 0xc3, 0x19, 0x53, - 0xd4, 0x47, 0xca, 0x1a, 0x89, 0x61, 0x92, 0x55, 0xba, 0x80, 0xcf, 0x91, 0x1f, 0x4c, 0xd1, 0xde, - 0x1a, 0xa5, 0xfa, 0xff, 0xbc, 0x6c, 0x96, 0x61, 0x38, 0xab, 0xe3, 0x94, 0x98, 0x5d, 0x65, 0xca, - 0x9a, 0x4f, 0x30, 0x85, 0x98, 0x76, 0xa9, 0x1b, 0x77, 0xbd, 0x13, 0x38, 0xa8, 0x16, 0x6a, 0x72, - 0x7d, 0x69, 0xb7, 0x62, 0x72, 0x0b, 0x9a, 0x63, 0x0b, 0x9a, 0xfb, 0x78, 0x60, 0xef, 0x4d, 0xbb, - 0xcf, 0xd6, 0x19, 0x5f, 0xa7, 0xd2, 0xf8, 0xc9, 0x20, 0x66, 0xc4, 0x6c, 0x77, 0xbd, 0x43, 0x38, - 0x70, 0x56, 0x27, 0xd4, 0x76, 0xce, 0x54, 0xef, 0x2a, 0x4a, 0x96, 0x72, 0x63, 0xf2, 0x1a, 0x72, - 0xcd, 0x0b, 0xf6, 0xfa, 0x28, 0xd5, 0xcb, 0xd3, 0xce, 0x1c, 0x33, 0x9c, 0x62, 0x16, 0xb4, 0xb3, - 0x75, 0x6b, 0xf9, 0xcd, 0xa9, 0x2e, 0x09, 0x41, 0x25, 0xc3, 0x55, 0xd6, 0x26, 0xe2, 0x3d, 0x8b, - 0x03, 0xc0, 0x20, 0x55, 0x0f, 0x94, 0xc5, 0x2e, 0x5f, 0x56, 0xe5, 0xdc, 0x5a, 0x35, 0x73, 0x7a, - 0x59, 0xcc, 0xec, 0xb2, 0x98, 0x33, 0x35, 0x76, 0x31, 0xb3, 0x17, 0x3f, 0xbc, 0x71, 0x6d, 0x6b, - 0x3e, 0xdb, 0xc0, 0x3e, 0xba, 0xf8, 0xa5, 0x49, 0x67, 0x43, 0x4d, 0xbe, 0x18, 0x6a, 0xf2, 0xe5, - 0x50, 0x93, 0x7f, 0x0e, 0x35, 0xf9, 0xfd, 0x95, 0x26, 0x5d, 0x5e, 0x69, 0xd2, 0xf7, 0x2b, 0x4d, - 0x7a, 0xd1, 0xb8, 0x61, 0xbd, 0xec, 0x91, 0x40, 0xa0, 0xd1, 0x01, 0x1e, 0xb5, 0x8e, 0xda, 0xf9, - 0x8b, 0xd2, 0x9f, 0xbc, 0x29, 0xb9, 0x0b, 0xbd, 0x85, 0x5c, 0xc9, 0xbd, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x02, 0x06, 0xae, 0x2b, 0x72, 0x04, 0x00, 0x00, + // 723 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, + 0x18, 0xb6, 0x9b, 0xfe, 0x51, 0xdc, 0x36, 0x6d, 0xac, 0xf4, 0xf7, 0x4b, 0x5b, 0x6a, 0x47, 0x9e, + 0xa2, 0x42, 0x6c, 0xa5, 0x45, 0x42, 0xca, 0x44, 0x5d, 0x0a, 0x43, 0x91, 0x1a, 0x19, 0xc1, 0xc0, + 0x62, 0xce, 0xf6, 0xe1, 0x9e, 0x1a, 0xdf, 0x59, 0x3e, 0x27, 0x24, 0xdf, 0x00, 0xb1, 0xc0, 0xc8, + 0xd8, 0xb1, 0x62, 0xea, 0xc0, 0xc6, 0x17, 0xa8, 0x98, 0x2a, 0x26, 0x26, 0x03, 0xe9, 0x50, 0x26, + 0x06, 0x7f, 0x02, 0x64, 0xdf, 0x25, 0x29, 0x61, 0x60, 0x49, 0xee, 0x7d, 0x9f, 0xe7, 0x7d, 0xee, + 0xd5, 0xf3, 0xbe, 0x3e, 0x69, 0x8b, 0x84, 0x08, 0xa3, 0xd8, 0x20, 0xa1, 0x7b, 0x8c, 0x3a, 0x9e, + 0xd1, 0x6b, 0x1a, 0xf1, 0x20, 0x84, 0x54, 0x0f, 0x23, 0x12, 0x13, 0xb9, 0xcc, 0x60, 0x9d, 0xc3, + 0x7a, 0xaf, 0xb9, 0x51, 0x06, 0x01, 0xc2, 0xc4, 0xc8, 0x7f, 0x19, 0x6b, 0x43, 0x71, 0x09, 0x0d, + 0x08, 0x35, 0x1c, 0x40, 0xa1, 0xd1, 0x6b, 0x3a, 0x30, 0x06, 0x4d, 0xc3, 0x25, 0x08, 0x73, 0x7c, + 0x9d, 0xe1, 0x76, 0x1e, 0x19, 0x2c, 0xe0, 0x50, 0xc5, 0x27, 0x3e, 0x61, 0xf9, 0xec, 0x34, 0x2a, + 0xf0, 0x09, 0xf1, 0x3b, 0xd0, 0xc8, 0x23, 0xa7, 0xfb, 0xd2, 0x00, 0x78, 0xc0, 0xa1, 0xcd, 0x18, + 0x62, 0x0f, 0x46, 0x01, 0xc2, 0xb1, 0x01, 0x1c, 0x17, 0xdd, 0x6c, 0x57, 0xfb, 0x55, 0x90, 0xe6, + 0xdb, 0x20, 0x02, 0x01, 0x95, 0xef, 0x4b, 0xa5, 0x00, 0xf4, 0xed, 0x1e, 0xe8, 0x20, 0x0f, 0xc4, + 0x24, 0xa2, 0x55, 0xb1, 0x26, 0xd6, 0x97, 0xcd, 0xf5, 0x34, 0x51, 0xd7, 0x06, 0x20, 0xe8, 0xb4, + 0xb4, 0x3f, 0x71, 0xcd, 0x5a, 0x0e, 0x40, 0xff, 0xd9, 0x38, 0x96, 0x1f, 0x4b, 0xf2, 0x31, 0xa2, + 0x31, 0x89, 0x90, 0x0b, 0x3a, 0x36, 0xc4, 0x71, 0x84, 0x20, 0xad, 0xce, 0xe4, 0x2a, 0x5b, 0x69, + 0xa2, 0xae, 0x33, 0x95, 0xbf, 0x39, 0x9a, 0x55, 0x9e, 0x24, 0x0f, 0x58, 0x4e, 0x7e, 0x2b, 0x4a, + 0xa5, 0x00, 0x61, 0xdb, 0x07, 0x99, 0x0f, 0xc8, 0x85, 0xb4, 0x5a, 0xa8, 0x15, 0xea, 0x8b, 0x3b, + 0xb7, 0x74, 0x6e, 0x48, 0xe6, 0x9e, 0xce, 0xdd, 0xd3, 0x1f, 0x40, 0x77, 0x9f, 0x20, 0x6c, 0x1e, + 0x5e, 0x24, 0xaa, 0x90, 0x26, 0x6a, 0x85, 0xb7, 0x7c, 0x53, 0x41, 0xfb, 0xf0, 0x4d, 0xbd, 0xed, + 0xa3, 0xf8, 0xb8, 0xeb, 0xe8, 0x2e, 0x09, 0xb8, 0xb1, 0xfc, 0xaf, 0x41, 0xbd, 0x13, 0xee, 0x0d, + 0xd7, 0xa2, 0xd6, 0x52, 0x80, 0xf0, 0x23, 0x40, 0xdb, 0xf9, 0xf5, 0xf2, 0x0b, 0x69, 0xc5, 0x89, + 0x90, 0xe7, 0x43, 0x1b, 0xf6, 0xa1, 0xdb, 0x8d, 0x49, 0x54, 0x9d, 0xad, 0x89, 0xf5, 0xa2, 0x79, + 0x2f, 0x4d, 0xd4, 0xff, 0xd8, 0x7d, 0x53, 0x04, 0xed, 0xcb, 0xc7, 0x46, 0x85, 0xb7, 0xbb, 0xe7, + 0x79, 0x11, 0xa4, 0xf4, 0x49, 0x1c, 0x21, 0xec, 0x9f, 0x5d, 0x9f, 0x6f, 0x8b, 0x56, 0x89, 0xd1, + 0x0f, 0x38, 0x5b, 0xde, 0x97, 0xe6, 0x80, 0x17, 0x20, 0x5c, 0x9d, 0xcb, 0x75, 0x1b, 0x69, 0xa2, + 0x2e, 0x31, 0xdd, 0x3c, 0xfd, 0x0f, 0x35, 0x56, 0xdb, 0xda, 0x7c, 0x7f, 0xaa, 0x0a, 0x3f, 0x4f, + 0x55, 0xf1, 0xcd, 0xf5, 0xf9, 0x76, 0x69, 0xb4, 0xa7, 0x6c, 0xca, 0xda, 0xa7, 0x19, 0xa9, 0x38, + 0x1e, 0x99, 0x7c, 0x47, 0x5a, 0x08, 0x08, 0x46, 0x27, 0x30, 0xca, 0x87, 0x5d, 0x34, 0xe5, 0x34, + 0x51, 0x4b, 0xdc, 0x39, 0x06, 0x68, 0xd6, 0x88, 0x22, 0x3f, 0x94, 0x56, 0x49, 0x08, 0xa3, 0xac, + 0xd2, 0x06, 0xec, 0xfa, 0x7c, 0xba, 0x45, 0x73, 0x33, 0x4d, 0xd4, 0xff, 0x59, 0xd9, 0x34, 0x43, + 0xb3, 0x56, 0x46, 0x29, 0xde, 0xb2, 0x1c, 0x4b, 0xab, 0x2e, 0xc1, 0x14, 0x62, 0xda, 0xa5, 0x76, + 0xd8, 0x75, 0x4e, 0xe0, 0xa0, 0x5a, 0xa8, 0x89, 0xf5, 0xc5, 0x9d, 0x8a, 0xce, 0xf6, 0x58, 0x1f, + 0xed, 0xb1, 0xbe, 0x87, 0x07, 0xe6, 0xee, 0x44, 0x7d, 0xba, 0x4e, 0xfb, 0x3c, 0x71, 0xc4, 0x8d, + 0x06, 0x61, 0x4c, 0xf4, 0x76, 0xd7, 0x39, 0x84, 0x03, 0x6b, 0x65, 0x4c, 0x6d, 0xe7, 0x4c, 0xf9, + 0xae, 0x24, 0x65, 0x29, 0x3b, 0x24, 0xaf, 0x20, 0x1b, 0x5c, 0xc1, 0x5c, 0x4b, 0x13, 0xb5, 0x3c, + 0x51, 0x66, 0x98, 0x66, 0x15, 0xb3, 0xa0, 0x9d, 0x9d, 0x5b, 0x4b, 0xaf, 0x4f, 0x55, 0x81, 0x1b, + 0x2a, 0x68, 0xb6, 0xb4, 0x3a, 0x36, 0xef, 0x69, 0xe8, 0x81, 0x18, 0x52, 0xf9, 0x40, 0x5a, 0xe8, + 0xb2, 0x63, 0x55, 0xcc, 0xf7, 0xb3, 0xa6, 0x4f, 0xbe, 0x38, 0x3d, 0xfb, 0xe2, 0xf4, 0xa9, 0x1a, + 0xb3, 0x98, 0xed, 0x28, 0x9b, 0xd9, 0xa8, 0xb6, 0x35, 0x9b, 0x5d, 0x60, 0x1e, 0x5d, 0xfc, 0x50, + 0x84, 0xb3, 0xa1, 0x22, 0x5e, 0x0c, 0x15, 0xf1, 0x72, 0xa8, 0x88, 0xdf, 0x87, 0x8a, 0xf8, 0xee, + 0x4a, 0x11, 0x2e, 0xaf, 0x14, 0xe1, 0xeb, 0x95, 0x22, 0x3c, 0x6f, 0xdc, 0xd8, 0xdf, 0xec, 0xa5, + 0x41, 0xa0, 0xd1, 0x01, 0x0e, 0x35, 0x8e, 0xda, 0xf9, 0xb3, 0xd4, 0x1f, 0x3f, 0x4c, 0xf9, 0x2a, + 0x3b, 0xf3, 0xb9, 0x93, 0xbb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x2f, 0xa5, 0x7e, 0xb7, + 0x04, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -256,6 +260,9 @@ func (this *Params) Equal(that interface{}) bool { if this.BridgeExecutor != that1.BridgeExecutor { return false } + if this.Admin != that1.Admin { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -278,6 +285,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x2a + } if len(m.BridgeExecutor) > 0 { i -= len(m.BridgeExecutor) copy(dAtA[i:], m.BridgeExecutor) @@ -436,6 +450,10 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -617,6 +635,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.BridgeExecutor = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/x/ophost/keeper/common_test.go b/x/ophost/keeper/common_test.go index 33bc3704..e6d5082b 100644 --- a/x/ophost/keeper/common_test.go +++ b/x/ophost/keeper/common_test.go @@ -184,13 +184,14 @@ func (f *TestFaucet) NewFundedAccount(ctx sdk.Context, amounts ...sdk.Coin) sdk. } type TestKeepers struct { - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - OPHostKeeper ophostkeeper.Keeper - BridgeHook *bridgeHook - EncodingConfig EncodingConfig - Faucet *TestFaucet - MultiStore storetypes.CommitMultiStore + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + OPHostKeeper ophostkeeper.Keeper + CommunityPoolKeeper *MockCommunityPoolKeeper + BridgeHook *bridgeHook + EncodingConfig EncodingConfig + Faucet *TestFaucet + MultiStore storetypes.CommitMultiStore } // createDefaultTestInput common settings for createTestInput @@ -284,11 +285,13 @@ func _createTestInput( msgRouter.SetInterfaceRegistry(encodingConfig.InterfaceRegistry) bridgeHook := &bridgeHook{} + communityPoolKeeper := &MockCommunityPoolKeeper{} ophostKeeper := ophostkeeper.NewKeeper( appCodec, runtime.NewKVStoreService(keys[ophosttypes.StoreKey]), accountKeeper, bankKeeper, + communityPoolKeeper, bridgeHook, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -302,13 +305,14 @@ func _createTestInput( faucet := NewTestFaucet(t, ctx, bankKeeper, authtypes.Minter, initialTotalSupply()...) keepers := TestKeepers{ - AccountKeeper: accountKeeper, - BankKeeper: bankKeeper, - OPHostKeeper: *ophostKeeper, - BridgeHook: bridgeHook, - EncodingConfig: encodingConfig, - Faucet: faucet, - MultiStore: ms, + AccountKeeper: accountKeeper, + BankKeeper: bankKeeper, + OPHostKeeper: *ophostKeeper, + CommunityPoolKeeper: communityPoolKeeper, + BridgeHook: bridgeHook, + EncodingConfig: encodingConfig, + Faucet: faucet, + MultiStore: ms, } return ctx, keepers } @@ -380,3 +384,15 @@ func (h *bridgeHook) BridgeBatchInfoUpdated( return nil } + +var _ ophosttypes.CommunityPoolKeeper = &MockCommunityPoolKeeper{} + +type MockCommunityPoolKeeper struct { + CommunityPool sdk.Coins +} + +func (k *MockCommunityPoolKeeper) FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error { + k.CommunityPool = k.CommunityPool.Add(amount...) + + return nil +} diff --git a/x/ophost/keeper/keeper.go b/x/ophost/keeper/keeper.go index ad9dcc3b..a353340f 100644 --- a/x/ophost/keeper/keeper.go +++ b/x/ophost/keeper/keeper.go @@ -17,9 +17,10 @@ type Keeper struct { cdc codec.Codec storeService corestoretypes.KVStoreService - authKeeper types.AccountKeeper - bankKeeper types.BankKeeper - bridgeHook types.BridgeHook + authKeeper types.AccountKeeper + bankKeeper types.BankKeeper + bridgeHook types.BridgeHook + communityPoolKeeper types.CommunityPoolKeeper // the address capable of executing a MsgUpdateParams message. Typically, this // should be the x/gov module account. @@ -41,6 +42,7 @@ func NewKeeper( storeService corestoretypes.KVStoreService, ak types.AccountKeeper, bk types.BankKeeper, + ck types.CommunityPoolKeeper, bridgeHook types.BridgeHook, authority string, ) *Keeper { @@ -52,12 +54,16 @@ func NewKeeper( sb := collections.NewSchemaBuilder(storeService) k := &Keeper{ - cdc: cdc, - storeService: storeService, - authKeeper: ak, - bankKeeper: bk, - bridgeHook: bridgeHook, - authority: authority, + cdc: cdc, + storeService: storeService, + + authKeeper: ak, + bankKeeper: bk, + communityPoolKeeper: ck, + + bridgeHook: bridgeHook, + authority: authority, + NextBridgeId: collections.NewSequence(sb, types.NextBridgeIdKey, "next_bridge_id"), Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), BridgeConfigs: collections.NewMap(sb, types.BridgeConfigPrefix, "bridge_configs", collections.Uint64Key, codec.CollValue[types.BridgeConfig](cdc)), diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index 8ee5acb6..3940a530 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -54,6 +54,20 @@ func (ms MsgServer) CreateBridge(ctx context.Context, req *types.MsgCreateBridge return nil, err } + // registration fee check + registrationFee := ms.RegistrationFee(ctx) + if registrationFee.IsValid() { + creator, err := ms.authKeeper.AddressCodec().StringToBytes(req.Creator) + if err != nil { + return nil, err + } + + err = ms.communityPoolKeeper.FundCommunityPool(ctx, registrationFee, creator) + if err != nil { + return nil, err + } + } + bridgeId, err := ms.IncreaseNextBridgeId(ctx) if err != nil { return nil, err diff --git a/x/ophost/keeper/msg_server_test.go b/x/ophost/keeper/msg_server_test.go index e7969d8d..48f2e388 100644 --- a/x/ophost/keeper/msg_server_test.go +++ b/x/ophost/keeper/msg_server_test.go @@ -25,6 +25,12 @@ func Test_RecordBatch(t *testing.T) { func Test_CreateBridge(t *testing.T) { ctx, input := createDefaultTestInput(t) + params := input.OPHostKeeper.GetParams(ctx) + params.RegistrationFee = sdk.NewCoins(sdk.NewCoin("foo", math.NewInt(100))) + require.NoError(t, input.OPHostKeeper.SetParams(ctx, params)) + + input.Faucet.Fund(ctx, addrs[0], sdk.NewCoin("foo", math.NewInt(1000))) + ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ Challenger: addrsStr[0], @@ -42,6 +48,9 @@ func Test_CreateBridge(t *testing.T) { _config, err := input.OPHostKeeper.GetBridgeConfig(ctx, res.BridgeId) require.NoError(t, err) require.Equal(t, config, _config) + + // check community pool + require.Equal(t, sdk.NewCoins(sdk.NewCoin("foo", math.NewInt(100))), input.CommunityPoolKeeper.CommunityPool) } func Test_ProposeOutput(t *testing.T) { diff --git a/x/ophost/types/expected_keeper.go b/x/ophost/types/expected_keeper.go index afe344a5..edaa7993 100644 --- a/x/ophost/types/expected_keeper.go +++ b/x/ophost/types/expected_keeper.go @@ -41,3 +41,7 @@ type BankKeeper interface { MintCoins(ctx context.Context, moduleName string, amounts sdk.Coins) error BurnCoins(ctx context.Context, moduleName string, amounts sdk.Coins) error } + +type CommunityPoolKeeper interface { + FundCommunityPool(ctx context.Context, amount sdk.Coins, sender sdk.AccAddress) error +} diff --git a/x/ophost/types/types.pb.go b/x/ophost/types/types.pb.go index 2ba78cf1..894523da 100644 --- a/x/ophost/types/types.pb.go +++ b/x/ophost/types/types.pb.go @@ -124,6 +124,7 @@ func (m *BridgeConfig) XXX_DiscardUnknown() { var xxx_messageInfo_BridgeConfig proto.InternalMessageInfo +// BatchInfo defines the set of batch information. type BatchInfo struct { // The address of the batch submitter. Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"` From be4ff5b3a9a793e8de22aadd97cadc2f6f150637 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 9 Apr 2024 14:21:19 +0900 Subject: [PATCH 02/13] feat: add bridge info set/get interface (#46) * add bridge info set/get interface * proto format * emit events * add bridge info to genesis --- Makefile | 2 +- api/opinit/opchild/v1/genesis.pulsar.go | 107 +- api/opinit/opchild/v1/query.pulsar.go | 1012 ++++++++++++++- api/opinit/opchild/v1/query_grpc.pb.go | 37 + api/opinit/opchild/v1/tx.pulsar.go | 1497 +++++++++++++++++++---- api/opinit/opchild/v1/tx_grpc.pb.go | 39 + api/opinit/opchild/v1/types.pulsar.go | 799 ++++++++++-- proto/opinit/opchild/v1/genesis.proto | 5 +- proto/opinit/opchild/v1/query.proto | 14 + proto/opinit/opchild/v1/tx.proto | 18 + proto/opinit/opchild/v1/types.proto | 13 + proto/opinit/ophost/v1/query.proto | 2 +- x/opchild/keeper/genesis.go | 23 + x/opchild/keeper/genesis_test.go | 30 +- x/opchild/keeper/keeper.go | 2 + x/opchild/keeper/msg_server.go | 31 + x/opchild/keeper/msg_server_test.go | 33 + x/opchild/keeper/querier.go | 13 +- x/opchild/keeper/querier_test.go | 31 + x/opchild/types/errors.go | 1 + x/opchild/types/events.go | 3 + x/opchild/types/genesis.go | 10 +- x/opchild/types/genesis.pb.go | 140 ++- x/opchild/types/keys.go | 1 + x/opchild/types/query.pb.go | 412 ++++++- x/opchild/types/query.pb.gw.go | 65 + x/opchild/types/tx.go | 54 +- x/opchild/types/tx.pb.go | 531 ++++++-- x/opchild/types/types.pb.go | 371 +++++- x/ophost/types/bridge_config.go | 32 + 30 files changed, 4694 insertions(+), 634 deletions(-) diff --git a/Makefile b/Makefile index baff1ce0..0fe20ccf 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ proto-pulsar-gen: @$(protoImage) sh ./scripts/protocgen-pulsar.sh proto-format: - @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; + @$(protoImage) find ./proto -name "*.proto" -exec clang-format -i {} \; proto-lint: @$(protoImage) buf lint --error-format=json diff --git a/api/opinit/opchild/v1/genesis.pulsar.go b/api/opinit/opchild/v1/genesis.pulsar.go index 9dfa23cb..8ecae4da 100644 --- a/api/opinit/opchild/v1/genesis.pulsar.go +++ b/api/opinit/opchild/v1/genesis.pulsar.go @@ -171,6 +171,7 @@ var ( fd_GenesisState_exported protoreflect.FieldDescriptor fd_GenesisState_next_l2_sequence protoreflect.FieldDescriptor fd_GenesisState_finalized_l1_sequences protoreflect.FieldDescriptor + fd_GenesisState_bridge_info protoreflect.FieldDescriptor ) func init() { @@ -182,6 +183,7 @@ func init() { fd_GenesisState_exported = md_GenesisState.Fields().ByName("exported") fd_GenesisState_next_l2_sequence = md_GenesisState.Fields().ByName("next_l2_sequence") fd_GenesisState_finalized_l1_sequences = md_GenesisState.Fields().ByName("finalized_l1_sequences") + fd_GenesisState_bridge_info = md_GenesisState.Fields().ByName("bridge_info") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -285,6 +287,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if x.BridgeInfo != nil { + value := protoreflect.ValueOfMessage(x.BridgeInfo.ProtoReflect()) + if !f(fd_GenesisState_bridge_info, value) { + return + } + } } // Has reports whether a field is populated. @@ -312,6 +320,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool return x.NextL2Sequence != uint64(0) case "opinit.opchild.v1.GenesisState.finalized_l1_sequences": return len(x.FinalizedL1Sequences) != 0 + case "opinit.opchild.v1.GenesisState.bridge_info": + return x.BridgeInfo != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.GenesisState")) @@ -340,6 +350,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { x.NextL2Sequence = uint64(0) case "opinit.opchild.v1.GenesisState.finalized_l1_sequences": x.FinalizedL1Sequences = nil + case "opinit.opchild.v1.GenesisState.bridge_info": + x.BridgeInfo = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.GenesisState")) @@ -383,6 +395,9 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto } listValue := &_GenesisState_7_list{list: &x.FinalizedL1Sequences} return protoreflect.ValueOfList(listValue) + case "opinit.opchild.v1.GenesisState.bridge_info": + value := x.BridgeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.GenesisState")) @@ -421,6 +436,8 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value lv := value.List() clv := lv.(*_GenesisState_7_list) x.FinalizedL1Sequences = *clv.list + case "opinit.opchild.v1.GenesisState.bridge_info": + x.BridgeInfo = value.Message().Interface().(*BridgeInfo) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.GenesisState")) @@ -464,6 +481,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p } value := &_GenesisState_7_list{list: &x.FinalizedL1Sequences} return protoreflect.ValueOfList(value) + case "opinit.opchild.v1.GenesisState.bridge_info": + if x.BridgeInfo == nil { + x.BridgeInfo = new(BridgeInfo) + } + return protoreflect.ValueOfMessage(x.BridgeInfo.ProtoReflect()) case "opinit.opchild.v1.GenesisState.exported": panic(fmt.Errorf("field exported of message opinit.opchild.v1.GenesisState is not mutable")) case "opinit.opchild.v1.GenesisState.next_l2_sequence": @@ -497,6 +519,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "opinit.opchild.v1.GenesisState.finalized_l1_sequences": list := []uint64{} return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) + case "opinit.opchild.v1.GenesisState.bridge_info": + m := new(BridgeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.GenesisState")) @@ -595,6 +620,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } n += 1 + runtime.Sov(uint64(l)) + l } + if x.BridgeInfo != nil { + l = options.Size(x.BridgeInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -624,6 +653,20 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.BridgeInfo != nil { + encoded, err := options.Marshal(x.BridgeInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } if len(x.FinalizedL1Sequences) > 0 { var pksize2 int for _, num := range x.FinalizedL1Sequences { @@ -973,6 +1016,42 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } else { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalizedL1Sequences", wireType) } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BridgeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.BridgeInfo == nil { + x.BridgeInfo = &BridgeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BridgeInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1505,6 +1584,7 @@ type GenesisState struct { Exported bool `protobuf:"varint,5,opt,name=exported,proto3" json:"exported,omitempty"` NextL2Sequence uint64 `protobuf:"varint,6,opt,name=next_l2_sequence,json=nextL2Sequence,proto3" json:"next_l2_sequence,omitempty"` FinalizedL1Sequences []uint64 `protobuf:"varint,7,rep,packed,name=finalized_l1_sequences,json=finalizedL1Sequences,proto3" json:"finalized_l1_sequences,omitempty"` + BridgeInfo *BridgeInfo `protobuf:"bytes,8,opt,name=bridge_info,json=bridgeInfo,proto3" json:"bridge_info,omitempty"` } func (x *GenesisState) Reset() { @@ -1569,6 +1649,13 @@ func (x *GenesisState) GetFinalizedL1Sequences() []uint64 { return nil } +func (x *GenesisState) GetBridgeInfo() *BridgeInfo { + if x != nil { + return x.BridgeInfo + } + return nil +} + // LastValidatorPower required for validator set update logic. type LastValidatorPower struct { state protoimpl.MessageState @@ -1627,7 +1714,7 @@ var file_opinit_opchild_v1_genesis_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, @@ -1651,7 +1738,11 @@ var file_opinit_opchild_v1_genesis_proto_rawDesc = []byte{ 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6c, 0x31, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x04, 0x52, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4c, 0x31, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, - 0x73, 0x22, 0x68, 0x0a, 0x12, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x73, 0x12, 0x3e, 0x0a, 0x0b, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x68, 0x0a, 0x12, 0x4c, 0x61, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, @@ -1691,16 +1782,18 @@ var file_opinit_opchild_v1_genesis_proto_goTypes = []interface{}{ (*LastValidatorPower)(nil), // 1: opinit.opchild.v1.LastValidatorPower (*Params)(nil), // 2: opinit.opchild.v1.Params (*Validator)(nil), // 3: opinit.opchild.v1.Validator + (*BridgeInfo)(nil), // 4: opinit.opchild.v1.BridgeInfo } var file_opinit_opchild_v1_genesis_proto_depIdxs = []int32{ 2, // 0: opinit.opchild.v1.GenesisState.params:type_name -> opinit.opchild.v1.Params 1, // 1: opinit.opchild.v1.GenesisState.last_validator_powers:type_name -> opinit.opchild.v1.LastValidatorPower 3, // 2: opinit.opchild.v1.GenesisState.validators:type_name -> opinit.opchild.v1.Validator - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 3: opinit.opchild.v1.GenesisState.bridge_info:type_name -> opinit.opchild.v1.BridgeInfo + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_opinit_opchild_v1_genesis_proto_init() } diff --git a/api/opinit/opchild/v1/query.pulsar.go b/api/opinit/opchild/v1/query.pulsar.go index 76b903f1..fe6d7664 100644 --- a/api/opinit/opchild/v1/query.pulsar.go +++ b/api/opinit/opchild/v1/query.pulsar.go @@ -1881,6 +1881,797 @@ func (x *fastReflection_QueryValidatorResponse) ProtoMethods() *protoiface.Metho } } +var ( + md_QueryBridgeInfoRequest protoreflect.MessageDescriptor +) + +func init() { + file_opinit_opchild_v1_query_proto_init() + md_QueryBridgeInfoRequest = File_opinit_opchild_v1_query_proto.Messages().ByName("QueryBridgeInfoRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryBridgeInfoRequest)(nil) + +type fastReflection_QueryBridgeInfoRequest QueryBridgeInfoRequest + +func (x *QueryBridgeInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryBridgeInfoRequest)(x) +} + +func (x *QueryBridgeInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_opinit_opchild_v1_query_proto_msgTypes[4] + 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) +} + +var _fastReflection_QueryBridgeInfoRequest_messageType fastReflection_QueryBridgeInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryBridgeInfoRequest_messageType{} + +type fastReflection_QueryBridgeInfoRequest_messageType struct{} + +func (x fastReflection_QueryBridgeInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryBridgeInfoRequest)(nil) +} +func (x fastReflection_QueryBridgeInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryBridgeInfoRequest) +} +func (x fastReflection_QueryBridgeInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryBridgeInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryBridgeInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryBridgeInfoRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryBridgeInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryBridgeInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryBridgeInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryBridgeInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryBridgeInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryBridgeInfoRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryBridgeInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryBridgeInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoRequest")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoRequest")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryBridgeInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoRequest")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoRequest")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoRequest")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryBridgeInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoRequest")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryBridgeInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in opinit.opchild.v1.QueryBridgeInfoRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryBridgeInfoRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryBridgeInfoRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryBridgeInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryBridgeInfoRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryBridgeInfoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryBridgeInfoRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBridgeInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBridgeInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryBridgeInfoResponse protoreflect.MessageDescriptor + fd_QueryBridgeInfoResponse_bridge_info protoreflect.FieldDescriptor +) + +func init() { + file_opinit_opchild_v1_query_proto_init() + md_QueryBridgeInfoResponse = File_opinit_opchild_v1_query_proto.Messages().ByName("QueryBridgeInfoResponse") + fd_QueryBridgeInfoResponse_bridge_info = md_QueryBridgeInfoResponse.Fields().ByName("bridge_info") +} + +var _ protoreflect.Message = (*fastReflection_QueryBridgeInfoResponse)(nil) + +type fastReflection_QueryBridgeInfoResponse QueryBridgeInfoResponse + +func (x *QueryBridgeInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryBridgeInfoResponse)(x) +} + +func (x *QueryBridgeInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_opinit_opchild_v1_query_proto_msgTypes[5] + 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) +} + +var _fastReflection_QueryBridgeInfoResponse_messageType fastReflection_QueryBridgeInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryBridgeInfoResponse_messageType{} + +type fastReflection_QueryBridgeInfoResponse_messageType struct{} + +func (x fastReflection_QueryBridgeInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryBridgeInfoResponse)(nil) +} +func (x fastReflection_QueryBridgeInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryBridgeInfoResponse) +} +func (x fastReflection_QueryBridgeInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryBridgeInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryBridgeInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryBridgeInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryBridgeInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryBridgeInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryBridgeInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryBridgeInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryBridgeInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryBridgeInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryBridgeInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BridgeInfo != nil { + value := protoreflect.ValueOfMessage(x.BridgeInfo.ProtoReflect()) + if !f(fd_QueryBridgeInfoResponse_bridge_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryBridgeInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info": + return x.BridgeInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info": + x.BridgeInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryBridgeInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info": + value := x.BridgeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info": + x.BridgeInfo = value.Message().Interface().(*BridgeInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info": + if x.BridgeInfo == nil { + x.BridgeInfo = new(BridgeInfo) + } + return protoreflect.ValueOfMessage(x.BridgeInfo.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryBridgeInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info": + m := new(BridgeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.QueryBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.QueryBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryBridgeInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in opinit.opchild.v1.QueryBridgeInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryBridgeInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryBridgeInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryBridgeInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryBridgeInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryBridgeInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.BridgeInfo != nil { + l = options.Size(x.BridgeInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryBridgeInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.BridgeInfo != nil { + encoded, err := options.Marshal(x.BridgeInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryBridgeInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBridgeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryBridgeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BridgeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.BridgeInfo == nil { + x.BridgeInfo = &BridgeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BridgeInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_QueryParamsRequest protoreflect.MessageDescriptor ) @@ -1899,7 +2690,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_query_proto_msgTypes[4] + mi := &file_opinit_opchild_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2257,7 +3048,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_query_proto_msgTypes[5] + mi := &file_opinit_opchild_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2842,6 +3633,70 @@ func (x *QueryValidatorResponse) GetValidator() *Validator { return nil } +// QueryBridgeInfoRequest is request type for the Query/BridgeInfo RPC method. +type QueryBridgeInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryBridgeInfoRequest) Reset() { + *x = QueryBridgeInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_opinit_opchild_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryBridgeInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryBridgeInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryBridgeInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryBridgeInfoRequest) Descriptor() ([]byte, []int) { + return file_opinit_opchild_v1_query_proto_rawDescGZIP(), []int{4} +} + +// QueryBridgeInfoResponse is response type for the Query/BridgeInfo RPC method. +type QueryBridgeInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // bridge_info holds all the information about the bridge. + BridgeInfo *BridgeInfo `protobuf:"bytes,1,opt,name=bridge_info,json=bridgeInfo,proto3" json:"bridge_info,omitempty"` +} + +func (x *QueryBridgeInfoResponse) Reset() { + *x = QueryBridgeInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_opinit_opchild_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryBridgeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryBridgeInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryBridgeInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryBridgeInfoResponse) Descriptor() ([]byte, []int) { + return file_opinit_opchild_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryBridgeInfoResponse) GetBridgeInfo() *BridgeInfo { + if x != nil { + return x.BridgeInfo + } + return nil +} + // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { state protoimpl.MessageState @@ -2852,7 +3707,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_query_proto_msgTypes[4] + mi := &file_opinit_opchild_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2866,7 +3721,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_query_proto_rawDescGZIP(), []int{4} + return file_opinit_opchild_v1_query_proto_rawDescGZIP(), []int{6} } // QueryParamsResponse is response type for the Query/Params RPC method. @@ -2882,7 +3737,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_query_proto_msgTypes[5] + mi := &file_opinit_opchild_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2896,7 +3751,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_query_proto_rawDescGZIP(), []int{5} + return file_opinit_opchild_v1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryParamsResponse) GetParams() *Params { @@ -2953,14 +3808,22 @@ var file_opinit_opchild_v1_query_proto_rawDesc = []byte{ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x64, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0b, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x32, 0xb9, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8f, 0x01, 0x0a, + 0x6d, 0x73, 0x32, 0xcc, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, @@ -2979,29 +3842,38 @@ var file_opinit_opchild_v1_query_proto_rawDesc = []byte{ 0x65, 0x22, 0x3a, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0x7f, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x7d, 0x12, 0x90, 0x01, + 0x0a, 0x0a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x2e, 0x6f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xc8, - 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, - 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x79, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x88, 0xe7, 0xb0, 0x2a, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x12, 0x1e, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x12, 0x7f, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x88, 0xe7, 0xb0, 0x2a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, + 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0xc8, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, + 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, + 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, + 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, + 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3016,36 +3888,42 @@ func file_opinit_opchild_v1_query_proto_rawDescGZIP() []byte { return file_opinit_opchild_v1_query_proto_rawDescData } -var file_opinit_opchild_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_opinit_opchild_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_opinit_opchild_v1_query_proto_goTypes = []interface{}{ (*QueryValidatorsRequest)(nil), // 0: opinit.opchild.v1.QueryValidatorsRequest (*QueryValidatorsResponse)(nil), // 1: opinit.opchild.v1.QueryValidatorsResponse (*QueryValidatorRequest)(nil), // 2: opinit.opchild.v1.QueryValidatorRequest (*QueryValidatorResponse)(nil), // 3: opinit.opchild.v1.QueryValidatorResponse - (*QueryParamsRequest)(nil), // 4: opinit.opchild.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 5: opinit.opchild.v1.QueryParamsResponse - (*v1beta1.PageRequest)(nil), // 6: cosmos.base.query.v1beta1.PageRequest - (*Validator)(nil), // 7: opinit.opchild.v1.Validator - (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse - (*Params)(nil), // 9: opinit.opchild.v1.Params + (*QueryBridgeInfoRequest)(nil), // 4: opinit.opchild.v1.QueryBridgeInfoRequest + (*QueryBridgeInfoResponse)(nil), // 5: opinit.opchild.v1.QueryBridgeInfoResponse + (*QueryParamsRequest)(nil), // 6: opinit.opchild.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 7: opinit.opchild.v1.QueryParamsResponse + (*v1beta1.PageRequest)(nil), // 8: cosmos.base.query.v1beta1.PageRequest + (*Validator)(nil), // 9: opinit.opchild.v1.Validator + (*v1beta1.PageResponse)(nil), // 10: cosmos.base.query.v1beta1.PageResponse + (*BridgeInfo)(nil), // 11: opinit.opchild.v1.BridgeInfo + (*Params)(nil), // 12: opinit.opchild.v1.Params } var file_opinit_opchild_v1_query_proto_depIdxs = []int32{ - 6, // 0: opinit.opchild.v1.QueryValidatorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 7, // 1: opinit.opchild.v1.QueryValidatorsResponse.validators:type_name -> opinit.opchild.v1.Validator - 8, // 2: opinit.opchild.v1.QueryValidatorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 7, // 3: opinit.opchild.v1.QueryValidatorResponse.validator:type_name -> opinit.opchild.v1.Validator - 9, // 4: opinit.opchild.v1.QueryParamsResponse.params:type_name -> opinit.opchild.v1.Params - 0, // 5: opinit.opchild.v1.Query.Validators:input_type -> opinit.opchild.v1.QueryValidatorsRequest - 2, // 6: opinit.opchild.v1.Query.Validator:input_type -> opinit.opchild.v1.QueryValidatorRequest - 4, // 7: opinit.opchild.v1.Query.Params:input_type -> opinit.opchild.v1.QueryParamsRequest - 1, // 8: opinit.opchild.v1.Query.Validators:output_type -> opinit.opchild.v1.QueryValidatorsResponse - 3, // 9: opinit.opchild.v1.Query.Validator:output_type -> opinit.opchild.v1.QueryValidatorResponse - 5, // 10: opinit.opchild.v1.Query.Params:output_type -> opinit.opchild.v1.QueryParamsResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 8, // 0: opinit.opchild.v1.QueryValidatorsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 9, // 1: opinit.opchild.v1.QueryValidatorsResponse.validators:type_name -> opinit.opchild.v1.Validator + 10, // 2: opinit.opchild.v1.QueryValidatorsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 9, // 3: opinit.opchild.v1.QueryValidatorResponse.validator:type_name -> opinit.opchild.v1.Validator + 11, // 4: opinit.opchild.v1.QueryBridgeInfoResponse.bridge_info:type_name -> opinit.opchild.v1.BridgeInfo + 12, // 5: opinit.opchild.v1.QueryParamsResponse.params:type_name -> opinit.opchild.v1.Params + 0, // 6: opinit.opchild.v1.Query.Validators:input_type -> opinit.opchild.v1.QueryValidatorsRequest + 2, // 7: opinit.opchild.v1.Query.Validator:input_type -> opinit.opchild.v1.QueryValidatorRequest + 4, // 8: opinit.opchild.v1.Query.BridgeInfo:input_type -> opinit.opchild.v1.QueryBridgeInfoRequest + 6, // 9: opinit.opchild.v1.Query.Params:input_type -> opinit.opchild.v1.QueryParamsRequest + 1, // 10: opinit.opchild.v1.Query.Validators:output_type -> opinit.opchild.v1.QueryValidatorsResponse + 3, // 11: opinit.opchild.v1.Query.Validator:output_type -> opinit.opchild.v1.QueryValidatorResponse + 5, // 12: opinit.opchild.v1.Query.BridgeInfo:output_type -> opinit.opchild.v1.QueryBridgeInfoResponse + 7, // 13: opinit.opchild.v1.Query.Params:output_type -> opinit.opchild.v1.QueryParamsResponse + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_opinit_opchild_v1_query_proto_init() } @@ -3104,7 +3982,7 @@ func file_opinit_opchild_v1_query_proto_init() { } } file_opinit_opchild_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryBridgeInfoRequest); i { case 0: return &v.state case 1: @@ -3116,6 +3994,30 @@ func file_opinit_opchild_v1_query_proto_init() { } } file_opinit_opchild_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryBridgeInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opinit_opchild_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opinit_opchild_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -3134,7 +4036,7 @@ func file_opinit_opchild_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_opinit_opchild_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/opinit/opchild/v1/query_grpc.pb.go b/api/opinit/opchild/v1/query_grpc.pb.go index 8d00ed96..56e54547 100644 --- a/api/opinit/opchild/v1/query_grpc.pb.go +++ b/api/opinit/opchild/v1/query_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Validators_FullMethodName = "/opinit.opchild.v1.Query/Validators" Query_Validator_FullMethodName = "/opinit.opchild.v1.Query/Validator" + Query_BridgeInfo_FullMethodName = "/opinit.opchild.v1.Query/BridgeInfo" Query_Params_FullMethodName = "/opinit.opchild.v1.Query/Params" ) @@ -35,6 +36,7 @@ type QueryClient interface { Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) // Validator queries validator info for given validator address. Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) + BridgeInfo(ctx context.Context, in *QueryBridgeInfoRequest, opts ...grpc.CallOption) (*QueryBridgeInfoResponse, error) // Parameters queries the rollup parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -65,6 +67,15 @@ func (c *queryClient) Validator(ctx context.Context, in *QueryValidatorRequest, return out, nil } +func (c *queryClient) BridgeInfo(ctx context.Context, in *QueryBridgeInfoRequest, opts ...grpc.CallOption) (*QueryBridgeInfoResponse, error) { + out := new(QueryBridgeInfoResponse) + err := c.cc.Invoke(ctx, Query_BridgeInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) @@ -85,6 +96,7 @@ type QueryServer interface { Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) // Validator queries validator info for given validator address. Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) + BridgeInfo(context.Context, *QueryBridgeInfoRequest) (*QueryBridgeInfoResponse, error) // Parameters queries the rollup parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) mustEmbedUnimplementedQueryServer() @@ -100,6 +112,9 @@ func (UnimplementedQueryServer) Validators(context.Context, *QueryValidatorsRequ func (UnimplementedQueryServer) Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Validator not implemented") } +func (UnimplementedQueryServer) BridgeInfo(context.Context, *QueryBridgeInfoRequest) (*QueryBridgeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BridgeInfo not implemented") +} func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -152,6 +167,24 @@ func _Query_Validator_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Query_BridgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBridgeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BridgeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_BridgeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BridgeInfo(ctx, req.(*QueryBridgeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -185,6 +218,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Validator", Handler: _Query_Validator_Handler, }, + { + MethodName: "BridgeInfo", + Handler: _Query_BridgeInfo_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, diff --git a/api/opinit/opchild/v1/tx.pulsar.go b/api/opinit/opchild/v1/tx.pulsar.go index 3d811003..0c8b54b3 100644 --- a/api/opinit/opchild/v1/tx.pulsar.go +++ b/api/opinit/opchild/v1/tx.pulsar.go @@ -932,6 +932,861 @@ func (x *fastReflection_MsgExecuteMessagesResponse) ProtoMethods() *protoiface.M } } +var ( + md_MsgSetBridgeInfo protoreflect.MessageDescriptor + fd_MsgSetBridgeInfo_sender protoreflect.FieldDescriptor + fd_MsgSetBridgeInfo_bridge_info protoreflect.FieldDescriptor +) + +func init() { + file_opinit_opchild_v1_tx_proto_init() + md_MsgSetBridgeInfo = File_opinit_opchild_v1_tx_proto.Messages().ByName("MsgSetBridgeInfo") + fd_MsgSetBridgeInfo_sender = md_MsgSetBridgeInfo.Fields().ByName("sender") + fd_MsgSetBridgeInfo_bridge_info = md_MsgSetBridgeInfo.Fields().ByName("bridge_info") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetBridgeInfo)(nil) + +type fastReflection_MsgSetBridgeInfo MsgSetBridgeInfo + +func (x *MsgSetBridgeInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetBridgeInfo)(x) +} + +func (x *MsgSetBridgeInfo) slowProtoReflect() protoreflect.Message { + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[2] + 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) +} + +var _fastReflection_MsgSetBridgeInfo_messageType fastReflection_MsgSetBridgeInfo_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetBridgeInfo_messageType{} + +type fastReflection_MsgSetBridgeInfo_messageType struct{} + +func (x fastReflection_MsgSetBridgeInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetBridgeInfo)(nil) +} +func (x fastReflection_MsgSetBridgeInfo_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetBridgeInfo) +} +func (x fastReflection_MsgSetBridgeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetBridgeInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetBridgeInfo) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetBridgeInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetBridgeInfo) Type() protoreflect.MessageType { + return _fastReflection_MsgSetBridgeInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetBridgeInfo) New() protoreflect.Message { + return new(fastReflection_MsgSetBridgeInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetBridgeInfo) Interface() protoreflect.ProtoMessage { + return (*MsgSetBridgeInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetBridgeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgSetBridgeInfo_sender, value) { + return + } + } + if x.BridgeInfo != nil { + value := protoreflect.ValueOfMessage(x.BridgeInfo.ProtoReflect()) + if !f(fd_MsgSetBridgeInfo_bridge_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetBridgeInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "opinit.opchild.v1.MsgSetBridgeInfo.sender": + return x.Sender != "" + case "opinit.opchild.v1.MsgSetBridgeInfo.bridge_info": + return x.BridgeInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "opinit.opchild.v1.MsgSetBridgeInfo.sender": + x.Sender = "" + case "opinit.opchild.v1.MsgSetBridgeInfo.bridge_info": + x.BridgeInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetBridgeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "opinit.opchild.v1.MsgSetBridgeInfo.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "opinit.opchild.v1.MsgSetBridgeInfo.bridge_info": + value := x.BridgeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "opinit.opchild.v1.MsgSetBridgeInfo.sender": + x.Sender = value.Interface().(string) + case "opinit.opchild.v1.MsgSetBridgeInfo.bridge_info": + x.BridgeInfo = value.Message().Interface().(*BridgeInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "opinit.opchild.v1.MsgSetBridgeInfo.bridge_info": + if x.BridgeInfo == nil { + x.BridgeInfo = new(BridgeInfo) + } + return protoreflect.ValueOfMessage(x.BridgeInfo.ProtoReflect()) + case "opinit.opchild.v1.MsgSetBridgeInfo.sender": + panic(fmt.Errorf("field sender of message opinit.opchild.v1.MsgSetBridgeInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetBridgeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "opinit.opchild.v1.MsgSetBridgeInfo.sender": + return protoreflect.ValueOfString("") + case "opinit.opchild.v1.MsgSetBridgeInfo.bridge_info": + m := new(BridgeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetBridgeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in opinit.opchild.v1.MsgSetBridgeInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetBridgeInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetBridgeInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetBridgeInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetBridgeInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.BridgeInfo != nil { + l = options.Size(x.BridgeInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetBridgeInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.BridgeInfo != nil { + encoded, err := options.Marshal(x.BridgeInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetBridgeInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetBridgeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetBridgeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BridgeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.BridgeInfo == nil { + x.BridgeInfo = &BridgeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BridgeInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSetBridgeInfoResponse protoreflect.MessageDescriptor +) + +func init() { + file_opinit_opchild_v1_tx_proto_init() + md_MsgSetBridgeInfoResponse = File_opinit_opchild_v1_tx_proto.Messages().ByName("MsgSetBridgeInfoResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetBridgeInfoResponse)(nil) + +type fastReflection_MsgSetBridgeInfoResponse MsgSetBridgeInfoResponse + +func (x *MsgSetBridgeInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetBridgeInfoResponse)(x) +} + +func (x *MsgSetBridgeInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[3] + 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) +} + +var _fastReflection_MsgSetBridgeInfoResponse_messageType fastReflection_MsgSetBridgeInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetBridgeInfoResponse_messageType{} + +type fastReflection_MsgSetBridgeInfoResponse_messageType struct{} + +func (x fastReflection_MsgSetBridgeInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetBridgeInfoResponse)(nil) +} +func (x fastReflection_MsgSetBridgeInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetBridgeInfoResponse) +} +func (x fastReflection_MsgSetBridgeInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetBridgeInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetBridgeInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetBridgeInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetBridgeInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSetBridgeInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetBridgeInfoResponse) New() protoreflect.Message { + return new(fastReflection_MsgSetBridgeInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetBridgeInfoResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSetBridgeInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetBridgeInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetBridgeInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetBridgeInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetBridgeInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.MsgSetBridgeInfoResponse")) + } + panic(fmt.Errorf("message opinit.opchild.v1.MsgSetBridgeInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetBridgeInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in opinit.opchild.v1.MsgSetBridgeInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetBridgeInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetBridgeInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetBridgeInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetBridgeInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetBridgeInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetBridgeInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetBridgeInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetBridgeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetBridgeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_MsgFinalizeTokenDeposit protoreflect.MessageDescriptor fd_MsgFinalizeTokenDeposit_sender protoreflect.FieldDescriptor @@ -966,7 +1821,7 @@ func (x *MsgFinalizeTokenDeposit) ProtoReflect() protoreflect.Message { } func (x *MsgFinalizeTokenDeposit) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[2] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1803,7 +2658,7 @@ func (x *MsgFinalizeTokenDepositResponse) ProtoReflect() protoreflect.Message { } func (x *MsgFinalizeTokenDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[3] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2165,7 +3020,7 @@ func (x *MsgInitiateTokenWithdrawal) ProtoReflect() protoreflect.Message { } func (x *MsgInitiateTokenWithdrawal) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[4] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2724,7 +3579,7 @@ func (x *MsgInitiateTokenWithdrawalResponse) ProtoReflect() protoreflect.Message } func (x *MsgInitiateTokenWithdrawalResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[5] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3134,7 +3989,7 @@ func (x *MsgAddValidator) ProtoReflect() protoreflect.Message { } func (x *MsgAddValidator) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[6] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3753,7 +4608,7 @@ func (x *MsgAddValidatorResponse) ProtoReflect() protoreflect.Message { } func (x *MsgAddValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[7] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4113,7 +4968,7 @@ func (x *MsgRemoveValidator) ProtoReflect() protoreflect.Message { } func (x *MsgRemoveValidator) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[8] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4593,7 +5448,7 @@ func (x *MsgRemoveValidatorResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRemoveValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[9] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4953,7 +5808,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[10] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5448,7 +6303,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[11] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5861,7 +6716,7 @@ func (x *MsgSpendFeePool) ProtoReflect() protoreflect.Message { } func (x *MsgSpendFeePool) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[12] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6426,7 +7281,7 @@ func (x *MsgSpendFeePoolResponse) ProtoReflect() protoreflect.Message { } func (x *MsgSpendFeePoolResponse) slowProtoReflect() protoreflect.Message { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[13] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6851,6 +7706,79 @@ func (*MsgExecuteMessagesResponse) Descriptor() ([]byte, []int) { return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{1} } +// MsgSetBridgeInfo is a message to set the registered bridge information. +type MsgSetBridgeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the sender address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // bridge_info is the bridge information to be set. + BridgeInfo *BridgeInfo `protobuf:"bytes,2,opt,name=bridge_info,json=bridgeInfo,proto3" json:"bridge_info,omitempty"` +} + +func (x *MsgSetBridgeInfo) Reset() { + *x = MsgSetBridgeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetBridgeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetBridgeInfo) ProtoMessage() {} + +// Deprecated: Use MsgSetBridgeInfo.ProtoReflect.Descriptor instead. +func (*MsgSetBridgeInfo) Descriptor() ([]byte, []int) { + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgSetBridgeInfo) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgSetBridgeInfo) GetBridgeInfo() *BridgeInfo { + if x != nil { + return x.BridgeInfo + } + return nil +} + +// MsgSetBridgeInfoResponse returns set bridge info result data +type MsgSetBridgeInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSetBridgeInfoResponse) Reset() { + *x = MsgSetBridgeInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetBridgeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetBridgeInfoResponse) ProtoMessage() {} + +// Deprecated: Use MsgSetBridgeInfoResponse.ProtoReflect.Descriptor instead. +func (*MsgSetBridgeInfoResponse) Descriptor() ([]byte, []int) { + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{3} +} + // MsgFinalizeTokenDeposit is a message to submit deposit funds from upper layer type MsgFinalizeTokenDeposit struct { state protoimpl.MessageState @@ -6878,7 +7806,7 @@ type MsgFinalizeTokenDeposit struct { func (x *MsgFinalizeTokenDeposit) Reset() { *x = MsgFinalizeTokenDeposit{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[2] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6892,7 +7820,7 @@ func (*MsgFinalizeTokenDeposit) ProtoMessage() {} // Deprecated: Use MsgFinalizeTokenDeposit.ProtoReflect.Descriptor instead. func (*MsgFinalizeTokenDeposit) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{2} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgFinalizeTokenDeposit) GetSender() string { @@ -6961,7 +7889,7 @@ type MsgFinalizeTokenDepositResponse struct { func (x *MsgFinalizeTokenDepositResponse) Reset() { *x = MsgFinalizeTokenDepositResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[3] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6975,7 +7903,7 @@ func (*MsgFinalizeTokenDepositResponse) ProtoMessage() {} // Deprecated: Use MsgFinalizeTokenDepositResponse.ProtoReflect.Descriptor instead. func (*MsgFinalizeTokenDepositResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{3} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{5} } // MsgInitiateTokenWithdrawal is a message to withdraw a new token from L2 to L1. @@ -6995,7 +7923,7 @@ type MsgInitiateTokenWithdrawal struct { func (x *MsgInitiateTokenWithdrawal) Reset() { *x = MsgInitiateTokenWithdrawal{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[4] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7009,7 +7937,7 @@ func (*MsgInitiateTokenWithdrawal) ProtoMessage() {} // Deprecated: Use MsgInitiateTokenWithdrawal.ProtoReflect.Descriptor instead. func (*MsgInitiateTokenWithdrawal) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{4} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgInitiateTokenWithdrawal) GetSender() string { @@ -7045,7 +7973,7 @@ type MsgInitiateTokenWithdrawalResponse struct { func (x *MsgInitiateTokenWithdrawalResponse) Reset() { *x = MsgInitiateTokenWithdrawalResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[5] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7059,7 +7987,7 @@ func (*MsgInitiateTokenWithdrawalResponse) ProtoMessage() {} // Deprecated: Use MsgInitiateTokenWithdrawalResponse.ProtoReflect.Descriptor instead. func (*MsgInitiateTokenWithdrawalResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{5} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{7} } func (x *MsgInitiateTokenWithdrawalResponse) GetSequence() uint64 { @@ -7086,7 +8014,7 @@ type MsgAddValidator struct { func (x *MsgAddValidator) Reset() { *x = MsgAddValidator{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[6] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7100,7 +8028,7 @@ func (*MsgAddValidator) ProtoMessage() {} // Deprecated: Use MsgAddValidator.ProtoReflect.Descriptor instead. func (*MsgAddValidator) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{6} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgAddValidator) GetAuthority() string { @@ -7141,7 +8069,7 @@ type MsgAddValidatorResponse struct { func (x *MsgAddValidatorResponse) Reset() { *x = MsgAddValidatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[7] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7155,7 +8083,7 @@ func (*MsgAddValidatorResponse) ProtoMessage() {} // Deprecated: Use MsgAddValidatorResponse.ProtoReflect.Descriptor instead. func (*MsgAddValidatorResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{7} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{9} } // MsgAddValidator is a message to remove a validator from designated list @@ -7174,7 +8102,7 @@ type MsgRemoveValidator struct { func (x *MsgRemoveValidator) Reset() { *x = MsgRemoveValidator{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[8] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7188,7 +8116,7 @@ func (*MsgRemoveValidator) ProtoMessage() {} // Deprecated: Use MsgRemoveValidator.ProtoReflect.Descriptor instead. func (*MsgRemoveValidator) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{8} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{10} } func (x *MsgRemoveValidator) GetAuthority() string { @@ -7215,7 +8143,7 @@ type MsgRemoveValidatorResponse struct { func (x *MsgRemoveValidatorResponse) Reset() { *x = MsgRemoveValidatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[9] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7229,7 +8157,7 @@ func (*MsgRemoveValidatorResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveValidatorResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveValidatorResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{9} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{11} } // MsgUpdateParams is a message to update parameters @@ -7248,7 +8176,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[10] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7262,7 +8190,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{10} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgUpdateParams) GetAuthority() string { @@ -7289,7 +8217,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[11] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7303,7 +8231,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{11} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{13} } // MsgSpendFeePool is a message to withdraw collected fees from the module @@ -7325,7 +8253,7 @@ type MsgSpendFeePool struct { func (x *MsgSpendFeePool) Reset() { *x = MsgSpendFeePool{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[12] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7339,7 +8267,7 @@ func (*MsgSpendFeePool) ProtoMessage() {} // Deprecated: Use MsgSpendFeePool.ProtoReflect.Descriptor instead. func (*MsgSpendFeePool) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{12} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{14} } func (x *MsgSpendFeePool) GetAuthority() string { @@ -7373,7 +8301,7 @@ type MsgSpendFeePoolResponse struct { func (x *MsgSpendFeePoolResponse) Reset() { *x = MsgSpendFeePoolResponse{} if protoimpl.UnsafeEnabled { - mi := &file_opinit_opchild_v1_tx_proto_msgTypes[13] + mi := &file_opinit_opchild_v1_tx_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7387,7 +8315,7 @@ func (*MsgSpendFeePoolResponse) ProtoMessage() {} // Deprecated: Use MsgSpendFeePoolResponse.ProtoReflect.Descriptor instead. func (*MsgSpendFeePoolResponse) Descriptor() ([]byte, []int) { - return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{13} + return file_opinit_opchild_v1_tx_proto_rawDescGZIP(), []int{15} } var File_opinit_opchild_v1_tx_proto protoreflect.FileDescriptor @@ -7419,189 +8347,210 @@ var file_opinit_opchild_v1_tx_proto_rawDesc = []byte{ 0xb0, 0x2a, 0x1a, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x03, 0x0a, 0x17, - 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x04, 0x66, 0x72, - 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x28, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x02, - 0x74, 0x6f, 0x12, 0x4d, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1a, 0xc8, - 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0c, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x3a, 0x2f, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, - 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x02, - 0x74, 0x6f, 0x12, 0x4d, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1a, 0xc8, - 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x22, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x40, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xba, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, - 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, - 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, - 0x72, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x18, - 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x3a, 0x32, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xd6, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x10, + 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x41, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x29, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x0b, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x0a, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x28, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, + 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x42, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x03, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x12, 0x41, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x29, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x66, 0x72, 0x6f, + 0x6d, 0x12, 0x28, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x4d, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1a, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x09, 0xc8, 0xde, 0x1f, + 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2f, 0x82, 0xe7, + 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x6f, 0x70, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x21, 0x0a, + 0x1f, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xfb, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, + 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x28, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x6f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, - 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, - 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xbc, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, - 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x4d, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1a, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xa8, 0xe7, 0xb0, + 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x22, 0x6f, 0x70, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x40, + 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x22, 0xba, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x72, - 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, - 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, - 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, - 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf7, 0x05, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x67, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x11, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x18, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x3a, 0x32, 0x88, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, + 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x19, 0x0a, + 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x11, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xbc, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x0f, 0x4d, 0x73, + 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x4a, 0x0a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, + 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2a, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, + 0x17, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, + 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, + 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xda, 0x06, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x67, 0x0a, 0x0f, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, + 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x2d, 0x2e, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x14, 0x46, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x12, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, - 0x32, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x63, 0x75, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, + 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2b, 0x2e, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x65, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, + 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x2d, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, 0x35, 0x2e, - 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, + 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x32, 0x2e, 0x6f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x7f, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x2d, 0x2e, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, 0x35, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5e, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2d, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, - 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x67, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2d, 0x2e, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, - 0x0c, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x22, 0x2e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x0c, 0x53, 0x70, 0x65, + 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x50, 0x6f, 0x6f, - 0x6c, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x70, 0x65, 0x6e, 0x64, 0x46, 0x65, - 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, - 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x15, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, - 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, - 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, - 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, - 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, + 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, + 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, + 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, + 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, + 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -7616,52 +8565,58 @@ func file_opinit_opchild_v1_tx_proto_rawDescGZIP() []byte { return file_opinit_opchild_v1_tx_proto_rawDescData } -var file_opinit_opchild_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_opinit_opchild_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_opinit_opchild_v1_tx_proto_goTypes = []interface{}{ (*MsgExecuteMessages)(nil), // 0: opinit.opchild.v1.MsgExecuteMessages (*MsgExecuteMessagesResponse)(nil), // 1: opinit.opchild.v1.MsgExecuteMessagesResponse - (*MsgFinalizeTokenDeposit)(nil), // 2: opinit.opchild.v1.MsgFinalizeTokenDeposit - (*MsgFinalizeTokenDepositResponse)(nil), // 3: opinit.opchild.v1.MsgFinalizeTokenDepositResponse - (*MsgInitiateTokenWithdrawal)(nil), // 4: opinit.opchild.v1.MsgInitiateTokenWithdrawal - (*MsgInitiateTokenWithdrawalResponse)(nil), // 5: opinit.opchild.v1.MsgInitiateTokenWithdrawalResponse - (*MsgAddValidator)(nil), // 6: opinit.opchild.v1.MsgAddValidator - (*MsgAddValidatorResponse)(nil), // 7: opinit.opchild.v1.MsgAddValidatorResponse - (*MsgRemoveValidator)(nil), // 8: opinit.opchild.v1.MsgRemoveValidator - (*MsgRemoveValidatorResponse)(nil), // 9: opinit.opchild.v1.MsgRemoveValidatorResponse - (*MsgUpdateParams)(nil), // 10: opinit.opchild.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 11: opinit.opchild.v1.MsgUpdateParamsResponse - (*MsgSpendFeePool)(nil), // 12: opinit.opchild.v1.MsgSpendFeePool - (*MsgSpendFeePoolResponse)(nil), // 13: opinit.opchild.v1.MsgSpendFeePoolResponse - (*anypb.Any)(nil), // 14: google.protobuf.Any - (*v1beta1.Coin)(nil), // 15: cosmos.base.v1beta1.Coin - (*Params)(nil), // 16: opinit.opchild.v1.Params + (*MsgSetBridgeInfo)(nil), // 2: opinit.opchild.v1.MsgSetBridgeInfo + (*MsgSetBridgeInfoResponse)(nil), // 3: opinit.opchild.v1.MsgSetBridgeInfoResponse + (*MsgFinalizeTokenDeposit)(nil), // 4: opinit.opchild.v1.MsgFinalizeTokenDeposit + (*MsgFinalizeTokenDepositResponse)(nil), // 5: opinit.opchild.v1.MsgFinalizeTokenDepositResponse + (*MsgInitiateTokenWithdrawal)(nil), // 6: opinit.opchild.v1.MsgInitiateTokenWithdrawal + (*MsgInitiateTokenWithdrawalResponse)(nil), // 7: opinit.opchild.v1.MsgInitiateTokenWithdrawalResponse + (*MsgAddValidator)(nil), // 8: opinit.opchild.v1.MsgAddValidator + (*MsgAddValidatorResponse)(nil), // 9: opinit.opchild.v1.MsgAddValidatorResponse + (*MsgRemoveValidator)(nil), // 10: opinit.opchild.v1.MsgRemoveValidator + (*MsgRemoveValidatorResponse)(nil), // 11: opinit.opchild.v1.MsgRemoveValidatorResponse + (*MsgUpdateParams)(nil), // 12: opinit.opchild.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 13: opinit.opchild.v1.MsgUpdateParamsResponse + (*MsgSpendFeePool)(nil), // 14: opinit.opchild.v1.MsgSpendFeePool + (*MsgSpendFeePoolResponse)(nil), // 15: opinit.opchild.v1.MsgSpendFeePoolResponse + (*anypb.Any)(nil), // 16: google.protobuf.Any + (*BridgeInfo)(nil), // 17: opinit.opchild.v1.BridgeInfo + (*v1beta1.Coin)(nil), // 18: cosmos.base.v1beta1.Coin + (*Params)(nil), // 19: opinit.opchild.v1.Params } var file_opinit_opchild_v1_tx_proto_depIdxs = []int32{ - 14, // 0: opinit.opchild.v1.MsgExecuteMessages.messages:type_name -> google.protobuf.Any - 15, // 1: opinit.opchild.v1.MsgFinalizeTokenDeposit.amount:type_name -> cosmos.base.v1beta1.Coin - 15, // 2: opinit.opchild.v1.MsgInitiateTokenWithdrawal.amount:type_name -> cosmos.base.v1beta1.Coin - 14, // 3: opinit.opchild.v1.MsgAddValidator.pubkey:type_name -> google.protobuf.Any - 16, // 4: opinit.opchild.v1.MsgUpdateParams.params:type_name -> opinit.opchild.v1.Params - 15, // 5: opinit.opchild.v1.MsgSpendFeePool.amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 6: opinit.opchild.v1.Msg.ExecuteMessages:input_type -> opinit.opchild.v1.MsgExecuteMessages - 2, // 7: opinit.opchild.v1.Msg.FinalizeTokenDeposit:input_type -> opinit.opchild.v1.MsgFinalizeTokenDeposit - 4, // 8: opinit.opchild.v1.Msg.InitiateTokenWithdrawal:input_type -> opinit.opchild.v1.MsgInitiateTokenWithdrawal - 6, // 9: opinit.opchild.v1.Msg.AddValidator:input_type -> opinit.opchild.v1.MsgAddValidator - 8, // 10: opinit.opchild.v1.Msg.RemoveValidator:input_type -> opinit.opchild.v1.MsgRemoveValidator - 10, // 11: opinit.opchild.v1.Msg.UpdateParams:input_type -> opinit.opchild.v1.MsgUpdateParams - 12, // 12: opinit.opchild.v1.Msg.SpendFeePool:input_type -> opinit.opchild.v1.MsgSpendFeePool - 1, // 13: opinit.opchild.v1.Msg.ExecuteMessages:output_type -> opinit.opchild.v1.MsgExecuteMessagesResponse - 3, // 14: opinit.opchild.v1.Msg.FinalizeTokenDeposit:output_type -> opinit.opchild.v1.MsgFinalizeTokenDepositResponse - 5, // 15: opinit.opchild.v1.Msg.InitiateTokenWithdrawal:output_type -> opinit.opchild.v1.MsgInitiateTokenWithdrawalResponse - 7, // 16: opinit.opchild.v1.Msg.AddValidator:output_type -> opinit.opchild.v1.MsgAddValidatorResponse - 9, // 17: opinit.opchild.v1.Msg.RemoveValidator:output_type -> opinit.opchild.v1.MsgRemoveValidatorResponse - 11, // 18: opinit.opchild.v1.Msg.UpdateParams:output_type -> opinit.opchild.v1.MsgUpdateParamsResponse - 13, // 19: opinit.opchild.v1.Msg.SpendFeePool:output_type -> opinit.opchild.v1.MsgSpendFeePoolResponse - 13, // [13:20] is the sub-list for method output_type - 6, // [6:13] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 16, // 0: opinit.opchild.v1.MsgExecuteMessages.messages:type_name -> google.protobuf.Any + 17, // 1: opinit.opchild.v1.MsgSetBridgeInfo.bridge_info:type_name -> opinit.opchild.v1.BridgeInfo + 18, // 2: opinit.opchild.v1.MsgFinalizeTokenDeposit.amount:type_name -> cosmos.base.v1beta1.Coin + 18, // 3: opinit.opchild.v1.MsgInitiateTokenWithdrawal.amount:type_name -> cosmos.base.v1beta1.Coin + 16, // 4: opinit.opchild.v1.MsgAddValidator.pubkey:type_name -> google.protobuf.Any + 19, // 5: opinit.opchild.v1.MsgUpdateParams.params:type_name -> opinit.opchild.v1.Params + 18, // 6: opinit.opchild.v1.MsgSpendFeePool.amount:type_name -> cosmos.base.v1beta1.Coin + 0, // 7: opinit.opchild.v1.Msg.ExecuteMessages:input_type -> opinit.opchild.v1.MsgExecuteMessages + 2, // 8: opinit.opchild.v1.Msg.SetBridgeInfo:input_type -> opinit.opchild.v1.MsgSetBridgeInfo + 4, // 9: opinit.opchild.v1.Msg.FinalizeTokenDeposit:input_type -> opinit.opchild.v1.MsgFinalizeTokenDeposit + 6, // 10: opinit.opchild.v1.Msg.InitiateTokenWithdrawal:input_type -> opinit.opchild.v1.MsgInitiateTokenWithdrawal + 8, // 11: opinit.opchild.v1.Msg.AddValidator:input_type -> opinit.opchild.v1.MsgAddValidator + 10, // 12: opinit.opchild.v1.Msg.RemoveValidator:input_type -> opinit.opchild.v1.MsgRemoveValidator + 12, // 13: opinit.opchild.v1.Msg.UpdateParams:input_type -> opinit.opchild.v1.MsgUpdateParams + 14, // 14: opinit.opchild.v1.Msg.SpendFeePool:input_type -> opinit.opchild.v1.MsgSpendFeePool + 1, // 15: opinit.opchild.v1.Msg.ExecuteMessages:output_type -> opinit.opchild.v1.MsgExecuteMessagesResponse + 3, // 16: opinit.opchild.v1.Msg.SetBridgeInfo:output_type -> opinit.opchild.v1.MsgSetBridgeInfoResponse + 5, // 17: opinit.opchild.v1.Msg.FinalizeTokenDeposit:output_type -> opinit.opchild.v1.MsgFinalizeTokenDepositResponse + 7, // 18: opinit.opchild.v1.Msg.InitiateTokenWithdrawal:output_type -> opinit.opchild.v1.MsgInitiateTokenWithdrawalResponse + 9, // 19: opinit.opchild.v1.Msg.AddValidator:output_type -> opinit.opchild.v1.MsgAddValidatorResponse + 11, // 20: opinit.opchild.v1.Msg.RemoveValidator:output_type -> opinit.opchild.v1.MsgRemoveValidatorResponse + 13, // 21: opinit.opchild.v1.Msg.UpdateParams:output_type -> opinit.opchild.v1.MsgUpdateParamsResponse + 15, // 22: opinit.opchild.v1.Msg.SpendFeePool:output_type -> opinit.opchild.v1.MsgSpendFeePoolResponse + 15, // [15:23] is the sub-list for method output_type + 7, // [7:15] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_opinit_opchild_v1_tx_proto_init() } @@ -7696,7 +8651,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFinalizeTokenDeposit); i { + switch v := v.(*MsgSetBridgeInfo); i { case 0: return &v.state case 1: @@ -7708,7 +8663,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgFinalizeTokenDepositResponse); i { + switch v := v.(*MsgSetBridgeInfoResponse); i { case 0: return &v.state case 1: @@ -7720,7 +8675,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitiateTokenWithdrawal); i { + switch v := v.(*MsgFinalizeTokenDeposit); i { case 0: return &v.state case 1: @@ -7732,7 +8687,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitiateTokenWithdrawalResponse); i { + switch v := v.(*MsgFinalizeTokenDepositResponse); i { case 0: return &v.state case 1: @@ -7744,7 +8699,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAddValidator); i { + switch v := v.(*MsgInitiateTokenWithdrawal); i { case 0: return &v.state case 1: @@ -7756,7 +8711,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAddValidatorResponse); i { + switch v := v.(*MsgInitiateTokenWithdrawalResponse); i { case 0: return &v.state case 1: @@ -7768,7 +8723,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRemoveValidator); i { + switch v := v.(*MsgAddValidator); i { case 0: return &v.state case 1: @@ -7780,7 +8735,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRemoveValidatorResponse); i { + switch v := v.(*MsgAddValidatorResponse); i { case 0: return &v.state case 1: @@ -7792,7 +8747,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { + switch v := v.(*MsgRemoveValidator); i { case 0: return &v.state case 1: @@ -7804,7 +8759,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { + switch v := v.(*MsgRemoveValidatorResponse); i { case 0: return &v.state case 1: @@ -7816,7 +8771,7 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSpendFeePool); i { + switch v := v.(*MsgUpdateParams); i { case 0: return &v.state case 1: @@ -7828,6 +8783,30 @@ func file_opinit_opchild_v1_tx_proto_init() { } } file_opinit_opchild_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opinit_opchild_v1_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSpendFeePool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_opinit_opchild_v1_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgSpendFeePoolResponse); i { case 0: return &v.state @@ -7846,7 +8825,7 @@ func file_opinit_opchild_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_opinit_opchild_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/opinit/opchild/v1/tx_grpc.pb.go b/api/opinit/opchild/v1/tx_grpc.pb.go index 71eae54f..2dcef549 100644 --- a/api/opinit/opchild/v1/tx_grpc.pb.go +++ b/api/opinit/opchild/v1/tx_grpc.pb.go @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_ExecuteMessages_FullMethodName = "/opinit.opchild.v1.Msg/ExecuteMessages" + Msg_SetBridgeInfo_FullMethodName = "/opinit.opchild.v1.Msg/SetBridgeInfo" Msg_FinalizeTokenDeposit_FullMethodName = "/opinit.opchild.v1.Msg/FinalizeTokenDeposit" Msg_InitiateTokenWithdrawal_FullMethodName = "/opinit.opchild.v1.Msg/InitiateTokenWithdrawal" Msg_AddValidator_FullMethodName = "/opinit.opchild.v1.Msg/AddValidator" @@ -34,6 +35,8 @@ const ( type MsgClient interface { // ExecuteMessages defines a rpc handler method for MsgExecuteMessages. ExecuteMessages(ctx context.Context, in *MsgExecuteMessages, opts ...grpc.CallOption) (*MsgExecuteMessagesResponse, error) + // SetBridgeInfo defines a rpc handler method for MsgSetBridgeInfo. + SetBridgeInfo(ctx context.Context, in *MsgSetBridgeInfo, opts ...grpc.CallOption) (*MsgSetBridgeInfoResponse, error) // FinalizeTokenDeposit defines a rpc handler method for MsgFinalizeTokenDeposit. FinalizeTokenDeposit(ctx context.Context, in *MsgFinalizeTokenDeposit, opts ...grpc.CallOption) (*MsgFinalizeTokenDepositResponse, error) // InitiateTokenWithdrawal defines a user facing l2 => l1 token transfer interface. @@ -66,6 +69,15 @@ func (c *msgClient) ExecuteMessages(ctx context.Context, in *MsgExecuteMessages, return out, nil } +func (c *msgClient) SetBridgeInfo(ctx context.Context, in *MsgSetBridgeInfo, opts ...grpc.CallOption) (*MsgSetBridgeInfoResponse, error) { + out := new(MsgSetBridgeInfoResponse) + err := c.cc.Invoke(ctx, Msg_SetBridgeInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) FinalizeTokenDeposit(ctx context.Context, in *MsgFinalizeTokenDeposit, opts ...grpc.CallOption) (*MsgFinalizeTokenDepositResponse, error) { out := new(MsgFinalizeTokenDepositResponse) err := c.cc.Invoke(ctx, Msg_FinalizeTokenDeposit_FullMethodName, in, out, opts...) @@ -126,6 +138,8 @@ func (c *msgClient) SpendFeePool(ctx context.Context, in *MsgSpendFeePool, opts type MsgServer interface { // ExecuteMessages defines a rpc handler method for MsgExecuteMessages. ExecuteMessages(context.Context, *MsgExecuteMessages) (*MsgExecuteMessagesResponse, error) + // SetBridgeInfo defines a rpc handler method for MsgSetBridgeInfo. + SetBridgeInfo(context.Context, *MsgSetBridgeInfo) (*MsgSetBridgeInfoResponse, error) // FinalizeTokenDeposit defines a rpc handler method for MsgFinalizeTokenDeposit. FinalizeTokenDeposit(context.Context, *MsgFinalizeTokenDeposit) (*MsgFinalizeTokenDepositResponse, error) // InitiateTokenWithdrawal defines a user facing l2 => l1 token transfer interface. @@ -149,6 +163,9 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) ExecuteMessages(context.Context, *MsgExecuteMessages) (*MsgExecuteMessagesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteMessages not implemented") } +func (UnimplementedMsgServer) SetBridgeInfo(context.Context, *MsgSetBridgeInfo) (*MsgSetBridgeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetBridgeInfo not implemented") +} func (UnimplementedMsgServer) FinalizeTokenDeposit(context.Context, *MsgFinalizeTokenDeposit) (*MsgFinalizeTokenDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FinalizeTokenDeposit not implemented") } @@ -198,6 +215,24 @@ func _Msg_ExecuteMessages_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_SetBridgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetBridgeInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetBridgeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SetBridgeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetBridgeInfo(ctx, req.(*MsgSetBridgeInfo)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_FinalizeTokenDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgFinalizeTokenDeposit) if err := dec(in); err != nil { @@ -317,6 +352,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "ExecuteMessages", Handler: _Msg_ExecuteMessages_Handler, }, + { + MethodName: "SetBridgeInfo", + Handler: _Msg_SetBridgeInfo_Handler, + }, { MethodName: "FinalizeTokenDeposit", Handler: _Msg_FinalizeTokenDeposit_Handler, diff --git a/api/opinit/opchild/v1/types.pulsar.go b/api/opinit/opchild/v1/types.pulsar.go index d77cf483..0823465a 100644 --- a/api/opinit/opchild/v1/types.pulsar.go +++ b/api/opinit/opchild/v1/types.pulsar.go @@ -9,6 +9,7 @@ import ( _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" + v1 "github.com/initia-labs/OPinit/api/opinit/ophost/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -1841,6 +1842,553 @@ func (x *fastReflection_ValidatorUpdates) ProtoMethods() *protoiface.Methods { } } +var ( + md_BridgeInfo protoreflect.MessageDescriptor + fd_BridgeInfo_bridge_id protoreflect.FieldDescriptor + fd_BridgeInfo_bridge_addr protoreflect.FieldDescriptor + fd_BridgeInfo_bridge_config protoreflect.FieldDescriptor +) + +func init() { + file_opinit_opchild_v1_types_proto_init() + md_BridgeInfo = File_opinit_opchild_v1_types_proto.Messages().ByName("BridgeInfo") + fd_BridgeInfo_bridge_id = md_BridgeInfo.Fields().ByName("bridge_id") + fd_BridgeInfo_bridge_addr = md_BridgeInfo.Fields().ByName("bridge_addr") + fd_BridgeInfo_bridge_config = md_BridgeInfo.Fields().ByName("bridge_config") +} + +var _ protoreflect.Message = (*fastReflection_BridgeInfo)(nil) + +type fastReflection_BridgeInfo BridgeInfo + +func (x *BridgeInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_BridgeInfo)(x) +} + +func (x *BridgeInfo) slowProtoReflect() protoreflect.Message { + mi := &file_opinit_opchild_v1_types_proto_msgTypes[3] + 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) +} + +var _fastReflection_BridgeInfo_messageType fastReflection_BridgeInfo_messageType +var _ protoreflect.MessageType = fastReflection_BridgeInfo_messageType{} + +type fastReflection_BridgeInfo_messageType struct{} + +func (x fastReflection_BridgeInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_BridgeInfo)(nil) +} +func (x fastReflection_BridgeInfo_messageType) New() protoreflect.Message { + return new(fastReflection_BridgeInfo) +} +func (x fastReflection_BridgeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BridgeInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_BridgeInfo) Descriptor() protoreflect.MessageDescriptor { + return md_BridgeInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_BridgeInfo) Type() protoreflect.MessageType { + return _fastReflection_BridgeInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_BridgeInfo) New() protoreflect.Message { + return new(fastReflection_BridgeInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_BridgeInfo) Interface() protoreflect.ProtoMessage { + return (*BridgeInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_BridgeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BridgeId != uint64(0) { + value := protoreflect.ValueOfUint64(x.BridgeId) + if !f(fd_BridgeInfo_bridge_id, value) { + return + } + } + if x.BridgeAddr != "" { + value := protoreflect.ValueOfString(x.BridgeAddr) + if !f(fd_BridgeInfo_bridge_addr, value) { + return + } + } + if x.BridgeConfig != nil { + value := protoreflect.ValueOfMessage(x.BridgeConfig.ProtoReflect()) + if !f(fd_BridgeInfo_bridge_config, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_BridgeInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "opinit.opchild.v1.BridgeInfo.bridge_id": + return x.BridgeId != uint64(0) + case "opinit.opchild.v1.BridgeInfo.bridge_addr": + return x.BridgeAddr != "" + case "opinit.opchild.v1.BridgeInfo.bridge_config": + return x.BridgeConfig != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.BridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.BridgeInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_BridgeInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "opinit.opchild.v1.BridgeInfo.bridge_id": + x.BridgeId = uint64(0) + case "opinit.opchild.v1.BridgeInfo.bridge_addr": + x.BridgeAddr = "" + case "opinit.opchild.v1.BridgeInfo.bridge_config": + x.BridgeConfig = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.BridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.BridgeInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_BridgeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "opinit.opchild.v1.BridgeInfo.bridge_id": + value := x.BridgeId + return protoreflect.ValueOfUint64(value) + case "opinit.opchild.v1.BridgeInfo.bridge_addr": + value := x.BridgeAddr + return protoreflect.ValueOfString(value) + case "opinit.opchild.v1.BridgeInfo.bridge_config": + value := x.BridgeConfig + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.BridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.BridgeInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_BridgeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "opinit.opchild.v1.BridgeInfo.bridge_id": + x.BridgeId = value.Uint() + case "opinit.opchild.v1.BridgeInfo.bridge_addr": + x.BridgeAddr = value.Interface().(string) + case "opinit.opchild.v1.BridgeInfo.bridge_config": + x.BridgeConfig = value.Message().Interface().(*v1.BridgeConfig) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.BridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.BridgeInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_BridgeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "opinit.opchild.v1.BridgeInfo.bridge_config": + if x.BridgeConfig == nil { + x.BridgeConfig = new(v1.BridgeConfig) + } + return protoreflect.ValueOfMessage(x.BridgeConfig.ProtoReflect()) + case "opinit.opchild.v1.BridgeInfo.bridge_id": + panic(fmt.Errorf("field bridge_id of message opinit.opchild.v1.BridgeInfo is not mutable")) + case "opinit.opchild.v1.BridgeInfo.bridge_addr": + panic(fmt.Errorf("field bridge_addr of message opinit.opchild.v1.BridgeInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.BridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.BridgeInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_BridgeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "opinit.opchild.v1.BridgeInfo.bridge_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "opinit.opchild.v1.BridgeInfo.bridge_addr": + return protoreflect.ValueOfString("") + case "opinit.opchild.v1.BridgeInfo.bridge_config": + m := new(v1.BridgeConfig) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.BridgeInfo")) + } + panic(fmt.Errorf("message opinit.opchild.v1.BridgeInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_BridgeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in opinit.opchild.v1.BridgeInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_BridgeInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_BridgeInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_BridgeInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_BridgeInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*BridgeInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.BridgeId != 0 { + n += 1 + runtime.Sov(uint64(x.BridgeId)) + } + l = len(x.BridgeAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.BridgeConfig != nil { + l = options.Size(x.BridgeConfig) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*BridgeInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.BridgeConfig != nil { + encoded, err := options.Marshal(x.BridgeConfig) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.BridgeAddr) > 0 { + i -= len(x.BridgeAddr) + copy(dAtA[i:], x.BridgeAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BridgeAddr))) + i-- + dAtA[i] = 0x12 + } + if x.BridgeId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BridgeId)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*BridgeInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BridgeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BridgeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BridgeId", wireType) + } + x.BridgeId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BridgeId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BridgeAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BridgeAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BridgeConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.BridgeConfig == nil { + x.BridgeConfig = &v1.BridgeConfig{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.BridgeConfig); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2036,6 +2584,61 @@ func (x *ValidatorUpdates) GetUpdates() []*abci.ValidatorUpdate { return nil } +// BridgeInfo defines the information of the bridge. +type BridgeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // bridge id is the unique identifier of the bridge which is assigned from l1. + BridgeId uint64 `protobuf:"varint,1,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty"` + // bridge_addr is the address of the bridge on l1. + BridgeAddr string `protobuf:"bytes,2,opt,name=bridge_addr,json=bridgeAddr,proto3" json:"bridge_addr,omitempty"` + // bridge_config is the configuration of the bridge. + BridgeConfig *v1.BridgeConfig `protobuf:"bytes,3,opt,name=bridge_config,json=bridgeConfig,proto3" json:"bridge_config,omitempty"` +} + +func (x *BridgeInfo) Reset() { + *x = BridgeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_opinit_opchild_v1_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BridgeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BridgeInfo) ProtoMessage() {} + +// Deprecated: Use BridgeInfo.ProtoReflect.Descriptor instead. +func (*BridgeInfo) Descriptor() ([]byte, []int) { + return file_opinit_opchild_v1_types_proto_rawDescGZIP(), []int{3} +} + +func (x *BridgeInfo) GetBridgeId() uint64 { + if x != nil { + return x.BridgeId + } + return 0 +} + +func (x *BridgeInfo) GetBridgeAddr() string { + if x != nil { + return x.BridgeAddr + } + return "" +} + +func (x *BridgeInfo) GetBridgeConfig() *v1.BridgeConfig { + if x != nil { + return x.BridgeConfig + } + return nil +} + var File_opinit_opchild_v1_types_proto protoreflect.FileDescriptor var file_opinit_opchild_v1_types_proto_rawDesc = []byte{ @@ -2051,78 +2654,91 @@ var file_opinit_opchild_v1_types_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, - 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, - 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x6d, 0x61, 0x78, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x61, 0x78, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x52, 0x0d, 0x6d, 0x61, - 0x78, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x68, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x1d, 0xf2, 0xde, 0x1f, 0x19, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, - 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x0e, 0x6d, 0x69, - 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x4b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, - 0x6d, 0x69, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0xaa, 0xdf, - 0x1f, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x6d, - 0x69, 0x6e, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x0f, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x37, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x22, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, - 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xf2, 0xde, - 0x1f, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd2, 0xb4, + 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x03, 0x0a, + 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, + 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x61, 0x78, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x1d, 0xf2, 0xde, 0x1f, 0x19, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x22, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, + 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, + 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x4b, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, + 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0xaa, 0xdf, 0x1f, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0c, 0x6d, 0x69, 0x6e, + 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x0f, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x37, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x3a, 0x1b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, - 0x0e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0xbb, 0x02, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, - 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, - 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, - 0x72, 0x22, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x74, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x42, 0x33, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, - 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xf2, - 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, - 0x77, 0x65, 0x72, 0x22, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x3a, - 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x5f, 0x0a, - 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x45, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, - 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x42, 0xd0, - 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x43, 0x0a, 0x05, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0xf2, 0xde, 0x1f, 0x0c, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x3a, 0x1b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x6f, + 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xbb, 0x02, + 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x6d, + 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xf2, 0xde, + 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x22, + 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, + 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x74, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x42, 0x33, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xca, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x5f, + 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xf2, 0xde, 0x1f, + 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x22, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x0c, 0x88, + 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x5f, 0x0a, 0x10, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x45, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, + 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb4, 0x01, 0x0a, + 0x0a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0xd0, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, + 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, + 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2137,24 +2753,27 @@ func file_opinit_opchild_v1_types_proto_rawDescGZIP() []byte { return file_opinit_opchild_v1_types_proto_rawDescData } -var file_opinit_opchild_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_opinit_opchild_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_opinit_opchild_v1_types_proto_goTypes = []interface{}{ (*Params)(nil), // 0: opinit.opchild.v1.Params (*Validator)(nil), // 1: opinit.opchild.v1.Validator (*ValidatorUpdates)(nil), // 2: opinit.opchild.v1.ValidatorUpdates - (*v1beta1.DecCoin)(nil), // 3: cosmos.base.v1beta1.DecCoin - (*anypb.Any)(nil), // 4: google.protobuf.Any - (*abci.ValidatorUpdate)(nil), // 5: tendermint.abci.ValidatorUpdate + (*BridgeInfo)(nil), // 3: opinit.opchild.v1.BridgeInfo + (*v1beta1.DecCoin)(nil), // 4: cosmos.base.v1beta1.DecCoin + (*anypb.Any)(nil), // 5: google.protobuf.Any + (*abci.ValidatorUpdate)(nil), // 6: tendermint.abci.ValidatorUpdate + (*v1.BridgeConfig)(nil), // 7: opinit.ophost.v1.BridgeConfig } var file_opinit_opchild_v1_types_proto_depIdxs = []int32{ - 3, // 0: opinit.opchild.v1.Params.min_gas_prices:type_name -> cosmos.base.v1beta1.DecCoin - 4, // 1: opinit.opchild.v1.Validator.consensus_pubkey:type_name -> google.protobuf.Any - 5, // 2: opinit.opchild.v1.ValidatorUpdates.updates:type_name -> tendermint.abci.ValidatorUpdate - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 0: opinit.opchild.v1.Params.min_gas_prices:type_name -> cosmos.base.v1beta1.DecCoin + 5, // 1: opinit.opchild.v1.Validator.consensus_pubkey:type_name -> google.protobuf.Any + 6, // 2: opinit.opchild.v1.ValidatorUpdates.updates:type_name -> tendermint.abci.ValidatorUpdate + 7, // 3: opinit.opchild.v1.BridgeInfo.bridge_config:type_name -> opinit.ophost.v1.BridgeConfig + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_opinit_opchild_v1_types_proto_init() } @@ -2199,6 +2818,18 @@ func file_opinit_opchild_v1_types_proto_init() { return nil } } + file_opinit_opchild_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BridgeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2206,7 +2837,7 @@ func file_opinit_opchild_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_opinit_opchild_v1_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/opinit/opchild/v1/genesis.proto b/proto/opinit/opchild/v1/genesis.proto index 0279f67d..5c95233b 100644 --- a/proto/opinit/opchild/v1/genesis.proto +++ b/proto/opinit/opchild/v1/genesis.proto @@ -20,9 +20,10 @@ message GenesisState { // delegations defines the validator set at genesis. repeated Validator validators = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - bool exported = 5; - uint64 next_l2_sequence = 6; + bool exported = 5; + uint64 next_l2_sequence = 6; repeated uint64 finalized_l1_sequences = 7; + BridgeInfo bridge_info = 8; } // LastValidatorPower required for validator set update logic. diff --git a/proto/opinit/opchild/v1/query.proto b/proto/opinit/opchild/v1/query.proto index 5f81d624..34597f7a 100644 --- a/proto/opinit/opchild/v1/query.proto +++ b/proto/opinit/opchild/v1/query.proto @@ -28,6 +28,11 @@ service Query { option (google.api.http).get = "/opinit/opchild/v1/validator/{validator_addr}"; } + rpc BridgeInfo(QueryBridgeInfoRequest) returns (QueryBridgeInfoResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/opinit/opchild/v1/bridge_info"; + } + // Parameters queries the rollup parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (cosmos.query.v1.module_query_safe) = true; @@ -62,6 +67,15 @@ message QueryValidatorResponse { Validator validator = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } +// QueryBridgeInfoRequest is request type for the Query/BridgeInfo RPC method. +message QueryBridgeInfoRequest {} + +// QueryBridgeInfoResponse is response type for the Query/BridgeInfo RPC method. +message QueryBridgeInfoResponse { + // bridge_info holds all the information about the bridge. + BridgeInfo bridge_info = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} diff --git a/proto/opinit/opchild/v1/tx.proto b/proto/opinit/opchild/v1/tx.proto index a57a54d7..e3e3a0eb 100644 --- a/proto/opinit/opchild/v1/tx.proto +++ b/proto/opinit/opchild/v1/tx.proto @@ -25,6 +25,9 @@ service Msg { //////////////////////////// // Bridge Executor Messages + // SetBridgeInfo defines a rpc handler method for MsgSetBridgeInfo. + rpc SetBridgeInfo(MsgSetBridgeInfo) returns (MsgSetBridgeInfoResponse); + // FinalizeTokenDeposit defines a rpc handler method for MsgFinalizeTokenDeposit. rpc FinalizeTokenDeposit(MsgFinalizeTokenDeposit) returns (MsgFinalizeTokenDepositResponse); @@ -73,6 +76,21 @@ message MsgExecuteMessagesResponse {} ///////////////////////////// // Bridge Executor messages +// MsgSetBridgeInfo is a message to set the registered bridge information. +message MsgSetBridgeInfo { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "opchild/MsgSetBridgeInfo"; + + // the sender address + string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\"", (cosmos_proto.scalar) = "cosmos.AddressString"]; + + // bridge_info is the bridge information to be set. + BridgeInfo bridge_info = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +// MsgSetBridgeInfoResponse returns set bridge info result data +message MsgSetBridgeInfoResponse {} + // MsgFinalizeTokenDeposit is a message to submit deposit funds from upper layer message MsgFinalizeTokenDeposit { option (cosmos.msg.v1.signer) = "sender"; diff --git a/proto/opinit/opchild/v1/types.proto b/proto/opinit/opchild/v1/types.proto index fcf21f8a..9b46263d 100644 --- a/proto/opinit/opchild/v1/types.proto +++ b/proto/opinit/opchild/v1/types.proto @@ -7,6 +7,7 @@ import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "tendermint/abci/types.proto"; +import "opinit/ophost/v1/types.proto"; option go_package = "github.com/initia-labs/OPinit/x/opchild/types"; option (gogoproto.equal_all) = true; @@ -74,3 +75,15 @@ message ValidatorUpdates { repeated tendermint.abci.ValidatorUpdate updates = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } + +// BridgeInfo defines the information of the bridge. +message BridgeInfo { + // bridge id is the unique identifier of the bridge which is assigned from l1. + uint64 bridge_id = 1; + + // bridge_addr is the address of the bridge on l1. + string bridge_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // bridge_config is the configuration of the bridge. + opinit.ophost.v1.BridgeConfig bridge_config = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} diff --git a/proto/opinit/ophost/v1/query.proto b/proto/opinit/ophost/v1/query.proto index 57181111..32c62ddc 100644 --- a/proto/opinit/ophost/v1/query.proto +++ b/proto/opinit/ophost/v1/query.proto @@ -142,7 +142,7 @@ message QueryLastFinalizedOutputRequest { } message QueryLastFinalizedOutputResponse { - uint64 output_index = 1; + uint64 output_index = 1; Output output_proposal = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/x/opchild/keeper/genesis.go b/x/opchild/keeper/genesis.go index 159e6d94..4533b805 100644 --- a/x/opchild/keeper/genesis.go +++ b/x/opchild/keeper/genesis.go @@ -81,6 +81,16 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) (res panic(err) } + if data.BridgeInfo != nil { + if err := data.BridgeInfo.Validate(k.addressCodec); err != nil { + panic(err) + } + + if err := k.BridgeInfo.Set(ctx, *data.BridgeInfo); err != nil { + panic(err) + } + } + return res } @@ -121,6 +131,18 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { panic(err) } + var bridgeInfo *types.BridgeInfo + if ok, err := k.BridgeInfo.Has(ctx); err != nil { + panic(err) + } else if ok { + bridgeInfo_, err := k.BridgeInfo.Get(ctx) + if err != nil { + panic(err) + } + + bridgeInfo = &bridgeInfo_ + } + return &types.GenesisState{ Params: params, LastValidatorPowers: lastValidatorPowers, @@ -128,5 +150,6 @@ func (k Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { Exported: true, FinalizedL1Sequences: finalizedL1Sequences, NextL2Sequence: nextL2Sequence, + BridgeInfo: bridgeInfo, } } diff --git a/x/opchild/keeper/genesis_test.go b/x/opchild/keeper/genesis_test.go index 75764516..7e24f757 100644 --- a/x/opchild/keeper/genesis_test.go +++ b/x/opchild/keeper/genesis_test.go @@ -3,10 +3,13 @@ package keeper_test // TODO - implement test import ( - "fmt" "testing" + "time" "github.com/stretchr/testify/require" + + "github.com/initia-labs/OPinit/x/opchild/types" + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" ) func Test_GenesisImportExport(t *testing.T) { @@ -24,8 +27,27 @@ func Test_GenesisImportExport(t *testing.T) { input.OPChildKeeper.RecordFinalizedL1Sequence(ctx, 2) genState := input.OPChildKeeper.ExportGenesis(ctx) + require.Nil(t, genState.BridgeInfo) + + // set bridge info + genState.BridgeInfo = &types.BridgeInfo{ + BridgeId: 1, + BridgeAddr: addrsStr[1], + BridgeConfig: ophosttypes.BridgeConfig{ + Challenger: addrsStr[2], + Proposer: addrsStr[3], + BatchInfo: ophosttypes.BatchInfo{ + Submitter: addrsStr[4], + Chain: "l1", + }, + SubmissionInterval: time.Minute, + FinalizationPeriod: time.Hour, + SubmissionStartTime: time.Now().UTC(), + Metadata: []byte("metadata"), + }, + } + input.OPChildKeeper.InitGenesis(ctx, genState) - _genState := input.OPChildKeeper.ExportGenesis(ctx) - require.Equal(t, genState, _genState) - fmt.Printf("genState: %v\n", genState) + genState_ := input.OPChildKeeper.ExportGenesis(ctx) + require.Equal(t, genState, genState_) } diff --git a/x/opchild/keeper/keeper.go b/x/opchild/keeper/keeper.go index 4cdef025..50d798fb 100644 --- a/x/opchild/keeper/keeper.go +++ b/x/opchild/keeper/keeper.go @@ -42,6 +42,7 @@ type Keeper struct { Schema collections.Schema NextL2Sequence collections.Sequence Params collections.Item[types.Params] + BridgeInfo collections.Item[types.BridgeInfo] FinalizedL1Sequence collections.Map[uint64, bool] LastValidatorPowers collections.Map[[]byte, int64] Validators collections.Map[[]byte, types.Validator] @@ -88,6 +89,7 @@ func NewKeeper( consensusAddressCodec: consensusAddressCodec, NextL2Sequence: collections.NewSequence(sb, types.NextL2SequenceKey, "next_l2_sequence"), Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), + BridgeInfo: collections.NewItem(sb, types.BridgeInfoKey, "bridge_info", codec.CollValue[types.BridgeInfo](cdc)), FinalizedL1Sequence: collections.NewMap(sb, types.FinalizedL1SequencePrefix, "finalized_l1_sequence", collections.Uint64Key, collections.BoolValue), LastValidatorPowers: collections.NewMap(sb, types.LastValidatorPowerPrefix, "last_validator_powers", collections.BytesKey, collections.Int64Value), Validators: collections.NewMap(sb, types.ValidatorsPrefix, "validators", collections.BytesKey, codec.CollValue[types.Validator](cdc)), diff --git a/x/opchild/keeper/msg_server.go b/x/opchild/keeper/msg_server.go index 1adc8ec1..ae843511 100644 --- a/x/opchild/keeper/msg_server.go +++ b/x/opchild/keeper/msg_server.go @@ -241,6 +241,11 @@ func (ms MsgServer) RemoveValidator(ctx context.Context, req *types.MsgRemoveVal // UpdateParams implements updating the parameters func (ms MsgServer) UpdateParams(ctx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + // sort the min gas prices + if req.Params != nil && req.Params.MinGasPrices != nil { + req.Params.MinGasPrices = req.Params.MinGasPrices.Sort() + } + if err := req.Validate(ms.authKeeper.AddressCodec()); err != nil { return nil, err } @@ -282,6 +287,32 @@ func (ms MsgServer) SpendFeePool(ctx context.Context, req *types.MsgSpendFeePool ///////////////////////////////////////////////////// // The messages for Bridge Executor +func (ms MsgServer) SetBridgeInfo(ctx context.Context, req *types.MsgSetBridgeInfo) (*types.MsgSetBridgeInfoResponse, error) { + if err := req.Validate(ms.authKeeper.AddressCodec()); err != nil { + return nil, err + } + + // permission check + if err := ms.checkBridgeExecutorPermission(ctx, req.Sender); err != nil { + return nil, err + } + + if err := ms.BridgeInfo.Set(ctx, req.BridgeInfo); err != nil { + return nil, err + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeSetBridgeInfo, + sdk.NewAttribute(types.AttributeKeyBridgeId, strconv.FormatUint(req.BridgeInfo.BridgeId, 10)), + sdk.NewAttribute(types.AttributeKeyBridgeAddr, req.BridgeInfo.BridgeAddr), + ), + ) + + return &types.MsgSetBridgeInfoResponse{}, nil +} + // FinalizeTokenDeposit implements send a deposit from the upper layer to the recipient func (ms MsgServer) FinalizeTokenDeposit(ctx context.Context, req *types.MsgFinalizeTokenDeposit) (*types.MsgFinalizeTokenDepositResponse, error) { if err := req.Validate(ms.authKeeper.AddressCodec()); err != nil { diff --git a/x/opchild/keeper/msg_server_test.go b/x/opchild/keeper/msg_server_test.go index e8dc9511..3609e2c3 100644 --- a/x/opchild/keeper/msg_server_test.go +++ b/x/opchild/keeper/msg_server_test.go @@ -5,6 +5,7 @@ import ( "encoding/json" "errors" "testing" + "time" "cosmossdk.io/math" "github.com/stretchr/testify/require" @@ -16,6 +17,7 @@ import ( "github.com/initia-labs/OPinit/x/opchild/keeper" "github.com/initia-labs/OPinit/x/opchild/types" + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" ) ///////////////////////////////////////// @@ -258,6 +260,37 @@ func Test_MsgServer_Withdraw(t *testing.T) { ///////////////////////////////////////// // The messages for Bridge Executor +func Test_MsgServer_SetBridgeInfo(t *testing.T) { + ctx, input := createDefaultTestInput(t) + ms := keeper.NewMsgServerImpl(input.OPChildKeeper) + + info := types.BridgeInfo{ + BridgeId: 1, + BridgeAddr: addrsStr[1], + BridgeConfig: ophosttypes.BridgeConfig{ + Challenger: addrsStr[2], + Proposer: addrsStr[3], + BatchInfo: ophosttypes.BatchInfo{ + Submitter: addrsStr[4], + Chain: "l1", + }, + SubmissionInterval: time.Minute, + FinalizationPeriod: time.Hour, + SubmissionStartTime: time.Now().UTC(), + Metadata: []byte("metadata"), + }, + } + + _, err := ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) + require.NoError(t, err) + + // invalid bridge id + info.BridgeId = 0 + + _, err = ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) + require.Error(t, err) +} + func Test_MsgServer_Deposit_NoHook(t *testing.T) { ctx, input := createDefaultTestInput(t) ms := keeper.NewMsgServerImpl(input.OPChildKeeper) diff --git a/x/opchild/keeper/querier.go b/x/opchild/keeper/querier.go index 514909a1..f585719d 100644 --- a/x/opchild/keeper/querier.go +++ b/x/opchild/keeper/querier.go @@ -3,7 +3,6 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -59,8 +58,16 @@ func (q Querier) Validators(ctx context.Context, req *types.QueryValidatorsReque return &types.QueryValidatorsResponse{Validators: validators, Pagination: pageRes}, nil } -func (q Querier) Params(context context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(context) +func (q Querier) BridgeInfo(ctx context.Context, req *types.QueryBridgeInfoRequest) (*types.QueryBridgeInfoResponse, error) { + bridgeInfo, err := q.Keeper.BridgeInfo.Get(ctx) + if err != nil { + return nil, status.Error(codes.NotFound, "bridge info not found") + } + + return &types.QueryBridgeInfoResponse{BridgeInfo: bridgeInfo}, nil +} + +func (q Querier) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { params, err := q.GetParams(ctx) if err != nil { return nil, err diff --git a/x/opchild/keeper/querier_test.go b/x/opchild/keeper/querier_test.go index 0e387788..2b071be9 100644 --- a/x/opchild/keeper/querier_test.go +++ b/x/opchild/keeper/querier_test.go @@ -2,13 +2,16 @@ package keeper_test import ( "testing" + "time" "github.com/stretchr/testify/require" testutilsims "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/initia-labs/OPinit/x/opchild/keeper" "github.com/initia-labs/OPinit/x/opchild/types" + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" ) func Test_QueryValidator(t *testing.T) { @@ -44,6 +47,34 @@ func Test_QueryValidators(t *testing.T) { require.Len(t, res.Validators, 2) } +func Test_QuerySetBridgeInfo(t *testing.T) { + ctx, input := createDefaultTestInput(t) + + info := types.BridgeInfo{ + BridgeId: 1, + BridgeAddr: addrsStr[1], + BridgeConfig: ophosttypes.BridgeConfig{ + Challenger: addrsStr[2], + Proposer: addrsStr[3], + BatchInfo: ophosttypes.BatchInfo{ + Submitter: addrsStr[4], + Chain: "l1", + }, + SubmissionInterval: time.Minute, + FinalizationPeriod: time.Hour, + SubmissionStartTime: time.Now().UTC(), + Metadata: []byte("metadata"), + }, + } + err := input.OPChildKeeper.BridgeInfo.Set(ctx, info) + require.NoError(t, err) + + q := keeper.NewQuerier(input.OPChildKeeper) + res, err := q.BridgeInfo(ctx, &types.QueryBridgeInfoRequest{}) + require.NoError(t, err) + require.Equal(t, info, res.BridgeInfo) +} + func Test_QueryParams(t *testing.T) { ctx, input := createDefaultTestInput(t) diff --git a/x/opchild/types/errors.go b/x/opchild/types/errors.go index 78405999..10c7b3cc 100644 --- a/x/opchild/types/errors.go +++ b/x/opchild/types/errors.go @@ -21,4 +21,5 @@ var ( ErrUnroutableExecuteMsg = errorsmod.Register(ModuleName, 14, "unroutable execute message") ErrInvalidExecutorChangePlan = errorsmod.Register(ModuleName, 15, "invalid executor chane plan") ErrAlreadyRegisteredHeight = errorsmod.Register(ModuleName, 16, "executor change plan already exists at the height") + ErrInvalidBridgeInfo = errorsmod.Register(ModuleName, 17, "invalid bridge info") ) diff --git a/x/opchild/types/events.go b/x/opchild/types/events.go index 9666434b..7396326b 100644 --- a/x/opchild/types/events.go +++ b/x/opchild/types/events.go @@ -9,8 +9,11 @@ const ( EventTypeExecuteMessages = "execute_messages" EventTypeWhitelist = "whitelist" EventTypeParams = "params" + EventTypeSetBridgeInfo = "set_bridge_info" AttributeKeySender = "sender" + AttributeKeyBridgeId = "bridge_id" + AttributeKeyBridgeAddr = "bridge_addr" AttributeKeyRecipient = "recipient" AttributeKeyAmount = "amount" AttributeKeyDenom = "denom" diff --git a/x/opchild/types/genesis.go b/x/opchild/types/genesis.go index e60192fa..4576cf48 100644 --- a/x/opchild/types/genesis.go +++ b/x/opchild/types/genesis.go @@ -12,12 +12,13 @@ import ( const DefaultL2SequenceStart = 1 // NewGenesisState creates a new GenesisState instance -func NewGenesisState(params Params, validators []Validator) *GenesisState { +func NewGenesisState(params Params, validators []Validator, bridgeInfo *BridgeInfo) *GenesisState { return &GenesisState{ Params: params, LastValidatorPowers: []LastValidatorPower{}, Validators: validators, Exported: false, + BridgeInfo: bridgeInfo, } } @@ -30,6 +31,7 @@ func DefaultGenesisState() *GenesisState { Exported: false, NextL2Sequence: DefaultL2SequenceStart, FinalizedL1Sequences: []uint64{}, + BridgeInfo: nil, } } @@ -44,6 +46,12 @@ func ValidateGenesis(data *GenesisState, ac address.Codec) error { return ErrInvalidSequence } + if data.BridgeInfo != nil { + if err := data.BridgeInfo.Validate(ac); err != nil { + return err + } + } + return data.Params.Validate(ac) } diff --git a/x/opchild/types/genesis.pb.go b/x/opchild/types/genesis.pb.go index ec0b4707..a0014647 100644 --- a/x/opchild/types/genesis.pb.go +++ b/x/opchild/types/genesis.pb.go @@ -37,6 +37,7 @@ type GenesisState struct { Exported bool `protobuf:"varint,5,opt,name=exported,proto3" json:"exported,omitempty"` NextL2Sequence uint64 `protobuf:"varint,6,opt,name=next_l2_sequence,json=nextL2Sequence,proto3" json:"next_l2_sequence,omitempty"` FinalizedL1Sequences []uint64 `protobuf:"varint,7,rep,packed,name=finalized_l1_sequences,json=finalizedL1Sequences,proto3" json:"finalized_l1_sequences,omitempty"` + BridgeInfo *BridgeInfo `protobuf:"bytes,8,opt,name=bridge_info,json=bridgeInfo,proto3" json:"bridge_info,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -114,6 +115,13 @@ func (m *GenesisState) GetFinalizedL1Sequences() []uint64 { return nil } +func (m *GenesisState) GetBridgeInfo() *BridgeInfo { + if m != nil { + return m.BridgeInfo + } + return nil +} + // LastValidatorPower required for validator set update logic. type LastValidatorPower struct { // address is the address of the validator. @@ -163,36 +171,38 @@ func init() { func init() { proto.RegisterFile("opinit/opchild/v1/genesis.proto", fileDescriptor_08c29689c0e7bd55) } var fileDescriptor_08c29689c0e7bd55 = []byte{ - // 455 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xb1, 0x8e, 0xd3, 0x30, - 0x18, 0xc7, 0xe3, 0xf6, 0xae, 0xd7, 0xf3, 0x21, 0xc4, 0x99, 0x82, 0x7c, 0x15, 0xa4, 0xd1, 0x49, - 0x48, 0x11, 0x52, 0x13, 0x35, 0x30, 0x21, 0x16, 0xba, 0x74, 0xa9, 0x44, 0x95, 0x4a, 0x0c, 0x2c, - 0x91, 0xdb, 0x98, 0xd4, 0x92, 0x1b, 0x87, 0xd8, 0x57, 0x0a, 0x4f, 0xc0, 0xc8, 0x23, 0xdc, 0xc8, - 0xc8, 0xc0, 0x43, 0xdc, 0x78, 0x62, 0x62, 0x42, 0xa8, 0x1d, 0xe0, 0x0d, 0x58, 0x51, 0xec, 0x34, - 0xaa, 0x94, 0x2e, 0x51, 0xbe, 0xef, 0xfb, 0xfd, 0xff, 0x76, 0xbe, 0xfc, 0x61, 0x4f, 0x64, 0x2c, - 0x65, 0xca, 0x17, 0xd9, 0x7c, 0xc1, 0x78, 0xec, 0xaf, 0x06, 0x7e, 0x42, 0x53, 0x2a, 0x99, 0xf4, - 0xb2, 0x5c, 0x28, 0x81, 0xce, 0x0d, 0xe0, 0x95, 0x80, 0xb7, 0x1a, 0x74, 0xcf, 0xc9, 0x92, 0xa5, - 0xc2, 0xd7, 0x4f, 0x43, 0x75, 0x2f, 0xe6, 0x42, 0x2e, 0x85, 0x8c, 0x74, 0xe5, 0x9b, 0xa2, 0x1c, - 0x75, 0x12, 0x91, 0x08, 0xd3, 0x2f, 0xde, 0xca, 0xee, 0xe3, 0xfa, 0xb9, 0xea, 0x63, 0x46, 0x4b, - 0xd1, 0xe5, 0xbf, 0x06, 0xbc, 0x33, 0x32, 0xf7, 0x98, 0x2a, 0xa2, 0x28, 0x7a, 0x09, 0x5b, 0x19, - 0xc9, 0xc9, 0x52, 0x62, 0xe0, 0x00, 0xf7, 0x2c, 0xb8, 0xf0, 0x6a, 0xf7, 0xf2, 0x26, 0x1a, 0x18, - 0x9e, 0xde, 0xfc, 0xea, 0x59, 0x5f, 0xff, 0x7c, 0x7b, 0x0a, 0xc2, 0x52, 0x83, 0x62, 0xf8, 0x80, - 0x13, 0xa9, 0xa2, 0x15, 0xe1, 0x2c, 0x26, 0x4a, 0xe4, 0x51, 0x26, 0x3e, 0xd0, 0x5c, 0xe2, 0x86, - 0xd3, 0x74, 0xcf, 0x82, 0x27, 0x07, 0xcc, 0xc6, 0x44, 0xaa, 0x37, 0x3b, 0x7c, 0x52, 0xd0, 0xfb, - 0xc6, 0xf7, 0x79, 0x6d, 0x2c, 0xd1, 0x08, 0xc2, 0xea, 0x00, 0x89, 0x9b, 0xda, 0xfa, 0xd1, 0x01, - 0xeb, 0x4a, 0xb7, 0xef, 0xb8, 0x27, 0x45, 0x5d, 0xd8, 0xa6, 0xeb, 0x4c, 0xe4, 0x8a, 0xc6, 0xf8, - 0xd8, 0x01, 0x6e, 0x3b, 0xac, 0x6a, 0xe4, 0xc2, 0x7b, 0x29, 0x5d, 0xab, 0x88, 0x07, 0x91, 0xa4, - 0xef, 0xaf, 0x68, 0x3a, 0xa7, 0xb8, 0xe5, 0x00, 0xf7, 0x28, 0xbc, 0x5b, 0xf4, 0xc7, 0xc1, 0xb4, - 0xec, 0xa2, 0xe7, 0xf0, 0xe1, 0x3b, 0x96, 0x12, 0xce, 0x3e, 0xd1, 0x38, 0xe2, 0x83, 0x0a, 0x97, - 0xf8, 0xc4, 0x69, 0xba, 0x47, 0x61, 0xa7, 0x9a, 0x8e, 0x07, 0x3b, 0x91, 0xbc, 0x5c, 0x40, 0x54, - 0xff, 0x74, 0x14, 0xc0, 0x13, 0x12, 0xc7, 0x39, 0x95, 0x66, 0xff, 0xa7, 0x43, 0xfc, 0xe3, 0x7b, - 0xbf, 0x53, 0xfe, 0xe7, 0x57, 0x66, 0x32, 0x55, 0x39, 0x4b, 0x93, 0x70, 0x07, 0xa2, 0x0e, 0x3c, - 0xd6, 0x5b, 0xc6, 0x0d, 0x07, 0xb8, 0xcd, 0xd0, 0x14, 0x2f, 0xda, 0x9f, 0xaf, 0x7b, 0xd6, 0xdf, - 0xeb, 0x9e, 0x35, 0x1c, 0xdd, 0x6c, 0x6c, 0x70, 0xbb, 0xb1, 0xc1, 0xef, 0x8d, 0x0d, 0xbe, 0x6c, - 0x6d, 0xeb, 0x76, 0x6b, 0x5b, 0x3f, 0xb7, 0xb6, 0xf5, 0xb6, 0x9f, 0x30, 0xb5, 0xb8, 0x9a, 0x79, - 0x73, 0xb1, 0xf4, 0x8b, 0xe5, 0x31, 0xd2, 0xe7, 0x64, 0x26, 0xfd, 0xd7, 0x13, 0x9d, 0x99, 0x75, - 0x95, 0x1a, 0x1d, 0x99, 0x59, 0x4b, 0x67, 0xe6, 0xd9, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, - 0xd0, 0x12, 0x48, 0xcc, 0x02, 0x00, 0x00, + // 483 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x8a, 0xd3, 0x40, + 0x18, 0xc7, 0x33, 0x9b, 0xdd, 0x6e, 0x77, 0x2a, 0xe2, 0x8e, 0x55, 0x66, 0x8b, 0x9b, 0x86, 0x05, + 0x21, 0x08, 0x4d, 0x68, 0xf4, 0x24, 0x22, 0xd8, 0x4b, 0x11, 0x0a, 0x96, 0x14, 0x3c, 0x78, 0x09, + 0x93, 0x66, 0x9a, 0x0e, 0xa4, 0x33, 0x31, 0x33, 0x5b, 0xab, 0x4f, 0xe0, 0xd1, 0x47, 0xd8, 0xa3, + 0x47, 0x0f, 0x82, 0xaf, 0xb0, 0xc7, 0xe2, 0xc9, 0x93, 0x48, 0x7b, 0xd0, 0xc7, 0x90, 0x4e, 0xd2, + 0x50, 0x68, 0x2f, 0x61, 0xbe, 0xef, 0xfb, 0xfd, 0xff, 0x33, 0x99, 0xf9, 0xc3, 0xb6, 0xc8, 0x18, + 0x67, 0xca, 0x13, 0xd9, 0x78, 0xca, 0xd2, 0xd8, 0x9b, 0x77, 0xbd, 0x84, 0x72, 0x2a, 0x99, 0x74, + 0xb3, 0x5c, 0x28, 0x81, 0xce, 0x0b, 0xc0, 0x2d, 0x01, 0x77, 0xde, 0x6d, 0x9d, 0x93, 0x19, 0xe3, + 0xc2, 0xd3, 0xdf, 0x82, 0x6a, 0x5d, 0x8c, 0x85, 0x9c, 0x09, 0x19, 0xea, 0xca, 0x2b, 0x8a, 0x72, + 0xd4, 0x4c, 0x44, 0x22, 0x8a, 0xfe, 0x66, 0x55, 0x76, 0x2f, 0xf7, 0xf7, 0x55, 0x1f, 0x33, 0x5a, + 0x8a, 0xae, 0x7e, 0x98, 0xf0, 0x4e, 0xbf, 0x38, 0xc7, 0x48, 0x11, 0x45, 0xd1, 0x0b, 0x58, 0xcb, + 0x48, 0x4e, 0x66, 0x12, 0x03, 0x1b, 0x38, 0x0d, 0xff, 0xc2, 0xdd, 0x3b, 0x97, 0x3b, 0xd4, 0x40, + 0xef, 0xec, 0xf6, 0x77, 0xdb, 0xf8, 0xfa, 0xf7, 0xdb, 0x13, 0x10, 0x94, 0x1a, 0x14, 0xc3, 0x07, + 0x29, 0x91, 0x2a, 0x9c, 0x93, 0x94, 0xc5, 0x44, 0x89, 0x3c, 0xcc, 0xc4, 0x07, 0x9a, 0x4b, 0x7c, + 0x64, 0x9b, 0x4e, 0xc3, 0x7f, 0x7c, 0xc0, 0x6c, 0x40, 0xa4, 0x7a, 0xbb, 0xc5, 0x87, 0x1b, 0x7a, + 0xd7, 0xf8, 0x7e, 0xba, 0x37, 0x96, 0xa8, 0x0f, 0x61, 0xb5, 0x81, 0xc4, 0xa6, 0xb6, 0x7e, 0x74, + 0xc0, 0xba, 0xd2, 0xed, 0x3a, 0xee, 0x48, 0x51, 0x0b, 0xd6, 0xe9, 0x22, 0x13, 0xb9, 0xa2, 0x31, + 0x3e, 0xb1, 0x81, 0x53, 0x0f, 0xaa, 0x1a, 0x39, 0xf0, 0x1e, 0xa7, 0x0b, 0x15, 0xa6, 0x7e, 0x28, + 0xe9, 0xfb, 0x6b, 0xca, 0xc7, 0x14, 0xd7, 0x6c, 0xe0, 0x1c, 0x07, 0x77, 0x37, 0xfd, 0x81, 0x3f, + 0x2a, 0xbb, 0xe8, 0x19, 0x7c, 0x38, 0x61, 0x9c, 0xa4, 0xec, 0x13, 0x8d, 0xc3, 0xb4, 0x5b, 0xe1, + 0x12, 0x9f, 0xda, 0xa6, 0x73, 0x1c, 0x34, 0xab, 0xe9, 0xa0, 0xbb, 0x15, 0x49, 0xf4, 0x12, 0x36, + 0xa2, 0x9c, 0xc5, 0x09, 0x0d, 0x19, 0x9f, 0x08, 0x5c, 0xd7, 0xb7, 0x7d, 0x79, 0xe0, 0x2f, 0x7a, + 0x9a, 0x7a, 0xcd, 0x27, 0x22, 0x80, 0x51, 0xb5, 0xbe, 0x9a, 0x42, 0xb4, 0x7f, 0x75, 0xc8, 0x87, + 0xa7, 0x24, 0x8e, 0x73, 0x2a, 0x8b, 0xf7, 0x3b, 0xeb, 0xe1, 0x9f, 0xdf, 0x3b, 0xcd, 0x32, 0x27, + 0xaf, 0x8a, 0xc9, 0x48, 0xe5, 0x8c, 0x27, 0xc1, 0x16, 0x44, 0x4d, 0x78, 0xa2, 0x5f, 0x09, 0x1f, + 0xd9, 0xc0, 0x31, 0x83, 0xa2, 0x78, 0x5e, 0xff, 0x7c, 0xd3, 0x36, 0xfe, 0xdd, 0xb4, 0x8d, 0x5e, + 0xff, 0x76, 0x65, 0x81, 0xe5, 0xca, 0x02, 0x7f, 0x56, 0x16, 0xf8, 0xb2, 0xb6, 0x8c, 0xe5, 0xda, + 0x32, 0x7e, 0xad, 0x2d, 0xe3, 0x5d, 0x27, 0x61, 0x6a, 0x7a, 0x1d, 0xb9, 0x63, 0x31, 0xf3, 0x36, + 0xc7, 0x66, 0xa4, 0x93, 0x92, 0x48, 0x7a, 0x6f, 0x86, 0x3a, 0x73, 0x8b, 0x2a, 0x75, 0x3a, 0x72, + 0x51, 0x4d, 0x67, 0xee, 0xe9, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x0d, 0xf0, 0x1f, 0x0c, + 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -215,21 +225,33 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.BridgeInfo != nil { + { + size, err := m.BridgeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } if len(m.FinalizedL1Sequences) > 0 { - dAtA2 := make([]byte, len(m.FinalizedL1Sequences)*10) - var j1 int + dAtA3 := make([]byte, len(m.FinalizedL1Sequences)*10) + var j2 int for _, num := range m.FinalizedL1Sequences { for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j1++ + j2++ } - dAtA2[j1] = uint8(num) - j1++ + dAtA3[j2] = uint8(num) + j2++ } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintGenesis(dAtA, i, uint64(j1)) + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintGenesis(dAtA, i, uint64(j2)) i-- dAtA[i] = 0x3a } @@ -368,6 +390,10 @@ func (m *GenesisState) Size() (n int) { } n += 1 + sovGenesis(uint64(l)) + l } + if m.BridgeInfo != nil { + l = m.BridgeInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -638,6 +664,42 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } else { return fmt.Errorf("proto: wrong wireType = %d for field FinalizedL1Sequences", wireType) } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BridgeInfo == nil { + m.BridgeInfo = &BridgeInfo{} + } + if err := m.BridgeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/opchild/types/keys.go b/x/opchild/types/keys.go index aedc5257..7eeab879 100644 --- a/x/opchild/types/keys.go +++ b/x/opchild/types/keys.go @@ -16,6 +16,7 @@ var ( // Keys for store prefixes ParamsKey = []byte{0x11} // prefix for parameters for module x/opchild NextL2SequenceKey = []byte{0x12} // key for the outbound sequence number + BridgeInfoKey = []byte{0x13} // prefix for bridge_info LastValidatorPowerPrefix = []byte{0x21} // prefix for each key to a validator index, for bonded validators ValidatorsPrefix = []byte{0x31} // prefix for each key to a validator diff --git a/x/opchild/types/query.pb.go b/x/opchild/types/query.pb.go index f20d5316..c4cbe831 100644 --- a/x/opchild/types/query.pb.go +++ b/x/opchild/types/query.pb.go @@ -225,6 +225,89 @@ func (m *QueryValidatorResponse) GetValidator() Validator { return Validator{} } +// QueryBridgeInfoRequest is request type for the Query/BridgeInfo RPC method. +type QueryBridgeInfoRequest struct { +} + +func (m *QueryBridgeInfoRequest) Reset() { *m = QueryBridgeInfoRequest{} } +func (m *QueryBridgeInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBridgeInfoRequest) ProtoMessage() {} +func (*QueryBridgeInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_15cfbb5d02a763ec, []int{4} +} +func (m *QueryBridgeInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBridgeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBridgeInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBridgeInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBridgeInfoRequest.Merge(m, src) +} +func (m *QueryBridgeInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryBridgeInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBridgeInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBridgeInfoRequest proto.InternalMessageInfo + +// QueryBridgeInfoResponse is response type for the Query/BridgeInfo RPC method. +type QueryBridgeInfoResponse struct { + // bridge_info holds all the information about the bridge. + BridgeInfo BridgeInfo `protobuf:"bytes,1,opt,name=bridge_info,json=bridgeInfo,proto3" json:"bridge_info"` +} + +func (m *QueryBridgeInfoResponse) Reset() { *m = QueryBridgeInfoResponse{} } +func (m *QueryBridgeInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBridgeInfoResponse) ProtoMessage() {} +func (*QueryBridgeInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_15cfbb5d02a763ec, []int{5} +} +func (m *QueryBridgeInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBridgeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBridgeInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryBridgeInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBridgeInfoResponse.Merge(m, src) +} +func (m *QueryBridgeInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBridgeInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBridgeInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBridgeInfoResponse proto.InternalMessageInfo + +func (m *QueryBridgeInfoResponse) GetBridgeInfo() BridgeInfo { + if m != nil { + return m.BridgeInfo + } + return BridgeInfo{} +} + // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -233,7 +316,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_15cfbb5d02a763ec, []int{4} + return fileDescriptor_15cfbb5d02a763ec, []int{6} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +355,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_15cfbb5d02a763ec, []int{5} + return fileDescriptor_15cfbb5d02a763ec, []int{7} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -313,6 +396,8 @@ func init() { proto.RegisterType((*QueryValidatorsResponse)(nil), "opinit.opchild.v1.QueryValidatorsResponse") proto.RegisterType((*QueryValidatorRequest)(nil), "opinit.opchild.v1.QueryValidatorRequest") proto.RegisterType((*QueryValidatorResponse)(nil), "opinit.opchild.v1.QueryValidatorResponse") + proto.RegisterType((*QueryBridgeInfoRequest)(nil), "opinit.opchild.v1.QueryBridgeInfoRequest") + proto.RegisterType((*QueryBridgeInfoResponse)(nil), "opinit.opchild.v1.QueryBridgeInfoResponse") proto.RegisterType((*QueryParamsRequest)(nil), "opinit.opchild.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "opinit.opchild.v1.QueryParamsResponse") } @@ -320,43 +405,47 @@ func init() { func init() { proto.RegisterFile("opinit/opchild/v1/query.proto", fileDescriptor_15cfbb5d02a763ec) } var fileDescriptor_15cfbb5d02a763ec = []byte{ - // 568 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x41, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0x33, 0x2d, 0x16, 0x32, 0x45, 0xa1, 0x63, 0xd4, 0x24, 0x6d, 0xb7, 0x65, 0xc1, 0x98, - 0x06, 0xb2, 0x43, 0xe2, 0x4d, 0x04, 0x31, 0xa0, 0x3d, 0x1a, 0x53, 0x10, 0xf1, 0x12, 0x27, 0xd9, - 0x61, 0x3b, 0x90, 0xec, 0x6c, 0x77, 0x26, 0xc1, 0x22, 0x22, 0x78, 0xf2, 0xa6, 0xe0, 0xd5, 0x0f, - 0x20, 0x78, 0xf1, 0xe0, 0xc5, 0x6f, 0xd0, 0x63, 0xd1, 0x8b, 0x27, 0x91, 0x44, 0xf0, 0x6b, 0xc8, - 0xce, 0x4c, 0x36, 0xbb, 0x66, 0x35, 0xb9, 0x84, 0xec, 0x7b, 0xff, 0xff, 0xfb, 0xff, 0xf6, 0xcd, - 0xb0, 0x70, 0x97, 0x07, 0xcc, 0x67, 0x12, 0xf3, 0xa0, 0x7f, 0xcc, 0x06, 0x2e, 0x1e, 0x37, 0xf0, - 0xc9, 0x88, 0x86, 0xa7, 0x4e, 0x10, 0x72, 0xc9, 0xd1, 0x96, 0x6e, 0x3b, 0xa6, 0xed, 0x8c, 0x1b, - 0xe5, 0x2d, 0x32, 0x64, 0x3e, 0xc7, 0xea, 0x57, 0xab, 0xca, 0xb5, 0x3e, 0x17, 0x43, 0x2e, 0x70, - 0x8f, 0x08, 0xaa, 0xed, 0x78, 0xdc, 0xe8, 0x51, 0x49, 0x1a, 0x38, 0x20, 0x1e, 0xf3, 0x89, 0x64, - 0xdc, 0x37, 0xda, 0x6d, 0xa3, 0x9d, 0xc9, 0x92, 0x71, 0xe5, 0x92, 0x6e, 0x76, 0xd5, 0x13, 0xd6, - 0x0f, 0xa6, 0x55, 0xf0, 0xb8, 0xc7, 0x75, 0x3d, 0xfa, 0x67, 0xaa, 0x3b, 0x1e, 0xe7, 0xde, 0x80, - 0x62, 0x12, 0x30, 0x4c, 0x7c, 0x9f, 0x4b, 0x15, 0x35, 0xf3, 0x64, 0xbc, 0x9c, 0x3c, 0x0d, 0xa8, - 0x69, 0xdb, 0x4f, 0xe1, 0xd5, 0x87, 0x51, 0xf8, 0x23, 0x32, 0x60, 0x2e, 0x91, 0x3c, 0x14, 0x1d, - 0x7a, 0x32, 0xa2, 0x42, 0xa2, 0xfb, 0x10, 0xce, 0xc1, 0x8b, 0x60, 0x1f, 0x54, 0x37, 0x9b, 0x15, - 0xc7, 0xf0, 0x44, 0x6f, 0xe9, 0x68, 0x6a, 0xf3, 0x96, 0x4e, 0x9b, 0x78, 0xd4, 0x78, 0x3b, 0x09, - 0xa7, 0xfd, 0x11, 0xc0, 0x6b, 0x0b, 0x11, 0x22, 0xe0, 0xbe, 0xa0, 0xe8, 0x10, 0xc2, 0x71, 0x5c, - 0x2d, 0x82, 0xfd, 0xf5, 0xea, 0x66, 0x73, 0xc7, 0x59, 0xd8, 0xb7, 0x13, 0x5b, 0x5b, 0xf9, 0xb3, - 0x1f, 0x7b, 0xb9, 0x0f, 0xbf, 0x3f, 0xd5, 0x40, 0x27, 0x61, 0x8d, 0x06, 0x25, 0x60, 0xd7, 0x14, - 0xec, 0x8d, 0xa5, 0xb0, 0x9a, 0x22, 0x45, 0xfb, 0x18, 0x5e, 0x49, 0xc3, 0xce, 0xd6, 0x71, 0x07, - 0x5e, 0x8a, 0xf3, 0xba, 0xc4, 0x75, 0x43, 0xb5, 0x92, 0x7c, 0xab, 0xf8, 0xf5, 0x73, 0xbd, 0x60, - 0x82, 0xee, 0xba, 0x6e, 0x48, 0x85, 0x38, 0x92, 0x21, 0xf3, 0xbd, 0xce, 0xc5, 0x58, 0x1f, 0xd5, - 0xed, 0xee, 0xdf, 0x9b, 0x8e, 0xb7, 0x70, 0x0f, 0xe6, 0x63, 0xa9, 0x59, 0xf4, 0xca, 0x4b, 0x98, - 0x3b, 0xed, 0x02, 0x44, 0x2a, 0xa0, 0x4d, 0x42, 0x32, 0x9c, 0x1d, 0xa3, 0x7d, 0x04, 0x2f, 0xa7, - 0xaa, 0x26, 0xf3, 0x36, 0xdc, 0x08, 0x54, 0xc5, 0x04, 0x96, 0x32, 0x02, 0xb5, 0x25, 0x99, 0x66, - 0x3c, 0xcd, 0x2f, 0xeb, 0xf0, 0x82, 0x9a, 0x8a, 0xde, 0x00, 0x08, 0xe7, 0x07, 0x8b, 0x0e, 0x32, - 0xc6, 0x64, 0xdf, 0xaf, 0x72, 0x6d, 0x15, 0xa9, 0xa6, 0xb5, 0x6b, 0xaf, 0xa3, 0xf8, 0x57, 0xdf, - 0x7e, 0xbd, 0x5b, 0xdb, 0x43, 0xbb, 0x78, 0xf1, 0x4a, 0x27, 0xae, 0xc2, 0x7b, 0x00, 0xf3, 0xf1, - 0x08, 0x54, 0x5d, 0x9a, 0x32, 0xe3, 0x39, 0x58, 0x41, 0x69, 0x70, 0x6e, 0xcd, 0x71, 0x30, 0xaa, - 0xff, 0x0f, 0x07, 0x3f, 0x4f, 0x5f, 0x9a, 0x17, 0xe8, 0x25, 0xdc, 0xd0, 0x7b, 0x45, 0xd7, 0xff, - 0x15, 0x98, 0x3a, 0xc0, 0x72, 0x65, 0x99, 0xcc, 0x40, 0x55, 0xe6, 0x50, 0xdb, 0xa8, 0x94, 0x01, - 0xa5, 0xcf, 0xae, 0x75, 0x78, 0x36, 0xb1, 0xc0, 0xf9, 0xc4, 0x02, 0x3f, 0x27, 0x16, 0x78, 0x3b, - 0xb5, 0x72, 0xe7, 0x53, 0x2b, 0xf7, 0x7d, 0x6a, 0xe5, 0x9e, 0xd4, 0x3d, 0x26, 0x8f, 0x47, 0x3d, - 0xa7, 0xcf, 0x87, 0x38, 0x32, 0x33, 0x52, 0x1f, 0x90, 0x9e, 0xc0, 0x0f, 0xda, 0x6a, 0xd4, 0xb3, - 0x78, 0x98, 0xfa, 0x80, 0xf4, 0x36, 0xd4, 0x17, 0xe4, 0xe6, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x9e, 0xc1, 0x61, 0x91, 0x3f, 0x05, 0x00, 0x00, + // 638 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x8b, 0xd3, 0x4e, + 0x18, 0xc7, 0x9b, 0xfd, 0xfd, 0x2c, 0x74, 0x8a, 0xc2, 0x8e, 0x55, 0xdb, 0xee, 0x36, 0x5b, 0x02, + 0xd6, 0x6e, 0xa5, 0x19, 0x5a, 0x6f, 0x22, 0x88, 0x05, 0x5d, 0xf6, 0x64, 0xed, 0x82, 0x88, 0x97, + 0x3a, 0x69, 0x66, 0xb3, 0x03, 0x6d, 0x26, 0x9b, 0xa4, 0xc5, 0x45, 0x44, 0xf0, 0xe4, 0xcd, 0x05, + 0xaf, 0xbe, 0x00, 0xc1, 0x8b, 0x07, 0x5f, 0xc4, 0x1e, 0x3c, 0x2c, 0x7a, 0xf1, 0x24, 0xd2, 0x0a, + 0xbe, 0x0d, 0xc9, 0xcc, 0x34, 0x7f, 0x6c, 0x6a, 0x7b, 0x29, 0xcd, 0xf3, 0x3c, 0xdf, 0xe7, 0xfb, + 0x99, 0x67, 0x9e, 0x04, 0x54, 0x98, 0x43, 0x6d, 0xea, 0x23, 0xe6, 0x0c, 0x8e, 0xe8, 0xd0, 0x44, + 0x93, 0x16, 0x3a, 0x1e, 0x13, 0xf7, 0x44, 0x77, 0x5c, 0xe6, 0x33, 0xb8, 0x29, 0xd2, 0xba, 0x4c, + 0xeb, 0x93, 0x56, 0x79, 0x13, 0x8f, 0xa8, 0xcd, 0x10, 0xff, 0x15, 0x55, 0xe5, 0xc6, 0x80, 0x79, + 0x23, 0xe6, 0x21, 0x03, 0x7b, 0x44, 0xc8, 0xd1, 0xa4, 0x65, 0x10, 0x1f, 0xb7, 0x90, 0x83, 0x2d, + 0x6a, 0x63, 0x9f, 0x32, 0x5b, 0xd6, 0x6e, 0xc9, 0xda, 0x79, 0x59, 0xdc, 0xae, 0x5c, 0x12, 0xc9, + 0x3e, 0x7f, 0x42, 0xe2, 0x41, 0xa6, 0x0a, 0x16, 0xb3, 0x98, 0x88, 0x07, 0xff, 0x64, 0x74, 0xdb, + 0x62, 0xcc, 0x1a, 0x12, 0x84, 0x1d, 0x8a, 0xb0, 0x6d, 0x33, 0x9f, 0x5b, 0xcd, 0x35, 0x29, 0x87, + 0xf3, 0x4f, 0x1c, 0x22, 0xd3, 0xda, 0x33, 0x70, 0xf5, 0x51, 0x60, 0xfe, 0x18, 0x0f, 0xa9, 0x89, + 0x7d, 0xe6, 0x7a, 0x3d, 0x72, 0x3c, 0x26, 0x9e, 0x0f, 0x1f, 0x00, 0x10, 0x81, 0x17, 0x95, 0xaa, + 0x52, 0xcf, 0xb7, 0x6b, 0xba, 0xe4, 0x09, 0x4e, 0xa9, 0x0b, 0x6a, 0x79, 0x4a, 0xbd, 0x8b, 0x2d, + 0x22, 0xb5, 0xbd, 0x98, 0x52, 0xfb, 0xa8, 0x80, 0x6b, 0x0b, 0x16, 0x9e, 0xc3, 0x6c, 0x8f, 0xc0, + 0x3d, 0x00, 0x26, 0x61, 0xb4, 0xa8, 0x54, 0xff, 0xab, 0xe7, 0xdb, 0xdb, 0xfa, 0xc2, 0xbc, 0xf5, + 0x50, 0xda, 0xc9, 0x9d, 0xfd, 0xd8, 0xc9, 0x7c, 0xf8, 0xfd, 0xa9, 0xa1, 0xf4, 0x62, 0xd2, 0xa0, + 0x51, 0x0c, 0x76, 0x83, 0xc3, 0xde, 0x58, 0x09, 0x2b, 0x28, 0x12, 0xb4, 0x4f, 0xc0, 0x95, 0x24, + 0xec, 0x7c, 0x1c, 0x77, 0xc1, 0xa5, 0xd0, 0xaf, 0x8f, 0x4d, 0xd3, 0xe5, 0x23, 0xc9, 0x75, 0x8a, + 0x5f, 0x3f, 0x37, 0x0b, 0xd2, 0xe8, 0x9e, 0x69, 0xba, 0xc4, 0xf3, 0x0e, 0x7c, 0x97, 0xda, 0x56, + 0xef, 0x62, 0x58, 0x1f, 0xc4, 0xb5, 0xfe, 0xdf, 0x93, 0x0e, 0xa7, 0x70, 0x1f, 0xe4, 0xc2, 0x52, + 0x39, 0xe8, 0xb5, 0x87, 0x10, 0x29, 0xb5, 0xa2, 0x34, 0xe8, 0xb8, 0xd4, 0xb4, 0xc8, 0xbe, 0x7d, + 0xc8, 0x24, 0xbb, 0x66, 0xca, 0x1b, 0x88, 0x67, 0xa4, 0xf7, 0x3e, 0xc8, 0x1b, 0x3c, 0xda, 0xa7, + 0xf6, 0x21, 0x93, 0xee, 0x95, 0x14, 0xf7, 0x48, 0x9b, 0xb8, 0x03, 0x23, 0x0c, 0x6b, 0x05, 0x00, + 0xb9, 0x4b, 0x17, 0xbb, 0x78, 0x34, 0x5f, 0x23, 0xed, 0x00, 0x5c, 0x4e, 0x44, 0xa5, 0xef, 0x1d, + 0x90, 0x75, 0x78, 0x44, 0x5a, 0x96, 0x52, 0x2c, 0x85, 0x24, 0x6e, 0x27, 0x35, 0xed, 0x2f, 0xff, + 0x83, 0x0b, 0xbc, 0x2b, 0x7c, 0xab, 0x00, 0x10, 0x2d, 0x16, 0xdc, 0x4d, 0x69, 0x93, 0xbe, 0xdf, + 0xe5, 0xc6, 0x3a, 0xa5, 0x82, 0x56, 0x6b, 0xbc, 0x09, 0xec, 0x5f, 0x7f, 0xfb, 0xf5, 0x6e, 0x63, + 0x07, 0x56, 0xd0, 0xe2, 0x2b, 0x15, 0x5b, 0xc5, 0xf7, 0x0a, 0xc8, 0x85, 0x2d, 0x60, 0x7d, 0xa5, + 0xcb, 0x9c, 0x67, 0x77, 0x8d, 0x4a, 0x89, 0x73, 0x3b, 0xc2, 0x41, 0xb0, 0xf9, 0x2f, 0x1c, 0xf4, + 0x22, 0xb9, 0xb4, 0x2f, 0xe1, 0xa9, 0x02, 0x40, 0x74, 0x97, 0xcb, 0x07, 0xb6, 0xb0, 0x45, 0xcb, + 0x07, 0xb6, 0xb8, 0x56, 0xda, 0xcd, 0x88, 0xb0, 0x0a, 0xd5, 0x14, 0xc2, 0xd8, 0xd2, 0xc1, 0x57, + 0x20, 0x2b, 0xae, 0x1a, 0x5e, 0x5f, 0x66, 0x91, 0xd8, 0xa9, 0x72, 0x6d, 0x55, 0x99, 0xa4, 0xa8, + 0x45, 0x14, 0x5b, 0xb0, 0x94, 0x42, 0x21, 0xd6, 0xa9, 0xb3, 0x77, 0x36, 0x55, 0x95, 0xf3, 0xa9, + 0xaa, 0xfc, 0x9c, 0xaa, 0xca, 0xe9, 0x4c, 0xcd, 0x9c, 0xcf, 0xd4, 0xcc, 0xf7, 0x99, 0x9a, 0x79, + 0xda, 0xb4, 0xa8, 0x7f, 0x34, 0x36, 0xf4, 0x01, 0x1b, 0xa1, 0x40, 0x4c, 0x71, 0x73, 0x88, 0x0d, + 0x0f, 0x3d, 0xec, 0xf2, 0x56, 0xcf, 0xc3, 0x66, 0xfc, 0x9b, 0x6a, 0x64, 0xf9, 0x47, 0xf5, 0xd6, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0xcf, 0xbf, 0x6e, 0x52, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -378,6 +467,7 @@ type QueryClient interface { Validators(ctx context.Context, in *QueryValidatorsRequest, opts ...grpc.CallOption) (*QueryValidatorsResponse, error) // Validator queries validator info for given validator address. Validator(ctx context.Context, in *QueryValidatorRequest, opts ...grpc.CallOption) (*QueryValidatorResponse, error) + BridgeInfo(ctx context.Context, in *QueryBridgeInfoRequest, opts ...grpc.CallOption) (*QueryBridgeInfoResponse, error) // Parameters queries the rollup parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -408,6 +498,15 @@ func (c *queryClient) Validator(ctx context.Context, in *QueryValidatorRequest, return out, nil } +func (c *queryClient) BridgeInfo(ctx context.Context, in *QueryBridgeInfoRequest, opts ...grpc.CallOption) (*QueryBridgeInfoResponse, error) { + out := new(QueryBridgeInfoResponse) + err := c.cc.Invoke(ctx, "/opinit.opchild.v1.Query/BridgeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/opinit.opchild.v1.Query/Params", in, out, opts...) @@ -426,6 +525,7 @@ type QueryServer interface { Validators(context.Context, *QueryValidatorsRequest) (*QueryValidatorsResponse, error) // Validator queries validator info for given validator address. Validator(context.Context, *QueryValidatorRequest) (*QueryValidatorResponse, error) + BridgeInfo(context.Context, *QueryBridgeInfoRequest) (*QueryBridgeInfoResponse, error) // Parameters queries the rollup parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } @@ -440,6 +540,9 @@ func (*UnimplementedQueryServer) Validators(ctx context.Context, req *QueryValid func (*UnimplementedQueryServer) Validator(ctx context.Context, req *QueryValidatorRequest) (*QueryValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Validator not implemented") } +func (*UnimplementedQueryServer) BridgeInfo(ctx context.Context, req *QueryBridgeInfoRequest) (*QueryBridgeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BridgeInfo not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -484,6 +587,24 @@ func _Query_Validator_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Query_BridgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBridgeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).BridgeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opinit.opchild.v1.Query/BridgeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).BridgeInfo(ctx, req.(*QueryBridgeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -514,6 +635,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Validator", Handler: _Query_Validator_Handler, }, + { + MethodName: "BridgeInfo", + Handler: _Query_BridgeInfo_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -670,6 +795,62 @@ func (m *QueryValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryBridgeInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBridgeInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBridgeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryBridgeInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryBridgeInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBridgeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BridgeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -793,6 +974,26 @@ func (m *QueryValidatorResponse) Size() (n int) { return n } +func (m *QueryBridgeInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryBridgeInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.BridgeInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -1190,6 +1391,139 @@ func (m *QueryValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryBridgeInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBridgeInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBridgeInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBridgeInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBridgeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBridgeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BridgeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/opchild/types/query.pb.gw.go b/x/opchild/types/query.pb.gw.go index fbeeea7b..56e4186e 100644 --- a/x/opchild/types/query.pb.gw.go +++ b/x/opchild/types/query.pb.gw.go @@ -123,6 +123,24 @@ func local_request_Query_Validator_0(ctx context.Context, marshaler runtime.Mars } +func request_Query_BridgeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBridgeInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.BridgeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_BridgeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBridgeInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.BridgeInfo(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata @@ -193,6 +211,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_BridgeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_BridgeInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BridgeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -297,6 +338,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_BridgeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_BridgeInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_BridgeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -325,6 +386,8 @@ var ( pattern_Query_Validator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"opinit", "opchild", "v1", "validator", "validator_addr"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_BridgeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"opinit", "opchild", "v1", "bridge_info"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"opinit", "opchild", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -333,5 +396,7 @@ var ( forward_Query_Validator_0 = runtime.ForwardResponseMessage + forward_Query_BridgeInfo_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage ) diff --git a/x/opchild/types/tx.go b/x/opchild/types/tx.go index 4ecfac1d..6400d241 100644 --- a/x/opchild/types/tx.go +++ b/x/opchild/types/tx.go @@ -11,26 +11,13 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" ) -// rollup message types -const ( - TypeMsgExecuteMessages = "execute_messages" - - TypeMsgAddValidator = "add_validator" - TypeMsgRemoveValidator = "remove_validator" - TypeMsgUpdateParams = "update_params" - TypeMsgWhitelist = "whitelist" - TypeMsgSpendFeePool = "spend_fee_pool" - - TypeMsgInitiateTokenWithdrawal = "withdraw‰" - TypeMsgFinalizeTokenDeposit = "deposit" -) - var ( _ sdk.Msg = &MsgExecuteMessages{} _ sdk.Msg = &MsgAddValidator{} _ sdk.Msg = &MsgRemoveValidator{} _ sdk.Msg = &MsgUpdateParams{} _ sdk.Msg = &MsgSpendFeePool{} + _ sdk.Msg = &MsgSetBridgeInfo{} _ sdk.Msg = &MsgFinalizeTokenDeposit{} _ sdk.Msg = &MsgInitiateTokenWithdrawal{} @@ -191,6 +178,45 @@ func (msg MsgInitiateTokenWithdrawal) Validate(ac address.Codec) error { return nil } +/* MsgSetBridgeInfo */ +func NewMsgSetBridgeInfo( + sender string, + bridgeInfo BridgeInfo, +) *MsgSetBridgeInfo { + return &MsgSetBridgeInfo{ + Sender: sender, + BridgeInfo: bridgeInfo, + } +} + +func (msg MsgSetBridgeInfo) Validate(ac address.Codec) error { + if _, err := ac.StringToBytes(msg.Sender); err != nil { + return err + } + + if err := msg.BridgeInfo.Validate(ac); err != nil { + return err + } + + return nil +} + +func (info BridgeInfo) Validate(ac address.Codec) error { + if info.BridgeId == 0 { + return ErrInvalidBridgeInfo.Wrap("bridge id cannot be zero") + } + + if len(info.BridgeAddr) == 0 { + return ErrInvalidBridgeInfo.Wrap("bridge address cannot be empty") + } + + if err := info.BridgeConfig.ValidateWithNoAddrValidation(); err != nil { + return ErrInvalidBridgeInfo.Wrap(err.Error()) + } + + return nil +} + /* MsgFinalizeTokenDeposit */ // NewMsgFinalizeTokenDeposit creates a new MsgFinalizeTokenDeposit instance. diff --git a/x/opchild/types/tx.pb.go b/x/opchild/types/tx.pb.go index 7125577d..d62652c1 100644 --- a/x/opchild/types/tx.pb.go +++ b/x/opchild/types/tx.pb.go @@ -113,6 +113,84 @@ func (m *MsgExecuteMessagesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgExecuteMessagesResponse proto.InternalMessageInfo +// MsgSetBridgeInfo is a message to set the registered bridge information. +type MsgSetBridgeInfo struct { + // the sender address + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + // bridge_info is the bridge information to be set. + BridgeInfo BridgeInfo `protobuf:"bytes,2,opt,name=bridge_info,json=bridgeInfo,proto3" json:"bridge_info"` +} + +func (m *MsgSetBridgeInfo) Reset() { *m = MsgSetBridgeInfo{} } +func (m *MsgSetBridgeInfo) String() string { return proto.CompactTextString(m) } +func (*MsgSetBridgeInfo) ProtoMessage() {} +func (*MsgSetBridgeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1ee96a503651b6e4, []int{2} +} +func (m *MsgSetBridgeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetBridgeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetBridgeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetBridgeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetBridgeInfo.Merge(m, src) +} +func (m *MsgSetBridgeInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgSetBridgeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetBridgeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetBridgeInfo proto.InternalMessageInfo + +// MsgSetBridgeInfoResponse returns set bridge info result data +type MsgSetBridgeInfoResponse struct { +} + +func (m *MsgSetBridgeInfoResponse) Reset() { *m = MsgSetBridgeInfoResponse{} } +func (m *MsgSetBridgeInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetBridgeInfoResponse) ProtoMessage() {} +func (*MsgSetBridgeInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1ee96a503651b6e4, []int{3} +} +func (m *MsgSetBridgeInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetBridgeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetBridgeInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetBridgeInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetBridgeInfoResponse.Merge(m, src) +} +func (m *MsgSetBridgeInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetBridgeInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetBridgeInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetBridgeInfoResponse proto.InternalMessageInfo + // MsgFinalizeTokenDeposit is a message to submit deposit funds from upper layer type MsgFinalizeTokenDeposit struct { // the sender address @@ -137,7 +215,7 @@ func (m *MsgFinalizeTokenDeposit) Reset() { *m = MsgFinalizeTokenDeposit func (m *MsgFinalizeTokenDeposit) String() string { return proto.CompactTextString(m) } func (*MsgFinalizeTokenDeposit) ProtoMessage() {} func (*MsgFinalizeTokenDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{2} + return fileDescriptor_1ee96a503651b6e4, []int{4} } func (m *MsgFinalizeTokenDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -174,7 +252,7 @@ func (m *MsgFinalizeTokenDepositResponse) Reset() { *m = MsgFinalizeToke func (m *MsgFinalizeTokenDepositResponse) String() string { return proto.CompactTextString(m) } func (*MsgFinalizeTokenDepositResponse) ProtoMessage() {} func (*MsgFinalizeTokenDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{3} + return fileDescriptor_1ee96a503651b6e4, []int{5} } func (m *MsgFinalizeTokenDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +295,7 @@ func (m *MsgInitiateTokenWithdrawal) Reset() { *m = MsgInitiateTokenWith func (m *MsgInitiateTokenWithdrawal) String() string { return proto.CompactTextString(m) } func (*MsgInitiateTokenWithdrawal) ProtoMessage() {} func (*MsgInitiateTokenWithdrawal) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{4} + return fileDescriptor_1ee96a503651b6e4, []int{6} } func (m *MsgInitiateTokenWithdrawal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -255,7 +333,7 @@ func (m *MsgInitiateTokenWithdrawalResponse) Reset() { *m = MsgInitiateT func (m *MsgInitiateTokenWithdrawalResponse) String() string { return proto.CompactTextString(m) } func (*MsgInitiateTokenWithdrawalResponse) ProtoMessage() {} func (*MsgInitiateTokenWithdrawalResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{5} + return fileDescriptor_1ee96a503651b6e4, []int{7} } func (m *MsgInitiateTokenWithdrawalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -298,7 +376,7 @@ func (m *MsgAddValidator) Reset() { *m = MsgAddValidator{} } func (m *MsgAddValidator) String() string { return proto.CompactTextString(m) } func (*MsgAddValidator) ProtoMessage() {} func (*MsgAddValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{6} + return fileDescriptor_1ee96a503651b6e4, []int{8} } func (m *MsgAddValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -335,7 +413,7 @@ func (m *MsgAddValidatorResponse) Reset() { *m = MsgAddValidatorResponse func (m *MsgAddValidatorResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddValidatorResponse) ProtoMessage() {} func (*MsgAddValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{7} + return fileDescriptor_1ee96a503651b6e4, []int{9} } func (m *MsgAddValidatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -377,7 +455,7 @@ func (m *MsgRemoveValidator) Reset() { *m = MsgRemoveValidator{} } func (m *MsgRemoveValidator) String() string { return proto.CompactTextString(m) } func (*MsgRemoveValidator) ProtoMessage() {} func (*MsgRemoveValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{8} + return fileDescriptor_1ee96a503651b6e4, []int{10} } func (m *MsgRemoveValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +492,7 @@ func (m *MsgRemoveValidatorResponse) Reset() { *m = MsgRemoveValidatorRe func (m *MsgRemoveValidatorResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveValidatorResponse) ProtoMessage() {} func (*MsgRemoveValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{9} + return fileDescriptor_1ee96a503651b6e4, []int{11} } func (m *MsgRemoveValidatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -456,7 +534,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{10} + return fileDescriptor_1ee96a503651b6e4, []int{12} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -493,7 +571,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{11} + return fileDescriptor_1ee96a503651b6e4, []int{13} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -538,7 +616,7 @@ func (m *MsgSpendFeePool) Reset() { *m = MsgSpendFeePool{} } func (m *MsgSpendFeePool) String() string { return proto.CompactTextString(m) } func (*MsgSpendFeePool) ProtoMessage() {} func (*MsgSpendFeePool) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{12} + return fileDescriptor_1ee96a503651b6e4, []int{14} } func (m *MsgSpendFeePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -575,7 +653,7 @@ func (m *MsgSpendFeePoolResponse) Reset() { *m = MsgSpendFeePoolResponse func (m *MsgSpendFeePoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgSpendFeePoolResponse) ProtoMessage() {} func (*MsgSpendFeePoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1ee96a503651b6e4, []int{13} + return fileDescriptor_1ee96a503651b6e4, []int{15} } func (m *MsgSpendFeePoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -607,6 +685,8 @@ var xxx_messageInfo_MsgSpendFeePoolResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgExecuteMessages)(nil), "opinit.opchild.v1.MsgExecuteMessages") proto.RegisterType((*MsgExecuteMessagesResponse)(nil), "opinit.opchild.v1.MsgExecuteMessagesResponse") + proto.RegisterType((*MsgSetBridgeInfo)(nil), "opinit.opchild.v1.MsgSetBridgeInfo") + proto.RegisterType((*MsgSetBridgeInfoResponse)(nil), "opinit.opchild.v1.MsgSetBridgeInfoResponse") proto.RegisterType((*MsgFinalizeTokenDeposit)(nil), "opinit.opchild.v1.MsgFinalizeTokenDeposit") proto.RegisterType((*MsgFinalizeTokenDepositResponse)(nil), "opinit.opchild.v1.MsgFinalizeTokenDepositResponse") proto.RegisterType((*MsgInitiateTokenWithdrawal)(nil), "opinit.opchild.v1.MsgInitiateTokenWithdrawal") @@ -624,72 +704,77 @@ func init() { func init() { proto.RegisterFile("opinit/opchild/v1/tx.proto", fileDescriptor_1ee96a503651b6e4) } var fileDescriptor_1ee96a503651b6e4 = []byte{ - // 1040 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, - 0x17, 0x8f, 0x93, 0x36, 0xdb, 0xcc, 0xee, 0x57, 0xdd, 0x5a, 0xd5, 0xb7, 0xae, 0x45, 0xe3, 0x60, - 0x09, 0x29, 0x44, 0x1b, 0x7b, 0x13, 0x04, 0x87, 0x9c, 0x68, 0xd8, 0xad, 0x04, 0xab, 0x88, 0xca, - 0xcb, 0x0f, 0x89, 0x03, 0xd5, 0x24, 0x9e, 0x75, 0x46, 0x8d, 0x67, 0x8c, 0x67, 0x12, 0x6a, 0x2e, - 0x20, 0x4e, 0x88, 0x13, 0x7f, 0xc2, 0x1e, 0x10, 0x42, 0x9c, 0x7a, 0xe0, 0x84, 0xf8, 0x03, 0x2a, - 0x4e, 0x2b, 0x0e, 0x88, 0x53, 0x81, 0xf6, 0x50, 0xce, 0x7b, 0xe1, 0xc0, 0x05, 0xd9, 0x9e, 0x38, - 0x4e, 0x62, 0x93, 0x5d, 0xb4, 0x70, 0x69, 0x33, 0xef, 0x7d, 0xe6, 0xcd, 0xfb, 0xbc, 0xcf, 0xbc, - 0x37, 0x06, 0x2a, 0xf5, 0x30, 0xc1, 0xdc, 0xa4, 0xde, 0x60, 0x88, 0x47, 0xb6, 0x39, 0x69, 0x99, - 0xfc, 0xc4, 0xf0, 0x7c, 0xca, 0xa9, 0xbc, 0x15, 0xfb, 0x0c, 0xe1, 0x33, 0x26, 0x2d, 0x75, 0x0b, - 0xba, 0x98, 0x50, 0x33, 0xfa, 0x1b, 0xa3, 0xd4, 0xea, 0x80, 0x32, 0x97, 0x32, 0xb3, 0x0f, 0x19, - 0x32, 0x27, 0xad, 0x3e, 0xe2, 0xb0, 0x65, 0x0e, 0x28, 0x26, 0xc2, 0xbf, 0x23, 0xfc, 0x2e, 0x73, - 0xc2, 0xe8, 0x2e, 0x73, 0x84, 0x63, 0x37, 0x76, 0x1c, 0x45, 0x2b, 0x33, 0x5e, 0x08, 0xd7, 0xb6, - 0x43, 0x1d, 0x1a, 0xdb, 0xc3, 0x5f, 0xd3, 0x0d, 0x0e, 0xa5, 0xce, 0x08, 0x99, 0xd1, 0xaa, 0x3f, - 0x7e, 0x60, 0x42, 0x12, 0x08, 0xd7, 0x5e, 0x06, 0x8d, 0xc0, 0x43, 0x22, 0x9e, 0xfe, 0xa5, 0x04, - 0xe4, 0x1e, 0x73, 0xee, 0x9e, 0xa0, 0xc1, 0x98, 0xa3, 0x1e, 0x62, 0x0c, 0x3a, 0x88, 0xc9, 0xb7, - 0x41, 0x99, 0x21, 0x62, 0x23, 0x5f, 0x91, 0x6a, 0x52, 0xbd, 0xd2, 0x55, 0x7e, 0xfc, 0xb6, 0xb9, - 0x2d, 0x12, 0xd9, 0xb7, 0x6d, 0x1f, 0x31, 0x76, 0x9f, 0xfb, 0x98, 0x38, 0x96, 0xc0, 0xc9, 0xb7, - 0xc1, 0x86, 0x2b, 0x76, 0x2b, 0xc5, 0x5a, 0xa9, 0x7e, 0xbd, 0xbd, 0x6d, 0xc4, 0x59, 0x19, 0xd3, - 0xac, 0x8c, 0x7d, 0x12, 0x58, 0x09, 0xaa, 0xd3, 0xf8, 0xf4, 0xea, 0xb4, 0x21, 0xb6, 0x7f, 0x7e, - 0x75, 0xda, 0x50, 0xa7, 0x29, 0x2e, 0xe7, 0xa3, 0x3f, 0x07, 0xd4, 0x65, 0xab, 0x85, 0x98, 0x47, - 0x09, 0x43, 0xfa, 0x57, 0x25, 0xb0, 0xd3, 0x63, 0xce, 0x01, 0x26, 0x70, 0x84, 0x3f, 0x42, 0x6f, - 0xd1, 0x63, 0x44, 0xee, 0x20, 0x8f, 0x32, 0xcc, 0xe5, 0xfd, 0x05, 0x26, 0x2f, 0x3e, 0x3e, 0xd7, - 0xfe, 0x17, 0x40, 0x77, 0xd4, 0xd1, 0x63, 0xbb, 0xbe, 0x92, 0xda, 0x2d, 0xb0, 0xf6, 0xc0, 0xa7, - 0xae, 0x52, 0x5c, 0x51, 0x8a, 0x08, 0x25, 0xd7, 0x41, 0x91, 0x53, 0xa5, 0xb4, 0x02, 0x5b, 0xe4, - 0x54, 0xee, 0x81, 0x32, 0x74, 0xe9, 0x98, 0x70, 0x65, 0xad, 0x26, 0xd5, 0xaf, 0xb7, 0x77, 0x0d, - 0x01, 0x0d, 0x2f, 0x8c, 0x21, 0x2e, 0x8c, 0xf1, 0x1a, 0xc5, 0xa4, 0xab, 0x9e, 0x9d, 0x6b, 0x85, - 0x59, 0xe6, 0xf1, 0x36, 0xfd, 0xeb, 0xab, 0xd3, 0x86, 0x64, 0x89, 0x20, 0xb2, 0x0a, 0x36, 0x18, - 0xfa, 0x60, 0x8c, 0xc8, 0x00, 0x29, 0xeb, 0x35, 0xa9, 0xbe, 0x66, 0x25, 0x6b, 0xf9, 0xff, 0xa0, - 0x3c, 0x44, 0xd8, 0x19, 0x72, 0xa5, 0x1c, 0x79, 0xc4, 0x4a, 0xde, 0x03, 0x20, 0x3c, 0xec, 0xc8, - 0x46, 0x84, 0xba, 0xca, 0xb5, 0x30, 0x69, 0xab, 0x12, 0x5a, 0xee, 0x84, 0x06, 0x79, 0x0f, 0xac, - 0xd9, 0x90, 0x43, 0x65, 0xa3, 0x26, 0xd5, 0x6f, 0x74, 0x2b, 0x67, 0xe7, 0x9a, 0x14, 0x9f, 0x19, - 0x99, 0x3b, 0xe6, 0x82, 0x82, 0x5a, 0x4a, 0xc1, 0x2c, 0x31, 0xf4, 0xe7, 0x81, 0x96, 0xe3, 0x4a, - 0xb4, 0xfc, 0x53, 0x8a, 0xa4, 0x7e, 0x9d, 0x60, 0x8e, 0x21, 0x8f, 0x31, 0xef, 0x62, 0x3e, 0xb4, - 0x7d, 0xf8, 0x21, 0x1c, 0xfd, 0x83, 0x8b, 0x19, 0xeb, 0x51, 0xfc, 0xcf, 0xf5, 0xe8, 0xb4, 0x17, - 0xaa, 0xa3, 0xa7, 0xaa, 0x93, 0x43, 0x4f, 0x7f, 0x15, 0xe8, 0xf9, 0xde, 0x69, 0x8d, 0xe6, 0x94, - 0x96, 0xe6, 0x95, 0xd6, 0xbf, 0x2b, 0x82, 0xcd, 0x1e, 0x73, 0xf6, 0x6d, 0xfb, 0x1d, 0x38, 0xc2, - 0x36, 0xe4, 0xd4, 0x97, 0xdf, 0x00, 0x15, 0x38, 0xe6, 0x43, 0xea, 0x63, 0x1e, 0x88, 0xba, 0xdd, - 0x7a, 0x7c, 0xae, 0xdd, 0x14, 0xc9, 0x4f, 0x5d, 0xf9, 0x9d, 0x30, 0xdb, 0x2e, 0x2b, 0xe0, 0x9a, - 0x4b, 0x09, 0x3e, 0x46, 0x7e, 0x5c, 0x53, 0x6b, 0xba, 0x94, 0xef, 0x82, 0xad, 0xc9, 0xf4, 0xc8, - 0x23, 0x18, 0xef, 0x5f, 0xd9, 0x07, 0x37, 0x93, 0x2d, 0xc2, 0x2e, 0x1f, 0x80, 0xb2, 0x37, 0xee, - 0x1f, 0xa3, 0x40, 0xa8, 0x90, 0x39, 0x46, 0xba, 0xca, 0x0f, 0xb3, 0x88, 0x03, 0x3f, 0xf0, 0x38, - 0x35, 0x0e, 0xc7, 0xfd, 0x7b, 0x28, 0xb0, 0xc4, 0xee, 0x4e, 0xfb, 0xb3, 0x87, 0x5a, 0xe1, 0xf7, - 0x87, 0x5a, 0x21, 0x94, 0x61, 0x46, 0x20, 0x54, 0x62, 0x27, 0xa5, 0x44, 0xba, 0x50, 0xfa, 0x6e, - 0x34, 0x47, 0xd2, 0xa6, 0xe4, 0x5e, 0xfe, 0x14, 0x0f, 0x4a, 0x0b, 0xb9, 0x74, 0x82, 0xfe, 0x9d, - 0xd2, 0x66, 0x16, 0xb0, 0xf8, 0xb4, 0x05, 0xec, 0x34, 0x97, 0x09, 0xa7, 0x47, 0xeb, 0x02, 0x03, - 0x31, 0x5a, 0x17, 0xac, 0x09, 0xed, 0xef, 0xa5, 0xe8, 0x3a, 0xbd, 0xed, 0xd9, 0x90, 0xa3, 0x43, - 0xe8, 0x43, 0x97, 0x3d, 0x53, 0xce, 0x2d, 0x50, 0xf6, 0xa2, 0xa8, 0x11, 0xd1, 0xb0, 0xe7, 0x96, - 0x9e, 0x56, 0x23, 0x3e, 0xd6, 0x12, 0xc0, 0xf8, 0xdd, 0xc8, 0x17, 0x34, 0x9d, 0xaa, 0x10, 0x34, - 0x6d, 0x9a, 0x31, 0x8b, 0x1b, 0xe5, 0xbe, 0x87, 0x88, 0x7d, 0x80, 0xd0, 0x21, 0xa5, 0xa3, 0x67, - 0xca, 0xec, 0x15, 0x50, 0xf1, 0xd1, 0x00, 0x7b, 0x18, 0x11, 0xbe, 0x52, 0xc5, 0x19, 0x54, 0x0e, - 0x92, 0x29, 0x54, 0x8a, 0x9e, 0xd1, 0xbf, 0x99, 0x42, 0x07, 0x99, 0x53, 0xe8, 0x9b, 0x5f, 0xb4, - 0xba, 0x83, 0xf9, 0x70, 0xdc, 0x37, 0x06, 0xd4, 0x15, 0x9f, 0x0f, 0xe2, 0x5f, 0x93, 0xd9, 0xc7, - 0xe2, 0xfd, 0x0f, 0x23, 0xb0, 0xf9, 0x89, 0xb5, 0xa2, 0xb2, 0xe9, 0x52, 0x89, 0xca, 0xa6, 0x4d, - 0xd3, 0xca, 0xb6, 0xff, 0x58, 0x07, 0xa5, 0x1e, 0x73, 0x64, 0x07, 0x6c, 0x2e, 0x7e, 0x57, 0xbc, - 0x90, 0x21, 0xef, 0xf2, 0xc3, 0xae, 0x36, 0x9f, 0x08, 0x96, 0xcc, 0xc3, 0x09, 0xd8, 0xce, 0x7c, - 0xfb, 0x1b, 0xd9, 0x61, 0xb2, 0xb0, 0x6a, 0xfb, 0xc9, 0xb1, 0xc9, 0xb9, 0x1f, 0x83, 0x9d, 0xbc, - 0x77, 0x2a, 0x87, 0x41, 0x0e, 0x5c, 0x7d, 0xf9, 0xa9, 0xe0, 0x49, 0x02, 0xef, 0x83, 0x1b, 0x73, - 0x83, 0x5e, 0xcf, 0x0e, 0x93, 0xc6, 0xa8, 0x8d, 0xd5, 0x98, 0x24, 0xbe, 0x03, 0x36, 0x17, 0x07, - 0x5e, 0x8e, 0x82, 0x0b, 0xb0, 0x3c, 0x05, 0x73, 0xc6, 0x4c, 0x48, 0x64, 0x6e, 0xc4, 0xe4, 0x10, - 0x49, 0x63, 0xf2, 0x88, 0x64, 0x35, 0x7b, 0x18, 0x7f, 0xae, 0xd1, 0x73, 0xe2, 0xa7, 0x31, 0x79, - 0xf1, 0xb3, 0xae, 0xbc, 0xba, 0xfe, 0x49, 0xd8, 0x48, 0xdd, 0x7b, 0x67, 0xbf, 0x55, 0x0b, 0x67, - 0x17, 0x55, 0xe9, 0xd1, 0x45, 0x55, 0xfa, 0xf5, 0xa2, 0x2a, 0x7d, 0x71, 0x59, 0x2d, 0x3c, 0xba, - 0xac, 0x16, 0x7e, 0xbe, 0xac, 0x16, 0xde, 0x6b, 0xa6, 0xba, 0x12, 0x47, 0xca, 0x36, 0x47, 0xb0, - 0xcf, 0xcc, 0x37, 0x0f, 0xa3, 0x2f, 0xf4, 0x93, 0xe4, 0x1b, 0x3d, 0x6a, 0xd0, 0x7e, 0x39, 0x7a, - 0xf0, 0x5e, 0xfa, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x03, 0x86, 0x83, 0x88, 0x89, 0x0c, 0x00, 0x00, + // 1118 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0xd3, 0x6e, 0xb6, 0x9d, 0xee, 0xaa, 0xad, 0x55, 0x51, 0xd7, 0xa2, 0x49, 0x31, 0x42, + 0x0a, 0x61, 0x63, 0x6f, 0x83, 0xe0, 0x90, 0x13, 0x0d, 0xbb, 0x95, 0xca, 0x2a, 0xa2, 0x72, 0xf9, + 0x21, 0x71, 0xa0, 0x1a, 0xc7, 0x53, 0x67, 0xd4, 0x78, 0xc6, 0x78, 0x26, 0xa1, 0xe1, 0x02, 0xe2, + 0x84, 0x38, 0xf1, 0x27, 0xec, 0x01, 0x21, 0xc4, 0xa9, 0x07, 0x4e, 0x88, 0x3f, 0xa0, 0xda, 0xd3, + 0x8a, 0x03, 0x42, 0x1c, 0x0a, 0xb4, 0x87, 0x72, 0xde, 0x2b, 0x17, 0x64, 0x7b, 0xe2, 0x38, 0xae, + 0xbd, 0xe9, 0xa2, 0xb2, 0x97, 0x36, 0xf3, 0xde, 0x37, 0x6f, 0xde, 0xf7, 0xbe, 0x99, 0x37, 0x63, + 0xa0, 0x52, 0x0f, 0x13, 0xcc, 0x0d, 0xea, 0x75, 0xba, 0xb8, 0x67, 0x1b, 0x83, 0x4d, 0x83, 0x1f, + 0xe9, 0x9e, 0x4f, 0x39, 0x95, 0x97, 0x23, 0x9f, 0x2e, 0x7c, 0xfa, 0x60, 0x53, 0x5d, 0x86, 0x2e, + 0x26, 0xd4, 0x08, 0xff, 0x46, 0x28, 0xb5, 0xdc, 0xa1, 0xcc, 0xa5, 0xcc, 0xb0, 0x20, 0x43, 0xc6, + 0x60, 0xd3, 0x42, 0x1c, 0x6e, 0x1a, 0x1d, 0x8a, 0x89, 0xf0, 0xaf, 0x0a, 0xbf, 0xcb, 0x9c, 0x20, + 0xba, 0xcb, 0x1c, 0xe1, 0x58, 0x8b, 0x1c, 0xfb, 0xe1, 0xc8, 0x88, 0x06, 0xc2, 0xb5, 0xe2, 0x50, + 0x87, 0x46, 0xf6, 0xe0, 0xd7, 0x68, 0x82, 0x43, 0xa9, 0xd3, 0x43, 0x46, 0x38, 0xb2, 0xfa, 0x07, + 0x06, 0x24, 0x43, 0xe1, 0x5a, 0xcf, 0xa0, 0x31, 0xf4, 0x90, 0x88, 0xa7, 0x7d, 0x2b, 0x01, 0xb9, + 0xcd, 0x9c, 0xfb, 0x47, 0xa8, 0xd3, 0xe7, 0xa8, 0x8d, 0x18, 0x83, 0x0e, 0x62, 0xf2, 0x5d, 0x50, + 0x62, 0x88, 0xd8, 0xc8, 0x57, 0xa4, 0x0d, 0xa9, 0x3a, 0xdf, 0x52, 0x7e, 0xf9, 0xb1, 0xbe, 0x22, + 0x12, 0xd9, 0xb2, 0x6d, 0x1f, 0x31, 0xb6, 0xc7, 0x7d, 0x4c, 0x1c, 0x53, 0xe0, 0xe4, 0xbb, 0x60, + 0xce, 0x15, 0xb3, 0x95, 0xe2, 0xc6, 0x4c, 0x75, 0xa1, 0xb1, 0xa2, 0x47, 0x59, 0xe9, 0xa3, 0xac, + 0xf4, 0x2d, 0x32, 0x34, 0x63, 0x54, 0xb3, 0xf6, 0xe5, 0xc5, 0x71, 0x4d, 0x4c, 0xff, 0xfa, 0xe2, + 0xb8, 0xa6, 0x8e, 0x52, 0xbc, 0x9c, 0x8f, 0xf6, 0x22, 0x50, 0x2f, 0x5b, 0x4d, 0xc4, 0x3c, 0x4a, + 0x18, 0xd2, 0x1e, 0x49, 0x60, 0xa9, 0xcd, 0x9c, 0x3d, 0xc4, 0x5b, 0x3e, 0xb6, 0x1d, 0xb4, 0x43, + 0x0e, 0xa8, 0xbc, 0x95, 0xa2, 0xf0, 0xea, 0x93, 0xd3, 0xca, 0xed, 0x21, 0x74, 0x7b, 0x4d, 0x2d, + 0xb2, 0x6b, 0x53, 0x39, 0xed, 0x80, 0x05, 0x2b, 0x0c, 0xb8, 0x8f, 0xc9, 0x01, 0x55, 0x8a, 0x1b, + 0x52, 0x75, 0xa1, 0xb1, 0xae, 0x5f, 0x12, 0x5f, 0x1f, 0x2f, 0xdb, 0x9a, 0x3f, 0x39, 0xad, 0x14, + 0xbe, 0xbf, 0x38, 0xae, 0x49, 0x26, 0xb0, 0x62, 0x73, 0xb3, 0x9a, 0x22, 0xab, 0x24, 0xc8, 0x4e, + 0xe4, 0xad, 0xa9, 0x40, 0x49, 0xdb, 0x62, 0xa2, 0xdf, 0xcd, 0x80, 0xd5, 0x36, 0x73, 0xb6, 0x31, + 0x81, 0x3d, 0xfc, 0x19, 0x7a, 0x8f, 0x1e, 0x22, 0x72, 0x0f, 0x79, 0x94, 0x61, 0x7e, 0x1d, 0x7c, + 0xef, 0x80, 0xd9, 0x03, 0x9f, 0xba, 0x21, 0xd1, 0xa7, 0x69, 0x1e, 0xa2, 0xe4, 0x2a, 0x28, 0x72, + 0xaa, 0xcc, 0x4c, 0xc1, 0x16, 0x39, 0x95, 0xdb, 0xa0, 0x04, 0x5d, 0xda, 0x27, 0x5c, 0x99, 0x0d, + 0x4b, 0xb8, 0xa6, 0x0b, 0x68, 0x70, 0x32, 0x74, 0x71, 0x32, 0xf4, 0xb7, 0x29, 0x26, 0x2d, 0x35, + 0x28, 0xdf, 0x38, 0xf3, 0x68, 0x9a, 0x16, 0xd5, 0x53, 0x04, 0x91, 0x55, 0x30, 0xc7, 0xd0, 0x27, + 0x7d, 0x44, 0x3a, 0x48, 0xb9, 0xb1, 0x21, 0x55, 0x67, 0xcd, 0x78, 0x2c, 0xbf, 0x00, 0x4a, 0x5d, + 0x84, 0x9d, 0x2e, 0x57, 0x4a, 0xa1, 0x47, 0x8c, 0xe4, 0x75, 0x00, 0x82, 0xc5, 0xf6, 0x6d, 0x44, + 0xa8, 0xab, 0xdc, 0x0c, 0x92, 0x36, 0xe7, 0x03, 0xcb, 0xbd, 0xc0, 0x20, 0xaf, 0x83, 0x59, 0x1b, + 0x72, 0xa8, 0xcc, 0x6d, 0x48, 0xd5, 0x5b, 0xa1, 0x86, 0x52, 0xb4, 0x66, 0x68, 0x6e, 0x1a, 0x29, + 0xf5, 0x2a, 0x09, 0xf5, 0xb2, 0xc4, 0xd0, 0x5e, 0x02, 0x95, 0x1c, 0x57, 0xac, 0xe5, 0x3f, 0x52, + 0xb8, 0xa7, 0x77, 0x08, 0xe6, 0x18, 0xf2, 0x08, 0xf3, 0x21, 0xe6, 0x5d, 0xdb, 0x87, 0x9f, 0xc2, + 0xde, 0x7f, 0x38, 0x81, 0x91, 0x1e, 0xc5, 0xe7, 0xae, 0x47, 0xb3, 0x91, 0xaa, 0x8e, 0x96, 0xa8, + 0x4e, 0x0e, 0x3d, 0xed, 0x2d, 0xa0, 0xe5, 0x7b, 0x47, 0x35, 0x9a, 0x50, 0x5a, 0x9a, 0x54, 0x5a, + 0xfb, 0xa9, 0x08, 0x16, 0xdb, 0xcc, 0xd9, 0xb2, 0xed, 0x0f, 0x60, 0x0f, 0xdb, 0x90, 0x53, 0x5f, + 0x7e, 0x07, 0xcc, 0xc3, 0x3e, 0xef, 0x52, 0x1f, 0xf3, 0xa1, 0xa8, 0xdb, 0x9d, 0x27, 0xa7, 0x95, + 0x25, 0x91, 0xfc, 0xc8, 0x95, 0x7f, 0x12, 0xc6, 0xd3, 0x65, 0x05, 0xdc, 0x74, 0x29, 0xc1, 0x87, + 0xc8, 0x8f, 0x6a, 0x6a, 0x8e, 0x86, 0xf2, 0x7d, 0xb0, 0x3c, 0x18, 0x2d, 0xb9, 0x0f, 0xa3, 0xf9, + 0x53, 0xcf, 0xc1, 0x52, 0x3c, 0x45, 0xd8, 0xe5, 0x6d, 0x50, 0xf2, 0xfa, 0xd6, 0x21, 0x1a, 0x0a, + 0x15, 0x32, 0xfb, 0x65, 0x4b, 0x79, 0x34, 0x8e, 0xd8, 0xf1, 0x87, 0x1e, 0xa7, 0xfa, 0x6e, 0xdf, + 0x7a, 0x80, 0x86, 0xa6, 0x98, 0xdd, 0x6c, 0x7c, 0xf5, 0xb0, 0x52, 0xf8, 0xfb, 0x61, 0xa5, 0x10, + 0xc8, 0x30, 0x26, 0x10, 0x28, 0xb1, 0x9a, 0x50, 0x22, 0x59, 0x28, 0x6d, 0x2d, 0xec, 0x23, 0x49, + 0x53, 0xbc, 0x2f, 0x7f, 0x8d, 0x6e, 0x04, 0x13, 0xb9, 0x74, 0x80, 0xfe, 0x9f, 0xd2, 0x66, 0x16, + 0xb0, 0xf8, 0xac, 0x05, 0x6c, 0xd6, 0x2f, 0x13, 0x4e, 0xde, 0x21, 0x29, 0x06, 0xe2, 0x0e, 0x49, + 0x59, 0x63, 0xda, 0x3f, 0x4b, 0xe1, 0x76, 0x7a, 0xdf, 0xb3, 0x21, 0x47, 0xbb, 0xd0, 0x87, 0x2e, + 0xbb, 0x56, 0xce, 0x9b, 0xa0, 0xe4, 0x85, 0x51, 0xc5, 0x35, 0xb2, 0x96, 0x71, 0x8d, 0x44, 0xcb, + 0x9a, 0x02, 0x18, 0x5d, 0x90, 0xf9, 0x82, 0x26, 0x53, 0x15, 0x82, 0x26, 0x4d, 0x63, 0x66, 0xd1, + 0x41, 0xd9, 0xf3, 0x10, 0xb1, 0xb7, 0x11, 0xda, 0xa5, 0xb4, 0x77, 0xad, 0xcc, 0xde, 0x04, 0xf3, + 0x3e, 0xea, 0x60, 0x0f, 0x23, 0xc2, 0xa7, 0xaa, 0x38, 0x86, 0xca, 0xc3, 0xb8, 0x0b, 0xcd, 0x84, + 0xef, 0x85, 0xa7, 0x74, 0xa1, 0xed, 0xcc, 0x2e, 0xf4, 0xc3, 0x1f, 0x95, 0xaa, 0x83, 0x79, 0xb7, + 0x6f, 0xe9, 0x1d, 0xea, 0x8a, 0x77, 0x92, 0xf8, 0x57, 0x67, 0xf6, 0xa1, 0x78, 0xe8, 0x04, 0x11, + 0xd8, 0x64, 0xc7, 0x9a, 0x52, 0xd9, 0x64, 0xa9, 0x44, 0x65, 0x93, 0xa6, 0x51, 0x65, 0x1b, 0xbf, + 0x97, 0xc0, 0x4c, 0x9b, 0x39, 0xb2, 0x03, 0x16, 0xd3, 0x0f, 0xa8, 0x57, 0x32, 0xe4, 0xbd, 0xfc, + 0x82, 0x51, 0xeb, 0x57, 0x82, 0xc5, 0xfd, 0x10, 0x82, 0xdb, 0x93, 0x8f, 0x9c, 0x97, 0xb3, 0xe7, + 0x4f, 0x80, 0xd4, 0xd7, 0xae, 0x00, 0x8a, 0x97, 0x18, 0x80, 0x95, 0xcc, 0xe7, 0x45, 0x2d, 0x3b, + 0x48, 0x16, 0x56, 0x6d, 0x5c, 0x1d, 0x1b, 0xaf, 0xfb, 0x39, 0x58, 0xcd, 0xbb, 0x0a, 0x73, 0x8a, + 0x94, 0x03, 0x57, 0xdf, 0x78, 0x26, 0x78, 0x9c, 0xc0, 0xc7, 0xe0, 0xd6, 0xc4, 0x5d, 0xa2, 0x65, + 0x87, 0x49, 0x62, 0xd4, 0xda, 0x74, 0x4c, 0x1c, 0xdf, 0x01, 0x8b, 0xe9, 0x9e, 0x9a, 0xb3, 0x49, + 0x52, 0xb0, 0xbc, 0x4d, 0x92, 0xd3, 0xc9, 0x02, 0x22, 0x13, 0x5d, 0x2c, 0x87, 0x48, 0x12, 0x93, + 0x47, 0x24, 0xab, 0x9f, 0x04, 0xf1, 0x27, 0x7a, 0x49, 0x4e, 0xfc, 0x24, 0x26, 0x2f, 0x7e, 0xd6, + 0xa9, 0x52, 0x6f, 0x7c, 0x11, 0x9c, 0xd5, 0xd6, 0x83, 0x93, 0xbf, 0xca, 0x85, 0x93, 0xb3, 0xb2, + 0xf4, 0xf8, 0xac, 0x2c, 0xfd, 0x79, 0x56, 0x96, 0xbe, 0x39, 0x2f, 0x17, 0x1e, 0x9f, 0x97, 0x0b, + 0xbf, 0x9d, 0x97, 0x0b, 0x1f, 0xd5, 0x13, 0x07, 0x1f, 0x87, 0xca, 0xd6, 0x7b, 0xd0, 0x62, 0xc6, + 0xbb, 0xbb, 0xe1, 0xd7, 0xce, 0x51, 0xfc, 0xbd, 0x13, 0xf6, 0x00, 0xab, 0x14, 0xde, 0xa9, 0xaf, + 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x09, 0x31, 0x25, 0xd5, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -706,6 +791,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // ExecuteMessages defines a rpc handler method for MsgExecuteMessages. ExecuteMessages(ctx context.Context, in *MsgExecuteMessages, opts ...grpc.CallOption) (*MsgExecuteMessagesResponse, error) + // SetBridgeInfo defines a rpc handler method for MsgSetBridgeInfo. + SetBridgeInfo(ctx context.Context, in *MsgSetBridgeInfo, opts ...grpc.CallOption) (*MsgSetBridgeInfoResponse, error) // FinalizeTokenDeposit defines a rpc handler method for MsgFinalizeTokenDeposit. FinalizeTokenDeposit(ctx context.Context, in *MsgFinalizeTokenDeposit, opts ...grpc.CallOption) (*MsgFinalizeTokenDepositResponse, error) // InitiateTokenWithdrawal defines a user facing l2 => l1 token transfer interface. @@ -738,6 +825,15 @@ func (c *msgClient) ExecuteMessages(ctx context.Context, in *MsgExecuteMessages, return out, nil } +func (c *msgClient) SetBridgeInfo(ctx context.Context, in *MsgSetBridgeInfo, opts ...grpc.CallOption) (*MsgSetBridgeInfoResponse, error) { + out := new(MsgSetBridgeInfoResponse) + err := c.cc.Invoke(ctx, "/opinit.opchild.v1.Msg/SetBridgeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) FinalizeTokenDeposit(ctx context.Context, in *MsgFinalizeTokenDeposit, opts ...grpc.CallOption) (*MsgFinalizeTokenDepositResponse, error) { out := new(MsgFinalizeTokenDepositResponse) err := c.cc.Invoke(ctx, "/opinit.opchild.v1.Msg/FinalizeTokenDeposit", in, out, opts...) @@ -796,6 +892,8 @@ func (c *msgClient) SpendFeePool(ctx context.Context, in *MsgSpendFeePool, opts type MsgServer interface { // ExecuteMessages defines a rpc handler method for MsgExecuteMessages. ExecuteMessages(context.Context, *MsgExecuteMessages) (*MsgExecuteMessagesResponse, error) + // SetBridgeInfo defines a rpc handler method for MsgSetBridgeInfo. + SetBridgeInfo(context.Context, *MsgSetBridgeInfo) (*MsgSetBridgeInfoResponse, error) // FinalizeTokenDeposit defines a rpc handler method for MsgFinalizeTokenDeposit. FinalizeTokenDeposit(context.Context, *MsgFinalizeTokenDeposit) (*MsgFinalizeTokenDepositResponse, error) // InitiateTokenWithdrawal defines a user facing l2 => l1 token transfer interface. @@ -818,6 +916,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) ExecuteMessages(ctx context.Context, req *MsgExecuteMessages) (*MsgExecuteMessagesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteMessages not implemented") } +func (*UnimplementedMsgServer) SetBridgeInfo(ctx context.Context, req *MsgSetBridgeInfo) (*MsgSetBridgeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetBridgeInfo not implemented") +} func (*UnimplementedMsgServer) FinalizeTokenDeposit(ctx context.Context, req *MsgFinalizeTokenDeposit) (*MsgFinalizeTokenDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FinalizeTokenDeposit not implemented") } @@ -859,6 +960,24 @@ func _Msg_ExecuteMessages_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Msg_SetBridgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetBridgeInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetBridgeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opinit.opchild.v1.Msg/SetBridgeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetBridgeInfo(ctx, req.(*MsgSetBridgeInfo)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_FinalizeTokenDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgFinalizeTokenDeposit) if err := dec(in); err != nil { @@ -975,6 +1094,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "ExecuteMessages", Handler: _Msg_ExecuteMessages_Handler, }, + { + MethodName: "SetBridgeInfo", + Handler: _Msg_SetBridgeInfo_Handler, + }, { MethodName: "FinalizeTokenDeposit", Handler: _Msg_FinalizeTokenDeposit_Handler, @@ -1071,6 +1194,69 @@ func (m *MsgExecuteMessagesResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *MsgSetBridgeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetBridgeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetBridgeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BridgeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetBridgeInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetBridgeInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetBridgeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgFinalizeTokenDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1564,6 +1750,30 @@ func (m *MsgExecuteMessagesResponse) Size() (n int) { return n } +func (m *MsgSetBridgeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.BridgeInfo.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSetBridgeInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgFinalizeTokenDeposit) Size() (n int) { if m == nil { return 0 @@ -1931,6 +2141,171 @@ func (m *MsgExecuteMessagesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgSetBridgeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetBridgeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetBridgeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BridgeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetBridgeInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetBridgeInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetBridgeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgFinalizeTokenDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/opchild/types/types.pb.go b/x/opchild/types/types.pb.go index d760b2a1..0b79d4a6 100644 --- a/x/opchild/types/types.pb.go +++ b/x/opchild/types/types.pb.go @@ -13,6 +13,7 @@ import ( _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + types3 "github.com/initia-labs/OPinit/x/ophost/types" io "io" math "math" math_bits "math/bits" @@ -166,62 +167,111 @@ func (m *ValidatorUpdates) XXX_DiscardUnknown() { var xxx_messageInfo_ValidatorUpdates proto.InternalMessageInfo +// BridgeInfo defines the information of the bridge. +type BridgeInfo struct { + // bridge id is the unique identifier of the bridge which is assigned from l1. + BridgeId uint64 `protobuf:"varint,1,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty"` + // bridge_addr is the address of the bridge on l1. + BridgeAddr string `protobuf:"bytes,2,opt,name=bridge_addr,json=bridgeAddr,proto3" json:"bridge_addr,omitempty"` + // bridge_config is the configuration of the bridge. + BridgeConfig types3.BridgeConfig `protobuf:"bytes,3,opt,name=bridge_config,json=bridgeConfig,proto3" json:"bridge_config"` +} + +func (m *BridgeInfo) Reset() { *m = BridgeInfo{} } +func (m *BridgeInfo) String() string { return proto.CompactTextString(m) } +func (*BridgeInfo) ProtoMessage() {} +func (*BridgeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_2cc6df244b706d68, []int{3} +} +func (m *BridgeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BridgeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BridgeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BridgeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BridgeInfo.Merge(m, src) +} +func (m *BridgeInfo) XXX_Size() int { + return m.Size() +} +func (m *BridgeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BridgeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BridgeInfo proto.InternalMessageInfo + func init() { proto.RegisterType((*Params)(nil), "opinit.opchild.v1.Params") proto.RegisterType((*Validator)(nil), "opinit.opchild.v1.Validator") proto.RegisterType((*ValidatorUpdates)(nil), "opinit.opchild.v1.ValidatorUpdates") + proto.RegisterType((*BridgeInfo)(nil), "opinit.opchild.v1.BridgeInfo") } func init() { proto.RegisterFile("opinit/opchild/v1/types.proto", fileDescriptor_2cc6df244b706d68) } var fileDescriptor_2cc6df244b706d68 = []byte{ - // 723 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xb6, 0x9b, 0xfe, 0x51, 0xdc, 0x36, 0x6d, 0xac, 0xf4, 0xf7, 0x4b, 0x5b, 0x6a, 0x47, 0x9e, - 0xa2, 0x42, 0x6c, 0xa5, 0x45, 0x42, 0xca, 0x44, 0x5d, 0x0a, 0x43, 0x91, 0x1a, 0x19, 0xc1, 0xc0, - 0x62, 0xce, 0xf6, 0xe1, 0x9e, 0x1a, 0xdf, 0x59, 0x3e, 0x27, 0x24, 0xdf, 0x00, 0xb1, 0xc0, 0xc8, - 0xd8, 0xb1, 0x62, 0xea, 0xc0, 0xc6, 0x17, 0xa8, 0x98, 0x2a, 0x26, 0x26, 0x03, 0xe9, 0x50, 0x26, - 0x06, 0x7f, 0x02, 0x64, 0xdf, 0x25, 0x29, 0x61, 0x60, 0x49, 0xee, 0x7d, 0x9f, 0xe7, 0x7d, 0xee, - 0xd5, 0xf3, 0xbe, 0x3e, 0x69, 0x8b, 0x84, 0x08, 0xa3, 0xd8, 0x20, 0xa1, 0x7b, 0x8c, 0x3a, 0x9e, - 0xd1, 0x6b, 0x1a, 0xf1, 0x20, 0x84, 0x54, 0x0f, 0x23, 0x12, 0x13, 0xb9, 0xcc, 0x60, 0x9d, 0xc3, - 0x7a, 0xaf, 0xb9, 0x51, 0x06, 0x01, 0xc2, 0xc4, 0xc8, 0x7f, 0x19, 0x6b, 0x43, 0x71, 0x09, 0x0d, - 0x08, 0x35, 0x1c, 0x40, 0xa1, 0xd1, 0x6b, 0x3a, 0x30, 0x06, 0x4d, 0xc3, 0x25, 0x08, 0x73, 0x7c, - 0x9d, 0xe1, 0x76, 0x1e, 0x19, 0x2c, 0xe0, 0x50, 0xc5, 0x27, 0x3e, 0x61, 0xf9, 0xec, 0x34, 0x2a, - 0xf0, 0x09, 0xf1, 0x3b, 0xd0, 0xc8, 0x23, 0xa7, 0xfb, 0xd2, 0x00, 0x78, 0xc0, 0xa1, 0xcd, 0x18, - 0x62, 0x0f, 0x46, 0x01, 0xc2, 0xb1, 0x01, 0x1c, 0x17, 0xdd, 0x6c, 0x57, 0xfb, 0x55, 0x90, 0xe6, - 0xdb, 0x20, 0x02, 0x01, 0x95, 0xef, 0x4b, 0xa5, 0x00, 0xf4, 0xed, 0x1e, 0xe8, 0x20, 0x0f, 0xc4, - 0x24, 0xa2, 0x55, 0xb1, 0x26, 0xd6, 0x97, 0xcd, 0xf5, 0x34, 0x51, 0xd7, 0x06, 0x20, 0xe8, 0xb4, - 0xb4, 0x3f, 0x71, 0xcd, 0x5a, 0x0e, 0x40, 0xff, 0xd9, 0x38, 0x96, 0x1f, 0x4b, 0xf2, 0x31, 0xa2, - 0x31, 0x89, 0x90, 0x0b, 0x3a, 0x36, 0xc4, 0x71, 0x84, 0x20, 0xad, 0xce, 0xe4, 0x2a, 0x5b, 0x69, - 0xa2, 0xae, 0x33, 0x95, 0xbf, 0x39, 0x9a, 0x55, 0x9e, 0x24, 0x0f, 0x58, 0x4e, 0x7e, 0x2b, 0x4a, - 0xa5, 0x00, 0x61, 0xdb, 0x07, 0x99, 0x0f, 0xc8, 0x85, 0xb4, 0x5a, 0xa8, 0x15, 0xea, 0x8b, 0x3b, - 0xb7, 0x74, 0x6e, 0x48, 0xe6, 0x9e, 0xce, 0xdd, 0xd3, 0x1f, 0x40, 0x77, 0x9f, 0x20, 0x6c, 0x1e, - 0x5e, 0x24, 0xaa, 0x90, 0x26, 0x6a, 0x85, 0xb7, 0x7c, 0x53, 0x41, 0xfb, 0xf0, 0x4d, 0xbd, 0xed, - 0xa3, 0xf8, 0xb8, 0xeb, 0xe8, 0x2e, 0x09, 0xb8, 0xb1, 0xfc, 0xaf, 0x41, 0xbd, 0x13, 0xee, 0x0d, - 0xd7, 0xa2, 0xd6, 0x52, 0x80, 0xf0, 0x23, 0x40, 0xdb, 0xf9, 0xf5, 0xf2, 0x0b, 0x69, 0xc5, 0x89, - 0x90, 0xe7, 0x43, 0x1b, 0xf6, 0xa1, 0xdb, 0x8d, 0x49, 0x54, 0x9d, 0xad, 0x89, 0xf5, 0xa2, 0x79, - 0x2f, 0x4d, 0xd4, 0xff, 0xd8, 0x7d, 0x53, 0x04, 0xed, 0xcb, 0xc7, 0x46, 0x85, 0xb7, 0xbb, 0xe7, - 0x79, 0x11, 0xa4, 0xf4, 0x49, 0x1c, 0x21, 0xec, 0x9f, 0x5d, 0x9f, 0x6f, 0x8b, 0x56, 0x89, 0xd1, - 0x0f, 0x38, 0x5b, 0xde, 0x97, 0xe6, 0x80, 0x17, 0x20, 0x5c, 0x9d, 0xcb, 0x75, 0x1b, 0x69, 0xa2, - 0x2e, 0x31, 0xdd, 0x3c, 0xfd, 0x0f, 0x35, 0x56, 0xdb, 0xda, 0x7c, 0x7f, 0xaa, 0x0a, 0x3f, 0x4f, - 0x55, 0xf1, 0xcd, 0xf5, 0xf9, 0x76, 0x69, 0xb4, 0xa7, 0x6c, 0xca, 0xda, 0xa7, 0x19, 0xa9, 0x38, - 0x1e, 0x99, 0x7c, 0x47, 0x5a, 0x08, 0x08, 0x46, 0x27, 0x30, 0xca, 0x87, 0x5d, 0x34, 0xe5, 0x34, - 0x51, 0x4b, 0xdc, 0x39, 0x06, 0x68, 0xd6, 0x88, 0x22, 0x3f, 0x94, 0x56, 0x49, 0x08, 0xa3, 0xac, - 0xd2, 0x06, 0xec, 0xfa, 0x7c, 0xba, 0x45, 0x73, 0x33, 0x4d, 0xd4, 0xff, 0x59, 0xd9, 0x34, 0x43, - 0xb3, 0x56, 0x46, 0x29, 0xde, 0xb2, 0x1c, 0x4b, 0xab, 0x2e, 0xc1, 0x14, 0x62, 0xda, 0xa5, 0x76, - 0xd8, 0x75, 0x4e, 0xe0, 0xa0, 0x5a, 0xa8, 0x89, 0xf5, 0xc5, 0x9d, 0x8a, 0xce, 0xf6, 0x58, 0x1f, - 0xed, 0xb1, 0xbe, 0x87, 0x07, 0xe6, 0xee, 0x44, 0x7d, 0xba, 0x4e, 0xfb, 0x3c, 0x71, 0xc4, 0x8d, - 0x06, 0x61, 0x4c, 0xf4, 0x76, 0xd7, 0x39, 0x84, 0x03, 0x6b, 0x65, 0x4c, 0x6d, 0xe7, 0x4c, 0xf9, - 0xae, 0x24, 0x65, 0x29, 0x3b, 0x24, 0xaf, 0x20, 0x1b, 0x5c, 0xc1, 0x5c, 0x4b, 0x13, 0xb5, 0x3c, - 0x51, 0x66, 0x98, 0x66, 0x15, 0xb3, 0xa0, 0x9d, 0x9d, 0x5b, 0x4b, 0xaf, 0x4f, 0x55, 0x81, 0x1b, - 0x2a, 0x68, 0xb6, 0xb4, 0x3a, 0x36, 0xef, 0x69, 0xe8, 0x81, 0x18, 0x52, 0xf9, 0x40, 0x5a, 0xe8, - 0xb2, 0x63, 0x55, 0xcc, 0xf7, 0xb3, 0xa6, 0x4f, 0xbe, 0x38, 0x3d, 0xfb, 0xe2, 0xf4, 0xa9, 0x1a, - 0xb3, 0x98, 0xed, 0x28, 0x9b, 0xd9, 0xa8, 0xb6, 0x35, 0x9b, 0x5d, 0x60, 0x1e, 0x5d, 0xfc, 0x50, - 0x84, 0xb3, 0xa1, 0x22, 0x5e, 0x0c, 0x15, 0xf1, 0x72, 0xa8, 0x88, 0xdf, 0x87, 0x8a, 0xf8, 0xee, - 0x4a, 0x11, 0x2e, 0xaf, 0x14, 0xe1, 0xeb, 0x95, 0x22, 0x3c, 0x6f, 0xdc, 0xd8, 0xdf, 0xec, 0xa5, - 0x41, 0xa0, 0xd1, 0x01, 0x0e, 0x35, 0x8e, 0xda, 0xf9, 0xb3, 0xd4, 0x1f, 0x3f, 0x4c, 0xf9, 0x2a, - 0x3b, 0xf3, 0xb9, 0x93, 0xbb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x2f, 0xa5, 0x7e, 0xb7, - 0x04, 0x00, 0x00, + // 810 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x3f, 0x6f, 0xe4, 0x44, + 0x14, 0x5f, 0xdf, 0xe6, 0xee, 0xd8, 0x49, 0xb2, 0x49, 0x46, 0x39, 0xd8, 0x24, 0x77, 0xf6, 0xca, + 0x55, 0x74, 0xb0, 0x63, 0xed, 0x1d, 0x12, 0x22, 0x15, 0xe7, 0x10, 0xd0, 0xe9, 0x10, 0xb7, 0x32, + 0x82, 0x82, 0xc6, 0x8c, 0xed, 0x89, 0x33, 0xca, 0x7a, 0xc6, 0xf2, 0xcc, 0x2e, 0xd9, 0x6f, 0x80, + 0x68, 0xa0, 0xa4, 0x4c, 0x79, 0xa2, 0xba, 0xe2, 0x3a, 0xbe, 0x40, 0x44, 0x75, 0xa2, 0xa2, 0x32, + 0xb0, 0x29, 0x42, 0x45, 0xe1, 0x4f, 0x80, 0x3c, 0x33, 0xfb, 0x87, 0x45, 0x88, 0x66, 0x77, 0xde, + 0xfb, 0xfd, 0xde, 0x1f, 0xff, 0xde, 0x9b, 0x01, 0x0f, 0x78, 0x4e, 0x19, 0x95, 0x1e, 0xcf, 0xe3, + 0x33, 0x3a, 0x4c, 0xbc, 0x71, 0xdf, 0x93, 0x93, 0x9c, 0x08, 0x94, 0x17, 0x5c, 0x72, 0xb8, 0xa3, + 0x61, 0x64, 0x60, 0x34, 0xee, 0xef, 0xef, 0xe0, 0x8c, 0x32, 0xee, 0xa9, 0x5f, 0xcd, 0xda, 0xb7, + 0x63, 0x2e, 0x32, 0x2e, 0xbc, 0x08, 0x0b, 0xe2, 0x8d, 0xfb, 0x11, 0x91, 0xb8, 0xef, 0xc5, 0x9c, + 0x32, 0x83, 0xef, 0x69, 0x3c, 0x54, 0x96, 0xa7, 0x0d, 0x03, 0xed, 0xa6, 0x3c, 0xe5, 0xda, 0x5f, + 0x9f, 0x66, 0x01, 0x29, 0xe7, 0xe9, 0x90, 0x78, 0xca, 0x8a, 0x46, 0xa7, 0x1e, 0x66, 0x13, 0x03, + 0x1d, 0x48, 0xc2, 0x12, 0x52, 0x64, 0x94, 0x49, 0x0f, 0x47, 0x31, 0x5d, 0x6e, 0x77, 0xff, 0xfe, + 0xfc, 0x6b, 0xce, 0xb8, 0x90, 0x2b, 0x1f, 0xe3, 0xfe, 0xd5, 0x04, 0x77, 0x06, 0xb8, 0xc0, 0x99, + 0x80, 0x1f, 0x80, 0x76, 0x86, 0x2f, 0xc2, 0x31, 0x1e, 0xd2, 0x04, 0x4b, 0x5e, 0x88, 0x8e, 0xd5, + 0xb5, 0x0e, 0x37, 0xfd, 0xbd, 0xaa, 0x74, 0xee, 0x4d, 0x70, 0x36, 0x3c, 0x72, 0xff, 0x89, 0xbb, + 0xc1, 0x66, 0x86, 0x2f, 0xbe, 0x98, 0xdb, 0xf0, 0x13, 0x00, 0xcf, 0xa8, 0x90, 0xbc, 0xa0, 0x31, + 0x1e, 0x86, 0x84, 0xc9, 0x82, 0x12, 0xd1, 0xb9, 0xa5, 0xb2, 0x3c, 0xa8, 0x4a, 0x67, 0x4f, 0x67, + 0xf9, 0x37, 0xc7, 0x0d, 0x76, 0x16, 0xce, 0x13, 0xed, 0x83, 0xdf, 0x59, 0xa0, 0x9d, 0x51, 0x16, + 0xa6, 0xb8, 0x56, 0x89, 0xc6, 0x44, 0x74, 0x9a, 0xdd, 0xe6, 0xe1, 0xfa, 0xa3, 0xfb, 0xc8, 0xc8, + 0x55, 0x6b, 0x8b, 0x8c, 0xb6, 0xe8, 0x43, 0x12, 0x1f, 0x73, 0xca, 0xfc, 0x67, 0x57, 0xa5, 0xd3, + 0xa8, 0x4a, 0x67, 0xd7, 0xb4, 0xbc, 0x9c, 0xc1, 0xfd, 0xf1, 0x37, 0xe7, 0xed, 0x94, 0xca, 0xb3, + 0x51, 0x84, 0x62, 0x9e, 0x19, 0xd9, 0xcd, 0x5f, 0x4f, 0x24, 0xe7, 0x46, 0x1b, 0x93, 0x4b, 0x04, + 0x1b, 0x19, 0x65, 0x1f, 0x63, 0x31, 0x50, 0xe5, 0xe1, 0x57, 0x60, 0x2b, 0x2a, 0x68, 0x92, 0x92, + 0x90, 0x5c, 0x90, 0x78, 0x24, 0x79, 0xd1, 0x59, 0xeb, 0x5a, 0x87, 0x2d, 0xff, 0xbd, 0xaa, 0x74, + 0xde, 0xd4, 0xf5, 0x56, 0x08, 0xee, 0x2f, 0xaf, 0x7a, 0xbb, 0xa6, 0xdd, 0x27, 0x49, 0x52, 0x10, + 0x21, 0x3e, 0x93, 0x05, 0x65, 0xe9, 0x8b, 0x9b, 0x97, 0x0f, 0xad, 0xa0, 0xad, 0xe9, 0x27, 0x86, + 0x0d, 0x8f, 0xc1, 0x6d, 0x9c, 0x64, 0x94, 0x75, 0x6e, 0xab, 0xbc, 0xbd, 0xaa, 0x74, 0x36, 0x74, + 0x5e, 0xe5, 0xfe, 0x9f, 0x6c, 0x3a, 0xf6, 0xe8, 0xe0, 0x87, 0x4b, 0xa7, 0xf1, 0xe7, 0xa5, 0x63, + 0x7d, 0x7b, 0xf3, 0xf2, 0x61, 0x7b, 0xb6, 0xc5, 0x7a, 0xca, 0xee, 0x4f, 0xb7, 0x40, 0x6b, 0x3e, + 0x32, 0xf8, 0x0e, 0xb8, 0x9b, 0x71, 0x46, 0xcf, 0x49, 0xa1, 0x86, 0xdd, 0xf2, 0x61, 0x55, 0x3a, + 0x6d, 0xa3, 0x9c, 0x06, 0xdc, 0x60, 0x46, 0x81, 0x1f, 0x81, 0x6d, 0x9e, 0x93, 0xa2, 0x8e, 0x0c, + 0xb1, 0x2e, 0xaf, 0xa6, 0xdb, 0xf2, 0x0f, 0xaa, 0xd2, 0x79, 0x4b, 0x87, 0xad, 0x32, 0xdc, 0x60, + 0x6b, 0xe6, 0x32, 0x2d, 0x43, 0x09, 0xb6, 0x63, 0xce, 0x04, 0x61, 0x62, 0x24, 0xc2, 0x7c, 0x14, + 0x9d, 0x93, 0x49, 0xa7, 0xd9, 0xb5, 0x0e, 0xd7, 0x1f, 0xed, 0x22, 0xbd, 0xe5, 0x68, 0xb6, 0xe5, + 0xe8, 0x09, 0x9b, 0xf8, 0x8f, 0x17, 0xd9, 0x57, 0xe3, 0xdc, 0x9f, 0x17, 0x8a, 0xc4, 0xc5, 0x24, + 0x97, 0x1c, 0x0d, 0x46, 0xd1, 0x33, 0x32, 0x09, 0xb6, 0xe6, 0xd4, 0x81, 0x62, 0xc2, 0x77, 0x01, + 0xa8, 0x5d, 0x61, 0xce, 0xbf, 0x26, 0x7a, 0x70, 0x4d, 0xff, 0x5e, 0x55, 0x3a, 0x3b, 0x8b, 0xcc, + 0x1a, 0x73, 0x83, 0x56, 0x6d, 0x0c, 0xea, 0xf3, 0xd1, 0xc6, 0x37, 0x97, 0x4e, 0xc3, 0x08, 0xda, + 0x70, 0x43, 0xb0, 0x3d, 0x17, 0xef, 0xf3, 0x3c, 0xc1, 0x92, 0x08, 0x78, 0x02, 0xee, 0x8e, 0xf4, + 0xb1, 0x63, 0xa9, 0xfd, 0xec, 0xa2, 0xc5, 0x7d, 0x44, 0xf5, 0x7d, 0x44, 0x2b, 0x31, 0x7e, 0xab, + 0xde, 0x51, 0x3d, 0xb3, 0x59, 0xec, 0xd1, 0x9a, 0x2a, 0xf0, 0xca, 0x02, 0xc0, 0x57, 0x3b, 0xf1, + 0x94, 0x9d, 0x72, 0x78, 0x00, 0x5a, 0x66, 0xa1, 0x68, 0xa2, 0x26, 0xb4, 0x16, 0xbc, 0xa1, 0x1d, + 0x4f, 0x13, 0xf8, 0x3e, 0x58, 0x37, 0x60, 0x2d, 0xb5, 0x99, 0x44, 0xe7, 0xbf, 0x56, 0x24, 0x00, + 0x9a, 0x5c, 0x3b, 0xe1, 0xa7, 0x60, 0xd3, 0x84, 0xc6, 0x9c, 0x9d, 0xd2, 0xd4, 0xc8, 0x6f, 0xa3, + 0xf9, 0xdb, 0x56, 0x3f, 0x16, 0x68, 0xdc, 0x47, 0xba, 0x99, 0x63, 0xc5, 0x5a, 0xee, 0x7b, 0x23, + 0x5a, 0x06, 0x9e, 0x5f, 0xfd, 0x61, 0x37, 0x5e, 0x4c, 0x6d, 0xeb, 0x6a, 0x6a, 0x5b, 0xaf, 0xa7, + 0xb6, 0xf5, 0xfb, 0xd4, 0xb6, 0xbe, 0xbf, 0xb6, 0x1b, 0xaf, 0xaf, 0xed, 0xc6, 0xaf, 0xd7, 0x76, + 0xe3, 0xcb, 0xde, 0xd2, 0xb5, 0xab, 0x4b, 0x50, 0xdc, 0x1b, 0xe2, 0x48, 0x78, 0xcf, 0x07, 0xea, + 0x75, 0xba, 0x98, 0xbf, 0xb6, 0xea, 0x06, 0x46, 0x77, 0xd4, 0x02, 0x3c, 0xfe, 0x3b, 0x00, 0x00, + 0xff, 0xff, 0xf7, 0xdc, 0xa8, 0x40, 0x8c, 0x05, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -265,6 +315,36 @@ func (this *Params) Equal(that interface{}) bool { } return true } +func (this *BridgeInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BridgeInfo) + if !ok { + that2, ok := that.(BridgeInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.BridgeId != that1.BridgeId { + return false + } + if this.BridgeAddr != that1.BridgeAddr { + return false + } + if !this.BridgeConfig.Equal(&that1.BridgeConfig) { + return false + } + return true +} func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -417,6 +497,51 @@ func (m *ValidatorUpdates) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *BridgeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BridgeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BridgeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.BridgeConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.BridgeAddr) > 0 { + i -= len(m.BridgeAddr) + copy(dAtA[i:], m.BridgeAddr) + i = encodeVarintTypes(dAtA, i, uint64(len(m.BridgeAddr))) + i-- + dAtA[i] = 0x12 + } + if m.BridgeId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BridgeId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -496,6 +621,24 @@ func (m *ValidatorUpdates) Size() (n int) { return n } +func (m *BridgeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BridgeId != 0 { + n += 1 + sovTypes(uint64(m.BridgeId)) + } + l = len(m.BridgeAddr) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.BridgeConfig.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -941,6 +1084,140 @@ func (m *ValidatorUpdates) Unmarshal(dAtA []byte) error { } return nil } +func (m *BridgeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BridgeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BridgeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeId", wireType) + } + m.BridgeId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BridgeId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BridgeAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BridgeConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ophost/types/bridge_config.go b/x/ophost/types/bridge_config.go index c3d0bb0c..f40b35b3 100644 --- a/x/ophost/types/bridge_config.go +++ b/x/ophost/types/bridge_config.go @@ -39,3 +39,35 @@ func (config BridgeConfig) Validate(ac address.Codec) error { return nil } + +func (config BridgeConfig) ValidateWithNoAddrValidation() error { + if len(config.Proposer) == 0 { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "proposer must be set") + } + + if len(config.Challenger) == 0 { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "challenger must be set") + } + + if len(config.BatchInfo.Chain) == 0 { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch chain must be set") + } + + if len(config.BatchInfo.Submitter) == 0 { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch submitter must be set") + } + + if config.FinalizationPeriod == time.Duration(0) { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "finalization period must be greater than 0") + } + + if config.SubmissionInterval == time.Duration(0) { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "submission interval must be greater than 0") + } + + if config.SubmissionStartTime.IsZero() { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "submission start time must be set") + } + + return nil +} From b1905ecee383039abee7e7c200a1f37108e19ee6 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:01:16 +0900 Subject: [PATCH 03/13] feat: add cli and setup script update (#47) * add cli and setup script update * fix to use l2 at tx broadcasting * add Readme * disallow bridge id/addr change --------- Co-authored-by: JSHan94 --- bots/README.md | 1 + bots/package-lock.json | 24 +++---- bots/package.json | 2 +- bots/src/scripts/setupL2.ts | 51 ++++++++++++- x/opchild/client/cli/tx.go | 106 ++++++++++++++++++++++++++++ x/opchild/client/cli/tx_test.go | 83 ++++++++++++++++++++++ x/opchild/keeper/msg_server.go | 20 ++++++ x/opchild/keeper/msg_server_test.go | 18 +++++ 8 files changed, 290 insertions(+), 15 deletions(-) diff --git a/bots/README.md b/bots/README.md index 0c5d650c..4e438c77 100644 --- a/bots/README.md +++ b/bots/README.md @@ -25,6 +25,7 @@ import { MsgCreateBridge, BridgeConfig, Duration } from '@initia/initia.js'; const bridgeConfig = new BridgeConfig( challenger.key.accAddress, outputSubmitter.key.accAddress, + new BatchInfo(batchSubmitter.accAddress, config.PUBLISH_BATCH_TARGET), Duration.fromString(submissionInterval.toString()), Duration.fromString(finalizedTime.toString()), new Date(), diff --git a/bots/package-lock.json b/bots/package-lock.json index c9ee0c1d..c38919b9 100644 --- a/bots/package-lock.json +++ b/bots/package-lock.json @@ -47,7 +47,7 @@ "winston-daily-rotate-file": "^5.0.0" }, "devDependencies": { - "@initia/initia.js": "^0.1.41", + "@initia/initia.js": "^0.1.43", "@koa/cors": "^5.0.0", "@sentry/node": "^7.109.0", "@testcontainers/postgresql": "^10.8.1", @@ -1038,13 +1038,13 @@ } }, "node_modules/@initia/initia.js": { - "version": "0.1.41", - "resolved": "https://registry.npmjs.org/@initia/initia.js/-/initia.js-0.1.41.tgz", - "integrity": "sha512-bjrG8/E5snPSVRJm/kOxmQctxbvk7d3grgbWlRJHRBML/YfyoNfHn8MEMU5Ao1cNFjpPqJCFz4UBEyS2fusisA==", + "version": "0.1.43", + "resolved": "https://registry.npmjs.org/@initia/initia.js/-/initia.js-0.1.43.tgz", + "integrity": "sha512-yidwLbHp1JTdOC14tsRLeG0ND7EWBBzIwvsyPNrPeeYmgizVRnl8z/SrGferVg0J7muYd2qX0eJmr0McwNcA8g==", "dev": true, "dependencies": { - "@initia/initia.proto": "^0.1.31", - "@initia/opinit.proto": "^0.0.3", + "@initia/initia.proto": "^0.1.32", + "@initia/opinit.proto": "^0.0.6", "@ledgerhq/hw-transport": "^6.27.12", "@ledgerhq/hw-transport-webhid": "^6.27.12", "@ledgerhq/hw-transport-webusb": "^6.27.12", @@ -1067,9 +1067,9 @@ } }, "node_modules/@initia/initia.proto": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/@initia/initia.proto/-/initia.proto-0.1.31.tgz", - "integrity": "sha512-jCGI6ToowfoeecJL4mG26aNg99UETUovcJFOeTl6+Z0BvqHCAgb0tbO2fpD9lFBzTe2sYEVjAJh3X4QJu6Cxtg==", + "version": "0.1.32", + "resolved": "https://registry.npmjs.org/@initia/initia.proto/-/initia.proto-0.1.32.tgz", + "integrity": "sha512-Ue0Kzrpdg6p5p0EREiYEcBScAr3Dz/QGyrPiJEjrC5SROTHK5vLljPjMUUqkaF5L8NR98wW/8sDgKj3+DmrkuA==", "dev": true, "dependencies": { "@improbable-eng/grpc-web": "^0.15.0", @@ -1079,9 +1079,9 @@ } }, "node_modules/@initia/opinit.proto": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@initia/opinit.proto/-/opinit.proto-0.0.3.tgz", - "integrity": "sha512-JDZz9124Y+WvjTl+jXQgq0CczqGwbaxSEsyfo/Gt/7wbh34GWbhZhKFiAzD8ABTLT3NIxxfw0BBlXOKHj2xfVw==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@initia/opinit.proto/-/opinit.proto-0.0.6.tgz", + "integrity": "sha512-Ij7tnOXUHkugOnhAvx8xrqS1/fgUe6y4TIrlHyEwBvTQ2KHFoj/BwrKEIwrliicWJA5n3xxj9K4fxJeIhQWuiw==", "dev": true, "dependencies": { "@improbable-eng/grpc-web": "^0.15.0", diff --git a/bots/package.json b/bots/package.json index 51562135..69b41bdd 100644 --- a/bots/package.json +++ b/bots/package.json @@ -43,7 +43,7 @@ }, "homepage": "https://github.com/initia-labs/batch-submitter#readme", "devDependencies": { - "@initia/initia.js": "^0.1.41", + "@initia/initia.js": "^0.1.43", "@koa/cors": "^5.0.0", "@sentry/node": "^7.109.0", "@testcontainers/postgresql": "^10.8.1", diff --git a/bots/src/scripts/setupL2.ts b/bots/src/scripts/setupL2.ts index 4895360a..125503a8 100644 --- a/bots/src/scripts/setupL2.ts +++ b/bots/src/scripts/setupL2.ts @@ -1,4 +1,13 @@ -import { MsgCreateBridge, BridgeConfig, Duration, Wallet, MnemonicKey } from '@initia/initia.js'; +import { + MsgCreateBridge, + BridgeConfig, + BatchInfo, + Duration, + Wallet, + MnemonicKey, + BridgeInfo, + MsgSetBridgeInfo +} from '@initia/initia.js'; import { sendTx } from 'lib/tx'; import { config } from 'config'; @@ -6,6 +15,10 @@ export const executor = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) ); +export const executorL2 = new Wallet( + config.l2lcd, + new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) +); export const challenger = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) @@ -14,6 +27,9 @@ export const outputSubmitter = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) ); +export const batchSubmitter = new MnemonicKey({ + mnemonic: config.BATCH_SUBMITTER_MNEMONIC +}); class L2Initializer { bridgeId = config.BRIDGE_ID; @@ -28,6 +44,7 @@ class L2Initializer { const bridgeConfig = new BridgeConfig( challenger.key.accAddress, outputSubmitter.key.accAddress, + new BatchInfo(batchSubmitter.accAddress, config.PUBLISH_BATCH_TARGET), Duration.fromString(submissionInterval.toString()), Duration.fromString(finalizedTime.toString()), new Date(), @@ -36,12 +53,42 @@ class L2Initializer { return new MsgCreateBridge(executor.key.accAddress, bridgeConfig); } + MsgSetBridgeInfo(bridgeInfo: BridgeInfo) { + return new MsgSetBridgeInfo(executorL2.key.accAddress, bridgeInfo); + } + async initialize() { const msgs = [ this.MsgCreateBridge(this.submissionInterval, this.finalizedTime) ]; - await sendTx(executor, msgs); + const txRes = await sendTx(executor, msgs); + + // load bridge info from l1 chain and send to l2 chain + let bridgeID = 0; + const txInfo = await config.l1lcd.tx.txInfo(txRes.txhash); + for (const e of txInfo.events) { + if (e.type !== "create_bridge") { + continue + } + + for (const attr of e.attributes) { + if (attr.key !== "bridge_id") { + continue + } + + bridgeID = parseInt(attr.value, 10) + } + + break + } + + const bridgeInfo = await config.l1lcd.ophost.bridgeInfo(bridgeID); + const l2Msgs = [ + this.MsgSetBridgeInfo(bridgeInfo) + ]; + + await sendTx(executorL2, l2Msgs); } } diff --git a/x/opchild/client/cli/tx.go b/x/opchild/client/cli/tx.go index e7aacd79..9706e759 100644 --- a/x/opchild/client/cli/tx.go +++ b/x/opchild/client/cli/tx.go @@ -1,9 +1,12 @@ package cli import ( + "encoding/json" "fmt" + "os" "strconv" "strings" + "time" "cosmossdk.io/core/address" "github.com/spf13/cobra" @@ -13,7 +16,10 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" + "github.com/initia-labs/OPinit/x/opchild/types" + ophostcli "github.com/initia-labs/OPinit/x/ophost/client/cli" + ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" ) // GetTxCmd returns a root CLI command handler for all x/opchild transaction commands. @@ -30,6 +36,7 @@ func GetTxCmd(ac address.Codec) *cobra.Command { NewExecuteMessagesCmd(ac), NewDepositCmd(ac), NewWithdrawCmd(ac), + NewSetBridgeInfoCmd(ac), ) return opchildTxCmd @@ -202,6 +209,105 @@ Where proposal.json contains: return cmd } +// NewSetBridgeInfoCmd returns a CLI command handler for transaction to setting a bridge info. +func NewSetBridgeInfoCmd(ac address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "set-bridge-info [bridge-id] [bridge-addr] [path/to/bridge-config.json]", + Short: "send a bridge creating tx", + Long: strings.TrimSpace( + fmt.Sprintf( + `send a tx to set a bridge info with a config file as a json. + Example: + $ %s tx ophost set-bridge-info 1 init10d07y265gmmuvt4z0w9aw880jnsr700j55nka3 path/to/bridge-config.json + + Where bridge-config.json contains: + { + "challenger": "bech32-address", + "proposer": "bech32-addresss", + "submission_interval": "duration", + "finalization_period": "duration", + "submission_start_time" : "rfc3339-datetime", + "batch_info": {"submitter": "bech32-address","chain": "l1|celestia"}, + "metadata": "{\"perm_channels\":[{\"port_id\":\"transfer\", \"channel_id\":\"channel-0\"}, {\"port_id\":\"icqhost\", \"channel_id\":\"channel-1\"}]}" + }`, version.AppName, + ), + ), + Args: cobra.ExactArgs(3), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + bridgeId, err := strconv.ParseUint(args[0], 10, 64) + if err != nil { + return err + } + + bridgeAddr := args[1] + + configBytes, err := os.ReadFile(args[2]) + if err != nil { + return err + } + + origConfig := ophostcli.BridgeConfig{} + err = json.Unmarshal(configBytes, &origConfig) + if err != nil { + return err + } + + submissionInterval, err := time.ParseDuration(origConfig.SubmissionInterval) + if err != nil { + return err + } + + finalizationPeriod, err := time.ParseDuration(origConfig.FinalizationPeriod) + if err != nil { + return err + } + + submissionStartTime, err := time.Parse(time.RFC3339, origConfig.SubmissionStartTime) + if err != nil { + return err + } + + bridgeConfig := ophosttypes.BridgeConfig{ + Challenger: origConfig.Challenger, + Proposer: origConfig.Proposer, + SubmissionInterval: submissionInterval, + FinalizationPeriod: finalizationPeriod, + SubmissionStartTime: submissionStartTime, + BatchInfo: origConfig.BatchInfo, + Metadata: []byte(origConfig.Metadata), + } + if err = bridgeConfig.ValidateWithNoAddrValidation(); err != nil { + return err + } + + fromAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + msg := types.NewMsgSetBridgeInfo(fromAddr, types.BridgeInfo{ + BridgeId: bridgeId, + BridgeAddr: bridgeAddr, + BridgeConfig: bridgeConfig, + }) + if err = msg.Validate(ac); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + func newBuildWithdrawMsg(clientCtx client.Context, ac address.Codec, txf tx.Factory, to sdk.AccAddress, amount sdk.Coin) (tx.Factory, *types.MsgInitiateTokenWithdrawal, error) { sender := clientCtx.GetFromAddress() senderAddr, err := ac.BytesToString(sender) diff --git a/x/opchild/client/cli/tx_test.go b/x/opchild/client/cli/tx_test.go index b39d0341..ae48a71b 100644 --- a/x/opchild/client/cli/tx_test.go +++ b/x/opchild/client/cli/tx_test.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "os" "testing" "cosmossdk.io/core/address" @@ -404,6 +405,88 @@ func (s *CLITestSuite) TestNewExecuteMessagesCmd() { } } +func (s *CLITestSuite) TestNewSetBridgeInfo() { + require := s.Require() + cmd := cli.NewSetBridgeInfoCmd(s.ac) + + addr0, err := s.ac.BytesToString(s.addrs[0]) + s.NoError(err) + + invalidConfig, err := os.CreateTemp("/tmp", "bridge_config") + require.NoError(err) + defer os.Remove(invalidConfig.Name()) + validConfig, err := os.CreateTemp("/tmp", "bridge_config") + require.NoError(err) + defer os.Remove(validConfig.Name()) + + invalidConfig.WriteString(`{}`) + validConfig.WriteString(`{ + "challenger": "init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g", + "proposer": "init1k2svyvm60r8rhnzr9vemk5f6fksvm6tyeujp3c", + "submission_interval": "100s", + "finalization_period": "1000s", + "submission_start_time" : "2023-12-01T00:00:00Z", + "metadata": "channel-0", + "batch_info": { + "submitter": "init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g", + "chain": "l1" + } + }`) + + testCases := []struct { + name string + args []string + expectErr bool + expectedCode uint32 + respType proto.Message + }{ + { + "invalid transaction (invalid bridge config)", + []string{ + "1", + "init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g", + invalidConfig.Name(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, addr0), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))).String()), + }, + true, 0, &sdk.TxResponse{}, + }, + { + "valid transaction", + []string{ + "1", + "init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g", + validConfig.Name(), + fmt.Sprintf("--%s=%s", flags.FlagFrom, addr0), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(10))).String()), + }, + false, 0, &sdk.TxResponse{}, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + out, err := clitestutil.ExecTestCLICmd(s.clientCtx, cmd, tc.args) + if tc.expectErr { + require.Error(err) + } else { + require.NoError(err, "test: %s\noutput: %s", tc.name, out.String()) + err = s.clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType) + require.NoError(err, out.String(), "test: %s, output\n:", tc.name, out.String()) + + txResp := tc.respType.(*sdk.TxResponse) + require.Equal(tc.expectedCode, txResp.Code, + "test: %s, output\n:", tc.name, out.String()) + } + }) + } +} + func TestCLITestSuite(t *testing.T) { suite.Run(t, new(CLITestSuite)) } diff --git a/x/opchild/keeper/msg_server.go b/x/opchild/keeper/msg_server.go index ae843511..08a1b99b 100644 --- a/x/opchild/keeper/msg_server.go +++ b/x/opchild/keeper/msg_server.go @@ -297,10 +297,30 @@ func (ms MsgServer) SetBridgeInfo(ctx context.Context, req *types.MsgSetBridgeIn return nil, err } + // check bridge id and addr consistency + if ok, err := ms.BridgeInfo.Has(ctx); err != nil { + return nil, err + } else if ok { + info, err := ms.BridgeInfo.Get(ctx) + if err != nil { + return nil, err + } + + if info.BridgeId != req.BridgeInfo.BridgeId { + return nil, types.ErrInvalidBridgeInfo.Wrapf("expected bridge id %d, got %d", info.BridgeId, req.BridgeInfo.BridgeId) + } + + if info.BridgeAddr != req.BridgeInfo.BridgeAddr { + return nil, types.ErrInvalidBridgeInfo.Wrapf("expected bridge addr %s, got %s", info.BridgeAddr, req.BridgeInfo.BridgeAddr) + } + } + + // set bridge info if err := ms.BridgeInfo.Set(ctx, req.BridgeInfo); err != nil { return nil, err } + // emit event sdkCtx := sdk.UnwrapSDKContext(ctx) sdkCtx.EventManager().EmitEvent( sdk.NewEvent( diff --git a/x/opchild/keeper/msg_server_test.go b/x/opchild/keeper/msg_server_test.go index 3609e2c3..4c104222 100644 --- a/x/opchild/keeper/msg_server_test.go +++ b/x/opchild/keeper/msg_server_test.go @@ -284,11 +284,29 @@ func Test_MsgServer_SetBridgeInfo(t *testing.T) { _, err := ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) require.NoError(t, err) + // reset possible + _, err = ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) + require.NoError(t, err) + // invalid bridge id info.BridgeId = 0 _, err = ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) require.Error(t, err) + + // cannot change bridge id + info.BridgeId = 2 + + _, err = ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) + require.ErrorContains(t, err, "expected bridge id") + + // cannot change bridge addr + info.BridgeId = 1 + info.BridgeAddr = addrsStr[0] + + _, err = ms.SetBridgeInfo(ctx, types.NewMsgSetBridgeInfo(addrsStr[0], info)) + require.Error(t, err) + require.ErrorContains(t, err, "expected bridge addr") } func Test_MsgServer_Deposit_NoHook(t *testing.T) { From 1a494620f55e67c161d5e3b24c7e6f4296b1e4bf Mon Sep 17 00:00:00 2001 From: Geoff Lee Date: Sun, 14 Apr 2024 13:00:35 +0900 Subject: [PATCH 04/13] fix test (#48) --- bots/src/test/utils/Bridge.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bots/src/test/utils/Bridge.ts b/bots/src/test/utils/Bridge.ts index faf5804f..465be59a 100644 --- a/bots/src/test/utils/Bridge.ts +++ b/bots/src/test/utils/Bridge.ts @@ -1,4 +1,4 @@ -import { MsgCreateBridge, BridgeConfig, Duration } from '@initia/initia.js'; +import { MsgCreateBridge, BridgeConfig, Duration, BatchInfo } from '@initia/initia.js'; import { getDB as getExecutorDB, initORM as initExecutorORM @@ -83,6 +83,7 @@ class Bridge { const bridgeConfig = new BridgeConfig( challenger.key.accAddress, outputSubmitter.key.accAddress, + new BatchInfo("submitter", "chain"), Duration.fromString(submissionInterval.toString()), Duration.fromString(finalizedTime.toString()), new Date(), From cc0a5e930954b0ebbe895cd823d67af44c7aa3ab Mon Sep 17 00:00:00 2001 From: Geoff Lee Date: Mon, 15 Apr 2024 11:49:53 +0900 Subject: [PATCH 05/13] Use node instead of ts-node (#49) * fix test * use node instead of ts-node * fix some filenames --- bots/dockerfile | 13 ++++++++---- bots/package-lock.json | 4 ++-- bots/package.json | 12 ++++++----- bots/src/celestia/utils.ts | 2 +- bots/src/config.ts | 2 +- .../controller/executor/ClaimTxController.ts | 8 ++++---- .../executor/DepositTxController.ts | 8 ++++---- .../controller/executor/OutputController.ts | 8 ++++---- .../executor/WithdrawalTxController.ts | 8 ++++---- bots/src/{worker/batchSubmitter => lib}/db.ts | 4 ++-- bots/src/lib/logger.ts | 2 +- .../monitor/helper.ts} | 10 +++++----- bots/src/lib/monitor/index.ts | 1 + .../L1Monitor.ts => lib/monitor/l1.ts} | 12 +++++------ .../L2Monitor.ts => lib/monitor/l2.ts} | 16 +++++++-------- .../Monitor.ts => lib/monitor/monitor.ts} | 8 ++++---- bots/src/lib/query.ts | 2 +- bots/src/lib/slack.ts | 6 +++--- bots/src/lib/types.ts | 6 +++--- bots/src/lib/wallet.ts | 2 +- bots/src/loader/app.ts | 6 +++--- bots/src/scripts/setupL2.ts | 4 ++-- bots/src/service/batch/BatchService.ts | 8 ++++---- bots/src/service/executor/ClaimTxService.ts | 8 ++++---- bots/src/service/executor/DepositTxService.ts | 4 ++-- bots/src/service/executor/OutputService.ts | 4 ++-- .../service/executor/WithdrawalTxService.ts | 4 ++-- bots/src/{sawgger => swagger}/batch_model.ts | 0 .../{sawgger => swagger}/executor_model.ts | 0 bots/src/{sawgger => swagger}/swagger.ts | 8 ++++---- bots/src/test/integration.ts | 10 +++++----- bots/src/test/utils/Bridge.ts | 10 +++++----- bots/src/test/utils/TxBot.ts | 4 ++-- bots/src/test/utils/consts.ts | 4 ++-- bots/src/test/utils/helper.ts | 8 ++++---- .../worker/batchSubmitter/batchSubmitter.ts | 20 +++++++++---------- bots/src/worker/batchSubmitter/index.ts | 10 +++++----- bots/src/worker/bridgeExecutor/Resurrector.ts | 8 ++++---- bots/src/worker/bridgeExecutor/db.ts | 4 ++-- bots/src/worker/bridgeExecutor/index.ts | 14 ++++++------- bots/src/worker/challenger/challenger.ts | 14 ++++++------- bots/src/worker/challenger/db.ts | 4 ++-- bots/src/worker/challenger/index.ts | 12 +++++------ .../{L1Monitor.ts => monitor_l1.ts} | 8 ++++---- .../{L2Monitor.ts => monitor_l2.ts} | 8 ++++---- bots/src/worker/outputSubmitter/db.ts | 4 ++-- bots/src/worker/outputSubmitter/index.ts | 2 +- .../worker/outputSubmitter/outputSubmitter.ts | 16 +++++++-------- bots/tsconfig.json | 2 +- 49 files changed, 175 insertions(+), 167 deletions(-) rename bots/src/{worker/batchSubmitter => lib}/db.ts (91%) rename bots/src/{worker/bridgeExecutor/MonitorHelper.ts => lib/monitor/helper.ts} (96%) create mode 100644 bots/src/lib/monitor/index.ts rename bots/src/{worker/bridgeExecutor/L1Monitor.ts => lib/monitor/l1.ts} (92%) rename bots/src/{worker/bridgeExecutor/L2Monitor.ts => lib/monitor/l2.ts} (93%) rename bots/src/{worker/bridgeExecutor/Monitor.ts => lib/monitor/monitor.ts} (95%) rename bots/src/{sawgger => swagger}/batch_model.ts (100%) rename bots/src/{sawgger => swagger}/executor_model.ts (100%) rename bots/src/{sawgger => swagger}/swagger.ts (58%) rename bots/src/worker/challenger/{L1Monitor.ts => monitor_l1.ts} (93%) rename bots/src/worker/challenger/{L2Monitor.ts => monitor_l2.ts} (94%) diff --git a/bots/dockerfile b/bots/dockerfile index 5e6196b2..ee77da49 100644 --- a/bots/dockerfile +++ b/bots/dockerfile @@ -1,18 +1,23 @@ FROM node:20-alpine AS builder WORKDIR /usr/src/app -COPY package*.json ./ +COPY . . + RUN npm install +RUN npm run build -COPY . . FROM node:20-alpine WORKDIR /usr/src/app -COPY --from=builder /usr/src/app ./ +COPY --from=builder /usr/src/app/dist ./dist +COPY package*.json ./ +RUN npm install + +COPY entrypoint.sh ./ +RUN ["chmod", "+x", "./entrypoint.sh"] EXPOSE 5000 EXPOSE 5001 -RUN ["chmod", "+x", "./entrypoint.sh"] ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/bots/package-lock.json b/bots/package-lock.json index c38919b9..8b6e8364 100644 --- a/bots/package-lock.json +++ b/bots/package-lock.json @@ -1,12 +1,12 @@ { "name": "@initia/rollup", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@initia/rollup", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "@initia/initia.js": "^0.1.41", diff --git a/bots/package.json b/bots/package.json index 69b41bdd..887982f5 100644 --- a/bots/package.json +++ b/bots/package.json @@ -1,16 +1,16 @@ { "name": "@initia/rollup", - "version": "0.1.0", + "version": "0.1.1", "description": "Optimistic rollup for initia", "main": "index.js", "engines": { "node": ">=16" }, "scripts": { - "executor": "export WORKER_NAME=executor && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/worker/bridgeExecutor/index.ts", - "batch": "export WORKER_NAME=batch && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/worker/batchSubmitter/index.ts", - "challenge": "export WORKER_NAME=challenge && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/worker/challengeSubmitter/index.ts", - "output": "export WORKER_NAME=output && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/worker/outputSubmitter/index.ts", + "executor": "WORKER_NAME=executor node dist/worker/bridgeExecutor/index.js", + "batch": "WORKER_NAME=batch node dist/worker/batchSubmitter/index.js", + "challenge": "WORKER_NAME=challenge node dist/worker/challengeSubmitter/index.js", + "output": "WORKER_NAME=output node dist/worker/outputSubmitter/index.js", "test": "jest", "test:integration": "export NODE_ENV=test && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/test/integration.ts", "prettier": "prettier --write ./src/**/**/**/**/*.ts", @@ -18,6 +18,8 @@ "do": "npm run build && node -r tsconfig-paths/register ./dist/loader/generateApiDoc.js", "apidoc": "npm run do", "prepublishOnly": "npm run build", + "build": "tsc --build", + "clean": "tsc --build --clean", "l2setup": "export NODE_ENV=test && npm run build && node ./dist/scripts/setupL2.js" }, "repository": { diff --git a/bots/src/celestia/utils.ts b/bots/src/celestia/utils.ts index 4b7ec53b..2cd20a44 100644 --- a/bots/src/celestia/utils.ts +++ b/bots/src/celestia/utils.ts @@ -1,7 +1,7 @@ import { sequenceLenBytes, shareInfoBytes, shareSize } from './builder'; import { createCommitment } from './commitment'; import { namespaceSize } from './namespace'; -import { config } from 'config'; +import { config } from '../config'; import { Blob } from '@initia/initia.js'; // constants diff --git a/bots/src/config.ts b/bots/src/config.ts index 71afddf7..99509992 100644 --- a/bots/src/config.ts +++ b/bots/src/config.ts @@ -1,5 +1,5 @@ import { LCDClient } from '@initia/initia.js'; -import { validateCelestiaConfig } from 'celestia/utils'; +import { validateCelestiaConfig } from './celestia/utils'; import * as dotenv from 'dotenv'; const envFile = diff --git a/bots/src/controller/executor/ClaimTxController.ts b/bots/src/controller/executor/ClaimTxController.ts index 75afb95d..85496df3 100644 --- a/bots/src/controller/executor/ClaimTxController.ts +++ b/bots/src/controller/executor/ClaimTxController.ts @@ -4,11 +4,11 @@ import { Get, Controller, } from 'koa-joi-controllers'; -import { ErrorTypes } from 'lib/error'; -import { error, success } from 'lib/response'; -import { getClaimTxList } from 'service'; +import { ErrorTypes } from '../../lib/error'; +import { error, success } from '../../lib/response'; +import { getClaimTxList } from '../../service'; import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetClaimResponse } from 'sawgger/executor_model'; +import { GetClaimResponse } from '../../swagger/executor_model'; @Controller('') export class ClaimTxController extends KoaController { diff --git a/bots/src/controller/executor/DepositTxController.ts b/bots/src/controller/executor/DepositTxController.ts index 9a3e0cf6..dd71b301 100644 --- a/bots/src/controller/executor/DepositTxController.ts +++ b/bots/src/controller/executor/DepositTxController.ts @@ -4,11 +4,11 @@ import { Get, Controller, } from 'koa-joi-controllers'; -import { ErrorTypes } from 'lib/error'; -import { error, success } from 'lib/response'; -import { getDepositTxList } from 'service'; +import { ErrorTypes } from '../../lib/error'; +import { error, success } from '../../lib/response'; +import { getDepositTxList } from '../../service'; import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetDepositResponse } from 'sawgger/executor_model'; +import { GetDepositResponse } from '../../swagger/executor_model'; @Controller('') export class DepositTxController extends KoaController { diff --git a/bots/src/controller/executor/OutputController.ts b/bots/src/controller/executor/OutputController.ts index 3696e91c..a08cfff5 100644 --- a/bots/src/controller/executor/OutputController.ts +++ b/bots/src/controller/executor/OutputController.ts @@ -4,11 +4,11 @@ import { Get, Controller, } from 'koa-joi-controllers'; -import { ErrorTypes } from 'lib/error'; -import { error, success } from 'lib/response'; +import { ErrorTypes } from '../../lib/error'; +import { error, success } from '../../lib/response'; import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { getOutputList } from 'service'; -import { GetOutputResponse } from 'sawgger/executor_model'; +import { getOutputList } from '../../service'; +import { GetOutputResponse } from '../../swagger/executor_model'; @Controller('') export class OutputController extends KoaController { diff --git a/bots/src/controller/executor/WithdrawalTxController.ts b/bots/src/controller/executor/WithdrawalTxController.ts index 41954cb3..de72fd32 100644 --- a/bots/src/controller/executor/WithdrawalTxController.ts +++ b/bots/src/controller/executor/WithdrawalTxController.ts @@ -4,11 +4,11 @@ import { Get, Controller, } from 'koa-joi-controllers'; -import { ErrorTypes } from 'lib/error'; -import { error, success } from 'lib/response'; -import { getWithdrawalTxList } from 'service'; +import { ErrorTypes } from '../../lib/error'; +import { error, success } from '../../lib/response'; +import { getWithdrawalTxList } from '../../service'; import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetWithdrawalResponse } from 'sawgger/executor_model'; +import { GetWithdrawalResponse } from '../../swagger/executor_model'; @Controller('') export class WithdrawalTxController extends KoaController { diff --git a/bots/src/worker/batchSubmitter/db.ts b/bots/src/lib/db.ts similarity index 91% rename from bots/src/worker/batchSubmitter/db.ts rename to bots/src/lib/db.ts index d4f5f821..a4d21c84 100644 --- a/bots/src/worker/batchSubmitter/db.ts +++ b/bots/src/lib/db.ts @@ -6,11 +6,11 @@ import { DataSourceOptions } from 'typeorm'; import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import CamelToSnakeNamingStrategy from 'orm/CamelToSnakeNamingStrategy'; +import CamelToSnakeNamingStrategy from '../orm/CamelToSnakeNamingStrategy'; const debug = require('debug')('orm'); -import { RecordEntity, ExecutorOutputEntity } from 'orm'; +import { RecordEntity, ExecutorOutputEntity } from '../orm'; const staticOptions = { supportBigNumbers: true, diff --git a/bots/src/lib/logger.ts b/bots/src/lib/logger.ts index 48d6d53f..3f7ea1b9 100644 --- a/bots/src/lib/logger.ts +++ b/bots/src/lib/logger.ts @@ -1,6 +1,6 @@ import * as winston from 'winston'; import DailyRotateFile from 'winston-daily-rotate-file'; -import { config } from 'config'; +import { config } from '../config'; function createLogger(name: string) { const formats = [winston.format.errors({ stack: true })]; diff --git a/bots/src/worker/bridgeExecutor/MonitorHelper.ts b/bots/src/lib/monitor/helper.ts similarity index 96% rename from bots/src/worker/bridgeExecutor/MonitorHelper.ts rename to bots/src/lib/monitor/helper.ts index 6e71ef42..ed6cb207 100644 --- a/bots/src/worker/bridgeExecutor/MonitorHelper.ts +++ b/bots/src/lib/monitor/helper.ts @@ -1,9 +1,9 @@ import { BlockInfo, Event, LCDClient, TxInfo } from '@initia/initia.js'; -import { getLatestOutputFromExecutor, getOutputFromExecutor } from 'lib/query'; -import { WithdrawStorage } from 'lib/storage'; -import { WithdrawalTx } from 'lib/types'; -import { sha3_256 } from 'lib/util'; -import OutputEntity from 'orm/executor/OutputEntity'; +import { getLatestOutputFromExecutor, getOutputFromExecutor } from '../query'; +import { WithdrawStorage } from '../storage'; +import { WithdrawalTx } from '../types'; +import { sha3_256 } from '../util'; +import OutputEntity from '../../orm/executor/OutputEntity'; import { EntityManager, EntityTarget, ObjectLiteral } from 'typeorm'; class MonitorHelper { diff --git a/bots/src/lib/monitor/index.ts b/bots/src/lib/monitor/index.ts new file mode 100644 index 00000000..210a7414 --- /dev/null +++ b/bots/src/lib/monitor/index.ts @@ -0,0 +1 @@ +export { Monitor } from './monitor'; diff --git a/bots/src/worker/bridgeExecutor/L1Monitor.ts b/bots/src/lib/monitor/l1.ts similarity index 92% rename from bots/src/worker/bridgeExecutor/L1Monitor.ts rename to bots/src/lib/monitor/l1.ts index 57ed55b1..8b3a3761 100644 --- a/bots/src/worker/bridgeExecutor/L1Monitor.ts +++ b/bots/src/lib/monitor/l1.ts @@ -1,16 +1,16 @@ -import { Monitor } from './Monitor'; +import { Monitor } from './monitor'; import { Coin, Msg, MsgFinalizeTokenDeposit } from '@initia/initia.js'; import { ExecutorDepositTxEntity, ExecutorUnconfirmedTxEntity, ExecutorOutputEntity, -} from 'orm'; +} from '../../orm'; import { EntityManager } from 'typeorm'; -import { RPCClient, RPCSocket } from 'lib/rpc'; -import { getDB } from './db'; +import { RPCClient, RPCSocket } from '../rpc'; +import { getDB } from '../../worker/bridgeExecutor/db'; import winston from 'winston'; -import { config } from 'config'; -import { TxWallet, WalletType, getWallet, initWallet } from 'lib/wallet'; +import { config } from '../../config'; +import { TxWallet, WalletType, getWallet, initWallet } from '../wallet'; export class L1Monitor extends Monitor { executor: TxWallet; diff --git a/bots/src/worker/bridgeExecutor/L2Monitor.ts b/bots/src/lib/monitor/l2.ts similarity index 93% rename from bots/src/worker/bridgeExecutor/L2Monitor.ts rename to bots/src/lib/monitor/l2.ts index e2e22b1e..c063d2d2 100644 --- a/bots/src/worker/bridgeExecutor/L2Monitor.ts +++ b/bots/src/lib/monitor/l2.ts @@ -1,14 +1,14 @@ -import { ExecutorOutputEntity, ExecutorWithdrawalTxEntity } from 'orm'; -import { Monitor } from './Monitor'; -import { WithdrawStorage } from 'lib/storage'; -import { WithdrawalTx } from 'lib/types'; +import { ExecutorOutputEntity, ExecutorWithdrawalTxEntity } from '../../orm'; +import { Monitor } from './monitor'; +import { WithdrawStorage } from '../storage'; +import { WithdrawalTx } from '../types'; import { EntityManager } from 'typeorm'; import { BlockInfo } from '@initia/initia.js'; -import { getDB } from './db'; -import { RPCClient, RPCSocket } from 'lib/rpc'; +import { getDB } from '../../worker/bridgeExecutor/db'; +import { RPCClient, RPCSocket } from '../rpc'; import winston from 'winston'; -import { config } from 'config'; -import { getBridgeInfo } from 'lib/query'; +import { config } from '../../config'; +import { getBridgeInfo } from '../query'; export class L2Monitor extends Monitor { submissionInterval: number; diff --git a/bots/src/worker/bridgeExecutor/Monitor.ts b/bots/src/lib/monitor/monitor.ts similarity index 95% rename from bots/src/worker/bridgeExecutor/Monitor.ts rename to bots/src/lib/monitor/monitor.ts index 0691c554..9f84c4bf 100644 --- a/bots/src/worker/bridgeExecutor/Monitor.ts +++ b/bots/src/lib/monitor/monitor.ts @@ -1,10 +1,10 @@ import Bluebird from 'bluebird'; -import { RPCClient, RPCSocket } from 'lib/rpc'; -import { StateEntity } from 'orm'; +import { RPCClient, RPCSocket } from '../rpc'; +import { StateEntity } from '../../orm'; import { DataSource, EntityManager } from 'typeorm'; -import MonitorHelper from './MonitorHelper'; +import MonitorHelper from './helper'; import winston from 'winston'; -import { INTERVAL_MONITOR, config } from 'config'; +import { INTERVAL_MONITOR, config } from '../../config'; const MAX_BLOCKS = 20; // DO NOT CHANGE THIS, hard limit is 20 in cometbft. const MAX_RETRY_INTERVAL = 30_000; diff --git a/bots/src/lib/query.ts b/bots/src/lib/query.ts index 76d62e04..f970f7b2 100644 --- a/bots/src/lib/query.ts +++ b/bots/src/lib/query.ts @@ -1,5 +1,5 @@ import { BridgeInfo, OutputInfo, TokenPair } from '@initia/initia.js'; -import { config } from 'config'; +import { config } from '../config'; import { DepositTxResponse, OutputResponse, diff --git a/bots/src/lib/slack.ts b/bots/src/lib/slack.ts index c902e345..ec5b8af0 100644 --- a/bots/src/lib/slack.ts +++ b/bots/src/lib/slack.ts @@ -1,11 +1,11 @@ import { Wallet } from '@initia/initia.js'; import axios from 'axios'; import BigNumber from 'bignumber.js'; -import { config } from 'config'; +import { config } from '../config'; import * as http from 'http'; import * as https from 'https'; -import UnconfirmedTxEntity from 'orm/executor/UnconfirmedTxEntity'; -import { ChallengedOutputEntity } from 'orm/index'; +import UnconfirmedTxEntity from '../orm/executor/UnconfirmedTxEntity'; +import { ChallengedOutputEntity } from '../orm/index'; const ax = axios.create({ httpAgent: new http.Agent({ keepAlive: true }), diff --git a/bots/src/lib/types.ts b/bots/src/lib/types.ts index 887b8872..509275f8 100644 --- a/bots/src/lib/types.ts +++ b/bots/src/lib/types.ts @@ -1,6 +1,6 @@ -import DepositTxEntity from 'orm/executor/DepositTxEntity'; -import WithdrawalTxEntity from 'orm/executor/WithdrawalTxEntity'; -import { ExecutorOutputEntity } from 'orm/index'; +import DepositTxEntity from '../orm/executor/DepositTxEntity'; +import WithdrawalTxEntity from '../orm/executor/WithdrawalTxEntity'; +import { ExecutorOutputEntity } from '../orm/index'; export interface WithdrawalTx { bridge_id: bigint; diff --git a/bots/src/lib/wallet.ts b/bots/src/lib/wallet.ts index eb86575b..8516d45c 100644 --- a/bots/src/lib/wallet.ts +++ b/bots/src/lib/wallet.ts @@ -8,7 +8,7 @@ import { Coins } from '@initia/initia.js'; import { sendTx } from './tx'; -import { config } from 'config'; +import { config } from '../config'; import { buildNotEnoughBalanceNotification, notifySlack } from './slack'; export enum WalletType { diff --git a/bots/src/loader/app.ts b/bots/src/loader/app.ts index 174a88c2..57c1fed1 100644 --- a/bots/src/loader/app.ts +++ b/bots/src/loader/app.ts @@ -7,10 +7,10 @@ import morgan from 'koa-morgan' // import helmet from 'koa-helmet' import serve from 'koa-static' import mount from 'koa-mount' -import { APIError, ErrorTypes, errorHandler } from 'lib/error' -import { error } from 'lib/response' +import { APIError, ErrorTypes, errorHandler } from '../lib/error' +import { error } from '../lib/response' import { KoaController, configureRoutes } from 'koa-joi-controllers' -import { router as swaggerRouter } from 'sawgger/swagger' +import { router as swaggerRouter } from '../swagger/swagger' const notFoundMiddleware: Koa.Middleware = (ctx) => { ctx.status = 404 diff --git a/bots/src/scripts/setupL2.ts b/bots/src/scripts/setupL2.ts index 125503a8..d9886483 100644 --- a/bots/src/scripts/setupL2.ts +++ b/bots/src/scripts/setupL2.ts @@ -8,8 +8,8 @@ import { BridgeInfo, MsgSetBridgeInfo } from '@initia/initia.js'; -import { sendTx } from 'lib/tx'; -import { config } from 'config'; +import { sendTx } from '../lib/tx'; +import { config } from '../config'; export const executor = new Wallet( config.l1lcd, diff --git a/bots/src/service/batch/BatchService.ts b/bots/src/service/batch/BatchService.ts index 10d61937..f293083d 100644 --- a/bots/src/service/batch/BatchService.ts +++ b/bots/src/service/batch/BatchService.ts @@ -1,7 +1,7 @@ -import { RecordEntity } from 'orm'; -import { APIError, ErrorTypes } from 'lib/error'; -import { getDB } from 'worker/batchSubmitter/db'; -import { config } from 'config'; +import { RecordEntity } from '../../orm'; +import { APIError, ErrorTypes } from '../../lib/error'; +import { getDB } from '../../lib/db'; +import { config } from '../../config'; interface L1BatchInfo { type: 'l1'; diff --git a/bots/src/service/executor/ClaimTxService.ts b/bots/src/service/executor/ClaimTxService.ts index 772abca4..ef5db9e0 100644 --- a/bots/src/service/executor/ClaimTxService.ts +++ b/bots/src/service/executor/ClaimTxService.ts @@ -1,10 +1,10 @@ import { ExecutorWithdrawalTxEntity, ExecutorOutputEntity, -} from 'orm'; -import { getDB } from 'worker/bridgeExecutor/db'; -import { APIError, ErrorTypes } from 'lib/error'; -import { sha3_256 } from 'lib/util'; +} from '../../orm'; +import { getDB } from '../../lib/db'; +import { APIError, ErrorTypes } from '../../lib/error'; +import { sha3_256 } from '../../lib/util'; interface ClaimTx { diff --git a/bots/src/service/executor/DepositTxService.ts b/bots/src/service/executor/DepositTxService.ts index 696d9f90..2478f3ad 100644 --- a/bots/src/service/executor/DepositTxService.ts +++ b/bots/src/service/executor/DepositTxService.ts @@ -1,5 +1,5 @@ -import { ExecutorDepositTxEntity } from 'orm'; -import { getDB } from 'worker/bridgeExecutor/db'; +import { ExecutorDepositTxEntity } from '../../orm'; +import { getDB } from '../../lib/db'; export interface GetDepositTxListParam { sequence?: number diff --git a/bots/src/service/executor/OutputService.ts b/bots/src/service/executor/OutputService.ts index 0e4b3e58..a5984d84 100644 --- a/bots/src/service/executor/OutputService.ts +++ b/bots/src/service/executor/OutputService.ts @@ -1,5 +1,5 @@ -import { ExecutorOutputEntity } from 'orm'; -import { getDB } from 'worker/bridgeExecutor/db'; +import { ExecutorOutputEntity } from '../../orm'; +import { getDB } from '../../lib/db'; export interface GetOutputListParam { output_index?: number diff --git a/bots/src/service/executor/WithdrawalTxService.ts b/bots/src/service/executor/WithdrawalTxService.ts index babd1fb8..42633805 100644 --- a/bots/src/service/executor/WithdrawalTxService.ts +++ b/bots/src/service/executor/WithdrawalTxService.ts @@ -1,5 +1,5 @@ -import { ExecutorWithdrawalTxEntity } from 'orm'; -import { getDB } from 'worker/bridgeExecutor/db'; +import { ExecutorWithdrawalTxEntity } from '../../orm'; +import { getDB } from '../../lib/db'; export interface GetWithdrawalTxListParam { sequence?: number diff --git a/bots/src/sawgger/batch_model.ts b/bots/src/swagger/batch_model.ts similarity index 100% rename from bots/src/sawgger/batch_model.ts rename to bots/src/swagger/batch_model.ts diff --git a/bots/src/sawgger/executor_model.ts b/bots/src/swagger/executor_model.ts similarity index 100% rename from bots/src/sawgger/executor_model.ts rename to bots/src/swagger/executor_model.ts diff --git a/bots/src/sawgger/swagger.ts b/bots/src/swagger/swagger.ts similarity index 58% rename from bots/src/sawgger/swagger.ts rename to bots/src/swagger/swagger.ts index 8be3a2fc..229e3f56 100644 --- a/bots/src/sawgger/swagger.ts +++ b/bots/src/swagger/swagger.ts @@ -1,8 +1,8 @@ import { SwaggerRouter } from 'koa-swagger-decorator' -import { DepositTxController } from 'controller/executor/DepositTxController' -import { OutputController } from 'controller/executor/OutputController' -import { WithdrawalTxController } from 'controller/executor/WithdrawalTxController' -import { ClaimTxController } from 'controller/executor/ClaimTxController' +import { DepositTxController } from '../controller/executor/DepositTxController' +import { OutputController } from '../controller/executor/OutputController' +import { WithdrawalTxController } from '../controller/executor/WithdrawalTxController' +import { ClaimTxController } from '../controller/executor/ClaimTxController' const router = new SwaggerRouter({ spec: { diff --git a/bots/src/test/integration.ts b/bots/src/test/integration.ts index a29c1818..7cb41ab6 100644 --- a/bots/src/test/integration.ts +++ b/bots/src/test/integration.ts @@ -1,12 +1,12 @@ import Bridge from './utils/Bridge'; -import { config } from 'config'; +import { config } from '../config'; import { TxBot } from './utils/TxBot'; import { Coin } from '@initia/initia.js'; -import { startBatch } from 'worker/batchSubmitter'; -import { startExecutor } from 'worker/bridgeExecutor'; -import { startOutput } from 'worker/outputSubmitter'; +import { startBatch } from '../worker/batchSubmitter'; +import { startExecutor } from '../worker/bridgeExecutor'; +import { startOutput } from '../worker/outputSubmitter'; import { delay } from 'bluebird'; -import { getTokenPairByL1Denom } from 'lib/query'; +import { getTokenPairByL1Denom } from '../lib/query'; const SUBMISSION_INTERVAL = 5; const FINALIZATION_PERIOD = 5; diff --git a/bots/src/test/utils/Bridge.ts b/bots/src/test/utils/Bridge.ts index 465be59a..aed98831 100644 --- a/bots/src/test/utils/Bridge.ts +++ b/bots/src/test/utils/Bridge.ts @@ -2,15 +2,15 @@ import { MsgCreateBridge, BridgeConfig, Duration, BatchInfo } from '@initia/init import { getDB as getExecutorDB, initORM as initExecutorORM -} from 'worker/bridgeExecutor/db'; +} from '../../worker/bridgeExecutor/db'; import { getDB as getChallengerDB, initORM as initChallengerORM -} from 'worker/challenger/db'; +} from '../../worker/challenger/db'; import { getDB as getBatchDB, initORM as initBatchORM -} from 'worker/batchSubmitter/db'; +} from '../../lib/db'; import { DataSource, EntityManager } from 'typeorm'; import { ExecutorOutputEntity, @@ -26,9 +26,9 @@ import { ChallengedOutputEntity, RecordEntity, ChallengeEntity -} from 'orm'; +} from '../../orm'; import { executor, challenger, outputSubmitter } from './helper'; -import { sendTx } from 'lib/tx'; +import { sendTx } from '../../lib/tx'; class Bridge { executorDB: DataSource; diff --git a/bots/src/test/utils/TxBot.ts b/bots/src/test/utils/TxBot.ts index ac6890bf..e82d9a20 100644 --- a/bots/src/test/utils/TxBot.ts +++ b/bots/src/test/utils/TxBot.ts @@ -5,8 +5,8 @@ import { MsgInitiateTokenWithdrawal } from '@initia/initia.js'; import { makeFinalizeMsg } from './helper'; -import { sendTx } from 'lib/tx'; -import { getOutputFromExecutor, getWithdrawalTxFromExecutor } from 'lib/query'; +import { sendTx } from '../../lib/tx'; +import { getOutputFromExecutor, getWithdrawalTxFromExecutor } from '../../lib/query'; import { L1_SENDER, L2_RECEIVER } from './consts'; export class TxBot { diff --git a/bots/src/test/utils/consts.ts b/bots/src/test/utils/consts.ts index 40a8e087..7f466c5e 100644 --- a/bots/src/test/utils/consts.ts +++ b/bots/src/test/utils/consts.ts @@ -1,6 +1,6 @@ import { MnemonicKey } from '@initia/initia.js'; -import { config } from 'config'; -import { TxWallet } from 'lib/wallet'; +import { config } from '../../config'; +import { TxWallet } from '../../lib/wallet'; export const { DEPOSITOR_MNEMONIC } = process.env; diff --git a/bots/src/test/utils/helper.ts b/bots/src/test/utils/helper.ts index 5584eb3f..7c2e97b3 100644 --- a/bots/src/test/utils/helper.ts +++ b/bots/src/test/utils/helper.ts @@ -7,10 +7,10 @@ import { Coin } from '@initia/initia.js'; -import { config } from 'config'; -import { sha3_256 } from 'lib/util'; -import { ExecutorOutputEntity } from 'orm/index'; -import WithdrawalTxEntity from 'orm/executor/WithdrawalTxEntity'; +import { config } from '../../config'; +import { sha3_256 } from '../../lib/util'; +import { ExecutorOutputEntity } from '../../orm/index'; +import WithdrawalTxEntity from '../../orm/executor/WithdrawalTxEntity'; export const bcs = BCS.getInstance(); export const executor = new Wallet( diff --git a/bots/src/worker/batchSubmitter/batchSubmitter.ts b/bots/src/worker/batchSubmitter/batchSubmitter.ts index 01eaea0d..1025078b 100644 --- a/bots/src/worker/batchSubmitter/batchSubmitter.ts +++ b/bots/src/worker/batchSubmitter/batchSubmitter.ts @@ -1,9 +1,9 @@ -import { getDB } from './db'; +import { getDB } from '../../lib/db'; import { DataSource, EntityManager } from 'typeorm'; -import { batchLogger, batchLogger as logger } from 'lib/logger'; -import { BlockBulk, RawCommit, RPCClient } from 'lib/rpc'; -import { compress } from 'lib/compressor'; -import { ExecutorOutputEntity, RecordEntity } from 'orm'; +import { batchLogger, batchLogger as logger } from '../../lib/logger'; +import { BlockBulk, RawCommit, RPCClient } from '../../lib/rpc'; +import { compress } from '../../lib/compressor'; +import { ExecutorOutputEntity, RecordEntity } from '../../orm'; import { Wallet, MnemonicKey, @@ -15,11 +15,11 @@ import { TxAPI, } from '@initia/initia.js'; import { delay } from 'bluebird'; -import { INTERVAL_BATCH } from 'config'; -import { config } from 'config'; -import { sendRawTx } from 'lib/tx'; -import MonitorHelper from 'worker/bridgeExecutor/MonitorHelper'; -import { createBlob, getCelestiaFeeGasLimit } from 'celestia/utils'; +import { INTERVAL_BATCH } from '../../config'; +import { config } from '../../config'; +import { sendRawTx } from '../../lib/tx'; +import MonitorHelper from '../../lib/monitor/helper'; +import { createBlob, getCelestiaFeeGasLimit } from '../../celestia/utils'; import { bech32 } from 'bech32'; const base = 200000; diff --git a/bots/src/worker/batchSubmitter/index.ts b/bots/src/worker/batchSubmitter/index.ts index 21b3be63..40acab76 100644 --- a/bots/src/worker/batchSubmitter/index.ts +++ b/bots/src/worker/batchSubmitter/index.ts @@ -1,10 +1,10 @@ -import { initORM, finalizeORM } from './db'; -import { executorLogger as logger } from 'lib/logger'; +import { initORM, finalizeORM } from '../../lib/db'; +import { executorLogger as logger } from '../../lib/logger'; import { BatchSubmitter } from './batchSubmitter'; -import { initServer, finalizeServer } from 'loader'; -import { batchController } from 'controller'; +import { initServer, finalizeServer } from '../../loader'; +import { batchController } from '../../controller'; import { once } from 'lodash'; -import { config } from 'config'; +import { config } from '../../config'; let jobs: BatchSubmitter[] = []; diff --git a/bots/src/worker/bridgeExecutor/Resurrector.ts b/bots/src/worker/bridgeExecutor/Resurrector.ts index 3fb4ed9f..4be80067 100644 --- a/bots/src/worker/bridgeExecutor/Resurrector.ts +++ b/bots/src/worker/bridgeExecutor/Resurrector.ts @@ -1,12 +1,12 @@ import { getDB } from './db'; -import UnconfirmedTxEntity from 'orm/executor/UnconfirmedTxEntity'; +import UnconfirmedTxEntity from '../../orm/executor/UnconfirmedTxEntity'; import { Coin, MsgFinalizeTokenDeposit } from '@initia/initia.js'; -import { INTERVAL_MONITOR, config } from 'config'; +import { INTERVAL_MONITOR, config } from '../../config'; import { DataSource } from 'typeorm'; import Bluebird from 'bluebird'; import winston from 'winston'; -import { TxWallet, WalletType, getWallet, initWallet } from 'lib/wallet'; -import { buildFailedTxNotification, notifySlack } from 'lib/slack'; +import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet'; +import { buildFailedTxNotification, notifySlack } from '../../lib/slack'; export class Resurrector { private db: DataSource; diff --git a/bots/src/worker/bridgeExecutor/db.ts b/bots/src/worker/bridgeExecutor/db.ts index 557e2783..bbfa325b 100644 --- a/bots/src/worker/bridgeExecutor/db.ts +++ b/bots/src/worker/bridgeExecutor/db.ts @@ -8,7 +8,7 @@ import { import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; import { executorLogger as logger } from '../../lib/logger'; -import CamelToSnakeNamingStrategy from 'orm/CamelToSnakeNamingStrategy'; +import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy'; import { ExecutorOutputEntity, @@ -16,7 +16,7 @@ import { ExecutorDepositTxEntity, ExecutorUnconfirmedTxEntity, StateEntity, -} from 'orm'; +} from '../../orm'; const staticOptions = { supportBigNumbers: true, diff --git a/bots/src/worker/bridgeExecutor/index.ts b/bots/src/worker/bridgeExecutor/index.ts index 78cde30a..41a379b6 100644 --- a/bots/src/worker/bridgeExecutor/index.ts +++ b/bots/src/worker/bridgeExecutor/index.ts @@ -1,13 +1,13 @@ -import { RPCClient, RPCSocket } from 'lib/rpc'; -import { L1Monitor } from './L1Monitor'; -import { L2Monitor } from './L2Monitor'; -import { executorController } from 'controller'; +import { RPCClient, RPCSocket } from '../../lib/rpc'; +import { L1Monitor } from '../../lib/monitor/l1'; +import { L2Monitor } from '../../lib/monitor/l2'; +import { executorController } from '../../controller'; -import { executorLogger as logger } from 'lib/logger'; +import { executorLogger as logger } from '../../lib/logger'; import { initORM, finalizeORM } from './db'; -import { initServer, finalizeServer } from 'loader'; +import { initServer, finalizeServer } from '../../loader'; import { once } from 'lodash'; -import { config } from 'config'; +import { config } from '../../config'; import { Resurrector } from './Resurrector'; let monitors; diff --git a/bots/src/worker/challenger/challenger.ts b/bots/src/worker/challenger/challenger.ts index a18a98d4..a7a4b242 100644 --- a/bots/src/worker/challenger/challenger.ts +++ b/bots/src/worker/challenger/challenger.ts @@ -8,20 +8,20 @@ import { ChallengerWithdrawalTxEntity, ChallengedOutputEntity, ChallengeEntity, -} from 'orm'; +} from '../../orm'; import { delay } from 'bluebird'; -import { challengerLogger as logger } from 'lib/logger'; -import { INTERVAL_MONITOR, config } from 'config'; +import { challengerLogger as logger } from '../../lib/logger'; +import { INTERVAL_MONITOR, config } from '../../config'; import { EntityManager } from 'typeorm'; import { getLastOutputInfo, getOutputInfoByIndex, getBridgeInfo -} from 'lib/query'; -import MonitorHelper from 'worker/bridgeExecutor/MonitorHelper'; +} from '../../lib/query'; +import MonitorHelper from 'lib/monitor/helper'; import winston from 'winston'; -import { TxWallet, WalletType, getWallet, initWallet } from 'lib/wallet'; -import { buildChallengerNotification, notifySlack } from 'lib/slack'; +import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet'; +import { buildChallengerNotification, notifySlack } from '../../lib/slack'; const THRESHOLD_MISS_INTERVAL = 5; diff --git a/bots/src/worker/challenger/db.ts b/bots/src/worker/challenger/db.ts index 72bbfd56..4149bdbb 100644 --- a/bots/src/worker/challenger/db.ts +++ b/bots/src/worker/challenger/db.ts @@ -6,7 +6,7 @@ import { DataSourceOptions } from 'typeorm'; import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import CamelToSnakeNamingStrategy from 'orm/CamelToSnakeNamingStrategy'; +import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy'; const debug = require('debug')('orm'); @@ -19,7 +19,7 @@ import { ChallengerFinalizeDepositTxEntity, ChallengerFinalizeWithdrawalTxEntity, ChallengeEntity, -} from 'orm'; +} from '../../orm'; const staticOptions = { supportBigNumbers: true, diff --git a/bots/src/worker/challenger/index.ts b/bots/src/worker/challenger/index.ts index 9c5a6a1c..bcde88f8 100644 --- a/bots/src/worker/challenger/index.ts +++ b/bots/src/worker/challenger/index.ts @@ -1,12 +1,12 @@ -import { RPCClient, RPCSocket } from 'lib/rpc'; -import { L1Monitor } from './L1Monitor'; -import { Monitor } from 'worker/bridgeExecutor/Monitor'; +import { RPCClient, RPCSocket } from '../../lib/rpc'; +import { Monitor } from '../../lib/monitor'; import { Challenger } from './challenger'; import { initORM, finalizeORM } from './db'; -import { challengerLogger as logger } from 'lib/logger'; +import { challengerLogger as logger } from '../../lib/logger'; import { once } from 'lodash'; -import { L2Monitor } from './L2Monitor'; -import { config } from 'config'; +import { L1Monitor } from './monitor_l1'; +import { L2Monitor } from './monitor_l2'; +import { config } from '../../config'; let monitors: (Monitor | Challenger)[]; diff --git a/bots/src/worker/challenger/L1Monitor.ts b/bots/src/worker/challenger/monitor_l1.ts similarity index 93% rename from bots/src/worker/challenger/L1Monitor.ts rename to bots/src/worker/challenger/monitor_l1.ts index 726b05e7..31583a16 100644 --- a/bots/src/worker/challenger/L1Monitor.ts +++ b/bots/src/worker/challenger/monitor_l1.ts @@ -1,13 +1,13 @@ -import { Monitor } from 'worker/bridgeExecutor/Monitor'; +import { Monitor } from '../../lib/monitor'; import { ChallengerDepositTxEntity, ChallengerFinalizeWithdrawalTxEntity -} from 'orm'; +} from '../../orm'; import { EntityManager } from 'typeorm'; -import { RPCClient, RPCSocket } from 'lib/rpc'; +import { RPCClient, RPCSocket } from '../../lib/rpc'; import { getDB } from './db'; import winston from 'winston'; -import { config } from 'config'; +import { config } from '../../config'; export class L1Monitor extends Monitor { constructor( diff --git a/bots/src/worker/challenger/L2Monitor.ts b/bots/src/worker/challenger/monitor_l2.ts similarity index 94% rename from bots/src/worker/challenger/L2Monitor.ts rename to bots/src/worker/challenger/monitor_l2.ts index 6fdc44c6..fc4cf8b6 100644 --- a/bots/src/worker/challenger/L2Monitor.ts +++ b/bots/src/worker/challenger/monitor_l2.ts @@ -2,14 +2,14 @@ import { ChallengerFinalizeDepositTxEntity, ChallengerOutputEntity, ChallengerWithdrawalTxEntity -} from 'orm'; +} from '../../orm'; import { OutputInfo } from '@initia/initia.js'; -import { Monitor } from 'worker/bridgeExecutor/Monitor'; +import { Monitor } from '../../lib/monitor'; import { EntityManager } from 'typeorm'; -import { RPCClient, RPCSocket } from 'lib/rpc'; +import { RPCClient, RPCSocket } from '../../lib/rpc'; import winston from 'winston'; import { getDB } from './db'; -import { config } from 'config'; +import { config } from '../../config'; export class L2Monitor extends Monitor { outputIndex: number; diff --git a/bots/src/worker/outputSubmitter/db.ts b/bots/src/worker/outputSubmitter/db.ts index 4dd5c06c..5c97facd 100644 --- a/bots/src/worker/outputSubmitter/db.ts +++ b/bots/src/worker/outputSubmitter/db.ts @@ -6,11 +6,11 @@ import { DataSourceOptions } from 'typeorm'; import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import CamelToSnakeNamingStrategy from 'orm/CamelToSnakeNamingStrategy'; +import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy'; const debug = require('debug')('orm'); -import { ExecutorOutputEntity } from 'orm'; +import { ExecutorOutputEntity } from '../../orm'; const staticOptions = { supportBigNumbers: true, diff --git a/bots/src/worker/outputSubmitter/index.ts b/bots/src/worker/outputSubmitter/index.ts index d7a90bb7..cdfc5b5e 100644 --- a/bots/src/worker/outputSubmitter/index.ts +++ b/bots/src/worker/outputSubmitter/index.ts @@ -1,5 +1,5 @@ import { OutputSubmitter } from './outputSubmitter'; -import { outputLogger as logger } from 'lib/logger'; +import { outputLogger as logger } from '../../lib/logger'; import { once } from 'lodash'; import { initORM } from './db'; diff --git a/bots/src/worker/outputSubmitter/outputSubmitter.ts b/bots/src/worker/outputSubmitter/outputSubmitter.ts index bfc31f27..eb7ba1fe 100644 --- a/bots/src/worker/outputSubmitter/outputSubmitter.ts +++ b/bots/src/worker/outputSubmitter/outputSubmitter.ts @@ -1,15 +1,15 @@ import { MsgProposeOutput } from '@initia/initia.js'; -import { INTERVAL_OUTPUT } from 'config'; -import { ExecutorOutputEntity } from 'orm'; +import { INTERVAL_OUTPUT } from '../../config'; +import { ExecutorOutputEntity } from '../../orm'; import { delay } from 'bluebird'; -import { outputLogger as logger } from 'lib/logger'; -import { ErrorTypes } from 'lib/error'; -import { config } from 'config'; -import { getLastOutputInfo } from 'lib/query'; -import MonitorHelper from 'worker/bridgeExecutor/MonitorHelper'; +import { outputLogger as logger } from '../../lib/logger'; +import { ErrorTypes } from '../../lib/error'; +import { config } from '../../config'; +import { getLastOutputInfo } from '../../lib/query'; +import MonitorHelper from '../../lib/monitor/helper'; import { DataSource, EntityManager } from 'typeorm'; import { getDB } from './db'; -import { TxWallet, WalletType, getWallet, initWallet } from 'lib/wallet'; +import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet'; export class OutputSubmitter { private db: DataSource; diff --git a/bots/tsconfig.json b/bots/tsconfig.json index b4acaf0e..d7f4bb0e 100644 --- a/bots/tsconfig.json +++ b/bots/tsconfig.json @@ -22,5 +22,5 @@ } }, "include": ["src/**/*.ts", "test", "lib", "test/**/*.ts", "src/worker/bridgeExecutor/db.ts"], - "exclude": ["node_modules", "apidoc", "dist", "./src/**/*.spec.ts"] + "exclude": ["node_modules", "apidoc", "dist", "./src/**/*.spec.ts", "./src/test"] } From af1d0f3663ae9bbb09687e344f171c9fff37cf3c Mon Sep 17 00:00:00 2001 From: Harvey Date: Tue, 16 Apr 2024 11:24:49 +0900 Subject: [PATCH 06/13] feat: add ENABLE_API_ONLY config and fix batch controller (#45) * add WORKER_MODE config and fix batch controller * convert to ENABLE_API_ONLY * remove semi from lint --------- Co-authored-by: Geoff Lee --- bots/.eslintrc.js | 52 ++-- bots/README.md | 2 + bots/package.json | 6 +- bots/src/celestia/builder.ts | 102 ++++---- bots/src/celestia/commitment.ts | 60 ++--- bots/src/celestia/hasher.ts | 154 ++++++------ bots/src/celestia/merkle.ts | 164 ++++++------- bots/src/celestia/namespace.ts | 43 ++-- bots/src/celestia/share.ts | 42 ++-- bots/src/celestia/utils.ts | 74 +++--- bots/src/config.ts | 57 +++-- bots/src/controller/batch/BatchController.ts | 38 +-- .../controller/executor/ClaimTxController.ts | 26 +- .../executor/DepositTxController.ts | 26 +- .../controller/executor/OutputController.ts | 26 +- .../executor/WithdrawalTxController.ts | 30 +-- bots/src/controller/index.ts | 16 +- bots/src/lib/compressor.spec.ts | 20 +- bots/src/lib/compressor.ts | 14 +- bots/src/lib/db.ts | 38 +-- bots/src/lib/error.ts | 52 ++-- bots/src/lib/logger.ts | 32 +-- bots/src/lib/monitor/helper.ts | 110 ++++----- bots/src/lib/monitor/index.ts | 2 +- bots/src/lib/monitor/l1.ts | 84 +++---- bots/src/lib/monitor/l2.ts | 106 ++++---- bots/src/lib/monitor/monitor.ts | 100 ++++---- bots/src/lib/query.ts | 56 ++--- bots/src/lib/response.ts | 22 +- bots/src/lib/rpc.ts | 210 ++++++++-------- bots/src/lib/slack.ts | 94 ++++---- bots/src/lib/storage.spec.ts | 35 ++- bots/src/lib/storage.ts | 70 +++--- bots/src/lib/tx.ts | 22 +- bots/src/lib/types.ts | 6 +- bots/src/lib/util.ts | 38 +-- bots/src/lib/wallet.ts | 71 +++--- bots/src/loader/app.ts | 4 +- bots/src/loader/index.ts | 4 +- bots/src/loader/server.ts | 20 +- bots/src/orm/CamelToSnakeNamingStrategy.ts | 21 +- bots/src/orm/RecordEntity.ts | 12 +- bots/src/orm/StateEntity.ts | 6 +- bots/src/orm/challenger/ChallengeEntity.ts | 10 +- .../src/orm/challenger/DeletedOutputEntity.ts | 8 +- bots/src/orm/challenger/DepositTxEntity.ts | 16 +- .../orm/challenger/FinalizeDepositTxEntity.ts | 14 +- .../challenger/FinalizeWithdrawalTxEntity.ts | 18 +- bots/src/orm/challenger/OutputEntity.ts | 16 +- bots/src/orm/challenger/WithdrawalTxEntity.ts | 22 +- bots/src/orm/executor/DepositTxEntity.ts | 22 +- bots/src/orm/executor/OutputEntity.ts | 16 +- bots/src/orm/executor/UnconfirmedTxEntity.ts | 26 +- bots/src/orm/executor/WithdrawalTxEntity.ts | 22 +- bots/src/orm/index.ts | 57 +++-- bots/src/sawgger/batch_model.ts | 36 +++ bots/src/scripts/setupL2.ts | 64 +++-- bots/src/service/batch/BatchService.ts | 36 +-- bots/src/service/executor/ClaimTxService.ts | 192 +++++++-------- bots/src/service/executor/DepositTxService.ts | 50 ++-- bots/src/service/executor/OutputService.ts | 52 ++-- .../service/executor/WithdrawalTxService.ts | 48 ++-- bots/src/service/index.ts | 10 +- bots/src/swagger/executor_model.ts | 94 ++++---- bots/src/swagger/swagger.ts | 14 +- bots/src/test/integration.ts | 62 ++--- bots/src/test/utils/Bridge.ts | 84 +++---- bots/src/test/utils/TxBot.ts | 41 ++-- bots/src/test/utils/consts.ts | 12 +- bots/src/test/utils/helper.ts | 22 +- .../worker/batchSubmitter/batchSubmitter.ts | 228 +++++++++--------- bots/src/worker/batchSubmitter/index.ts | 58 ++--- bots/src/worker/bridgeExecutor/Resurrector.ts | 76 +++--- bots/src/worker/bridgeExecutor/db.ts | 48 ++-- bots/src/worker/bridgeExecutor/index.ts | 68 +++--- bots/src/worker/challenger/challenger.ts | 205 ++++++++-------- bots/src/worker/challenger/db.ts | 42 ++-- bots/src/worker/challenger/index.ts | 54 ++--- bots/src/worker/challenger/monitor_l1.ts | 60 ++--- bots/src/worker/challenger/monitor_l2.ts | 71 +++--- bots/src/worker/outputSubmitter/db.ts | 38 +-- bots/src/worker/outputSubmitter/index.ts | 38 +-- .../worker/outputSubmitter/outputSubmitter.ts | 82 +++---- 83 files changed, 2198 insertions(+), 2101 deletions(-) create mode 100644 bots/src/sawgger/batch_model.ts diff --git a/bots/.eslintrc.js b/bots/.eslintrc.js index 40c3d17a..bbbd375b 100644 --- a/bots/.eslintrc.js +++ b/bots/.eslintrc.js @@ -1,24 +1,30 @@ module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - ], - rules: { - '@typescript-eslint/camelcase': 'off', - '@typescript-eslint/no-namespace': 'off', - 'no-inner-declarations': 'off', - // TODO: we have to figure out how to use eslint without below rules - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - }, - }; - \ No newline at end of file + root: true, + env: { + browser: true, + node: true, + jasmine: true, + }, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + ], + rules: { + '@typescript-eslint/camelcase': 'off', + '@typescript-eslint/no-namespace': 'off', + 'no-inner-declarations': 'off', + 'semi': ['error', 'never'], + '@typescript-eslint/semi': ['error', 'never'], + // TODO: we have to figure out how to use eslint without below rules + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + }, +}; diff --git a/bots/README.md b/bots/README.md index 4e438c77..8b01293f 100644 --- a/bots/README.md +++ b/bots/README.md @@ -55,6 +55,7 @@ You should set `.env` file for each bot in `bots/worker`. To transfer assets bet | SLACK_WEB_HOOK | Slack web hook for notification (optional) | '' | | EXECUTOR_L1_MONITOR_HEIGHT | L1 monitor start height (optional) | 0 | | EXECUTOR_L2_MONITOR_HEIGHT | L2 monitor start height (optional) | 0 | +| ENABLE_API_ONLY | Enable API only mode (optional) | false | > Note that if `EXECUTOR_L1_MONITOR_HEIGHT` and `EXECUTOR_L2_MONITOR_HEIGHT` are not set, `executor` will start monitoring from height stored on `state` table. If you want to start monitoring from specific height, you should set them in `.env.executor` file. @@ -88,6 +89,7 @@ You should set `.env` file for each bot in `bots/worker`. To transfer assets bet | BATCH_DENOM | Fee denom for DA chain | | | CELESTIA_NAMESPACE_ID | Celestia namespace id (optional) | '' | | PUBLISH_BATCH_TARGET | Target chain to publish batch (supports: ['l1', 'celestia']) | 'l1' | +| ENABLE_API_ONLY | Enable API only mode (optional) | false | - `.env.challenger` diff --git a/bots/package.json b/bots/package.json index 887982f5..c865c23d 100644 --- a/bots/package.json +++ b/bots/package.json @@ -13,8 +13,8 @@ "output": "WORKER_NAME=output node dist/worker/outputSubmitter/index.js", "test": "jest", "test:integration": "export NODE_ENV=test && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/test/integration.ts", - "prettier": "prettier --write ./src/**/**/**/**/*.ts", - "lint": "eslint src --ext .js,.jsx,.ts,.tsx", + "prettier": "prettier --write './src/**/*.ts'", + "lint": "eslint --fix src", "do": "npm run build && node -r tsconfig-paths/register ./dist/loader/generateApiDoc.js", "apidoc": "npm run do", "prepublishOnly": "npm run build", @@ -29,7 +29,7 @@ "lint-staged": { "./src/**/*.ts": [ "prettier --write", - "eslint" + "eslint --fix" ] }, "prettier": { diff --git a/bots/src/celestia/builder.ts b/bots/src/celestia/builder.ts index 56bd73ff..fdb31127 100644 --- a/bots/src/celestia/builder.ts +++ b/bots/src/celestia/builder.ts @@ -1,71 +1,71 @@ -import { Namespace } from './namespace'; -import { Share } from './share'; +import { Namespace } from './namespace' +import { Share } from './share' // builder constants -export const sequenceLenBytes = 4; -const compactShareReservedBytes = 4; -export const shareInfoBytes = 1; -export const shareSize = 512; -const maxShareVersion = 127; +export const sequenceLenBytes = 4 +const compactShareReservedBytes = 4 +export const shareInfoBytes = 1 +export const shareSize = 512 +const maxShareVersion = 127 export class Builder { - private isCompactShare: boolean; - private rawShareData: Uint8Array; + private isCompactShare: boolean + private rawShareData: Uint8Array constructor( private namespace: Namespace, private shareVersion: number, private isFirstShare: boolean ) { - this.isCompactShare = namespace.isTx() || namespace.isPayForBlob(); - this.rawShareData = new Uint8Array(); + this.isCompactShare = namespace.isTx() || namespace.isPayForBlob() + this.rawShareData = new Uint8Array() } init() { if (this.isCompactShare) { - this.prepareCompactShare(); + this.prepareCompactShare() } else { - this.prepareSparseShare(); + this.prepareSparseShare() } } prepareCompactShare() { - let shareData: number[] = []; - const infoByte = newInfoByte(this.shareVersion, this.isFirstShare); - const placeholderSequenceLen = new Array(sequenceLenBytes).fill(0); + let shareData: number[] = [] + const infoByte = newInfoByte(this.shareVersion, this.isFirstShare) + const placeholderSequenceLen = new Array(sequenceLenBytes).fill(0) const placeholderReservedBytes = new Array(compactShareReservedBytes).fill( 0 - ); + ) - shareData = shareData.concat([...this.namespace.bytes()]); - shareData.push(infoByte); + shareData = shareData.concat([...this.namespace.bytes()]) + shareData.push(infoByte) if (this.isCompactShare) { - shareData = shareData.concat(placeholderSequenceLen); + shareData = shareData.concat(placeholderSequenceLen) } - shareData = shareData.concat(placeholderReservedBytes); + shareData = shareData.concat(placeholderReservedBytes) - this.rawShareData = new Uint8Array(shareData); + this.rawShareData = new Uint8Array(shareData) } prepareSparseShare() { - let shareData: number[] = []; - const infoByte = newInfoByte(this.shareVersion, this.isFirstShare); - const placeholderSequenceLen = new Array(sequenceLenBytes).fill(0); + let shareData: number[] = [] + const infoByte = newInfoByte(this.shareVersion, this.isFirstShare) + const placeholderSequenceLen = new Array(sequenceLenBytes).fill(0) - shareData = shareData.concat([...this.namespace.bytes()]); - shareData.push(infoByte); + shareData = shareData.concat([...this.namespace.bytes()]) + shareData.push(infoByte) if (this.isCompactShare) { - shareData = shareData.concat(placeholderSequenceLen); + shareData = shareData.concat(placeholderSequenceLen) } - this.rawShareData = new Uint8Array(shareData); + this.rawShareData = new Uint8Array(shareData) } writeSequenceLen(sequenceLen: number) { if (!this.isFirstShare) { - throw Error('not the first share'); + throw Error('not the first share') } const sequenceLenBuf = [ @@ -73,61 +73,61 @@ export class Builder { (sequenceLen >> 16) % 256, (sequenceLen >> 8) % 256, sequenceLen % 256 - ]; + ] this.rawShareData = new Uint8Array([ ...this.rawShareData, ...sequenceLenBuf - ]); + ]) } addData(rawData: Uint8Array): Uint8Array | undefined { - const pendingLeft = shareSize - this.rawShareData.length; + const pendingLeft = shareSize - this.rawShareData.length if (rawData.length <= pendingLeft) { - this.rawShareData = new Uint8Array([...this.rawShareData, ...rawData]); - return; + this.rawShareData = new Uint8Array([...this.rawShareData, ...rawData]) + return } - const chunk = rawData.slice(0, pendingLeft); - this.rawShareData = new Uint8Array([...this.rawShareData, ...chunk]); + const chunk = rawData.slice(0, pendingLeft) + this.rawShareData = new Uint8Array([...this.rawShareData, ...chunk]) - return rawData.slice(pendingLeft); + return rawData.slice(pendingLeft) } zeroPadIfNecessary(): number { - const share = this.rawShareData; - const oldLen = share.length; + const share = this.rawShareData + const oldLen = share.length if (oldLen >= shareSize) { - this.rawShareData = share; - return 0; + this.rawShareData = share + return 0 } - const missingBytes = shareSize - oldLen; + const missingBytes = shareSize - oldLen this.rawShareData = new Uint8Array([ ...this.rawShareData, ...new Array(missingBytes).fill(0) - ]); + ]) - return missingBytes; + return missingBytes } build(): Share { - return new Share(this.rawShareData); + return new Share(this.rawShareData) } } function newInfoByte(version: number, isSequenceStart: boolean): InfoByte { if (version > maxShareVersion) { - throw Error('version must be less than or equal to max share version'); + throw Error('version must be less than or equal to max share version') } - const prefix = version << 1; + const prefix = version << 1 if (isSequenceStart) { - return prefix + 1; + return prefix + 1 } - return prefix; + return prefix } -type InfoByte = number; +type InfoByte = number diff --git a/bots/src/celestia/commitment.ts b/bots/src/celestia/commitment.ts index 5c8408c4..a2a99371 100644 --- a/bots/src/celestia/commitment.ts +++ b/bots/src/celestia/commitment.ts @@ -1,73 +1,73 @@ -import { SHA256 } from './hasher'; +import { SHA256 } from './hasher' import { NamespaceMerkleTree, hashFromByteSlices, merkleMountainRangeSizes -} from './merkle'; -import { Namespace, namespaceSize } from './namespace'; -import { Blob, Share, SparseShareSplitter } from './share'; -import { roundUpPowerOfTwo } from './utils'; +} from './merkle' +import { Namespace, namespaceSize } from './namespace' +import { Blob, Share, SparseShareSplitter } from './share' +import { roundUpPowerOfTwo } from './utils' -const SubtreeRootThreshold = 64; +const SubtreeRootThreshold = 64 export function createCommitment(blob: Blob): Uint8Array { - const shares = splitBlobs([blob]); + const shares = splitBlobs([blob]) - const subTreeWidth_ = subTreeWidth(shares.length, SubtreeRootThreshold); - const treeSizes = merkleMountainRangeSizes(shares.length, subTreeWidth_); + const subTreeWidth_ = subTreeWidth(shares.length, SubtreeRootThreshold) + const treeSizes = merkleMountainRangeSizes(shares.length, subTreeWidth_) - const leafSets: Uint8Array[][] = []; - let cursor = 0; + const leafSets: Uint8Array[][] = [] + let cursor = 0 for (const treeSize of treeSizes) { leafSets.push( shares .slice(cursor, cursor + treeSize) .map((share) => new Uint8Array(share.data)) - ); - cursor += treeSize; + ) + cursor += treeSize } - const subTreeRoots: Uint8Array[] = []; + const subTreeRoots: Uint8Array[] = [] for (const set of leafSets) { - const tree = new NamespaceMerkleTree(new SHA256(), namespaceSize, true); + const tree = new NamespaceMerkleTree(new SHA256(), namespaceSize, true) for (const leaf of set) { - const ns = new Namespace(blob.namespaceVersion, blob.namespaceId); - const nsLeaf = new Uint8Array([...ns.bytes(), ...leaf]); - tree.push(nsLeaf); + const ns = new Namespace(blob.namespaceVersion, blob.namespaceId) + const nsLeaf = new Uint8Array([...ns.bytes(), ...leaf]) + tree.push(nsLeaf) } - const root = tree.root(); - subTreeRoots.push(root); + const root = tree.root() + subTreeRoots.push(root) } - blob.shareCommitment = hashFromByteSlices(subTreeRoots); - return blob.shareCommitment; + blob.shareCommitment = hashFromByteSlices(subTreeRoots) + return blob.shareCommitment } function splitBlobs(blobs: Blob[]): Share[] { - const writer = new SparseShareSplitter(); + const writer = new SparseShareSplitter() for (const blob of blobs) { - writer.write(blob); + writer.write(blob) } - return writer.export(); + return writer.export() } function subTreeWidth( shareCount: number, subtreeRootThreshold: number ): number { - let s = Math.floor(shareCount / subtreeRootThreshold); + let s = Math.floor(shareCount / subtreeRootThreshold) if (shareCount % subtreeRootThreshold !== 0) { - s++; + s++ } - s = roundUpPowerOfTwo(s); + s = roundUpPowerOfTwo(s) - return Math.min(s, blobMinSquareSize(shareCount)); + return Math.min(s, blobMinSquareSize(shareCount)) } function blobMinSquareSize(shareCount: number): number { - return roundUpPowerOfTwo(Math.ceil(Math.sqrt(shareCount))); + return roundUpPowerOfTwo(Math.ceil(Math.sqrt(shareCount))) } diff --git a/bots/src/celestia/hasher.ts b/bots/src/celestia/hasher.ts index 6e7e0456..5bf1e40a 100644 --- a/bots/src/celestia/hasher.ts +++ b/bots/src/celestia/hasher.ts @@ -1,167 +1,167 @@ -import * as crypto from 'crypto'; -import { maxNamespace, minNamespace } from './namespace'; +import * as crypto from 'crypto' +import { maxNamespace, minNamespace } from './namespace' -const leafPrefix = 0; -const nodePrefix = 1; +const leafPrefix = 0 +const nodePrefix = 1 abstract class Hash { - abstract write(b: Uint8Array): void; - abstract sum(b?: Uint8Array): Uint8Array; - abstract reset(): void; - abstract size(): number; - abstract blockSize(): number; + abstract write(b: Uint8Array): void + abstract sum(b?: Uint8Array): Uint8Array + abstract reset(): void + abstract size(): number + abstract blockSize(): number } export class SHA256 extends Hash { - private hash: crypto.Hash; + private hash: crypto.Hash constructor() { - super(); - this.hash = crypto.createHash('sha256'); + super() + this.hash = crypto.createHash('sha256') } write(b: Uint8Array) { - this.hash.write(b); + this.hash.write(b) } sum(b = new Uint8Array([])): Uint8Array { - const hash = this.hash.digest(); - return new Uint8Array([...b, ...hash]); + const hash = this.hash.digest() + return new Uint8Array([...b, ...hash]) } reset(): void { - this.hash = crypto.createHash('sha256'); + this.hash = crypto.createHash('sha256') } size(): number { - return 32; + return 32 } blockSize(): number { - return 64; + return 64 } } export abstract class Hasher { - abstract isMaxNamespaceIDIgnored(): boolean; - abstract namespaceSize(): number; - abstract hashLeaf(data: Uint8Array): Uint8Array; - abstract hashNode(leftChild: Uint8Array, rightChild: Uint8Array): Uint8Array; - abstract emptyRoot(): Uint8Array; + abstract isMaxNamespaceIDIgnored(): boolean + abstract namespaceSize(): number + abstract hashLeaf(data: Uint8Array): Uint8Array + abstract hashNode(leftChild: Uint8Array, rightChild: Uint8Array): Uint8Array + abstract emptyRoot(): Uint8Array } export class MntHasher extends Hasher { - private precomputedMaxNs: Uint8Array; - private tp: number; - private data: Uint8Array; + private precomputedMaxNs: Uint8Array + private tp: number + private data: Uint8Array constructor( private baseHasher: Hash, private namespaceLen: number, private ignoreMaxNs: boolean ) { - super(); + super() this.precomputedMaxNs = new Uint8Array( new Array(this.namespaceLen).fill(0xff) - ); - this.tp = 0; - this.data = new Uint8Array(); + ) + this.tp = 0 + this.data = new Uint8Array() } isMaxNamespaceIDIgnored(): boolean { - return this.ignoreMaxNs; + return this.ignoreMaxNs } namespaceSize(): number { - return this.namespaceLen; + return this.namespaceLen } hashLeaf(data: Uint8Array): Uint8Array { - const h = this.baseHasher; - h.reset(); + const h = this.baseHasher + h.reset() - this.validateLeaf(data); + this.validateLeaf(data) - const nID = data.slice(0, this.namespaceLen); - const minMaxNIDs = new Uint8Array([...nID, ...nID]); + const nID = data.slice(0, this.namespaceLen) + const minMaxNIDs = new Uint8Array([...nID, ...nID]) - const leafPrefixedNData = new Uint8Array([leafPrefix, ...data]); - h.write(leafPrefixedNData); + const leafPrefixedNData = new Uint8Array([leafPrefix, ...data]) + h.write(leafPrefixedNData) - return h.sum(minMaxNIDs); + return h.sum(minMaxNIDs) } hashNode(left: Uint8Array, right: Uint8Array): Uint8Array { - this.validateNodes(left, right); + this.validateNodes(left, right) - const h = this.baseHasher; - h.reset(); + const h = this.baseHasher + h.reset() const [leftMinNs, leftMaxNs] = [ minNamespace(left, this.namespaceLen), - maxNamespace(left, this.namespaceLen), - ]; + maxNamespace(left, this.namespaceLen) + ] const [rightMinNs, rightMaxNs] = [ minNamespace(right, this.namespaceLen), - maxNamespace(right, this.namespaceLen), - ]; + maxNamespace(right, this.namespaceLen) + ] const [minNs, MaxNs] = this.computeNsRange( leftMinNs, leftMaxNs, rightMinNs, rightMaxNs - ); + ) - const res = new Uint8Array([...minNs, ...MaxNs]); - const data = new Uint8Array([nodePrefix, ...left, ...right]); + const res = new Uint8Array([...minNs, ...MaxNs]) + const data = new Uint8Array([nodePrefix, ...left, ...right]) - h.write(data); - return h.sum(res); + h.write(data) + return h.sum(res) } emptyRoot(): Uint8Array { - this.baseHasher.reset(); - const emptyNs = new Array(this.namespaceLen).fill(0); - const h = this.baseHasher.sum(); - const digest = [...emptyNs, ...emptyNs, ...h]; - return new Uint8Array(digest); + this.baseHasher.reset() + const emptyNs = new Array(this.namespaceLen).fill(0) + const h = this.baseHasher.sum() + const digest = [...emptyNs, ...emptyNs, ...h] + return new Uint8Array(digest) } private validateLeaf(data: Uint8Array) { - const nidSize = this.namespaceSize(); - const lenData = data.length; + const nidSize = this.namespaceSize() + const lenData = data.length if (lenData < nidSize) { - throw Error('invalid leaf len'); + throw Error('invalid leaf len') } } private validateNodes(left: Uint8Array, right: Uint8Array) { - this.validateNodeFormat(left); - this.validateNodeFormat(right); - this.validateSiblingsNamespaceOrder(left, right); + this.validateNodeFormat(left) + this.validateNodeFormat(right) + this.validateSiblingsNamespaceOrder(left, right) } private validateNodeFormat(node: Uint8Array) { - const expectNodeLen = this.size(); - const nodeLen = node.length; + const expectNodeLen = this.size() + const nodeLen = node.length if (nodeLen !== expectNodeLen) { - throw Error('invalid node size'); + throw Error('invalid node size') } - const minNID = minNamespace(node, this.namespaceSize()); - const maxNID = maxNamespace(node, this.namespaceSize()); + const minNID = minNamespace(node, this.namespaceSize()) + const maxNID = maxNamespace(node, this.namespaceSize()) if (Buffer.from(maxNID).compare(Buffer.from(minNID)) < 0) { - throw Error('max namespace ID is less than min namespace ID'); + throw Error('max namespace ID is less than min namespace ID') } } private validateSiblingsNamespaceOrder(left: Uint8Array, right: Uint8Array) { - const leftMaxNs = maxNamespace(left, this.namespaceSize()); - const rightMinNs = maxNamespace(right, this.namespaceSize()); + const leftMaxNs = maxNamespace(left, this.namespaceSize()) + const rightMinNs = maxNamespace(right, this.namespaceSize()) if (Buffer.from(rightMinNs).compare(Buffer.from(leftMaxNs)) < 0) { throw Error( 'the max namespace of the left child is greater than the min namespace of right child' - ); + ) } } private size(): number { - return this.baseHasher.size() + this.namespaceLen * 2; + return this.baseHasher.size() + this.namespaceLen * 2 } private computeNsRange( @@ -170,14 +170,14 @@ export class MntHasher extends Hasher { rightMinNs: Uint8Array, rightMaxNs: Uint8Array ): [Uint8Array, Uint8Array] { - const minNs = leftMinNs; - let maxNs = rightMaxNs; + const minNs = leftMinNs + let maxNs = rightMaxNs if ( this.ignoreMaxNs && Buffer.from(this.precomputedMaxNs).compare(rightMinNs) === 0 ) { - maxNs = leftMaxNs; + maxNs = leftMaxNs } - return [minNs, maxNs]; + return [minNs, maxNs] } } diff --git a/bots/src/celestia/merkle.ts b/bots/src/celestia/merkle.ts index fb1d4ca7..07b0fcd0 100644 --- a/bots/src/celestia/merkle.ts +++ b/bots/src/celestia/merkle.ts @@ -1,141 +1,141 @@ -import * as crypto from 'crypto'; -import { Hasher, MntHasher } from './hasher'; -import { roundDownPowerOfTwo } from './utils'; +import * as crypto from 'crypto' +import { Hasher, MntHasher } from './hasher' +import { roundDownPowerOfTwo } from './utils' export class NamespaceMerkleTree { - private treeHasher: Hasher; - private visit: nodeVisitorFn; - private leaves: Uint8Array[]; - private leafHashes: Uint8Array[]; - private namespaceRanges: Record; - private minNID: Uint8Array; - private maxNID: Uint8Array; - private rawRoot: Uint8Array | undefined; + private treeHasher: Hasher + private visit: nodeVisitorFn + private leaves: Uint8Array[] + private leafHashes: Uint8Array[] + private namespaceRanges: Record + private minNID: Uint8Array + private maxNID: Uint8Array + private rawRoot: Uint8Array | undefined constructor(hash: any, namespaceIDSize: number, ignoreMaxNamespace: boolean) { - this.treeHasher = new MntHasher(hash, namespaceIDSize, ignoreMaxNamespace); + this.treeHasher = new MntHasher(hash, namespaceIDSize, ignoreMaxNamespace) // eslint-disable-next-line @typescript-eslint/no-unused-vars - this.visit = (_hash: Uint8Array, _children?: Uint8Array[]) => {}; // no op - this.leaves = []; - this.leafHashes = []; - this.namespaceRanges = {}; - this.minNID = new Uint8Array(new Array(namespaceIDSize).fill(0xff)); - this.maxNID = new Uint8Array(new Array(namespaceIDSize).fill(0x00)); + this.visit = (_hash: Uint8Array, _children?: Uint8Array[]) => {} // no op + this.leaves = [] + this.leafHashes = [] + this.namespaceRanges = {} + this.minNID = new Uint8Array(new Array(namespaceIDSize).fill(0xff)) + this.maxNID = new Uint8Array(new Array(namespaceIDSize).fill(0x00)) } push(namespacedData: Uint8Array) { - const nID = this.validateAndExtractNamespace(namespacedData); + const nID = this.validateAndExtractNamespace(namespacedData) - const res = this.treeHasher.hashLeaf(namespacedData); + const res = this.treeHasher.hashLeaf(namespacedData) - this.leaves.push(namespacedData); - this.leafHashes.push(res); - this.updateNamespaceRanges(); - this.updateMinMaxID(nID); - this.rawRoot = undefined; - return undefined; + this.leaves.push(namespacedData) + this.leafHashes.push(res) + this.updateNamespaceRanges() + this.updateMinMaxID(nID) + this.rawRoot = undefined + return undefined } root(): Uint8Array { if (this.rawRoot === undefined) { - const res = this.computeRoot(0, this.size()); - this.rawRoot = res; + const res = this.computeRoot(0, this.size()) + this.rawRoot = res } - return this.rawRoot; + return this.rawRoot } computeRoot(start: number, end: number): Uint8Array { if (start < 0 || start > end || end > this.size()) { - throw Error('fail to compute root'); + throw Error('fail to compute root') } switch (end - start) { case 0: { - const rootHash = this.treeHasher.emptyRoot(); - this.visit(rootHash); - return rootHash; + const rootHash = this.treeHasher.emptyRoot() + this.visit(rootHash) + return rootHash } case 1: { - const leafHash = new Uint8Array([...this.leafHashes[start]]); // copy - this.visit(leafHash, [this.leaves[start]]); - return leafHash; + const leafHash = new Uint8Array([...this.leafHashes[start]]) // copy + this.visit(leafHash, [this.leaves[start]]) + return leafHash } default: { - const k = getSplitPoint(end - start); - const left = this.computeRoot(start, start + k); - const right = this.computeRoot(start + k, end); - const hash = this.treeHasher.hashNode(left, right); - this.visit(hash, [left, right]); - return hash; + const k = getSplitPoint(end - start) + const left = this.computeRoot(start, start + k) + const right = this.computeRoot(start + k, end) + const hash = this.treeHasher.hashNode(left, right) + this.visit(hash, [left, right]) + return hash } } } private validateAndExtractNamespace(data: Uint8Array): Uint8Array { - const nidSize = this.namespaceSize(); + const nidSize = this.namespaceSize() if (data.length < nidSize) { - throw Error('invalid data length'); + throw Error('invalid data length') } - const nID = data.slice(0, this.namespaceSize()); + const nID = data.slice(0, this.namespaceSize()) - const curSize = this.size(); + const curSize = this.size() if (curSize > 0) { if ( Buffer.from(nID).compare( Buffer.from(this.leaves[curSize - 1].slice(0, nidSize)) ) < 0 ) { - throw Error('invalid push order'); + throw Error('invalid push order') } } - return nID; + return nID } private updateNamespaceRanges() { if (this.size() > 0) { - const lastIndex = this.size() - 1; - const lastPushed = this.leaves[lastIndex]; + const lastIndex = this.size() - 1 + const lastPushed = this.leaves[lastIndex] const lastNsStr = Buffer.from( lastPushed.slice(0, this.treeHasher.namespaceSize()) - ).toString(); + ).toString() - const lastRange = this.namespaceRanges[lastNsStr]; + const lastRange = this.namespaceRanges[lastNsStr] if (lastRange === undefined) { this.namespaceRanges[lastNsStr] = { start: lastIndex, end: lastIndex + 1 - }; + } } else { this.namespaceRanges[lastNsStr] = { start: lastRange.start, end: lastRange.end + 1 - }; + } } } } private updateMinMaxID(id: Uint8Array) { if (Buffer.from(id).compare(this.minNID) < 0) { - this.minNID = id; + this.minNID = id } if (Buffer.from(this.maxNID).compare(id) < 0) { - this.maxNID = id; + this.maxNID = id } } private size() { - return this.leaves.length; + return this.leaves.length } private namespaceSize(): number { - return this.treeHasher.namespaceSize(); + return this.treeHasher.namespaceSize() } } -type nodeVisitorFn = (hash: Uint8Array, children?: Uint8Array[]) => void; +type nodeVisitorFn = (hash: Uint8Array, children?: Uint8Array[]) => void interface leafRange { start: number; @@ -144,38 +144,38 @@ interface leafRange { function getSplitPoint(length: number): number { if (length < 1) { - throw Error('Trying to split a tree with size < 1'); + throw Error('Trying to split a tree with size < 1') } - let k = 1; + let k = 1 while (k < length) { - k <<= 1; + k <<= 1 } - k >>= 1; + k >>= 1 if (k === length) { - k >>= 1; + k >>= 1 } - return k; + return k } export function hashFromByteSlices(items: Uint8Array[]): Uint8Array { switch (items.length) { case 0: - return new Uint8Array([...crypto.createHash('sha256').digest()]); // emptyHash + return new Uint8Array([...crypto.createHash('sha256').digest()]) // emptyHash case 1: { - const hash = crypto.createHash('sha256'); - hash.write(Buffer.from([0 /* leaf prefix */, ...items[0]])); - return new Uint8Array([...hash.digest()]); + const hash = crypto.createHash('sha256') + hash.write(Buffer.from([0 /* leaf prefix */, ...items[0]])) + return new Uint8Array([...hash.digest()]) } default: { - const k = getSplitPoint(items.length); - const left = hashFromByteSlices(items.slice(0, k)); - const right = hashFromByteSlices(items.slice(k)); - const hash = crypto.createHash('sha256'); - hash.write(Buffer.from([1 /* inner prefix */, ...left, ...right])); - return new Uint8Array([...hash.digest()]); + const k = getSplitPoint(items.length) + const left = hashFromByteSlices(items.slice(0, k)) + const right = hashFromByteSlices(items.slice(k)) + const hash = crypto.createHash('sha256') + hash.write(Buffer.from([1 /* inner prefix */, ...left, ...right])) + return new Uint8Array([...hash.digest()]) } } } @@ -184,18 +184,18 @@ export function merkleMountainRangeSizes( totalSize: number, maxTreeSize: number ): number[] { - let treeSizes: number[] = []; + let treeSizes: number[] = [] while (totalSize !== 0) { if (totalSize >= maxTreeSize) { - treeSizes = [...treeSizes, maxTreeSize]; - totalSize -= maxTreeSize; + treeSizes = [...treeSizes, maxTreeSize] + totalSize -= maxTreeSize } else { - const treeSize = roundDownPowerOfTwo(totalSize); + const treeSize = roundDownPowerOfTwo(totalSize) - treeSizes = [...treeSizes, treeSize]; - totalSize -= treeSize; + treeSizes = [...treeSizes, treeSize] + totalSize -= treeSize } } - return treeSizes; + return treeSizes } diff --git a/bots/src/celestia/namespace.ts b/bots/src/celestia/namespace.ts index abc100fc..904a4aee 100644 --- a/bots/src/celestia/namespace.ts +++ b/bots/src/celestia/namespace.ts @@ -1,22 +1,25 @@ -const namespaceVersionSize = 1; -export const namespaceIDSize = 28; -export const namespaceSize = namespaceVersionSize + namespaceIDSize; -export const namespaceVersionZero = 0; -const namespaceVersionMax = 255; -const namespaceVersionZeroPrefixSize = 18; +const namespaceVersionSize = 1 +export const namespaceIDSize = 28 +export const namespaceSize = namespaceVersionSize + namespaceIDSize +export const namespaceVersionZero = 0 +const namespaceVersionMax = 255 +const namespaceVersionZeroPrefixSize = 18 const namespaceVersionZeroPrefix = new Uint8Array( new Array(namespaceVersionZeroPrefixSize).fill(0) -); +) export class Namespace { - constructor(private version: number, private id: Uint8Array) { + constructor( + private version: number, + private id: Uint8Array + ) { // validate version if (version !== namespaceVersionZero && version !== namespaceVersionMax) { - throw Error('unsupported namespace version'); + throw Error('unsupported namespace version') } if (id.length !== namespaceIDSize) { - throw Error('unsupported namespace id lengh'); + throw Error('unsupported namespace id lengh') } // validate id @@ -25,39 +28,39 @@ export class Namespace { id.slice(0, namespaceVersionZeroPrefix.length) === namespaceVersionZeroPrefix ) { - throw Error('unsupported namespace id with version'); + throw Error('unsupported namespace id with version') } } isTx(): boolean { - return this.bytes() === txNamespace.bytes(); + return this.bytes() === txNamespace.bytes() } isPayForBlob(): boolean { - return this.bytes() === payForBlobNamespace.bytes(); + return this.bytes() === payForBlobNamespace.bytes() } bytes(): Uint8Array { - return new Uint8Array([this.version, ...this.id]); + return new Uint8Array([this.version, ...this.id]) } } export function minNamespace(hash: Uint8Array, size: number): Uint8Array { - return new Uint8Array([...hash.slice(0, size)]); + return new Uint8Array([...hash.slice(0, size)]) } export function maxNamespace(hash: Uint8Array, size: number): Uint8Array { - return new Uint8Array([...hash.slice(size, size * 2)]); + return new Uint8Array([...hash.slice(size, size * 2)]) } export function primaryReservedNamespace(lastByte: number): Namespace { const ns = new Namespace( namespaceVersionZero, new Uint8Array([...new Array(namespaceIDSize - 1).fill(0x00), lastByte]) - ); + ) - return ns; + return ns } -const txNamespace = primaryReservedNamespace(0x01); -const payForBlobNamespace = primaryReservedNamespace(0x04); +const txNamespace = primaryReservedNamespace(0x01) +const payForBlobNamespace = primaryReservedNamespace(0x04) diff --git a/bots/src/celestia/share.ts b/bots/src/celestia/share.ts index 3261ae2c..d973461a 100644 --- a/bots/src/celestia/share.ts +++ b/bots/src/celestia/share.ts @@ -1,56 +1,56 @@ -import { Builder } from './builder'; -import { Namespace } from './namespace'; +import { Builder } from './builder' +import { Namespace } from './namespace' -const supportedShareVersions = [0]; +const supportedShareVersions = [0] export class Share { constructor(public data: Uint8Array) {} } export class SparseShareSplitter { - private shares: Share[]; + private shares: Share[] constructor(shares?: Share[]) { if (!shares) { - this.shares = []; + this.shares = [] } else { - this.shares = shares; + this.shares = shares } } write(blob: Blob) { if ( - supportedShareVersions.find(v => v === blob.shareVersion) === undefined + supportedShareVersions.find((v) => v === blob.shareVersion) === undefined ) { - throw Error('unsupported share version'); + throw Error('unsupported share version') } - let rawData: Uint8Array | undefined = blob.data; - const ns = new Namespace(blob.namespaceVersion, blob.namespaceId); + let rawData: Uint8Array | undefined = blob.data + const ns = new Namespace(blob.namespaceVersion, blob.namespaceId) - let b = new Builder(ns, blob.shareVersion, true); - b.init(); + let b = new Builder(ns, blob.shareVersion, true) + b.init() - b.writeSequenceLen(rawData.length); + b.writeSequenceLen(rawData.length) while (rawData !== undefined) { - const rawDataLeftOver = b.addData(rawData); + const rawDataLeftOver = b.addData(rawData) if (rawDataLeftOver === undefined) { - b.zeroPadIfNecessary(); + b.zeroPadIfNecessary() } - const share = b.build(); + const share = b.build() - this.shares.push(share); + this.shares.push(share) - b = new Builder(ns, blob.shareVersion, false); - b.init(); + b = new Builder(ns, blob.shareVersion, false) + b.init() - rawData = rawDataLeftOver; + rawData = rawDataLeftOver } } export(): Share[] { - return this.shares; + return this.shares } } diff --git a/bots/src/celestia/utils.ts b/bots/src/celestia/utils.ts index 2cd20a44..b29f7455 100644 --- a/bots/src/celestia/utils.ts +++ b/bots/src/celestia/utils.ts @@ -1,23 +1,23 @@ -import { sequenceLenBytes, shareInfoBytes, shareSize } from './builder'; -import { createCommitment } from './commitment'; -import { namespaceSize } from './namespace'; -import { config } from '../config'; -import { Blob } from '@initia/initia.js'; +import { sequenceLenBytes, shareInfoBytes, shareSize } from './builder' +import { createCommitment } from './commitment' +import { namespaceSize } from './namespace' +import { config } from '../config' +import { Blob } from '@initia/initia.js' // constants -const defaultGasPerBlobByte = 8; -const defaultTxSizeCostPerByte = 10; -const bytesPerBlobInfo = 70; -const pfbGasFixedCost = 75000; +const defaultGasPerBlobByte = 8 +const defaultTxSizeCostPerByte = 10 +const bytesPerBlobInfo = 70 +const pfbGasFixedCost = 75000 const firstSparseShareContentSize = - shareSize - namespaceSize - shareInfoBytes - sequenceLenBytes; + shareSize - namespaceSize - shareInfoBytes - sequenceLenBytes const continuationSparseShareContentSize = - shareSize - namespaceSize - shareInfoBytes; -const namespaceIdLength = 28; + shareSize - namespaceSize - shareInfoBytes +const namespaceIdLength = 28 export function getCelestiaFeeGasLimit(length: number): number { // calculate gas - return Math.floor(defaultEstimateGas([length]) * 1.2); + return Math.floor(defaultEstimateGas([length]) * 1.2) } export function createBlob(data: Buffer): { @@ -33,27 +33,27 @@ export function createBlob(data: Buffer): { shareVersion: 0, namespaceVersion: 0, shareCommitment: new Uint8Array() - }; + } // generate commitment - createCommitment(blob); + createCommitment(blob) - const commitment = Buffer.from(blob.shareCommitment).toString('base64'); + const commitment = Buffer.from(blob.shareCommitment).toString('base64') const res = new Blob( Buffer.from(config.CELESTIA_NAMESPACE_ID, 'hex').toString('base64'), Buffer.from(blob.data).toString('base64'), 0, 0 - ); + ) const namespace = Buffer.from([ blob.namespaceVersion, ...blob.namespaceId - ]).toString('base64'); + ]).toString('base64') return { blob: res, commitment, namespace - }; + } } function defaultEstimateGas(blobSizes: number[]) { @@ -61,7 +61,7 @@ function defaultEstimateGas(blobSizes: number[]) { blobSizes, defaultGasPerBlobByte, defaultTxSizeCostPerByte - ); + ) } function estimateGas( @@ -73,25 +73,25 @@ function estimateGas( gasToConsume(blobSizes, gasPerByte) + txSizeCost * bytesPerBlobInfo * blobSizes.length + pfbGasFixedCost - ); + ) } function gasToConsume(blobSizes: number[], gasPerByte: number): number { - let totalSharesUsed = 0; + let totalSharesUsed = 0 for (const size of blobSizes) { - totalSharesUsed += sparseSharesNeeded(size); + totalSharesUsed += sparseSharesNeeded(size) } - return totalSharesUsed * shareSize * gasPerByte; + return totalSharesUsed * shareSize * gasPerByte } function sparseSharesNeeded(sequenceLen: number): number { if (sequenceLen === 0) { - return 0; + return 0 } if (sequenceLen < firstSparseShareContentSize) { - return 1; + return 1 } return ( @@ -100,35 +100,35 @@ function sparseSharesNeeded(sequenceLen: number): number { (sequenceLen - firstSparseShareContentSize) / continuationSparseShareContentSize ) - ); + ) } export function validateCelestiaConfig() { - if (config.PUBLISH_BATCH_TARGET !== 'celestia') return; - const length = Buffer.from(config.CELESTIA_NAMESPACE_ID, 'hex').length; + if (config.PUBLISH_BATCH_TARGET !== 'celestia') return + const length = Buffer.from(config.CELESTIA_NAMESPACE_ID, 'hex').length // https://docs.celestia.org/developers/blobstream-proof-queries#namespace if (length != namespaceIdLength) { throw Error( `unsupported namespace id length; expected ${namespaceIdLength}, given ${length} ` - ); + ) } } export function roundUpPowerOfTwo(input: number) { - let result = 1; + let result = 1 while (result < input) { - result <<= 1; + result <<= 1 } - return result; + return result } export function roundDownPowerOfTwo(input: number): number { if (input <= 0) { - throw Error('input must be positive'); + throw Error('input must be positive') } - const roundedUp = roundUpPowerOfTwo(input); + const roundedUp = roundUpPowerOfTwo(input) if (roundedUp == input) { - return roundedUp; + return roundedUp } - return roundedUp >> 1; + return roundedUp >> 1 } diff --git a/bots/src/config.ts b/bots/src/config.ts index 99509992..25f0c2df 100644 --- a/bots/src/config.ts +++ b/bots/src/config.ts @@ -1,14 +1,14 @@ -import { LCDClient } from '@initia/initia.js'; -import { validateCelestiaConfig } from './celestia/utils'; -import * as dotenv from 'dotenv'; +import { LCDClient } from '@initia/initia.js' +import { validateCelestiaConfig } from './celestia/utils' +import * as dotenv from 'dotenv' const envFile = process.env.NODE_ENV === 'test' || !process.env.WORKER_NAME ? `.env` - : `.env.${process.env.WORKER_NAME}`; + : `.env.${process.env.WORKER_NAME}` -console.log('activate ', envFile); -dotenv.config({ path: envFile }); +console.log('activate ', envFile) +dotenv.config({ path: envFile }) const { EXECUTOR_PORT, @@ -43,10 +43,11 @@ const { DELETE_OUTPUT_PROPOSAL, SLACK_NOT_ENOUGH_BALANCE_THRESHOLD, EXECUTOR_L1_MONITOR_HEIGHT, - EXECUTOR_L2_MONITOR_HEIGHT -} = process.env; + EXECUTOR_L2_MONITOR_HEIGHT, + ENABLE_API_ONLY +} = process.env -const supportedPublishBatchTargets = ['l1', 'celestia']; +const supportedPublishBatchTargets = ['l1', 'celestia'] export const config = { EXECUTOR_PORT: EXECUTOR_PORT ? parseInt(EXECUTOR_PORT) : 5000, @@ -55,34 +56,39 @@ export const config = { L1_RPC_URI: L1_RPC_URI ? L1_RPC_URI.split(',') : ['http://localhost:26657'], L2_LCD_URI: L2_LCD_URI ? L2_LCD_URI.split(',') : ['http://localhost:1317'], L2_RPC_URI: L2_RPC_URI ? L2_RPC_URI.split(',') : ['http://localhost:26657'], - BATCH_LCD_URI: BATCH_LCD_URI ? BATCH_LCD_URI.split(',') : ['http://localhost:1317'], + BATCH_LCD_URI: BATCH_LCD_URI + ? BATCH_LCD_URI.split(',') + : ['http://localhost:1317'], BATCH_CHAIN_RPC_URI: (() => { if (process.env.WORKER_NAME !== 'batch') { - return undefined; + return undefined } - if(PUBLISH_BATCH_TARGET == 'l1') { - return L1_RPC_URI; - } else if(BATCH_CHAIN_RPC_URI == undefined || BATCH_CHAIN_RPC_URI.length == 0) { + if (PUBLISH_BATCH_TARGET == 'l1') { + return L1_RPC_URI + } else if ( + BATCH_CHAIN_RPC_URI == undefined || + BATCH_CHAIN_RPC_URI.length == 0 + ) { throw Error( 'Please check your configuration; BATCH_CHAIN_RPC_URI is needed but not given.' - ); + ) } })(), CELESTIA_NAMESPACE_ID: CELESTIA_NAMESPACE_ID || '', PUBLISH_BATCH_TARGET: (() => { if (PUBLISH_BATCH_TARGET === undefined) { - return 'l1'; + return 'l1' } const target = supportedPublishBatchTargets.find( (target) => target === PUBLISH_BATCH_TARGET?.toLocaleLowerCase() - ); + ) if (target === undefined) { throw Error( `A valid PUBLISH_BATCH_TARGET is required. Please specify one of the following: ${supportedPublishBatchTargets}` - ); + ) } - return target; + return target })(), EXECUTOR_URI: EXECUTOR_URI || 'http://localhost:5000', BRIDGE_ID: BRIDGE_ID ? parseInt(BRIDGE_ID) : 1, @@ -146,12 +152,13 @@ export const config = { : 0, EXECUTOR_L2_MONITOR_HEIGHT: EXECUTOR_L2_MONITOR_HEIGHT ? parseInt(EXECUTOR_L2_MONITOR_HEIGHT) - : 0 -}; + : 0, + ENABLE_API_ONLY: ENABLE_API_ONLY ? ENABLE_API_ONLY == 'true' : false +} // check celestia config -validateCelestiaConfig(); +validateCelestiaConfig() -export const INTERVAL_BATCH = 100_000; -export const INTERVAL_MONITOR = 100; -export const INTERVAL_OUTPUT = 10_000; +export const INTERVAL_BATCH = 100_000 +export const INTERVAL_MONITOR = 100 +export const INTERVAL_OUTPUT = 10_000 diff --git a/bots/src/controller/batch/BatchController.ts b/bots/src/controller/batch/BatchController.ts index 9185dd2d..bbca68bd 100644 --- a/bots/src/controller/batch/BatchController.ts +++ b/bots/src/controller/batch/BatchController.ts @@ -4,29 +4,37 @@ import { Get, Validate, Validator -} from 'koa-joi-controllers'; -import { success } from '../../lib/response'; -import { getBatch } from '../../service/batch/BatchService'; +} from 'koa-joi-controllers' +import { responses, routeConfig, z } from 'koa-swagger-decorator' +import { success } from 'lib/response' +import { GetBatchResponse } from 'sawgger/batch_model' +import { getBatch } from 'service/batch/BatchService' -const Joi = Validator.Joi; +const Joi = Validator.Joi @Controller('') -export default class BatchController extends KoaController { - /** - * @api {get} /batch Get batch - * @apiName getBatch - * @apiGroup Batch - * - * @apiParam {Number} [batchIndex] Index for batch - * - */ - @Get('/batch/:batch_index') +export class BatchController extends KoaController { + @routeConfig({ + method: 'get', + path: '/batch/{batch_index}', + summary: 'Get batch', + description: 'Get batch', + tags: ['Batch'], + operationId: 'getBatch', + request: { + params: z.object({ + batch_index: z.number() + }) + } + }) + @responses(GetBatchResponse) + @Get('/batch/{batch_index}') @Validate({ params: { batch_index: Joi.number().description('Batch index') } }) async getBatch(ctx): Promise { - success(ctx, await getBatch(ctx.params.batch_index)); + success(ctx, await getBatch(ctx.params.batch_index)) } } diff --git a/bots/src/controller/executor/ClaimTxController.ts b/bots/src/controller/executor/ClaimTxController.ts index 85496df3..7ea6bfc9 100644 --- a/bots/src/controller/executor/ClaimTxController.ts +++ b/bots/src/controller/executor/ClaimTxController.ts @@ -1,14 +1,10 @@ -import { Context } from 'koa'; -import { - KoaController, - Get, - Controller, -} from 'koa-joi-controllers'; -import { ErrorTypes } from '../../lib/error'; -import { error, success } from '../../lib/response'; -import { getClaimTxList } from '../../service'; +import { Context } from 'koa' +import { KoaController, Get, Controller } from 'koa-joi-controllers' +import { ErrorTypes } from '../../lib/error' +import { error, success } from '../../lib/response' +import { getClaimTxList } from '../../service' import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetClaimResponse } from '../../swagger/executor_model'; +import { GetClaimResponse } from '../../swagger/executor_model' @Controller('') export class ClaimTxController extends KoaController { @@ -28,17 +24,17 @@ export class ClaimTxController extends KoaController { .optional() .default(20) .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value', + message: 'Invalid limit value' }), offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true), - }), - }, + descending: z.boolean().optional().default(true) + }) + } }) @responses(GetClaimResponse) @Get('/tx/claim') async getClaimTxList(ctx: Context): Promise { - const claimTxList = await getClaimTxList(ctx.query as any); + const claimTxList = await getClaimTxList(ctx.query as any) if (claimTxList) success(ctx, claimTxList) else error(ctx, ErrorTypes.API_ERROR) } diff --git a/bots/src/controller/executor/DepositTxController.ts b/bots/src/controller/executor/DepositTxController.ts index dd71b301..b47a9715 100644 --- a/bots/src/controller/executor/DepositTxController.ts +++ b/bots/src/controller/executor/DepositTxController.ts @@ -1,14 +1,10 @@ -import { Context } from 'koa'; -import { - KoaController, - Get, - Controller, -} from 'koa-joi-controllers'; -import { ErrorTypes } from '../../lib/error'; -import { error, success } from '../../lib/response'; -import { getDepositTxList } from '../../service'; +import { Context } from 'koa' +import { KoaController, Get, Controller } from 'koa-joi-controllers' +import { ErrorTypes } from '../../lib/error' +import { error, success } from '../../lib/response' +import { getDepositTxList } from '../../service' import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetDepositResponse } from '../../swagger/executor_model'; +import { GetDepositResponse } from '../../swagger/executor_model' @Controller('') export class DepositTxController extends KoaController { @@ -28,18 +24,18 @@ export class DepositTxController extends KoaController { .optional() .default(20) .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value', + message: 'Invalid limit value' }), offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true), - }), - }, + descending: z.boolean().optional().default(true) + }) + } }) @responses(GetDepositResponse) @Get('/tx/deposit') async getDepositTxList(ctx: Context): Promise { const depositTxList = await getDepositTxList(ctx.query as any) - if (depositTxList) success(ctx, depositTxList); + if (depositTxList) success(ctx, depositTxList) else error(ctx, ErrorTypes.API_ERROR) } } diff --git a/bots/src/controller/executor/OutputController.ts b/bots/src/controller/executor/OutputController.ts index a08cfff5..90f6400c 100644 --- a/bots/src/controller/executor/OutputController.ts +++ b/bots/src/controller/executor/OutputController.ts @@ -1,14 +1,10 @@ -import { Context } from 'koa'; -import { - KoaController, - Get, - Controller, -} from 'koa-joi-controllers'; -import { ErrorTypes } from '../../lib/error'; -import { error, success } from '../../lib/response'; +import { Context } from 'koa' +import { KoaController, Get, Controller } from 'koa-joi-controllers' +import { ErrorTypes } from '../../lib/error' +import { error, success } from '../../lib/response' import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { getOutputList } from '../../service'; -import { GetOutputResponse } from '../../swagger/executor_model'; +import { getOutputList } from '../../service' +import { GetOutputResponse } from '../../swagger/executor_model' @Controller('') export class OutputController extends KoaController { @@ -27,18 +23,18 @@ export class OutputController extends KoaController { .optional() .default(20) .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value', + message: 'Invalid limit value' }), offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true), - }), - }, + descending: z.boolean().optional().default(true) + }) + } }) @responses(GetOutputResponse) @Get('/output') async getgetOutputList(ctx: Context): Promise { const outputList = await getOutputList(ctx.query as any) - if (outputList) success(ctx, outputList); + if (outputList) success(ctx, outputList) else error(ctx, ErrorTypes.API_ERROR) } } diff --git a/bots/src/controller/executor/WithdrawalTxController.ts b/bots/src/controller/executor/WithdrawalTxController.ts index de72fd32..1fccc8c1 100644 --- a/bots/src/controller/executor/WithdrawalTxController.ts +++ b/bots/src/controller/executor/WithdrawalTxController.ts @@ -1,14 +1,10 @@ -import { Context } from 'koa'; -import { - KoaController, - Get, - Controller, -} from 'koa-joi-controllers'; -import { ErrorTypes } from '../../lib/error'; -import { error, success } from '../../lib/response'; -import { getWithdrawalTxList } from '../../service'; +import { Context } from 'koa' +import { KoaController, Get, Controller } from 'koa-joi-controllers' +import { ErrorTypes } from '../../lib/error' +import { error, success } from '../../lib/response' +import { getWithdrawalTxList } from '../../service' import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetWithdrawalResponse } from '../../swagger/executor_model'; +import { GetWithdrawalResponse } from '../../swagger/executor_model' @Controller('') export class WithdrawalTxController extends KoaController { @@ -28,18 +24,18 @@ export class WithdrawalTxController extends KoaController { .optional() .default(20) .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value', + message: 'Invalid limit value' }), offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true), - }), - }, + descending: z.boolean().optional().default(true) + }) + } }) @responses(GetWithdrawalResponse) @Get('/tx/withdrawal') async getWithdrawalTxList(ctx: Context): Promise { - const withdrawalTxList = await getWithdrawalTxList(ctx.query as any); - if (withdrawalTxList) success(ctx, withdrawalTxList); - else error(ctx, ErrorTypes.API_ERROR); + const withdrawalTxList = await getWithdrawalTxList(ctx.query as any) + if (withdrawalTxList) success(ctx, withdrawalTxList) + else error(ctx, ErrorTypes.API_ERROR) } } diff --git a/bots/src/controller/index.ts b/bots/src/controller/index.ts index 255f0592..417fc8f1 100644 --- a/bots/src/controller/index.ts +++ b/bots/src/controller/index.ts @@ -1,17 +1,17 @@ -import { KoaController } from 'koa-joi-controllers'; -import BatchController from './batch/BatchController'; -import { OutputController } from './executor/OutputController'; -import { WithdrawalTxController } from './executor/WithdrawalTxController'; -import { DepositTxController } from './executor/DepositTxController'; -import { ClaimTxController } from './executor/ClaimTxController'; +import { KoaController } from 'koa-joi-controllers' +import { BatchController } from './batch/BatchController' +import { OutputController } from './executor/OutputController' +import { WithdrawalTxController } from './executor/WithdrawalTxController' +import { DepositTxController } from './executor/DepositTxController' +import { ClaimTxController } from './executor/ClaimTxController' export const executorController = [ OutputController, WithdrawalTxController, DepositTxController, ClaimTxController -].map((prototype) => new prototype()) as KoaController[]; +].map((prototype) => new prototype()) as KoaController[] export const batchController = [BatchController].map( (prototype) => new prototype() -) as KoaController[]; +) as KoaController[] diff --git a/bots/src/lib/compressor.spec.ts b/bots/src/lib/compressor.spec.ts index f7b0ed7a..a30a6eab 100644 --- a/bots/src/lib/compressor.spec.ts +++ b/bots/src/lib/compressor.spec.ts @@ -1,18 +1,18 @@ -import { compress, decompress } from './compressor'; +import { compress, decompress } from './compressor' describe('Test compress and decompress functions', () => { it('should correctly compress and decompress records', () => { const records = [ Buffer.from('Hello').toString('base64'), Buffer.from('World').toString('base64') - ]; + ] - const compressed = compress(records); - const decompressed = decompress(compressed); - expect(decompressed).toEqual(records); + const compressed = compress(records) + const decompressed = decompress(compressed) + expect(decompressed).toEqual(records) - const decompressedStrs = decompressed.map((buffer) => buffer.toString()); - const originalStrs = records.map((buffer) => buffer.toString()); - expect(decompressedStrs).toEqual(originalStrs); - }); -}); + const decompressedStrs = decompressed.map((buffer) => buffer.toString()) + const originalStrs = records.map((buffer) => buffer.toString()) + expect(decompressedStrs).toEqual(originalStrs) + }) +}) diff --git a/bots/src/lib/compressor.ts b/bots/src/lib/compressor.ts index 247e42d7..048114ce 100644 --- a/bots/src/lib/compressor.ts +++ b/bots/src/lib/compressor.ts @@ -1,15 +1,15 @@ -import pako from 'pako'; +import pako from 'pako' // compress tx data to submit L1 export function compress(input: string[]): Buffer { - const recordsWithCommas = input.join(','); - const recordsBuffer = Buffer.from(recordsWithCommas); - return Buffer.from(pako.gzip(recordsBuffer)); + const recordsWithCommas = input.join(',') + const recordsBuffer = Buffer.from(recordsWithCommas) + return Buffer.from(pako.gzip(recordsBuffer)) } // decompress indexed batch data export function decompress(input: Buffer): string[] { - const decompressed = pako.inflate(input); - const output: string = Buffer.from(decompressed).toString(); - return output.split(','); + const decompressed = pako.inflate(input) + const output: string = Buffer.from(decompressed).toString() + return output.split(',') } diff --git a/bots/src/lib/db.ts b/bots/src/lib/db.ts index a4d21c84..53bd3b0c 100644 --- a/bots/src/lib/db.ts +++ b/bots/src/lib/db.ts @@ -1,58 +1,58 @@ -import 'reflect-metadata'; -import Bluebird from 'bluebird'; +import 'reflect-metadata' +import Bluebird from 'bluebird' import { ConnectionOptionsReader, DataSource, DataSourceOptions -} from 'typeorm'; -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import CamelToSnakeNamingStrategy from '../orm/CamelToSnakeNamingStrategy'; +} from 'typeorm' +import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' +import CamelToSnakeNamingStrategy from '../orm/CamelToSnakeNamingStrategy' -const debug = require('debug')('orm'); +const debug = require('debug')('orm') -import { RecordEntity, ExecutorOutputEntity } from '../orm'; +import { RecordEntity, ExecutorOutputEntity } from '../orm' const staticOptions = { supportBigNumbers: true, bigNumberStrings: true, entities: [RecordEntity, ExecutorOutputEntity] -}; +} -let DB: DataSource[] = []; +let DB: DataSource[] = [] function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions; + const pgOpts = options as PostgresConnectionOptions debug( `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ pgOpts.port || 5432 }` - ); + ) return new DataSource({ ...options, ...staticOptions, namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize(); + }).initialize() } export async function initORM(): Promise { - const reader = new ConnectionOptionsReader(); - const options = (await reader.all()) as PostgresConnectionOptions[]; + const reader = new ConnectionOptionsReader() + const options = (await reader.all()) as PostgresConnectionOptions[] if (options.length && !options.filter((o) => o.name === 'default').length) { - options[0]['name' as any] = 'default'; + options[0]['name' as any] = 'default' } - DB = await Bluebird.map(options, (opt) => initConnection(opt)); + DB = await Bluebird.map(options, (opt) => initConnection(opt)) } export function getDB(): DataSource[] { if (!DB) { - throw new Error('DB not initialized'); + throw new Error('DB not initialized') } - return DB; + return DB } export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())); + await Promise.all(DB.map((c) => c.destroy())) } diff --git a/bots/src/lib/error.ts b/bots/src/lib/error.ts index 25d42a97..a4ec64a9 100644 --- a/bots/src/lib/error.ts +++ b/bots/src/lib/error.ts @@ -1,4 +1,4 @@ -import * as sentry from '@sentry/node'; +import * as sentry from '@sentry/node' export enum ErrorTypes { // 400 Bad Request @@ -42,21 +42,21 @@ export enum ErrorCodes { } // error message -const errorMessage = {}; +const errorMessage = {} export class APIError extends Error { - public type: string; - public message: string; - public code: string; - public wrappedError?: Error; + public type: string + public message: string + public code: string + public wrappedError?: Error constructor(type: ErrorTypes, code = '', message = '', err?: Error) { - super(message); - this.name = 'APIError'; - this.type = type || ErrorTypes.API_ERROR; - this.code = code; - this.message = message || errorMessage[code]; - this.wrappedError = err; + super(message) + this.name = 'APIError' + this.type = type || ErrorTypes.API_ERROR + this.code = code + this.message = message || errorMessage[code] + this.wrappedError = err } } @@ -65,38 +65,38 @@ export function errorHandler( ) { return async (ctx: any, next: any) => { try { - await next(); + await next() } catch (err) { if (err instanceof APIError) { if (err.type === ErrorTypes.LCD_ERROR && err.wrappedError) { - ctx.statusCode = (err.wrappedError as any).statusCode; - ctx.body = (err.wrappedError as any).body; + ctx.statusCode = (err.wrappedError as any).statusCode + ctx.body = (err.wrappedError as any).body } if (err.type === ErrorTypes.API_ERROR) { - const errForThrow = err.wrappedError || err; + const errForThrow = err.wrappedError || err sentry.withScope((scope) => { scope.addEventProcessor((event) => sentry.addRequestDataToEvent(event, ctx.request) - ); - sentry.captureException(errForThrow); - }); + ) + sentry.captureException(errForThrow) + }) } - callback(ctx, err.type, err.code, err.message); + callback(ctx, err.type, err.code, err.message) } else if (err.isJoi) { - callback(ctx, 'INVALID_REQUEST_ERROR', err.statusCode, err.message); + callback(ctx, 'INVALID_REQUEST_ERROR', err.statusCode, err.message) } else { sentry.withScope((scope) => { scope.addEventProcessor((event) => sentry.addRequestDataToEvent(event, ctx.request) - ); - sentry.captureException(err); - }); + ) + sentry.captureException(err) + }) - callback(ctx, 'API_ERROR', err.code, err.message); + callback(ctx, 'API_ERROR', err.code, err.message) } } - }; + } } diff --git a/bots/src/lib/logger.ts b/bots/src/lib/logger.ts index 3f7ea1b9..8d28bdc3 100644 --- a/bots/src/lib/logger.ts +++ b/bots/src/lib/logger.ts @@ -1,12 +1,12 @@ -import * as winston from 'winston'; -import DailyRotateFile from 'winston-daily-rotate-file'; -import { config } from '../config'; +import * as winston from 'winston' +import DailyRotateFile from 'winston-daily-rotate-file' +import { config } from '../config' function createLogger(name: string) { - const formats = [winston.format.errors({ stack: true })]; + const formats = [winston.format.errors({ stack: true })] if (!config.USE_LOG_FILE) { - formats.push(winston.format.colorize()); + formats.push(winston.format.colorize()) } formats.push( @@ -14,14 +14,14 @@ function createLogger(name: string) { winston.format.printf((info) => { return `${info.timestamp} [${info.level} - ${name}]: ${ info.stack || info.message - }`; + }` }) - ); + ) const logger = winston.createLogger({ format: winston.format.combine(...formats), defaultMeta: { service: 'user-service' } - }); + }) if (config.USE_LOG_FILE) { logger.add( @@ -31,22 +31,22 @@ function createLogger(name: string) { filename: `${name}_error.log`, zippedArchive: true }) - ); + ) logger.add( new DailyRotateFile({ dirname: 'logs', filename: `${name}_combined.log`, zippedArchive: true }) - ); + ) } else { - logger.add(new winston.transports.Console()); + logger.add(new winston.transports.Console()) } - return logger; + return logger } -export const executorLogger = createLogger('Executor'); -export const outputLogger = createLogger('Output'); -export const batchLogger = createLogger('Batch'); -export const challengerLogger = createLogger('Challenger'); +export const executorLogger = createLogger('Executor') +export const outputLogger = createLogger('Output') +export const batchLogger = createLogger('Batch') +export const challengerLogger = createLogger('Challenger') diff --git a/bots/src/lib/monitor/helper.ts b/bots/src/lib/monitor/helper.ts index ed6cb207..bcbf8231 100644 --- a/bots/src/lib/monitor/helper.ts +++ b/bots/src/lib/monitor/helper.ts @@ -1,10 +1,10 @@ -import { BlockInfo, Event, LCDClient, TxInfo } from '@initia/initia.js'; -import { getLatestOutputFromExecutor, getOutputFromExecutor } from '../query'; -import { WithdrawStorage } from '../storage'; -import { WithdrawalTx } from '../types'; -import { sha3_256 } from '../util'; -import OutputEntity from '../../orm/executor/OutputEntity'; -import { EntityManager, EntityTarget, ObjectLiteral } from 'typeorm'; +import { BlockInfo, Event, LCDClient, TxInfo } from '@initia/initia.js' +import { getLatestOutputFromExecutor, getOutputFromExecutor } from '../query' +import { WithdrawStorage } from '../storage' +import { WithdrawalTx } from '../types' +import { sha3_256 } from '../util' +import OutputEntity from '../../orm/executor/OutputEntity' +import { EntityManager, EntityTarget, ObjectLiteral } from 'typeorm' class MonitorHelper { /// @@ -17,7 +17,7 @@ class MonitorHelper { ): Promise { return await manager.getRepository(entityClass).findOne({ where: { name: name } as any - }); + }) } public async getWithdrawalTxs( @@ -27,7 +27,7 @@ class MonitorHelper { ): Promise { return await manager.getRepository(entityClass).find({ where: { outputIndex } as any - }); + }) } async getDepositTx( @@ -38,7 +38,7 @@ class MonitorHelper { ): Promise { return await manager.getRepository(entityClass).findOne({ where: { sequence, metadata } as any - }); + }) } public async getCoin( @@ -48,7 +48,7 @@ class MonitorHelper { ): Promise { return await manager.getRepository(entityClass).findOne({ where: { l2Metadata: metadata } as any - }); + }) } public async getLastOutputFromDB( @@ -58,17 +58,17 @@ class MonitorHelper { const lastOutput = await manager.getRepository(entityClass).find({ order: { outputIndex: 'DESC' } as any, take: 1 - }); - return lastOutput[0] ?? null; + }) + return lastOutput[0] ?? null } public async getLastOutputIndex( manager: EntityManager, entityClass: EntityTarget ): Promise { - const lastOutput = await this.getLastOutputFromDB(manager, entityClass); - const lastIndex = lastOutput ? lastOutput.outputIndex : 0; - return lastIndex; + const lastOutput = await this.getLastOutputFromDB(manager, entityClass) + const lastIndex = lastOutput ? lastOutput.outputIndex : 0 + return lastIndex } public async getOutputByIndex( @@ -78,7 +78,7 @@ class MonitorHelper { ): Promise { return await manager.getRepository(entityClass).findOne({ where: { outputIndex } as any - }); + }) } /// @@ -89,7 +89,7 @@ class MonitorHelper { entityClass: EntityTarget, entity: T ): Promise { - return await manager.getRepository(entityClass).save(entity); + return await manager.getRepository(entityClass).save(entity) } /// @@ -102,48 +102,48 @@ class MonitorHelper { ): Promise<[boolean, any[]]> { const searchRes = await lcd.tx.search({ query: [{ key: 'tx.height', value: height.toString() }] - }); - + }) + const extractEvents = (txs: TxInfo[]) => txs .filter((tx: TxInfo) => tx.events && tx.events.length > 0) - .flatMap((tx: TxInfo) =>tx.events ?? []) + .flatMap((tx: TxInfo) => tx.events ?? []) .filter((event: Event) => event.type === eventType) - const isEmpty = searchRes.txs.length === 0; - const events = extractEvents(searchRes.txs); + const isEmpty = searchRes.txs.length === 0 + const events = extractEvents(searchRes.txs) - return [isEmpty, events]; + return [isEmpty, events] } public async fetchAllEvents( lcd: LCDClient, - height: number, + height: number ): Promise<[boolean, any[]]> { const searchRes = await lcd.tx.search({ query: [{ key: 'tx.height', value: height.toString() }] - }); - + }) + const extractAllEvents = (txs: TxInfo[]) => txs .filter((tx: TxInfo) => tx.events && tx.events.length > 0) - .flatMap((tx: TxInfo) =>tx.events ?? []) - const isEmpty = searchRes.txs.length === 0; - const events = extractAllEvents(searchRes.txs); + .flatMap((tx: TxInfo) => tx.events ?? []) + const isEmpty = searchRes.txs.length === 0 + const events = extractAllEvents(searchRes.txs) - return [isEmpty, events]; + return [isEmpty, events] } public eventsToAttrMap(event: any): { [key: string]: string } { return event.attributes.reduce((obj, attr) => { - obj[attr.key] = attr.value; - return obj; - }, {}); + obj[attr.key] = attr.value + return obj + }, {}) } public parseData(attrMap: { [key: string]: string }): { [key: string]: string; } { - return JSON.parse(attrMap['data']); + return JSON.parse(attrMap['data']) } /// @@ -160,9 +160,9 @@ class MonitorHelper { startBlockNumber: number, endBlockNumber: number ): OutputEntity { - const version = outputIndex; - const stateRoot = blockInfo.block.header.app_hash; - const lastBlockHash = blockInfo.block_id.hash; + const version = outputIndex + const stateRoot = blockInfo.block.header.app_hash + const lastBlockHash = blockInfo.block_id.hash const outputRoot = sha3_256( Buffer.concat([ sha3_256(version), @@ -170,7 +170,7 @@ class MonitorHelper { Buffer.from(merkleRoot, 'base64'), Buffer.from(lastBlockHash, 'base64') ]) - ).toString('base64'); + ).toString('base64') const outputEntity = { outputIndex, @@ -180,9 +180,9 @@ class MonitorHelper { lastBlockHash, startBlockNumber, endBlockNumber - }; + } - return outputEntity; + return outputEntity } async saveMerkleRootAndProof( @@ -197,33 +197,33 @@ class MonitorHelper { receiver: entity.receiver, l1_denom: entity.l1Denom, amount: BigInt(entity.amount) - })); + })) - const storage = new WithdrawStorage(txs); - const merkleRoot = storage.getMerkleRoot(); + const storage = new WithdrawStorage(txs) + const merkleRoot = storage.getMerkleRoot() for (let i = 0; i < entities.length; i++) { - entities[i].merkleRoot = merkleRoot; - entities[i].merkleProof = storage.getMerkleProof(txs[i]); - await this.saveEntity(manager, entityClass, entities[i]); + entities[i].merkleRoot = merkleRoot + entities[i].merkleProof = storage.getMerkleProof(txs[i]) + await this.saveEntity(manager, entityClass, entities[i]) } - return merkleRoot; + return merkleRoot } public async getLatestOutputFromExecutor() { - const outputRes = await getLatestOutputFromExecutor(); + const outputRes = await getLatestOutputFromExecutor() if (!outputRes.output) { - throw new Error('No output from executor'); + throw new Error('No output from executor') } - return outputRes.output; + return outputRes.output } public async getOutputFromExecutor(outputIndex: number) { - const outputRes = await getOutputFromExecutor(outputIndex); + const outputRes = await getOutputFromExecutor(outputIndex) if (!outputRes.output) { - throw new Error('No output from executor'); + throw new Error('No output from executor') } - return outputRes.output; + return outputRes.output } } -export default MonitorHelper; +export default MonitorHelper diff --git a/bots/src/lib/monitor/index.ts b/bots/src/lib/monitor/index.ts index 210a7414..2552b38f 100644 --- a/bots/src/lib/monitor/index.ts +++ b/bots/src/lib/monitor/index.ts @@ -1 +1 @@ -export { Monitor } from './monitor'; +export { Monitor } from './monitor' diff --git a/bots/src/lib/monitor/l1.ts b/bots/src/lib/monitor/l1.ts index 8b3a3761..08233f39 100644 --- a/bots/src/lib/monitor/l1.ts +++ b/bots/src/lib/monitor/l1.ts @@ -1,19 +1,19 @@ -import { Monitor } from './monitor'; -import { Coin, Msg, MsgFinalizeTokenDeposit } from '@initia/initia.js'; +import { Monitor } from './monitor' +import { Coin, Msg, MsgFinalizeTokenDeposit } from '@initia/initia.js' import { ExecutorDepositTxEntity, ExecutorUnconfirmedTxEntity, - ExecutorOutputEntity, -} from '../../orm'; -import { EntityManager } from 'typeorm'; -import { RPCClient, RPCSocket } from '../rpc'; -import { getDB } from '../../worker/bridgeExecutor/db'; -import winston from 'winston'; -import { config } from '../../config'; -import { TxWallet, WalletType, getWallet, initWallet } from '../wallet'; + ExecutorOutputEntity +} from '../../orm' +import { EntityManager } from 'typeorm' +import { RPCClient, RPCSocket } from '../rpc' +import { getDB } from '../../worker/bridgeExecutor/db' +import winston from 'winston' +import { config } from '../../config' +import { TxWallet, WalletType, getWallet, initWallet } from '../wallet' export class L1Monitor extends Monitor { - executor: TxWallet; + executor: TxWallet constructor( public socket: RPCSocket, @@ -21,13 +21,13 @@ export class L1Monitor extends Monitor { logger: winston.Logger ) { super(socket, rpcClient, logger); - [this.db] = getDB(); - initWallet(WalletType.Executor, config.l2lcd); - this.executor = getWallet(WalletType.Executor); + [this.db] = getDB() + initWallet(WalletType.Executor, config.l2lcd) + this.executor = getWallet(WalletType.Executor) } public name(): string { - return 'executor_l1_monitor'; + return 'executor_l1_monitor' } public async handleInitiateTokenDeposit( @@ -37,7 +37,7 @@ export class L1Monitor extends Monitor { const lastIndex = await this.helper.getLastOutputIndex( manager, ExecutorOutputEntity - ); + ) const entity: ExecutorDepositTxEntity = { sequence: data['l1_sequence'], @@ -50,7 +50,7 @@ export class L1Monitor extends Monitor { outputIndex: lastIndex + 1, bridgeId: this.bridgeId.toString(), l1Height: this.currentHeight - }; + } return [ entity, @@ -64,67 +64,69 @@ export class L1Monitor extends Monitor { data['l1_denom'], Buffer.from(data['data'], 'hex').toString('base64') ) - ]; + ] } public async handleEvents(manager: EntityManager): Promise { const [isEmpty, events] = await this.helper.fetchAllEvents( config.l1lcd, - this.currentHeight, - ); + this.currentHeight + ) + + if (isEmpty) return false - if (isEmpty) return false; + const msgs: Msg[] = [] + const depositEntities: ExecutorDepositTxEntity[] = [] - const msgs: Msg[] = []; - const depositEntities: ExecutorDepositTxEntity[] = []; - - const depositEvents = events.filter((evt) => evt.type === 'initiate_token_deposit') + const depositEvents = events.filter( + (evt) => evt.type === 'initiate_token_deposit' + ) for (const evt of depositEvents) { - const attrMap = this.helper.eventsToAttrMap(evt); - if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue; + const attrMap = this.helper.eventsToAttrMap(evt) + if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue const [entity, msg] = await this.handleInitiateTokenDeposit( manager, attrMap - ); + ) - depositEntities.push(entity); - if (msg) msgs.push(msg); + depositEntities.push(entity) + if (msg) msgs.push(msg) } - await this.processMsgs(manager, msgs, depositEntities); - return true; + await this.processMsgs(manager, msgs, depositEntities) + return true } async processMsgs( manager: EntityManager, msgs: Msg[], - depositEntities: ExecutorDepositTxEntity[], + depositEntities: ExecutorDepositTxEntity[] ): Promise { - if (msgs.length == 0) return; - const stringfyMsgs = msgs.map((msg) => msg.toJSON().toString()); + if (msgs.length == 0) return + const stringfyMsgs = msgs.map((msg) => msg.toJSON().toString()) try { for (const entity of depositEntities) { - await this.helper.saveEntity(manager, ExecutorDepositTxEntity, entity); + await this.helper.saveEntity(manager, ExecutorDepositTxEntity, entity) } - await this.executor.transaction(msgs); + await this.executor.transaction(msgs) this.logger.info( `Succeeded to submit tx in height: ${this.currentHeight} ${stringfyMsgs}` - ); + ) } catch (err) { const errMsg = err.response?.data ? JSON.stringify(err.response?.data) - : err.toString(); + : err.toString() this.logger.info( `Failed to submit tx in height: ${this.currentHeight}\nMsg: ${stringfyMsgs}\nError: ${errMsg}` - ); + ) for (const entity of depositEntities) { await this.helper.saveEntity(manager, ExecutorUnconfirmedTxEntity, { ...entity, error: errMsg, processed: false - }); + }) } } } diff --git a/bots/src/lib/monitor/l2.ts b/bots/src/lib/monitor/l2.ts index c063d2d2..b18496ab 100644 --- a/bots/src/lib/monitor/l2.ts +++ b/bots/src/lib/monitor/l2.ts @@ -1,18 +1,18 @@ -import { ExecutorOutputEntity, ExecutorWithdrawalTxEntity } from '../../orm'; -import { Monitor } from './monitor'; -import { WithdrawStorage } from '../storage'; -import { WithdrawalTx } from '../types'; -import { EntityManager } from 'typeorm'; -import { BlockInfo } from '@initia/initia.js'; -import { getDB } from '../../worker/bridgeExecutor/db'; -import { RPCClient, RPCSocket } from '../rpc'; -import winston from 'winston'; -import { config } from '../../config'; -import { getBridgeInfo } from '../query'; +import { ExecutorOutputEntity, ExecutorWithdrawalTxEntity } from '../../orm' +import { Monitor } from './monitor' +import { WithdrawStorage } from '../storage' +import { WithdrawalTx } from '../types' +import { EntityManager } from 'typeorm' +import { BlockInfo } from '@initia/initia.js' +import { getDB } from '../../worker/bridgeExecutor/db' +import { RPCClient, RPCSocket } from '../rpc' +import winston from 'winston' +import { config } from '../../config' +import { getBridgeInfo } from '../query' export class L2Monitor extends Monitor { - submissionInterval: number; - nextSubmissionTimeSec: number; + submissionInterval: number + nextSubmissionTimeSec: number constructor( public socket: RPCSocket, @@ -20,27 +20,27 @@ export class L2Monitor extends Monitor { logger: winston.Logger ) { super(socket, rpcClient, logger); - [this.db] = getDB(); - this.nextSubmissionTimeSec = this.getCurTimeSec(); + [this.db] = getDB() + this.nextSubmissionTimeSec = this.getCurTimeSec() } public name(): string { - return 'executor_l2_monitor'; + return 'executor_l2_monitor' } dateToSeconds(date: Date): number { - return Math.floor(date.getTime() / 1000); + return Math.floor(date.getTime() / 1000) } private async setNextSubmissionTimeSec(): Promise { - const bridgeInfo = await getBridgeInfo(this.bridgeId); + const bridgeInfo = await getBridgeInfo(this.bridgeId) this.submissionInterval = - bridgeInfo.bridge_config.submission_interval.seconds.toNumber(); - this.nextSubmissionTimeSec += this.submissionInterval; + bridgeInfo.bridge_config.submission_interval.seconds.toNumber() + this.nextSubmissionTimeSec += this.submissionInterval } private getCurTimeSec(): number { - return this.dateToSeconds(new Date()); + return this.dateToSeconds(new Date()) } private async handleInitiateTokenWithdrawalEvent( @@ -50,12 +50,12 @@ export class L2Monitor extends Monitor { const outputInfo = await this.helper.getLastOutputFromDB( manager, ExecutorOutputEntity - ); - if (!outputInfo) return; + ) + if (!outputInfo) return const pair = await config.l1lcd.ophost.tokenPairByL2Denom( this.bridgeId, data['denom'] - ); + ) const tx: ExecutorWithdrawalTxEntity = { l1Denom: pair.l1_denom, @@ -68,27 +68,27 @@ export class L2Monitor extends Monitor { outputIndex: outputInfo ? outputInfo.outputIndex + 1 : 1, merkleRoot: '', merkleProof: [] - }; + } - await this.helper.saveEntity(manager, ExecutorWithdrawalTxEntity, tx); + await this.helper.saveEntity(manager, ExecutorWithdrawalTxEntity, tx) } public async handleEvents(manager: EntityManager): Promise { const [isEmpty, events] = await this.helper.fetchAllEvents( config.l2lcd, this.currentHeight - ); - if (isEmpty) return false; + ) + if (isEmpty) return false const withdrawalEvents = events.filter( (evt) => evt.type === 'initiate_token_withdrawal' - ); + ) for (const evt of withdrawalEvents) { - const attrMap = this.helper.eventsToAttrMap(evt); - await this.handleInitiateTokenWithdrawalEvent(manager, attrMap); + const attrMap = this.helper.eventsToAttrMap(evt) + await this.handleInitiateTokenWithdrawalEvent(manager, attrMap) } - return true; + return true } private async saveMerkleRootAndProof( @@ -104,50 +104,50 @@ export class L2Monitor extends Monitor { l1_denom: entity.l1Denom, amount: BigInt(entity.amount) }) - ); + ) - const storage = new WithdrawStorage(txs); - const merkleRoot = storage.getMerkleRoot(); + const storage = new WithdrawStorage(txs) + const merkleRoot = storage.getMerkleRoot() for (let i = 0; i < entities.length; i++) { - entities[i].merkleRoot = merkleRoot; - entities[i].merkleProof = storage.getMerkleProof(txs[i]); + entities[i].merkleRoot = merkleRoot + entities[i].merkleProof = storage.getMerkleProof(txs[i]) await this.helper.saveEntity( manager, ExecutorWithdrawalTxEntity, entities[i] - ); + ) } - return merkleRoot; + return merkleRoot } public async handleBlock(manager: EntityManager): Promise { - if (this.getCurTimeSec() < this.nextSubmissionTimeSec) return; + if (this.getCurTimeSec() < this.nextSubmissionTimeSec) return const lastOutput = await this.helper.getLastOutputFromDB( manager, ExecutorOutputEntity - ); + ) - const lastOutputEndBlockNumber = lastOutput ? lastOutput.endBlockNumber : 0; - const lastOutputIndex = lastOutput ? lastOutput.outputIndex : 0; + const lastOutputEndBlockNumber = lastOutput ? lastOutput.endBlockNumber : 0 + const lastOutputIndex = lastOutput ? lastOutput.outputIndex : 0 - const startBlockNumber = lastOutputEndBlockNumber + 1; - const endBlockNumber = this.currentHeight; - const outputIndex = lastOutputIndex + 1; + const startBlockNumber = lastOutputEndBlockNumber + 1 + const endBlockNumber = this.currentHeight + const outputIndex = lastOutputIndex + 1 - if (startBlockNumber > endBlockNumber) return; + if (startBlockNumber > endBlockNumber) return const blockInfo: BlockInfo = await config.l2lcd.tendermint.blockInfo( this.currentHeight - ); + ) // fetch txs and build merkle tree for withdrawal storage const txEntities = await this.helper.getWithdrawalTxs( manager, ExecutorWithdrawalTxEntity, outputIndex - ); + ) - const merkleRoot = await this.saveMerkleRootAndProof(manager, txEntities); + const merkleRoot = await this.saveMerkleRootAndProof(manager, txEntities) const outputEntity = this.helper.calculateOutputEntity( outputIndex, @@ -155,10 +155,10 @@ export class L2Monitor extends Monitor { merkleRoot, startBlockNumber, endBlockNumber - ); + ) - await this.helper.saveEntity(manager, ExecutorOutputEntity, outputEntity); + await this.helper.saveEntity(manager, ExecutorOutputEntity, outputEntity) - await this.setNextSubmissionTimeSec(); + await this.setNextSubmissionTimeSec() } } diff --git a/bots/src/lib/monitor/monitor.ts b/bots/src/lib/monitor/monitor.ts index 9f84c4bf..915475b5 100644 --- a/bots/src/lib/monitor/monitor.ts +++ b/bots/src/lib/monitor/monitor.ts @@ -1,29 +1,29 @@ -import Bluebird from 'bluebird'; -import { RPCClient, RPCSocket } from '../rpc'; -import { StateEntity } from '../../orm'; -import { DataSource, EntityManager } from 'typeorm'; -import MonitorHelper from './helper'; -import winston from 'winston'; -import { INTERVAL_MONITOR, config } from '../../config'; +import Bluebird from 'bluebird' +import { RPCClient, RPCSocket } from '../rpc' +import { StateEntity } from '../../orm' +import { DataSource, EntityManager } from 'typeorm' +import MonitorHelper from './helper' +import winston from 'winston' +import { INTERVAL_MONITOR, config } from '../../config' -const MAX_BLOCKS = 20; // DO NOT CHANGE THIS, hard limit is 20 in cometbft. -const MAX_RETRY_INTERVAL = 30_000; +const MAX_BLOCKS = 20 // DO NOT CHANGE THIS, hard limit is 20 in cometbft. +const MAX_RETRY_INTERVAL = 30_000 export abstract class Monitor { - public syncedHeight: number; - public currentHeight: number; - protected db: DataSource; - protected isRunning = false; - protected bridgeId: number; - protected retryNum = 0; - helper: MonitorHelper = new MonitorHelper(); + public syncedHeight: number + public currentHeight: number + protected db: DataSource + protected isRunning = false + protected bridgeId: number + protected retryNum = 0 + helper: MonitorHelper = new MonitorHelper() constructor( public socket: RPCSocket, public rpcClient: RPCClient, public logger: winston.Logger ) { - this.bridgeId = config.BRIDGE_ID; + this.bridgeId = config.BRIDGE_ID } public async run(): Promise { @@ -31,7 +31,7 @@ export abstract class Monitor { where: { name: this.name() } - }); + }) this.syncedHeight = state?.height || 0 @@ -44,79 +44,79 @@ export abstract class Monitor { await this.db .getRepository(StateEntity) - .save({ name: this.name(), height: this.syncedHeight}); + .save({ name: this.name(), height: this.syncedHeight }) } - - this.socket.initialize(); - this.isRunning = true; - await this.monitor(); + + this.socket.initialize() + this.isRunning = true + await this.monitor() } public stop(): void { - this.socket.stop(); - this.isRunning = false; + this.socket.stop() + this.isRunning = false } async handleBlockWithStateUpdate(manager: EntityManager): Promise { - await this.handleBlock(manager); + await this.handleBlock(manager) if (this.syncedHeight % 10 === 0) { - this.logger.info(`${this.name()} height ${this.syncedHeight}`); + this.logger.info(`${this.name()} height ${this.syncedHeight}`) } - this.syncedHeight++; + this.syncedHeight++ await manager .getRepository(StateEntity) - .update({ name: this.name() }, { height: this.syncedHeight }); + .update({ name: this.name() }, { height: this.syncedHeight }) } public async monitor(): Promise { while (this.isRunning) { try { - const latestHeight = this.socket.latestHeight; - if (!latestHeight || !(latestHeight > this.syncedHeight)) continue; + const latestHeight = this.socket.latestHeight + if (!latestHeight || !(latestHeight > this.syncedHeight)) continue const blockchainData = await this.rpcClient.getBlockchain( this.syncedHeight + 1, // cap the query to fetch 20 blocks at maximum // DO NOT CHANGE THIS, hard limit is 20 in cometbft. Math.min(latestHeight, this.syncedHeight + MAX_BLOCKS) - ); - if (blockchainData === null) continue; + ) + if (blockchainData === null) continue await this.db.transaction(async (manager: EntityManager) => { for (const metadata of blockchainData.block_metas.reverse()) { - this.currentHeight = this.syncedHeight + 1; + this.currentHeight = this.syncedHeight + 1 if (this.currentHeight !== parseInt(metadata.header.height)) { throw new Error( `expected block meta is the height ${this.currentHeight}, but got ${metadata.header.height}` - ); + ) } - + if (parseInt(metadata.num_txs) === 0) { - await this.handleBlockWithStateUpdate(manager); - continue; + await this.handleBlockWithStateUpdate(manager) + continue } // handle event always called when there is a tx in a block, // so empty means, the tx indexing is still on going. - const ok: boolean = await this.handleEvents(manager); + const ok: boolean = await this.handleEvents(manager) if (!ok) { - this.retryNum++; + this.retryNum++ if (this.retryNum * INTERVAL_MONITOR >= MAX_RETRY_INTERVAL) { // rotate when tx index data is not found during 30s after block stored. - this.rpcClient.rotateRPC(); + this.rpcClient.rotateRPC() } - break; + break } - this.retryNum = 0; - await this.handleBlockWithStateUpdate(manager); + this.retryNum = 0 + await this.handleBlockWithStateUpdate(manager) } - }); + }) } catch (err) { - this.logger.info(err); - this.stop(); - throw new Error(`Error in ${this.name()} ${err}`); + this.logger.info(err) + this.stop() + throw new Error(`Error in ${this.name()} ${err}`) } finally { - await Bluebird.delay(INTERVAL_MONITOR); + await Bluebird.delay(INTERVAL_MONITOR) } } } @@ -129,6 +129,6 @@ export abstract class Monitor { // eslint-disable-next-line public name(): string { - return ''; + return '' } } diff --git a/bots/src/lib/query.ts b/bots/src/lib/query.ts index f970f7b2..94af7415 100644 --- a/bots/src/lib/query.ts +++ b/bots/src/lib/query.ts @@ -1,11 +1,11 @@ -import { BridgeInfo, OutputInfo, TokenPair } from '@initia/initia.js'; -import { config } from '../config'; +import { BridgeInfo, OutputInfo, TokenPair } from '@initia/initia.js' +import { config } from '../config' import { DepositTxResponse, OutputResponse, WithdrawalTxResponse -} from './types'; -import axios from 'axios'; +} from './types' +import axios from 'axios' /// LCD query @@ -16,9 +16,9 @@ export async function getLastOutputInfo( const [outputInfos] = await config.l1lcd.ophost.outputInfos(bridgeId, { 'pagination.limit': '1', 'pagination.reverse': 'true' - }); - if (outputInfos.length === 0) return null; - return outputInfos[0]; + }) + if (outputInfos.length === 0) return null + return outputInfos[0] } // get the output by index from L1 chain @@ -26,15 +26,15 @@ export async function getOutputInfoByIndex( bridgeId: number, outputIndex: number ): Promise { - return await config.l1lcd.ophost.outputInfo(bridgeId, outputIndex); + return await config.l1lcd.ophost.outputInfo(bridgeId, outputIndex) } export async function getBridgeInfo(bridgeId: number): Promise { - return await config.l1lcd.ophost.bridgeInfo(bridgeId); + return await config.l1lcd.ophost.bridgeInfo(bridgeId) } export async function getTokenPairByL1Denom(denom: string): Promise { - return await config.l1lcd.ophost.tokenPairByL1Denom(config.BRIDGE_ID, denom); + return await config.l1lcd.ophost.tokenPairByL1Denom(config.BRIDGE_ID, denom) } /// API query @@ -43,47 +43,47 @@ export async function getWithdrawalTxFromExecutor( bridge_id: number, sequence: number ): Promise { - const url = `${config.EXECUTOR_URI}/tx/withdrawal/${bridge_id}/${sequence}`; + const url = `${config.EXECUTOR_URI}/tx/withdrawal/${bridge_id}/${sequence}` - const res = await axios.get(url); - return res.data; + const res = await axios.get(url) + return res.data } export async function getDepositTxFromExecutor( bridge_id: number, sequence: number ): Promise { - const url = `${config.EXECUTOR_URI}/tx/deposit/${bridge_id}/${sequence}`; - const res = await axios.get(url); - return res.data; + const url = `${config.EXECUTOR_URI}/tx/deposit/${bridge_id}/${sequence}` + const res = await axios.get(url) + return res.data } // fetching the output by index from l2 chain export async function getOutputFromExecutor( outputIndex: number ): Promise { - const url = `${config.EXECUTOR_URI}/output/${outputIndex}`; - const res = await axios.get(url); - return res.data; + const url = `${config.EXECUTOR_URI}/output/${outputIndex}` + const res = await axios.get(url) + return res.data } // fetching the latest output from l2 chain export async function getLatestOutputFromExecutor(): Promise { - const url = `${config.EXECUTOR_URI}/output/latest`; - const res = await axios.get(url); - return res.data; + const url = `${config.EXECUTOR_URI}/output/latest` + const res = await axios.get(url) + return res.data } export const checkHealth = async (url: string, timeout = 60_000) => { - const startTime = Date.now(); + const startTime = Date.now() while (Date.now() - startTime < timeout) { try { - const response = await axios.get(url); - if (response.status === 200) return; + const response = await axios.get(url) + if (response.status === 200) return } catch { - continue; + continue } - await new Promise((res) => setTimeout(res, 1_000)); + await new Promise((res) => setTimeout(res, 1_000)) } -}; +} diff --git a/bots/src/lib/response.ts b/bots/src/lib/response.ts index 8a12f6b3..153bf112 100644 --- a/bots/src/lib/response.ts +++ b/bots/src/lib/response.ts @@ -1,5 +1,5 @@ -import { Context } from 'koa'; -import { ErrorTypes } from './error'; +import { Context } from 'koa' +import { ErrorTypes } from './error' const TYPES_TO_HTTP_STATUS_CODES = { [ErrorTypes.INVALID_REQUEST_ERROR]: 400, // Bad Request @@ -13,15 +13,15 @@ const TYPES_TO_HTTP_STATUS_CODES = { [ErrorTypes.API_ERROR]: 500, [ErrorTypes.SERVICE_UNAVAILABLE]: 503, [ErrorTypes.LCD_ERROR]: 500 -}; +} export function success(ctx: Context, body: any = null, statusCode = 200) { - ctx.status = statusCode; + ctx.status = statusCode if (body === null) { - ctx.body = JSON.stringify(body); + ctx.body = JSON.stringify(body) } else { - ctx.body = body; + ctx.body = body } } @@ -31,7 +31,7 @@ export function error( code = '', message = '' ): void { - ctx.status = TYPES_TO_HTTP_STATUS_CODES[type] || 500; + ctx.status = TYPES_TO_HTTP_STATUS_CODES[type] || 500 const body: { type: string; @@ -41,15 +41,15 @@ export function error( type, message: undefined, code: undefined - }; + } if (message) { - body.message = message; + body.message = message } if (code) { - body.code = code; + body.code = code } - ctx.body = body; + ctx.body = body } diff --git a/bots/src/lib/rpc.ts b/bots/src/lib/rpc.ts index 4464506d..fc31cd4b 100644 --- a/bots/src/lib/rpc.ts +++ b/bots/src/lib/rpc.ts @@ -1,18 +1,18 @@ -import * as winston from 'winston'; -import axios, { AxiosRequestConfig } from 'axios'; -import Websocket from 'ws'; +import * as winston from 'winston' +import axios, { AxiosRequestConfig } from 'axios' +import Websocket from 'ws' export class RPCSocket { - public ws: Websocket; - public wsUrl: string; - public sendedPingAt = 0; - public isAlive = true; - public alivedAt: number; - public updateTimer: NodeJS.Timeout; - public latestHeight?: number; - logger: winston.Logger; - rpcUrl: string; - curRPCUrlIndex: number; + public ws: Websocket + public wsUrl: string + public sendedPingAt = 0 + public isAlive = true + public alivedAt: number + public updateTimer: NodeJS.Timeout + public latestHeight?: number + logger: winston.Logger + rpcUrl: string + curRPCUrlIndex: number constructor( public rpcUrls: string[], @@ -20,45 +20,45 @@ export class RPCSocket { logger: winston.Logger ) { if (this.rpcUrls.length === 0) { - throw new Error('RPC URLs list cannot be empty'); + throw new Error('RPC URLs list cannot be empty') } - this.curRPCUrlIndex = 0; - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex]; - this.wsUrl = this.rpcUrl.replace('http', 'ws') + '/websocket'; - this.logger = logger; + this.curRPCUrlIndex = 0 + this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] + this.wsUrl = this.rpcUrl.replace('http', 'ws') + '/websocket' + this.logger = logger } public initialize(): void { - this.connect(); - this.updateTimer = setTimeout(() => this.tick(), this.interval); + this.connect() + this.updateTimer = setTimeout(() => this.tick(), this.interval) } public rotateRPC() { - this.curRPCUrlIndex = (this.curRPCUrlIndex + 1) % this.rpcUrls.length; - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex]; - this.wsUrl = this.rpcUrl.replace('http', 'ws') + '/websocket'; - this.logger.info(`Rotate WS RPC to ${this.rpcUrl}`); + this.curRPCUrlIndex = (this.curRPCUrlIndex + 1) % this.rpcUrls.length + this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] + this.wsUrl = this.rpcUrl.replace('http', 'ws') + '/websocket' + this.logger.info(`Rotate WS RPC to ${this.rpcUrl}`) } public stop(): void { - if (this.ws) this.ws.terminate(); + if (this.ws) this.ws.terminate() } public tick(): void { - const now = Date.now(); + const now = Date.now() if ( this.ws && this.ws.readyState === this.ws.OPEN && now - this.sendedPingAt > 10000 ) { - this.ws.ping(); - this.sendedPingAt = now; + this.ws.ping() + this.sendedPingAt = now } - this.checkAlive(); - - if (this.updateTimer) clearTimeout(this.updateTimer); - this.updateTimer = setTimeout(() => this.tick(), this.interval); + this.checkAlive() + + if (this.updateTimer) clearTimeout(this.updateTimer) + this.updateTimer = setTimeout(() => this.tick(), this.interval) } protected alive(): void { @@ -67,38 +67,38 @@ export class RPCSocket { (Date.now() - this.alivedAt - this.interval) / 60 / 1000 - ).toFixed(1); - const msg = `${this.constructor.name} is now alive. (downtime ${downtime} minutes)`; - this.logger.info(msg); - this.isAlive = true; + ).toFixed(1) + const msg = `${this.constructor.name} is now alive. (downtime ${downtime} minutes)` + this.logger.info(msg) + this.isAlive = true } - this.alivedAt = Date.now(); + this.alivedAt = Date.now() } private checkAlive(): void { // no responsed more than 3 minutes, it is down if (this.isAlive && Date.now() - this.alivedAt > 3 * 60 * 1000) { - const msg = `${this.constructor.name} is no response!`; - this.logger.info(msg); - this.isAlive = false; + const msg = `${this.constructor.name} is no response!` + this.logger.info(msg) + this.isAlive = false } } public connect(): void { - this.disconnect(); - this.ws = new Websocket(this.wsUrl); - this.ws.on('open', () => this.onConnect()); + this.disconnect() + this.ws = new Websocket(this.wsUrl) + this.ws.on('open', () => this.onConnect()) this.ws.on('close', (code, reason) => this.onDisconnect(code, reason.toString()) - ); - this.ws.on('error', (error) => this.onError(error)); - this.ws.on('message', async (raw) => await this.onRawData(raw)); - this.ws.on('ping', () => this.ws.pong()); - this.ws.on('pong', () => this.alive()); + ) + this.ws.on('error', (error) => this.onError(error)) + this.ws.on('message', async (raw) => await this.onRawData(raw)) + this.ws.on('ping', () => this.ws.pong()) + this.ws.on('pong', () => this.alive()) } public disconnect(): void { - if (this.ws) this.ws.terminate(); + if (this.ws) this.ws.terminate() } protected onConnect(): void { @@ -109,70 +109,73 @@ export class RPCSocket { params: { query: `tm.event = 'NewBlock'` } - }; + } - this.ws.send(JSON.stringify(request)); + this.ws.send(JSON.stringify(request)) this.logger.info( `${this.constructor.name}: websocket connected to ${this.wsUrl}` - ); - this.alive(); + ) + this.alive() } protected onDisconnect(code: number, reason: string): void { - this.rotateRPC(); + this.rotateRPC() this.logger.info( `${this.constructor.name}: websocket disconnected (${code}: ${reason})` - ); + ) // if disconnected, try connect again - setTimeout(() => this.connect(), 1000); + setTimeout(() => this.connect(), 1000) } // eslint-disable-next-line protected onError(error): void { - this.logger.info(`${this.constructor.name} websocket: `, error); + this.logger.info(`${this.constructor.name} websocket: `, error) } // eslint-disable-next-line protected async onRawData(raw): Promise { - let data; + let data try { - data = JSON.parse(raw); + data = JSON.parse(raw) } catch (error) { - this.logger.info(`${this.constructor.name}: JSON parse error ${raw}`); - return; + this.logger.info(`${this.constructor.name}: JSON parse error ${raw}`) + return } try { if (data['result']?.['data']?.['value']) { this.latestHeight = Number.parseInt( data['result']?.['data']?.['value']['block']['header']['height'] - ); + ) } } catch (error) { - this.logger.info(error); + this.logger.info(error) } - this.alive(); + this.alive() } } export class RPCClient { - private curRPCUrlIndex = 0; - private rpcUrl: string; + private curRPCUrlIndex = 0 + private rpcUrl: string - constructor(public rpcUrls: string[], public logger: winston.Logger) { + constructor( + public rpcUrls: string[], + public logger: winston.Logger + ) { if (this.rpcUrls.length === 0) { - throw new Error('RPC URLs list cannot be empty'); + throw new Error('RPC URLs list cannot be empty') } - this.curRPCUrlIndex = 0; - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex]; + this.curRPCUrlIndex = 0 + this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] } public rotateRPC() { - this.curRPCUrlIndex = (this.curRPCUrlIndex + 1) % this.rpcUrls.length; - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex]; - this.logger.info(`Rotate RPC to ${this.rpcUrl}`); + this.curRPCUrlIndex = (this.curRPCUrlIndex + 1) % this.rpcUrls.length + this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] + this.logger.info(`Rotate RPC to ${this.rpcUrl}`) } async getRequest( @@ -184,32 +187,32 @@ export class RPCClient { 'Content-Type': 'application/json', 'User-Agent': 'initia-rollup' } - }; + } - let url = `${this.rpcUrl}${path}`; + let url = `${this.rpcUrl}${path}` params && Object.keys(params).forEach( (key) => params[key] === undefined && delete params[key] - ); - const qs = new URLSearchParams(params as any).toString(); + ) + const qs = new URLSearchParams(params as any).toString() if (qs.length) { - url += `?${qs}`; + url += `?${qs}` } try { - const response = await axios.get(url, options); + const response = await axios.get(url, options) if (response.status !== 200) { - throw new Error(`Invalid status code: ${response.status}`); + throw new Error(`Invalid status code: ${response.status}`) } - const data = response.data; + const data = response.data if (!data || typeof data.jsonrpc !== 'string') { - throw new Error('Failed to query RPC'); + throw new Error('Failed to query RPC') } - return data.result; + return data.result } catch (e) { - throw new Error(`RPC request to ${url} failed by ${e}`); + throw new Error(`RPC request to ${url} failed by ${e}`) } } @@ -220,63 +223,62 @@ export class RPCClient { const blockchainResult: Blockchain = await this.getRequest(`/blockchain`, { minHeight: min_height.toString(), maxHeight: max_height.toString() - }); + }) if (!blockchainResult) { - this.logger.info('failed get blockchain from rpc'); - return null; + this.logger.info('failed get blockchain from rpc') + return null } - return blockchainResult; + return blockchainResult } async getBlockBulk(start: string, end: string): Promise { const blockBulksResult: BlockBulk = await this.getRequest(`/block_bulk`, { start, end - }); + }) if (!blockBulksResult) { - this.logger.info('failed get block bulks from rpc'); - return null; + this.logger.info('failed get block bulks from rpc') + return null } - return blockBulksResult; + return blockBulksResult } async getRawCommit(end: string): Promise { const rawCommitResult: RawCommit = await this.getRequest(`/raw_commit`, { height: end - }); + }) if (!rawCommitResult) { - this.logger.info('failed get raw commit from rpc'); - return null; + this.logger.info('failed get raw commit from rpc') + return null } - return rawCommitResult; + return rawCommitResult } async lookupInvalidBlock(): Promise { - const invalidBlockResult: InvalidBlock = await this.getRequest( - `/invalid_block` - ); + const invalidBlockResult: InvalidBlock = + await this.getRequest(`/invalid_block`) if (invalidBlockResult.reason !== '' && invalidBlockResult.height !== '0') { - return invalidBlockResult; + return invalidBlockResult } - return null; + return null } async getLatestBlockHeight(): Promise { - const abciInfo: ABCIInfo = await this.getRequest(`/abci_info`); + const abciInfo: ABCIInfo = await this.getRequest(`/abci_info`) if (abciInfo) { - return parseInt(abciInfo.last_block_height); + return parseInt(abciInfo.last_block_height) } - throw new Error(`failed to get latest block height`); + throw new Error(`failed to get latest block height`) } } diff --git a/bots/src/lib/slack.ts b/bots/src/lib/slack.ts index ec5b8af0..c951d980 100644 --- a/bots/src/lib/slack.ts +++ b/bots/src/lib/slack.ts @@ -1,23 +1,23 @@ -import { Wallet } from '@initia/initia.js'; -import axios from 'axios'; -import BigNumber from 'bignumber.js'; -import { config } from '../config'; -import * as http from 'http'; -import * as https from 'https'; -import UnconfirmedTxEntity from '../orm/executor/UnconfirmedTxEntity'; -import { ChallengedOutputEntity } from '../orm/index'; +import { Wallet } from '@initia/initia.js' +import axios from 'axios' +import BigNumber from 'bignumber.js' +import { config } from '../config' +import * as http from 'http' +import * as https from 'https' +import UnconfirmedTxEntity from '../orm/executor/UnconfirmedTxEntity' +import { ChallengedOutputEntity } from '../orm/index' const ax = axios.create({ httpAgent: new http.Agent({ keepAlive: true }), httpsAgent: new https.Agent({ keepAlive: true }), timeout: 15000 -}); +}) export async function notifySlack(text: { text: string }) { - if (config.SLACK_WEB_HOOK == '') return; + if (config.SLACK_WEB_HOOK == '') return await ax.post(config.SLACK_WEB_HOOK, text).catch(() => { - console.error('Slack Notification Error'); - }); + console.error('Slack Notification Error') + }) } export function buildNotEnoughBalanceNotification( @@ -25,62 +25,62 @@ export function buildNotEnoughBalanceNotification( balance: number, denom: string ): { text: string } { - let notification = '```'; - notification += `[WARN] Enough Balance Notification\n`; - notification += `\n`; - notification += `Chain ID: ${wallet.lcd.config.chainId}\n`; - notification += `Endpoint: ${wallet.lcd.URL}\n`; - notification += `Address : ${wallet.key.accAddress}\n`; + let notification = '```' + notification += `[WARN] Enough Balance Notification\n` + notification += `\n` + notification += `Chain ID: ${wallet.lcd.config.chainId}\n` + notification += `Endpoint: ${wallet.lcd.URL}\n` + notification += `Address : ${wallet.key.accAddress}\n` notification += `Balance : ${new BigNumber(balance) .div(1e6) - .toFixed(6)} ${denom}\n`; - notification += '```'; - const text = `${notification}`; + .toFixed(6)} ${denom}\n` + notification += '```' + const text = `${notification}` return { text - }; + } } export function buildFailedTxNotification(data: UnconfirmedTxEntity): { text: string; } { - let notification = '```'; - notification += `[WARN] Bridge Processed Tx Notification\n`; + let notification = '```' + notification += `[WARN] Bridge Processed Tx Notification\n` - notification += `[L1] ${config.L1_CHAIN_ID} => [L2] ${config.L2_CHAIN_ID}\n`; - notification += `\n`; - notification += `Bridge ID: ${data.bridgeId}\n`; - notification += `Sequence: ${data.sequence}\n`; - notification += `Sender: ${data.sender}\n`; - notification += `To: ${data.receiver}\n`; - notification += `\n`; + notification += `[L1] ${config.L1_CHAIN_ID} => [L2] ${config.L2_CHAIN_ID}\n` + notification += `\n` + notification += `Bridge ID: ${data.bridgeId}\n` + notification += `Sequence: ${data.sequence}\n` + notification += `Sender: ${data.sender}\n` + notification += `To: ${data.receiver}\n` + notification += `\n` notification += `Amount: ${new BigNumber(data.amount) .div(1e6) - .toFixed(6)} ${data.l1Denom}\n`; - notification += `\n`; - notification += `L1 Height: ${data.l1Height}\n`; - notification += `Error : ${data.error}\n`; - notification += '```'; - const text = `${notification}`; + .toFixed(6)} ${data.l1Denom}\n` + notification += `\n` + notification += `L1 Height: ${data.l1Height}\n` + notification += `Error : ${data.error}\n` + notification += '```' + const text = `${notification}` return { text - }; + } } export function buildChallengerNotification( challengedOutput: ChallengedOutputEntity ): { text: string } { - let notification = '```'; - notification += `[WARN] Challenger Notification\n`; - notification += `\n`; - notification += `Bridge ID : ${challengedOutput.bridgeId}\n`; - notification += `OutputIndex : ${challengedOutput.outputIndex}\n`; - notification += `Reason : ${challengedOutput.reason}\n`; - notification += '```'; - const text = `${notification}`; + let notification = '```' + notification += `[WARN] Challenger Notification\n` + notification += `\n` + notification += `Bridge ID : ${challengedOutput.bridgeId}\n` + notification += `OutputIndex : ${challengedOutput.outputIndex}\n` + notification += `Reason : ${challengedOutput.reason}\n` + notification += '```' + const text = `${notification}` return { text - }; + } } diff --git a/bots/src/lib/storage.spec.ts b/bots/src/lib/storage.spec.ts index 05e0816e..5558cae8 100644 --- a/bots/src/lib/storage.spec.ts +++ b/bots/src/lib/storage.spec.ts @@ -1,6 +1,5 @@ -import { WithdrawStorage } from "./storage"; -import { sha3_256 } from "./util"; - +import { WithdrawStorage } from './storage' +import { sha3_256 } from './util' const v1 = [ { @@ -27,18 +26,18 @@ const v1 = [ l1_denom: 'uinit', amount: BigInt(1000000) } -]; +] describe('WithdrawStorage', () => { it('verify v1', async () => { - const airdrop = new WithdrawStorage(v1); - const target = v1[0]; + const airdrop = new WithdrawStorage(v1) + const target = v1[0] - const merkleRoot = airdrop.getMerkleRoot(); - const merkleProof = airdrop.getMerkleProof(target); - const version = 2; - const stateRoot = 'C2ZdjJ7uX41NaadA/FjlMiG6btiDfYnxE2ABqJocHxI='; - const lastBlockHash = 'tgmfQJT4uipVToW631xz0RXdrfzu7n5XxGNoPpX6isI='; + const merkleRoot = airdrop.getMerkleRoot() + const merkleProof = airdrop.getMerkleProof(target) + const version = 2 + const stateRoot = 'C2ZdjJ7uX41NaadA/FjlMiG6btiDfYnxE2ABqJocHxI=' + const lastBlockHash = 'tgmfQJT4uipVToW631xz0RXdrfzu7n5XxGNoPpX6isI=' const outputRoot = sha3_256( Buffer.concat([ sha3_256(version), @@ -46,13 +45,13 @@ describe('WithdrawStorage', () => { Buffer.from(merkleRoot, 'base64'), Buffer.from(lastBlockHash, 'base64') // block hash ]) - ).toString('base64'); - expect(airdrop.verify(merkleProof, target)).toBeTruthy(); + ).toString('base64') + expect(airdrop.verify(merkleProof, target)).toBeTruthy() - expect(merkleRoot).toEqual('EYgpXs1b+Z3AdGqjjtJHylrGzCjXtBKDD2UTPXelUk4='); + expect(merkleRoot).toEqual('EYgpXs1b+Z3AdGqjjtJHylrGzCjXtBKDD2UTPXelUk4=') expect(merkleProof).toEqual([ '5eJNy8mEqvyhysgWCqi7JQ7K602FtSpz+wDRNQitQMc=' - ]); - expect(outputRoot).toEqual('euaoJcFRXfV/6F0AiC0vYwXUY4NPHfCn9LbFMPieNsA='); - }); -}); + ]) + expect(outputRoot).toEqual('euaoJcFRXfV/6F0AiC0vYwXUY4NPHfCn9LbFMPieNsA=') + }) +}) diff --git a/bots/src/lib/storage.ts b/bots/src/lib/storage.ts index 0207e9cf..501519fe 100644 --- a/bots/src/lib/storage.ts +++ b/bots/src/lib/storage.ts @@ -1,25 +1,25 @@ -import { MerkleTree } from 'merkletreejs'; -import { sha3_256 } from './util'; -import { WithdrawalTx } from './types'; -import { AccAddress } from '@initia/initia.js'; +import { MerkleTree } from 'merkletreejs' +import { sha3_256 } from './util' +import { WithdrawalTx } from './types' +import { AccAddress } from '@initia/initia.js' function convertHexToBase64(hex: string): string { - return Buffer.from(hex, 'hex').toString('base64'); + return Buffer.from(hex, 'hex').toString('base64') } export class WithdrawStorage { - private tree: MerkleTree; + private tree: MerkleTree constructor(txs: Array) { const leaves = txs.map((tx) => { - const bridge_id_buf = Buffer.alloc(8); - bridge_id_buf.writeBigInt64BE(tx.bridge_id); + const bridge_id_buf = Buffer.alloc(8) + bridge_id_buf.writeBigInt64BE(tx.bridge_id) - const sequence_buf = Buffer.alloc(8); - sequence_buf.writeBigInt64BE(tx.sequence); + const sequence_buf = Buffer.alloc(8) + sequence_buf.writeBigInt64BE(tx.sequence) - const amount_buf = Buffer.alloc(8); - amount_buf.writeBigInt64BE(tx.amount); + const amount_buf = Buffer.alloc(8) + amount_buf.writeBigInt64BE(tx.amount) return sha3_256( Buffer.concat([ @@ -30,25 +30,25 @@ export class WithdrawStorage { Buffer.from(tx.l1_denom, 'utf8'), amount_buf ]) - ); - }); + ) + }) - this.tree = new MerkleTree(leaves, sha3_256, { sort: true }); + this.tree = new MerkleTree(leaves, sha3_256, { sort: true }) } public getMerkleRoot(): string { - return convertHexToBase64(this.tree.getHexRoot().replace('0x', '')); + return convertHexToBase64(this.tree.getHexRoot().replace('0x', '')) } public getMerkleProof(tx: WithdrawalTx): string[] { - const bridge_id_buf = Buffer.alloc(8); - bridge_id_buf.writeBigInt64BE(tx.bridge_id); + const bridge_id_buf = Buffer.alloc(8) + bridge_id_buf.writeBigInt64BE(tx.bridge_id) - const sequence_buf = Buffer.alloc(8); - sequence_buf.writeBigInt64BE(tx.sequence); + const sequence_buf = Buffer.alloc(8) + sequence_buf.writeBigInt64BE(tx.sequence) - const amount_buf = Buffer.alloc(8); - amount_buf.writeBigInt64BE(tx.amount); + const amount_buf = Buffer.alloc(8) + amount_buf.writeBigInt64BE(tx.amount) return this.tree .getHexProof( @@ -63,7 +63,7 @@ export class WithdrawStorage { ]) ) ) - .map((v) => convertHexToBase64(v.replace('0x', ''))); + .map((v) => convertHexToBase64(v.replace('0x', ''))) } public verify( @@ -77,14 +77,14 @@ export class WithdrawStorage { amount: bigint; } ): boolean { - const bridge_id_buf = Buffer.alloc(8); - bridge_id_buf.writeBigInt64BE(tx.bridge_id); + const bridge_id_buf = Buffer.alloc(8) + bridge_id_buf.writeBigInt64BE(tx.bridge_id) - const sequence_buf = Buffer.alloc(8); - sequence_buf.writeBigInt64BE(tx.sequence); + const sequence_buf = Buffer.alloc(8) + sequence_buf.writeBigInt64BE(tx.sequence) - const amount_buf = Buffer.alloc(8); - amount_buf.writeBigInt64BE(tx.amount); + const amount_buf = Buffer.alloc(8) + amount_buf.writeBigInt64BE(tx.amount) let hashBuf = sha3_256( Buffer.concat([ @@ -95,18 +95,18 @@ export class WithdrawStorage { Buffer.from(tx.l1_denom, 'utf8'), amount_buf ]) - ); + ) proof.forEach((proofElem) => { - const proofBuf = Buffer.from(proofElem, 'base64'); + const proofBuf = Buffer.from(proofElem, 'base64') if (Buffer.compare(hashBuf, proofBuf) === -1) { - hashBuf = sha3_256(Buffer.concat([hashBuf, proofBuf])); + hashBuf = sha3_256(Buffer.concat([hashBuf, proofBuf])) } else { - hashBuf = sha3_256(Buffer.concat([proofBuf, hashBuf])); + hashBuf = sha3_256(Buffer.concat([proofBuf, hashBuf])) } - }); + }) - return this.getMerkleRoot() === hashBuf.toString('base64'); + return this.getMerkleRoot() === hashBuf.toString('base64') } } diff --git a/bots/src/lib/tx.ts b/bots/src/lib/tx.ts index 111cb578..7ee0fdb7 100644 --- a/bots/src/lib/tx.ts +++ b/bots/src/lib/tx.ts @@ -4,7 +4,7 @@ import { Msg, WaitTxBroadcastResult, Wallet -} from '@initia/initia.js'; +} from '@initia/initia.js' export async function sendTx( wallet: Wallet, @@ -19,10 +19,10 @@ export async function sendTx( fee, accountNumber, sequence - }); - const broadcastResult = await wallet.lcd.tx.broadcast(signedTx, timeout); - if (broadcastResult['code']) throw new Error(broadcastResult.raw_log); - return broadcastResult; + }) + const broadcastResult = await wallet.lcd.tx.broadcast(signedTx, timeout) + if (broadcastResult['code']) throw new Error(broadcastResult.raw_log) + return broadcastResult } export async function sendRawTx( @@ -30,16 +30,16 @@ export async function sendRawTx( txBytes: string, timeout = 10_000 ): Promise { - const broadcastResult = await wallet.lcd.tx.broadcast(txBytes, timeout); - if (broadcastResult['code']) throw new Error(broadcastResult.raw_log); - return broadcastResult; + const broadcastResult = await wallet.lcd.tx.broadcast(txBytes, timeout) + if (broadcastResult['code']) throw new Error(broadcastResult.raw_log) + return broadcastResult } // check whether batch submission interval is met export async function getLatestBlockHeight(client: LCDClient): Promise { const block = await client.tendermint.blockInfo().catch((error) => { - throw new Error(`Error getting block info from L2: ${error}`); - }); + throw new Error(`Error getting block info from L2: ${error}`) + }) - return parseInt(block.block.header.height); + return parseInt(block.block.header.height) } diff --git a/bots/src/lib/types.ts b/bots/src/lib/types.ts index 509275f8..39bb1a5f 100644 --- a/bots/src/lib/types.ts +++ b/bots/src/lib/types.ts @@ -1,6 +1,6 @@ -import DepositTxEntity from '../orm/executor/DepositTxEntity'; -import WithdrawalTxEntity from '../orm/executor/WithdrawalTxEntity'; -import { ExecutorOutputEntity } from '../orm/index'; +import DepositTxEntity from '../orm/executor/DepositTxEntity' +import WithdrawalTxEntity from '../orm/executor/WithdrawalTxEntity' +import { ExecutorOutputEntity } from '../orm/index' export interface WithdrawalTx { bridge_id: bigint; diff --git a/bots/src/lib/util.ts b/bots/src/lib/util.ts index cd115b28..32e2d480 100644 --- a/bots/src/lib/util.ts +++ b/bots/src/lib/util.ts @@ -1,65 +1,65 @@ -import { SHA3 } from 'sha3'; +import { SHA3 } from 'sha3' export function sha3_256(value: Buffer | string | number): Buffer { - return new SHA3(256).update(toBuffer(value)).digest(); + return new SHA3(256).update(toBuffer(value)).digest() } function toBuffer(value: any): Buffer { if (!Buffer.isBuffer(value)) { if (Array.isArray(value)) { - value = Buffer.from(value); + value = Buffer.from(value) } else if (typeof value === 'string') { if (isHexString(value)) { - value = Buffer.from(padToEven(stripHexPrefix(value)), 'hex'); + value = Buffer.from(padToEven(stripHexPrefix(value)), 'hex') } else { - value = Buffer.from(value); + value = Buffer.from(value) } } else if (typeof value === 'number') { - value = numberToBuffer(value); + value = numberToBuffer(value) } else if (value === null || value === undefined) { - value = Buffer.allocUnsafe(0); + value = Buffer.allocUnsafe(0) } else if (value.toArray) { // converts a BN to a Buffer - value = Buffer.from(value.toArray()); + value = Buffer.from(value.toArray()) } else { - throw new Error('invalid type'); + throw new Error('invalid type') } } - return value; + return value } function isHexString(value: string, length?: number): boolean { if (!value.match(/^0x[0-9A-Fa-f]*$/)) { - return false; + return false } if (length && value.length !== 2 + 2 * length) { - return false; + return false } - return true; + return true } function padToEven(value: string): string { if (value.length % 2) { - value = `0${value}`; + value = `0${value}` } - return value; + return value } function stripHexPrefix(value: string): string { - return isHexPrefixed(value) ? value.slice(2) : value; + return isHexPrefixed(value) ? value.slice(2) : value } function isHexPrefixed(value: string): boolean { - return value.slice(0, 2) === '0x'; + return value.slice(0, 2) === '0x' } function numberToBuffer(i: number): Buffer { - return Buffer.from(padToEven(numberToHexString(i).slice(2)), 'hex'); + return Buffer.from(padToEven(numberToHexString(i).slice(2)), 'hex') } function numberToHexString(i: number): string { - return `0x${i.toString(16)}`; + return `0x${i.toString(16)}` } diff --git a/bots/src/lib/wallet.ts b/bots/src/lib/wallet.ts index 8516d45c..938ab8f8 100644 --- a/bots/src/lib/wallet.ts +++ b/bots/src/lib/wallet.ts @@ -6,10 +6,10 @@ import { LCDClient, WaitTxBroadcastResult, Coins -} from '@initia/initia.js'; -import { sendTx } from './tx'; -import { config } from '../config'; -import { buildNotEnoughBalanceNotification, notifySlack } from './slack'; +} from '@initia/initia.js' +import { sendTx } from './tx' +import { config } from '../config' +import { buildNotEnoughBalanceNotification, notifySlack } from './slack' export enum WalletType { Challenger = 'challenger', @@ -28,95 +28,98 @@ export const wallets: { executor: undefined, batchSubmitter: undefined, outputSubmitter: undefined -}; +} export function initWallet(type: WalletType, lcd: LCDClient): void { - if (wallets[type]) return; + if (wallets[type]) return switch (type) { case WalletType.Challenger: wallets[type] = new TxWallet( lcd, new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) - ); - break; + ) + break case WalletType.Executor: wallets[type] = new TxWallet( lcd, new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) - ); - break; + ) + break case WalletType.BatchSubmitter: wallets[type] = new TxWallet( lcd, new MnemonicKey({ mnemonic: config.BATCH_SUBMITTER_MNEMONIC }) - ); - break; + ) + break case WalletType.OutputSubmitter: wallets[type] = new TxWallet( lcd, new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) - ); - break; + ) + break } } // Access the wallets export function getWallet(type: WalletType): TxWallet { if (!wallets[type]) { - throw new Error(`Wallet ${type} not initialized`); + throw new Error(`Wallet ${type} not initialized`) } // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return wallets[type]!; + return wallets[type]! } export class TxWallet extends Wallet { - private managedAccountNumber; - private managedSequence; + private managedAccountNumber + private managedSequence constructor(lcd: LCDClient, key: Key) { - super(lcd, key); + super(lcd, key) } async checkEnoughBalance() { - const gasPrices = new Coins(this.lcd.config.gasPrices); - const denom = gasPrices.denoms()[0]; + const gasPrices = new Coins(this.lcd.config.gasPrices) + const denom = gasPrices.denoms()[0] const balance = await this.lcd.bank.balanceByDenom( this.key.accAddress, denom - ); + ) - if (balance.amount && parseInt(balance.amount) < config.SLACK_NOT_ENOUGH_BALANCE_THRESHOLD) { + if ( + balance.amount && + parseInt(balance.amount) < config.SLACK_NOT_ENOUGH_BALANCE_THRESHOLD + ) { await notifySlack( buildNotEnoughBalanceNotification(this, parseInt(balance.amount), denom) - ); + ) } } async transaction(msgs: Msg[]): Promise { if (!this.managedAccountNumber && !this.managedSequence) { const { account_number: accountNumber, sequence } = - await this.accountNumberAndSequence(); - this.managedAccountNumber = accountNumber; - this.managedSequence = sequence; + await this.accountNumberAndSequence() + this.managedAccountNumber = accountNumber + this.managedSequence = sequence } try { - await this.checkEnoughBalance(); + await this.checkEnoughBalance() const txInfo = await sendTx( this, msgs, undefined, this.managedAccountNumber, this.managedSequence - ); - this.managedSequence += 1; - return txInfo; + ) + this.managedSequence += 1 + return txInfo } catch (err) { - delete this.managedAccountNumber; - delete this.managedSequence; - throw err; + delete this.managedAccountNumber + delete this.managedSequence + throw err } } } diff --git a/bots/src/loader/app.ts b/bots/src/loader/app.ts index 57c1fed1..b767d7c2 100644 --- a/bots/src/loader/app.ts +++ b/bots/src/loader/app.ts @@ -39,7 +39,7 @@ function createApiDocApp(): Koa { app .use( serve(path.resolve(__dirname, '..', 'static'), { - maxage: 86400 * 1000, + maxage: 86400 * 1000 }) ) .use(notFoundMiddleware) @@ -72,7 +72,7 @@ async function createAPIApp(controllers: KoaController[]): Promise { error.message, error ) - }, + } }) ) diff --git a/bots/src/loader/index.ts b/bots/src/loader/index.ts index 70539a66..ae9d1edd 100644 --- a/bots/src/loader/index.ts +++ b/bots/src/loader/index.ts @@ -1,2 +1,2 @@ -export * from './app'; -export * from './server'; +export * from './app' +export * from './server' diff --git a/bots/src/loader/server.ts b/bots/src/loader/server.ts index 773bea31..9640d7c1 100644 --- a/bots/src/loader/server.ts +++ b/bots/src/loader/server.ts @@ -1,23 +1,23 @@ -import * as http from 'http'; -import { initApp } from './app'; -import { KoaController } from 'koa-joi-controllers'; -let server: http.Server; +import * as http from 'http' +import { initApp } from './app' +import { KoaController } from 'koa-joi-controllers' +let server: http.Server export async function initServer( controllers: KoaController[], port: number ): Promise { - const app = await initApp(controllers); + const app = await initApp(controllers) - server = http.createServer(app.callback()); + server = http.createServer(app.callback()) server.listen(port, () => { - console.log(`Listening on port ${port}`); - }); + console.log(`Listening on port ${port}`) + }) - return server; + return server } export function finalizeServer(): void { - server.close(); + server.close() } diff --git a/bots/src/orm/CamelToSnakeNamingStrategy.ts b/bots/src/orm/CamelToSnakeNamingStrategy.ts index add04c3e..33d95deb 100644 --- a/bots/src/orm/CamelToSnakeNamingStrategy.ts +++ b/bots/src/orm/CamelToSnakeNamingStrategy.ts @@ -1,19 +1,24 @@ -import { DefaultNamingStrategy, NamingStrategyInterface } from 'typeorm'; -import { snakeCase } from 'lodash'; +import { DefaultNamingStrategy, NamingStrategyInterface } from 'typeorm' +import { snakeCase } from 'lodash' -class CamelToSnakeNamingStrategy extends DefaultNamingStrategy implements NamingStrategyInterface { +class CamelToSnakeNamingStrategy + extends DefaultNamingStrategy + implements NamingStrategyInterface +{ tableName(targetName, userSpecifiedName) { - return userSpecifiedName ? userSpecifiedName : snakeCase(targetName); + return userSpecifiedName ? userSpecifiedName : snakeCase(targetName) } columnName(propertyName, customName, embeddedPrefixes) { - return snakeCase(embeddedPrefixes.concat(customName ? customName : propertyName).join('_')); + return snakeCase( + embeddedPrefixes.concat(customName ? customName : propertyName).join('_') + ) } columnNameCustomized(customName) { - return customName; + return customName } relationName(propertyName) { - return snakeCase(propertyName); + return snakeCase(propertyName) } } -export default CamelToSnakeNamingStrategy; \ No newline at end of file +export default CamelToSnakeNamingStrategy diff --git a/bots/src/orm/RecordEntity.ts b/bots/src/orm/RecordEntity.ts index 02808f89..8263cefd 100644 --- a/bots/src/orm/RecordEntity.ts +++ b/bots/src/orm/RecordEntity.ts @@ -1,19 +1,19 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; +import { Column, Entity, PrimaryColumn } from 'typeorm' @Entity('record') export default class RecordEntity { @PrimaryColumn() - bridgeId: number; + bridgeId: number @PrimaryColumn() - batchIndex: number; + batchIndex: number @Column() - startBlockNumber: number; + startBlockNumber: number @Column() - endBlockNumber: number; + endBlockNumber: number @Column('text', { array: true }) - batchInfo: string[]; // for l1 => txHash, for celestia => height::commitment + batchInfo: string[] // for l1 => txHash, for celestia => height::commitment } diff --git a/bots/src/orm/StateEntity.ts b/bots/src/orm/StateEntity.ts index 91143cc7..4bcab1c9 100644 --- a/bots/src/orm/StateEntity.ts +++ b/bots/src/orm/StateEntity.ts @@ -1,10 +1,10 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; +import { Column, Entity, PrimaryColumn } from 'typeorm' @Entity('state') export default class StateEntity { @PrimaryColumn('text') - name: string; + name: string @Column('int') - height: number; + height: number } diff --git a/bots/src/orm/challenger/ChallengeEntity.ts b/bots/src/orm/challenger/ChallengeEntity.ts index 4d6a05d4..b79dcf47 100644 --- a/bots/src/orm/challenger/ChallengeEntity.ts +++ b/bots/src/orm/challenger/ChallengeEntity.ts @@ -1,16 +1,16 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; +import { Column, Entity, PrimaryColumn } from 'typeorm' @Entity('challenge') export default class ChallengeEntity { @PrimaryColumn('text') - name: string; + name: string @Column('int') - l1DepositSequenceToCheck: number; + l1DepositSequenceToCheck: number @Column('int') - l1LastCheckedSequence: number; + l1LastCheckedSequence: number @Column('int') - l2OutputIndexToCheck: number; + l2OutputIndexToCheck: number } diff --git a/bots/src/orm/challenger/DeletedOutputEntity.ts b/bots/src/orm/challenger/DeletedOutputEntity.ts index 5e2cd633..e601b176 100644 --- a/bots/src/orm/challenger/DeletedOutputEntity.ts +++ b/bots/src/orm/challenger/DeletedOutputEntity.ts @@ -1,13 +1,13 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; +import { Column, Entity, PrimaryColumn } from 'typeorm' @Entity('challenger_deleted_output') export default class ChallengedOutputEntity { @PrimaryColumn('bigint') - outputIndex: number; + outputIndex: number @Column('bigint') - bridgeId: string; + bridgeId: string @Column('text') - reason: string; + reason: string } diff --git a/bots/src/orm/challenger/DepositTxEntity.ts b/bots/src/orm/challenger/DepositTxEntity.ts index 7e9ec82d..9bbd1e1d 100644 --- a/bots/src/orm/challenger/DepositTxEntity.ts +++ b/bots/src/orm/challenger/DepositTxEntity.ts @@ -1,27 +1,27 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('challenger_deposit_tx') export default class DepositTxEntity { @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') @Index('challenger_deposit_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('challenger_deposit_tx_receiver_index') - receiver: string; + receiver: string @Column('bigint') - amount: string; + amount: string @Column('text') - l1Denom: string; + l1Denom: string @Column('text') - l2Denom: string; + l2Denom: string @Column('text') - data: string; + data: string } diff --git a/bots/src/orm/challenger/FinalizeDepositTxEntity.ts b/bots/src/orm/challenger/FinalizeDepositTxEntity.ts index bb4ccb92..4729bcbd 100644 --- a/bots/src/orm/challenger/FinalizeDepositTxEntity.ts +++ b/bots/src/orm/challenger/FinalizeDepositTxEntity.ts @@ -1,25 +1,25 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('challenger_finalize_deposit_tx') export default class FinalizeDepositTxEntity { // l1 sequence @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') @Index('challenger_finalize_deposit_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('challenger_finalize_deposit_tx_receiver_index') - receiver: string; + receiver: string @Column('bigint') - amount: string; + amount: string @Column('text') - l2Denom: string; + l2Denom: string @Column('int') - l1Height: number; + l1Height: number } diff --git a/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts b/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts index 29a9558e..aff3d6b6 100644 --- a/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts +++ b/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts @@ -1,31 +1,31 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('challenger_finalize_withdrawal_tx') export default class FinalizeWithdrawalTxEntity { @PrimaryColumn('bigint') - bridgeId: string; + bridgeId: string @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') - l1Denom: string; + l1Denom: string @Column('text') - l2Denom: string; + l2Denom: string @Column('text') @Index('challenger_finalize_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('challenger_finalize_tx_receiver_index') - receiver: string; + receiver: string @Column('bigint') - amount: string; + amount: string @Column('int') @Index('challenger_finalize_tx_output_index') - outputIndex: number; + outputIndex: number } diff --git a/bots/src/orm/challenger/OutputEntity.ts b/bots/src/orm/challenger/OutputEntity.ts index 2b0334db..e0a7e227 100644 --- a/bots/src/orm/challenger/OutputEntity.ts +++ b/bots/src/orm/challenger/OutputEntity.ts @@ -1,25 +1,25 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; +import { Column, Entity, PrimaryColumn } from 'typeorm' @Entity('challenger_output') export default class OutputEntity { @PrimaryColumn('int') - outputIndex: number; + outputIndex: number @Column('text') - outputRoot: string; + outputRoot: string @Column('text') - stateRoot: string; + stateRoot: string @Column('text') - merkleRoot: string; + merkleRoot: string @Column('text') - lastBlockHash: string; // last block hash of the epoch + lastBlockHash: string // last block hash of the epoch @Column('int') - startBlockNumber: number; // start block height of the epoch + startBlockNumber: number // start block height of the epoch @Column('int') - endBlockNumber: number; // end block height of the epoch + endBlockNumber: number // end block height of the epoch } diff --git a/bots/src/orm/challenger/WithdrawalTxEntity.ts b/bots/src/orm/challenger/WithdrawalTxEntity.ts index 845b0da9..8152e45e 100644 --- a/bots/src/orm/challenger/WithdrawalTxEntity.ts +++ b/bots/src/orm/challenger/WithdrawalTxEntity.ts @@ -1,37 +1,37 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('challenger_withdrawal_tx') export default class WithdrawalTxEntity { @PrimaryColumn('bigint') - bridgeId: string; + bridgeId: string @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') - l1Denom: string; + l1Denom: string @Column('text') - l2Denom: string; + l2Denom: string @Column('text') @Index('challenger_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('challenger_tx_receiver_index') - receiver: string; + receiver: string @Column('bigint') - amount: string; + amount: string @Column('int') @Index('challenger_tx_output_index') - outputIndex: number; + outputIndex: number @Column('text') - merkleRoot: string; + merkleRoot: string @Column('text', { array: true }) - merkleProof: string[]; + merkleProof: string[] } diff --git a/bots/src/orm/executor/DepositTxEntity.ts b/bots/src/orm/executor/DepositTxEntity.ts index 56c28c44..2a3d4f24 100644 --- a/bots/src/orm/executor/DepositTxEntity.ts +++ b/bots/src/orm/executor/DepositTxEntity.ts @@ -1,37 +1,37 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('executor_deposit_tx') export default class DepositTxEntity { @PrimaryColumn('bigint') - bridgeId: string; + bridgeId: string @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') @Index('executor_deposit_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('executor_deposit_tx_receiver_index') - receiver: string; + receiver: string @Column('int') @Index('executor_deposit_tx_output_index') - outputIndex: number; + outputIndex: number @Column('bigint') - amount: string; + amount: string @Column('text') - l1Denom: string; + l1Denom: string @Column('text') - l2Denom: string; + l2Denom: string @Column('text') - data: string; + data: string @Column('int') - l1Height: number; + l1Height: number } diff --git a/bots/src/orm/executor/OutputEntity.ts b/bots/src/orm/executor/OutputEntity.ts index 81370da5..ef20f0e4 100644 --- a/bots/src/orm/executor/OutputEntity.ts +++ b/bots/src/orm/executor/OutputEntity.ts @@ -1,25 +1,25 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm'; +import { Column, Entity, PrimaryColumn } from 'typeorm' @Entity('executor_output') export default class OutputEntity { @PrimaryColumn('int') - outputIndex: number; + outputIndex: number @Column('text') - outputRoot: string; + outputRoot: string @Column('text') - stateRoot: string; + stateRoot: string @Column('text') - merkleRoot: string; + merkleRoot: string @Column('text') - lastBlockHash: string; // last block hash of the epoch + lastBlockHash: string // last block hash of the epoch @Column('int') - startBlockNumber: number; // start block height of the epoch + startBlockNumber: number // start block height of the epoch @Column('int') - endBlockNumber: number; // end block height of the epoch + endBlockNumber: number // end block height of the epoch } diff --git a/bots/src/orm/executor/UnconfirmedTxEntity.ts b/bots/src/orm/executor/UnconfirmedTxEntity.ts index 0e5daa10..34007a21 100644 --- a/bots/src/orm/executor/UnconfirmedTxEntity.ts +++ b/bots/src/orm/executor/UnconfirmedTxEntity.ts @@ -1,46 +1,46 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('executor_unconfirmed_tx') export default class UnconfirmedTxEntity { @PrimaryColumn('bigint') - bridgeId: string; + bridgeId: string @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') @Index('executor_unconfirmed_deposit_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('executor_unconfirmed_deposit_tx_receiver_index') - receiver: string; + receiver: string @Column('int') @Index('executor_unconfirmed_deposit_tx_output_index') - outputIndex: number; + outputIndex: number @Column('bigint') - amount: string; + amount: string @Column('text') - l1Denom: string; + l1Denom: string @Column('text') - l2Denom: string; + l2Denom: string @Column('text') - data: string; + data: string @Column('int') - l1Height: number; + l1Height: number @Column({ type: 'text', nullable: true }) - error: string; + error: string @Column() - processed: boolean; + processed: boolean } diff --git a/bots/src/orm/executor/WithdrawalTxEntity.ts b/bots/src/orm/executor/WithdrawalTxEntity.ts index bd644368..9d4bedd4 100644 --- a/bots/src/orm/executor/WithdrawalTxEntity.ts +++ b/bots/src/orm/executor/WithdrawalTxEntity.ts @@ -1,37 +1,37 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm'; +import { Column, Entity, Index, PrimaryColumn } from 'typeorm' @Entity('executor_withdrawal_tx') export default class WithdrawalTxEntity { @PrimaryColumn('bigint') - bridgeId: string; + bridgeId: string @PrimaryColumn('bigint') - sequence: string; + sequence: string @Column('text') - l1Denom: string; + l1Denom: string @Column('text') - l2Denom: string; + l2Denom: string @Column('text') @Index('executor_withdrawal_tx_sender_index') - sender: string; + sender: string @Column('text') @Index('executor_withdrawal_tx_receiver_index') - receiver: string; + receiver: string @Column('bigint') - amount: string; + amount: string @Column('int') @Index('executor_withdrawal_tx_output_index') - outputIndex: number; + outputIndex: number @Column('text') - merkleRoot: string; + merkleRoot: string @Column('text', { array: true }) - merkleProof: string[]; + merkleProof: string[] } diff --git a/bots/src/orm/index.ts b/bots/src/orm/index.ts index e2d7a9c5..605f7dd0 100644 --- a/bots/src/orm/index.ts +++ b/bots/src/orm/index.ts @@ -1,34 +1,34 @@ -import RecordEntity from './RecordEntity'; -import StateEntity from './StateEntity'; +import RecordEntity from './RecordEntity' +import StateEntity from './StateEntity' -import ExecutorWithdrawalTxEntity from './executor/WithdrawalTxEntity'; -import ExecutorDepositTxEntity from './executor/DepositTxEntity'; -import ExecutorOutputEntity from './executor/OutputEntity'; -import ExecutorUnconfirmedTxEntity from './executor/UnconfirmedTxEntity'; +import ExecutorWithdrawalTxEntity from './executor/WithdrawalTxEntity' +import ExecutorDepositTxEntity from './executor/DepositTxEntity' +import ExecutorOutputEntity from './executor/OutputEntity' +import ExecutorUnconfirmedTxEntity from './executor/UnconfirmedTxEntity' -import ChallengerDepositTxEntity from './challenger/DepositTxEntity'; -import ChallengerWithdrawalTxEntity from './challenger/WithdrawalTxEntity'; -import ChallengerFinalizeDepositTxEntity from './challenger/FinalizeDepositTxEntity'; -import ChallengerFinalizeWithdrawalTxEntity from './challenger/FinalizeWithdrawalTxEntity'; -import ChallengerOutputEntity from './challenger/OutputEntity'; -import ChallengedOutputEntity from './challenger/DeletedOutputEntity'; -import ChallengeEntity from './challenger/ChallengeEntity'; +import ChallengerDepositTxEntity from './challenger/DepositTxEntity' +import ChallengerWithdrawalTxEntity from './challenger/WithdrawalTxEntity' +import ChallengerFinalizeDepositTxEntity from './challenger/FinalizeDepositTxEntity' +import ChallengerFinalizeWithdrawalTxEntity from './challenger/FinalizeWithdrawalTxEntity' +import ChallengerOutputEntity from './challenger/OutputEntity' +import ChallengedOutputEntity from './challenger/DeletedOutputEntity' +import ChallengeEntity from './challenger/ChallengeEntity' -export * from './RecordEntity'; -export * from './StateEntity'; +export * from './RecordEntity' +export * from './StateEntity' -export * from './executor/OutputEntity'; -export * from './executor/DepositTxEntity'; -export * from './executor/WithdrawalTxEntity'; -export * from './executor/UnconfirmedTxEntity'; +export * from './executor/OutputEntity' +export * from './executor/DepositTxEntity' +export * from './executor/WithdrawalTxEntity' +export * from './executor/UnconfirmedTxEntity' -export * from './challenger/DepositTxEntity'; -export * from './challenger/WithdrawalTxEntity'; -export * from './challenger/FinalizeDepositTxEntity'; -export * from './challenger/FinalizeWithdrawalTxEntity'; -export * from './challenger/OutputEntity'; -export * from './challenger/DeletedOutputEntity'; -export * from './challenger/ChallengeEntity'; +export * from './challenger/DepositTxEntity' +export * from './challenger/WithdrawalTxEntity' +export * from './challenger/FinalizeDepositTxEntity' +export * from './challenger/FinalizeWithdrawalTxEntity' +export * from './challenger/OutputEntity' +export * from './challenger/DeletedOutputEntity' +export * from './challenger/ChallengeEntity' export { RecordEntity, @@ -37,12 +37,11 @@ export { ExecutorDepositTxEntity, ExecutorOutputEntity, ExecutorUnconfirmedTxEntity, - ChallengerWithdrawalTxEntity, ChallengerDepositTxEntity, ChallengerOutputEntity, ChallengerFinalizeDepositTxEntity, ChallengerFinalizeWithdrawalTxEntity, ChallengedOutputEntity, - ChallengeEntity, -}; + ChallengeEntity +} diff --git a/bots/src/sawgger/batch_model.ts b/bots/src/sawgger/batch_model.ts new file mode 100644 index 00000000..231766a6 --- /dev/null +++ b/bots/src/sawgger/batch_model.ts @@ -0,0 +1,36 @@ +import { z } from 'koa-swagger-decorator' + +const L1DataPathsSchema = z.array( + z.object({ + index: z.number(), + txHash: z.string() + }) +) + +const L1BatchInfoSchema = z.object({ + type: z.literal('l1'), + dataPaths: L1DataPathsSchema +}) + +const CelestiaDataPathsSchema = z.array( + z.object({ + index: z.number(), + height: z.number(), + commitment: z.string() + }) +) + +const CelestiaBatchInfoSchema = z.object({ + type: z.literal('celestia'), + dataPaths: CelestiaDataPathsSchema +}) + +const BatchInfoStruct = z.union([L1BatchInfoSchema, CelestiaBatchInfoSchema]) + +const GetBatchResponse = z.object({ + bridge_id: z.number(), + batch_index: z.number(), + batch_info: BatchInfoStruct +}) + +export { GetBatchResponse } diff --git a/bots/src/scripts/setupL2.ts b/bots/src/scripts/setupL2.ts index d9886483..29b2711e 100644 --- a/bots/src/scripts/setupL2.ts +++ b/bots/src/scripts/setupL2.ts @@ -7,32 +7,32 @@ import { MnemonicKey, BridgeInfo, MsgSetBridgeInfo -} from '@initia/initia.js'; -import { sendTx } from '../lib/tx'; -import { config } from '../config'; +} from '@initia/initia.js' +import { sendTx } from '../lib/tx' +import { config } from '../config' export const executor = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) -); +) export const executorL2 = new Wallet( config.l2lcd, new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) -); +) export const challenger = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) -); +) export const outputSubmitter = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) -); +) export const batchSubmitter = new MnemonicKey({ mnemonic: config.BATCH_SUBMITTER_MNEMONIC -}); +}) class L2Initializer { - bridgeId = config.BRIDGE_ID; + bridgeId = config.BRIDGE_ID constructor( public submissionInterval: number, @@ -49,31 +49,31 @@ class L2Initializer { Duration.fromString(finalizedTime.toString()), new Date(), this.metadata - ); - return new MsgCreateBridge(executor.key.accAddress, bridgeConfig); + ) + return new MsgCreateBridge(executor.key.accAddress, bridgeConfig) } MsgSetBridgeInfo(bridgeInfo: BridgeInfo) { - return new MsgSetBridgeInfo(executorL2.key.accAddress, bridgeInfo); + return new MsgSetBridgeInfo(executorL2.key.accAddress, bridgeInfo) } async initialize() { const msgs = [ this.MsgCreateBridge(this.submissionInterval, this.finalizedTime) - ]; + ] - const txRes = await sendTx(executor, msgs); + const txRes = await sendTx(executor, msgs) // load bridge info from l1 chain and send to l2 chain - let bridgeID = 0; - const txInfo = await config.l1lcd.tx.txInfo(txRes.txhash); + let bridgeID = 0 + const txInfo = await config.l1lcd.tx.txInfo(txRes.txhash) for (const e of txInfo.events) { - if (e.type !== "create_bridge") { + if (e.type !== 'create_bridge') { continue } for (const attr of e.attributes) { - if (attr.key !== "bridge_id") { + if (attr.key !== 'bridge_id') { continue } @@ -83,12 +83,10 @@ class L2Initializer { break } - const bridgeInfo = await config.l1lcd.ophost.bridgeInfo(bridgeID); - const l2Msgs = [ - this.MsgSetBridgeInfo(bridgeInfo) - ]; + const bridgeInfo = await config.l1lcd.ophost.bridgeInfo(bridgeID) + const l2Msgs = [this.MsgSetBridgeInfo(bridgeInfo)] - await sendTx(executorL2, l2Msgs); + await sendTx(executorL2, l2Msgs) } } @@ -98,19 +96,19 @@ async function main() { config.SUBMISSION_INTERVAL, config.FINALIZATION_PERIOD, config.IBC_METADATA - ); - console.log('=========Initializing L2========='); - console.log('submissionInterval: ', initializer.submissionInterval); - console.log('finalizedTime: ', initializer.finalizedTime); - console.log('metadata: ', initializer.metadata); - console.log('bridgeId: ', initializer.bridgeId); - await initializer.initialize(); - console.log('=========L2 Initialized Done========='); + ) + console.log('=========Initializing L2=========') + console.log('submissionInterval: ', initializer.submissionInterval) + console.log('finalizedTime: ', initializer.finalizedTime) + console.log('metadata: ', initializer.metadata) + console.log('bridgeId: ', initializer.bridgeId) + await initializer.initialize() + console.log('=========L2 Initialized Done=========') } catch (e) { - console.error(e); + console.error(e) } } if (require.main === module) { - main(); + main() } diff --git a/bots/src/service/batch/BatchService.ts b/bots/src/service/batch/BatchService.ts index f293083d..4951380a 100644 --- a/bots/src/service/batch/BatchService.ts +++ b/bots/src/service/batch/BatchService.ts @@ -1,7 +1,7 @@ -import { RecordEntity } from '../../orm'; -import { APIError, ErrorTypes } from '../../lib/error'; -import { getDB } from '../../lib/db'; -import { config } from '../../config'; +import { RecordEntity } from '../../orm' +import { APIError, ErrorTypes } from '../../lib/error' +import { getDB } from '../../lib/db' +import { config } from '../../config' interface L1BatchInfo { type: 'l1'; @@ -20,7 +20,7 @@ interface CelestiaBatchInfo { }[]; } -type BatchInfo = L1BatchInfo | CelestiaBatchInfo; +type BatchInfo = L1BatchInfo | CelestiaBatchInfo interface GetBatchResponse { bridgeId: number; @@ -29,44 +29,44 @@ interface GetBatchResponse { } export async function getBatch(batchIndex: number): Promise { - const [db] = getDB(); - const queryRunner = db.createQueryRunner('slave'); + const [db] = getDB() + const queryRunner = db.createQueryRunner('slave') try { const qb = queryRunner.manager .createQueryBuilder(RecordEntity, 'record') - .where('record.batchIndex = :batchIndex', { batchIndex }); + .where('record.batch_index = :batchIndex', { batchIndex }) - const batch = await qb.getOne(); + const batch = await qb.getOne() if (!batch) { - throw new APIError(ErrorTypes.NOT_FOUND_ERROR); + throw new APIError(ErrorTypes.NOT_FOUND_ERROR) } - let batchInfo: BatchInfo; + let batchInfo: BatchInfo if (config.PUBLISH_BATCH_TARGET === 'l1') { batchInfo = { type: 'l1', dataPaths: batch.batchInfo.map((txHash, index) => ({ index, txHash })) - }; + } } else if (config.PUBLISH_BATCH_TARGET === 'celestia') { batchInfo = { type: 'celestia', dataPaths: batch.batchInfo.map((path, index) => { - const [height, commitment] = path.split('::'); - return { index, height: Number(height), commitment }; + const [height, commitment] = path.split('::') + return { index, height: Number(height), commitment } }) - }; + } } else { - throw new APIError(ErrorTypes.API_ERROR); + throw new APIError(ErrorTypes.API_ERROR) } return { bridgeId: batch.bridgeId, batchIndex: batch.batchIndex, batchInfo - }; + } } finally { - queryRunner.release(); + queryRunner.release() } } diff --git a/bots/src/service/executor/ClaimTxService.ts b/bots/src/service/executor/ClaimTxService.ts index ef5db9e0..5f146bb5 100644 --- a/bots/src/service/executor/ClaimTxService.ts +++ b/bots/src/service/executor/ClaimTxService.ts @@ -1,111 +1,113 @@ -import { - ExecutorWithdrawalTxEntity, - ExecutorOutputEntity, -} from '../../orm'; -import { getDB } from '../../lib/db'; -import { APIError, ErrorTypes } from '../../lib/error'; -import { sha3_256 } from '../../lib/util'; - +import { ExecutorWithdrawalTxEntity, ExecutorOutputEntity } from '../../orm' +import { getDB } from '../../lib/db' +import { APIError, ErrorTypes } from '../../lib/error' +import { sha3_256 } from '../../lib/util' interface ClaimTx { - bridgeId: number - outputIndex: number - merkleProof: string[] - sender: string - receiver: string - amount: number - l2Denom: string - version: string - stateRoot: string - merkleRoot: string - lastBlockHash: string + bridgeId: number; + outputIndex: number; + merkleProof: string[]; + sender: string; + receiver: string; + amount: number; + l2Denom: string; + version: string; + stateRoot: string; + merkleRoot: string; + lastBlockHash: string; } export interface GetClaimTxListParam { - sequence?: number - address?: string - stage?: number - offset?: number - limit: number - descending: string + sequence?: number; + address?: string; + stage?: number; + offset?: number; + limit: number; + descending: string; } export interface GetClaimTxListResponse { - count?: number - next?: number - limit: number - claimTxList: ClaimTx[] + count?: number; + next?: number; + limit: number; + claimTxList: ClaimTx[]; } export async function getClaimTxList( - param: GetClaimTxListParam + param: GetClaimTxListParam ): Promise { - const [db] = getDB() - const queryRunner = db.createQueryRunner('slave') - - try { - const offset = param.offset ?? 0 - const order = param.descending == 'true' ? 'DESC' : 'ASC' - const claimTxList: ClaimTx[] = [] - - const withdrawalQb = queryRunner.manager - .createQueryBuilder(ExecutorWithdrawalTxEntity, 'tx') - - if (param.address){ - withdrawalQb.andWhere('tx.sender = :sender', { sender: param.address }) - } - - if (param.sequence){ - withdrawalQb.andWhere('tx.sequence = :sequence', { sequence: param.sequence }) - } - - const withdrawalTxs = await withdrawalQb - .orderBy('tx.sequence', order) - .skip(offset * param.limit) - .take(param.limit) - .getMany() - - withdrawalTxs.map(async (withdrawalTx) => { - const outputQb = queryRunner.manager - .createQueryBuilder(ExecutorOutputEntity, 'output') - .where('output.output_index = :outputIndex', { outputIndex: withdrawalTx.outputIndex }) - - const output = await outputQb.getOne() - - if (!output) { - throw new APIError(ErrorTypes.NOT_FOUND_ERROR) - } - - const claimData: ClaimTx = { - bridgeId: parseInt(withdrawalTx.bridgeId), - outputIndex: withdrawalTx.outputIndex, - merkleProof: withdrawalTx.merkleProof, - sender: withdrawalTx.sender, - receiver: withdrawalTx.receiver, - amount: parseInt(withdrawalTx.amount), - l2Denom: withdrawalTx.l2Denom, - version: sha3_256(withdrawalTx.outputIndex).toString('base64'), - stateRoot: output.stateRoot, - merkleRoot: output.merkleRoot, - lastBlockHash: output.lastBlockHash, - } - claimTxList.push(claimData) + const [db] = getDB() + const queryRunner = db.createQueryRunner('slave') + + try { + const offset = param.offset ?? 0 + const order = param.descending == 'true' ? 'DESC' : 'ASC' + const claimTxList: ClaimTx[] = [] + + const withdrawalQb = queryRunner.manager.createQueryBuilder( + ExecutorWithdrawalTxEntity, + 'tx' + ) + + if (param.address) { + withdrawalQb.andWhere('tx.sender = :sender', { sender: param.address }) + } + + if (param.sequence) { + withdrawalQb.andWhere('tx.sequence = :sequence', { + sequence: param.sequence + }) + } + + const withdrawalTxs = await withdrawalQb + .orderBy('tx.sequence', order) + .skip(offset * param.limit) + .take(param.limit) + .getMany() + + withdrawalTxs.map(async (withdrawalTx) => { + const outputQb = queryRunner.manager + .createQueryBuilder(ExecutorOutputEntity, 'output') + .where('output.output_index = :outputIndex', { + outputIndex: withdrawalTx.outputIndex }) - const count = await withdrawalQb.getCount() - let next: number | undefined - - if (count > (offset + 1) * param.limit) { - next = offset + 1 - } - - return { - count, - next, - limit: param.limit, - claimTxList, - } - } finally { - await queryRunner.release() + const output = await outputQb.getOne() + + if (!output) { + throw new APIError(ErrorTypes.NOT_FOUND_ERROR) + } + + const claimData: ClaimTx = { + bridgeId: parseInt(withdrawalTx.bridgeId), + outputIndex: withdrawalTx.outputIndex, + merkleProof: withdrawalTx.merkleProof, + sender: withdrawalTx.sender, + receiver: withdrawalTx.receiver, + amount: parseInt(withdrawalTx.amount), + l2Denom: withdrawalTx.l2Denom, + version: sha3_256(withdrawalTx.outputIndex).toString('base64'), + stateRoot: output.stateRoot, + merkleRoot: output.merkleRoot, + lastBlockHash: output.lastBlockHash + } + claimTxList.push(claimData) + }) + + const count = await withdrawalQb.getCount() + let next: number | undefined + + if (count > (offset + 1) * param.limit) { + next = offset + 1 + } + + return { + count, + next, + limit: param.limit, + claimTxList } + } finally { + await queryRunner.release() + } } diff --git a/bots/src/service/executor/DepositTxService.ts b/bots/src/service/executor/DepositTxService.ts index 2478f3ad..22f7d276 100644 --- a/bots/src/service/executor/DepositTxService.ts +++ b/bots/src/service/executor/DepositTxService.ts @@ -1,32 +1,34 @@ -import { ExecutorDepositTxEntity } from '../../orm'; -import { getDB } from '../../lib/db'; +import { ExecutorDepositTxEntity } from '../../orm' +import { getDB } from '../../lib/db' export interface GetDepositTxListParam { - sequence?: number - address?: string - offset?: number - limit: number - descending: string + sequence?: number; + address?: string; + offset?: number; + limit: number; + descending: string; } export interface GetDepositTxListResponse { - count?: number - next?: number - limit: number - depositTxList: ExecutorDepositTxEntity[] + count?: number; + next?: number; + limit: number; + depositTxList: ExecutorDepositTxEntity[]; } export async function getDepositTxList( param: GetDepositTxListParam ): Promise { - const [db] = getDB(); - const queryRunner = db.createQueryRunner('slave'); + const [db] = getDB() + const queryRunner = db.createQueryRunner('slave') try { const offset = param.offset ?? 0 const order = param.descending == 'true' ? 'DESC' : 'ASC' - - const qb = queryRunner.manager - .createQueryBuilder(ExecutorDepositTxEntity, 'tx') + + const qb = queryRunner.manager.createQueryBuilder( + ExecutorDepositTxEntity, + 'tx' + ) if (param.sequence) { qb.andWhere('tx.sequence = :sequence', { sequence: param.sequence }) @@ -41,21 +43,21 @@ export async function getDepositTxList( .skip(offset * param.limit) .take(param.limit) .getMany() - + const count = await qb.getCount() let next: number | undefined if (count > (offset + 1) * param.limit) { - next = offset + 1 + next = offset + 1 } - + return { - count, - next, - limit: param.limit, - depositTxList + count, + next, + limit: param.limit, + depositTxList } } finally { - queryRunner.release(); + queryRunner.release() } } diff --git a/bots/src/service/executor/OutputService.ts b/bots/src/service/executor/OutputService.ts index a5984d84..32df02bc 100644 --- a/bots/src/service/executor/OutputService.ts +++ b/bots/src/service/executor/OutputService.ts @@ -1,35 +1,39 @@ -import { ExecutorOutputEntity } from '../../orm'; -import { getDB } from '../../lib/db'; +import { ExecutorOutputEntity } from '../../orm' +import { getDB } from '../../lib/db' export interface GetOutputListParam { - output_index?: number - height?: number - offset?: number - limit: number - descending: string + output_index?: number; + height?: number; + offset?: number; + limit: number; + descending: string; } export interface GetOutputListResponse { - count?: number - next?: number - limit: number - outputList: ExecutorOutputEntity[] + count?: number; + next?: number; + limit: number; + outputList: ExecutorOutputEntity[]; } export async function getOutputList( param: GetOutputListParam ): Promise { - const [db] = getDB(); - const queryRunner = db.createQueryRunner('slave'); + const [db] = getDB() + const queryRunner = db.createQueryRunner('slave') try { const offset = param.offset ?? 0 const order = param.descending == 'true' ? 'DESC' : 'ASC' - - const qb = queryRunner.manager - .createQueryBuilder(ExecutorOutputEntity, 'output') + + const qb = queryRunner.manager.createQueryBuilder( + ExecutorOutputEntity, + 'output' + ) if (param.output_index) { - qb.andWhere('output.output_index = :output_index', { output_index: param.output_index }) + qb.andWhere('output.output_index = :output_index', { + output_index: param.output_index + }) } const outputList = await qb @@ -42,16 +46,16 @@ export async function getOutputList( let next: number | undefined if (count > (offset + 1) * param.limit) { - next = offset + 1 + next = offset + 1 } - + return { - count, - next, - limit: param.limit, - outputList, + count, + next, + limit: param.limit, + outputList } } finally { - queryRunner.release(); + queryRunner.release() } } diff --git a/bots/src/service/executor/WithdrawalTxService.ts b/bots/src/service/executor/WithdrawalTxService.ts index 42633805..39f3d952 100644 --- a/bots/src/service/executor/WithdrawalTxService.ts +++ b/bots/src/service/executor/WithdrawalTxService.ts @@ -1,32 +1,34 @@ -import { ExecutorWithdrawalTxEntity } from '../../orm'; -import { getDB } from '../../lib/db'; +import { ExecutorWithdrawalTxEntity } from '../../orm' +import { getDB } from '../../lib/db' export interface GetWithdrawalTxListParam { - sequence?: number - address?: string - offset?: number - limit: number - descending: string + sequence?: number; + address?: string; + offset?: number; + limit: number; + descending: string; } export interface GetWithdrawalTxListResponse { - count?: number - next?: number - limit: number - withdrawalTxList: ExecutorWithdrawalTxEntity[] + count?: number; + next?: number; + limit: number; + withdrawalTxList: ExecutorWithdrawalTxEntity[]; } export async function getWithdrawalTxList( param: GetWithdrawalTxListParam ): Promise { - const [db] = getDB(); - const queryRunner = db.createQueryRunner('slave'); + const [db] = getDB() + const queryRunner = db.createQueryRunner('slave') try { const offset = param.offset ?? 0 const order = param.descending == 'true' ? 'DESC' : 'ASC' - - const qb = queryRunner.manager - .createQueryBuilder(ExecutorWithdrawalTxEntity, 'tx') + + const qb = queryRunner.manager.createQueryBuilder( + ExecutorWithdrawalTxEntity, + 'tx' + ) if (param.sequence) { qb.andWhere('tx.sequence = :sequence', { sequence: param.sequence }) @@ -46,16 +48,16 @@ export async function getWithdrawalTxList( let next: number | undefined if (count > (offset + 1) * param.limit) { - next = offset + 1 + next = offset + 1 } - + return { - count, - next, - limit: param.limit, - withdrawalTxList, + count, + next, + limit: param.limit, + withdrawalTxList } } finally { - queryRunner.release(); + queryRunner.release() } } diff --git a/bots/src/service/index.ts b/bots/src/service/index.ts index c0cb05a6..3dd0b750 100644 --- a/bots/src/service/index.ts +++ b/bots/src/service/index.ts @@ -1,6 +1,6 @@ -export * from './executor/OutputService'; -export * from './executor/WithdrawalTxService'; -export * from './executor/DepositTxService'; -export * from './executor/ClaimTxService'; +export * from './executor/OutputService' +export * from './executor/WithdrawalTxService' +export * from './executor/DepositTxService' +export * from './executor/ClaimTxService' -export * from './batch/BatchService'; +export * from './batch/BatchService' diff --git a/bots/src/swagger/executor_model.ts b/bots/src/swagger/executor_model.ts index 0ab165c7..2144b617 100644 --- a/bots/src/swagger/executor_model.ts +++ b/bots/src/swagger/executor_model.ts @@ -1,74 +1,74 @@ import { z } from 'koa-swagger-decorator' const DepositStruct = z.object({ - bridge_id: z.number(), - sequence: z.number(), - l1Denom: z.string(), - l2Denom: z.string(), - sender: z.string(), - receiver: z.string(), - amount: z.number(), - outputIndex: z.number(), - data: z.string(), - l1Height: z.number(), + bridge_id: z.number(), + sequence: z.number(), + l1Denom: z.string(), + l2Denom: z.string(), + sender: z.string(), + receiver: z.string(), + amount: z.number(), + outputIndex: z.number(), + data: z.string(), + l1Height: z.number() }) const GetDepositResponse = z.object({ - depositTxList: DepositStruct.array(), + depositTxList: DepositStruct.array() }) const WithdrawalStruct = z.object({ - bridge_id: z.number(), - sequence: z.number(), - l1Denom: z.string(), - l2Denom: z.string(), - sender: z.string(), - receiver: z.string(), - amount: z.number(), - outputIndex: z.number(), - data: z.string(), - l1Height: z.number(), + bridge_id: z.number(), + sequence: z.number(), + l1Denom: z.string(), + l2Denom: z.string(), + sender: z.string(), + receiver: z.string(), + amount: z.number(), + outputIndex: z.number(), + data: z.string(), + l1Height: z.number() }) const GetWithdrawalResponse = z.object({ - withdrawalTxList: WithdrawalStruct.array(), + withdrawalTxList: WithdrawalStruct.array() }) const ClaimStruct = z.object({ - bridge_id: z.number(), - output_index: z.number(), - merkle_proof: z.string().array(), - sender: z.string(), - receiver: z.string(), - amount: z.number(), - l_2_denom: z.string(), - version: z.string(), - state_root: z.string(), - merkle_root: z.string(), - last_block_hash: z.string(), + bridge_id: z.number(), + output_index: z.number(), + merkle_proof: z.string().array(), + sender: z.string(), + receiver: z.string(), + amount: z.number(), + l_2_denom: z.string(), + version: z.string(), + state_root: z.string(), + merkle_root: z.string(), + last_block_hash: z.string() }) const GetClaimResponse = z.object({ - claimTxList: ClaimStruct.array(), + claimTxList: ClaimStruct.array() }) const OutputStruct = z.object({ - output_index: z.number(), - output_root: z.string(), - state_root: z.string(), - merkle_root: z.string(), - last_block_hash: z.string(), - start_block_number: z.number(), - end_block_number: z.number(), + output_index: z.number(), + output_root: z.string(), + state_root: z.string(), + merkle_root: z.string(), + last_block_hash: z.string(), + start_block_number: z.number(), + end_block_number: z.number() }) const GetOutputResponse = z.object({ - outputList: OutputStruct.array(), + outputList: OutputStruct.array() }) export { - GetDepositResponse, - GetWithdrawalResponse, - GetClaimResponse, - GetOutputResponse -} \ No newline at end of file + GetDepositResponse, + GetWithdrawalResponse, + GetClaimResponse, + GetOutputResponse +} diff --git a/bots/src/swagger/swagger.ts b/bots/src/swagger/swagger.ts index 229e3f56..1b6d634e 100644 --- a/bots/src/swagger/swagger.ts +++ b/bots/src/swagger/swagger.ts @@ -8,18 +8,18 @@ const router = new SwaggerRouter({ spec: { info: { title: 'Initia VIP API', - version: 'v1.0', - }, + version: 'v1.0' + } }, swaggerHtmlEndpoint: '/swagger', - swaggerJsonEndpoint: '/swagger.json', + swaggerJsonEndpoint: '/swagger.json' }) router.swagger() router - .applyRoute(DepositTxController) - .applyRoute(OutputController) - .applyRoute(WithdrawalTxController) - .applyRoute(ClaimTxController) + .applyRoute(DepositTxController) + .applyRoute(OutputController) + .applyRoute(WithdrawalTxController) + .applyRoute(ClaimTxController) export { router } diff --git a/bots/src/test/integration.ts b/bots/src/test/integration.ts index 7cb41ab6..b9f6f4c9 100644 --- a/bots/src/test/integration.ts +++ b/bots/src/test/integration.ts @@ -1,64 +1,64 @@ -import Bridge from './utils/Bridge'; -import { config } from '../config'; -import { TxBot } from './utils/TxBot'; -import { Coin } from '@initia/initia.js'; -import { startBatch } from '../worker/batchSubmitter'; -import { startExecutor } from '../worker/bridgeExecutor'; -import { startOutput } from '../worker/outputSubmitter'; -import { delay } from 'bluebird'; -import { getTokenPairByL1Denom } from '../lib/query'; +import Bridge from './utils/Bridge' +import { config } from '../config' +import { TxBot } from './utils/TxBot' +import { Coin } from '@initia/initia.js' +import { startBatch } from '../worker/batchSubmitter' +import { startExecutor } from '../worker/bridgeExecutor' +import { startOutput } from '../worker/outputSubmitter' +import { delay } from 'bluebird' +import { getTokenPairByL1Denom } from '../lib/query' -const SUBMISSION_INTERVAL = 5; -const FINALIZATION_PERIOD = 5; -const DEPOSIT_AMOUNT = 1_000_000; -const DEPOSIT_INTERVAL_MS = 100; +const SUBMISSION_INTERVAL = 5 +const FINALIZATION_PERIOD = 5 +const DEPOSIT_AMOUNT = 1_000_000 +const DEPOSIT_INTERVAL_MS = 100 async function setupBridge(submissionInterval: number, finalizedTime: number) { - const bridge = new Bridge(submissionInterval, finalizedTime); - const relayerMetadata = ''; - await bridge.clearDB(); - await bridge.tx(relayerMetadata); - console.log('Bridge deployed'); + const bridge = new Bridge(submissionInterval, finalizedTime) + const relayerMetadata = '' + await bridge.clearDB() + await bridge.tx(relayerMetadata) + console.log('Bridge deployed') } async function startBot() { try { - await Promise.all([startBatch(), startExecutor(), startOutput()]); + await Promise.all([startBatch(), startExecutor(), startOutput()]) } catch (err) { - console.log(err); + console.log(err) } } async function startDepositTxBot() { - const txBot = new TxBot(config.BRIDGE_ID); - const pair = await getTokenPairByL1Denom('uinit'); + const txBot = new TxBot(config.BRIDGE_ID) + const pair = await getTokenPairByL1Denom('uinit') for (;;) { const balance = await config.l2lcd.bank.balanceByDenom( txBot.l2receiver.key.accAddress, pair.l2_denom - ); + ) const res = await txBot.deposit( txBot.l1sender, txBot.l2receiver, new Coin('uinit', DEPOSIT_AMOUNT) - ); + ) console.log( `[DepositBot] Deposited height ${res.height} to ${txBot.l2receiver.key.accAddress} ${balance?.amount}` - ); - await delay(DEPOSIT_INTERVAL_MS); + ) + await delay(DEPOSIT_INTERVAL_MS) } } async function main() { try { - await setupBridge(SUBMISSION_INTERVAL, FINALIZATION_PERIOD); - await startBot(); - await startDepositTxBot(); + await setupBridge(SUBMISSION_INTERVAL, FINALIZATION_PERIOD) + await startBot() + await startDepositTxBot() } catch (err) { - console.log(err); + console.log(err) } } if (require.main === module) { - main(); + main() } diff --git a/bots/src/test/utils/Bridge.ts b/bots/src/test/utils/Bridge.ts index aed98831..ba752582 100644 --- a/bots/src/test/utils/Bridge.ts +++ b/bots/src/test/utils/Bridge.ts @@ -1,17 +1,19 @@ -import { MsgCreateBridge, BridgeConfig, Duration, BatchInfo } from '@initia/initia.js'; +import { + MsgCreateBridge, + BridgeConfig, + Duration, + BatchInfo +} from '@initia/initia.js' import { getDB as getExecutorDB, initORM as initExecutorORM -} from '../../worker/bridgeExecutor/db'; +} from '../../worker/bridgeExecutor/db' import { getDB as getChallengerDB, initORM as initChallengerORM -} from '../../worker/challenger/db'; -import { - getDB as getBatchDB, - initORM as initBatchORM -} from '../../lib/db'; -import { DataSource, EntityManager } from 'typeorm'; +} from '../../worker/challenger/db' +import { getDB as getBatchDB, initORM as initBatchORM } from '../../lib/db' +import { DataSource, EntityManager } from 'typeorm' import { ExecutorOutputEntity, StateEntity, @@ -26,16 +28,16 @@ import { ChallengedOutputEntity, RecordEntity, ChallengeEntity -} from '../../orm'; -import { executor, challenger, outputSubmitter } from './helper'; -import { sendTx } from '../../lib/tx'; +} from '../../orm' +import { executor, challenger, outputSubmitter } from './helper' +import { sendTx } from '../../lib/tx' class Bridge { - executorDB: DataSource; - challengerDB: DataSource; - batchDB: DataSource; - l1BlockHeight: number; - l2BlockHeight: number; + executorDB: DataSource + challengerDB: DataSource + batchDB: DataSource + l1BlockHeight: number + l2BlockHeight: number constructor( public submissionInterval: number, @@ -44,35 +46,35 @@ class Bridge { async clearDB() { // remove and initialize - await initExecutorORM(); - await initChallengerORM(); + await initExecutorORM() + await initChallengerORM() await initBatchORM(); [this.executorDB] = getExecutorDB(); [this.challengerDB] = getChallengerDB(); - [this.batchDB] = getBatchDB(); + [this.batchDB] = getBatchDB() await this.executorDB.transaction(async (manager: EntityManager) => { - await manager.getRepository(StateEntity).clear(); - await manager.getRepository(ExecutorWithdrawalTxEntity).clear(); - await manager.getRepository(ExecutorOutputEntity).clear(); - await manager.getRepository(ExecutorDepositTxEntity).clear(); - await manager.getRepository(ExecutorUnconfirmedTxEntity).clear(); - }); + await manager.getRepository(StateEntity).clear() + await manager.getRepository(ExecutorWithdrawalTxEntity).clear() + await manager.getRepository(ExecutorOutputEntity).clear() + await manager.getRepository(ExecutorDepositTxEntity).clear() + await manager.getRepository(ExecutorUnconfirmedTxEntity).clear() + }) await this.challengerDB.transaction(async (manager: EntityManager) => { - await manager.getRepository(ChallengerDepositTxEntity).clear(); - await manager.getRepository(ChallengerFinalizeDepositTxEntity).clear(); - await manager.getRepository(ChallengerFinalizeWithdrawalTxEntity).clear(); - await manager.getRepository(ChallengerOutputEntity).clear(); - await manager.getRepository(ChallengerWithdrawalTxEntity).clear(); - await manager.getRepository(ChallengedOutputEntity).clear(); - await manager.getRepository(ChallengeEntity).clear(); - }); + await manager.getRepository(ChallengerDepositTxEntity).clear() + await manager.getRepository(ChallengerFinalizeDepositTxEntity).clear() + await manager.getRepository(ChallengerFinalizeWithdrawalTxEntity).clear() + await manager.getRepository(ChallengerOutputEntity).clear() + await manager.getRepository(ChallengerWithdrawalTxEntity).clear() + await manager.getRepository(ChallengedOutputEntity).clear() + await manager.getRepository(ChallengeEntity).clear() + }) await this.batchDB.transaction(async (manager: EntityManager) => { - await manager.getRepository(RecordEntity).clear(); - }); + await manager.getRepository(RecordEntity).clear() + }) } MsgCreateBridge( @@ -83,13 +85,13 @@ class Bridge { const bridgeConfig = new BridgeConfig( challenger.key.accAddress, outputSubmitter.key.accAddress, - new BatchInfo("submitter", "chain"), + new BatchInfo('submitter', 'chain'), Duration.fromString(submissionInterval.toString()), Duration.fromString(finalizedTime.toString()), new Date(), metadata - ); - return new MsgCreateBridge(executor.key.accAddress, bridgeConfig); + ) + return new MsgCreateBridge(executor.key.accAddress, bridgeConfig) } async tx(metadata: string) { @@ -99,10 +101,10 @@ class Bridge { this.finalizedTime, metadata ) - ]; + ] - return await sendTx(executor, msgs); + return await sendTx(executor, msgs) } } -export default Bridge; +export default Bridge diff --git a/bots/src/test/utils/TxBot.ts b/bots/src/test/utils/TxBot.ts index e82d9a20..de3383bd 100644 --- a/bots/src/test/utils/TxBot.ts +++ b/bots/src/test/utils/TxBot.ts @@ -3,15 +3,18 @@ import { MsgInitiateTokenDeposit, Coin, MsgInitiateTokenWithdrawal -} from '@initia/initia.js'; -import { makeFinalizeMsg } from './helper'; -import { sendTx } from '../../lib/tx'; -import { getOutputFromExecutor, getWithdrawalTxFromExecutor } from '../../lib/query'; -import { L1_SENDER, L2_RECEIVER } from './consts'; +} from '@initia/initia.js' +import { makeFinalizeMsg } from './helper' +import { sendTx } from '../../lib/tx' +import { + getOutputFromExecutor, + getWithdrawalTxFromExecutor +} from '../../lib/query' +import { L1_SENDER, L2_RECEIVER } from './consts' export class TxBot { - l1sender = L1_SENDER; - l2receiver = L2_RECEIVER; + l1sender = L1_SENDER + l2receiver = L2_RECEIVER constructor(public bridgeId: number) {} @@ -21,9 +24,9 @@ export class TxBot { this.bridgeId, reciever.key.accAddress, coin - ); + ) - return await sendTx(sender, [msg]); + return await sendTx(sender, [msg]) } async withdrawal(sender: Wallet, receiver: Wallet, coin: Coin) { @@ -31,21 +34,27 @@ export class TxBot { sender.key.accAddress, receiver.key.accAddress, coin - ); + ) - return await sendTx(sender, [msg]); + return await sendTx(sender, [msg]) } async claim(sender: Wallet, txSequence: number, outputIndex: number) { - const txRes = await getWithdrawalTxFromExecutor(this.bridgeId, txSequence); - const outputRes: any = await getOutputFromExecutor(outputIndex); + const txRes = await getWithdrawalTxFromExecutor(this.bridgeId, txSequence) + const outputRes: any = await getOutputFromExecutor(outputIndex) const finalizeMsg = await makeFinalizeMsg( txRes.withdrawalTx, outputRes.output - ); + ) const { account_number: accountNumber, sequence } = - await sender.accountNumberAndSequence(); - return await sendTx(sender, [finalizeMsg], undefined, accountNumber, sequence); + await sender.accountNumberAndSequence() + return await sendTx( + sender, + [finalizeMsg], + undefined, + accountNumber, + sequence + ) } } diff --git a/bots/src/test/utils/consts.ts b/bots/src/test/utils/consts.ts index 7f466c5e..9cb6b23b 100644 --- a/bots/src/test/utils/consts.ts +++ b/bots/src/test/utils/consts.ts @@ -1,19 +1,19 @@ -import { MnemonicKey } from '@initia/initia.js'; -import { config } from '../../config'; -import { TxWallet } from '../../lib/wallet'; +import { MnemonicKey } from '@initia/initia.js' +import { config } from '../../config' +import { TxWallet } from '../../lib/wallet' -export const { DEPOSITOR_MNEMONIC } = process.env; +export const { DEPOSITOR_MNEMONIC } = process.env export const L1_SENDER = new TxWallet( config.l1lcd, new MnemonicKey({ mnemonic: DEPOSITOR_MNEMONIC }) -); +) export const L2_RECEIVER = new TxWallet( config.l2lcd, new MnemonicKey({ mnemonic: DEPOSITOR_MNEMONIC }) -); +) diff --git a/bots/src/test/utils/helper.ts b/bots/src/test/utils/helper.ts index 7c2e97b3..b6b52304 100644 --- a/bots/src/test/utils/helper.ts +++ b/bots/src/test/utils/helper.ts @@ -5,26 +5,26 @@ import { Msg, MsgFinalizeTokenWithdrawal, Coin -} from '@initia/initia.js'; +} from '@initia/initia.js' -import { config } from '../../config'; -import { sha3_256 } from '../../lib/util'; -import { ExecutorOutputEntity } from '../../orm/index'; -import WithdrawalTxEntity from '../../orm/executor/WithdrawalTxEntity'; +import { config } from '../../config' +import { sha3_256 } from '../../lib/util' +import { ExecutorOutputEntity } from '../../orm/index' +import WithdrawalTxEntity from '../../orm/executor/WithdrawalTxEntity' -export const bcs = BCS.getInstance(); +export const bcs = BCS.getInstance() export const executor = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) -); +) export const challenger = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) -); +) export const outputSubmitter = new Wallet( config.l1lcd, new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) -); +) export async function makeFinalizeMsg( txRes: WithdrawalTxEntity, @@ -42,6 +42,6 @@ export async function makeFinalizeMsg( outputRes.stateRoot, outputRes.outputRoot, outputRes.lastBlockHash - ); - return msg; + ) + return msg } diff --git a/bots/src/worker/batchSubmitter/batchSubmitter.ts b/bots/src/worker/batchSubmitter/batchSubmitter.ts index 1025078b..c5958076 100644 --- a/bots/src/worker/batchSubmitter/batchSubmitter.ts +++ b/bots/src/worker/batchSubmitter/batchSubmitter.ts @@ -1,9 +1,9 @@ -import { getDB } from '../../lib/db'; -import { DataSource, EntityManager } from 'typeorm'; -import { batchLogger, batchLogger as logger } from '../../lib/logger'; -import { BlockBulk, RawCommit, RPCClient } from '../../lib/rpc'; -import { compress } from '../../lib/compressor'; -import { ExecutorOutputEntity, RecordEntity } from '../../orm'; +import { getDB } from '../../lib/db' +import { DataSource, EntityManager } from 'typeorm' +import { batchLogger, batchLogger as logger } from '../../lib/logger' +import { BlockBulk, RawCommit, RPCClient } from '../../lib/rpc' +import { compress } from '../../lib/compressor' +import { ExecutorOutputEntity, RecordEntity } from '../../orm' import { Wallet, MnemonicKey, @@ -12,108 +12,110 @@ import { Fee, Coins, BlobTx, - TxAPI, -} from '@initia/initia.js'; -import { delay } from 'bluebird'; -import { INTERVAL_BATCH } from '../../config'; -import { config } from '../../config'; -import { sendRawTx } from '../../lib/tx'; -import MonitorHelper from '../../lib/monitor/helper'; -import { createBlob, getCelestiaFeeGasLimit } from '../../celestia/utils'; -import { bech32 } from 'bech32'; - -const base = 200000; -const perByte = 10; -const maxBytes = 500000; // 500kb + TxAPI +} from '@initia/initia.js' +import { delay } from 'bluebird' +import { INTERVAL_BATCH } from '../../config' +import { config } from '../../config' +import { sendRawTx } from '../../lib/tx' +import MonitorHelper from '../../lib/monitor/helper' +import { createBlob, getCelestiaFeeGasLimit } from '../../celestia/utils' +import { bech32 } from 'bech32' + +const base = 200000 +const perByte = 10 +const maxBytes = 500000 // 500kb export class BatchSubmitter { - private submitterAddress: string; - private batchIndex = 0; - private db: DataSource; - private submitter: Wallet; - private bridgeId: number; - private isRunning = false; - private rpcClient: RPCClient; - helper: MonitorHelper = new MonitorHelper(); + private submitterAddress: string + private batchIndex = 0 + private db: DataSource + private submitter: Wallet + private bridgeId: number + private isRunning = false + private rpcClient: RPCClient + helper: MonitorHelper = new MonitorHelper() async init() { - [this.db] = getDB(); - this.rpcClient = new RPCClient(config.L2_RPC_URI, batchLogger); + [this.db] = getDB() + this.rpcClient = new RPCClient(config.L2_RPC_URI, batchLogger) this.submitter = new Wallet( config.batchlcd, new MnemonicKey({ mnemonic: config.BATCH_SUBMITTER_MNEMONIC }) - ); + ) - this.bridgeId = config.BRIDGE_ID; - this.isRunning = true; + this.bridgeId = config.BRIDGE_ID + this.isRunning = true } public stop() { - this.isRunning = false; + this.isRunning = false } public async run() { - await this.init(); + await this.init() while (this.isRunning) { - await this.processBatch(); + await this.processBatch() } } async processBatch() { try { await this.db.transaction(async (manager: EntityManager) => { - const latestBatch = await this.getStoredBatch(manager); - this.batchIndex = latestBatch ? latestBatch.batchIndex + 1 : 1; + const latestBatch = await this.getStoredBatch(manager) + this.batchIndex = latestBatch ? latestBatch.batchIndex + 1 : 1 const output = await this.helper.getOutputByIndex( manager, ExecutorOutputEntity, this.batchIndex - ); + ) - if (!output) return; + if (!output) return const batch = await this.getBatch( output.startBlockNumber, output.endBlockNumber - ); + ) - const batchInfo: string[] = await this.publishBatch(batch); + const batchInfo: string[] = await this.publishBatch(batch) await this.saveBatchToDB( manager, batchInfo, this.batchIndex, output.startBlockNumber, output.endBlockNumber - ); - logger.info(`${this.batchIndex}th batch (${output.startBlockNumber}, ${output.endBlockNumber}) is successfully saved`); - }); + ) + logger.info( + `${this.batchIndex}th batch (${output.startBlockNumber}, ${output.endBlockNumber}) is successfully saved` + ) + }) } catch (err) { - throw new Error(`Error in BatchSubmitter: ${err}`); + throw new Error(`Error in BatchSubmitter: ${err}`) } finally { - await delay(INTERVAL_BATCH); + await delay(INTERVAL_BATCH) } } - // Get [start, end] batch from L2 and last commit info + // Get [start, end] batch from L2 and last commit info async getBatch(start: number, end: number): Promise { const bulk: BlockBulk | null = await this.rpcClient.getBlockBulk( start.toString(), end.toString() - ); + ) if (!bulk) { - throw new Error(`Error getting block bulk from L2`); + throw new Error(`Error getting block bulk from L2`) } const commit: RawCommit | null = await this.rpcClient.getRawCommit( end.toString() - ); + ) if (!commit) { - throw new Error(`Error getting commit from L2`); + throw new Error(`Error getting commit from L2`) } - const reqStrings = bulk.blocks.concat(commit.commit); - return compress(reqStrings); + const reqStrings = bulk.blocks.concat(commit.commit) + return compress(reqStrings) } async getStoredBatch(manager: EntityManager): Promise { @@ -122,84 +124,88 @@ export class BatchSubmitter { batchIndex: 'DESC' }, take: 1 - }); + }) - return storedRecord[0] ?? null; + return storedRecord[0] ?? null } // Publish a batch to L1 async publishBatch(batch: Buffer): Promise { try { - const batchInfos: string[] = []; + const batchInfos: string[] = [] while (batch.length !== 0) { - let subData: Buffer; + let subData: Buffer if (batch.length > maxBytes) { - subData = batch.slice(0, maxBytes); - batch = batch.slice(maxBytes); + subData = batch.slice(0, maxBytes) + batch = batch.slice(maxBytes) } else { - subData = batch; - batch = Buffer.from([]); + subData = batch + batch = Buffer.from([]) } - let txBytes: string; - switch(config.PUBLISH_BATCH_TARGET){ - case "l1": - txBytes = await this.createL1BatchMessage(subData); - break; - case "celestia": - txBytes = await this.createCelestiaBatchMessage(subData); - break; + let txBytes: string + switch (config.PUBLISH_BATCH_TARGET) { + case 'l1': + txBytes = await this.createL1BatchMessage(subData) + break + case 'celestia': + txBytes = await this.createCelestiaBatchMessage(subData) + break default: - throw new Error(`unknown batch target ${config.PUBLISH_BATCH_TARGET}`); + throw new Error( + `unknown batch target ${config.PUBLISH_BATCH_TARGET}` + ) } - - const batchInfo = await sendRawTx(this.submitter, txBytes); - batchInfos.push(batchInfo.txhash); - await delay(1000); // break for each tx ended + const batchInfo = await sendRawTx(this.submitter, txBytes) + batchInfos.push(batchInfo.txhash) + + await delay(1000) // break for each tx ended } - return batchInfos; + return batchInfos } catch (err) { - throw new Error(`Error publishing batch to ${config.PUBLISH_BATCH_TARGET}: ${err}`); + throw new Error( + `Error publishing batch to ${config.PUBLISH_BATCH_TARGET}: ${err}` + ) } } async createL1BatchMessage(data: Buffer): Promise { - const gasLimit = Math.floor((base + perByte * data.length) * 1.2); - const fee = getFee(this.submitter, gasLimit); + const gasLimit = Math.floor((base + perByte * data.length) * 1.2) + const fee = getFee(this.submitter, gasLimit) if (!this.submitterAddress) { - this.submitterAddress = this.submitter.key.accAddress; + this.submitterAddress = this.submitter.key.accAddress } const msg = new MsgRecordBatch( this.submitterAddress, this.bridgeId, data.toString('base64') - ); - - const signedTx = await this.submitter.createAndSignTx({msgs:[msg],fee}); - return TxAPI.encode(signedTx); + ) + + const signedTx = await this.submitter.createAndSignTx({ msgs: [msg], fee }) + return TxAPI.encode(signedTx) } async createCelestiaBatchMessage(data: Buffer): Promise { - const blob = createBlob(data); - const gasLimit = getCelestiaFeeGasLimit(data.length); - const fee = getFee(this.submitter, gasLimit); + const blob = createBlob(data) + const gasLimit = getCelestiaFeeGasLimit(data.length) + const fee = getFee(this.submitter, gasLimit) - const rawAddress = this.submitter.key.publicKey?.rawAddress(); - if(!rawAddress) { - throw new Error("batch submitter public key not set") + const rawAddress = this.submitter.key.publicKey?.rawAddress() + if (!rawAddress) { + throw new Error('batch submitter public key not set') } if (!this.submitterAddress) { this.submitterAddress = bech32.encode( 'celestia', bech32.toWords(rawAddress) - ); - this.submitter.setAccountAddress(this.submitterAddress); + ) + this.submitter.setAccountAddress(this.submitterAddress) } const msg = new MsgPayForBlobs( @@ -207,11 +213,11 @@ export class BatchSubmitter { [blob.namespace], [data.length], [blob.commitment], - [blob.blob.share_version], - ); - const signedTx = await this.submitter.createAndSignTx({msgs:[msg],fee}); - const blobTx = new BlobTx(signedTx, [blob.blob], "BLOB"); - return Buffer.from(blobTx.toBytes()).toString("base64"); + [blob.blob.share_version] + ) + const signedTx = await this.submitter.createAndSignTx({ msgs: [msg], fee }) + const blobTx = new BlobTx(signedTx, [blob.blob], 'BLOB') + return Buffer.from(blobTx.toBytes()).toString('base64') } // Save batch record to database @@ -222,13 +228,13 @@ export class BatchSubmitter { startBlockNumber: number, endBlockNumber: number ): Promise { - const record = new RecordEntity(); + const record = new RecordEntity() - record.bridgeId = this.bridgeId; - record.batchIndex = batchIndex; - record.batchInfo = batchInfo; - record.startBlockNumber = startBlockNumber; - record.endBlockNumber = endBlockNumber; + record.bridgeId = this.bridgeId + record.batchIndex = batchIndex + record.batchInfo = batchInfo + record.startBlockNumber = startBlockNumber + record.endBlockNumber = endBlockNumber await manager .getRepository(RecordEntity) @@ -236,21 +242,21 @@ export class BatchSubmitter { .catch((error) => { throw new Error( `Error saving record ${record.bridgeId} batch ${batchIndex} to database: ${error}` - ); - }); + ) + }) - return record; + return record } } function getFee(wallet: Wallet, gasLimit: number): Fee { - const gasPrices = new Coins(wallet.lcd.config.gasPrices).toArray(); + const gasPrices = new Coins(wallet.lcd.config.gasPrices).toArray() if (gasPrices.length === 0) { - throw Error('gasPrices must be set'); + throw Error('gasPrices must be set') } - const gasPrice = gasPrices[0]; - const gasAmount = gasPrice.mul(gasLimit).toIntCeilCoin(); + const gasPrice = gasPrices[0] + const gasAmount = gasPrice.mul(gasLimit).toIntCeilCoin() - const fee = new Fee(gasLimit, [gasAmount]); - return fee; + const fee = new Fee(gasLimit, [gasAmount]) + return fee } diff --git a/bots/src/worker/batchSubmitter/index.ts b/bots/src/worker/batchSubmitter/index.ts index 40acab76..b012f123 100644 --- a/bots/src/worker/batchSubmitter/index.ts +++ b/bots/src/worker/batchSubmitter/index.ts @@ -1,55 +1,59 @@ -import { initORM, finalizeORM } from '../../lib/db'; -import { executorLogger as logger } from '../../lib/logger'; -import { BatchSubmitter } from './batchSubmitter'; -import { initServer, finalizeServer } from '../../loader'; -import { batchController } from '../../controller'; -import { once } from 'lodash'; -import { config } from '../../config'; +import { initORM, finalizeORM } from '../../lib/db' +import { executorLogger as logger } from '../../lib/logger' +import { BatchSubmitter } from './batchSubmitter' +import { initServer, finalizeServer } from '../../loader' +import { batchController } from '../../controller' +import { once } from 'lodash' +import { config } from '../../config' -let jobs: BatchSubmitter[] = []; +let jobs: BatchSubmitter[] = [] async function runBot(): Promise { - jobs = [new BatchSubmitter()]; + jobs = [new BatchSubmitter()] try { await Promise.all( jobs.map((job) => { - job.run(); + job.run() }) - ); + ) } catch (err) { - logger.info(err); - stopBatch(); + logger.info(err) + stopBatch() } } function stopBot(): void { - jobs.forEach((job) => job.stop()); + jobs.forEach((job) => job.stop()) } export async function stopBatch(): Promise { - stopBot(); + stopBot() - logger.info('Closing listening port'); - finalizeServer(); + logger.info('Closing listening port') + finalizeServer() - logger.info('Closing DB connection'); - await finalizeORM(); + logger.info('Closing DB connection') + await finalizeORM() - logger.info('Finished Batch'); - process.exit(0); + logger.info('Finished Batch') + process.exit(0) } export async function startBatch(): Promise { - await initORM(); - await initServer(batchController, config.BATCH_PORT); - await runBot(); + await initORM() + + await initServer(batchController, config.BATCH_PORT) + + if (!config.ENABLE_API_ONLY) { + await runBot() + } // attach graceful shutdown - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const; - signals.forEach((signal) => process.on(signal, once(stopBatch))); + const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const + signals.forEach((signal) => process.on(signal, once(stopBatch))) } if (require.main === module) { - startBatch().catch(console.log); + startBatch().catch(console.log) } diff --git a/bots/src/worker/bridgeExecutor/Resurrector.ts b/bots/src/worker/bridgeExecutor/Resurrector.ts index 4be80067..27224c25 100644 --- a/bots/src/worker/bridgeExecutor/Resurrector.ts +++ b/bots/src/worker/bridgeExecutor/Resurrector.ts @@ -1,23 +1,23 @@ -import { getDB } from './db'; -import UnconfirmedTxEntity from '../../orm/executor/UnconfirmedTxEntity'; -import { Coin, MsgFinalizeTokenDeposit } from '@initia/initia.js'; -import { INTERVAL_MONITOR, config } from '../../config'; -import { DataSource } from 'typeorm'; -import Bluebird from 'bluebird'; -import winston from 'winston'; -import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet'; -import { buildFailedTxNotification, notifySlack } from '../../lib/slack'; +import { getDB } from './db' +import UnconfirmedTxEntity from '../../orm/executor/UnconfirmedTxEntity' +import { Coin, MsgFinalizeTokenDeposit } from '@initia/initia.js' +import { INTERVAL_MONITOR, config } from '../../config' +import { DataSource } from 'typeorm' +import Bluebird from 'bluebird' +import winston from 'winston' +import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' +import { buildFailedTxNotification, notifySlack } from '../../lib/slack' export class Resurrector { - private db: DataSource; - isRunning = true; - executor: TxWallet; - errorCounter = 0; + private db: DataSource + isRunning = true + executor: TxWallet + errorCounter = 0 constructor(public logger: winston.Logger) { - [this.db] = getDB(); - initWallet(WalletType.Executor, config.l2lcd); - this.executor = getWallet(WalletType.Executor); + [this.db] = getDB() + initWallet(WalletType.Executor, config.l2lcd) + this.executor = getWallet(WalletType.Executor) } async updateProcessed(unconfirmedTx: UnconfirmedTxEntity): Promise { @@ -28,14 +28,16 @@ export class Resurrector { processed: false }, { processed: true } - ); + ) this.logger.info( `Resurrected failed tx: ${unconfirmedTx.bridgeId} ${unconfirmedTx.sequence}` - ); + ) } - async resubmitFailedDepositTx(unconfirmedTx: UnconfirmedTxEntity): Promise { + async resubmitFailedDepositTx( + unconfirmedTx: UnconfirmedTxEntity + ): Promise { const msg = new MsgFinalizeTokenDeposit( this.executor.key.accAddress, unconfirmedTx.sender, @@ -45,17 +47,17 @@ export class Resurrector { unconfirmedTx.l1Height, unconfirmedTx.l1Denom, Buffer.from(unconfirmedTx.data, 'hex').toString('base64') - ); + ) try { - await this.executor.transaction([msg]); - await this.updateProcessed(unconfirmedTx); + await this.executor.transaction([msg]) + await this.updateProcessed(unconfirmedTx) } catch (err) { if (this.errorCounter++ < 20) { - await Bluebird.delay(5 * 1000); - return; + await Bluebird.delay(5 * 1000) + return } - this.errorCounter = 0; - await notifySlack(buildFailedTxNotification(unconfirmedTx)); + this.errorCounter = 0 + await notifySlack(buildFailedTxNotification(unconfirmedTx)) } } @@ -64,37 +66,37 @@ export class Resurrector { where: { processed: false } - }); + }) } public async ressurect(): Promise { - const unconfirmedTxs = await this.getunconfirmedTxs(); + const unconfirmedTxs = await this.getunconfirmedTxs() for (const unconfirmedTx of unconfirmedTxs) { - const error = unconfirmedTx.error; + const error = unconfirmedTx.error // Check x/opchild/errors.go if (error.includes('deposit already finalized')) { - await this.updateProcessed(unconfirmedTx); - continue; + await this.updateProcessed(unconfirmedTx) + continue } - await this.resubmitFailedDepositTx(unconfirmedTx); + await this.resubmitFailedDepositTx(unconfirmedTx) } } stop(): void { - this.isRunning = false; + this.isRunning = false } public async run() { while (this.isRunning) { try { - await this.ressurect(); + await this.ressurect() } catch (err) { - this.stop(); - throw new Error(err); + this.stop() + throw new Error(err) } finally { - await Bluebird.delay(INTERVAL_MONITOR); + await Bluebird.delay(INTERVAL_MONITOR) } } } diff --git a/bots/src/worker/bridgeExecutor/db.ts b/bots/src/worker/bridgeExecutor/db.ts index bbfa325b..7d5aaab9 100644 --- a/bots/src/worker/bridgeExecutor/db.ts +++ b/bots/src/worker/bridgeExecutor/db.ts @@ -1,22 +1,22 @@ -import 'reflect-metadata'; -import Bluebird from 'bluebird'; +import 'reflect-metadata' +import Bluebird from 'bluebird' import { ConnectionOptionsReader, DataSource, DataSourceOptions -} from 'typeorm'; -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import { executorLogger as logger } from '../../lib/logger'; +} from 'typeorm' +import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' +import { executorLogger as logger } from '../../lib/logger' -import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy'; +import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy' import { ExecutorOutputEntity, ExecutorWithdrawalTxEntity, ExecutorDepositTxEntity, ExecutorUnconfirmedTxEntity, - StateEntity, -} from '../../orm'; + StateEntity +} from '../../orm' const staticOptions = { supportBigNumbers: true, @@ -26,50 +26,50 @@ const staticOptions = { ExecutorWithdrawalTxEntity, ExecutorDepositTxEntity, ExecutorUnconfirmedTxEntity, - StateEntity, + StateEntity ] -}; +} -let DB: DataSource[] = []; +let DB: DataSource[] = [] function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions; + const pgOpts = options as PostgresConnectionOptions logger.info( `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ pgOpts.port || 5432 }` - ); + ) return new DataSource({ ...options, ...staticOptions, namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize(); + }).initialize() } export async function initORM(host?: string, port?: number): Promise { - const reader = new ConnectionOptionsReader(); - const options = (await reader.all()) as PostgresConnectionOptions[]; + const reader = new ConnectionOptionsReader() + const options = (await reader.all()) as PostgresConnectionOptions[] DB = await Bluebird.map(options, (opt) => { - const newOptions = { ...opt }; + const newOptions = { ...opt } if (host) { - newOptions.host = host; + newOptions.host = host } if (port) { - newOptions.port = port; + newOptions.port = port } - return initConnection(newOptions); - }); + return initConnection(newOptions) + }) } export function getDB(): DataSource[] { if (!DB) { - throw new Error('DB not initialized'); + throw new Error('DB not initialized') } - return DB; + return DB } export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())); + await Promise.all(DB.map((c) => c.destroy())) } diff --git a/bots/src/worker/bridgeExecutor/index.ts b/bots/src/worker/bridgeExecutor/index.ts index 41a379b6..2aafcd90 100644 --- a/bots/src/worker/bridgeExecutor/index.ts +++ b/bots/src/worker/bridgeExecutor/index.ts @@ -1,16 +1,16 @@ -import { RPCClient, RPCSocket } from '../../lib/rpc'; -import { L1Monitor } from '../../lib/monitor/l1'; -import { L2Monitor } from '../../lib/monitor/l2'; -import { executorController } from '../../controller'; +import { RPCClient, RPCSocket } from '../../lib/rpc' +import { L1Monitor } from '../../lib/monitor/l1' +import { L2Monitor } from '../../lib/monitor/l2' +import { executorController } from '../../controller' -import { executorLogger as logger } from '../../lib/logger'; -import { initORM, finalizeORM } from './db'; -import { initServer, finalizeServer } from '../../loader'; -import { once } from 'lodash'; -import { config } from '../../config'; -import { Resurrector } from './Resurrector'; +import { executorLogger as logger } from '../../lib/logger' +import { initORM, finalizeORM } from './db' +import { initServer, finalizeServer } from '../../loader' +import { once } from 'lodash' +import { config } from '../../config' +import { Resurrector } from './Resurrector' -let monitors; +let monitors async function runBot(): Promise { monitors = [ @@ -25,52 +25,56 @@ async function runBot(): Promise { logger ), new Resurrector(logger) - ]; + ] try { await Promise.all( monitors.map((monitor) => { - monitor.run(); + monitor.run() }) - ); + ) } catch (err) { - logger.info(err); - stopExecutor(); + logger.info(err) + stopExecutor() } } function stopBot(): void { - monitors.forEach((monitor) => monitor.stop()); + monitors.forEach((monitor) => monitor.stop()) } export async function stopExecutor(): Promise { - stopBot(); + stopBot() - logger.info('Closing listening port'); - finalizeServer(); + logger.info('Closing listening port') + finalizeServer() - logger.info('Closing DB connection'); - await finalizeORM(); + logger.info('Closing DB connection') + await finalizeORM() - logger.info('Finished Executor'); - process.exit(0); + logger.info('Finished Executor') + process.exit(0) } export async function startExecutor(): Promise { try { - await initORM(); - await initServer(executorController, config.EXECUTOR_PORT); - await runBot(); + await initORM() + + await initServer(executorController, config.EXECUTOR_PORT) + + if (!config.ENABLE_API_ONLY) { + await runBot() + } } catch (err) { - throw new Error(err); + throw new Error(err) } // attach graceful shutdown - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const; - signals.forEach((signal) => process.on(signal, once(stopExecutor))); + const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const + signals.forEach((signal) => process.on(signal, once(stopExecutor))) } if (require.main === module) { - startExecutor().catch(console.log); + startExecutor().catch(console.log) } -export { monitors }; +export { monitors } diff --git a/bots/src/worker/challenger/challenger.ts b/bots/src/worker/challenger/challenger.ts index a7a4b242..1d6a709f 100644 --- a/bots/src/worker/challenger/challenger.ts +++ b/bots/src/worker/challenger/challenger.ts @@ -1,78 +1,78 @@ -import { BridgeInfo, MsgDeleteOutput } from '@initia/initia.js'; -import { DataSource, MoreThan } from 'typeorm'; -import { getDB } from './db'; +import { BridgeInfo, MsgDeleteOutput } from '@initia/initia.js' +import { DataSource, MoreThan } from 'typeorm' +import { getDB } from './db' import { ChallengerDepositTxEntity, ChallengerFinalizeDepositTxEntity, ChallengerOutputEntity, ChallengerWithdrawalTxEntity, ChallengedOutputEntity, - ChallengeEntity, -} from '../../orm'; -import { delay } from 'bluebird'; -import { challengerLogger as logger } from '../../lib/logger'; -import { INTERVAL_MONITOR, config } from '../../config'; -import { EntityManager } from 'typeorm'; + ChallengeEntity +} from '../../orm' +import { delay } from 'bluebird' +import { challengerLogger as logger } from '../../lib/logger' +import { INTERVAL_MONITOR, config } from '../../config' +import { EntityManager } from 'typeorm' import { getLastOutputInfo, getOutputInfoByIndex, getBridgeInfo -} from '../../lib/query'; -import MonitorHelper from 'lib/monitor/helper'; -import winston from 'winston'; -import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet'; -import { buildChallengerNotification, notifySlack } from '../../lib/slack'; +} from '../../lib/query' +import MonitorHelper from 'lib/monitor/helper' +import winston from 'winston' +import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' +import { buildChallengerNotification, notifySlack } from '../../lib/slack' -const THRESHOLD_MISS_INTERVAL = 5; +const THRESHOLD_MISS_INTERVAL = 5 export class Challenger { - private isRunning = false; - private db: DataSource; - bridgeId: number; - bridgeInfo: BridgeInfo; + private isRunning = false + private db: DataSource + bridgeId: number + bridgeInfo: BridgeInfo // members for challenge - l1LastCheckedSequence: number; - l1DepositSequenceToCheck: number; - l2OutputIndexToCheck: number; + l1LastCheckedSequence: number + l1DepositSequenceToCheck: number + l2OutputIndexToCheck: number - submissionIntervalMs: number; - missCount: number; // count of miss interval to finalize deposit tx - threshold: number; // threshold of miss interval to finalize deposit tx - helper: MonitorHelper; - challenger: TxWallet; + submissionIntervalMs: number + missCount: number // count of miss interval to finalize deposit tx + threshold: number // threshold of miss interval to finalize deposit tx + helper: MonitorHelper + challenger: TxWallet constructor(public logger: winston.Logger) { - [this.db] = getDB(); - this.bridgeId = config.BRIDGE_ID; - this.isRunning = true; - this.missCount = 0; - - this.helper = new MonitorHelper(); - initWallet(WalletType.Challenger, config.l1lcd); - this.challenger = getWallet(WalletType.Challenger); + [this.db] = getDB() + this.bridgeId = config.BRIDGE_ID + this.isRunning = true + this.missCount = 0 + + this.helper = new MonitorHelper() + initWallet(WalletType.Challenger, config.l1lcd) + this.challenger = getWallet(WalletType.Challenger) } public name(): string { - return 'challenge'; + return 'challenge' } public stop(): void { - this.isRunning = false; - process.exit(); + this.isRunning = false + process.exit() } async init(): Promise { - this.bridgeInfo = await getBridgeInfo(this.bridgeId); + this.bridgeInfo = await getBridgeInfo(this.bridgeId) this.submissionIntervalMs = this.bridgeInfo.bridge_config.submission_interval.seconds.toNumber() * - 1000; + 1000 const state = await this.db.getRepository(ChallengeEntity).findOne({ where: { name: this.name() } - }); + }) if (!state) { await this.db.getRepository(ChallengeEntity).save({ @@ -80,27 +80,27 @@ export class Challenger { l1DepositSequenceToCheck: 1, l1LastCheckedSequence: 0, l2OutputIndexToCheck: 1 - }); + }) } - this.l1DepositSequenceToCheck = state?.l1DepositSequenceToCheck || 1; - this.l2OutputIndexToCheck = state?.l2OutputIndexToCheck || 1; - this.l1LastCheckedSequence = state?.l1LastCheckedSequence || 0; + this.l1DepositSequenceToCheck = state?.l1DepositSequenceToCheck || 1 + this.l2OutputIndexToCheck = state?.l2OutputIndexToCheck || 1 + this.l1LastCheckedSequence = state?.l1LastCheckedSequence || 0 } public async run(): Promise { - await this.init(); + await this.init() while (this.isRunning) { try { await this.db.transaction(async (manager: EntityManager) => { - await this.challengeDepositTx(manager); - await this.challengeOutputRoot(manager); - }); + await this.challengeDepositTx(manager) + await this.challengeOutputRoot(manager) + }) } catch (err) { - logger.error(`Challenger halted! ${err}`); - this.stop(); + logger.error(`Challenger halted! ${err}`) + this.stop() } finally { - await delay(INTERVAL_MONITOR); + await delay(INTERVAL_MONITOR) } } } @@ -114,51 +114,51 @@ export class Challenger { where: { sequence: MoreThan(this.l1DepositSequenceToCheck) } as any, order: { sequence: 'ASC' }, take: 1 - }); + }) - if (nextDepositSequenceToCheck.length === 0) return; + if (nextDepositSequenceToCheck.length === 0) return this.l1DepositSequenceToCheck = Number( nextDepositSequenceToCheck[0].sequence - ); + ) } - const lastOutputInfo = await getLastOutputInfo(this.bridgeId); + const lastOutputInfo = await getLastOutputInfo(this.bridgeId) const depositTxFromChallenger = await manager .getRepository(ChallengerDepositTxEntity) .findOne({ where: { sequence: this.l1DepositSequenceToCheck } as any - }); + }) - if (!depositTxFromChallenger) return; - this.l1DepositSequenceToCheck = Number(depositTxFromChallenger.sequence); + if (!depositTxFromChallenger) return + this.l1DepositSequenceToCheck = Number(depositTxFromChallenger.sequence) // case 1. not finalized deposit tx const depositFinalizeTxFromChallenger = await manager .getRepository(ChallengerFinalizeDepositTxEntity) .findOne({ where: { sequence: this.l1DepositSequenceToCheck } as any - }); + }) if (!depositFinalizeTxFromChallenger) { - this.missCount += 1; + this.missCount += 1 this.logger.info( `[L1 Challenger] deposit tx with sequence "${this.l1DepositSequenceToCheck}" is not finialized` - ); + ) if (this.missCount <= THRESHOLD_MISS_INTERVAL || !lastOutputInfo) { - return await delay(this.submissionIntervalMs); + return await delay(this.submissionIntervalMs) } return await this.handleChallengedOutputProposal( manager, lastOutputInfo.output_index, `not finalized deposit tx within ${THRESHOLD_MISS_INTERVAL} submission interval ${depositFinalizeTxFromChallenger}` - ); + ) } // case 2. not equal deposit tx between L1 and L2 const pair = await config.l1lcd.ophost.tokenPairByL1Denom( this.bridgeId, depositTxFromChallenger.l1Denom - ); + ) const isEqaul = depositTxFromChallenger.sender === depositFinalizeTxFromChallenger.sender && @@ -166,22 +166,22 @@ export class Challenger { depositFinalizeTxFromChallenger.receiver && depositTxFromChallenger.amount === depositFinalizeTxFromChallenger.amount && - pair.l2_denom === depositFinalizeTxFromChallenger.l2Denom; + pair.l2_denom === depositFinalizeTxFromChallenger.l2Denom if (!isEqaul && lastOutputInfo) { await this.handleChallengedOutputProposal( manager, lastOutputInfo.output_index, `not equal deposit tx between L1 and L2` - ); + ) } logger.info( `[L1 Challenger] deposit tx matched in sequence : ${this.l1DepositSequenceToCheck}` - ); + ) - this.missCount = 0; - this.l1LastCheckedSequence = this.l1DepositSequenceToCheck; + this.missCount = 0 + this.l1LastCheckedSequence = this.l1DepositSequenceToCheck await manager.getRepository(ChallengeEntity).update( { name: this.name() }, @@ -189,34 +189,34 @@ export class Challenger { l1DepositSequenceToCheck: this.l1DepositSequenceToCheck, l1LastCheckedSequence: this.l1LastCheckedSequence } - ); + ) } async getChallengerOutputRoot( manager: EntityManager, outputIndex: number ): Promise { - const output = await getOutputInfoByIndex(this.bridgeId, outputIndex); - if (!output) return null; + const output = await getOutputInfoByIndex(this.bridgeId, outputIndex) + if (!output) return null const startBlockNumber = outputIndex === 1 ? 1 : (await getOutputInfoByIndex(this.bridgeId, outputIndex - 1)) - .output_proposal.l2_block_number + 1; - const endBlockNumber = output.output_proposal.l2_block_number; - const blockInfo = await config.l2lcd.tendermint.blockInfo(endBlockNumber); + .output_proposal.l2_block_number + 1 + const endBlockNumber = output.output_proposal.l2_block_number + const blockInfo = await config.l2lcd.tendermint.blockInfo(endBlockNumber) const txEntities = await this.helper.getWithdrawalTxs( manager, ChallengerWithdrawalTxEntity, outputIndex - ); + ) const merkleRoot = await this.helper.saveMerkleRootAndProof( manager, ChallengerWithdrawalTxEntity, txEntities - ); + ) const outputEntity = this.helper.calculateOutputEntity( outputIndex, @@ -224,10 +224,10 @@ export class Challenger { merkleRoot, startBlockNumber, endBlockNumber - ); + ) - await this.helper.saveEntity(manager, ChallengerOutputEntity, outputEntity); - return outputEntity.outputRoot; + await this.helper.saveEntity(manager, ChallengerOutputEntity, outputEntity) + return outputEntity.outputRoot } async getContractOutputRoot(outputIndex: number): Promise { @@ -235,13 +235,13 @@ export class Challenger { const outputInfo = await config.l1lcd.ophost.outputInfo( this.bridgeId, outputIndex - ); - return outputInfo.output_proposal.output_root; + ) + return outputInfo.output_proposal.output_root } catch (err) { logger.info( `[L2 Challenger] waiting for submitting output root in output index ${outputIndex}` - ); - return null; + ) + return null } } @@ -251,51 +251,50 @@ export class Challenger { this.bridgeId, this.l2OutputIndexToCheck ).catch(() => { - return null; - }); + return null + }) - if (!outputInfoToChallenge) return; + if (!outputInfoToChallenge) return // case 1. output root not matched const outputRootFromContract = await this.getContractOutputRoot( this.l2OutputIndexToCheck - ); + ) const outputRootFromChallenger = await this.getChallengerOutputRoot( manager, this.l2OutputIndexToCheck - ); + ) - if (!outputRootFromContract || !outputRootFromChallenger) return; + if (!outputRootFromContract || !outputRootFromChallenger) return if (outputRootFromContract !== outputRootFromChallenger) { await this.handleChallengedOutputProposal( manager, this.l2OutputIndexToCheck, `not equal output root from contract: ${outputRootFromContract}, from challenger: ${outputRootFromChallenger}` - ); + ) } logger.info( `[L2 Challenger] output root matched in output index : ${this.l2OutputIndexToCheck}` - ); - this.l2OutputIndexToCheck += 1; + ) + this.l2OutputIndexToCheck += 1 await manager.getRepository(ChallengeEntity).update( { name: this.name() }, { l2OutputIndexToCheck: this.l2OutputIndexToCheck } - ); + ) } - async deleteOutputProposal(outputIndex: number) { const msg = new MsgDeleteOutput( this.challenger.key.accAddress, this.bridgeId, outputIndex - ); + ) - await this.challenger.transaction([msg]); + await this.challenger.transaction([msg]) } async handleChallengedOutputProposal( @@ -307,14 +306,14 @@ export class Challenger { outputIndex, bridgeId: this.bridgeId.toString(), reason: reason ?? 'unknown' - }; - await manager.getRepository(ChallengedOutputEntity).save(challengedOutput); + } + await manager.getRepository(ChallengedOutputEntity).save(challengedOutput) if (config.DELETE_OUTPUT_PROPOSAL === 'true') { - await this.deleteOutputProposal(outputIndex); + await this.deleteOutputProposal(outputIndex) } - await notifySlack(buildChallengerNotification(challengedOutput)); - process.exit(); + await notifySlack(buildChallengerNotification(challengedOutput)) + process.exit() } } diff --git a/bots/src/worker/challenger/db.ts b/bots/src/worker/challenger/db.ts index 4149bdbb..af3fdebe 100644 --- a/bots/src/worker/challenger/db.ts +++ b/bots/src/worker/challenger/db.ts @@ -1,14 +1,14 @@ -import 'reflect-metadata'; -import Bluebird from 'bluebird'; +import 'reflect-metadata' +import Bluebird from 'bluebird' import { ConnectionOptionsReader, DataSource, DataSourceOptions -} from 'typeorm'; -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy'; +} from 'typeorm' +import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' +import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy' -const debug = require('debug')('orm'); +const debug = require('debug')('orm') import { ChallengerOutputEntity, @@ -18,8 +18,8 @@ import { ChallengedOutputEntity, ChallengerFinalizeDepositTxEntity, ChallengerFinalizeWithdrawalTxEntity, - ChallengeEntity, -} from '../../orm'; + ChallengeEntity +} from '../../orm' const staticOptions = { supportBigNumbers: true, @@ -32,45 +32,45 @@ const staticOptions = { ChallengerDepositTxEntity, ChallengerOutputEntity, ChallengedOutputEntity, - ChallengeEntity, + ChallengeEntity ] -}; +} -let DB: DataSource[] = []; +let DB: DataSource[] = [] function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions; + const pgOpts = options as PostgresConnectionOptions debug( `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ pgOpts.port || 5432 }` - ); + ) return new DataSource({ ...options, ...staticOptions, namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize(); + }).initialize() } export async function initORM(): Promise { - const reader = new ConnectionOptionsReader(); - const options = (await reader.all()) as PostgresConnectionOptions[]; + const reader = new ConnectionOptionsReader() + const options = (await reader.all()) as PostgresConnectionOptions[] if (options.length && !options.filter((o) => o.name === 'default').length) { - options[0]['name' as any] = 'default'; + options[0]['name' as any] = 'default' } - DB = await Bluebird.map(options, (opt) => initConnection(opt)); + DB = await Bluebird.map(options, (opt) => initConnection(opt)) } export function getDB(): DataSource[] { if (!DB) { - throw new Error('DB not initialized'); + throw new Error('DB not initialized') } - return DB; + return DB } export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())); + await Promise.all(DB.map((c) => c.destroy())) } diff --git a/bots/src/worker/challenger/index.ts b/bots/src/worker/challenger/index.ts index bcde88f8..744c2ee1 100644 --- a/bots/src/worker/challenger/index.ts +++ b/bots/src/worker/challenger/index.ts @@ -1,14 +1,14 @@ -import { RPCClient, RPCSocket } from '../../lib/rpc'; -import { Monitor } from '../../lib/monitor'; -import { Challenger } from './challenger'; -import { initORM, finalizeORM } from './db'; -import { challengerLogger as logger } from '../../lib/logger'; -import { once } from 'lodash'; -import { L1Monitor } from './monitor_l1'; -import { L2Monitor } from './monitor_l2'; -import { config } from '../../config'; - -let monitors: (Monitor | Challenger)[]; +import { RPCClient, RPCSocket } from '../../lib/rpc' +import { Monitor } from '../../lib/monitor' +import { Challenger } from './challenger' +import { initORM, finalizeORM } from './db' +import { challengerLogger as logger } from '../../lib/logger' +import { once } from 'lodash' +import { L1Monitor } from './monitor_l1' +import { L2Monitor } from './monitor_l2' +import { config } from '../../config' + +let monitors: (Monitor | Challenger)[] async function runBot(): Promise { monitors = [ @@ -23,41 +23,41 @@ async function runBot(): Promise { logger ), new Challenger(logger) - ]; + ] try { await Promise.all( monitors.map((monitor) => { - monitor.run(); + monitor.run() }) - ); + ) } catch (err) { - logger.info(err); - stopChallenger(); + logger.info(err) + stopChallenger() } } function stopBot(): void { - monitors.forEach((monitor) => monitor.stop()); + monitors.forEach((monitor) => monitor.stop()) } export async function stopChallenger(): Promise { - stopBot(); + stopBot() - logger.info('Closing DB connection'); - await finalizeORM(); + logger.info('Closing DB connection') + await finalizeORM() - logger.info('Finished Challenger'); - process.exit(0); + logger.info('Finished Challenger') + process.exit(0) } export async function startChallenger(): Promise { - await initORM(); - await runBot(); + await initORM() + await runBot() - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const; - signals.forEach((signal) => process.on(signal, once(stopChallenger))); + const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const + signals.forEach((signal) => process.on(signal, once(stopChallenger))) } if (require.main === module) { - startChallenger().catch(console.log); + startChallenger().catch(console.log) } diff --git a/bots/src/worker/challenger/monitor_l1.ts b/bots/src/worker/challenger/monitor_l1.ts index 31583a16..05db8833 100644 --- a/bots/src/worker/challenger/monitor_l1.ts +++ b/bots/src/worker/challenger/monitor_l1.ts @@ -1,13 +1,13 @@ -import { Monitor } from '../../lib/monitor'; +import { Monitor } from '../../lib/monitor' import { ChallengerDepositTxEntity, ChallengerFinalizeWithdrawalTxEntity -} from '../../orm'; -import { EntityManager } from 'typeorm'; -import { RPCClient, RPCSocket } from '../../lib/rpc'; -import { getDB } from './db'; -import winston from 'winston'; -import { config } from '../../config'; +} from '../../orm' +import { EntityManager } from 'typeorm' +import { RPCClient, RPCSocket } from '../../lib/rpc' +import { getDB } from './db' +import winston from 'winston' +import { config } from '../../config' export class L1Monitor extends Monitor { constructor( @@ -16,11 +16,11 @@ export class L1Monitor extends Monitor { logger: winston.Logger ) { super(socket, rpcClient, logger); - [this.db] = getDB(); + [this.db] = getDB() } public name(): string { - return 'challenger_l1_monitor'; + return 'challenger_l1_monitor' } public async handleInitiateTokenDeposit( @@ -35,8 +35,8 @@ export class L1Monitor extends Monitor { l2Denom: data['l2_denom'], amount: data['amount'], data: data['data'] - }; - await manager.getRepository(ChallengerDepositTxEntity).save(entity); + } + await manager.getRepository(ChallengerDepositTxEntity).save(entity) } public async handleFinalizeTokenWithdrawalEvent( @@ -52,35 +52,39 @@ export class L1Monitor extends Monitor { l1Denom: data['l1_denom'], l2Denom: data['l2_denom'], amount: data['amount'] - }; + } await manager .getRepository(ChallengerFinalizeWithdrawalTxEntity) - .save(entity); + .save(entity) } public async handleEvents(manager: EntityManager): Promise { const [isEmpty, events] = await this.helper.fetchAllEvents( config.l1lcd, - this.currentHeight, - ); - - if (isEmpty) return false; - - const depositEvents = events.filter((evt) => evt.type === 'initiate_token_deposit') + this.currentHeight + ) + + if (isEmpty) return false + + const depositEvents = events.filter( + (evt) => evt.type === 'initiate_token_deposit' + ) for (const evt of depositEvents) { - const attrMap = this.helper.eventsToAttrMap(evt); - if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue; - await this.handleInitiateTokenDeposit(manager, attrMap); + const attrMap = this.helper.eventsToAttrMap(evt) + if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue + await this.handleInitiateTokenDeposit(manager, attrMap) } - const finalizeEvents = events.filter((evt) => evt.type === 'finalize_token_withdrawal') + const finalizeEvents = events.filter( + (evt) => evt.type === 'finalize_token_withdrawal' + ) for (const evt of finalizeEvents) { - const attrMap = this.helper.eventsToAttrMap(evt); - if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue; - await this.handleFinalizeTokenWithdrawalEvent(manager, attrMap); + const attrMap = this.helper.eventsToAttrMap(evt) + if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue + await this.handleFinalizeTokenWithdrawalEvent(manager, attrMap) } - - return true; + + return true } } diff --git a/bots/src/worker/challenger/monitor_l2.ts b/bots/src/worker/challenger/monitor_l2.ts index fc4cf8b6..d4bbed1a 100644 --- a/bots/src/worker/challenger/monitor_l2.ts +++ b/bots/src/worker/challenger/monitor_l2.ts @@ -2,19 +2,19 @@ import { ChallengerFinalizeDepositTxEntity, ChallengerOutputEntity, ChallengerWithdrawalTxEntity -} from '../../orm'; -import { OutputInfo } from '@initia/initia.js'; -import { Monitor } from '../../lib/monitor'; -import { EntityManager } from 'typeorm'; -import { RPCClient, RPCSocket } from '../../lib/rpc'; -import winston from 'winston'; -import { getDB } from './db'; -import { config } from '../../config'; +} from '../../orm' +import { OutputInfo } from '@initia/initia.js' +import { Monitor } from '../../lib/monitor' +import { EntityManager } from 'typeorm' +import { RPCClient, RPCSocket } from '../../lib/rpc' +import winston from 'winston' +import { getDB } from './db' +import { config } from '../../config' export class L2Monitor extends Monitor { - outputIndex: number; - outputInfo: OutputInfo; - startBlockNumber: number; + outputIndex: number + outputInfo: OutputInfo + startBlockNumber: number constructor( public socket: RPCSocket, @@ -22,12 +22,12 @@ export class L2Monitor extends Monitor { logger: winston.Logger ) { super(socket, rpcClient, logger); - [this.db] = getDB(); - this.outputIndex = 0; + [this.db] = getDB() + this.outputIndex = 0 } public name(): string { - return 'challenger_l2_monitor'; + return 'challenger_l2_monitor' } private async handleInitiateTokenWithdrawalEvent( @@ -37,14 +37,14 @@ export class L2Monitor extends Monitor { const outputInfo = await this.helper.getLastOutputFromDB( manager, ChallengerOutputEntity - ); - - if (!outputInfo) return; - + ) + + if (!outputInfo) return + const pair = await config.l1lcd.ophost.tokenPairByL2Denom( this.bridgeId, data['denom'] - ); + ) const tx: ChallengerWithdrawalTxEntity = { l1Denom: pair.l1_denom, @@ -57,9 +57,9 @@ export class L2Monitor extends Monitor { outputIndex: outputInfo ? outputInfo.outputIndex + 1 : 1, merkleRoot: '', merkleProof: [] - }; + } - await this.helper.saveEntity(manager, ChallengerWithdrawalTxEntity, tx); + await this.helper.saveEntity(manager, ChallengerWithdrawalTxEntity, tx) } public async handleFinalizeTokenDepositEvent( @@ -73,31 +73,34 @@ export class L2Monitor extends Monitor { l2Denom: data['denom'], amount: data['amount'], l1Height: parseInt(data['finalize_height']) - }; - await manager.getRepository(ChallengerFinalizeDepositTxEntity).save(entity); + } + await manager.getRepository(ChallengerFinalizeDepositTxEntity).save(entity) } public async handleEvents(manager: EntityManager): Promise { const [isEmpty, events] = await this.helper.fetchAllEvents( config.l2lcd, - this.currentHeight, - ); + this.currentHeight + ) - if (isEmpty) return false; + if (isEmpty) return false - - const withdrawalEvents = events.filter((evt) => evt.type === 'initiate_token_withdrawal') + const withdrawalEvents = events.filter( + (evt) => evt.type === 'initiate_token_withdrawal' + ) for (const evt of withdrawalEvents) { - const attrMap = this.helper.eventsToAttrMap(evt); - await this.handleInitiateTokenWithdrawalEvent(manager, attrMap); + const attrMap = this.helper.eventsToAttrMap(evt) + await this.handleInitiateTokenWithdrawalEvent(manager, attrMap) } - const finalizeEvents = events.filter((evt) => evt.type === 'finalize_token_deposit') + const finalizeEvents = events.filter( + (evt) => evt.type === 'finalize_token_deposit' + ) for (const evt of finalizeEvents) { - const attrMap = this.helper.eventsToAttrMap(evt); - await this.handleFinalizeTokenDepositEvent(manager, attrMap); + const attrMap = this.helper.eventsToAttrMap(evt) + await this.handleFinalizeTokenDepositEvent(manager, attrMap) } - return true; + return true } } diff --git a/bots/src/worker/outputSubmitter/db.ts b/bots/src/worker/outputSubmitter/db.ts index 5c97facd..9b9f448c 100644 --- a/bots/src/worker/outputSubmitter/db.ts +++ b/bots/src/worker/outputSubmitter/db.ts @@ -1,58 +1,58 @@ -import 'reflect-metadata'; -import Bluebird from 'bluebird'; +import 'reflect-metadata' +import Bluebird from 'bluebird' import { ConnectionOptionsReader, DataSource, DataSourceOptions -} from 'typeorm'; -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy'; +} from 'typeorm' +import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' +import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy' -const debug = require('debug')('orm'); +const debug = require('debug')('orm') -import { ExecutorOutputEntity } from '../../orm'; +import { ExecutorOutputEntity } from '../../orm' const staticOptions = { supportBigNumbers: true, bigNumberStrings: true, entities: [ExecutorOutputEntity] -}; +} -let DB: DataSource[] = []; +let DB: DataSource[] = [] function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions; + const pgOpts = options as PostgresConnectionOptions debug( `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ pgOpts.port || 5432 }` - ); + ) return new DataSource({ ...options, ...staticOptions, namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize(); + }).initialize() } export async function initORM(): Promise { - const reader = new ConnectionOptionsReader(); - const options = (await reader.all()) as PostgresConnectionOptions[]; + const reader = new ConnectionOptionsReader() + const options = (await reader.all()) as PostgresConnectionOptions[] if (options.length && !options.filter((o) => o.name === 'default').length) { - options[0]['name' as any] = 'default'; + options[0]['name' as any] = 'default' } - DB = await Bluebird.map(options, (opt) => initConnection(opt)); + DB = await Bluebird.map(options, (opt) => initConnection(opt)) } export function getDB(): DataSource[] { if (!DB) { - throw new Error('DB not initialized'); + throw new Error('DB not initialized') } - return DB; + return DB } export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())); + await Promise.all(DB.map((c) => c.destroy())) } diff --git a/bots/src/worker/outputSubmitter/index.ts b/bots/src/worker/outputSubmitter/index.ts index cdfc5b5e..d148f823 100644 --- a/bots/src/worker/outputSubmitter/index.ts +++ b/bots/src/worker/outputSubmitter/index.ts @@ -1,45 +1,45 @@ -import { OutputSubmitter } from './outputSubmitter'; -import { outputLogger as logger } from '../../lib/logger'; -import { once } from 'lodash'; -import { initORM } from './db'; +import { OutputSubmitter } from './outputSubmitter' +import { outputLogger as logger } from '../../lib/logger' +import { once } from 'lodash' +import { initORM } from './db' -let jobs: OutputSubmitter[]; +let jobs: OutputSubmitter[] async function runBot(): Promise { - jobs = [new OutputSubmitter()]; + jobs = [new OutputSubmitter()] try { await Promise.all( jobs.map((job) => { - job.run(); + job.run() }) - ); + ) } catch (err) { - logger.info(err); - stopOutput(); + logger.info(err) + stopOutput() } } function stopBot(): void { - jobs.forEach((job) => job.stop()); + jobs.forEach((job) => job.stop()) } export async function stopOutput(): Promise { - stopBot(); + stopBot() - logger.info('Finished OutputSubmitter'); - process.exit(0); + logger.info('Finished OutputSubmitter') + process.exit(0) } export async function startOutput(): Promise { - await initORM(); - await runBot(); + await initORM() + await runBot() // attach graceful shutdown - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const; - signals.forEach((signal) => process.on(signal, once(stopOutput))); + const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const + signals.forEach((signal) => process.on(signal, once(stopOutput))) } if (require.main === module) { - startOutput().catch(console.log); + startOutput().catch(console.log) } diff --git a/bots/src/worker/outputSubmitter/outputSubmitter.ts b/bots/src/worker/outputSubmitter/outputSubmitter.ts index eb7ba1fe..3a233672 100644 --- a/bots/src/worker/outputSubmitter/outputSubmitter.ts +++ b/bots/src/worker/outputSubmitter/outputSubmitter.ts @@ -1,76 +1,76 @@ -import { MsgProposeOutput } from '@initia/initia.js'; -import { INTERVAL_OUTPUT } from '../../config'; -import { ExecutorOutputEntity } from '../../orm'; -import { delay } from 'bluebird'; -import { outputLogger as logger } from '../../lib/logger'; -import { ErrorTypes } from '../../lib/error'; -import { config } from '../../config'; -import { getLastOutputInfo } from '../../lib/query'; -import MonitorHelper from '../../lib/monitor/helper'; -import { DataSource, EntityManager } from 'typeorm'; -import { getDB } from './db'; -import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet'; +import { MsgProposeOutput } from '@initia/initia.js' +import { INTERVAL_OUTPUT } from '../../config' +import { ExecutorOutputEntity } from '../../orm' +import { delay } from 'bluebird' +import { outputLogger as logger } from '../../lib/logger' +import { ErrorTypes } from '../../lib/error' +import { config } from '../../config' +import { getLastOutputInfo } from '../../lib/query' +import MonitorHelper from '../../lib/monitor/helper' +import { DataSource, EntityManager } from 'typeorm' +import { getDB } from './db' +import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' export class OutputSubmitter { - private db: DataSource; - private submitter: TxWallet; - private syncedOutputIndex = 1; - private processedBlockNumber = 1; - private isRunning = false; - private bridgeId: number; - helper: MonitorHelper = new MonitorHelper(); + private db: DataSource + private submitter: TxWallet + private syncedOutputIndex = 1 + private processedBlockNumber = 1 + private isRunning = false + private bridgeId: number + helper: MonitorHelper = new MonitorHelper() async init() { - [this.db] = getDB(); - initWallet(WalletType.OutputSubmitter, config.l1lcd); - this.submitter = getWallet(WalletType.OutputSubmitter); - this.bridgeId = config.BRIDGE_ID; - this.isRunning = true; + [this.db] = getDB() + initWallet(WalletType.OutputSubmitter, config.l1lcd) + this.submitter = getWallet(WalletType.OutputSubmitter) + this.bridgeId = config.BRIDGE_ID + this.isRunning = true } public async run() { - await this.init(); + await this.init() while (this.isRunning) { - await this.processOutput(); + await this.processOutput() } } async processOutput() { try { await this.db.transaction(async (manager: EntityManager) => { - const lastOutputInfo = await getLastOutputInfo(this.bridgeId); + const lastOutputInfo = await getLastOutputInfo(this.bridgeId) if (lastOutputInfo) { - this.syncedOutputIndex = lastOutputInfo.output_index + 1; + this.syncedOutputIndex = lastOutputInfo.output_index + 1 } const output = await this.helper.getOutputByIndex( manager, ExecutorOutputEntity, this.syncedOutputIndex - ); - if (!output) return; + ) + if (!output) return - await this.proposeOutput(output); + await this.proposeOutput(output) logger.info( `successfully submitted! output index: ${this.syncedOutputIndex}, output root: ${output.outputRoot} (${output.startBlockNumber}, ${output.endBlockNumber})` - ); - }); + ) + }) } catch (err) { if (err.response?.data.type === ErrorTypes.NOT_FOUND_ERROR) { logger.info( `waiting for output index: ${this.syncedOutputIndex}, processed block number: ${this.processedBlockNumber}` - ); - await delay(INTERVAL_OUTPUT); + ) + await delay(INTERVAL_OUTPUT) } else { - logger.error(`Output Submitter halted! ${err}`); - this.stop(); + logger.error(`Output Submitter halted! ${err}`) + this.stop() } } } public async stop() { - this.isRunning = false; + this.isRunning = false } private async proposeOutput(outputEntity: ExecutorOutputEntity) { @@ -79,10 +79,10 @@ export class OutputSubmitter { this.bridgeId, outputEntity.endBlockNumber, outputEntity.outputRoot - ); + ) - await this.submitter.transaction([msg]); + await this.submitter.transaction([msg]) - this.processedBlockNumber = outputEntity.endBlockNumber; + this.processedBlockNumber = outputEntity.endBlockNumber } } From 3d4dc7e52709e6bbc279ff9cfa17dc5b00b2230e Mon Sep 17 00:00:00 2001 From: Harvey Date: Tue, 16 Apr 2024 12:11:15 +0900 Subject: [PATCH 07/13] bot: add key param (#44) * add key param * add resolve logic * add L2_GAS_PRICE for executor * fix import --------- Co-authored-by: Vritra4 --- bots/README.md | 1 + bots/src/controller/batch/BatchController.ts | 2 +- bots/src/lib/slack.ts | 35 ++++++++++++++++--- bots/src/lib/wallet.ts | 14 ++++---- bots/src/worker/bridgeExecutor/Resurrector.ts | 10 +++--- bots/src/worker/challenger/challenger.ts | 6 ++-- 6 files changed, 48 insertions(+), 20 deletions(-) diff --git a/bots/README.md b/bots/README.md index 8b01293f..dc838728 100644 --- a/bots/README.md +++ b/bots/README.md @@ -49,6 +49,7 @@ You should set `.env` file for each bot in `bots/worker`. To transfer assets bet | L1_RPC_URI | L1 node RPC URI | | | L2_LCD_URI | L2 node LCD URI | | | L2_RPC_URI | L2 node RPC URI | | +| L2_GAS_PRICES | Gas prices for L2 chain | '0.15umin' | | BRIDGE_ID | Bridge ID | '' | | EXECUTOR_PORT | Executor port | 5000 | | EXECUTOR_MNEMONIC | Mnemonic seed for executor | '' | diff --git a/bots/src/controller/batch/BatchController.ts b/bots/src/controller/batch/BatchController.ts index bbca68bd..5eddba2d 100644 --- a/bots/src/controller/batch/BatchController.ts +++ b/bots/src/controller/batch/BatchController.ts @@ -6,7 +6,7 @@ import { Validator } from 'koa-joi-controllers' import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { success } from 'lib/response' +import { success } from '../../lib/response' import { GetBatchResponse } from 'sawgger/batch_model' import { getBatch } from 'service/batch/BatchService' diff --git a/bots/src/lib/slack.ts b/bots/src/lib/slack.ts index c951d980..dc5fd001 100644 --- a/bots/src/lib/slack.ts +++ b/bots/src/lib/slack.ts @@ -7,19 +7,44 @@ import * as https from 'https' import UnconfirmedTxEntity from '../orm/executor/UnconfirmedTxEntity' import { ChallengedOutputEntity } from '../orm/index' +const postedKeys = new Set() + const ax = axios.create({ httpAgent: new http.Agent({ keepAlive: true }), httpsAgent: new https.Agent({ keepAlive: true }), timeout: 15000 }) -export async function notifySlack(text: { text: string }) { - if (config.SLACK_WEB_HOOK == '') return - await ax.post(config.SLACK_WEB_HOOK, text).catch(() => { - console.error('Slack Notification Error') - }) +export async function notifySlack(key: string, text: { text: string }, isError: boolean = true) { + if (config.SLACK_WEB_HOOK === undefined || config.SLACK_WEB_HOOK === '') return + + const keyExists = postedKeys.has(key) + + if (isError) { + if (!keyExists) { + await ax.post(config.SLACK_WEB_HOOK, text) + postedKeys.add(key) + } + } else { + if (keyExists) { + await ax.post(config.SLACK_WEB_HOOK, text) + postedKeys.delete(key) + } + } +} + +export function buildResolveErrorNotification(description: string): { text: string } { + let notification = '```' + notification += `[INFO] Error Resolved Notification\n` + notification += `\n` + notification += `${description}\n` + notification += '```' + return { + text: notification + } } + export function buildNotEnoughBalanceNotification( wallet: Wallet, balance: number, diff --git a/bots/src/lib/wallet.ts b/bots/src/lib/wallet.ts index 938ab8f8..912b8897 100644 --- a/bots/src/lib/wallet.ts +++ b/bots/src/lib/wallet.ts @@ -9,7 +9,7 @@ import { } from '@initia/initia.js' import { sendTx } from './tx' import { config } from '../config' -import { buildNotEnoughBalanceNotification, notifySlack } from './slack' +import { buildNotEnoughBalanceNotification, buildResolveErrorNotification, notifySlack } from './slack' export enum WalletType { Challenger = 'challenger', @@ -87,13 +87,15 @@ export class TxWallet extends Wallet { denom ) - if ( - balance.amount && - parseInt(balance.amount) < config.SLACK_NOT_ENOUGH_BALANCE_THRESHOLD - ) { + const key = `${this.key.accAddress}-${balance.amount}`; + if (balance.amount && parseInt(balance.amount) < config.SLACK_NOT_ENOUGH_BALANCE_THRESHOLD) { await notifySlack( - buildNotEnoughBalanceNotification(this, parseInt(balance.amount), denom) + key, buildNotEnoughBalanceNotification(this, parseInt(balance.amount), denom) ) + } else { + await notifySlack( + key, buildResolveErrorNotification(`Balance for ${this.key.accAddress} is restored.`), false + ); } } diff --git a/bots/src/worker/bridgeExecutor/Resurrector.ts b/bots/src/worker/bridgeExecutor/Resurrector.ts index 27224c25..bcb0f823 100644 --- a/bots/src/worker/bridgeExecutor/Resurrector.ts +++ b/bots/src/worker/bridgeExecutor/Resurrector.ts @@ -6,7 +6,7 @@ import { DataSource } from 'typeorm' import Bluebird from 'bluebird' import winston from 'winston' import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' -import { buildFailedTxNotification, notifySlack } from '../../lib/slack' +import { buildFailedTxNotification, buildResolveErrorNotification, notifySlack } from '../../lib/slack' export class Resurrector { private db: DataSource @@ -35,9 +35,8 @@ export class Resurrector { ) } - async resubmitFailedDepositTx( - unconfirmedTx: UnconfirmedTxEntity - ): Promise { + async resubmitFailedDepositTx(unconfirmedTx: UnconfirmedTxEntity): Promise { + const txKey = `${unconfirmedTx.sender}-${unconfirmedTx.receiver}-${unconfirmedTx.amount}` const msg = new MsgFinalizeTokenDeposit( this.executor.key.accAddress, unconfirmedTx.sender, @@ -51,13 +50,14 @@ export class Resurrector { try { await this.executor.transaction([msg]) await this.updateProcessed(unconfirmedTx) + await notifySlack(txKey, buildResolveErrorNotification(`[INFO] Transaction successfully resubmitted and processed for ${unconfirmedTx.sender} to ${unconfirmedTx.receiver} of amount ${unconfirmedTx.amount}.`), false) } catch (err) { if (this.errorCounter++ < 20) { await Bluebird.delay(5 * 1000) return } this.errorCounter = 0 - await notifySlack(buildFailedTxNotification(unconfirmedTx)) + await notifySlack(txKey, buildFailedTxNotification(unconfirmedTx)) } } diff --git a/bots/src/worker/challenger/challenger.ts b/bots/src/worker/challenger/challenger.ts index 1d6a709f..b9f2a60d 100644 --- a/bots/src/worker/challenger/challenger.ts +++ b/bots/src/worker/challenger/challenger.ts @@ -18,7 +18,7 @@ import { getOutputInfoByIndex, getBridgeInfo } from '../../lib/query' -import MonitorHelper from 'lib/monitor/helper' +import MonitorHelper from '../../lib/monitor/helper' import winston from 'winston' import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' import { buildChallengerNotification, notifySlack } from '../../lib/slack' @@ -313,7 +313,7 @@ export class Challenger { await this.deleteOutputProposal(outputIndex) } - await notifySlack(buildChallengerNotification(challengedOutput)) - process.exit() + await notifySlack(`${outputIndex}-${this.bridgeId}`, buildChallengerNotification(challengedOutput)); + process.exit(); } } From e5035d799632b523327ec2b010b8236aecfa00ee Mon Sep 17 00:00:00 2001 From: Geoff Lee Date: Tue, 16 Apr 2024 12:28:39 +0900 Subject: [PATCH 08/13] fix target tag to build a docker image (#50) --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cfa19697..487e79d7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,7 +5,7 @@ on: push: branches: [ "main" ] tags: - - "v*" + - "bots-v*" env: REGISTRY: ghcr.io @@ -48,4 +48,4 @@ jobs: file: bots/Dockerfile push: ${{ startsWith(github.ref, 'refs/tags') }} # push image only for tags tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} From 2725dcbdbd055efa86d957f604ad68c8bca8ba36 Mon Sep 17 00:00:00 2001 From: Harvey Date: Tue, 16 Apr 2024 18:00:36 +0900 Subject: [PATCH 09/13] remove bots (#51) --- .github/workflows/docker.yml | 51 - bots/.dockerignore | 3 - bots/.env_sample | 42 - bots/.eslintignore | 2 - bots/.eslintrc.js | 30 - bots/.gitignore | 21 - bots/.husky/pre-commit | 4 - bots/LICENSE | 21 - bots/README.md | 165 - bots/apidoc-template/index.html | 3330 ----- bots/dockerfile | 23 - bots/entrypoint.sh | 3 - bots/jest.config.ts | 28 - bots/package-lock.json | 12161 ---------------- bots/package.json | 149 - bots/pm2.json | 34 - bots/src/celestia/builder.ts | 133 - bots/src/celestia/commitment.ts | 73 - bots/src/celestia/hasher.ts | 183 - bots/src/celestia/merkle.ts | 201 - bots/src/celestia/namespace.ts | 66 - bots/src/celestia/share.ts | 63 - bots/src/celestia/utils.ts | 134 - bots/src/config.ts | 164 - bots/src/controller/batch/BatchController.ts | 40 - .../controller/executor/ClaimTxController.ts | 41 - .../executor/DepositTxController.ts | 41 - .../controller/executor/OutputController.ts | 40 - .../executor/WithdrawalTxController.ts | 41 - bots/src/controller/index.ts | 17 - bots/src/lib/compressor.spec.ts | 18 - bots/src/lib/compressor.ts | 15 - bots/src/lib/db.ts | 58 - bots/src/lib/error.ts | 102 - bots/src/lib/logger.ts | 52 - bots/src/lib/monitor/helper.ts | 229 - bots/src/lib/monitor/index.ts | 1 - bots/src/lib/monitor/l1.ts | 133 - bots/src/lib/monitor/l2.ts | 164 - bots/src/lib/monitor/monitor.ts | 134 - bots/src/lib/query.ts | 89 - bots/src/lib/response.ts | 55 - bots/src/lib/rpc.ts | 313 - bots/src/lib/slack.ts | 111 - bots/src/lib/storage.spec.ts | 57 - bots/src/lib/storage.ts | 112 - bots/src/lib/tx.ts | 45 - bots/src/lib/types.ts | 26 - bots/src/lib/util.ts | 65 - bots/src/lib/wallet.ts | 127 - bots/src/loader/app.ts | 124 - bots/src/loader/index.ts | 2 - bots/src/loader/server.ts | 23 - bots/src/orm/CamelToSnakeNamingStrategy.ts | 24 - bots/src/orm/RecordEntity.ts | 19 - bots/src/orm/StateEntity.ts | 10 - bots/src/orm/challenger/ChallengeEntity.ts | 16 - .../src/orm/challenger/DeletedOutputEntity.ts | 13 - bots/src/orm/challenger/DepositTxEntity.ts | 27 - .../orm/challenger/FinalizeDepositTxEntity.ts | 25 - .../challenger/FinalizeWithdrawalTxEntity.ts | 31 - bots/src/orm/challenger/OutputEntity.ts | 25 - bots/src/orm/challenger/WithdrawalTxEntity.ts | 37 - bots/src/orm/executor/DepositTxEntity.ts | 37 - bots/src/orm/executor/OutputEntity.ts | 25 - bots/src/orm/executor/UnconfirmedTxEntity.ts | 46 - bots/src/orm/executor/WithdrawalTxEntity.ts | 37 - bots/src/orm/index.ts | 47 - bots/src/sawgger/batch_model.ts | 36 - bots/src/scripts/setupL2.ts | 114 - bots/src/service/batch/BatchService.ts | 72 - bots/src/service/executor/ClaimTxService.ts | 113 - bots/src/service/executor/DepositTxService.ts | 63 - bots/src/service/executor/OutputService.ts | 61 - .../service/executor/WithdrawalTxService.ts | 63 - bots/src/service/index.ts | 6 - bots/src/swagger/batch_model.ts | 0 bots/src/swagger/executor_model.ts | 74 - bots/src/swagger/swagger.ts | 25 - bots/src/test/integration.ts | 64 - bots/src/test/utils/Bridge.ts | 110 - bots/src/test/utils/TxBot.ts | 60 - bots/src/test/utils/consts.ts | 19 - bots/src/test/utils/helper.ts | 47 - .../worker/batchSubmitter/batchSubmitter.ts | 262 - bots/src/worker/batchSubmitter/index.ts | 59 - bots/src/worker/bridgeExecutor/Resurrector.ts | 103 - bots/src/worker/bridgeExecutor/db.ts | 75 - bots/src/worker/bridgeExecutor/index.ts | 80 - bots/src/worker/challenger/challenger.ts | 319 - bots/src/worker/challenger/db.ts | 76 - bots/src/worker/challenger/index.ts | 63 - bots/src/worker/challenger/monitor_l1.ts | 90 - bots/src/worker/challenger/monitor_l2.ts | 106 - bots/src/worker/outputSubmitter/db.ts | 58 - bots/src/worker/outputSubmitter/index.ts | 45 - .../worker/outputSubmitter/outputSubmitter.ts | 88 - bots/tsconfig.json | 26 - bots/typedoc.json | 15 - 99 files changed, 22170 deletions(-) delete mode 100644 .github/workflows/docker.yml delete mode 100644 bots/.dockerignore delete mode 100644 bots/.env_sample delete mode 100644 bots/.eslintignore delete mode 100644 bots/.eslintrc.js delete mode 100644 bots/.gitignore delete mode 100755 bots/.husky/pre-commit delete mode 100644 bots/LICENSE delete mode 100644 bots/README.md delete mode 100644 bots/apidoc-template/index.html delete mode 100644 bots/dockerfile delete mode 100644 bots/entrypoint.sh delete mode 100644 bots/jest.config.ts delete mode 100644 bots/package-lock.json delete mode 100644 bots/package.json delete mode 100644 bots/pm2.json delete mode 100644 bots/src/celestia/builder.ts delete mode 100644 bots/src/celestia/commitment.ts delete mode 100644 bots/src/celestia/hasher.ts delete mode 100644 bots/src/celestia/merkle.ts delete mode 100644 bots/src/celestia/namespace.ts delete mode 100644 bots/src/celestia/share.ts delete mode 100644 bots/src/celestia/utils.ts delete mode 100644 bots/src/config.ts delete mode 100644 bots/src/controller/batch/BatchController.ts delete mode 100644 bots/src/controller/executor/ClaimTxController.ts delete mode 100644 bots/src/controller/executor/DepositTxController.ts delete mode 100644 bots/src/controller/executor/OutputController.ts delete mode 100644 bots/src/controller/executor/WithdrawalTxController.ts delete mode 100644 bots/src/controller/index.ts delete mode 100644 bots/src/lib/compressor.spec.ts delete mode 100644 bots/src/lib/compressor.ts delete mode 100644 bots/src/lib/db.ts delete mode 100644 bots/src/lib/error.ts delete mode 100644 bots/src/lib/logger.ts delete mode 100644 bots/src/lib/monitor/helper.ts delete mode 100644 bots/src/lib/monitor/index.ts delete mode 100644 bots/src/lib/monitor/l1.ts delete mode 100644 bots/src/lib/monitor/l2.ts delete mode 100644 bots/src/lib/monitor/monitor.ts delete mode 100644 bots/src/lib/query.ts delete mode 100644 bots/src/lib/response.ts delete mode 100644 bots/src/lib/rpc.ts delete mode 100644 bots/src/lib/slack.ts delete mode 100644 bots/src/lib/storage.spec.ts delete mode 100644 bots/src/lib/storage.ts delete mode 100644 bots/src/lib/tx.ts delete mode 100644 bots/src/lib/types.ts delete mode 100644 bots/src/lib/util.ts delete mode 100644 bots/src/lib/wallet.ts delete mode 100644 bots/src/loader/app.ts delete mode 100644 bots/src/loader/index.ts delete mode 100644 bots/src/loader/server.ts delete mode 100644 bots/src/orm/CamelToSnakeNamingStrategy.ts delete mode 100644 bots/src/orm/RecordEntity.ts delete mode 100644 bots/src/orm/StateEntity.ts delete mode 100644 bots/src/orm/challenger/ChallengeEntity.ts delete mode 100644 bots/src/orm/challenger/DeletedOutputEntity.ts delete mode 100644 bots/src/orm/challenger/DepositTxEntity.ts delete mode 100644 bots/src/orm/challenger/FinalizeDepositTxEntity.ts delete mode 100644 bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts delete mode 100644 bots/src/orm/challenger/OutputEntity.ts delete mode 100644 bots/src/orm/challenger/WithdrawalTxEntity.ts delete mode 100644 bots/src/orm/executor/DepositTxEntity.ts delete mode 100644 bots/src/orm/executor/OutputEntity.ts delete mode 100644 bots/src/orm/executor/UnconfirmedTxEntity.ts delete mode 100644 bots/src/orm/executor/WithdrawalTxEntity.ts delete mode 100644 bots/src/orm/index.ts delete mode 100644 bots/src/sawgger/batch_model.ts delete mode 100644 bots/src/scripts/setupL2.ts delete mode 100644 bots/src/service/batch/BatchService.ts delete mode 100644 bots/src/service/executor/ClaimTxService.ts delete mode 100644 bots/src/service/executor/DepositTxService.ts delete mode 100644 bots/src/service/executor/OutputService.ts delete mode 100644 bots/src/service/executor/WithdrawalTxService.ts delete mode 100644 bots/src/service/index.ts delete mode 100644 bots/src/swagger/batch_model.ts delete mode 100644 bots/src/swagger/executor_model.ts delete mode 100644 bots/src/swagger/swagger.ts delete mode 100644 bots/src/test/integration.ts delete mode 100644 bots/src/test/utils/Bridge.ts delete mode 100644 bots/src/test/utils/TxBot.ts delete mode 100644 bots/src/test/utils/consts.ts delete mode 100644 bots/src/test/utils/helper.ts delete mode 100644 bots/src/worker/batchSubmitter/batchSubmitter.ts delete mode 100644 bots/src/worker/batchSubmitter/index.ts delete mode 100644 bots/src/worker/bridgeExecutor/Resurrector.ts delete mode 100644 bots/src/worker/bridgeExecutor/db.ts delete mode 100644 bots/src/worker/bridgeExecutor/index.ts delete mode 100644 bots/src/worker/challenger/challenger.ts delete mode 100644 bots/src/worker/challenger/db.ts delete mode 100644 bots/src/worker/challenger/index.ts delete mode 100644 bots/src/worker/challenger/monitor_l1.ts delete mode 100644 bots/src/worker/challenger/monitor_l2.ts delete mode 100644 bots/src/worker/outputSubmitter/db.ts delete mode 100644 bots/src/worker/outputSubmitter/index.ts delete mode 100644 bots/src/worker/outputSubmitter/outputSubmitter.ts delete mode 100644 bots/tsconfig.json delete mode 100644 bots/typedoc.json diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 487e79d7..00000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Docker - -on: - workflow_dispatch: - push: - branches: [ "main" ] - tags: - - "bots-v*" - -env: - REGISTRY: ghcr.io - IMAGE_NAME: opinit - -jobs: - opinit: - name: opinit - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - outputs: - tags: ${{ steps.meta.outputs.tags }} - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} - - - name: Build and push - uses: docker/build-push-action@v4 - with: - context: ./bots - build-args: "GITHUB_ACCESS_TOKEN=${{ secrets.GH_READ_TOKEN }}" - file: bots/Dockerfile - push: ${{ startsWith(github.ref, 'refs/tags') }} # push image only for tags - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/bots/.dockerignore b/bots/.dockerignore deleted file mode 100644 index efb154cc..00000000 --- a/bots/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -.git -.env* \ No newline at end of file diff --git a/bots/.env_sample b/bots/.env_sample deleted file mode 100644 index faca4268..00000000 --- a/bots/.env_sample +++ /dev/null @@ -1,42 +0,0 @@ -# common setting -TYPEORM_CONNECTION=postgres -TYPEORM_HOST=localhost -TYPEORM_USERNAME=username -TYPEORM_PASSWORD=password -TYPEORM_DATABASE=rollup -TYPEORM_PORT=5432 -TYPEORM_SYNCHRONIZE=true -TYPEORM_LOGGING=false -TYPEORM_ENTITIES=src/orm/*Entity.ts -USE_LOG_FILE=false - -L1_CHAIN_ID=local-initia -L2_CHAIN_ID=local-minitia -L1_LCD_URI=http://localhost:1317 -L1_RPC_URI=http://localhost:26657 -L2_LCD_URI=http://localhost:1318 -L2_RPC_URI=http://localhost:26667 -CELESTIA_LIGHT_NODE_RPC_URI=http://127.0.0.1:26658 -CELESTIA_RPC_URI=http://localhost:26667 -CELESTIA_TOKEN_AUTH=eyJ... -CELESTIA_NAMESPACE_ID=00000000000000000000000000000000000000000000000123456789 -PUBLISH_BATCH_TARGET=celestia -BRIDGE_ID=1 - -# setting for slack (optional) -SLACK_WEB_HOOK='' - -# setting for executor -EXECUTOR_MNEMONIC='' -EXECUTOR_PORT=5000 - -# setting for batch -BATCH_SUBMITTER_MNEMONIC='' -BATCH_PORT=5001 - -# setting for output -OUTPUT_SUBMITTER_MNEMONIC='' - -# setting for challenger -CHALLENGER_MNEMONIC='' - diff --git a/bots/.eslintignore b/bots/.eslintignore deleted file mode 100644 index 76add878..00000000 --- a/bots/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -dist \ No newline at end of file diff --git a/bots/.eslintrc.js b/bots/.eslintrc.js deleted file mode 100644 index bbbd375b..00000000 --- a/bots/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - jasmine: true, - }, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - ], - rules: { - '@typescript-eslint/camelcase': 'off', - '@typescript-eslint/no-namespace': 'off', - 'no-inner-declarations': 'off', - 'semi': ['error', 'never'], - '@typescript-eslint/semi': ['error', 'never'], - // TODO: we have to figure out how to use eslint without below rules - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - }, -}; diff --git a/bots/.gitignore b/bots/.gitignore deleted file mode 100644 index 097eb874..00000000 --- a/bots/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.log -.DS_Store - -.idea/ -.vscode/ -coverage/ - -node_modules/ -dist/ -apidoc/ -static/ - -.envrc -.env -.env.* - -build -logs/ -testing/ - -temp* \ No newline at end of file diff --git a/bots/.husky/pre-commit b/bots/.husky/pre-commit deleted file mode 100755 index cf0c46b9..00000000 --- a/bots/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx --no-install lint-staged diff --git a/bots/LICENSE b/bots/LICENSE deleted file mode 100644 index d675d3b4..00000000 --- a/bots/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Terraform Labs, PTE. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/bots/README.md b/bots/README.md deleted file mode 100644 index dc838728..00000000 --- a/bots/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# OPinit Bots - -Initia Optimistic Rollup Bots. - -- Batch Submitter: Submit batch to L1 node -- Output Submitter: Submit output to L1 node -- Challenger: Challenge invalid output -- Bridge Executor: Execute bridge transaction - -## How to use - -### Prerequisites - -- Postgres 14+ -- Node.js 16+ -- Node LCD/RPC (L1 and L2) - -### Step1. Create Bridge - -Before running rollup bots, you should create bridge between L1 and L2. If you use `initia.js`, you can create bridge using `MsgCreateBridge` message as follows. - -```typescript -import { MsgCreateBridge, BridgeConfig, Duration } from '@initia/initia.js'; - -const bridgeConfig = new BridgeConfig( - challenger.key.accAddress, - outputSubmitter.key.accAddress, - new BatchInfo(batchSubmitter.accAddress, config.PUBLISH_BATCH_TARGET), - Duration.fromString(submissionInterval.toString()), - Duration.fromString(finalizedTime.toString()), - new Date(), - this.metadata -); -const msg = new MsgCreateBridge(executor.key.accAddress, bridgeConfig); -``` - -### Step2. Configuration - -You should set `.env` file for each bot in `bots/worker`. To transfer assets between L1 and L2, you should run `executor` and `output submitter` at least. - -> In OPinit bots, we use [.dotenv](https://www.npmjs.com/package/dotenv) for managing environment variable for development. If you want to set `.env` by worker, you should name it as `.env.{WORKER_NAME}` and set `WORKER_NAME` in [`executor`, `output`, `batch`, `challenger`]. -> For example, if you want to set `.env` for `executor`, you should name it as `.env.executor` and set `WORKER_NAME=executor` in local environment. `.env` files should be located in `OPinit/bots` directory. - -- `.env.executor` - -| Name | Description | Default | -| -------------------------- | ------------------------------------------ | ------------------------ | -| L1_LCD_URI | L1 node LCD URI | | -| L1_RPC_URI | L1 node RPC URI | | -| L2_LCD_URI | L2 node LCD URI | | -| L2_RPC_URI | L2 node RPC URI | | -| L2_GAS_PRICES | Gas prices for L2 chain | '0.15umin' | -| BRIDGE_ID | Bridge ID | '' | -| EXECUTOR_PORT | Executor port | 5000 | -| EXECUTOR_MNEMONIC | Mnemonic seed for executor | '' | -| SLACK_WEB_HOOK | Slack web hook for notification (optional) | '' | -| EXECUTOR_L1_MONITOR_HEIGHT | L1 monitor start height (optional) | 0 | -| EXECUTOR_L2_MONITOR_HEIGHT | L2 monitor start height (optional) | 0 | -| ENABLE_API_ONLY | Enable API only mode (optional) | false | - -> Note that if `EXECUTOR_L1_MONITOR_HEIGHT` and `EXECUTOR_L2_MONITOR_HEIGHT` are not set, `executor` will start monitoring from height stored on `state` table. If you want to start monitoring from specific height, you should set them in `.env.executor` file. - -- `.env.output` - -| Name | Description | Default | -| ------------------------- | ------------------------------------------ | ------------------------ | -| L1_LCD_URI | L1 node LCD URI | | -| L1_RPC_URI | L1 node RPC URI | | -| BRIDGE_ID | Bridge ID | '' | -| OUTPUT_SUBMITTER_MNEMONIC | Mnemonic seed for output submitter | '' | -| EXECUTOR_URI | Executor URI | | -| SLACK_WEB_HOOK | Slack web hook for notification (optional) | '' | - -- `.env.batch` - -| Name | Description | Default | -| --------------------------- | ------------------------------------------------------------ | -------------------------- | -| L1_LCD_URI | L1 node LCD URI | | -| L1_RPC_URI | L1 node RPC URI | | -| L2_LCD_URI | L2 node LCD URI | | -| L2_RPC_URI | L2 node RPC URI | | -| BRIDGE_ID | Bridge ID | '' | -| BATCH_PORT | Batch submitter port | 5001 | -| BATCH_SUBMITTER_MNEMONIC | Mnemonic seed for submitter | '' | -| SLACK_WEB_HOOK | Slack web hook for notification (optional) | '' | -| BATCH_CHAIN_ID | DA chain's chain-id | | -| BATCH_CHAIN_RPC_URI | DA chain node RPC URI | L1_RPC_URI if target is l1 | -| BATCH_LCD_URI | DA chain node LCD URI | | -| BATCH_GAS_PRICES | Gas prices for DA chain | | -| BATCH_DENOM | Fee denom for DA chain | | -| CELESTIA_NAMESPACE_ID | Celestia namespace id (optional) | '' | -| PUBLISH_BATCH_TARGET | Target chain to publish batch (supports: ['l1', 'celestia']) | 'l1' | -| ENABLE_API_ONLY | Enable API only mode (optional) | false | - -- `.env.challenger` - -| Name | Description | Default | -| ---------------------- | ------------------------------------------ | ------------------------ | -| L1_LCD_URI | L1 node LCD URI | | -| L1_RPC_URI | L1 node RPC URI | | -| L2_LCD_URI | L2 node LCD URI | | -| L2_RPC_URI | L2 node RPC URI | | -| BRIDGE_ID | Bridge ID | '' | -| CHALLENGER_MNEMONIC | Mnemonic seed for challenger | '' | -| DELETE_OUTPUT_PROPOSAL | Enable delete output proposal instantly | '' | -| SLACK_WEB_HOOK | Slack web hook for notification (optional) | '' | - -### Step3. Run Bots - -- Install dependencies - - ```bash - npm install - ``` - -- Bridge Executor - -Bridge executor is a bot that monitor L1, L2 node and execute bridge transaction. It will execute following steps. - -1. Configure `.env.executor` file -2. Run executor bot - - ```bash - npm run executor - ``` - -- Output Submitter - -Output submitter is the component to store the L2 output root for block finalization. -Output submitter will get the L2 output results from executor and submit it to L1. - -> Before running output submitter, you should set `executor` first. It will get the L2 output results from `executor` and submit it to L1. - -1. Configure `.env.output` file -2. Run output submitter bot - - ```bash - npm run output - ``` - -- Batch Submitter - -Batch submitter is a background process that submits transaction batches to the BatchInbox module of L1 or Celestia. - -> **NOTE** To run celestia batch submitter, you have to set [celestia light node](https://docs.celestia.org/nodes/light-node) - -1. Configure `.env.batch` file -2. Run batch submitter bot - - ```bash - npm run batch - ``` - -- Challenger - -Challenger is an entity capable of deleting invalid output proposals from the output oracle. - -> **NOTE** > `challenger` should be independent from `executor` and `output submitter`. It will monitor the output oracle and delete invalid output proposals. - -1. Configure `.env.challenger` file -2. Run challenger bot - - ```bash - npm run challenger - ``` diff --git a/bots/apidoc-template/index.html b/bots/apidoc-template/index.html deleted file mode 100644 index 1113ac47..00000000 --- a/bots/apidoc-template/index.html +++ /dev/null @@ -1,3330 +0,0 @@ - - - - - Loading... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-

Loading...

-
-
- - - - - - - - diff --git a/bots/dockerfile b/bots/dockerfile deleted file mode 100644 index ee77da49..00000000 --- a/bots/dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM node:20-alpine AS builder -WORKDIR /usr/src/app - -COPY . . - -RUN npm install -RUN npm run build - - -FROM node:20-alpine -WORKDIR /usr/src/app - -COPY --from=builder /usr/src/app/dist ./dist -COPY package*.json ./ -RUN npm install - -COPY entrypoint.sh ./ -RUN ["chmod", "+x", "./entrypoint.sh"] - -EXPOSE 5000 -EXPOSE 5001 - -ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/bots/entrypoint.sh b/bots/entrypoint.sh deleted file mode 100644 index 1571d796..00000000 --- a/bots/entrypoint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -exec npm run $1 \ No newline at end of file diff --git a/bots/jest.config.ts b/bots/jest.config.ts deleted file mode 100644 index bb5c5c08..00000000 --- a/bots/jest.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Config } from '@jest/types'; - -// Jest configuration -const config: Config.InitialOptions = { - roots: ['/src', '/src/test'], - transform: { - '^.+\\.ts?$': 'ts-jest', - }, - testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.ts?$', - moduleFileExtensions: ['ts', 'js', 'json', 'node'], - moduleNameMapper: { - '^graphql$': '/node_modules/graphql', - '^orm/(.*)$': '/src/orm/$1', - }, - modulePaths: ['/src', '/lib'], - moduleDirectories: ['node_modules'], - // collectCoverage: true, - collectCoverageFrom: ['src/**/*.{ts,js}'], - coverageDirectory: 'coverage', - testEnvironment: 'node', - globals: { - 'ts-jest': { - tsconfig: 'tsconfig.json', - }, - }, -}; - -export default config; diff --git a/bots/package-lock.json b/bots/package-lock.json deleted file mode 100644 index 8b6e8364..00000000 --- a/bots/package-lock.json +++ /dev/null @@ -1,12161 +0,0 @@ -{ - "name": "@initia/rollup", - "version": "0.1.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@initia/rollup", - "version": "0.1.1", - "license": "MIT", - "dependencies": { - "@initia/initia.js": "^0.1.41", - "@koa/router": "^12.0.1", - "@sentry/node": "^7.109.0", - "@sideway/address": "^5.0.0", - "@types/dockerode": "^3.3.26", - "@types/pg": "^8.11.4", - "@types/ws": "^8.5.10", - "apidoc": "^1.2.0", - "axios": "^1.6.8", - "bignumber.js": "^9.1.2", - "bluebird": "^3.7.2", - "dockerode": "^4.0.2", - "dotenv": "^16.4.5", - "execa": "^8.0.1", - "joi": "^17.12.3", - "koa": "^2.15.2", - "koa-body": "^6.0.1", - "koa-helmet": "^7.0.2", - "koa-joi-controllers": "^1.2.3", - "koa-joi-router": "^8.0.0", - "koa-morgan": "^1.0.1", - "koa-mount": "^4.0.0", - "koa-router": "^12.0.1", - "koa-static": "^5.0.0", - "koa-swagger-decorator": "^2.2.1", - "merkletreejs": "^0.3.11", - "pako": "^2.1.0", - "pg": "^8.11.5", - "reflect-metadata": "^0.2.2", - "sha3": "^2.1.4", - "testcontainers": "^10.8.1", - "ts-node": "^10.9.2", - "typeorm": "^0.3.20", - "undici": "^6.11.1", - "winston": "^3.13.0", - "winston-daily-rotate-file": "^5.0.0" - }, - "devDependencies": { - "@initia/initia.js": "^0.1.43", - "@koa/cors": "^5.0.0", - "@sentry/node": "^7.109.0", - "@testcontainers/postgresql": "^10.8.1", - "@types/bluebird": "^3.5.42", - "@types/dockerode": "^3.3.26", - "@types/jest": "^29.5.12", - "@types/koa": "^2.15.0", - "@types/koa__cors": "^5.0.0", - "@types/koa-mount": "^4.0.5", - "@types/koa-router": "^7.4.8", - "@types/lodash": "^4.17.0", - "@types/node": "^20.12.3", - "@types/pg": "^8.11.4", - "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", - "apidoc": "^1.2.0", - "apidoc-core": "^0.15.0", - "bignumber.js": "^9.1.2", - "bluebird": "^3.7.2", - "concurrently": "^8.2.2", - "docker-compose": "^0.24.7", - "dockerode": "^4.0.2", - "dotenv": "^16.4.5", - "eslint": "^8.57.0", - "execa": "^8.0.1", - "husky": "^9.0.11", - "jest": "^29.7.0", - "koa": "^2.15.2", - "koa-body": "^6.0.1", - "koa-helmet": "^7.0.2", - "koa-joi-controllers": "^1.2.3", - "koa-morgan": "^1.0.1", - "koa-mount": "^4.0.0", - "koa-router": "^12.0.1", - "koa-static": "^5.0.0", - "lint-staged": "^15.2.2", - "pako": "^2.1.0", - "pg": "^8.11.5", - "prettier": "^3.2.5", - "reflect-metadata": "^0.2.2", - "sha3": "^2.1.4", - "testcontainers": "^10.8.1", - "ts-jest": "^29.1.2", - "ts-loader": "^9.5.1", - "ts-node": "^10.9.2", - "tsconfig-paths": "^4.2.0", - "tsconfig-paths-jest": "^0.0.1", - "tsconfig-paths-webpack-plugin": "^4.1.0", - "typeorm": "^0.3.20", - "typescript": "^5.4.3", - "undici": "^6.11.1", - "webpack": "^5.91.0", - "webpack-bundle-analyzer": "^4.10.1", - "winston": "^3.13.0", - "winston-daily-rotate-file": "^5.0.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@asteasolutions/zod-to-openapi": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@asteasolutions/zod-to-openapi/-/zod-to-openapi-5.5.0.tgz", - "integrity": "sha512-d5HwrvM6dOKr3XdeF+DmashGvfEc+1oiEfbscugsiwSTrFtuMa7ETpW9sTNnVgn+hJaz+PRxPQUYD7q9/5dUig==", - "dependencies": { - "openapi3-ts": "^4.1.2" - }, - "peerDependencies": { - "zod": "^3.20.2" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", - "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", - "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.1", - "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.1", - "@babel/parser": "^7.24.1", - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", - "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.0", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", - "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.23.5", - "@babel/helper-validator-option": "^7.23.5", - "browserslist": "^4.22.2", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.24.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", - "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", - "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", - "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", - "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", - "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", - "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", - "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@balena/dockerignore": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz", - "integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==", - "dev": true - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@colors/colors": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", - "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "dev": true, - "dependencies": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", - "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@ethereumjs/rlp": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", - "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", - "bin": { - "rlp": "bin/rlp" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@ethereumjs/util": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", - "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", - "dependencies": { - "@ethereumjs/rlp": "^4.0.1", - "ethereum-cryptography": "^2.0.0", - "micro-ftch": "^0.3.1" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", - "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==", - "deprecated": "Moved to 'npm install @sideway/address'", - "dev": true - }, - "node_modules/@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", - "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==", - "deprecated": "This version has been deprecated and is no longer supported or maintained", - "dev": true - }, - "node_modules/@hapi/hoek": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-10.0.1.tgz", - "integrity": "sha512-CvlW7jmOhWzuqOqiJQ3rQVLMcREh0eel4IBnxDx2FAcK8g7qoJRQK4L1CPBASoCY6y8e6zuCy3f2g+HWdkzcMw==" - }, - "node_modules/@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", - "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", - "deprecated": "Switch to 'npm install joi'", - "dev": true, - "dependencies": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - }, - "node_modules/@hapi/joi/node_modules/@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==", - "deprecated": "This version has been deprecated and is no longer supported or maintained", - "dev": true - }, - "node_modules/@hapi/joi/node_modules/@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", - "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", - "deprecated": "This version has been deprecated and is no longer supported or maintained", - "dev": true, - "dependencies": { - "@hapi/hoek": "^8.3.0" - } - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@hapi/topo/node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "dev": true - }, - "node_modules/@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", - "dev": true, - "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" - } - }, - "node_modules/@initia/initia.js": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/@initia/initia.js/-/initia.js-0.1.43.tgz", - "integrity": "sha512-yidwLbHp1JTdOC14tsRLeG0ND7EWBBzIwvsyPNrPeeYmgizVRnl8z/SrGferVg0J7muYd2qX0eJmr0McwNcA8g==", - "dev": true, - "dependencies": { - "@initia/initia.proto": "^0.1.32", - "@initia/opinit.proto": "^0.0.6", - "@ledgerhq/hw-transport": "^6.27.12", - "@ledgerhq/hw-transport-webhid": "^6.27.12", - "@ledgerhq/hw-transport-webusb": "^6.27.12", - "@mysten/bcs": "^0.10.1", - "axios": "^1.6.5", - "bech32": "^2.0.0", - "bignumber.js": "^9.1.0", - "bip32": "^2.0.6", - "bip39": "^3.0.4", - "jscrypto": "^1.0.3", - "keccak256": "^1.0.6", - "long": "^5.2.0", - "ripemd160": "^2.0.2", - "secp256k1": "^5.0.0", - "tmp": "^0.2.1", - "ws": "^7.5.9" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@initia/initia.proto": { - "version": "0.1.32", - "resolved": "https://registry.npmjs.org/@initia/initia.proto/-/initia.proto-0.1.32.tgz", - "integrity": "sha512-Ue0Kzrpdg6p5p0EREiYEcBScAr3Dz/QGyrPiJEjrC5SROTHK5vLljPjMUUqkaF5L8NR98wW/8sDgKj3+DmrkuA==", - "dev": true, - "dependencies": { - "@improbable-eng/grpc-web": "^0.15.0", - "google-protobuf": "^3.21.0", - "long": "^5.2.3", - "protobufjs": "^7.1.1" - } - }, - "node_modules/@initia/opinit.proto": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@initia/opinit.proto/-/opinit.proto-0.0.6.tgz", - "integrity": "sha512-Ij7tnOXUHkugOnhAvx8xrqS1/fgUe6y4TIrlHyEwBvTQ2KHFoj/BwrKEIwrliicWJA5n3xxj9K4fxJeIhQWuiw==", - "dev": true, - "dependencies": { - "@improbable-eng/grpc-web": "^0.15.0", - "google-protobuf": "^3.21.0", - "long": "^5.2.0", - "protobufjs": "^7.1.1" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", - "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", - "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/reporters": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.7.0", - "jest-config": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-resolve-dependencies": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "jest-watcher": "^29.7.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/environment": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", - "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", - "dev": true, - "dependencies": { - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", - "dev": true, - "dependencies": { - "expect": "^29.7.0", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", - "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/fake-timers": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", - "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/globals": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", - "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/types": "^29.6.3", - "jest-mock": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", - "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^6.0.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/@jest/schemas": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", - "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", - "dev": true, - "dependencies": { - "@sinclair/typebox": "^0.27.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/source-map": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", - "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-result": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", - "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/test-sequencer": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", - "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/transform": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", - "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.6.3", - "@jridgewell/trace-mapping": "^0.3.18", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/types": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", - "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@koa/cors": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@koa/cors/-/cors-5.0.0.tgz", - "integrity": "sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==", - "dev": true, - "dependencies": { - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@koa/router": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-12.0.1.tgz", - "integrity": "sha512-ribfPYfHb+Uw3b27Eiw6NPqjhIhTpVFzEWLwyc/1Xp+DCdwRRyIlAUODX+9bPARF6aQtUu1+/PHzdNvRzcs/+Q==", - "dependencies": { - "debug": "^4.3.4", - "http-errors": "^2.0.0", - "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.2.1" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@koa/router/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/@koa/router/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/@ledgerhq/devices": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-8.2.2.tgz", - "integrity": "sha512-SKahGA4p0mZ3ovypOJ2wa5mUvUkArE3HBrwWKYf+cRs+t/Licp3OJfhj+DHIxP3AfyH2xR6CFFWECYHeKwGsDQ==", - "dev": true, - "dependencies": { - "@ledgerhq/errors": "^6.16.3", - "@ledgerhq/logs": "^6.12.0", - "rxjs": "^7.8.1", - "semver": "^7.3.5" - } - }, - "node_modules/@ledgerhq/errors": { - "version": "6.16.3", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.16.3.tgz", - "integrity": "sha512-3w7/SJVXOPa9mpzyll7VKoKnGwDD3BzWgN1Nom8byR40DiQvOKjHX+kKQausCedTHVNBn9euzPCNsftZ9+mxfw==", - "dev": true - }, - "node_modules/@ledgerhq/hw-transport": { - "version": "6.30.5", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.30.5.tgz", - "integrity": "sha512-JMl//7BgPBvWxrWyMu82jj6JEYtsQyOyhYtonWNgtxn6KUZWht3gU4gxmLpeIRr+DiS7e50mW7m3GA+EudZmmA==", - "dev": true, - "dependencies": { - "@ledgerhq/devices": "^8.2.2", - "@ledgerhq/errors": "^6.16.3", - "@ledgerhq/logs": "^6.12.0", - "events": "^3.3.0" - } - }, - "node_modules/@ledgerhq/hw-transport-webhid": { - "version": "6.28.5", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.28.5.tgz", - "integrity": "sha512-swRq9xhOQ2w7YCRnBd7pOnniPQOnhSV23dLUKBiQHYbOAGyPRDdNnZSCu0nPmGI+o9VUKAuH953R7z9LIFWegg==", - "dev": true, - "dependencies": { - "@ledgerhq/devices": "^8.2.2", - "@ledgerhq/errors": "^6.16.3", - "@ledgerhq/hw-transport": "^6.30.5", - "@ledgerhq/logs": "^6.12.0" - } - }, - "node_modules/@ledgerhq/hw-transport-webusb": { - "version": "6.28.5", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-6.28.5.tgz", - "integrity": "sha512-93mye+T/deqwYfJV89iTqoLxJY6zXhT57vLTWUkae0s1S9n7Lj53KNWCOGVqdlq9DMY2qGrtnAw3V0xtfgsLXw==", - "dev": true, - "dependencies": { - "@ledgerhq/devices": "^8.2.2", - "@ledgerhq/errors": "^6.16.3", - "@ledgerhq/hw-transport": "^6.30.5", - "@ledgerhq/logs": "^6.12.0" - } - }, - "node_modules/@ledgerhq/logs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.12.0.tgz", - "integrity": "sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==", - "dev": true - }, - "node_modules/@mysten/bcs": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-0.10.1.tgz", - "integrity": "sha512-cQDb7Rhz2J82ZqgVQiHykuwKUlgiLWS2bjoajPPW0uvXlb75qrgKuaxh1UzsaRhHy3egk/APc0xjiZoqdbzB4w==", - "dev": true, - "dependencies": { - "bs58": "^5.0.0" - } - }, - "node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/curves/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "dev": true, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.25", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", - "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", - "dev": true - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "dev": true - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "dev": true - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "dev": true - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "dev": true - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dev": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "dev": true - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "dev": true - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "dev": true - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "dev": true - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "dev": true - }, - "node_modules/@scure/base": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.6.tgz", - "integrity": "sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip32/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", - "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/bip39/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@sentry-internal/tracing": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.109.0.tgz", - "integrity": "sha512-PzK/joC5tCuh2R/PRh+7dp+uuZl7pTsBIjPhVZHMTtb9+ls65WkdZJ1/uKXPouyz8NOo9Xok7aEvEo9seongyw==", - "dev": true, - "dependencies": { - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/core": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.109.0.tgz", - "integrity": "sha512-xwD4U0IlvvlE/x/g/W1I8b4Cfb16SsCMmiEuBf6XxvAa3OfWBxKoqLifb3GyrbxMC4LbIIZCN/SvLlnGJPgszA==", - "dev": true, - "dependencies": { - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.109.0.tgz", - "integrity": "sha512-tqMNAES4X/iBl1eZRCmc29p//0id01FBLEiesNo5nk6ECl6/SaGMFAEwu1gsn90h/Bjgr04slwFOS4cR45V2PQ==", - "dev": true, - "dependencies": { - "@sentry-internal/tracing": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/types": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.109.0.tgz", - "integrity": "sha512-egCBnDv3YpVFoNzRLdP0soVrxVLCQ+rovREKJ1sw3rA2/MFH9WJ+DZZexsX89yeAFzy1IFsCp7/dEqudusml6g==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/utils": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.109.0.tgz", - "integrity": "sha512-3RjxMOLMBwZ5VSiH84+o/3NY2An4Zldjz0EbfEQNRY9yffRiCPJSQiCJID8EoylCFOh/PAhPimBhqbtWJxX6iw==", - "dev": true, - "dependencies": { - "@sentry/types": "7.109.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sideway/address": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-5.0.0.tgz", - "integrity": "sha512-IEZ3Gi972M1yubSPhcpzpVTT/Vb46F9L0W+K/GhqvWv6aAvVbNNVsYFekXWEemHHFfTVrxFcURrzsPGPPKkxKQ==", - "dependencies": { - "@hapi/hoek": "^10.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" - }, - "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, - "node_modules/@sqltools/formatter": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", - "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==", - "dev": true - }, - "node_modules/@testcontainers/postgresql": { - "version": "10.8.1", - "resolved": "https://registry.npmjs.org/@testcontainers/postgresql/-/postgresql-10.8.1.tgz", - "integrity": "sha512-/9zlwfjK6l6iGo1gWQVO/bly4CsikM6Z9UVjkcKlPvzfzkfMr//eeUbDiHTDPu3tB0Idakqany4V5S4LIgz38A==", - "dev": true, - "dependencies": { - "testcontainers": "^10.8.1" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, - "node_modules/@types/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.6.8", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", - "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", - "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.7" - } - }, - "node_modules/@types/bluebird": { - "version": "3.5.42", - "resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz", - "integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==", - "dev": true - }, - "node_modules/@types/body-parser": { - "version": "1.19.5", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", - "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/co-body": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@types/co-body/-/co-body-6.1.3.tgz", - "integrity": "sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/content-disposition": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.8.tgz", - "integrity": "sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg==" - }, - "node_modules/@types/cookies": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.9.0.tgz", - "integrity": "sha512-40Zk8qR147RABiQ7NQnBzWzDcjKzNrntB5BAmeGCb2p/MIyOE+4BVvc17wumsUqUw00bJYqoXFHYygQnEFh4/Q==", - "dependencies": { - "@types/connect": "*", - "@types/express": "*", - "@types/keygrip": "*", - "@types/node": "*" - } - }, - "node_modules/@types/docker-modem": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/docker-modem/-/docker-modem-3.0.6.tgz", - "integrity": "sha512-yKpAGEuKRSS8wwx0joknWxsmLha78wNMe9R2S3UNsVOkZded8UqOrV8KoeDXoXsjndxwyF3eIhyClGbO1SEhEg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/ssh2": "*" - } - }, - "node_modules/@types/dockerode": { - "version": "3.3.26", - "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-3.3.26.tgz", - "integrity": "sha512-/K+I9bGhRO2SvyIHisGeOsy/ypxnWLz8+Rde9S2tNNEKa3r91e0XMYIEq2D+kb7srm7xrmpAR0CDKfXoZOr4OA==", - "dev": true, - "dependencies": { - "@types/docker-modem": "*", - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "8.56.7", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.7.tgz", - "integrity": "sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "node_modules/@types/express": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", - "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.43", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz", - "integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/formidable": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.6.tgz", - "integrity": "sha512-L4HcrA05IgQyNYJj6kItuIkXrInJvsXTPC5B1i64FggWKKqSL+4hgt7asiSNva75AoLQjq29oPxFfU4GAQ6Z2w==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", - "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-assert": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.5.tgz", - "integrity": "sha512-4+tE/lwdAahgZT1g30Jkdm9PzFRde0xwxBNUyRsCitRvCQB90iuA2uJYdUnhnANRcqGXaWOGY4FEoxeElNAK2g==" - }, - "node_modules/@types/http-errors": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", - "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==" - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", - "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-coverage": "*" - } - }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", - "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", - "dev": true, - "dependencies": { - "@types/istanbul-lib-report": "*" - } - }, - "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", - "dev": true, - "dependencies": { - "expect": "^29.0.0", - "pretty-format": "^29.0.0" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/keygrip": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.6.tgz", - "integrity": "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==" - }, - "node_modules/@types/koa": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.15.0.tgz", - "integrity": "sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==", - "dependencies": { - "@types/accepts": "*", - "@types/content-disposition": "*", - "@types/cookies": "*", - "@types/http-assert": "*", - "@types/http-errors": "*", - "@types/keygrip": "*", - "@types/koa-compose": "*", - "@types/node": "*" - } - }, - "node_modules/@types/koa__cors": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/koa__cors/-/koa__cors-5.0.0.tgz", - "integrity": "sha512-LCk/n25Obq5qlernGOK/2LUwa/2YJb2lxHUkkvYFDOpLXlVI6tKcdfCHRBQnOY4LwH6el5WOLs6PD/a8Uzau6g==", - "dev": true, - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/koa__router": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/@types/koa__router/-/koa__router-12.0.4.tgz", - "integrity": "sha512-Y7YBbSmfXZpa/m5UGGzb7XadJIRBRnwNY9cdAojZGp65Cpe5MAP3mOZE7e3bImt8dfKS4UFcR16SLH8L/z7PBw==", - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/koa-compose": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.8.tgz", - "integrity": "sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==", - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/koa-mount": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/koa-mount/-/koa-mount-4.0.5.tgz", - "integrity": "sha512-pV1njJ7r94iqAFzT9D5sGSYKUHFGudCLAnmr4WFli7V5tJf5MAgRQK9leTPJ4gjvgr+hnTf86fZsKoFN358c7w==", - "dev": true, - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/koa-router": { - "version": "7.4.8", - "resolved": "https://registry.npmjs.org/@types/koa-router/-/koa-router-7.4.8.tgz", - "integrity": "sha512-SkWlv4F9f+l3WqYNQHnWjYnyTxYthqt8W9az2RTdQW7Ay8bc00iRZcrb8MC75iEfPqnGcg2csEl8tTG1NQPD4A==", - "dev": true, - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/lodash": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.0.tgz", - "integrity": "sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==", - "dev": true - }, - "node_modules/@types/mime": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==" - }, - "node_modules/@types/node": { - "version": "20.12.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.3.tgz", - "integrity": "sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/pg": { - "version": "8.11.4", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.4.tgz", - "integrity": "sha512-yw3Bwbda6vO+NvI1Ue/YKOwtl31AYvvd/e73O3V4ZkNzuGpTDndLSyc0dQRB2xrQqDePd20pEGIfqSp/GH3pRw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "pg-protocol": "*", - "pg-types": "^4.0.1" - } - }, - "node_modules/@types/qs": { - "version": "6.9.14", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", - "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==" - }, - "node_modules/@types/range-parser": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==" - }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, - "node_modules/@types/send": { - "version": "0.17.4", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", - "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.7", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", - "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", - "dependencies": { - "@types/http-errors": "*", - "@types/node": "*", - "@types/send": "*" - } - }, - "node_modules/@types/ssh2": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-1.15.0.tgz", - "integrity": "sha512-YcT8jP5F8NzWeevWvcyrrLB3zcneVjzYY9ZDSMAMboI+2zR1qYWFhwsyOFVzT7Jorn67vqxC0FRiw8YyG9P1ww==", - "dev": true, - "dependencies": { - "@types/node": "^18.11.18" - } - }, - "node_modules/@types/ssh2-streams": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/@types/ssh2-streams/-/ssh2-streams-0.1.12.tgz", - "integrity": "sha512-Sy8tpEmCce4Tq0oSOYdfqaBpA3hDM8SoxoFh5vzFsu2oL+znzGz8oVWW7xb4K920yYMUY+PIG31qZnFMfPWNCg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/ssh2/node_modules/@types/node": { - "version": "18.19.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.29.tgz", - "integrity": "sha512-5pAX7ggTmWZdhUrhRWLPf+5oM7F80bcKVCBbr0zwEkTNzTJL2CWQjznpFgHYy6GrzkYi2Yjy7DHKoynFxqPV8g==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", - "dev": true - }, - "node_modules/@types/triple-beam": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", - "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", - "dev": true - }, - "node_modules/@types/ws": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", - "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", - "dev": true, - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz", - "integrity": "sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.5.0", - "@typescript-eslint/type-utils": "7.5.0", - "@typescript-eslint/utils": "7.5.0", - "@typescript-eslint/visitor-keys": "7.5.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.4", - "natural-compare": "^1.4.0", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.5.0.tgz", - "integrity": "sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "7.5.0", - "@typescript-eslint/types": "7.5.0", - "@typescript-eslint/typescript-estree": "7.5.0", - "@typescript-eslint/visitor-keys": "7.5.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz", - "integrity": "sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.5.0", - "@typescript-eslint/visitor-keys": "7.5.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz", - "integrity": "sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "7.5.0", - "@typescript-eslint/utils": "7.5.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", - "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", - "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.5.0", - "@typescript-eslint/visitor-keys": "7.5.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.5.0.tgz", - "integrity": "sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.12", - "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.5.0", - "@typescript-eslint/types": "7.5.0", - "@typescript-eslint/typescript-estree": "7.5.0", - "semver": "^7.5.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", - "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.5.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/apidoc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/apidoc/-/apidoc-1.2.0.tgz", - "integrity": "sha512-Qagoj7QnqNHbDUDNpU21eLP4hJSAXn6knHtEjRYWTlSEmpYDGSQijejyFXaWGByhfryW8B1gL+6B57UB/F1lxw==", - "dev": true, - "os": [ - "darwin", - "freebsd", - "linux", - "openbsd", - "win32" - ], - "dependencies": { - "bootstrap": "3.4.1", - "commander": "^10.0.0", - "diff-match-patch": "^1.0.5", - "esbuild-loader": "^2.16.0", - "expose-loader": "^4.0.0", - "fs-extra": "^11.0.0", - "glob": "^7.2.0", - "handlebars": "^4.7.7", - "iconv-lite": "^0.6.3", - "jquery": "^3.6.0", - "klaw-sync": "^6.0.0", - "lodash": "^4.17.21", - "markdown-it": "^12.2.0", - "nodemon": "^3.0.1", - "prismjs": "^1.25.0", - "semver": "^7.5.0", - "style-loader": "^3.3.1", - "webpack": "^5.64.2", - "webpack-cli": "^4.9.1", - "winston": "^3.3.3" - }, - "bin": { - "apidoc": "bin/apidoc" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/apidoc-core": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/apidoc-core/-/apidoc-core-0.15.0.tgz", - "integrity": "sha512-CJNjRs6R8nc774vUtbv9Uakos5/JbEFpBXgE6oiWUX7OpjI1s04xPuULEoQQJyQM427r5hr55GSHAm5/LRc5TQ==", - "dev": true, - "dependencies": { - "fs-extra": "^9.0.1", - "glob": "^7.1.6", - "iconv-lite": "^0.6.2", - "klaw-sync": "^6.0.0", - "lodash": "^4.17.20", - "semver": "~7.3.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/apidoc-core/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/apidoc-core/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/apidoc-core/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/apidoc-core/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/app-root-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", - "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", - "dev": true, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/archiver": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", - "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", - "dev": true, - "dependencies": { - "archiver-utils": "^2.1.0", - "async": "^3.2.4", - "buffer-crc32": "^0.2.1", - "readable-stream": "^3.6.0", - "readdir-glob": "^1.1.2", - "tar-stream": "^2.2.0", - "zip-stream": "^4.1.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/archiver-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", - "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", - "dev": true, - "dependencies": { - "glob": "^7.1.4", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^2.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/archiver-utils/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/archiver-utils/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/archiver-utils/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", - "dev": true - }, - "node_modules/async-lock": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", - "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/await-busboy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/await-busboy/-/await-busboy-1.0.3.tgz", - "integrity": "sha512-u2TaZLepph/OHrJZgD/qu0vMFl17ahkTz4HJYbnaRLqJX6q1x8SMbFNV1nJnIYRbUr3jyHuTwaCN0hIKfMA8YA==", - "dependencies": { - "black-hole-stream": "0.0.1", - "busboy": "0.3.0" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/b4a": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", - "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==", - "dev": true - }, - "node_modules/babel-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", - "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", - "dev": true, - "dependencies": { - "@jest/transform": "^29.7.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.6.3", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.8.0" - } - }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", - "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", - "dev": true, - "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/babel-preset-jest": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", - "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", - "dev": true, - "dependencies": { - "babel-plugin-jest-hoist": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bare-events": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.2.tgz", - "integrity": "sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==", - "dev": true, - "optional": true - }, - "node_modules/bare-fs": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.2.2.tgz", - "integrity": "sha512-X9IqgvyB0/VA5OZJyb5ZstoN62AzD7YxVGog13kkfYWYqJYcK0kcqLZ6TrmH5qr4/8//ejVcX4x/a0UvaogXmA==", - "dev": true, - "optional": true, - "dependencies": { - "bare-events": "^2.0.0", - "bare-os": "^2.0.0", - "bare-path": "^2.0.0", - "streamx": "^2.13.0" - } - }, - "node_modules/bare-os": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.2.1.tgz", - "integrity": "sha512-OwPyHgBBMkhC29Hl3O4/YfxW9n7mdTr2+SsO29XBWKKJsbgj3mnorDB80r5TiCQgQstgE5ga1qNYrpes6NvX2w==", - "dev": true, - "optional": true - }, - "node_modules/bare-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.0.tgz", - "integrity": "sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw==", - "dev": true, - "optional": true, - "dependencies": { - "bare-os": "^2.1.0" - } - }, - "node_modules/base-x": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", - "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/basic-auth/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", - "dev": true - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bip32": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", - "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", - "dev": true, - "dependencies": { - "@types/node": "10.12.18", - "bs58check": "^2.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "tiny-secp256k1": "^1.1.3", - "typeforce": "^1.11.5", - "wif": "^2.0.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/bip32/node_modules/@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", - "dev": true - }, - "node_modules/bip39": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", - "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", - "dev": true, - "dependencies": { - "@noble/hashes": "^1.2.0" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/black-hole-stream": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/black-hole-stream/-/black-hole-stream-0.0.1.tgz", - "integrity": "sha512-FQSWhFQZmddoqWkwPMFeR5hJo9waZE796MuO7b0poStaPrm0Qr2em9FT4/TF1+0rOA1dRFabX+88rdX8YHxDTA==" - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, - "node_modules/bootstrap": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", - "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "node_modules/browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==", - "dev": true - }, - "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dev": true, - "dependencies": { - "base-x": "^4.0.0" - } - }, - "node_modules/bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", - "dev": true, - "dependencies": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/bs58check/node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/bs58check/node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", - "dev": true, - "dependencies": { - "base-x": "^3.0.2" - } - }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/buffer-reverse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", - "integrity": "sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==" - }, - "node_modules/buildcheck": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz", - "integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==", - "dev": true, - "optional": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/busboy": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.3.0.tgz", - "integrity": "sha512-e+kzZRAbbvJPLjQz2z+zAyr78BSi9IFeBTyLwF76g78Q2zRt/RZ1NtS3MS17v2yLqYfLz69zHdC+1L4ja8PwqQ==", - "dependencies": { - "dicer": "0.3.0" - }, - "engines": { - "node": ">=4.5.0" - } - }, - "node_modules/byline": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", - "integrity": "sha512-s6webAy+R4SR8XVuJWt2V2rGvhnrhxN+9S15GNuTK3wKPOXFF6RNc+8ug2XhH+2s4f+uudG4kUVYmYOQWL2g0Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cache-content-type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", - "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", - "dependencies": { - "mime-types": "^2.1.18", - "ylru": "^1.2.0" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001605", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", - "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", - "dev": true - }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "dev": true, - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", - "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cli-highlight/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/cli-highlight/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cli-highlight/node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/cli-truncate": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/clone-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/co-body": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.1.0.tgz", - "integrity": "sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==", - "dev": true, - "dependencies": { - "inflation": "^2.0.0", - "qs": "^6.5.2", - "raw-body": "^2.3.3", - "type-is": "^1.6.16" - } - }, - "node_modules/collect-v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", - "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", - "dev": true - }, - "node_modules/color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dev": true, - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/color/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, - "node_modules/colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "dev": true, - "dependencies": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/compress-commons": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", - "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", - "dev": true, - "dependencies": { - "buffer-crc32": "^0.2.13", - "crc32-stream": "^4.0.2", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concurrently": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz", - "integrity": "sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "date-fns": "^2.30.0", - "lodash": "^4.17.21", - "rxjs": "^7.8.1", - "shell-quote": "^1.8.1", - "spawn-command": "0.0.2", - "supports-color": "^8.1.1", - "tree-kill": "^1.2.2", - "yargs": "^17.7.2" - }, - "bin": { - "conc": "dist/bin/concurrently.js", - "concurrently": "dist/bin/concurrently.js" - }, - "engines": { - "node": "^14.13.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/cookies": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.9.1.tgz", - "integrity": "sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==", - "dependencies": { - "depd": "~2.0.0", - "keygrip": "~1.1.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "node_modules/cpu-features": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz", - "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "dependencies": { - "buildcheck": "~0.0.6", - "nan": "^2.17.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "dev": true, - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/crc32-stream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", - "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", - "dev": true, - "dependencies": { - "crc-32": "^1.2.0", - "readable-stream": "^3.4.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-js": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" - }, - "node_modules/date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.21.0" - }, - "engines": { - "node": ">=0.11" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/date-fns" - } - }, - "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==", - "dev": true - }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dedent": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", - "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, - "peerDependencies": { - "babel-plugin-macros": "^3.1.0" - }, - "peerDependenciesMeta": { - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==" - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/dezalgo": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", - "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", - "dev": true, - "dependencies": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, - "node_modules/dicer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz", - "integrity": "sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA==", - "dependencies": { - "streamsearch": "0.1.2" - }, - "engines": { - "node": ">=4.5.0" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diff-match-patch": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", - "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==", - "dev": true - }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/docker-compose": { - "version": "0.24.7", - "resolved": "https://registry.npmjs.org/docker-compose/-/docker-compose-0.24.7.tgz", - "integrity": "sha512-CdHl9n0S4+bl4i6MaxDQHNjqB1FdvuDirrDTzPKmdiMpheQqCjgsny0GZ2VhvN7qHTY0833lRlKWZgrkn1i6cg==", - "dev": true, - "dependencies": { - "yaml": "^2.2.2" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/docker-modem": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.3.tgz", - "integrity": "sha512-89zhop5YVhcPEt5FpUFGr3cDyceGhq/F9J+ZndQ4KfqNvfbJpPMfgeixFgUj5OjCYAboElqODxY5Z1EBsSa6sg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "readable-stream": "^3.5.0", - "split-ca": "^1.0.1", - "ssh2": "^1.15.0" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/dockerode": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.2.tgz", - "integrity": "sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w==", - "dev": true, - "dependencies": { - "@balena/dockerignore": "^1.0.2", - "docker-modem": "^5.0.3", - "tar-fs": "~2.0.1" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "node_modules/electron-to-chromium": { - "version": "1.4.724", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.724.tgz", - "integrity": "sha512-RTRvkmRkGhNBPPpdrgtDKvmOEYTrPlXDfc0J/Nfq5s29tEahAwhiX4mmhNzj6febWMleulxVYPh7QwCSL/EldA==", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", - "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, - "node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", - "dev": true - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", - "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/envinfo": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.1.tgz", - "integrity": "sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz", - "integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==", - "dev": true - }, - "node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "node_modules/esbuild-loader": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/esbuild-loader/-/esbuild-loader-2.21.0.tgz", - "integrity": "sha512-k7ijTkCT43YBSZ6+fBCW1Gin7s46RrJ0VQaM8qA7lq7W+OLsGgtLyFV8470FzYi/4TeDexniTBTPTwZUnXXR5g==", - "dev": true, - "dependencies": { - "esbuild": "^0.16.17", - "joycon": "^3.0.1", - "json5": "^2.2.0", - "loader-utils": "^2.0.0", - "tapable": "^2.2.0", - "webpack-sources": "^1.4.3" - }, - "funding": { - "url": "https://github.com/privatenumber/esbuild-loader?sponsor=1" - }, - "peerDependencies": { - "webpack": "^4.40.0 || ^5.0.0" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", - "dependencies": { - "js-sha3": "^0.8.0" - } - }, - "node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", - "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" - } - }, - "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", - "dependencies": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/ethjs-unit/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" - }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", - "dev": true - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", - "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/expose-loader": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-4.1.0.tgz", - "integrity": "sha512-oLAesnzerwDGGADzBMnu0LPqqnlVz6e2V9lTa+/4X6VeW9W93x/nJpw05WBrcIdbqXm/EdnEQpiVDFFiQXuNfg==", - "dev": true, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", - "dev": true - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-stream-rotator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz", - "integrity": "sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ==", - "dev": true, - "dependencies": { - "moment": "^2.29.1" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true - }, - "node_modules/flatten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", - "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", - "deprecated": "flatten is deprecated in favor of utility frameworks such as lodash." - }, - "node_modules/fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/formidable": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", - "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", - "dev": true, - "dependencies": { - "dezalgo": "^1.0.4", - "hexoid": "^1.0.0", - "once": "^1.4.0", - "qs": "^6.11.0" - }, - "funding": { - "url": "https://ko-fi.com/tunnckoCore/commissions" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-port": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz", - "integrity": "sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/google-protobuf": { - "version": "3.21.2", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", - "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==", - "dev": true - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/helmet": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-6.2.0.tgz", - "integrity": "sha512-DWlwuXLLqbrIOltR6tFQXShj/+7Cyp0gLi6uAb8qMdFh/YBBFbKSgQ6nbXmScYd8emMctuthmgIa7tUfo9Rtyg==", - "dev": true, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/hexoid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", - "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/http-assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", - "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", - "dependencies": { - "deep-equal": "~1.0.1", - "http-errors": "~1.8.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/husky": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", - "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", - "dev": true, - "bin": { - "husky": "bin.mjs" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/typicode" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflation": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.1.0.tgz", - "integrity": "sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", - "dev": true, - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-gen-fn": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/is-gen-fn/-/is-gen-fn-0.0.2.tgz", - "integrity": "sha512-91r8WjLryj99tZdMFjaZuqB52PgWQch84yeohY1GSrUxMnJqckwpdL7qwmv3Qxxsy9KOybiyP3/PXDeoK4Zy7w==", - "dev": true - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-type-of": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-type-of/-/is-type-of-2.1.0.tgz", - "integrity": "sha512-hpTq+/nL0hPfmbMyee2mUmvAWoOhQz3s61E1gEAMq3spmJfYky2hwYDRkdZBfeGHB69RrH6sH+e4XB8pyqd6CA==" - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", - "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", - "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/types": "^29.6.3", - "import-local": "^3.0.2", - "jest-cli": "^29.7.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", - "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-changed-files/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/jest-changed-files/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/jest-changed-files/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-changed-files/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-changed-files/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-changed-files/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/jest-changed-files/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^1.0.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.7.0", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.7.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", - "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", - "dev": true, - "dependencies": { - "@jest/core": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "create-jest": "^29.7.0", - "exit": "^0.1.2", - "import-local": "^3.0.2", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", - "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-jest": "^29.7.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-runner": "^29.7.0", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", - "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", - "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", - "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "jest-util": "^29.7.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", - "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-mock": "^29.7.0", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", - "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", - "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.6.3", - "jest-util": "^29.7.0", - "jest-worker": "^29.7.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", - "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", - "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", - "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.6.3", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", - "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "jest-util": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", - "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", - "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.7.0", - "jest-validate": "^29.7.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", - "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", - "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", - "dev": true, - "dependencies": { - "@jest/console": "^29.7.0", - "@jest/environment": "^29.7.0", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.7.0", - "jest-environment-node": "^29.7.0", - "jest-haste-map": "^29.7.0", - "jest-leak-detector": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-resolve": "^29.7.0", - "jest-runtime": "^29.7.0", - "jest-util": "^29.7.0", - "jest-watcher": "^29.7.0", - "jest-worker": "^29.7.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", - "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/fake-timers": "^29.7.0", - "@jest/globals": "^29.7.0", - "@jest/source-map": "^29.6.3", - "@jest/test-result": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-mock": "^29.7.0", - "jest-regex-util": "^29.6.3", - "jest-resolve": "^29.7.0", - "jest-snapshot": "^29.7.0", - "jest-util": "^29.7.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", - "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", - "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.6.3", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.6.3", - "leven": "^3.1.0", - "pretty-format": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", - "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.7.0", - "@jest/types": "^29.6.3", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.7.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.7.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/joi": { - "version": "17.12.3", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.3.tgz", - "integrity": "sha512-2RRziagf555owrm9IRVtdKynOBeITiDpuZqIpgwqXShPncPKNiRQoiGsl/T8SQdq+8ugRzH2LqY67irr2y/d+g==", - "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", - "@sideway/pinpoint": "^2.0.0" - } - }, - "node_modules/joi/node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" - }, - "node_modules/joi/node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/joycon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", - "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/jquery": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", - "dev": true - }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jscrypto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/jscrypto/-/jscrypto-1.0.3.tgz", - "integrity": "sha512-lryZl0flhodv4SZHOqyb1bx5sKcJxj0VBo0Kzb4QMAg3L021IC9uGpl0RCZa+9KJwlRGSK2C80ITcwbe19OKLQ==", - "dev": true, - "bin": { - "jscrypto": "bin/cli.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/keccak": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", - "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/keccak/node_modules/node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true - }, - "node_modules/keccak256": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/keccak256/-/keccak256-1.0.6.tgz", - "integrity": "sha512-8GLiM01PkdJVGUhR1e6M/AvWnSqYS0HaERI+K/QtStGDGlSTx2B1zTqZk4Zlqu5TxHJNTxWAdP9Y+WI50OApUw==", - "dev": true, - "dependencies": { - "bn.js": "^5.2.0", - "buffer": "^6.0.3", - "keccak": "^3.0.2" - } - }, - "node_modules/keygrip": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", - "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", - "dependencies": { - "tsscmp": "1.0.6" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/klaw-sync": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", - "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/koa": { - "version": "2.15.2", - "resolved": "https://registry.npmjs.org/koa/-/koa-2.15.2.tgz", - "integrity": "sha512-MXTeZH3M6AJ8ukW2QZ8wqO3Dcdfh2WRRmjCBkEP+NhKNCiqlO5RDqHmSnsyNrbRJrdjyvIGSJho4vQiWgQJSVA==", - "dependencies": { - "accepts": "^1.3.5", - "cache-content-type": "^1.0.0", - "content-disposition": "~0.5.2", - "content-type": "^1.0.4", - "cookies": "~0.9.0", - "debug": "^4.3.2", - "delegates": "^1.0.0", - "depd": "^2.0.0", - "destroy": "^1.0.4", - "encodeurl": "^1.0.2", - "escape-html": "^1.0.3", - "fresh": "~0.5.2", - "http-assert": "^1.3.0", - "http-errors": "^1.6.3", - "is-generator-function": "^1.0.7", - "koa-compose": "^4.1.0", - "koa-convert": "^2.0.0", - "on-finished": "^2.3.0", - "only": "~0.0.2", - "parseurl": "^1.3.2", - "statuses": "^1.5.0", - "type-is": "^1.6.16", - "vary": "^1.1.2" - }, - "engines": { - "node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4" - } - }, - "node_modules/koa-body": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/koa-body/-/koa-body-6.0.1.tgz", - "integrity": "sha512-M8ZvMD8r+kPHy28aWP9VxL7kY8oPWA+C7ZgCljrCMeaU7uX6wsIQgDHskyrAr9sw+jqnIXyv4Mlxri5R4InIJg==", - "dev": true, - "dependencies": { - "@types/co-body": "^6.1.0", - "@types/formidable": "^2.0.5", - "@types/koa": "^2.13.5", - "co-body": "^6.1.0", - "formidable": "^2.0.1", - "zod": "^3.19.1" - } - }, - "node_modules/koa-compose": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", - "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" - }, - "node_modules/koa-convert": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz", - "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==", - "dependencies": { - "co": "^4.6.0", - "koa-compose": "^4.1.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/koa-helmet": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/koa-helmet/-/koa-helmet-7.0.2.tgz", - "integrity": "sha512-AvzS6VuEfFgbAm0mTUnkk/BpMarMcs5A56g+f0sfrJ6m63wII48d2GDrnUQGp0Nj+RR950vNtgqXm9UJSe7GOg==", - "dev": true, - "dependencies": { - "helmet": "^6.0.1" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/koa-joi-controllers": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/koa-joi-controllers/-/koa-joi-controllers-1.2.3.tgz", - "integrity": "sha512-4hNacPoVfuA3pLaBdqCDNb2KPk48dkNsriu1wV944k3+4iT9C4sxx9qE9mQBLXacZ5WaFLZ4vWleg2F8JhqlSw==", - "dev": true, - "dependencies": { - "koa-joi-router": "^6.0.2" - } - }, - "node_modules/koa-joi-controllers/node_modules/@koa/router": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-8.0.2.tgz", - "integrity": "sha512-7Wa8yXBmz9HjmZOr+xfMVuxFPNObdkiQFBiwF9SQ8zFqHykwBHcJA/mLqqxU2NKoeXRPBKUOPeOjwgR+gyadcA==", - "deprecated": "**IMPORTANT 10x+ PERFORMANCE UPGRADE**: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see https://github.com/koajs/router/pull/173", - "dev": true, - "dependencies": { - "debug": "^3.1.0", - "http-errors": "^1.3.1", - "koa-compose": "^3.0.0", - "methods": "^1.0.1", - "path-to-regexp": "^1.1.1", - "urijs": "^1.19.0" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/koa-joi-controllers/node_modules/@koa/router/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/koa-joi-controllers/node_modules/co-body": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.0.0.tgz", - "integrity": "sha512-9ZIcixguuuKIptnY8yemEOuhb71L/lLf+Rl5JfJEUiDNJk0e02MBt7BPxR2GEh5mw8dPthQYR4jPI/BnS1MQgw==", - "dev": true, - "dependencies": { - "inflation": "^2.0.0", - "qs": "^6.5.2", - "raw-body": "^2.3.3", - "type-is": "^1.6.16" - } - }, - "node_modules/koa-joi-controllers/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/koa-joi-controllers/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/koa-joi-controllers/node_modules/koa-compose": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-3.2.1.tgz", - "integrity": "sha512-8gen2cvKHIZ35eDEik5WOo8zbVp9t4cP8p4hW4uE55waxolLRexKKrqfCpwhGVppnB40jWeF8bZeTVg99eZgPw==", - "dev": true, - "dependencies": { - "any-promise": "^1.1.0" - } - }, - "node_modules/koa-joi-controllers/node_modules/koa-joi-router": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/koa-joi-router/-/koa-joi-router-6.0.2.tgz", - "integrity": "sha512-XgHC7veI10SZP24ZO1fnAEfC2l1BVTyykGUfAR2b2Bn+mFfAmNxmyZWe07O9pt8uKzw+MW1O0tgCoKlEz79Flw==", - "dev": true, - "dependencies": { - "@hapi/joi": "15.1.1", - "@koa/router": "8.0.2", - "await-busboy": "1.0.3", - "clone": "2.1.2", - "co-body": "6.0.0", - "debug": "4.1.1", - "delegates": "1.0.0", - "flatten": "1.0.3", - "is-gen-fn": "0.0.1", - "methods": "1.1.2", - "sliced": "1.0.1" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/koa-joi-controllers/node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/koa-joi-router": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/koa-joi-router/-/koa-joi-router-8.0.0.tgz", - "integrity": "sha512-y/qdcy6zlh5HbwbJwbXyUcJ7zATa1BZnUjlEtTgxmHhADAIsd5fu0eZUeejE1qOZXc1QuDNmz5LpTRM5a3MnRQ==", - "dependencies": { - "@koa/router": "^10.0.0", - "await-busboy": "1.0.3", - "clone": "2.1.2", - "co-body": "6.0.0", - "debug": "4.1.1", - "delegates": "1.0.0", - "flatten": "1.0.3", - "is-gen-fn": "0.0.1", - "joi": "^17.2.1", - "methods": "1.1.2", - "sliced": "1.0.1" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/koa-joi-router/node_modules/@koa/router": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-10.1.1.tgz", - "integrity": "sha512-ORNjq5z4EmQPriKbR0ER3k4Gh7YGNhWDL7JBW+8wXDrHLbWYKYSJaOJ9aN06npF5tbTxe2JBOsurpJDAvjiXKw==", - "deprecated": "**IMPORTANT 10x+ PERFORMANCE UPGRADE**: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see https://github.com/koajs/router/pull/173", - "dependencies": { - "debug": "^4.1.1", - "http-errors": "^1.7.3", - "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.1.0" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/koa-joi-router/node_modules/co-body": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.0.0.tgz", - "integrity": "sha512-9ZIcixguuuKIptnY8yemEOuhb71L/lLf+Rl5JfJEUiDNJk0e02MBt7BPxR2GEh5mw8dPthQYR4jPI/BnS1MQgw==", - "dependencies": { - "inflation": "^2.0.0", - "qs": "^6.5.2", - "raw-body": "^2.3.3", - "type-is": "^1.6.16" - } - }, - "node_modules/koa-joi-router/node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/koa-joi-router/node_modules/is-gen-fn": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/is-gen-fn/-/is-gen-fn-0.0.1.tgz", - "integrity": "sha512-KB/QRnp3FOjYZzP7XnsitrYvw9c3UpMlIKeKAq1FfSIotGKrMfy5lCqlskANC78tV9kc7gM9g7Il8MmO6uSWtQ==" - }, - "node_modules/koa-morgan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/koa-morgan/-/koa-morgan-1.0.1.tgz", - "integrity": "sha512-JOUdCNlc21G50afBXfErUrr1RKymbgzlrO5KURY+wmDG1Uvd2jmxUJcHgylb/mYXy2SjiNZyYim/ptUBGsIi3A==", - "dev": true, - "dependencies": { - "morgan": "^1.6.1" - } - }, - "node_modules/koa-mount": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/koa-mount/-/koa-mount-4.0.0.tgz", - "integrity": "sha512-rm71jaA/P+6HeCpoRhmCv8KVBIi0tfGuO/dMKicbQnQW/YJntJ6MnnspkodoA4QstMVEZArsCphmd0bJEtoMjQ==", - "dev": true, - "dependencies": { - "debug": "^4.0.1", - "koa-compose": "^4.1.0" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/koa-router": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/koa-router/-/koa-router-12.0.1.tgz", - "integrity": "sha512-gaDdj3GtzoLoeosacd50kBBTnnh3B9AYxDThQUo4sfUyXdOhY6ku1qyZKW88tQCRgc3Sw6ChXYXWZwwgjOxE0w==", - "dev": true, - "dependencies": { - "debug": "^4.3.4", - "http-errors": "^2.0.0", - "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.2.1" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/koa-router/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/koa-router/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/koa-send": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-5.0.1.tgz", - "integrity": "sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "http-errors": "^1.7.3", - "resolve-path": "^1.4.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/koa-static": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-5.0.0.tgz", - "integrity": "sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==", - "dev": true, - "dependencies": { - "debug": "^3.1.0", - "koa-send": "^5.0.0" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/koa-static/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/koa-swagger-decorator": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/koa-swagger-decorator/-/koa-swagger-decorator-2.2.1.tgz", - "integrity": "sha512-rXBiL2I9ZR/rUtiHVJALXTPF4owl6kZEJGF5gr634DzY17WI49qqJomdcZs+025TpeJXVKJqnv5YCmtkCSNcUA==", - "dependencies": { - "@asteasolutions/zod-to-openapi": "^5.5.0", - "@koa/router": "^12.0.0", - "@types/koa__router": "^12.0.0", - "deepmerge": "^4.3.1", - "is-type-of": "^2.0.1", - "koa": "^2.14.2", - "zod": "^3.22.2" - } - }, - "node_modules/kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", - "dev": true - }, - "node_modules/lazystream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", - "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.5" - }, - "engines": { - "node": ">= 0.6.3" - } - }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/lazystream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/lazystream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, - "node_modules/lint-staged": { - "version": "15.2.2", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", - "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", - "dev": true, - "dependencies": { - "chalk": "5.3.0", - "commander": "11.1.0", - "debug": "4.3.4", - "execa": "8.0.1", - "lilconfig": "3.0.0", - "listr2": "8.0.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.4" - }, - "bin": { - "lint-staged": "bin/lint-staged.js" - }, - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://opencollective.com/lint-staged" - } - }, - "node_modules/lint-staged/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lint-staged/node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "dev": true, - "engines": { - "node": ">=16" - } - }, - "node_modules/lint-staged/node_modules/yaml": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", - "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, - "node_modules/listr2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", - "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", - "dev": true, - "dependencies": { - "cli-truncate": "^4.0.0", - "colorette": "^2.0.20", - "eventemitter3": "^5.0.1", - "log-update": "^6.0.0", - "rfdc": "^1.3.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", - "dev": true - }, - "node_modules/lodash.difference": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", - "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==", - "dev": true - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", - "dev": true - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.union": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", - "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", - "dev": true - }, - "node_modules/log-update": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", - "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", - "dev": true, - "dependencies": { - "ansi-escapes": "^6.2.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^7.0.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-escapes": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", - "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/log-update/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", - "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", - "dev": true, - "dependencies": { - "get-east-asian-width": "^1.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", - "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/logform": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", - "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", - "dev": true, - "dependencies": { - "@colors/colors": "1.6.0", - "@types/triple-beam": "^1.3.2", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/merkletreejs": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.3.11.tgz", - "integrity": "sha512-LJKTl4iVNTndhL+3Uz/tfkjD0klIWsHlUzgtuNnNrsf7bAlXR30m+xYB7lHr5Z/l6e/yAIsr26Dabx6Buo4VGQ==", - "dependencies": { - "bignumber.js": "^9.0.1", - "buffer-reverse": "^1.0.1", - "crypto-js": "^4.2.0", - "treeify": "^1.1.0", - "web3-utils": "^1.3.4" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/micro-ftch": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==" - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, - "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "node_modules/moment": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", - "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/morgan/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/morgan/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/mrmime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/nan": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", - "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", - "dev": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-gyp-build": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz", - "integrity": "sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==", - "dev": true, - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/nodemon": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", - "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^4", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^7.5.3", - "simple-update-notifier": "^2.0.0", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/nodemon/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/nodemon/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/nodemon/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", - "dependencies": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/number-to-bn/node_modules/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==" - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "dev": true, - "dependencies": { - "fn.name": "1.x.x" - } - }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/only": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", - "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==" - }, - "node_modules/openapi3-ts": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-4.3.1.tgz", - "integrity": "sha512-ha/kTOLhMQL7MvS9Abu/cpCXx5qwHQ++88YkUzn1CGfmM8JvCOG/4ZE6tRsexgXRFaoJrcwLyf81H2Y/CXALtA==", - "dependencies": { - "yaml": "^2.4.1" - } - }, - "node_modules/opener": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", - "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", - "dev": true, - "bin": { - "opener": "bin/opener-bin.js" - } - }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", - "dev": true - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", - "dev": true - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-scurry": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", - "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", - "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pg": { - "version": "8.11.5", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.5.tgz", - "integrity": "sha512-jqgNHSKL5cbDjFlHyYsCXmQDrfIX/3RsNwYqpd4N0Kt8niLuNoRNH+aazv6cOd43gPh9Y4DjQCtb+X0MH0Hvnw==", - "dev": true, - "dependencies": { - "pg-connection-string": "^2.6.4", - "pg-pool": "^3.6.2", - "pg-protocol": "^1.6.1", - "pg-types": "^2.1.0", - "pgpass": "1.x" - }, - "engines": { - "node": ">= 8.0.0" - }, - "optionalDependencies": { - "pg-cloudflare": "^1.1.1" - }, - "peerDependencies": { - "pg-native": ">=3.0.1" - }, - "peerDependenciesMeta": { - "pg-native": { - "optional": true - } - } - }, - "node_modules/pg-cloudflare": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", - "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", - "dev": true, - "optional": true - }, - "node_modules/pg-connection-string": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.4.tgz", - "integrity": "sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==", - "dev": true - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-numeric": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pg-numeric/-/pg-numeric-1.0.2.tgz", - "integrity": "sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pg-pool": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.2.tgz", - "integrity": "sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==", - "dev": true, - "peerDependencies": { - "pg": ">=8.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.1.tgz", - "integrity": "sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==", - "dev": true - }, - "node_modules/pg-types": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-4.0.2.tgz", - "integrity": "sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==", - "dev": true, - "dependencies": { - "pg-int8": "1.0.1", - "pg-numeric": "1.0.2", - "postgres-array": "~3.0.1", - "postgres-bytea": "~3.0.0", - "postgres-date": "~2.1.0", - "postgres-interval": "^3.0.0", - "postgres-range": "^1.1.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/pg/node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "dev": true, - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pg/node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pg/node_modules/postgres-bytea": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pg/node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pg/node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "dev": true, - "dependencies": { - "xtend": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pgpass": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", - "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", - "dev": true, - "dependencies": { - "split2": "^4.1.0" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", - "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", - "dev": true, - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postgres-array": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz", - "integrity": "sha512-6faShkdFugNQCLwucjPcY5ARoW1SlbnrZjmGl0IrrqewpvxvhSLHimCVzqeuULCbG0fQv7Dtk1yDbG3xv7Veog==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/postgres-bytea": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-3.0.0.tgz", - "integrity": "sha512-CNd4jim9RFPkObHSjVHlVrxoVQXz7quwNFpz7RY1okNNme49+sVyiTvTRobiLV548Hx/hb1BG+iE7h9493WzFw==", - "dev": true, - "dependencies": { - "obuf": "~1.1.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/postgres-date": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", - "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/postgres-interval": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-3.0.0.tgz", - "integrity": "sha512-BSNDnbyZCXSxgA+1f5UU2GmwhoI0aU5yMxRGO8CdFEcY2BQF9xm/7MqKnYoM1nJDk8nONNWDk9WeSmePFhQdlw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/postgres-range": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/postgres-range/-/postgres-range-1.1.4.tgz", - "integrity": "sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==", - "dev": true - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/pretty-format": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", - "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.6.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, - "node_modules/proper-lockfile/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/properties-reader": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/properties-reader/-/properties-reader-2.3.0.tgz", - "integrity": "sha512-z597WicA7nDZxK12kZqHr2TcvwNU1GCfA5UwfDY/HDp3hXPoPlb5rlEx9bwGTiJnc0OqbBTkU975jDToth8Gxw==", - "dev": true, - "dependencies": { - "mkdirp": "^1.0.4" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "type": "github", - "url": "https://github.com/steveukx/properties?sponsor=1" - } - }, - "node_modules/protobufjs": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", - "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "node_modules/qs": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", - "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/queue-tick": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/raw-body/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdir-glob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", - "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", - "dev": true, - "dependencies": { - "minimatch": "^5.1.0" - } - }, - "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/reflect-metadata": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", - "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", - "dev": true - }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-path": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", - "integrity": "sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==", - "dev": true, - "dependencies": { - "http-errors": "~1.6.2", - "path-is-absolute": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/resolve-path/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve-path/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve-path/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "node_modules/resolve-path/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/restore-cursor/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", - "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", - "dev": true - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/secp256k1": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-5.0.0.tgz", - "integrity": "sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "elliptic": "^6.5.4", - "node-addon-api": "^5.0.0", - "node-gyp-build": "^4.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/secp256k1/node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", - "dev": true - }, - "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/sha3": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", - "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", - "dev": true, - "dependencies": { - "buffer": "6.0.3" - } - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true - }, - "node_modules/simple-update-notifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", - "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", - "dev": true, - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha512-VZBmZP8WU3sMOZm1bdgTadsQbcscK0UM8oKxKVBs4XAhUo2Xxzm/OFMGBkPusxw9xL3Uy8LrzEqGqJhclsr0yA==" - }, - "node_modules/source-list-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", - "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spawn-command": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz", - "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==", - "dev": true - }, - "node_modules/split-ca": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz", - "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==", - "dev": true - }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "dev": true, - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/ssh-remote-port-forward": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/ssh-remote-port-forward/-/ssh-remote-port-forward-1.0.4.tgz", - "integrity": "sha512-x0LV1eVDwjf1gmG7TTnfqIzf+3VPRz7vrNIjX6oYLbeCrf/PeVY6hkT68Mg+q02qXxQhrLjB0jfgvhevoCRmLQ==", - "dev": true, - "dependencies": { - "@types/ssh2": "^0.5.48", - "ssh2": "^1.4.0" - } - }, - "node_modules/ssh-remote-port-forward/node_modules/@types/ssh2": { - "version": "0.5.52", - "resolved": "https://registry.npmjs.org/@types/ssh2/-/ssh2-0.5.52.tgz", - "integrity": "sha512-lbLLlXxdCZOSJMCInKH2+9V/77ET2J6NPQHpFI0kda61Dd1KglJs+fPQBchizmzYSOJBgdTajhPqBO1xxLywvg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/ssh2-streams": "*" - } - }, - "node_modules/ssh2": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", - "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "asn1": "^0.2.6", - "bcrypt-pbkdf": "^1.0.2" - }, - "engines": { - "node": ">=10.16.0" - }, - "optionalDependencies": { - "cpu-features": "~0.0.9", - "nan": "^2.18.0" - } - }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha512-jos8u++JKm0ARcSUTAZXOVC0mSox7Bhn6sBgty73P1f3JGf7yG2clTbBNHUdde/kdvP2FESam+vM6l8jBrNxHA==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/streamx": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz", - "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==", - "dev": true, - "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dev": true, - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", - "dependencies": { - "is-hex-prefixed": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/style-loader": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.4.tgz", - "integrity": "sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==", - "dev": true, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", - "dev": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.30.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", - "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/testcontainers": { - "version": "10.8.1", - "resolved": "https://registry.npmjs.org/testcontainers/-/testcontainers-10.8.1.tgz", - "integrity": "sha512-2Kzeu3UfnILkhpdz2+YDu1FBFerAusdMCsltErBCJouP5j5xuxrV8BHxhlDt0xsJdM8YnhHgA2B32LmDr5AToA==", - "dev": true, - "dependencies": { - "@balena/dockerignore": "^1.0.2", - "@types/dockerode": "^3.3.24", - "archiver": "^5.3.2", - "async-lock": "^1.4.1", - "byline": "^5.0.0", - "debug": "^4.3.4", - "docker-compose": "^0.24.6", - "dockerode": "^3.3.5", - "get-port": "^5.1.1", - "node-fetch": "^2.7.0", - "proper-lockfile": "^4.1.2", - "properties-reader": "^2.3.0", - "ssh-remote-port-forward": "^1.0.4", - "tar-fs": "^3.0.5", - "tmp": "^0.2.1" - } - }, - "node_modules/testcontainers/node_modules/docker-modem": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz", - "integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "readable-stream": "^3.5.0", - "split-ca": "^1.0.1", - "ssh2": "^1.11.0" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/testcontainers/node_modules/dockerode": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-3.3.5.tgz", - "integrity": "sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA==", - "dev": true, - "dependencies": { - "@balena/dockerignore": "^1.0.2", - "docker-modem": "^3.0.0", - "tar-fs": "~2.0.1" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/testcontainers/node_modules/dockerode/node_modules/tar-fs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz", - "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==", - "dev": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.0.0" - } - }, - "node_modules/testcontainers/node_modules/tar-fs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz", - "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==", - "dev": true, - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - }, - "optionalDependencies": { - "bare-fs": "^2.1.1", - "bare-path": "^2.1.0" - } - }, - "node_modules/testcontainers/node_modules/tar-fs/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "node_modules/text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", - "dev": true - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tiny-secp256k1": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", - "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.3.0", - "bn.js": "^4.11.8", - "create-hmac": "^1.1.7", - "elliptic": "^6.4.0", - "nan": "^2.13.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/tiny-secp256k1/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/tmp": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", - "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", - "dev": true, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dev": true, - "dependencies": { - "nopt": "~1.0.10" - }, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/treeify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", - "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/triple-beam": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", - "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", - "dev": true, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", - "dev": true, - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-loader": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", - "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4", - "source-map": "^0.7.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, - "node_modules/ts-loader/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tsconfig-paths": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", - "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", - "dev": true, - "dependencies": { - "json5": "^2.2.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tsconfig-paths-jest": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths-jest/-/tsconfig-paths-jest-0.0.1.tgz", - "integrity": "sha512-YKhUKqbteklNppC2NqL7dv1cWF8eEobgHVD5kjF1y9Q4ocqpBiaDlYslQ9eMhtbqIPRrA68RIEXqknEjlxdwxw==", - "dev": true - }, - "node_modules/tsconfig-paths-webpack-plugin": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.1.0.tgz", - "integrity": "sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.7.0", - "tsconfig-paths": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true - }, - "node_modules/tsscmp": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", - "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", - "engines": { - "node": ">=0.6.x" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typeforce": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", - "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", - "dev": true - }, - "node_modules/typeorm": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.20.tgz", - "integrity": "sha512-sJ0T08dV5eoZroaq9uPKBoNcGslHBR4E4y+EBHs//SiGbblGe7IeduP/IH4ddCcj0qp3PHwDwGnuvqEAnKlq/Q==", - "dev": true, - "dependencies": { - "@sqltools/formatter": "^1.2.5", - "app-root-path": "^3.1.0", - "buffer": "^6.0.3", - "chalk": "^4.1.2", - "cli-highlight": "^2.1.11", - "dayjs": "^1.11.9", - "debug": "^4.3.4", - "dotenv": "^16.0.3", - "glob": "^10.3.10", - "mkdirp": "^2.1.3", - "reflect-metadata": "^0.2.1", - "sha.js": "^2.4.11", - "tslib": "^2.5.0", - "uuid": "^9.0.0", - "yargs": "^17.6.2" - }, - "bin": { - "typeorm": "cli.js", - "typeorm-ts-node-commonjs": "cli-ts-node-commonjs.js", - "typeorm-ts-node-esm": "cli-ts-node-esm.js" - }, - "engines": { - "node": ">=16.13.0" - }, - "funding": { - "url": "https://opencollective.com/typeorm" - }, - "peerDependencies": { - "@google-cloud/spanner": "^5.18.0", - "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2 || ^8.0.0 || ^9.0.0", - "hdb-pool": "^0.1.6", - "ioredis": "^5.0.4", - "mongodb": "^5.8.0", - "mssql": "^9.1.1 || ^10.0.1", - "mysql2": "^2.2.5 || ^3.0.1", - "oracledb": "^6.3.0", - "pg": "^8.5.1", - "pg-native": "^3.0.0", - "pg-query-stream": "^4.0.0", - "redis": "^3.1.1 || ^4.0.0", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.3", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0" - }, - "peerDependenciesMeta": { - "@google-cloud/spanner": { - "optional": true - }, - "@sap/hana-client": { - "optional": true - }, - "better-sqlite3": { - "optional": true - }, - "hdb-pool": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "mongodb": { - "optional": true - }, - "mssql": { - "optional": true - }, - "mysql2": { - "optional": true - }, - "oracledb": { - "optional": true - }, - "pg": { - "optional": true - }, - "pg-native": { - "optional": true - }, - "pg-query-stream": { - "optional": true - }, - "redis": { - "optional": true - }, - "sql.js": { - "optional": true - }, - "sqlite3": { - "optional": true - }, - "ts-node": { - "optional": true - }, - "typeorm-aurora-data-api-driver": { - "optional": true - } - } - }, - "node_modules/typeorm/node_modules/glob": { - "version": "10.3.12", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", - "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.10.2" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typeorm/node_modules/mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", - "dev": true, - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typeorm/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, - "node_modules/undici": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.11.1.tgz", - "integrity": "sha512-KyhzaLJnV1qa3BSHdj4AZ2ndqI0QWPxYzaIOio0WzcEJB9gvuysprJSLtpvc2D9mhR9jPDUk7xlJlZbH2KR5iw==", - "dev": true, - "engines": { - "node": ">=18.0" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", - "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/urijs": { - "version": "1.19.11", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", - "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==", - "dev": true - }, - "node_modules/utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", - "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==" - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/web3-utils": { - "version": "1.10.4", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", - "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", - "dependencies": { - "@ethereumjs/util": "^8.1.0", - "bn.js": "^5.2.1", - "ethereum-bloom-filters": "^1.0.6", - "ethereum-cryptography": "^2.1.2", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/webpack": { - "version": "5.91.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", - "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.16.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-bundle-analyzer": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", - "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "0.5.7", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "commander": "^7.2.0", - "debounce": "^1.2.1", - "escape-string-regexp": "^4.0.0", - "gzip-size": "^6.0.0", - "html-escaper": "^2.0.2", - "is-plain-object": "^5.0.0", - "opener": "^1.5.2", - "picocolors": "^1.0.0", - "sirv": "^2.0.3", - "ws": "^7.3.1" - }, - "bin": { - "webpack-bundle-analyzer": "lib/bin/analyzer.js" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-bundle-analyzer/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-merge": { - "version": "5.10.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", - "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", - "dev": true, - "dependencies": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" - } - }, - "node_modules/webpack/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webpack/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/webpack/node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wif": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", - "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", - "dev": true, - "dependencies": { - "bs58check": "<3.0.0" - } - }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, - "node_modules/winston": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.13.0.tgz", - "integrity": "sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==", - "dev": true, - "dependencies": { - "@colors/colors": "^1.6.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.7.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/winston-daily-rotate-file": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-5.0.0.tgz", - "integrity": "sha512-JDjiXXkM5qvwY06733vf09I2wnMXpZEhxEVOSPenZMii+g7pcDcTBt2MRugnoi8BwVSuCT2jfRXBUy+n1Zz/Yw==", - "dev": true, - "dependencies": { - "file-stream-rotator": "^0.6.1", - "object-hash": "^3.0.0", - "triple-beam": "^1.4.1", - "winston-transport": "^4.7.0" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "winston": "^3" - } - }, - "node_modules/winston-transport": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", - "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", - "dev": true, - "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/winston/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", - "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/write-file-atomic/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yaml": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ylru": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.4.0.tgz", - "integrity": "sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zip-stream": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", - "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", - "dev": true, - "dependencies": { - "archiver-utils": "^3.0.4", - "compress-commons": "^4.1.2", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/zip-stream/node_modules/archiver-utils": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", - "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", - "dev": true, - "dependencies": { - "glob": "^7.2.3", - "graceful-fs": "^4.2.0", - "lazystream": "^1.0.0", - "lodash.defaults": "^4.2.0", - "lodash.difference": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.isplainobject": "^4.0.6", - "lodash.union": "^4.6.0", - "normalize-path": "^3.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - } - } -} diff --git a/bots/package.json b/bots/package.json deleted file mode 100644 index c865c23d..00000000 --- a/bots/package.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "name": "@initia/rollup", - "version": "0.1.1", - "description": "Optimistic rollup for initia", - "main": "index.js", - "engines": { - "node": ">=16" - }, - "scripts": { - "executor": "WORKER_NAME=executor node dist/worker/bridgeExecutor/index.js", - "batch": "WORKER_NAME=batch node dist/worker/batchSubmitter/index.js", - "challenge": "WORKER_NAME=challenge node dist/worker/challengeSubmitter/index.js", - "output": "WORKER_NAME=output node dist/worker/outputSubmitter/index.js", - "test": "jest", - "test:integration": "export NODE_ENV=test && node --stack_size=4096 --max-old-space-size=4096 -r ts-node/register/transpile-only -r tsconfig-paths/register src/test/integration.ts", - "prettier": "prettier --write './src/**/*.ts'", - "lint": "eslint --fix src", - "do": "npm run build && node -r tsconfig-paths/register ./dist/loader/generateApiDoc.js", - "apidoc": "npm run do", - "prepublishOnly": "npm run build", - "build": "tsc --build", - "clean": "tsc --build --clean", - "l2setup": "export NODE_ENV=test && npm run build && node ./dist/scripts/setupL2.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/initia-labs/initia-rollup.git" - }, - "lint-staged": { - "./src/**/*.ts": [ - "prettier --write", - "eslint --fix" - ] - }, - "prettier": { - "semi": true, - "singleQuote": true, - "trailingComma": "none", - "arrowParens": "always" - }, - "author": "initia-labs", - "license": "MIT", - "bugs": { - "url": "https://github.com/initia-labs/batch-submitter/issues" - }, - "homepage": "https://github.com/initia-labs/batch-submitter#readme", - "devDependencies": { - "@initia/initia.js": "^0.1.43", - "@koa/cors": "^5.0.0", - "@sentry/node": "^7.109.0", - "@testcontainers/postgresql": "^10.8.1", - "@types/bluebird": "^3.5.42", - "@types/dockerode": "^3.3.26", - "@types/jest": "^29.5.12", - "@types/koa": "^2.15.0", - "@types/koa__cors": "^5.0.0", - "@types/koa-mount": "^4.0.5", - "@types/koa-router": "^7.4.8", - "@types/lodash": "^4.17.0", - "@types/node": "^20.12.3", - "@types/pg": "^8.11.4", - "@types/ws": "^8.5.10", - "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", - "apidoc": "^1.2.0", - "apidoc-core": "^0.15.0", - "bignumber.js": "^9.1.2", - "bluebird": "^3.7.2", - "concurrently": "^8.2.2", - "docker-compose": "^0.24.7", - "dockerode": "^4.0.2", - "dotenv": "^16.4.5", - "eslint": "^8.57.0", - "execa": "^8.0.1", - "husky": "^9.0.11", - "jest": "^29.7.0", - "koa": "^2.15.2", - "koa-body": "^6.0.1", - "koa-helmet": "^7.0.2", - "koa-joi-controllers": "^1.2.3", - "koa-morgan": "^1.0.1", - "koa-mount": "^4.0.0", - "koa-router": "^12.0.1", - "koa-static": "^5.0.0", - "lint-staged": "^15.2.2", - "pako": "^2.1.0", - "pg": "^8.11.5", - "prettier": "^3.2.5", - "reflect-metadata": "^0.2.2", - "sha3": "^2.1.4", - "testcontainers": "^10.8.1", - "ts-jest": "^29.1.2", - "ts-loader": "^9.5.1", - "ts-node": "^10.9.2", - "tsconfig-paths": "^4.2.0", - "tsconfig-paths-jest": "^0.0.1", - "tsconfig-paths-webpack-plugin": "^4.1.0", - "typeorm": "^0.3.20", - "typescript": "^5.4.3", - "undici": "^6.11.1", - "webpack": "^5.91.0", - "webpack-bundle-analyzer": "^4.10.1", - "winston": "^3.13.0", - "winston-daily-rotate-file": "^5.0.0" - }, - "dependencies": { - "@initia/initia.js": "^0.1.41", - "@koa/router": "^12.0.1", - "@sentry/node": "^7.109.0", - "@sideway/address": "^5.0.0", - "@types/dockerode": "^3.3.26", - "@types/pg": "^8.11.4", - "@types/ws": "^8.5.10", - "apidoc": "^1.2.0", - "axios": "^1.6.8", - "bignumber.js": "^9.1.2", - "bluebird": "^3.7.2", - "dockerode": "^4.0.2", - "dotenv": "^16.4.5", - "execa": "^8.0.1", - "joi": "^17.12.3", - "koa": "^2.15.2", - "koa-body": "^6.0.1", - "koa-helmet": "^7.0.2", - "koa-joi-controllers": "^1.2.3", - "koa-joi-router": "^8.0.0", - "koa-morgan": "^1.0.1", - "koa-mount": "^4.0.0", - "koa-router": "^12.0.1", - "koa-static": "^5.0.0", - "koa-swagger-decorator": "^2.2.1", - "merkletreejs": "^0.3.11", - "pako": "^2.1.0", - "pg": "^8.11.5", - "reflect-metadata": "^0.2.2", - "sha3": "^2.1.4", - "testcontainers": "^10.8.1", - "ts-node": "^10.9.2", - "typeorm": "^0.3.20", - "undici": "^6.11.1", - "winston": "^3.13.0", - "winston-daily-rotate-file": "^5.0.0" - }, - "overrides": { - "koa-joi-controllers": { - "is-gen-fn": "0.0.2" - } - } -} diff --git a/bots/pm2.json b/bots/pm2.json deleted file mode 100644 index 8593856e..00000000 --- a/bots/pm2.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "apps" : [ - { - "name" : "executor", - "cwd" : ".", - "script" : "npm run executor", - "watch" : true, - "autorestart" : true, - "args": [ "--color"] - }, - { - "name" : "output", - "cwd" : ".", - "script" : "npm run output", - "watch" : true, - "autorestart" : true, - "restart_delay" : 10000 - }, - { - "name" : "batch", - "cwd" : ".", - "script" : "npm run batch", - "watch" : true, - "autorestart" : true - }, - { - "name" : "challenger", - "cwd" : ".", - "script" : "npm run challenger", - "watch" : true, - "autorestart" : true - } - ] -} \ No newline at end of file diff --git a/bots/src/celestia/builder.ts b/bots/src/celestia/builder.ts deleted file mode 100644 index fdb31127..00000000 --- a/bots/src/celestia/builder.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Namespace } from './namespace' -import { Share } from './share' - -// builder constants -export const sequenceLenBytes = 4 -const compactShareReservedBytes = 4 -export const shareInfoBytes = 1 -export const shareSize = 512 -const maxShareVersion = 127 - -export class Builder { - private isCompactShare: boolean - private rawShareData: Uint8Array - constructor( - private namespace: Namespace, - private shareVersion: number, - private isFirstShare: boolean - ) { - this.isCompactShare = namespace.isTx() || namespace.isPayForBlob() - this.rawShareData = new Uint8Array() - } - - init() { - if (this.isCompactShare) { - this.prepareCompactShare() - } else { - this.prepareSparseShare() - } - } - - prepareCompactShare() { - let shareData: number[] = [] - const infoByte = newInfoByte(this.shareVersion, this.isFirstShare) - const placeholderSequenceLen = new Array(sequenceLenBytes).fill(0) - const placeholderReservedBytes = new Array(compactShareReservedBytes).fill( - 0 - ) - - shareData = shareData.concat([...this.namespace.bytes()]) - shareData.push(infoByte) - - if (this.isCompactShare) { - shareData = shareData.concat(placeholderSequenceLen) - } - - shareData = shareData.concat(placeholderReservedBytes) - - this.rawShareData = new Uint8Array(shareData) - } - - prepareSparseShare() { - let shareData: number[] = [] - const infoByte = newInfoByte(this.shareVersion, this.isFirstShare) - const placeholderSequenceLen = new Array(sequenceLenBytes).fill(0) - - shareData = shareData.concat([...this.namespace.bytes()]) - shareData.push(infoByte) - - if (this.isCompactShare) { - shareData = shareData.concat(placeholderSequenceLen) - } - - this.rawShareData = new Uint8Array(shareData) - } - - writeSequenceLen(sequenceLen: number) { - if (!this.isFirstShare) { - throw Error('not the first share') - } - - const sequenceLenBuf = [ - (sequenceLen >> 24) % 256, - (sequenceLen >> 16) % 256, - (sequenceLen >> 8) % 256, - sequenceLen % 256 - ] - - this.rawShareData = new Uint8Array([ - ...this.rawShareData, - ...sequenceLenBuf - ]) - } - - addData(rawData: Uint8Array): Uint8Array | undefined { - const pendingLeft = shareSize - this.rawShareData.length - - if (rawData.length <= pendingLeft) { - this.rawShareData = new Uint8Array([...this.rawShareData, ...rawData]) - return - } - - const chunk = rawData.slice(0, pendingLeft) - this.rawShareData = new Uint8Array([...this.rawShareData, ...chunk]) - - return rawData.slice(pendingLeft) - } - - zeroPadIfNecessary(): number { - const share = this.rawShareData - const oldLen = share.length - - if (oldLen >= shareSize) { - this.rawShareData = share - return 0 - } - - const missingBytes = shareSize - oldLen - this.rawShareData = new Uint8Array([ - ...this.rawShareData, - ...new Array(missingBytes).fill(0) - ]) - - return missingBytes - } - - build(): Share { - return new Share(this.rawShareData) - } -} - -function newInfoByte(version: number, isSequenceStart: boolean): InfoByte { - if (version > maxShareVersion) { - throw Error('version must be less than or equal to max share version') - } - - const prefix = version << 1 - if (isSequenceStart) { - return prefix + 1 - } - return prefix -} - -type InfoByte = number diff --git a/bots/src/celestia/commitment.ts b/bots/src/celestia/commitment.ts deleted file mode 100644 index a2a99371..00000000 --- a/bots/src/celestia/commitment.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { SHA256 } from './hasher' -import { - NamespaceMerkleTree, - hashFromByteSlices, - merkleMountainRangeSizes -} from './merkle' -import { Namespace, namespaceSize } from './namespace' -import { Blob, Share, SparseShareSplitter } from './share' -import { roundUpPowerOfTwo } from './utils' - -const SubtreeRootThreshold = 64 - -export function createCommitment(blob: Blob): Uint8Array { - const shares = splitBlobs([blob]) - - const subTreeWidth_ = subTreeWidth(shares.length, SubtreeRootThreshold) - const treeSizes = merkleMountainRangeSizes(shares.length, subTreeWidth_) - - const leafSets: Uint8Array[][] = [] - let cursor = 0 - for (const treeSize of treeSizes) { - leafSets.push( - shares - .slice(cursor, cursor + treeSize) - .map((share) => new Uint8Array(share.data)) - ) - cursor += treeSize - } - - const subTreeRoots: Uint8Array[] = [] - for (const set of leafSets) { - const tree = new NamespaceMerkleTree(new SHA256(), namespaceSize, true) - for (const leaf of set) { - const ns = new Namespace(blob.namespaceVersion, blob.namespaceId) - const nsLeaf = new Uint8Array([...ns.bytes(), ...leaf]) - tree.push(nsLeaf) - } - - const root = tree.root() - subTreeRoots.push(root) - } - - blob.shareCommitment = hashFromByteSlices(subTreeRoots) - return blob.shareCommitment -} - -function splitBlobs(blobs: Blob[]): Share[] { - const writer = new SparseShareSplitter() - for (const blob of blobs) { - writer.write(blob) - } - - return writer.export() -} - -function subTreeWidth( - shareCount: number, - subtreeRootThreshold: number -): number { - let s = Math.floor(shareCount / subtreeRootThreshold) - - if (shareCount % subtreeRootThreshold !== 0) { - s++ - } - - s = roundUpPowerOfTwo(s) - - return Math.min(s, blobMinSquareSize(shareCount)) -} - -function blobMinSquareSize(shareCount: number): number { - return roundUpPowerOfTwo(Math.ceil(Math.sqrt(shareCount))) -} diff --git a/bots/src/celestia/hasher.ts b/bots/src/celestia/hasher.ts deleted file mode 100644 index 5bf1e40a..00000000 --- a/bots/src/celestia/hasher.ts +++ /dev/null @@ -1,183 +0,0 @@ -import * as crypto from 'crypto' -import { maxNamespace, minNamespace } from './namespace' - -const leafPrefix = 0 -const nodePrefix = 1 - -abstract class Hash { - abstract write(b: Uint8Array): void - abstract sum(b?: Uint8Array): Uint8Array - abstract reset(): void - abstract size(): number - abstract blockSize(): number -} - -export class SHA256 extends Hash { - private hash: crypto.Hash - constructor() { - super() - this.hash = crypto.createHash('sha256') - } - write(b: Uint8Array) { - this.hash.write(b) - } - sum(b = new Uint8Array([])): Uint8Array { - const hash = this.hash.digest() - return new Uint8Array([...b, ...hash]) - } - reset(): void { - this.hash = crypto.createHash('sha256') - } - size(): number { - return 32 - } - blockSize(): number { - return 64 - } -} - -export abstract class Hasher { - abstract isMaxNamespaceIDIgnored(): boolean - abstract namespaceSize(): number - abstract hashLeaf(data: Uint8Array): Uint8Array - abstract hashNode(leftChild: Uint8Array, rightChild: Uint8Array): Uint8Array - abstract emptyRoot(): Uint8Array -} - -export class MntHasher extends Hasher { - private precomputedMaxNs: Uint8Array - private tp: number - private data: Uint8Array - - constructor( - private baseHasher: Hash, - private namespaceLen: number, - private ignoreMaxNs: boolean - ) { - super() - this.precomputedMaxNs = new Uint8Array( - new Array(this.namespaceLen).fill(0xff) - ) - this.tp = 0 - this.data = new Uint8Array() - } - - isMaxNamespaceIDIgnored(): boolean { - return this.ignoreMaxNs - } - - namespaceSize(): number { - return this.namespaceLen - } - - hashLeaf(data: Uint8Array): Uint8Array { - const h = this.baseHasher - h.reset() - - this.validateLeaf(data) - - const nID = data.slice(0, this.namespaceLen) - const minMaxNIDs = new Uint8Array([...nID, ...nID]) - - const leafPrefixedNData = new Uint8Array([leafPrefix, ...data]) - h.write(leafPrefixedNData) - - return h.sum(minMaxNIDs) - } - - hashNode(left: Uint8Array, right: Uint8Array): Uint8Array { - this.validateNodes(left, right) - - const h = this.baseHasher - h.reset() - - const [leftMinNs, leftMaxNs] = [ - minNamespace(left, this.namespaceLen), - maxNamespace(left, this.namespaceLen) - ] - const [rightMinNs, rightMaxNs] = [ - minNamespace(right, this.namespaceLen), - maxNamespace(right, this.namespaceLen) - ] - - const [minNs, MaxNs] = this.computeNsRange( - leftMinNs, - leftMaxNs, - rightMinNs, - rightMaxNs - ) - - const res = new Uint8Array([...minNs, ...MaxNs]) - const data = new Uint8Array([nodePrefix, ...left, ...right]) - - h.write(data) - return h.sum(res) - } - - emptyRoot(): Uint8Array { - this.baseHasher.reset() - const emptyNs = new Array(this.namespaceLen).fill(0) - const h = this.baseHasher.sum() - const digest = [...emptyNs, ...emptyNs, ...h] - return new Uint8Array(digest) - } - - private validateLeaf(data: Uint8Array) { - const nidSize = this.namespaceSize() - const lenData = data.length - if (lenData < nidSize) { - throw Error('invalid leaf len') - } - } - - private validateNodes(left: Uint8Array, right: Uint8Array) { - this.validateNodeFormat(left) - this.validateNodeFormat(right) - this.validateSiblingsNamespaceOrder(left, right) - } - - private validateNodeFormat(node: Uint8Array) { - const expectNodeLen = this.size() - const nodeLen = node.length - if (nodeLen !== expectNodeLen) { - throw Error('invalid node size') - } - - const minNID = minNamespace(node, this.namespaceSize()) - const maxNID = maxNamespace(node, this.namespaceSize()) - if (Buffer.from(maxNID).compare(Buffer.from(minNID)) < 0) { - throw Error('max namespace ID is less than min namespace ID') - } - } - - private validateSiblingsNamespaceOrder(left: Uint8Array, right: Uint8Array) { - const leftMaxNs = maxNamespace(left, this.namespaceSize()) - const rightMinNs = maxNamespace(right, this.namespaceSize()) - if (Buffer.from(rightMinNs).compare(Buffer.from(leftMaxNs)) < 0) { - throw Error( - 'the max namespace of the left child is greater than the min namespace of right child' - ) - } - } - - private size(): number { - return this.baseHasher.size() + this.namespaceLen * 2 - } - - private computeNsRange( - leftMinNs: Uint8Array, - leftMaxNs: Uint8Array, - rightMinNs: Uint8Array, - rightMaxNs: Uint8Array - ): [Uint8Array, Uint8Array] { - const minNs = leftMinNs - let maxNs = rightMaxNs - if ( - this.ignoreMaxNs && - Buffer.from(this.precomputedMaxNs).compare(rightMinNs) === 0 - ) { - maxNs = leftMaxNs - } - return [minNs, maxNs] - } -} diff --git a/bots/src/celestia/merkle.ts b/bots/src/celestia/merkle.ts deleted file mode 100644 index 07b0fcd0..00000000 --- a/bots/src/celestia/merkle.ts +++ /dev/null @@ -1,201 +0,0 @@ -import * as crypto from 'crypto' -import { Hasher, MntHasher } from './hasher' -import { roundDownPowerOfTwo } from './utils' - -export class NamespaceMerkleTree { - private treeHasher: Hasher - private visit: nodeVisitorFn - private leaves: Uint8Array[] - private leafHashes: Uint8Array[] - private namespaceRanges: Record - private minNID: Uint8Array - private maxNID: Uint8Array - private rawRoot: Uint8Array | undefined - constructor(hash: any, namespaceIDSize: number, ignoreMaxNamespace: boolean) { - this.treeHasher = new MntHasher(hash, namespaceIDSize, ignoreMaxNamespace) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - this.visit = (_hash: Uint8Array, _children?: Uint8Array[]) => {} // no op - this.leaves = [] - this.leafHashes = [] - this.namespaceRanges = {} - this.minNID = new Uint8Array(new Array(namespaceIDSize).fill(0xff)) - this.maxNID = new Uint8Array(new Array(namespaceIDSize).fill(0x00)) - } - push(namespacedData: Uint8Array) { - const nID = this.validateAndExtractNamespace(namespacedData) - - const res = this.treeHasher.hashLeaf(namespacedData) - - this.leaves.push(namespacedData) - this.leafHashes.push(res) - this.updateNamespaceRanges() - this.updateMinMaxID(nID) - this.rawRoot = undefined - return undefined - } - root(): Uint8Array { - if (this.rawRoot === undefined) { - const res = this.computeRoot(0, this.size()) - this.rawRoot = res - } - - return this.rawRoot - } - - computeRoot(start: number, end: number): Uint8Array { - if (start < 0 || start > end || end > this.size()) { - throw Error('fail to compute root') - } - - switch (end - start) { - case 0: { - const rootHash = this.treeHasher.emptyRoot() - this.visit(rootHash) - return rootHash - } - case 1: { - const leafHash = new Uint8Array([...this.leafHashes[start]]) // copy - this.visit(leafHash, [this.leaves[start]]) - return leafHash - } - default: { - const k = getSplitPoint(end - start) - const left = this.computeRoot(start, start + k) - const right = this.computeRoot(start + k, end) - const hash = this.treeHasher.hashNode(left, right) - this.visit(hash, [left, right]) - return hash - } - } - } - - private validateAndExtractNamespace(data: Uint8Array): Uint8Array { - const nidSize = this.namespaceSize() - if (data.length < nidSize) { - throw Error('invalid data length') - } - - const nID = data.slice(0, this.namespaceSize()) - - const curSize = this.size() - if (curSize > 0) { - if ( - Buffer.from(nID).compare( - Buffer.from(this.leaves[curSize - 1].slice(0, nidSize)) - ) < 0 - ) { - throw Error('invalid push order') - } - } - - return nID - } - - private updateNamespaceRanges() { - if (this.size() > 0) { - const lastIndex = this.size() - 1 - const lastPushed = this.leaves[lastIndex] - - const lastNsStr = Buffer.from( - lastPushed.slice(0, this.treeHasher.namespaceSize()) - ).toString() - - const lastRange = this.namespaceRanges[lastNsStr] - - if (lastRange === undefined) { - this.namespaceRanges[lastNsStr] = { - start: lastIndex, - end: lastIndex + 1 - } - } else { - this.namespaceRanges[lastNsStr] = { - start: lastRange.start, - end: lastRange.end + 1 - } - } - } - } - - private updateMinMaxID(id: Uint8Array) { - if (Buffer.from(id).compare(this.minNID) < 0) { - this.minNID = id - } - - if (Buffer.from(this.maxNID).compare(id) < 0) { - this.maxNID = id - } - } - - private size() { - return this.leaves.length - } - - private namespaceSize(): number { - return this.treeHasher.namespaceSize() - } -} - -type nodeVisitorFn = (hash: Uint8Array, children?: Uint8Array[]) => void - -interface leafRange { - start: number; - end: number; -} - -function getSplitPoint(length: number): number { - if (length < 1) { - throw Error('Trying to split a tree with size < 1') - } - - let k = 1 - while (k < length) { - k <<= 1 - } - - k >>= 1 - if (k === length) { - k >>= 1 - } - - return k -} - -export function hashFromByteSlices(items: Uint8Array[]): Uint8Array { - switch (items.length) { - case 0: - return new Uint8Array([...crypto.createHash('sha256').digest()]) // emptyHash - case 1: { - const hash = crypto.createHash('sha256') - hash.write(Buffer.from([0 /* leaf prefix */, ...items[0]])) - return new Uint8Array([...hash.digest()]) - } - default: { - const k = getSplitPoint(items.length) - const left = hashFromByteSlices(items.slice(0, k)) - const right = hashFromByteSlices(items.slice(k)) - const hash = crypto.createHash('sha256') - hash.write(Buffer.from([1 /* inner prefix */, ...left, ...right])) - return new Uint8Array([...hash.digest()]) - } - } -} - -export function merkleMountainRangeSizes( - totalSize: number, - maxTreeSize: number -): number[] { - let treeSizes: number[] = [] - - while (totalSize !== 0) { - if (totalSize >= maxTreeSize) { - treeSizes = [...treeSizes, maxTreeSize] - totalSize -= maxTreeSize - } else { - const treeSize = roundDownPowerOfTwo(totalSize) - - treeSizes = [...treeSizes, treeSize] - totalSize -= treeSize - } - } - return treeSizes -} diff --git a/bots/src/celestia/namespace.ts b/bots/src/celestia/namespace.ts deleted file mode 100644 index 904a4aee..00000000 --- a/bots/src/celestia/namespace.ts +++ /dev/null @@ -1,66 +0,0 @@ -const namespaceVersionSize = 1 -export const namespaceIDSize = 28 -export const namespaceSize = namespaceVersionSize + namespaceIDSize -export const namespaceVersionZero = 0 -const namespaceVersionMax = 255 -const namespaceVersionZeroPrefixSize = 18 -const namespaceVersionZeroPrefix = new Uint8Array( - new Array(namespaceVersionZeroPrefixSize).fill(0) -) - -export class Namespace { - constructor( - private version: number, - private id: Uint8Array - ) { - // validate version - if (version !== namespaceVersionZero && version !== namespaceVersionMax) { - throw Error('unsupported namespace version') - } - - if (id.length !== namespaceIDSize) { - throw Error('unsupported namespace id lengh') - } - - // validate id - if ( - version === namespaceVersionZero && - id.slice(0, namespaceVersionZeroPrefix.length) === - namespaceVersionZeroPrefix - ) { - throw Error('unsupported namespace id with version') - } - } - - isTx(): boolean { - return this.bytes() === txNamespace.bytes() - } - - isPayForBlob(): boolean { - return this.bytes() === payForBlobNamespace.bytes() - } - - bytes(): Uint8Array { - return new Uint8Array([this.version, ...this.id]) - } -} - -export function minNamespace(hash: Uint8Array, size: number): Uint8Array { - return new Uint8Array([...hash.slice(0, size)]) -} - -export function maxNamespace(hash: Uint8Array, size: number): Uint8Array { - return new Uint8Array([...hash.slice(size, size * 2)]) -} - -export function primaryReservedNamespace(lastByte: number): Namespace { - const ns = new Namespace( - namespaceVersionZero, - new Uint8Array([...new Array(namespaceIDSize - 1).fill(0x00), lastByte]) - ) - - return ns -} - -const txNamespace = primaryReservedNamespace(0x01) -const payForBlobNamespace = primaryReservedNamespace(0x04) diff --git a/bots/src/celestia/share.ts b/bots/src/celestia/share.ts deleted file mode 100644 index d973461a..00000000 --- a/bots/src/celestia/share.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Builder } from './builder' -import { Namespace } from './namespace' - -const supportedShareVersions = [0] - -export class Share { - constructor(public data: Uint8Array) {} -} - -export class SparseShareSplitter { - private shares: Share[] - constructor(shares?: Share[]) { - if (!shares) { - this.shares = [] - } else { - this.shares = shares - } - } - - write(blob: Blob) { - if ( - supportedShareVersions.find((v) => v === blob.shareVersion) === undefined - ) { - throw Error('unsupported share version') - } - - let rawData: Uint8Array | undefined = blob.data - const ns = new Namespace(blob.namespaceVersion, blob.namespaceId) - - let b = new Builder(ns, blob.shareVersion, true) - b.init() - - b.writeSequenceLen(rawData.length) - - while (rawData !== undefined) { - const rawDataLeftOver = b.addData(rawData) - if (rawDataLeftOver === undefined) { - b.zeroPadIfNecessary() - } - - const share = b.build() - - this.shares.push(share) - - b = new Builder(ns, blob.shareVersion, false) - b.init() - - rawData = rawDataLeftOver - } - } - - export(): Share[] { - return this.shares - } -} - -export interface Blob { - namespaceId: Uint8Array; - data: Uint8Array; - shareVersion: number; - namespaceVersion: number; - shareCommitment: Uint8Array; -} diff --git a/bots/src/celestia/utils.ts b/bots/src/celestia/utils.ts deleted file mode 100644 index b29f7455..00000000 --- a/bots/src/celestia/utils.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { sequenceLenBytes, shareInfoBytes, shareSize } from './builder' -import { createCommitment } from './commitment' -import { namespaceSize } from './namespace' -import { config } from '../config' -import { Blob } from '@initia/initia.js' - -// constants -const defaultGasPerBlobByte = 8 -const defaultTxSizeCostPerByte = 10 -const bytesPerBlobInfo = 70 -const pfbGasFixedCost = 75000 -const firstSparseShareContentSize = - shareSize - namespaceSize - shareInfoBytes - sequenceLenBytes -const continuationSparseShareContentSize = - shareSize - namespaceSize - shareInfoBytes -const namespaceIdLength = 28 - -export function getCelestiaFeeGasLimit(length: number): number { - // calculate gas - return Math.floor(defaultEstimateGas([length]) * 1.2) -} - -export function createBlob(data: Buffer): { - blob: Blob; - commitment: string; - namespace: string; -} { - const blob = { - namespaceId: new Uint8Array([ - ...Buffer.from(config.CELESTIA_NAMESPACE_ID, 'hex') - ]), - data: new Uint8Array([...data]), - shareVersion: 0, - namespaceVersion: 0, - shareCommitment: new Uint8Array() - } - - // generate commitment - createCommitment(blob) - - const commitment = Buffer.from(blob.shareCommitment).toString('base64') - const res = new Blob( - Buffer.from(config.CELESTIA_NAMESPACE_ID, 'hex').toString('base64'), - Buffer.from(blob.data).toString('base64'), - 0, - 0 - ) - const namespace = Buffer.from([ - blob.namespaceVersion, - ...blob.namespaceId - ]).toString('base64') - return { - blob: res, - commitment, - namespace - } -} - -function defaultEstimateGas(blobSizes: number[]) { - return estimateGas( - blobSizes, - defaultGasPerBlobByte, - defaultTxSizeCostPerByte - ) -} - -function estimateGas( - blobSizes: number[], - gasPerByte: number, - txSizeCost: number -): number { - return ( - gasToConsume(blobSizes, gasPerByte) + - txSizeCost * bytesPerBlobInfo * blobSizes.length + - pfbGasFixedCost - ) -} - -function gasToConsume(blobSizes: number[], gasPerByte: number): number { - let totalSharesUsed = 0 - for (const size of blobSizes) { - totalSharesUsed += sparseSharesNeeded(size) - } - - return totalSharesUsed * shareSize * gasPerByte -} - -function sparseSharesNeeded(sequenceLen: number): number { - if (sequenceLen === 0) { - return 0 - } - - if (sequenceLen < firstSparseShareContentSize) { - return 1 - } - - return ( - 1 + - Math.floor( - (sequenceLen - firstSparseShareContentSize) / - continuationSparseShareContentSize - ) - ) -} - -export function validateCelestiaConfig() { - if (config.PUBLISH_BATCH_TARGET !== 'celestia') return - const length = Buffer.from(config.CELESTIA_NAMESPACE_ID, 'hex').length - // https://docs.celestia.org/developers/blobstream-proof-queries#namespace - if (length != namespaceIdLength) { - throw Error( - `unsupported namespace id length; expected ${namespaceIdLength}, given ${length} ` - ) - } -} - -export function roundUpPowerOfTwo(input: number) { - let result = 1 - while (result < input) { - result <<= 1 - } - return result -} - -export function roundDownPowerOfTwo(input: number): number { - if (input <= 0) { - throw Error('input must be positive') - } - const roundedUp = roundUpPowerOfTwo(input) - if (roundedUp == input) { - return roundedUp - } - return roundedUp >> 1 -} diff --git a/bots/src/config.ts b/bots/src/config.ts deleted file mode 100644 index 25f0c2df..00000000 --- a/bots/src/config.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { LCDClient } from '@initia/initia.js' -import { validateCelestiaConfig } from './celestia/utils' -import * as dotenv from 'dotenv' - -const envFile = - process.env.NODE_ENV === 'test' || !process.env.WORKER_NAME - ? `.env` - : `.env.${process.env.WORKER_NAME}` - -console.log('activate ', envFile) -dotenv.config({ path: envFile }) - -const { - EXECUTOR_PORT, - BATCH_PORT, - L1_LCD_URI, - L1_RPC_URI, - L2_LCD_URI, - L2_RPC_URI, - BATCH_LCD_URI, - BATCH_CHAIN_RPC_URI, - BATCH_GAS_PRICES, - BATCH_DENOM, - BATCH_CHAIN_ID, - - CELESTIA_NAMESPACE_ID, - - PUBLISH_BATCH_TARGET, - EXECUTOR_URI, - BRIDGE_ID, - OUTPUT_SUBMITTER_MNEMONIC, - EXECUTOR_MNEMONIC, - BATCH_SUBMITTER_MNEMONIC, - CHALLENGER_MNEMONIC, - USE_LOG_FILE, - L2_GAS_PRICES, - L1_CHAIN_ID, - L2_CHAIN_ID, - SLACK_WEB_HOOK, - SUBMISSION_INTERVAL, - FINALIZATION_PERIOD, - IBC_METADATA, - DELETE_OUTPUT_PROPOSAL, - SLACK_NOT_ENOUGH_BALANCE_THRESHOLD, - EXECUTOR_L1_MONITOR_HEIGHT, - EXECUTOR_L2_MONITOR_HEIGHT, - ENABLE_API_ONLY -} = process.env - -const supportedPublishBatchTargets = ['l1', 'celestia'] - -export const config = { - EXECUTOR_PORT: EXECUTOR_PORT ? parseInt(EXECUTOR_PORT) : 5000, - BATCH_PORT: BATCH_PORT ? parseInt(BATCH_PORT) : 5001, - L1_LCD_URI: L1_LCD_URI ? L1_LCD_URI.split(',') : ['http://localhost:1317'], - L1_RPC_URI: L1_RPC_URI ? L1_RPC_URI.split(',') : ['http://localhost:26657'], - L2_LCD_URI: L2_LCD_URI ? L2_LCD_URI.split(',') : ['http://localhost:1317'], - L2_RPC_URI: L2_RPC_URI ? L2_RPC_URI.split(',') : ['http://localhost:26657'], - BATCH_LCD_URI: BATCH_LCD_URI - ? BATCH_LCD_URI.split(',') - : ['http://localhost:1317'], - BATCH_CHAIN_RPC_URI: (() => { - if (process.env.WORKER_NAME !== 'batch') { - return undefined - } - if (PUBLISH_BATCH_TARGET == 'l1') { - return L1_RPC_URI - } else if ( - BATCH_CHAIN_RPC_URI == undefined || - BATCH_CHAIN_RPC_URI.length == 0 - ) { - throw Error( - 'Please check your configuration; BATCH_CHAIN_RPC_URI is needed but not given.' - ) - } - })(), - CELESTIA_NAMESPACE_ID: CELESTIA_NAMESPACE_ID || '', - PUBLISH_BATCH_TARGET: (() => { - if (PUBLISH_BATCH_TARGET === undefined) { - return 'l1' - } - - const target = supportedPublishBatchTargets.find( - (target) => target === PUBLISH_BATCH_TARGET?.toLocaleLowerCase() - ) - if (target === undefined) { - throw Error( - `A valid PUBLISH_BATCH_TARGET is required. Please specify one of the following: ${supportedPublishBatchTargets}` - ) - } - return target - })(), - EXECUTOR_URI: EXECUTOR_URI || 'http://localhost:5000', - BRIDGE_ID: BRIDGE_ID ? parseInt(BRIDGE_ID) : 1, - OUTPUT_SUBMITTER_MNEMONIC: OUTPUT_SUBMITTER_MNEMONIC - ? OUTPUT_SUBMITTER_MNEMONIC.replace(/'/g, '') - : '', - EXECUTOR_MNEMONIC: EXECUTOR_MNEMONIC - ? EXECUTOR_MNEMONIC.replace(/'/g, '') - : '', - BATCH_SUBMITTER_MNEMONIC: BATCH_SUBMITTER_MNEMONIC - ? BATCH_SUBMITTER_MNEMONIC.replace(/'/g, '') - : '', - CHALLENGER_MNEMONIC: CHALLENGER_MNEMONIC - ? CHALLENGER_MNEMONIC.replace(/'/g, '') - : '', - USE_LOG_FILE: USE_LOG_FILE ? JSON.parse(USE_LOG_FILE) : false, - L1_CHAIN_ID: L1_CHAIN_ID ? L1_CHAIN_ID : 'local-initia', - L2_CHAIN_ID: L2_CHAIN_ID ? L2_CHAIN_ID : 'local-minitia', - l1lcd: new LCDClient( - L1_LCD_URI ? L1_LCD_URI.split(',')[0] : 'http://localhost:1317', - { - gasPrices: '0.15uinit', - gasAdjustment: '2', - chainId: L1_CHAIN_ID - } - ), - l2lcd: new LCDClient( - L2_LCD_URI ? L2_LCD_URI.split(',')[0] : 'http://localhost:1317', - { - gasPrices: L2_GAS_PRICES || '0.15umin', - gasAdjustment: '2', - chainId: L2_CHAIN_ID - } - ), - batchlcd: (() => { - return new LCDClient( - BATCH_LCD_URI ? BATCH_LCD_URI.split(',')[0] : 'http://localhost:1317', - { - gasPrices: BATCH_GAS_PRICES || `0.2${BATCH_DENOM}`, - gasAdjustment: '2', - chainId: BATCH_CHAIN_ID - } - ) - })(), - SLACK_WEB_HOOK: SLACK_WEB_HOOK ? SLACK_WEB_HOOK : '', - SUBMISSION_INTERVAL: SUBMISSION_INTERVAL - ? parseInt(SUBMISSION_INTERVAL) - : 3600, - FINALIZATION_PERIOD: FINALIZATION_PERIOD - ? parseInt(FINALIZATION_PERIOD) - : 3600, - IBC_METADATA: IBC_METADATA ? IBC_METADATA : '', - DELETE_OUTPUT_PROPOSAL: DELETE_OUTPUT_PROPOSAL - ? DELETE_OUTPUT_PROPOSAL - : 'false', - SLACK_NOT_ENOUGH_BALANCE_THRESHOLD: SLACK_NOT_ENOUGH_BALANCE_THRESHOLD - ? parseInt(SLACK_NOT_ENOUGH_BALANCE_THRESHOLD) - : 10_000_000, - EXECUTOR_L1_MONITOR_HEIGHT: EXECUTOR_L1_MONITOR_HEIGHT - ? parseInt(EXECUTOR_L1_MONITOR_HEIGHT) - : 0, - EXECUTOR_L2_MONITOR_HEIGHT: EXECUTOR_L2_MONITOR_HEIGHT - ? parseInt(EXECUTOR_L2_MONITOR_HEIGHT) - : 0, - ENABLE_API_ONLY: ENABLE_API_ONLY ? ENABLE_API_ONLY == 'true' : false -} - -// check celestia config -validateCelestiaConfig() - -export const INTERVAL_BATCH = 100_000 -export const INTERVAL_MONITOR = 100 -export const INTERVAL_OUTPUT = 10_000 diff --git a/bots/src/controller/batch/BatchController.ts b/bots/src/controller/batch/BatchController.ts deleted file mode 100644 index 5eddba2d..00000000 --- a/bots/src/controller/batch/BatchController.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - KoaController, - Controller, - Get, - Validate, - Validator -} from 'koa-joi-controllers' -import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { success } from '../../lib/response' -import { GetBatchResponse } from 'sawgger/batch_model' -import { getBatch } from 'service/batch/BatchService' - -const Joi = Validator.Joi - -@Controller('') -export class BatchController extends KoaController { - @routeConfig({ - method: 'get', - path: '/batch/{batch_index}', - summary: 'Get batch', - description: 'Get batch', - tags: ['Batch'], - operationId: 'getBatch', - request: { - params: z.object({ - batch_index: z.number() - }) - } - }) - @responses(GetBatchResponse) - @Get('/batch/{batch_index}') - @Validate({ - params: { - batch_index: Joi.number().description('Batch index') - } - }) - async getBatch(ctx): Promise { - success(ctx, await getBatch(ctx.params.batch_index)) - } -} diff --git a/bots/src/controller/executor/ClaimTxController.ts b/bots/src/controller/executor/ClaimTxController.ts deleted file mode 100644 index 7ea6bfc9..00000000 --- a/bots/src/controller/executor/ClaimTxController.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Context } from 'koa' -import { KoaController, Get, Controller } from 'koa-joi-controllers' -import { ErrorTypes } from '../../lib/error' -import { error, success } from '../../lib/response' -import { getClaimTxList } from '../../service' -import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetClaimResponse } from '../../swagger/executor_model' - -@Controller('') -export class ClaimTxController extends KoaController { - @routeConfig({ - method: 'get', - path: '/tx/claim', - summary: 'Get tx data for claiming', - description: 'Get claim data', - tags: ['Claim'], - operationId: 'getClaimTx', - request: { - query: z.object({ - address: z.string().optional(), - sequence: z.number().optional(), - limit: z - .number() - .optional() - .default(20) - .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value' - }), - offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true) - }) - } - }) - @responses(GetClaimResponse) - @Get('/tx/claim') - async getClaimTxList(ctx: Context): Promise { - const claimTxList = await getClaimTxList(ctx.query as any) - if (claimTxList) success(ctx, claimTxList) - else error(ctx, ErrorTypes.API_ERROR) - } -} diff --git a/bots/src/controller/executor/DepositTxController.ts b/bots/src/controller/executor/DepositTxController.ts deleted file mode 100644 index b47a9715..00000000 --- a/bots/src/controller/executor/DepositTxController.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Context } from 'koa' -import { KoaController, Get, Controller } from 'koa-joi-controllers' -import { ErrorTypes } from '../../lib/error' -import { error, success } from '../../lib/response' -import { getDepositTxList } from '../../service' -import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetDepositResponse } from '../../swagger/executor_model' - -@Controller('') -export class DepositTxController extends KoaController { - @routeConfig({ - method: 'get', - path: '/tx/deposit', - summary: 'Get deposit tx data', - description: 'Get deposit data', - tags: ['Deposit'], - operationId: 'getDepositTx', - request: { - query: z.object({ - address: z.string().optional(), - sequence: z.number().optional(), - limit: z - .number() - .optional() - .default(20) - .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value' - }), - offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true) - }) - } - }) - @responses(GetDepositResponse) - @Get('/tx/deposit') - async getDepositTxList(ctx: Context): Promise { - const depositTxList = await getDepositTxList(ctx.query as any) - if (depositTxList) success(ctx, depositTxList) - else error(ctx, ErrorTypes.API_ERROR) - } -} diff --git a/bots/src/controller/executor/OutputController.ts b/bots/src/controller/executor/OutputController.ts deleted file mode 100644 index 90f6400c..00000000 --- a/bots/src/controller/executor/OutputController.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Context } from 'koa' -import { KoaController, Get, Controller } from 'koa-joi-controllers' -import { ErrorTypes } from '../../lib/error' -import { error, success } from '../../lib/response' -import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { getOutputList } from '../../service' -import { GetOutputResponse } from '../../swagger/executor_model' - -@Controller('') -export class OutputController extends KoaController { - @routeConfig({ - method: 'get', - path: '/output', - summary: 'Get output proposal data', - description: 'Get output proposal data', - tags: ['Output'], - operationId: 'getOutput', - request: { - query: z.object({ - output_index: z.number().optional(), - limit: z - .number() - .optional() - .default(20) - .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value' - }), - offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true) - }) - } - }) - @responses(GetOutputResponse) - @Get('/output') - async getgetOutputList(ctx: Context): Promise { - const outputList = await getOutputList(ctx.query as any) - if (outputList) success(ctx, outputList) - else error(ctx, ErrorTypes.API_ERROR) - } -} diff --git a/bots/src/controller/executor/WithdrawalTxController.ts b/bots/src/controller/executor/WithdrawalTxController.ts deleted file mode 100644 index 1fccc8c1..00000000 --- a/bots/src/controller/executor/WithdrawalTxController.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Context } from 'koa' -import { KoaController, Get, Controller } from 'koa-joi-controllers' -import { ErrorTypes } from '../../lib/error' -import { error, success } from '../../lib/response' -import { getWithdrawalTxList } from '../../service' -import { responses, routeConfig, z } from 'koa-swagger-decorator' -import { GetWithdrawalResponse } from '../../swagger/executor_model' - -@Controller('') -export class WithdrawalTxController extends KoaController { - @routeConfig({ - method: 'get', - path: '/tx/withdrawal', - summary: 'Get withdrawal tx data', - description: 'Get withdrawal data', - tags: ['Withdrawal'], - operationId: 'getWithdrawalTx', - request: { - query: z.object({ - address: z.string().optional(), - sequence: z.number().optional(), - limit: z - .number() - .optional() - .default(20) - .refine((value) => [10, 20, 100, 500].includes(value), { - message: 'Invalid limit value' - }), - offset: z.number().optional().default(0), - descending: z.boolean().optional().default(true) - }) - } - }) - @responses(GetWithdrawalResponse) - @Get('/tx/withdrawal') - async getWithdrawalTxList(ctx: Context): Promise { - const withdrawalTxList = await getWithdrawalTxList(ctx.query as any) - if (withdrawalTxList) success(ctx, withdrawalTxList) - else error(ctx, ErrorTypes.API_ERROR) - } -} diff --git a/bots/src/controller/index.ts b/bots/src/controller/index.ts deleted file mode 100644 index 417fc8f1..00000000 --- a/bots/src/controller/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { KoaController } from 'koa-joi-controllers' -import { BatchController } from './batch/BatchController' -import { OutputController } from './executor/OutputController' -import { WithdrawalTxController } from './executor/WithdrawalTxController' -import { DepositTxController } from './executor/DepositTxController' -import { ClaimTxController } from './executor/ClaimTxController' - -export const executorController = [ - OutputController, - WithdrawalTxController, - DepositTxController, - ClaimTxController -].map((prototype) => new prototype()) as KoaController[] - -export const batchController = [BatchController].map( - (prototype) => new prototype() -) as KoaController[] diff --git a/bots/src/lib/compressor.spec.ts b/bots/src/lib/compressor.spec.ts deleted file mode 100644 index a30a6eab..00000000 --- a/bots/src/lib/compressor.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { compress, decompress } from './compressor' - -describe('Test compress and decompress functions', () => { - it('should correctly compress and decompress records', () => { - const records = [ - Buffer.from('Hello').toString('base64'), - Buffer.from('World').toString('base64') - ] - - const compressed = compress(records) - const decompressed = decompress(compressed) - expect(decompressed).toEqual(records) - - const decompressedStrs = decompressed.map((buffer) => buffer.toString()) - const originalStrs = records.map((buffer) => buffer.toString()) - expect(decompressedStrs).toEqual(originalStrs) - }) -}) diff --git a/bots/src/lib/compressor.ts b/bots/src/lib/compressor.ts deleted file mode 100644 index 048114ce..00000000 --- a/bots/src/lib/compressor.ts +++ /dev/null @@ -1,15 +0,0 @@ -import pako from 'pako' - -// compress tx data to submit L1 -export function compress(input: string[]): Buffer { - const recordsWithCommas = input.join(',') - const recordsBuffer = Buffer.from(recordsWithCommas) - return Buffer.from(pako.gzip(recordsBuffer)) -} - -// decompress indexed batch data -export function decompress(input: Buffer): string[] { - const decompressed = pako.inflate(input) - const output: string = Buffer.from(decompressed).toString() - return output.split(',') -} diff --git a/bots/src/lib/db.ts b/bots/src/lib/db.ts deleted file mode 100644 index 53bd3b0c..00000000 --- a/bots/src/lib/db.ts +++ /dev/null @@ -1,58 +0,0 @@ -import 'reflect-metadata' -import Bluebird from 'bluebird' -import { - ConnectionOptionsReader, - DataSource, - DataSourceOptions -} from 'typeorm' -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' -import CamelToSnakeNamingStrategy from '../orm/CamelToSnakeNamingStrategy' - -const debug = require('debug')('orm') - -import { RecordEntity, ExecutorOutputEntity } from '../orm' - -const staticOptions = { - supportBigNumbers: true, - bigNumberStrings: true, - entities: [RecordEntity, ExecutorOutputEntity] -} - -let DB: DataSource[] = [] - -function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions - debug( - `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ - pgOpts.port || 5432 - }` - ) - - return new DataSource({ - ...options, - ...staticOptions, - namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize() -} - -export async function initORM(): Promise { - const reader = new ConnectionOptionsReader() - const options = (await reader.all()) as PostgresConnectionOptions[] - - if (options.length && !options.filter((o) => o.name === 'default').length) { - options[0]['name' as any] = 'default' - } - - DB = await Bluebird.map(options, (opt) => initConnection(opt)) -} - -export function getDB(): DataSource[] { - if (!DB) { - throw new Error('DB not initialized') - } - return DB -} - -export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())) -} diff --git a/bots/src/lib/error.ts b/bots/src/lib/error.ts deleted file mode 100644 index a4ec64a9..00000000 --- a/bots/src/lib/error.ts +++ /dev/null @@ -1,102 +0,0 @@ -import * as sentry from '@sentry/node' - -export enum ErrorTypes { - // 400 Bad Request - INVALID_REQUEST_ERROR = 'INVALID_REQUEST_ERROR', - // 401 Unauthorized - AUTHENTICATION_ERROR = 'AUTHENTICATION_ERROR', - NO_PERMISSION_ERROR = 'NO_PERMISSION_ERROR', - // 403 Forbidden - FORBIDDEN = 'FORBIDDEN', - // 404 - NOT_FOUND_ERROR = 'NOT_FOUND_ERROR', - VALIDATOR_DOES_NOT_EXISTS = 'VALIDATOR_DOES_NOT_EXISTS', - // 408 - TIMEOUT = 'TIMEOUT', - // 429 Too Many Requests - RATE_LIMIT_ERROR = 'RATE_LIMIT_ERROR', - // 500 Internal Server Error - API_ERROR = 'API_ERROR', - // 503 Service Unavailable - SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE', - LCD_ERROR = 'LCD_ERROR' -} - -export enum ErrorCodes { - // 400 Bad Request - INVALID_REQUEST_ERROR = 400, - // 401 Unauthorized - AUTHENTICATION_ERROR = 401, - // 403 Forbidden - FORBIDDEN = 403, - // 404 - NOT_FOUND_ERROR = 404, - // 408 - TIMEOUT = 408, - // 429 Too Many Requests - RATE_LIMIT_ERROR = 429, - // 500 Internal Server Error - API_ERROR = 500, - // 503 Service Unavailable - SERVICE_UNAVAILABLE = 503 -} - -// error message -const errorMessage = {} - -export class APIError extends Error { - public type: string - public message: string - public code: string - public wrappedError?: Error - - constructor(type: ErrorTypes, code = '', message = '', err?: Error) { - super(message) - this.name = 'APIError' - this.type = type || ErrorTypes.API_ERROR - this.code = code - this.message = message || errorMessage[code] - this.wrappedError = err - } -} - -export function errorHandler( - callback: (ctx: any, type: string, code?: string, message?: string) => void -) { - return async (ctx: any, next: any) => { - try { - await next() - } catch (err) { - if (err instanceof APIError) { - if (err.type === ErrorTypes.LCD_ERROR && err.wrappedError) { - ctx.statusCode = (err.wrappedError as any).statusCode - ctx.body = (err.wrappedError as any).body - } - - if (err.type === ErrorTypes.API_ERROR) { - const errForThrow = err.wrappedError || err - - sentry.withScope((scope) => { - scope.addEventProcessor((event) => - sentry.addRequestDataToEvent(event, ctx.request) - ) - sentry.captureException(errForThrow) - }) - } - - callback(ctx, err.type, err.code, err.message) - } else if (err.isJoi) { - callback(ctx, 'INVALID_REQUEST_ERROR', err.statusCode, err.message) - } else { - sentry.withScope((scope) => { - scope.addEventProcessor((event) => - sentry.addRequestDataToEvent(event, ctx.request) - ) - sentry.captureException(err) - }) - - callback(ctx, 'API_ERROR', err.code, err.message) - } - } - } -} diff --git a/bots/src/lib/logger.ts b/bots/src/lib/logger.ts deleted file mode 100644 index 8d28bdc3..00000000 --- a/bots/src/lib/logger.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as winston from 'winston' -import DailyRotateFile from 'winston-daily-rotate-file' -import { config } from '../config' - -function createLogger(name: string) { - const formats = [winston.format.errors({ stack: true })] - - if (!config.USE_LOG_FILE) { - formats.push(winston.format.colorize()) - } - - formats.push( - winston.format.timestamp(), - winston.format.printf((info) => { - return `${info.timestamp} [${info.level} - ${name}]: ${ - info.stack || info.message - }` - }) - ) - - const logger = winston.createLogger({ - format: winston.format.combine(...formats), - defaultMeta: { service: 'user-service' } - }) - - if (config.USE_LOG_FILE) { - logger.add( - new DailyRotateFile({ - level: 'error', - dirname: 'logs', - filename: `${name}_error.log`, - zippedArchive: true - }) - ) - logger.add( - new DailyRotateFile({ - dirname: 'logs', - filename: `${name}_combined.log`, - zippedArchive: true - }) - ) - } else { - logger.add(new winston.transports.Console()) - } - - return logger -} - -export const executorLogger = createLogger('Executor') -export const outputLogger = createLogger('Output') -export const batchLogger = createLogger('Batch') -export const challengerLogger = createLogger('Challenger') diff --git a/bots/src/lib/monitor/helper.ts b/bots/src/lib/monitor/helper.ts deleted file mode 100644 index bcbf8231..00000000 --- a/bots/src/lib/monitor/helper.ts +++ /dev/null @@ -1,229 +0,0 @@ -import { BlockInfo, Event, LCDClient, TxInfo } from '@initia/initia.js' -import { getLatestOutputFromExecutor, getOutputFromExecutor } from '../query' -import { WithdrawStorage } from '../storage' -import { WithdrawalTx } from '../types' -import { sha3_256 } from '../util' -import OutputEntity from '../../orm/executor/OutputEntity' -import { EntityManager, EntityTarget, ObjectLiteral } from 'typeorm' - -class MonitorHelper { - /// - /// GET - /// - public async getSyncedState( - manager: EntityManager, - entityClass: EntityTarget, - name: string - ): Promise { - return await manager.getRepository(entityClass).findOne({ - where: { name: name } as any - }) - } - - public async getWithdrawalTxs( - manager: EntityManager, - entityClass: EntityTarget, - outputIndex: number - ): Promise { - return await manager.getRepository(entityClass).find({ - where: { outputIndex } as any - }) - } - - async getDepositTx( - manager: EntityManager, - entityClass: EntityTarget, - sequence: number, - metadata: string - ): Promise { - return await manager.getRepository(entityClass).findOne({ - where: { sequence, metadata } as any - }) - } - - public async getCoin( - manager: EntityManager, - entityClass: EntityTarget, - metadata: string - ): Promise { - return await manager.getRepository(entityClass).findOne({ - where: { l2Metadata: metadata } as any - }) - } - - public async getLastOutputFromDB( - manager: EntityManager, - entityClass: EntityTarget - ): Promise { - const lastOutput = await manager.getRepository(entityClass).find({ - order: { outputIndex: 'DESC' } as any, - take: 1 - }) - return lastOutput[0] ?? null - } - - public async getLastOutputIndex( - manager: EntityManager, - entityClass: EntityTarget - ): Promise { - const lastOutput = await this.getLastOutputFromDB(manager, entityClass) - const lastIndex = lastOutput ? lastOutput.outputIndex : 0 - return lastIndex - } - - public async getOutputByIndex( - manager: EntityManager, - entityClass: EntityTarget, - outputIndex: number - ): Promise { - return await manager.getRepository(entityClass).findOne({ - where: { outputIndex } as any - }) - } - - /// - /// SAVE - /// - public async saveEntity( - manager: EntityManager, - entityClass: EntityTarget, - entity: T - ): Promise { - return await manager.getRepository(entityClass).save(entity) - } - - /// - /// UTIL - /// - public async fetchEvents( - lcd: LCDClient, - height: number, - eventType: string - ): Promise<[boolean, any[]]> { - const searchRes = await lcd.tx.search({ - query: [{ key: 'tx.height', value: height.toString() }] - }) - - const extractEvents = (txs: TxInfo[]) => - txs - .filter((tx: TxInfo) => tx.events && tx.events.length > 0) - .flatMap((tx: TxInfo) => tx.events ?? []) - .filter((event: Event) => event.type === eventType) - const isEmpty = searchRes.txs.length === 0 - const events = extractEvents(searchRes.txs) - - return [isEmpty, events] - } - - public async fetchAllEvents( - lcd: LCDClient, - height: number - ): Promise<[boolean, any[]]> { - const searchRes = await lcd.tx.search({ - query: [{ key: 'tx.height', value: height.toString() }] - }) - - const extractAllEvents = (txs: TxInfo[]) => - txs - .filter((tx: TxInfo) => tx.events && tx.events.length > 0) - .flatMap((tx: TxInfo) => tx.events ?? []) - const isEmpty = searchRes.txs.length === 0 - const events = extractAllEvents(searchRes.txs) - - return [isEmpty, events] - } - - public eventsToAttrMap(event: any): { [key: string]: string } { - return event.attributes.reduce((obj, attr) => { - obj[attr.key] = attr.value - return obj - }, {}) - } - - public parseData(attrMap: { [key: string]: string }): { - [key: string]: string; - } { - return JSON.parse(attrMap['data']) - } - - /// - /// L1 HELPER - /// - - /// - /// L2 HELPER - /// - public calculateOutputEntity( - outputIndex: number, - blockInfo: BlockInfo, - merkleRoot: string, - startBlockNumber: number, - endBlockNumber: number - ): OutputEntity { - const version = outputIndex - const stateRoot = blockInfo.block.header.app_hash - const lastBlockHash = blockInfo.block_id.hash - const outputRoot = sha3_256( - Buffer.concat([ - sha3_256(version), - Buffer.from(stateRoot, 'base64'), - Buffer.from(merkleRoot, 'base64'), - Buffer.from(lastBlockHash, 'base64') - ]) - ).toString('base64') - - const outputEntity = { - outputIndex, - outputRoot, - stateRoot, - merkleRoot, - lastBlockHash, - startBlockNumber, - endBlockNumber - } - - return outputEntity - } - - async saveMerkleRootAndProof( - manager: EntityManager, - entityClass: EntityTarget, - entities: any[] // ChallengerWithdrawalTxEntity[] or ExecutorWithdrawalTxEntity[] - ): Promise { - const txs: WithdrawalTx[] = entities.map((entity) => ({ - bridge_id: BigInt(entity.bridgeId), - sequence: BigInt(entity.sequence), - sender: entity.sender, - receiver: entity.receiver, - l1_denom: entity.l1Denom, - amount: BigInt(entity.amount) - })) - - const storage = new WithdrawStorage(txs) - const merkleRoot = storage.getMerkleRoot() - for (let i = 0; i < entities.length; i++) { - entities[i].merkleRoot = merkleRoot - entities[i].merkleProof = storage.getMerkleProof(txs[i]) - await this.saveEntity(manager, entityClass, entities[i]) - } - return merkleRoot - } - - public async getLatestOutputFromExecutor() { - const outputRes = await getLatestOutputFromExecutor() - if (!outputRes.output) { - throw new Error('No output from executor') - } - return outputRes.output - } - - public async getOutputFromExecutor(outputIndex: number) { - const outputRes = await getOutputFromExecutor(outputIndex) - if (!outputRes.output) { - throw new Error('No output from executor') - } - return outputRes.output - } -} - -export default MonitorHelper diff --git a/bots/src/lib/monitor/index.ts b/bots/src/lib/monitor/index.ts deleted file mode 100644 index 2552b38f..00000000 --- a/bots/src/lib/monitor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { Monitor } from './monitor' diff --git a/bots/src/lib/monitor/l1.ts b/bots/src/lib/monitor/l1.ts deleted file mode 100644 index 08233f39..00000000 --- a/bots/src/lib/monitor/l1.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Monitor } from './monitor' -import { Coin, Msg, MsgFinalizeTokenDeposit } from '@initia/initia.js' -import { - ExecutorDepositTxEntity, - ExecutorUnconfirmedTxEntity, - ExecutorOutputEntity -} from '../../orm' -import { EntityManager } from 'typeorm' -import { RPCClient, RPCSocket } from '../rpc' -import { getDB } from '../../worker/bridgeExecutor/db' -import winston from 'winston' -import { config } from '../../config' -import { TxWallet, WalletType, getWallet, initWallet } from '../wallet' - -export class L1Monitor extends Monitor { - executor: TxWallet - - constructor( - public socket: RPCSocket, - public rpcClient: RPCClient, - logger: winston.Logger - ) { - super(socket, rpcClient, logger); - [this.db] = getDB() - initWallet(WalletType.Executor, config.l2lcd) - this.executor = getWallet(WalletType.Executor) - } - - public name(): string { - return 'executor_l1_monitor' - } - - public async handleInitiateTokenDeposit( - manager: EntityManager, - data: { [key: string]: string } - ): Promise<[ExecutorDepositTxEntity, MsgFinalizeTokenDeposit]> { - const lastIndex = await this.helper.getLastOutputIndex( - manager, - ExecutorOutputEntity - ) - - const entity: ExecutorDepositTxEntity = { - sequence: data['l1_sequence'], - sender: data['from'], - receiver: data['to'], - l1Denom: data['l1_denom'], - l2Denom: data['l2_denom'], - amount: data['amount'], - data: data['data'], - outputIndex: lastIndex + 1, - bridgeId: this.bridgeId.toString(), - l1Height: this.currentHeight - } - - return [ - entity, - new MsgFinalizeTokenDeposit( - this.executor.key.accAddress, - data['from'], - data['to'], - new Coin(data['l2_denom'], data['amount']), - parseInt(data['l1_sequence']), - this.currentHeight, - data['l1_denom'], - Buffer.from(data['data'], 'hex').toString('base64') - ) - ] - } - - public async handleEvents(manager: EntityManager): Promise { - const [isEmpty, events] = await this.helper.fetchAllEvents( - config.l1lcd, - this.currentHeight - ) - - if (isEmpty) return false - - const msgs: Msg[] = [] - const depositEntities: ExecutorDepositTxEntity[] = [] - - const depositEvents = events.filter( - (evt) => evt.type === 'initiate_token_deposit' - ) - for (const evt of depositEvents) { - const attrMap = this.helper.eventsToAttrMap(evt) - if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue - const [entity, msg] = await this.handleInitiateTokenDeposit( - manager, - attrMap - ) - - depositEntities.push(entity) - if (msg) msgs.push(msg) - } - - await this.processMsgs(manager, msgs, depositEntities) - return true - } - - async processMsgs( - manager: EntityManager, - msgs: Msg[], - depositEntities: ExecutorDepositTxEntity[] - ): Promise { - if (msgs.length == 0) return - const stringfyMsgs = msgs.map((msg) => msg.toJSON().toString()) - try { - for (const entity of depositEntities) { - await this.helper.saveEntity(manager, ExecutorDepositTxEntity, entity) - } - - await this.executor.transaction(msgs) - this.logger.info( - `Succeeded to submit tx in height: ${this.currentHeight} ${stringfyMsgs}` - ) - } catch (err) { - const errMsg = err.response?.data - ? JSON.stringify(err.response?.data) - : err.toString() - this.logger.info( - `Failed to submit tx in height: ${this.currentHeight}\nMsg: ${stringfyMsgs}\nError: ${errMsg}` - ) - - for (const entity of depositEntities) { - await this.helper.saveEntity(manager, ExecutorUnconfirmedTxEntity, { - ...entity, - error: errMsg, - processed: false - }) - } - } - } -} diff --git a/bots/src/lib/monitor/l2.ts b/bots/src/lib/monitor/l2.ts deleted file mode 100644 index b18496ab..00000000 --- a/bots/src/lib/monitor/l2.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { ExecutorOutputEntity, ExecutorWithdrawalTxEntity } from '../../orm' -import { Monitor } from './monitor' -import { WithdrawStorage } from '../storage' -import { WithdrawalTx } from '../types' -import { EntityManager } from 'typeorm' -import { BlockInfo } from '@initia/initia.js' -import { getDB } from '../../worker/bridgeExecutor/db' -import { RPCClient, RPCSocket } from '../rpc' -import winston from 'winston' -import { config } from '../../config' -import { getBridgeInfo } from '../query' - -export class L2Monitor extends Monitor { - submissionInterval: number - nextSubmissionTimeSec: number - - constructor( - public socket: RPCSocket, - public rpcClient: RPCClient, - logger: winston.Logger - ) { - super(socket, rpcClient, logger); - [this.db] = getDB() - this.nextSubmissionTimeSec = this.getCurTimeSec() - } - - public name(): string { - return 'executor_l2_monitor' - } - - dateToSeconds(date: Date): number { - return Math.floor(date.getTime() / 1000) - } - - private async setNextSubmissionTimeSec(): Promise { - const bridgeInfo = await getBridgeInfo(this.bridgeId) - this.submissionInterval = - bridgeInfo.bridge_config.submission_interval.seconds.toNumber() - this.nextSubmissionTimeSec += this.submissionInterval - } - - private getCurTimeSec(): number { - return this.dateToSeconds(new Date()) - } - - private async handleInitiateTokenWithdrawalEvent( - manager: EntityManager, - data: { [key: string]: string } - ): Promise { - const outputInfo = await this.helper.getLastOutputFromDB( - manager, - ExecutorOutputEntity - ) - if (!outputInfo) return - const pair = await config.l1lcd.ophost.tokenPairByL2Denom( - this.bridgeId, - data['denom'] - ) - - const tx: ExecutorWithdrawalTxEntity = { - l1Denom: pair.l1_denom, - l2Denom: pair.l2_denom, - sequence: data['l2_sequence'], - sender: data['from'], - receiver: data['to'], - amount: data['amount'], - bridgeId: this.bridgeId.toString(), - outputIndex: outputInfo ? outputInfo.outputIndex + 1 : 1, - merkleRoot: '', - merkleProof: [] - } - - await this.helper.saveEntity(manager, ExecutorWithdrawalTxEntity, tx) - } - - public async handleEvents(manager: EntityManager): Promise { - const [isEmpty, events] = await this.helper.fetchAllEvents( - config.l2lcd, - this.currentHeight - ) - if (isEmpty) return false - - const withdrawalEvents = events.filter( - (evt) => evt.type === 'initiate_token_withdrawal' - ) - for (const evt of withdrawalEvents) { - const attrMap = this.helper.eventsToAttrMap(evt) - await this.handleInitiateTokenWithdrawalEvent(manager, attrMap) - } - - return true - } - - private async saveMerkleRootAndProof( - manager: EntityManager, - entities: ExecutorWithdrawalTxEntity[] - ): Promise { - const txs: WithdrawalTx[] = entities.map( - (entity: ExecutorWithdrawalTxEntity) => ({ - bridge_id: BigInt(entity.bridgeId), - sequence: BigInt(entity.sequence), - sender: entity.sender, - receiver: entity.receiver, - l1_denom: entity.l1Denom, - amount: BigInt(entity.amount) - }) - ) - - const storage = new WithdrawStorage(txs) - const merkleRoot = storage.getMerkleRoot() - for (let i = 0; i < entities.length; i++) { - entities[i].merkleRoot = merkleRoot - entities[i].merkleProof = storage.getMerkleProof(txs[i]) - await this.helper.saveEntity( - manager, - ExecutorWithdrawalTxEntity, - entities[i] - ) - } - return merkleRoot - } - - public async handleBlock(manager: EntityManager): Promise { - if (this.getCurTimeSec() < this.nextSubmissionTimeSec) return - const lastOutput = await this.helper.getLastOutputFromDB( - manager, - ExecutorOutputEntity - ) - - const lastOutputEndBlockNumber = lastOutput ? lastOutput.endBlockNumber : 0 - const lastOutputIndex = lastOutput ? lastOutput.outputIndex : 0 - - const startBlockNumber = lastOutputEndBlockNumber + 1 - const endBlockNumber = this.currentHeight - const outputIndex = lastOutputIndex + 1 - - if (startBlockNumber > endBlockNumber) return - - const blockInfo: BlockInfo = await config.l2lcd.tendermint.blockInfo( - this.currentHeight - ) - - // fetch txs and build merkle tree for withdrawal storage - const txEntities = await this.helper.getWithdrawalTxs( - manager, - ExecutorWithdrawalTxEntity, - outputIndex - ) - - const merkleRoot = await this.saveMerkleRootAndProof(manager, txEntities) - - const outputEntity = this.helper.calculateOutputEntity( - outputIndex, - blockInfo, - merkleRoot, - startBlockNumber, - endBlockNumber - ) - - await this.helper.saveEntity(manager, ExecutorOutputEntity, outputEntity) - - await this.setNextSubmissionTimeSec() - } -} diff --git a/bots/src/lib/monitor/monitor.ts b/bots/src/lib/monitor/monitor.ts deleted file mode 100644 index 915475b5..00000000 --- a/bots/src/lib/monitor/monitor.ts +++ /dev/null @@ -1,134 +0,0 @@ -import Bluebird from 'bluebird' -import { RPCClient, RPCSocket } from '../rpc' -import { StateEntity } from '../../orm' -import { DataSource, EntityManager } from 'typeorm' -import MonitorHelper from './helper' -import winston from 'winston' -import { INTERVAL_MONITOR, config } from '../../config' - -const MAX_BLOCKS = 20 // DO NOT CHANGE THIS, hard limit is 20 in cometbft. -const MAX_RETRY_INTERVAL = 30_000 - -export abstract class Monitor { - public syncedHeight: number - public currentHeight: number - protected db: DataSource - protected isRunning = false - protected bridgeId: number - protected retryNum = 0 - helper: MonitorHelper = new MonitorHelper() - - constructor( - public socket: RPCSocket, - public rpcClient: RPCClient, - public logger: winston.Logger - ) { - this.bridgeId = config.BRIDGE_ID - } - - public async run(): Promise { - const state = await this.db.getRepository(StateEntity).findOne({ - where: { - name: this.name() - } - }) - - this.syncedHeight = state?.height || 0 - - if (!state) { - if (this.name() === 'executor_l1_monitor') { - this.syncedHeight = config.EXECUTOR_L1_MONITOR_HEIGHT - } else if (this.name() === 'executor_l2_monitor') { - this.syncedHeight = config.EXECUTOR_L2_MONITOR_HEIGHT - } - - await this.db - .getRepository(StateEntity) - .save({ name: this.name(), height: this.syncedHeight }) - } - - this.socket.initialize() - this.isRunning = true - await this.monitor() - } - - public stop(): void { - this.socket.stop() - this.isRunning = false - } - - async handleBlockWithStateUpdate(manager: EntityManager): Promise { - await this.handleBlock(manager) - if (this.syncedHeight % 10 === 0) { - this.logger.info(`${this.name()} height ${this.syncedHeight}`) - } - this.syncedHeight++ - await manager - .getRepository(StateEntity) - .update({ name: this.name() }, { height: this.syncedHeight }) - } - - public async monitor(): Promise { - while (this.isRunning) { - try { - const latestHeight = this.socket.latestHeight - if (!latestHeight || !(latestHeight > this.syncedHeight)) continue - const blockchainData = await this.rpcClient.getBlockchain( - this.syncedHeight + 1, - // cap the query to fetch 20 blocks at maximum - // DO NOT CHANGE THIS, hard limit is 20 in cometbft. - Math.min(latestHeight, this.syncedHeight + MAX_BLOCKS) - ) - if (blockchainData === null) continue - - await this.db.transaction(async (manager: EntityManager) => { - for (const metadata of blockchainData.block_metas.reverse()) { - this.currentHeight = this.syncedHeight + 1 - - if (this.currentHeight !== parseInt(metadata.header.height)) { - throw new Error( - `expected block meta is the height ${this.currentHeight}, but got ${metadata.header.height}` - ) - } - - if (parseInt(metadata.num_txs) === 0) { - await this.handleBlockWithStateUpdate(manager) - continue - } - - // handle event always called when there is a tx in a block, - // so empty means, the tx indexing is still on going. - const ok: boolean = await this.handleEvents(manager) - if (!ok) { - this.retryNum++ - if (this.retryNum * INTERVAL_MONITOR >= MAX_RETRY_INTERVAL) { - // rotate when tx index data is not found during 30s after block stored. - this.rpcClient.rotateRPC() - } - break - } - this.retryNum = 0 - await this.handleBlockWithStateUpdate(manager) - } - }) - } catch (err) { - this.logger.info(err) - this.stop() - throw new Error(`Error in ${this.name()} ${err}`) - } finally { - await Bluebird.delay(INTERVAL_MONITOR) - } - } - } - - // eslint-disable-next-line - public async handleEvents(manager: EntityManager): Promise {} - - // eslint-disable-next-line - public async handleBlock(manager: EntityManager): Promise {} - - // eslint-disable-next-line - public name(): string { - return '' - } -} diff --git a/bots/src/lib/query.ts b/bots/src/lib/query.ts deleted file mode 100644 index 94af7415..00000000 --- a/bots/src/lib/query.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { BridgeInfo, OutputInfo, TokenPair } from '@initia/initia.js' -import { config } from '../config' -import { - DepositTxResponse, - OutputResponse, - WithdrawalTxResponse -} from './types' -import axios from 'axios' - -/// LCD query - -// get the latest output from L1 chain -export async function getLastOutputInfo( - bridgeId: number -): Promise { - const [outputInfos] = await config.l1lcd.ophost.outputInfos(bridgeId, { - 'pagination.limit': '1', - 'pagination.reverse': 'true' - }) - if (outputInfos.length === 0) return null - return outputInfos[0] -} - -// get the output by index from L1 chain -export async function getOutputInfoByIndex( - bridgeId: number, - outputIndex: number -): Promise { - return await config.l1lcd.ophost.outputInfo(bridgeId, outputIndex) -} - -export async function getBridgeInfo(bridgeId: number): Promise { - return await config.l1lcd.ophost.bridgeInfo(bridgeId) -} - -export async function getTokenPairByL1Denom(denom: string): Promise { - return await config.l1lcd.ophost.tokenPairByL1Denom(config.BRIDGE_ID, denom) -} - -/// API query - -export async function getWithdrawalTxFromExecutor( - bridge_id: number, - sequence: number -): Promise { - const url = `${config.EXECUTOR_URI}/tx/withdrawal/${bridge_id}/${sequence}` - - const res = await axios.get(url) - return res.data -} - -export async function getDepositTxFromExecutor( - bridge_id: number, - sequence: number -): Promise { - const url = `${config.EXECUTOR_URI}/tx/deposit/${bridge_id}/${sequence}` - const res = await axios.get(url) - return res.data -} - -// fetching the output by index from l2 chain -export async function getOutputFromExecutor( - outputIndex: number -): Promise { - const url = `${config.EXECUTOR_URI}/output/${outputIndex}` - const res = await axios.get(url) - return res.data -} - -// fetching the latest output from l2 chain -export async function getLatestOutputFromExecutor(): Promise { - const url = `${config.EXECUTOR_URI}/output/latest` - const res = await axios.get(url) - return res.data -} - -export const checkHealth = async (url: string, timeout = 60_000) => { - const startTime = Date.now() - - while (Date.now() - startTime < timeout) { - try { - const response = await axios.get(url) - if (response.status === 200) return - } catch { - continue - } - await new Promise((res) => setTimeout(res, 1_000)) - } -} diff --git a/bots/src/lib/response.ts b/bots/src/lib/response.ts deleted file mode 100644 index 153bf112..00000000 --- a/bots/src/lib/response.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Context } from 'koa' -import { ErrorTypes } from './error' - -const TYPES_TO_HTTP_STATUS_CODES = { - [ErrorTypes.INVALID_REQUEST_ERROR]: 400, // Bad Request - [ErrorTypes.AUTHENTICATION_ERROR]: 401, // Unauthorized - [ErrorTypes.NO_PERMISSION_ERROR]: 401, - [ErrorTypes.FORBIDDEN]: 403, // Forbidden - [ErrorTypes.VALIDATOR_DOES_NOT_EXISTS]: 404, - [ErrorTypes.NOT_FOUND_ERROR]: 404, - [ErrorTypes.TIMEOUT]: 408, - [ErrorTypes.RATE_LIMIT_ERROR]: 429, // Too Many Requests - [ErrorTypes.API_ERROR]: 500, - [ErrorTypes.SERVICE_UNAVAILABLE]: 503, - [ErrorTypes.LCD_ERROR]: 500 -} - -export function success(ctx: Context, body: any = null, statusCode = 200) { - ctx.status = statusCode - - if (body === null) { - ctx.body = JSON.stringify(body) - } else { - ctx.body = body - } -} - -export function error( - ctx: Context, - type: string, - code = '', - message = '' -): void { - ctx.status = TYPES_TO_HTTP_STATUS_CODES[type] || 500 - - const body: { - type: string; - message: string | undefined; - code: string | undefined; - } = { - type, - message: undefined, - code: undefined - } - - if (message) { - body.message = message - } - - if (code) { - body.code = code - } - - ctx.body = body -} diff --git a/bots/src/lib/rpc.ts b/bots/src/lib/rpc.ts deleted file mode 100644 index fc31cd4b..00000000 --- a/bots/src/lib/rpc.ts +++ /dev/null @@ -1,313 +0,0 @@ -import * as winston from 'winston' -import axios, { AxiosRequestConfig } from 'axios' -import Websocket from 'ws' - -export class RPCSocket { - public ws: Websocket - public wsUrl: string - public sendedPingAt = 0 - public isAlive = true - public alivedAt: number - public updateTimer: NodeJS.Timeout - public latestHeight?: number - logger: winston.Logger - rpcUrl: string - curRPCUrlIndex: number - - constructor( - public rpcUrls: string[], - public interval: number, - logger: winston.Logger - ) { - if (this.rpcUrls.length === 0) { - throw new Error('RPC URLs list cannot be empty') - } - this.curRPCUrlIndex = 0 - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] - this.wsUrl = this.rpcUrl.replace('http', 'ws') + '/websocket' - this.logger = logger - } - - public initialize(): void { - this.connect() - this.updateTimer = setTimeout(() => this.tick(), this.interval) - } - - public rotateRPC() { - this.curRPCUrlIndex = (this.curRPCUrlIndex + 1) % this.rpcUrls.length - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] - this.wsUrl = this.rpcUrl.replace('http', 'ws') + '/websocket' - this.logger.info(`Rotate WS RPC to ${this.rpcUrl}`) - } - - public stop(): void { - if (this.ws) this.ws.terminate() - } - - public tick(): void { - const now = Date.now() - if ( - this.ws && - this.ws.readyState === this.ws.OPEN && - now - this.sendedPingAt > 10000 - ) { - this.ws.ping() - this.sendedPingAt = now - } - - this.checkAlive() - - if (this.updateTimer) clearTimeout(this.updateTimer) - this.updateTimer = setTimeout(() => this.tick(), this.interval) - } - - protected alive(): void { - if (!this.isAlive) { - const downtime = ( - (Date.now() - this.alivedAt - this.interval) / - 60 / - 1000 - ).toFixed(1) - const msg = `${this.constructor.name} is now alive. (downtime ${downtime} minutes)` - this.logger.info(msg) - this.isAlive = true - } - this.alivedAt = Date.now() - } - - private checkAlive(): void { - // no responsed more than 3 minutes, it is down - if (this.isAlive && Date.now() - this.alivedAt > 3 * 60 * 1000) { - const msg = `${this.constructor.name} is no response!` - this.logger.info(msg) - this.isAlive = false - } - } - - public connect(): void { - this.disconnect() - this.ws = new Websocket(this.wsUrl) - this.ws.on('open', () => this.onConnect()) - this.ws.on('close', (code, reason) => - this.onDisconnect(code, reason.toString()) - ) - this.ws.on('error', (error) => this.onError(error)) - this.ws.on('message', async (raw) => await this.onRawData(raw)) - this.ws.on('ping', () => this.ws.pong()) - this.ws.on('pong', () => this.alive()) - } - - public disconnect(): void { - if (this.ws) this.ws.terminate() - } - - protected onConnect(): void { - const request = { - jsonrpc: '2.0', - method: 'subscribe', - id: 0, - params: { - query: `tm.event = 'NewBlock'` - } - } - - this.ws.send(JSON.stringify(request)) - this.logger.info( - `${this.constructor.name}: websocket connected to ${this.wsUrl}` - ) - this.alive() - } - - protected onDisconnect(code: number, reason: string): void { - this.rotateRPC() - this.logger.info( - `${this.constructor.name}: websocket disconnected (${code}: ${reason})` - ) - // if disconnected, try connect again - setTimeout(() => this.connect(), 1000) - } - - // eslint-disable-next-line - protected onError(error): void { - this.logger.info(`${this.constructor.name} websocket: `, error) - } - - // eslint-disable-next-line - protected async onRawData(raw): Promise { - let data - - try { - data = JSON.parse(raw) - } catch (error) { - this.logger.info(`${this.constructor.name}: JSON parse error ${raw}`) - return - } - - try { - if (data['result']?.['data']?.['value']) { - this.latestHeight = Number.parseInt( - data['result']?.['data']?.['value']['block']['header']['height'] - ) - } - } catch (error) { - this.logger.info(error) - } - - this.alive() - } -} - -export class RPCClient { - private curRPCUrlIndex = 0 - private rpcUrl: string - - constructor( - public rpcUrls: string[], - public logger: winston.Logger - ) { - if (this.rpcUrls.length === 0) { - throw new Error('RPC URLs list cannot be empty') - } - this.curRPCUrlIndex = 0 - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] - } - - public rotateRPC() { - this.curRPCUrlIndex = (this.curRPCUrlIndex + 1) % this.rpcUrls.length - this.rpcUrl = this.rpcUrls[this.curRPCUrlIndex] - this.logger.info(`Rotate RPC to ${this.rpcUrl}`) - } - - async getRequest( - path: string, - params?: Record - ): Promise { - const options: AxiosRequestConfig = { - headers: { - 'Content-Type': 'application/json', - 'User-Agent': 'initia-rollup' - } - } - - let url = `${this.rpcUrl}${path}` - params && - Object.keys(params).forEach( - (key) => params[key] === undefined && delete params[key] - ) - const qs = new URLSearchParams(params as any).toString() - if (qs.length) { - url += `?${qs}` - } - - try { - const response = await axios.get(url, options) - if (response.status !== 200) { - throw new Error(`Invalid status code: ${response.status}`) - } - - const data = response.data - if (!data || typeof data.jsonrpc !== 'string') { - throw new Error('Failed to query RPC') - } - - return data.result - } catch (e) { - throw new Error(`RPC request to ${url} failed by ${e}`) - } - } - - async getBlockchain( - min_height: number, - max_height: number - ): Promise { - const blockchainResult: Blockchain = await this.getRequest(`/blockchain`, { - minHeight: min_height.toString(), - maxHeight: max_height.toString() - }) - - if (!blockchainResult) { - this.logger.info('failed get blockchain from rpc') - return null - } - - return blockchainResult - } - - async getBlockBulk(start: string, end: string): Promise { - const blockBulksResult: BlockBulk = await this.getRequest(`/block_bulk`, { - start, - end - }) - - if (!blockBulksResult) { - this.logger.info('failed get block bulks from rpc') - return null - } - - return blockBulksResult - } - - async getRawCommit(end: string): Promise { - const rawCommitResult: RawCommit = await this.getRequest(`/raw_commit`, { - height: end - }) - - if (!rawCommitResult) { - this.logger.info('failed get raw commit from rpc') - return null - } - - return rawCommitResult - } - - async lookupInvalidBlock(): Promise { - const invalidBlockResult: InvalidBlock = - await this.getRequest(`/invalid_block`) - - if (invalidBlockResult.reason !== '' && invalidBlockResult.height !== '0') { - return invalidBlockResult - } - - return null - } - - async getLatestBlockHeight(): Promise { - const abciInfo: ABCIInfo = await this.getRequest(`/abci_info`) - - if (abciInfo) { - return parseInt(abciInfo.last_block_height) - } - - throw new Error(`failed to get latest block height`) - } -} - -export interface Blockchain { - last_height: string; - block_metas: BlockMeta[]; -} - -export interface BlockMeta { - block_id: any; - block_size: string; - header: any; - num_txs: string; -} -export interface BlockBulk { - blocks: string[]; -} -export interface RawCommit { - commit: string; -} - -interface InvalidBlock { - reason: string; - height: string; -} - -interface ABCIInfo { - data: string; - version: string; - last_block_height: string; - last_block_app_hash: string; -} diff --git a/bots/src/lib/slack.ts b/bots/src/lib/slack.ts deleted file mode 100644 index dc5fd001..00000000 --- a/bots/src/lib/slack.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Wallet } from '@initia/initia.js' -import axios from 'axios' -import BigNumber from 'bignumber.js' -import { config } from '../config' -import * as http from 'http' -import * as https from 'https' -import UnconfirmedTxEntity from '../orm/executor/UnconfirmedTxEntity' -import { ChallengedOutputEntity } from '../orm/index' - -const postedKeys = new Set() - -const ax = axios.create({ - httpAgent: new http.Agent({ keepAlive: true }), - httpsAgent: new https.Agent({ keepAlive: true }), - timeout: 15000 -}) - -export async function notifySlack(key: string, text: { text: string }, isError: boolean = true) { - if (config.SLACK_WEB_HOOK === undefined || config.SLACK_WEB_HOOK === '') return - - const keyExists = postedKeys.has(key) - - if (isError) { - if (!keyExists) { - await ax.post(config.SLACK_WEB_HOOK, text) - postedKeys.add(key) - } - } else { - if (keyExists) { - await ax.post(config.SLACK_WEB_HOOK, text) - postedKeys.delete(key) - } - } -} - -export function buildResolveErrorNotification(description: string): { text: string } { - let notification = '```' - notification += `[INFO] Error Resolved Notification\n` - notification += `\n` - notification += `${description}\n` - notification += '```' - return { - text: notification - } -} - - -export function buildNotEnoughBalanceNotification( - wallet: Wallet, - balance: number, - denom: string -): { text: string } { - let notification = '```' - notification += `[WARN] Enough Balance Notification\n` - notification += `\n` - notification += `Chain ID: ${wallet.lcd.config.chainId}\n` - notification += `Endpoint: ${wallet.lcd.URL}\n` - notification += `Address : ${wallet.key.accAddress}\n` - notification += `Balance : ${new BigNumber(balance) - .div(1e6) - .toFixed(6)} ${denom}\n` - notification += '```' - const text = `${notification}` - return { - text - } -} - -export function buildFailedTxNotification(data: UnconfirmedTxEntity): { - text: string; -} { - let notification = '```' - notification += `[WARN] Bridge Processed Tx Notification\n` - - notification += `[L1] ${config.L1_CHAIN_ID} => [L2] ${config.L2_CHAIN_ID}\n` - notification += `\n` - notification += `Bridge ID: ${data.bridgeId}\n` - notification += `Sequence: ${data.sequence}\n` - notification += `Sender: ${data.sender}\n` - notification += `To: ${data.receiver}\n` - notification += `\n` - notification += `Amount: ${new BigNumber(data.amount) - .div(1e6) - .toFixed(6)} ${data.l1Denom}\n` - notification += `\n` - notification += `L1 Height: ${data.l1Height}\n` - notification += `Error : ${data.error}\n` - notification += '```' - const text = `${notification}` - - return { - text - } -} - -export function buildChallengerNotification( - challengedOutput: ChallengedOutputEntity -): { text: string } { - let notification = '```' - notification += `[WARN] Challenger Notification\n` - notification += `\n` - notification += `Bridge ID : ${challengedOutput.bridgeId}\n` - notification += `OutputIndex : ${challengedOutput.outputIndex}\n` - notification += `Reason : ${challengedOutput.reason}\n` - notification += '```' - const text = `${notification}` - - return { - text - } -} diff --git a/bots/src/lib/storage.spec.ts b/bots/src/lib/storage.spec.ts deleted file mode 100644 index 5558cae8..00000000 --- a/bots/src/lib/storage.spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { WithdrawStorage } from './storage' -import { sha3_256 } from './util' - -const v1 = [ - { - bridge_id: BigInt(1), - sequence: BigInt(1), - sender: 'init1wzenw7r2t2ra39k4l9yqq95pw55ap4sm4vsa9g', - receiver: 'init174knscjg688ddtxj8smyjz073r3w5mmsp3m0m2', - l1_denom: 'uinit', - amount: BigInt(1000000) - }, - { - bridge_id: BigInt(1), - sequence: BigInt(2), - sender: 'init1wzenw7r2t2ra39k4l9yqq95pw55ap4sm4vsa9g', - receiver: 'init174knscjg688ddtxj8smyjz073r3w5mmsp3m0m2', - l1_denom: 'uinit', - amount: BigInt(1000000) - }, - { - bridge_id: BigInt(1), - sequence: BigInt(3), - sender: 'init1wzenw7r2t2ra39k4l9yqq95pw55ap4sm4vsa9g', - receiver: 'init174knscjg688ddtxj8smyjz073r3w5mmsp3m0m2', - l1_denom: 'uinit', - amount: BigInt(1000000) - } -] - -describe('WithdrawStorage', () => { - it('verify v1', async () => { - const airdrop = new WithdrawStorage(v1) - const target = v1[0] - - const merkleRoot = airdrop.getMerkleRoot() - const merkleProof = airdrop.getMerkleProof(target) - const version = 2 - const stateRoot = 'C2ZdjJ7uX41NaadA/FjlMiG6btiDfYnxE2ABqJocHxI=' - const lastBlockHash = 'tgmfQJT4uipVToW631xz0RXdrfzu7n5XxGNoPpX6isI=' - const outputRoot = sha3_256( - Buffer.concat([ - sha3_256(version), - Buffer.from(stateRoot, 'base64'), // state root - Buffer.from(merkleRoot, 'base64'), - Buffer.from(lastBlockHash, 'base64') // block hash - ]) - ).toString('base64') - expect(airdrop.verify(merkleProof, target)).toBeTruthy() - - expect(merkleRoot).toEqual('EYgpXs1b+Z3AdGqjjtJHylrGzCjXtBKDD2UTPXelUk4=') - expect(merkleProof).toEqual([ - '5eJNy8mEqvyhysgWCqi7JQ7K602FtSpz+wDRNQitQMc=' - ]) - expect(outputRoot).toEqual('euaoJcFRXfV/6F0AiC0vYwXUY4NPHfCn9LbFMPieNsA=') - }) -}) diff --git a/bots/src/lib/storage.ts b/bots/src/lib/storage.ts deleted file mode 100644 index 501519fe..00000000 --- a/bots/src/lib/storage.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { MerkleTree } from 'merkletreejs' -import { sha3_256 } from './util' -import { WithdrawalTx } from './types' -import { AccAddress } from '@initia/initia.js' - -function convertHexToBase64(hex: string): string { - return Buffer.from(hex, 'hex').toString('base64') -} - -export class WithdrawStorage { - private tree: MerkleTree - - constructor(txs: Array) { - const leaves = txs.map((tx) => { - const bridge_id_buf = Buffer.alloc(8) - bridge_id_buf.writeBigInt64BE(tx.bridge_id) - - const sequence_buf = Buffer.alloc(8) - sequence_buf.writeBigInt64BE(tx.sequence) - - const amount_buf = Buffer.alloc(8) - amount_buf.writeBigInt64BE(tx.amount) - - return sha3_256( - Buffer.concat([ - bridge_id_buf, - sequence_buf, - AccAddress.toBuffer(tx.sender), - AccAddress.toBuffer(tx.receiver), - Buffer.from(tx.l1_denom, 'utf8'), - amount_buf - ]) - ) - }) - - this.tree = new MerkleTree(leaves, sha3_256, { sort: true }) - } - - public getMerkleRoot(): string { - return convertHexToBase64(this.tree.getHexRoot().replace('0x', '')) - } - - public getMerkleProof(tx: WithdrawalTx): string[] { - const bridge_id_buf = Buffer.alloc(8) - bridge_id_buf.writeBigInt64BE(tx.bridge_id) - - const sequence_buf = Buffer.alloc(8) - sequence_buf.writeBigInt64BE(tx.sequence) - - const amount_buf = Buffer.alloc(8) - amount_buf.writeBigInt64BE(tx.amount) - - return this.tree - .getHexProof( - sha3_256( - Buffer.concat([ - bridge_id_buf, - sequence_buf, - AccAddress.toBuffer(tx.sender), - AccAddress.toBuffer(tx.receiver), - Buffer.from(tx.l1_denom, 'utf8'), - amount_buf - ]) - ) - ) - .map((v) => convertHexToBase64(v.replace('0x', ''))) - } - - public verify( - proof: string[], - tx: { - bridge_id: bigint; - sequence: bigint; - sender: string; - receiver: string; - l1_denom: string; - amount: bigint; - } - ): boolean { - const bridge_id_buf = Buffer.alloc(8) - bridge_id_buf.writeBigInt64BE(tx.bridge_id) - - const sequence_buf = Buffer.alloc(8) - sequence_buf.writeBigInt64BE(tx.sequence) - - const amount_buf = Buffer.alloc(8) - amount_buf.writeBigInt64BE(tx.amount) - - let hashBuf = sha3_256( - Buffer.concat([ - bridge_id_buf, - sequence_buf, - AccAddress.toBuffer(tx.sender), - AccAddress.toBuffer(tx.receiver), - Buffer.from(tx.l1_denom, 'utf8'), - amount_buf - ]) - ) - - proof.forEach((proofElem) => { - const proofBuf = Buffer.from(proofElem, 'base64') - - if (Buffer.compare(hashBuf, proofBuf) === -1) { - hashBuf = sha3_256(Buffer.concat([hashBuf, proofBuf])) - } else { - hashBuf = sha3_256(Buffer.concat([proofBuf, hashBuf])) - } - }) - - return this.getMerkleRoot() === hashBuf.toString('base64') - } -} diff --git a/bots/src/lib/tx.ts b/bots/src/lib/tx.ts deleted file mode 100644 index 7ee0fdb7..00000000 --- a/bots/src/lib/tx.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - Fee, - LCDClient, - Msg, - WaitTxBroadcastResult, - Wallet -} from '@initia/initia.js' - -export async function sendTx( - wallet: Wallet, - msgs: Msg[], - fee?: Fee, - accountNumber?: number, - sequence?: number, - timeout = 10_000 -): Promise { - const signedTx = await wallet.createAndSignTx({ - msgs, - fee, - accountNumber, - sequence - }) - const broadcastResult = await wallet.lcd.tx.broadcast(signedTx, timeout) - if (broadcastResult['code']) throw new Error(broadcastResult.raw_log) - return broadcastResult -} - -export async function sendRawTx( - wallet: Wallet, - txBytes: string, - timeout = 10_000 -): Promise { - const broadcastResult = await wallet.lcd.tx.broadcast(txBytes, timeout) - if (broadcastResult['code']) throw new Error(broadcastResult.raw_log) - return broadcastResult -} - -// check whether batch submission interval is met -export async function getLatestBlockHeight(client: LCDClient): Promise { - const block = await client.tendermint.blockInfo().catch((error) => { - throw new Error(`Error getting block info from L2: ${error}`) - }) - - return parseInt(block.block.header.height) -} diff --git a/bots/src/lib/types.ts b/bots/src/lib/types.ts deleted file mode 100644 index 39bb1a5f..00000000 --- a/bots/src/lib/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -import DepositTxEntity from '../orm/executor/DepositTxEntity' -import WithdrawalTxEntity from '../orm/executor/WithdrawalTxEntity' -import { ExecutorOutputEntity } from '../orm/index' - -export interface WithdrawalTx { - bridge_id: bigint; - sequence: bigint; - sender: string; - receiver: string; - l1_denom: string; - amount: bigint; -} - -/// response types - -export interface WithdrawalTxResponse { - withdrawalTx: WithdrawalTxEntity; -} - -export interface DepositTxResponse { - depositTx: DepositTxEntity; -} - -export interface OutputResponse { - output: ExecutorOutputEntity; -} diff --git a/bots/src/lib/util.ts b/bots/src/lib/util.ts deleted file mode 100644 index 32e2d480..00000000 --- a/bots/src/lib/util.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { SHA3 } from 'sha3' - -export function sha3_256(value: Buffer | string | number): Buffer { - return new SHA3(256).update(toBuffer(value)).digest() -} - -function toBuffer(value: any): Buffer { - if (!Buffer.isBuffer(value)) { - if (Array.isArray(value)) { - value = Buffer.from(value) - } else if (typeof value === 'string') { - if (isHexString(value)) { - value = Buffer.from(padToEven(stripHexPrefix(value)), 'hex') - } else { - value = Buffer.from(value) - } - } else if (typeof value === 'number') { - value = numberToBuffer(value) - } else if (value === null || value === undefined) { - value = Buffer.allocUnsafe(0) - } else if (value.toArray) { - // converts a BN to a Buffer - value = Buffer.from(value.toArray()) - } else { - throw new Error('invalid type') - } - } - - return value -} - -function isHexString(value: string, length?: number): boolean { - if (!value.match(/^0x[0-9A-Fa-f]*$/)) { - return false - } - - if (length && value.length !== 2 + 2 * length) { - return false - } - - return true -} - -function padToEven(value: string): string { - if (value.length % 2) { - value = `0${value}` - } - return value -} - -function stripHexPrefix(value: string): string { - return isHexPrefixed(value) ? value.slice(2) : value -} - -function isHexPrefixed(value: string): boolean { - return value.slice(0, 2) === '0x' -} - -function numberToBuffer(i: number): Buffer { - return Buffer.from(padToEven(numberToHexString(i).slice(2)), 'hex') -} - -function numberToHexString(i: number): string { - return `0x${i.toString(16)}` -} diff --git a/bots/src/lib/wallet.ts b/bots/src/lib/wallet.ts deleted file mode 100644 index 912b8897..00000000 --- a/bots/src/lib/wallet.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { - Key, - Wallet, - Msg, - MnemonicKey, - LCDClient, - WaitTxBroadcastResult, - Coins -} from '@initia/initia.js' -import { sendTx } from './tx' -import { config } from '../config' -import { buildNotEnoughBalanceNotification, buildResolveErrorNotification, notifySlack } from './slack' - -export enum WalletType { - Challenger = 'challenger', - Executor = 'executor', - BatchSubmitter = 'batchSubmitter', - OutputSubmitter = 'outputSubmitter' -} - -export const wallets: { - challenger: TxWallet | undefined; - executor: TxWallet | undefined; - batchSubmitter: TxWallet | undefined; - outputSubmitter: TxWallet | undefined; -} = { - challenger: undefined, - executor: undefined, - batchSubmitter: undefined, - outputSubmitter: undefined -} - -export function initWallet(type: WalletType, lcd: LCDClient): void { - if (wallets[type]) return - - switch (type) { - case WalletType.Challenger: - wallets[type] = new TxWallet( - lcd, - new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) - ) - break - case WalletType.Executor: - wallets[type] = new TxWallet( - lcd, - new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) - ) - break - case WalletType.BatchSubmitter: - wallets[type] = new TxWallet( - lcd, - new MnemonicKey({ mnemonic: config.BATCH_SUBMITTER_MNEMONIC }) - ) - break - case WalletType.OutputSubmitter: - wallets[type] = new TxWallet( - lcd, - new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) - ) - break - } -} - -// Access the wallets -export function getWallet(type: WalletType): TxWallet { - if (!wallets[type]) { - throw new Error(`Wallet ${type} not initialized`) - } - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return wallets[type]! -} - -export class TxWallet extends Wallet { - private managedAccountNumber - private managedSequence - - constructor(lcd: LCDClient, key: Key) { - super(lcd, key) - } - - async checkEnoughBalance() { - const gasPrices = new Coins(this.lcd.config.gasPrices) - const denom = gasPrices.denoms()[0] - - const balance = await this.lcd.bank.balanceByDenom( - this.key.accAddress, - denom - ) - - const key = `${this.key.accAddress}-${balance.amount}`; - if (balance.amount && parseInt(balance.amount) < config.SLACK_NOT_ENOUGH_BALANCE_THRESHOLD) { - await notifySlack( - key, buildNotEnoughBalanceNotification(this, parseInt(balance.amount), denom) - ) - } else { - await notifySlack( - key, buildResolveErrorNotification(`Balance for ${this.key.accAddress} is restored.`), false - ); - } - } - - async transaction(msgs: Msg[]): Promise { - if (!this.managedAccountNumber && !this.managedSequence) { - const { account_number: accountNumber, sequence } = - await this.accountNumberAndSequence() - this.managedAccountNumber = accountNumber - this.managedSequence = sequence - } - - try { - await this.checkEnoughBalance() - const txInfo = await sendTx( - this, - msgs, - undefined, - this.managedAccountNumber, - this.managedSequence - ) - this.managedSequence += 1 - return txInfo - } catch (err) { - delete this.managedAccountNumber - delete this.managedSequence - throw err - } - } -} diff --git a/bots/src/loader/app.ts b/bots/src/loader/app.ts deleted file mode 100644 index b767d7c2..00000000 --- a/bots/src/loader/app.ts +++ /dev/null @@ -1,124 +0,0 @@ -import path from 'path' -import Koa from 'koa' -import bodyParser from 'koa-body' -import Router from 'koa-router' -import cors from '@koa/cors' -import morgan from 'koa-morgan' -// import helmet from 'koa-helmet' -import serve from 'koa-static' -import mount from 'koa-mount' -import { APIError, ErrorTypes, errorHandler } from '../lib/error' -import { error } from '../lib/response' -import { KoaController, configureRoutes } from 'koa-joi-controllers' -import { router as swaggerRouter } from '../swagger/swagger' - -const notFoundMiddleware: Koa.Middleware = (ctx) => { - ctx.status = 404 -} - -function getRootApp(): Koa { - // root app only contains the health check route - const app = new Koa() - const router = new Router() - - router.get('/health', async (ctx) => { - ctx.status = 200 - ctx.body = 'OK' - }) - - app.use(router.routes()) - app.use(router.allowedMethods()) - - return app -} - -function createApiDocApp(): Koa { - // static - const app = new Koa() - - app - .use( - serve(path.resolve(__dirname, '..', 'static'), { - maxage: 86400 * 1000 - }) - ) - .use(notFoundMiddleware) - - return app -} - -async function createAPIApp(controllers: KoaController[]): Promise { - const app = new Koa() - - app - .use(errorHandler(error)) - .use(async (ctx, next) => { - await next() - - ctx.set('Cache-Control', 'no-store, no-cache, must-revalidate') - ctx.set('Pragma', 'no-cache') - ctx.set('Expires', '0') - }) - .use( - bodyParser({ - formLimit: '512kb', - jsonLimit: '512kb', - textLimit: '512kb', - multipart: true, - onError: (error) => { - throw new APIError( - ErrorTypes.INVALID_REQUEST_ERROR, - '', - error.message, - error - ) - } - }) - ) - - configureRoutes(app, controllers) - app.use(notFoundMiddleware) - return app -} - -export async function initApp(controllers: KoaController[]): Promise { - const app = getRootApp() - - app.proxy = true - - const apiDocApp = createApiDocApp() - const apiApp = await createAPIApp(controllers) - - app - .use(morgan('common')) - // .use( - // helmet({ - // contentSecurityPolicy: { - // directives: { - // defaultSrc: [`'self'`, 'http:'], - // scriptSrc: [ - // `'self'`, - // `'unsafe-inline'`, - // `'unsafe-eval'`, - // 'http:', - // 'cdnjs.cloudflare.com', - // 'unpkg.com', - // ], - // fontSrc: [`'self'`, 'http:', 'https:', 'data:'], - // objectSrc: [`'none'`], - // imgSrc: [`'self'`, 'http:', 'data:', 'validator.swagger.io'], - // styleSrc: [`'self'`, 'http:', 'https:', `'unsafe-inline'`], - // blockAllMixedContent: [], - // }, - // }, - // crossOriginEmbedderPolicy: false, - // }) - // ) - .use(cors()) - .use(swaggerRouter.routes()) - .use(swaggerRouter.allowedMethods()) - .use(mount('/apidoc', apiDocApp)) - .use(mount('/', apiApp)) - - return app -} diff --git a/bots/src/loader/index.ts b/bots/src/loader/index.ts deleted file mode 100644 index ae9d1edd..00000000 --- a/bots/src/loader/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './app' -export * from './server' diff --git a/bots/src/loader/server.ts b/bots/src/loader/server.ts deleted file mode 100644 index 9640d7c1..00000000 --- a/bots/src/loader/server.ts +++ /dev/null @@ -1,23 +0,0 @@ -import * as http from 'http' -import { initApp } from './app' -import { KoaController } from 'koa-joi-controllers' -let server: http.Server - -export async function initServer( - controllers: KoaController[], - port: number -): Promise { - const app = await initApp(controllers) - - server = http.createServer(app.callback()) - - server.listen(port, () => { - console.log(`Listening on port ${port}`) - }) - - return server -} - -export function finalizeServer(): void { - server.close() -} diff --git a/bots/src/orm/CamelToSnakeNamingStrategy.ts b/bots/src/orm/CamelToSnakeNamingStrategy.ts deleted file mode 100644 index 33d95deb..00000000 --- a/bots/src/orm/CamelToSnakeNamingStrategy.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { DefaultNamingStrategy, NamingStrategyInterface } from 'typeorm' -import { snakeCase } from 'lodash' - -class CamelToSnakeNamingStrategy - extends DefaultNamingStrategy - implements NamingStrategyInterface -{ - tableName(targetName, userSpecifiedName) { - return userSpecifiedName ? userSpecifiedName : snakeCase(targetName) - } - columnName(propertyName, customName, embeddedPrefixes) { - return snakeCase( - embeddedPrefixes.concat(customName ? customName : propertyName).join('_') - ) - } - columnNameCustomized(customName) { - return customName - } - relationName(propertyName) { - return snakeCase(propertyName) - } -} - -export default CamelToSnakeNamingStrategy diff --git a/bots/src/orm/RecordEntity.ts b/bots/src/orm/RecordEntity.ts deleted file mode 100644 index 8263cefd..00000000 --- a/bots/src/orm/RecordEntity.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm' - -@Entity('record') -export default class RecordEntity { - @PrimaryColumn() - bridgeId: number - - @PrimaryColumn() - batchIndex: number - - @Column() - startBlockNumber: number - - @Column() - endBlockNumber: number - - @Column('text', { array: true }) - batchInfo: string[] // for l1 => txHash, for celestia => height::commitment -} diff --git a/bots/src/orm/StateEntity.ts b/bots/src/orm/StateEntity.ts deleted file mode 100644 index 4bcab1c9..00000000 --- a/bots/src/orm/StateEntity.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm' - -@Entity('state') -export default class StateEntity { - @PrimaryColumn('text') - name: string - - @Column('int') - height: number -} diff --git a/bots/src/orm/challenger/ChallengeEntity.ts b/bots/src/orm/challenger/ChallengeEntity.ts deleted file mode 100644 index b79dcf47..00000000 --- a/bots/src/orm/challenger/ChallengeEntity.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm' - -@Entity('challenge') -export default class ChallengeEntity { - @PrimaryColumn('text') - name: string - - @Column('int') - l1DepositSequenceToCheck: number - - @Column('int') - l1LastCheckedSequence: number - - @Column('int') - l2OutputIndexToCheck: number -} diff --git a/bots/src/orm/challenger/DeletedOutputEntity.ts b/bots/src/orm/challenger/DeletedOutputEntity.ts deleted file mode 100644 index e601b176..00000000 --- a/bots/src/orm/challenger/DeletedOutputEntity.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm' - -@Entity('challenger_deleted_output') -export default class ChallengedOutputEntity { - @PrimaryColumn('bigint') - outputIndex: number - - @Column('bigint') - bridgeId: string - - @Column('text') - reason: string -} diff --git a/bots/src/orm/challenger/DepositTxEntity.ts b/bots/src/orm/challenger/DepositTxEntity.ts deleted file mode 100644 index 9bbd1e1d..00000000 --- a/bots/src/orm/challenger/DepositTxEntity.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('challenger_deposit_tx') -export default class DepositTxEntity { - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - @Index('challenger_deposit_tx_sender_index') - sender: string - - @Column('text') - @Index('challenger_deposit_tx_receiver_index') - receiver: string - - @Column('bigint') - amount: string - - @Column('text') - l1Denom: string - - @Column('text') - l2Denom: string - - @Column('text') - data: string -} diff --git a/bots/src/orm/challenger/FinalizeDepositTxEntity.ts b/bots/src/orm/challenger/FinalizeDepositTxEntity.ts deleted file mode 100644 index 4729bcbd..00000000 --- a/bots/src/orm/challenger/FinalizeDepositTxEntity.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('challenger_finalize_deposit_tx') -export default class FinalizeDepositTxEntity { - // l1 sequence - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - @Index('challenger_finalize_deposit_tx_sender_index') - sender: string - - @Column('text') - @Index('challenger_finalize_deposit_tx_receiver_index') - receiver: string - - @Column('bigint') - amount: string - - @Column('text') - l2Denom: string - - @Column('int') - l1Height: number -} diff --git a/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts b/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts deleted file mode 100644 index aff3d6b6..00000000 --- a/bots/src/orm/challenger/FinalizeWithdrawalTxEntity.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('challenger_finalize_withdrawal_tx') -export default class FinalizeWithdrawalTxEntity { - @PrimaryColumn('bigint') - bridgeId: string - - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - l1Denom: string - - @Column('text') - l2Denom: string - - @Column('text') - @Index('challenger_finalize_tx_sender_index') - sender: string - - @Column('text') - @Index('challenger_finalize_tx_receiver_index') - receiver: string - - @Column('bigint') - amount: string - - @Column('int') - @Index('challenger_finalize_tx_output_index') - outputIndex: number -} diff --git a/bots/src/orm/challenger/OutputEntity.ts b/bots/src/orm/challenger/OutputEntity.ts deleted file mode 100644 index e0a7e227..00000000 --- a/bots/src/orm/challenger/OutputEntity.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm' - -@Entity('challenger_output') -export default class OutputEntity { - @PrimaryColumn('int') - outputIndex: number - - @Column('text') - outputRoot: string - - @Column('text') - stateRoot: string - - @Column('text') - merkleRoot: string - - @Column('text') - lastBlockHash: string // last block hash of the epoch - - @Column('int') - startBlockNumber: number // start block height of the epoch - - @Column('int') - endBlockNumber: number // end block height of the epoch -} diff --git a/bots/src/orm/challenger/WithdrawalTxEntity.ts b/bots/src/orm/challenger/WithdrawalTxEntity.ts deleted file mode 100644 index 8152e45e..00000000 --- a/bots/src/orm/challenger/WithdrawalTxEntity.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('challenger_withdrawal_tx') -export default class WithdrawalTxEntity { - @PrimaryColumn('bigint') - bridgeId: string - - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - l1Denom: string - - @Column('text') - l2Denom: string - - @Column('text') - @Index('challenger_tx_sender_index') - sender: string - - @Column('text') - @Index('challenger_tx_receiver_index') - receiver: string - - @Column('bigint') - amount: string - - @Column('int') - @Index('challenger_tx_output_index') - outputIndex: number - - @Column('text') - merkleRoot: string - - @Column('text', { array: true }) - merkleProof: string[] -} diff --git a/bots/src/orm/executor/DepositTxEntity.ts b/bots/src/orm/executor/DepositTxEntity.ts deleted file mode 100644 index 2a3d4f24..00000000 --- a/bots/src/orm/executor/DepositTxEntity.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('executor_deposit_tx') -export default class DepositTxEntity { - @PrimaryColumn('bigint') - bridgeId: string - - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - @Index('executor_deposit_tx_sender_index') - sender: string - - @Column('text') - @Index('executor_deposit_tx_receiver_index') - receiver: string - - @Column('int') - @Index('executor_deposit_tx_output_index') - outputIndex: number - - @Column('bigint') - amount: string - - @Column('text') - l1Denom: string - - @Column('text') - l2Denom: string - - @Column('text') - data: string - - @Column('int') - l1Height: number -} diff --git a/bots/src/orm/executor/OutputEntity.ts b/bots/src/orm/executor/OutputEntity.ts deleted file mode 100644 index ef20f0e4..00000000 --- a/bots/src/orm/executor/OutputEntity.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Column, Entity, PrimaryColumn } from 'typeorm' - -@Entity('executor_output') -export default class OutputEntity { - @PrimaryColumn('int') - outputIndex: number - - @Column('text') - outputRoot: string - - @Column('text') - stateRoot: string - - @Column('text') - merkleRoot: string - - @Column('text') - lastBlockHash: string // last block hash of the epoch - - @Column('int') - startBlockNumber: number // start block height of the epoch - - @Column('int') - endBlockNumber: number // end block height of the epoch -} diff --git a/bots/src/orm/executor/UnconfirmedTxEntity.ts b/bots/src/orm/executor/UnconfirmedTxEntity.ts deleted file mode 100644 index 34007a21..00000000 --- a/bots/src/orm/executor/UnconfirmedTxEntity.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('executor_unconfirmed_tx') -export default class UnconfirmedTxEntity { - @PrimaryColumn('bigint') - bridgeId: string - - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - @Index('executor_unconfirmed_deposit_tx_sender_index') - sender: string - - @Column('text') - @Index('executor_unconfirmed_deposit_tx_receiver_index') - receiver: string - - @Column('int') - @Index('executor_unconfirmed_deposit_tx_output_index') - outputIndex: number - - @Column('bigint') - amount: string - - @Column('text') - l1Denom: string - - @Column('text') - l2Denom: string - - @Column('text') - data: string - - @Column('int') - l1Height: number - - @Column({ - type: 'text', - nullable: true - }) - error: string - - @Column() - processed: boolean -} diff --git a/bots/src/orm/executor/WithdrawalTxEntity.ts b/bots/src/orm/executor/WithdrawalTxEntity.ts deleted file mode 100644 index 9d4bedd4..00000000 --- a/bots/src/orm/executor/WithdrawalTxEntity.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Column, Entity, Index, PrimaryColumn } from 'typeorm' - -@Entity('executor_withdrawal_tx') -export default class WithdrawalTxEntity { - @PrimaryColumn('bigint') - bridgeId: string - - @PrimaryColumn('bigint') - sequence: string - - @Column('text') - l1Denom: string - - @Column('text') - l2Denom: string - - @Column('text') - @Index('executor_withdrawal_tx_sender_index') - sender: string - - @Column('text') - @Index('executor_withdrawal_tx_receiver_index') - receiver: string - - @Column('bigint') - amount: string - - @Column('int') - @Index('executor_withdrawal_tx_output_index') - outputIndex: number - - @Column('text') - merkleRoot: string - - @Column('text', { array: true }) - merkleProof: string[] -} diff --git a/bots/src/orm/index.ts b/bots/src/orm/index.ts deleted file mode 100644 index 605f7dd0..00000000 --- a/bots/src/orm/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import RecordEntity from './RecordEntity' -import StateEntity from './StateEntity' - -import ExecutorWithdrawalTxEntity from './executor/WithdrawalTxEntity' -import ExecutorDepositTxEntity from './executor/DepositTxEntity' -import ExecutorOutputEntity from './executor/OutputEntity' -import ExecutorUnconfirmedTxEntity from './executor/UnconfirmedTxEntity' - -import ChallengerDepositTxEntity from './challenger/DepositTxEntity' -import ChallengerWithdrawalTxEntity from './challenger/WithdrawalTxEntity' -import ChallengerFinalizeDepositTxEntity from './challenger/FinalizeDepositTxEntity' -import ChallengerFinalizeWithdrawalTxEntity from './challenger/FinalizeWithdrawalTxEntity' -import ChallengerOutputEntity from './challenger/OutputEntity' -import ChallengedOutputEntity from './challenger/DeletedOutputEntity' -import ChallengeEntity from './challenger/ChallengeEntity' - -export * from './RecordEntity' -export * from './StateEntity' - -export * from './executor/OutputEntity' -export * from './executor/DepositTxEntity' -export * from './executor/WithdrawalTxEntity' -export * from './executor/UnconfirmedTxEntity' - -export * from './challenger/DepositTxEntity' -export * from './challenger/WithdrawalTxEntity' -export * from './challenger/FinalizeDepositTxEntity' -export * from './challenger/FinalizeWithdrawalTxEntity' -export * from './challenger/OutputEntity' -export * from './challenger/DeletedOutputEntity' -export * from './challenger/ChallengeEntity' - -export { - RecordEntity, - StateEntity, - ExecutorWithdrawalTxEntity, - ExecutorDepositTxEntity, - ExecutorOutputEntity, - ExecutorUnconfirmedTxEntity, - ChallengerWithdrawalTxEntity, - ChallengerDepositTxEntity, - ChallengerOutputEntity, - ChallengerFinalizeDepositTxEntity, - ChallengerFinalizeWithdrawalTxEntity, - ChallengedOutputEntity, - ChallengeEntity -} diff --git a/bots/src/sawgger/batch_model.ts b/bots/src/sawgger/batch_model.ts deleted file mode 100644 index 231766a6..00000000 --- a/bots/src/sawgger/batch_model.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { z } from 'koa-swagger-decorator' - -const L1DataPathsSchema = z.array( - z.object({ - index: z.number(), - txHash: z.string() - }) -) - -const L1BatchInfoSchema = z.object({ - type: z.literal('l1'), - dataPaths: L1DataPathsSchema -}) - -const CelestiaDataPathsSchema = z.array( - z.object({ - index: z.number(), - height: z.number(), - commitment: z.string() - }) -) - -const CelestiaBatchInfoSchema = z.object({ - type: z.literal('celestia'), - dataPaths: CelestiaDataPathsSchema -}) - -const BatchInfoStruct = z.union([L1BatchInfoSchema, CelestiaBatchInfoSchema]) - -const GetBatchResponse = z.object({ - bridge_id: z.number(), - batch_index: z.number(), - batch_info: BatchInfoStruct -}) - -export { GetBatchResponse } diff --git a/bots/src/scripts/setupL2.ts b/bots/src/scripts/setupL2.ts deleted file mode 100644 index 29b2711e..00000000 --- a/bots/src/scripts/setupL2.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { - MsgCreateBridge, - BridgeConfig, - BatchInfo, - Duration, - Wallet, - MnemonicKey, - BridgeInfo, - MsgSetBridgeInfo -} from '@initia/initia.js' -import { sendTx } from '../lib/tx' -import { config } from '../config' - -export const executor = new Wallet( - config.l1lcd, - new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) -) -export const executorL2 = new Wallet( - config.l2lcd, - new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) -) -export const challenger = new Wallet( - config.l1lcd, - new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) -) -export const outputSubmitter = new Wallet( - config.l1lcd, - new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) -) -export const batchSubmitter = new MnemonicKey({ - mnemonic: config.BATCH_SUBMITTER_MNEMONIC -}) - -class L2Initializer { - bridgeId = config.BRIDGE_ID - - constructor( - public submissionInterval: number, - public finalizedTime: number, - public metadata: string - ) {} - - MsgCreateBridge(submissionInterval: number, finalizedTime: number) { - const bridgeConfig = new BridgeConfig( - challenger.key.accAddress, - outputSubmitter.key.accAddress, - new BatchInfo(batchSubmitter.accAddress, config.PUBLISH_BATCH_TARGET), - Duration.fromString(submissionInterval.toString()), - Duration.fromString(finalizedTime.toString()), - new Date(), - this.metadata - ) - return new MsgCreateBridge(executor.key.accAddress, bridgeConfig) - } - - MsgSetBridgeInfo(bridgeInfo: BridgeInfo) { - return new MsgSetBridgeInfo(executorL2.key.accAddress, bridgeInfo) - } - - async initialize() { - const msgs = [ - this.MsgCreateBridge(this.submissionInterval, this.finalizedTime) - ] - - const txRes = await sendTx(executor, msgs) - - // load bridge info from l1 chain and send to l2 chain - let bridgeID = 0 - const txInfo = await config.l1lcd.tx.txInfo(txRes.txhash) - for (const e of txInfo.events) { - if (e.type !== 'create_bridge') { - continue - } - - for (const attr of e.attributes) { - if (attr.key !== 'bridge_id') { - continue - } - - bridgeID = parseInt(attr.value, 10) - } - - break - } - - const bridgeInfo = await config.l1lcd.ophost.bridgeInfo(bridgeID) - const l2Msgs = [this.MsgSetBridgeInfo(bridgeInfo)] - - await sendTx(executorL2, l2Msgs) - } -} - -async function main() { - try { - const initializer = new L2Initializer( - config.SUBMISSION_INTERVAL, - config.FINALIZATION_PERIOD, - config.IBC_METADATA - ) - console.log('=========Initializing L2=========') - console.log('submissionInterval: ', initializer.submissionInterval) - console.log('finalizedTime: ', initializer.finalizedTime) - console.log('metadata: ', initializer.metadata) - console.log('bridgeId: ', initializer.bridgeId) - await initializer.initialize() - console.log('=========L2 Initialized Done=========') - } catch (e) { - console.error(e) - } -} - -if (require.main === module) { - main() -} diff --git a/bots/src/service/batch/BatchService.ts b/bots/src/service/batch/BatchService.ts deleted file mode 100644 index 4951380a..00000000 --- a/bots/src/service/batch/BatchService.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { RecordEntity } from '../../orm' -import { APIError, ErrorTypes } from '../../lib/error' -import { getDB } from '../../lib/db' -import { config } from '../../config' - -interface L1BatchInfo { - type: 'l1'; - dataPaths: { - index: number; - txHash: string; - }[]; -} - -interface CelestiaBatchInfo { - type: 'celestia'; - dataPaths: { - index: number; - height: number; - commitment: string; - }[]; -} - -type BatchInfo = L1BatchInfo | CelestiaBatchInfo - -interface GetBatchResponse { - bridgeId: number; - batchIndex: number; - batchInfo: BatchInfo; -} - -export async function getBatch(batchIndex: number): Promise { - const [db] = getDB() - const queryRunner = db.createQueryRunner('slave') - - try { - const qb = queryRunner.manager - .createQueryBuilder(RecordEntity, 'record') - .where('record.batch_index = :batchIndex', { batchIndex }) - - const batch = await qb.getOne() - - if (!batch) { - throw new APIError(ErrorTypes.NOT_FOUND_ERROR) - } - - let batchInfo: BatchInfo - if (config.PUBLISH_BATCH_TARGET === 'l1') { - batchInfo = { - type: 'l1', - dataPaths: batch.batchInfo.map((txHash, index) => ({ index, txHash })) - } - } else if (config.PUBLISH_BATCH_TARGET === 'celestia') { - batchInfo = { - type: 'celestia', - dataPaths: batch.batchInfo.map((path, index) => { - const [height, commitment] = path.split('::') - return { index, height: Number(height), commitment } - }) - } - } else { - throw new APIError(ErrorTypes.API_ERROR) - } - - return { - bridgeId: batch.bridgeId, - batchIndex: batch.batchIndex, - batchInfo - } - } finally { - queryRunner.release() - } -} diff --git a/bots/src/service/executor/ClaimTxService.ts b/bots/src/service/executor/ClaimTxService.ts deleted file mode 100644 index 5f146bb5..00000000 --- a/bots/src/service/executor/ClaimTxService.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { ExecutorWithdrawalTxEntity, ExecutorOutputEntity } from '../../orm' -import { getDB } from '../../lib/db' -import { APIError, ErrorTypes } from '../../lib/error' -import { sha3_256 } from '../../lib/util' - -interface ClaimTx { - bridgeId: number; - outputIndex: number; - merkleProof: string[]; - sender: string; - receiver: string; - amount: number; - l2Denom: string; - version: string; - stateRoot: string; - merkleRoot: string; - lastBlockHash: string; -} - -export interface GetClaimTxListParam { - sequence?: number; - address?: string; - stage?: number; - offset?: number; - limit: number; - descending: string; -} - -export interface GetClaimTxListResponse { - count?: number; - next?: number; - limit: number; - claimTxList: ClaimTx[]; -} - -export async function getClaimTxList( - param: GetClaimTxListParam -): Promise { - const [db] = getDB() - const queryRunner = db.createQueryRunner('slave') - - try { - const offset = param.offset ?? 0 - const order = param.descending == 'true' ? 'DESC' : 'ASC' - const claimTxList: ClaimTx[] = [] - - const withdrawalQb = queryRunner.manager.createQueryBuilder( - ExecutorWithdrawalTxEntity, - 'tx' - ) - - if (param.address) { - withdrawalQb.andWhere('tx.sender = :sender', { sender: param.address }) - } - - if (param.sequence) { - withdrawalQb.andWhere('tx.sequence = :sequence', { - sequence: param.sequence - }) - } - - const withdrawalTxs = await withdrawalQb - .orderBy('tx.sequence', order) - .skip(offset * param.limit) - .take(param.limit) - .getMany() - - withdrawalTxs.map(async (withdrawalTx) => { - const outputQb = queryRunner.manager - .createQueryBuilder(ExecutorOutputEntity, 'output') - .where('output.output_index = :outputIndex', { - outputIndex: withdrawalTx.outputIndex - }) - - const output = await outputQb.getOne() - - if (!output) { - throw new APIError(ErrorTypes.NOT_FOUND_ERROR) - } - - const claimData: ClaimTx = { - bridgeId: parseInt(withdrawalTx.bridgeId), - outputIndex: withdrawalTx.outputIndex, - merkleProof: withdrawalTx.merkleProof, - sender: withdrawalTx.sender, - receiver: withdrawalTx.receiver, - amount: parseInt(withdrawalTx.amount), - l2Denom: withdrawalTx.l2Denom, - version: sha3_256(withdrawalTx.outputIndex).toString('base64'), - stateRoot: output.stateRoot, - merkleRoot: output.merkleRoot, - lastBlockHash: output.lastBlockHash - } - claimTxList.push(claimData) - }) - - const count = await withdrawalQb.getCount() - let next: number | undefined - - if (count > (offset + 1) * param.limit) { - next = offset + 1 - } - - return { - count, - next, - limit: param.limit, - claimTxList - } - } finally { - await queryRunner.release() - } -} diff --git a/bots/src/service/executor/DepositTxService.ts b/bots/src/service/executor/DepositTxService.ts deleted file mode 100644 index 22f7d276..00000000 --- a/bots/src/service/executor/DepositTxService.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ExecutorDepositTxEntity } from '../../orm' -import { getDB } from '../../lib/db' - -export interface GetDepositTxListParam { - sequence?: number; - address?: string; - offset?: number; - limit: number; - descending: string; -} - -export interface GetDepositTxListResponse { - count?: number; - next?: number; - limit: number; - depositTxList: ExecutorDepositTxEntity[]; -} - -export async function getDepositTxList( - param: GetDepositTxListParam -): Promise { - const [db] = getDB() - const queryRunner = db.createQueryRunner('slave') - try { - const offset = param.offset ?? 0 - const order = param.descending == 'true' ? 'DESC' : 'ASC' - - const qb = queryRunner.manager.createQueryBuilder( - ExecutorDepositTxEntity, - 'tx' - ) - - if (param.sequence) { - qb.andWhere('tx.sequence = :sequence', { sequence: param.sequence }) - } - - if (param.address) { - qb.andWhere('tx.sender = :sender', { sender: param.address }) - } - - const depositTxList = await qb - .orderBy('tx.sequence', order) - .skip(offset * param.limit) - .take(param.limit) - .getMany() - - const count = await qb.getCount() - let next: number | undefined - - if (count > (offset + 1) * param.limit) { - next = offset + 1 - } - - return { - count, - next, - limit: param.limit, - depositTxList - } - } finally { - queryRunner.release() - } -} diff --git a/bots/src/service/executor/OutputService.ts b/bots/src/service/executor/OutputService.ts deleted file mode 100644 index 32df02bc..00000000 --- a/bots/src/service/executor/OutputService.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { ExecutorOutputEntity } from '../../orm' -import { getDB } from '../../lib/db' - -export interface GetOutputListParam { - output_index?: number; - height?: number; - offset?: number; - limit: number; - descending: string; -} - -export interface GetOutputListResponse { - count?: number; - next?: number; - limit: number; - outputList: ExecutorOutputEntity[]; -} - -export async function getOutputList( - param: GetOutputListParam -): Promise { - const [db] = getDB() - const queryRunner = db.createQueryRunner('slave') - try { - const offset = param.offset ?? 0 - const order = param.descending == 'true' ? 'DESC' : 'ASC' - - const qb = queryRunner.manager.createQueryBuilder( - ExecutorOutputEntity, - 'output' - ) - - if (param.output_index) { - qb.andWhere('output.output_index = :output_index', { - output_index: param.output_index - }) - } - - const outputList = await qb - .orderBy('output.output_index', order) - .skip(offset * param.limit) - .take(param.limit) - .getMany() - - const count = await qb.getCount() - let next: number | undefined - - if (count > (offset + 1) * param.limit) { - next = offset + 1 - } - - return { - count, - next, - limit: param.limit, - outputList - } - } finally { - queryRunner.release() - } -} diff --git a/bots/src/service/executor/WithdrawalTxService.ts b/bots/src/service/executor/WithdrawalTxService.ts deleted file mode 100644 index 39f3d952..00000000 --- a/bots/src/service/executor/WithdrawalTxService.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ExecutorWithdrawalTxEntity } from '../../orm' -import { getDB } from '../../lib/db' - -export interface GetWithdrawalTxListParam { - sequence?: number; - address?: string; - offset?: number; - limit: number; - descending: string; -} - -export interface GetWithdrawalTxListResponse { - count?: number; - next?: number; - limit: number; - withdrawalTxList: ExecutorWithdrawalTxEntity[]; -} - -export async function getWithdrawalTxList( - param: GetWithdrawalTxListParam -): Promise { - const [db] = getDB() - const queryRunner = db.createQueryRunner('slave') - try { - const offset = param.offset ?? 0 - const order = param.descending == 'true' ? 'DESC' : 'ASC' - - const qb = queryRunner.manager.createQueryBuilder( - ExecutorWithdrawalTxEntity, - 'tx' - ) - - if (param.sequence) { - qb.andWhere('tx.sequence = :sequence', { sequence: param.sequence }) - } - - if (param.address) { - qb.andWhere('tx.sender = :sender', { sender: param.address }) - } - - const withdrawalTxList = await qb - .orderBy('tx.sequence', order) - .skip(offset * param.limit) - .take(param.limit) - .getMany() - - const count = await qb.getCount() - let next: number | undefined - - if (count > (offset + 1) * param.limit) { - next = offset + 1 - } - - return { - count, - next, - limit: param.limit, - withdrawalTxList - } - } finally { - queryRunner.release() - } -} diff --git a/bots/src/service/index.ts b/bots/src/service/index.ts deleted file mode 100644 index 3dd0b750..00000000 --- a/bots/src/service/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './executor/OutputService' -export * from './executor/WithdrawalTxService' -export * from './executor/DepositTxService' -export * from './executor/ClaimTxService' - -export * from './batch/BatchService' diff --git a/bots/src/swagger/batch_model.ts b/bots/src/swagger/batch_model.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/bots/src/swagger/executor_model.ts b/bots/src/swagger/executor_model.ts deleted file mode 100644 index 2144b617..00000000 --- a/bots/src/swagger/executor_model.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { z } from 'koa-swagger-decorator' - -const DepositStruct = z.object({ - bridge_id: z.number(), - sequence: z.number(), - l1Denom: z.string(), - l2Denom: z.string(), - sender: z.string(), - receiver: z.string(), - amount: z.number(), - outputIndex: z.number(), - data: z.string(), - l1Height: z.number() -}) - -const GetDepositResponse = z.object({ - depositTxList: DepositStruct.array() -}) - -const WithdrawalStruct = z.object({ - bridge_id: z.number(), - sequence: z.number(), - l1Denom: z.string(), - l2Denom: z.string(), - sender: z.string(), - receiver: z.string(), - amount: z.number(), - outputIndex: z.number(), - data: z.string(), - l1Height: z.number() -}) - -const GetWithdrawalResponse = z.object({ - withdrawalTxList: WithdrawalStruct.array() -}) - -const ClaimStruct = z.object({ - bridge_id: z.number(), - output_index: z.number(), - merkle_proof: z.string().array(), - sender: z.string(), - receiver: z.string(), - amount: z.number(), - l_2_denom: z.string(), - version: z.string(), - state_root: z.string(), - merkle_root: z.string(), - last_block_hash: z.string() -}) - -const GetClaimResponse = z.object({ - claimTxList: ClaimStruct.array() -}) - -const OutputStruct = z.object({ - output_index: z.number(), - output_root: z.string(), - state_root: z.string(), - merkle_root: z.string(), - last_block_hash: z.string(), - start_block_number: z.number(), - end_block_number: z.number() -}) - -const GetOutputResponse = z.object({ - outputList: OutputStruct.array() -}) - -export { - GetDepositResponse, - GetWithdrawalResponse, - GetClaimResponse, - GetOutputResponse -} diff --git a/bots/src/swagger/swagger.ts b/bots/src/swagger/swagger.ts deleted file mode 100644 index 1b6d634e..00000000 --- a/bots/src/swagger/swagger.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { SwaggerRouter } from 'koa-swagger-decorator' -import { DepositTxController } from '../controller/executor/DepositTxController' -import { OutputController } from '../controller/executor/OutputController' -import { WithdrawalTxController } from '../controller/executor/WithdrawalTxController' -import { ClaimTxController } from '../controller/executor/ClaimTxController' - -const router = new SwaggerRouter({ - spec: { - info: { - title: 'Initia VIP API', - version: 'v1.0' - } - }, - swaggerHtmlEndpoint: '/swagger', - swaggerJsonEndpoint: '/swagger.json' -}) - -router.swagger() -router - .applyRoute(DepositTxController) - .applyRoute(OutputController) - .applyRoute(WithdrawalTxController) - .applyRoute(ClaimTxController) - -export { router } diff --git a/bots/src/test/integration.ts b/bots/src/test/integration.ts deleted file mode 100644 index b9f6f4c9..00000000 --- a/bots/src/test/integration.ts +++ /dev/null @@ -1,64 +0,0 @@ -import Bridge from './utils/Bridge' -import { config } from '../config' -import { TxBot } from './utils/TxBot' -import { Coin } from '@initia/initia.js' -import { startBatch } from '../worker/batchSubmitter' -import { startExecutor } from '../worker/bridgeExecutor' -import { startOutput } from '../worker/outputSubmitter' -import { delay } from 'bluebird' -import { getTokenPairByL1Denom } from '../lib/query' - -const SUBMISSION_INTERVAL = 5 -const FINALIZATION_PERIOD = 5 -const DEPOSIT_AMOUNT = 1_000_000 -const DEPOSIT_INTERVAL_MS = 100 - -async function setupBridge(submissionInterval: number, finalizedTime: number) { - const bridge = new Bridge(submissionInterval, finalizedTime) - const relayerMetadata = '' - await bridge.clearDB() - await bridge.tx(relayerMetadata) - console.log('Bridge deployed') -} - -async function startBot() { - try { - await Promise.all([startBatch(), startExecutor(), startOutput()]) - } catch (err) { - console.log(err) - } -} - -async function startDepositTxBot() { - const txBot = new TxBot(config.BRIDGE_ID) - const pair = await getTokenPairByL1Denom('uinit') - for (;;) { - const balance = await config.l2lcd.bank.balanceByDenom( - txBot.l2receiver.key.accAddress, - pair.l2_denom - ) - const res = await txBot.deposit( - txBot.l1sender, - txBot.l2receiver, - new Coin('uinit', DEPOSIT_AMOUNT) - ) - console.log( - `[DepositBot] Deposited height ${res.height} to ${txBot.l2receiver.key.accAddress} ${balance?.amount}` - ) - await delay(DEPOSIT_INTERVAL_MS) - } -} - -async function main() { - try { - await setupBridge(SUBMISSION_INTERVAL, FINALIZATION_PERIOD) - await startBot() - await startDepositTxBot() - } catch (err) { - console.log(err) - } -} - -if (require.main === module) { - main() -} diff --git a/bots/src/test/utils/Bridge.ts b/bots/src/test/utils/Bridge.ts deleted file mode 100644 index ba752582..00000000 --- a/bots/src/test/utils/Bridge.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { - MsgCreateBridge, - BridgeConfig, - Duration, - BatchInfo -} from '@initia/initia.js' -import { - getDB as getExecutorDB, - initORM as initExecutorORM -} from '../../worker/bridgeExecutor/db' -import { - getDB as getChallengerDB, - initORM as initChallengerORM -} from '../../worker/challenger/db' -import { getDB as getBatchDB, initORM as initBatchORM } from '../../lib/db' -import { DataSource, EntityManager } from 'typeorm' -import { - ExecutorOutputEntity, - StateEntity, - ExecutorWithdrawalTxEntity, - ExecutorDepositTxEntity, - ExecutorUnconfirmedTxEntity, - ChallengerDepositTxEntity, - ChallengerFinalizeDepositTxEntity, - ChallengerFinalizeWithdrawalTxEntity, - ChallengerOutputEntity, - ChallengerWithdrawalTxEntity, - ChallengedOutputEntity, - RecordEntity, - ChallengeEntity -} from '../../orm' -import { executor, challenger, outputSubmitter } from './helper' -import { sendTx } from '../../lib/tx' - -class Bridge { - executorDB: DataSource - challengerDB: DataSource - batchDB: DataSource - l1BlockHeight: number - l2BlockHeight: number - - constructor( - public submissionInterval: number, - public finalizedTime: number - ) {} - - async clearDB() { - // remove and initialize - await initExecutorORM() - await initChallengerORM() - await initBatchORM(); - - [this.executorDB] = getExecutorDB(); - [this.challengerDB] = getChallengerDB(); - [this.batchDB] = getBatchDB() - - await this.executorDB.transaction(async (manager: EntityManager) => { - await manager.getRepository(StateEntity).clear() - await manager.getRepository(ExecutorWithdrawalTxEntity).clear() - await manager.getRepository(ExecutorOutputEntity).clear() - await manager.getRepository(ExecutorDepositTxEntity).clear() - await manager.getRepository(ExecutorUnconfirmedTxEntity).clear() - }) - - await this.challengerDB.transaction(async (manager: EntityManager) => { - await manager.getRepository(ChallengerDepositTxEntity).clear() - await manager.getRepository(ChallengerFinalizeDepositTxEntity).clear() - await manager.getRepository(ChallengerFinalizeWithdrawalTxEntity).clear() - await manager.getRepository(ChallengerOutputEntity).clear() - await manager.getRepository(ChallengerWithdrawalTxEntity).clear() - await manager.getRepository(ChallengedOutputEntity).clear() - await manager.getRepository(ChallengeEntity).clear() - }) - - await this.batchDB.transaction(async (manager: EntityManager) => { - await manager.getRepository(RecordEntity).clear() - }) - } - - MsgCreateBridge( - submissionInterval: number, - finalizedTime: number, - metadata: string - ) { - const bridgeConfig = new BridgeConfig( - challenger.key.accAddress, - outputSubmitter.key.accAddress, - new BatchInfo('submitter', 'chain'), - Duration.fromString(submissionInterval.toString()), - Duration.fromString(finalizedTime.toString()), - new Date(), - metadata - ) - return new MsgCreateBridge(executor.key.accAddress, bridgeConfig) - } - - async tx(metadata: string) { - const msgs = [ - this.MsgCreateBridge( - this.submissionInterval, - this.finalizedTime, - metadata - ) - ] - - return await sendTx(executor, msgs) - } -} - -export default Bridge diff --git a/bots/src/test/utils/TxBot.ts b/bots/src/test/utils/TxBot.ts deleted file mode 100644 index de3383bd..00000000 --- a/bots/src/test/utils/TxBot.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - Wallet, - MsgInitiateTokenDeposit, - Coin, - MsgInitiateTokenWithdrawal -} from '@initia/initia.js' -import { makeFinalizeMsg } from './helper' -import { sendTx } from '../../lib/tx' -import { - getOutputFromExecutor, - getWithdrawalTxFromExecutor -} from '../../lib/query' -import { L1_SENDER, L2_RECEIVER } from './consts' - -export class TxBot { - l1sender = L1_SENDER - l2receiver = L2_RECEIVER - - constructor(public bridgeId: number) {} - - async deposit(sender: Wallet, reciever: Wallet, coin: Coin) { - const msg = new MsgInitiateTokenDeposit( - sender.key.accAddress, - this.bridgeId, - reciever.key.accAddress, - coin - ) - - return await sendTx(sender, [msg]) - } - - async withdrawal(sender: Wallet, receiver: Wallet, coin: Coin) { - const msg = new MsgInitiateTokenWithdrawal( - sender.key.accAddress, - receiver.key.accAddress, - coin - ) - - return await sendTx(sender, [msg]) - } - - async claim(sender: Wallet, txSequence: number, outputIndex: number) { - const txRes = await getWithdrawalTxFromExecutor(this.bridgeId, txSequence) - const outputRes: any = await getOutputFromExecutor(outputIndex) - const finalizeMsg = await makeFinalizeMsg( - txRes.withdrawalTx, - outputRes.output - ) - - const { account_number: accountNumber, sequence } = - await sender.accountNumberAndSequence() - return await sendTx( - sender, - [finalizeMsg], - undefined, - accountNumber, - sequence - ) - } -} diff --git a/bots/src/test/utils/consts.ts b/bots/src/test/utils/consts.ts deleted file mode 100644 index 9cb6b23b..00000000 --- a/bots/src/test/utils/consts.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MnemonicKey } from '@initia/initia.js' -import { config } from '../../config' -import { TxWallet } from '../../lib/wallet' - -export const { DEPOSITOR_MNEMONIC } = process.env - -export const L1_SENDER = new TxWallet( - config.l1lcd, - new MnemonicKey({ - mnemonic: DEPOSITOR_MNEMONIC - }) -) - -export const L2_RECEIVER = new TxWallet( - config.l2lcd, - new MnemonicKey({ - mnemonic: DEPOSITOR_MNEMONIC - }) -) diff --git a/bots/src/test/utils/helper.ts b/bots/src/test/utils/helper.ts deleted file mode 100644 index b6b52304..00000000 --- a/bots/src/test/utils/helper.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - Wallet, - MnemonicKey, - BCS, - Msg, - MsgFinalizeTokenWithdrawal, - Coin -} from '@initia/initia.js' - -import { config } from '../../config' -import { sha3_256 } from '../../lib/util' -import { ExecutorOutputEntity } from '../../orm/index' -import WithdrawalTxEntity from '../../orm/executor/WithdrawalTxEntity' - -export const bcs = BCS.getInstance() -export const executor = new Wallet( - config.l1lcd, - new MnemonicKey({ mnemonic: config.EXECUTOR_MNEMONIC }) -) -export const challenger = new Wallet( - config.l1lcd, - new MnemonicKey({ mnemonic: config.CHALLENGER_MNEMONIC }) -) -export const outputSubmitter = new Wallet( - config.l1lcd, - new MnemonicKey({ mnemonic: config.OUTPUT_SUBMITTER_MNEMONIC }) -) - -export async function makeFinalizeMsg( - txRes: WithdrawalTxEntity, - outputRes: ExecutorOutputEntity -): Promise { - const msg = new MsgFinalizeTokenWithdrawal( - config.BRIDGE_ID, - outputRes.outputIndex, - txRes.merkleProof, - txRes.sender, - txRes.receiver, - parseInt(txRes.sequence), - new Coin('uinit', txRes.amount), - sha3_256(outputRes.outputIndex).toString('base64'), - outputRes.stateRoot, - outputRes.outputRoot, - outputRes.lastBlockHash - ) - return msg -} diff --git a/bots/src/worker/batchSubmitter/batchSubmitter.ts b/bots/src/worker/batchSubmitter/batchSubmitter.ts deleted file mode 100644 index c5958076..00000000 --- a/bots/src/worker/batchSubmitter/batchSubmitter.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { getDB } from '../../lib/db' -import { DataSource, EntityManager } from 'typeorm' -import { batchLogger, batchLogger as logger } from '../../lib/logger' -import { BlockBulk, RawCommit, RPCClient } from '../../lib/rpc' -import { compress } from '../../lib/compressor' -import { ExecutorOutputEntity, RecordEntity } from '../../orm' -import { - Wallet, - MnemonicKey, - MsgRecordBatch, - MsgPayForBlobs, - Fee, - Coins, - BlobTx, - TxAPI -} from '@initia/initia.js' -import { delay } from 'bluebird' -import { INTERVAL_BATCH } from '../../config' -import { config } from '../../config' -import { sendRawTx } from '../../lib/tx' -import MonitorHelper from '../../lib/monitor/helper' -import { createBlob, getCelestiaFeeGasLimit } from '../../celestia/utils' -import { bech32 } from 'bech32' - -const base = 200000 -const perByte = 10 -const maxBytes = 500000 // 500kb - -export class BatchSubmitter { - private submitterAddress: string - private batchIndex = 0 - private db: DataSource - private submitter: Wallet - private bridgeId: number - private isRunning = false - private rpcClient: RPCClient - helper: MonitorHelper = new MonitorHelper() - - async init() { - [this.db] = getDB() - this.rpcClient = new RPCClient(config.L2_RPC_URI, batchLogger) - this.submitter = new Wallet( - config.batchlcd, - new MnemonicKey({ mnemonic: config.BATCH_SUBMITTER_MNEMONIC }) - ) - - this.bridgeId = config.BRIDGE_ID - this.isRunning = true - } - - public stop() { - this.isRunning = false - } - - public async run() { - await this.init() - - while (this.isRunning) { - await this.processBatch() - } - } - - async processBatch() { - try { - await this.db.transaction(async (manager: EntityManager) => { - const latestBatch = await this.getStoredBatch(manager) - this.batchIndex = latestBatch ? latestBatch.batchIndex + 1 : 1 - const output = await this.helper.getOutputByIndex( - manager, - ExecutorOutputEntity, - this.batchIndex - ) - - if (!output) return - - const batch = await this.getBatch( - output.startBlockNumber, - output.endBlockNumber - ) - - const batchInfo: string[] = await this.publishBatch(batch) - await this.saveBatchToDB( - manager, - batchInfo, - this.batchIndex, - output.startBlockNumber, - output.endBlockNumber - ) - logger.info( - `${this.batchIndex}th batch (${output.startBlockNumber}, ${output.endBlockNumber}) is successfully saved` - ) - }) - } catch (err) { - throw new Error(`Error in BatchSubmitter: ${err}`) - } finally { - await delay(INTERVAL_BATCH) - } - } - - // Get [start, end] batch from L2 and last commit info - async getBatch(start: number, end: number): Promise { - const bulk: BlockBulk | null = await this.rpcClient.getBlockBulk( - start.toString(), - end.toString() - ) - if (!bulk) { - throw new Error(`Error getting block bulk from L2`) - } - - const commit: RawCommit | null = await this.rpcClient.getRawCommit( - end.toString() - ) - if (!commit) { - throw new Error(`Error getting commit from L2`) - } - - const reqStrings = bulk.blocks.concat(commit.commit) - return compress(reqStrings) - } - - async getStoredBatch(manager: EntityManager): Promise { - const storedRecord = await manager.getRepository(RecordEntity).find({ - order: { - batchIndex: 'DESC' - }, - take: 1 - }) - - return storedRecord[0] ?? null - } - - // Publish a batch to L1 - async publishBatch(batch: Buffer): Promise { - try { - const batchInfos: string[] = [] - - while (batch.length !== 0) { - let subData: Buffer - if (batch.length > maxBytes) { - subData = batch.slice(0, maxBytes) - batch = batch.slice(maxBytes) - } else { - subData = batch - batch = Buffer.from([]) - } - - let txBytes: string - switch (config.PUBLISH_BATCH_TARGET) { - case 'l1': - txBytes = await this.createL1BatchMessage(subData) - break - case 'celestia': - txBytes = await this.createCelestiaBatchMessage(subData) - break - default: - throw new Error( - `unknown batch target ${config.PUBLISH_BATCH_TARGET}` - ) - } - - const batchInfo = await sendRawTx(this.submitter, txBytes) - batchInfos.push(batchInfo.txhash) - - await delay(1000) // break for each tx ended - } - - return batchInfos - } catch (err) { - throw new Error( - `Error publishing batch to ${config.PUBLISH_BATCH_TARGET}: ${err}` - ) - } - } - - async createL1BatchMessage(data: Buffer): Promise { - const gasLimit = Math.floor((base + perByte * data.length) * 1.2) - const fee = getFee(this.submitter, gasLimit) - - if (!this.submitterAddress) { - this.submitterAddress = this.submitter.key.accAddress - } - - const msg = new MsgRecordBatch( - this.submitterAddress, - this.bridgeId, - data.toString('base64') - ) - - const signedTx = await this.submitter.createAndSignTx({ msgs: [msg], fee }) - return TxAPI.encode(signedTx) - } - - async createCelestiaBatchMessage(data: Buffer): Promise { - const blob = createBlob(data) - const gasLimit = getCelestiaFeeGasLimit(data.length) - const fee = getFee(this.submitter, gasLimit) - - const rawAddress = this.submitter.key.publicKey?.rawAddress() - if (!rawAddress) { - throw new Error('batch submitter public key not set') - } - - if (!this.submitterAddress) { - this.submitterAddress = bech32.encode( - 'celestia', - bech32.toWords(rawAddress) - ) - this.submitter.setAccountAddress(this.submitterAddress) - } - - const msg = new MsgPayForBlobs( - this.submitterAddress, - [blob.namespace], - [data.length], - [blob.commitment], - [blob.blob.share_version] - ) - const signedTx = await this.submitter.createAndSignTx({ msgs: [msg], fee }) - const blobTx = new BlobTx(signedTx, [blob.blob], 'BLOB') - return Buffer.from(blobTx.toBytes()).toString('base64') - } - - // Save batch record to database - async saveBatchToDB( - manager: EntityManager, - batchInfo: string[], - batchIndex: number, - startBlockNumber: number, - endBlockNumber: number - ): Promise { - const record = new RecordEntity() - - record.bridgeId = this.bridgeId - record.batchIndex = batchIndex - record.batchInfo = batchInfo - record.startBlockNumber = startBlockNumber - record.endBlockNumber = endBlockNumber - - await manager - .getRepository(RecordEntity) - .save(record) - .catch((error) => { - throw new Error( - `Error saving record ${record.bridgeId} batch ${batchIndex} to database: ${error}` - ) - }) - - return record - } -} - -function getFee(wallet: Wallet, gasLimit: number): Fee { - const gasPrices = new Coins(wallet.lcd.config.gasPrices).toArray() - if (gasPrices.length === 0) { - throw Error('gasPrices must be set') - } - const gasPrice = gasPrices[0] - const gasAmount = gasPrice.mul(gasLimit).toIntCeilCoin() - - const fee = new Fee(gasLimit, [gasAmount]) - return fee -} diff --git a/bots/src/worker/batchSubmitter/index.ts b/bots/src/worker/batchSubmitter/index.ts deleted file mode 100644 index b012f123..00000000 --- a/bots/src/worker/batchSubmitter/index.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { initORM, finalizeORM } from '../../lib/db' -import { executorLogger as logger } from '../../lib/logger' -import { BatchSubmitter } from './batchSubmitter' -import { initServer, finalizeServer } from '../../loader' -import { batchController } from '../../controller' -import { once } from 'lodash' -import { config } from '../../config' - -let jobs: BatchSubmitter[] = [] - -async function runBot(): Promise { - jobs = [new BatchSubmitter()] - - try { - await Promise.all( - jobs.map((job) => { - job.run() - }) - ) - } catch (err) { - logger.info(err) - stopBatch() - } -} - -function stopBot(): void { - jobs.forEach((job) => job.stop()) -} - -export async function stopBatch(): Promise { - stopBot() - - logger.info('Closing listening port') - finalizeServer() - - logger.info('Closing DB connection') - await finalizeORM() - - logger.info('Finished Batch') - process.exit(0) -} - -export async function startBatch(): Promise { - await initORM() - - await initServer(batchController, config.BATCH_PORT) - - if (!config.ENABLE_API_ONLY) { - await runBot() - } - - // attach graceful shutdown - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const - signals.forEach((signal) => process.on(signal, once(stopBatch))) -} - -if (require.main === module) { - startBatch().catch(console.log) -} diff --git a/bots/src/worker/bridgeExecutor/Resurrector.ts b/bots/src/worker/bridgeExecutor/Resurrector.ts deleted file mode 100644 index bcb0f823..00000000 --- a/bots/src/worker/bridgeExecutor/Resurrector.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { getDB } from './db' -import UnconfirmedTxEntity from '../../orm/executor/UnconfirmedTxEntity' -import { Coin, MsgFinalizeTokenDeposit } from '@initia/initia.js' -import { INTERVAL_MONITOR, config } from '../../config' -import { DataSource } from 'typeorm' -import Bluebird from 'bluebird' -import winston from 'winston' -import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' -import { buildFailedTxNotification, buildResolveErrorNotification, notifySlack } from '../../lib/slack' - -export class Resurrector { - private db: DataSource - isRunning = true - executor: TxWallet - errorCounter = 0 - - constructor(public logger: winston.Logger) { - [this.db] = getDB() - initWallet(WalletType.Executor, config.l2lcd) - this.executor = getWallet(WalletType.Executor) - } - - async updateProcessed(unconfirmedTx: UnconfirmedTxEntity): Promise { - await this.db.getRepository(UnconfirmedTxEntity).update( - { - bridgeId: unconfirmedTx.bridgeId, - sequence: unconfirmedTx.sequence, - processed: false - }, - { processed: true } - ) - - this.logger.info( - `Resurrected failed tx: ${unconfirmedTx.bridgeId} ${unconfirmedTx.sequence}` - ) - } - - async resubmitFailedDepositTx(unconfirmedTx: UnconfirmedTxEntity): Promise { - const txKey = `${unconfirmedTx.sender}-${unconfirmedTx.receiver}-${unconfirmedTx.amount}` - const msg = new MsgFinalizeTokenDeposit( - this.executor.key.accAddress, - unconfirmedTx.sender, - unconfirmedTx.receiver, - new Coin(unconfirmedTx.l2Denom, unconfirmedTx.amount), - parseInt(unconfirmedTx.sequence), - unconfirmedTx.l1Height, - unconfirmedTx.l1Denom, - Buffer.from(unconfirmedTx.data, 'hex').toString('base64') - ) - try { - await this.executor.transaction([msg]) - await this.updateProcessed(unconfirmedTx) - await notifySlack(txKey, buildResolveErrorNotification(`[INFO] Transaction successfully resubmitted and processed for ${unconfirmedTx.sender} to ${unconfirmedTx.receiver} of amount ${unconfirmedTx.amount}.`), false) - } catch (err) { - if (this.errorCounter++ < 20) { - await Bluebird.delay(5 * 1000) - return - } - this.errorCounter = 0 - await notifySlack(txKey, buildFailedTxNotification(unconfirmedTx)) - } - } - - async getunconfirmedTxs(): Promise { - return await this.db.getRepository(UnconfirmedTxEntity).find({ - where: { - processed: false - } - }) - } - - public async ressurect(): Promise { - const unconfirmedTxs = await this.getunconfirmedTxs() - - for (const unconfirmedTx of unconfirmedTxs) { - const error = unconfirmedTx.error - - // Check x/opchild/errors.go - if (error.includes('deposit already finalized')) { - await this.updateProcessed(unconfirmedTx) - continue - } - await this.resubmitFailedDepositTx(unconfirmedTx) - } - } - - stop(): void { - this.isRunning = false - } - - public async run() { - while (this.isRunning) { - try { - await this.ressurect() - } catch (err) { - this.stop() - throw new Error(err) - } finally { - await Bluebird.delay(INTERVAL_MONITOR) - } - } - } -} diff --git a/bots/src/worker/bridgeExecutor/db.ts b/bots/src/worker/bridgeExecutor/db.ts deleted file mode 100644 index 7d5aaab9..00000000 --- a/bots/src/worker/bridgeExecutor/db.ts +++ /dev/null @@ -1,75 +0,0 @@ -import 'reflect-metadata' -import Bluebird from 'bluebird' -import { - ConnectionOptionsReader, - DataSource, - DataSourceOptions -} from 'typeorm' -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' -import { executorLogger as logger } from '../../lib/logger' - -import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy' - -import { - ExecutorOutputEntity, - ExecutorWithdrawalTxEntity, - ExecutorDepositTxEntity, - ExecutorUnconfirmedTxEntity, - StateEntity -} from '../../orm' - -const staticOptions = { - supportBigNumbers: true, - bigNumberStrings: true, - entities: [ - ExecutorOutputEntity, - ExecutorWithdrawalTxEntity, - ExecutorDepositTxEntity, - ExecutorUnconfirmedTxEntity, - StateEntity - ] -} - -let DB: DataSource[] = [] - -function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions - logger.info( - `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ - pgOpts.port || 5432 - }` - ) - - return new DataSource({ - ...options, - ...staticOptions, - namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize() -} - -export async function initORM(host?: string, port?: number): Promise { - const reader = new ConnectionOptionsReader() - const options = (await reader.all()) as PostgresConnectionOptions[] - - DB = await Bluebird.map(options, (opt) => { - const newOptions = { ...opt } - if (host) { - newOptions.host = host - } - if (port) { - newOptions.port = port - } - return initConnection(newOptions) - }) -} - -export function getDB(): DataSource[] { - if (!DB) { - throw new Error('DB not initialized') - } - return DB -} - -export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())) -} diff --git a/bots/src/worker/bridgeExecutor/index.ts b/bots/src/worker/bridgeExecutor/index.ts deleted file mode 100644 index 2aafcd90..00000000 --- a/bots/src/worker/bridgeExecutor/index.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { RPCClient, RPCSocket } from '../../lib/rpc' -import { L1Monitor } from '../../lib/monitor/l1' -import { L2Monitor } from '../../lib/monitor/l2' -import { executorController } from '../../controller' - -import { executorLogger as logger } from '../../lib/logger' -import { initORM, finalizeORM } from './db' -import { initServer, finalizeServer } from '../../loader' -import { once } from 'lodash' -import { config } from '../../config' -import { Resurrector } from './Resurrector' - -let monitors - -async function runBot(): Promise { - monitors = [ - new L1Monitor( - new RPCSocket(config.L1_RPC_URI, 10000, logger), - new RPCClient(config.L1_RPC_URI, logger), - logger - ), - new L2Monitor( - new RPCSocket(config.L2_RPC_URI, 10000, logger), - new RPCClient(config.L2_RPC_URI, logger), - logger - ), - new Resurrector(logger) - ] - try { - await Promise.all( - monitors.map((monitor) => { - monitor.run() - }) - ) - } catch (err) { - logger.info(err) - stopExecutor() - } -} - -function stopBot(): void { - monitors.forEach((monitor) => monitor.stop()) -} - -export async function stopExecutor(): Promise { - stopBot() - - logger.info('Closing listening port') - finalizeServer() - - logger.info('Closing DB connection') - await finalizeORM() - - logger.info('Finished Executor') - process.exit(0) -} - -export async function startExecutor(): Promise { - try { - await initORM() - - await initServer(executorController, config.EXECUTOR_PORT) - - if (!config.ENABLE_API_ONLY) { - await runBot() - } - } catch (err) { - throw new Error(err) - } - - // attach graceful shutdown - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const - signals.forEach((signal) => process.on(signal, once(stopExecutor))) -} - -if (require.main === module) { - startExecutor().catch(console.log) -} - -export { monitors } diff --git a/bots/src/worker/challenger/challenger.ts b/bots/src/worker/challenger/challenger.ts deleted file mode 100644 index b9f2a60d..00000000 --- a/bots/src/worker/challenger/challenger.ts +++ /dev/null @@ -1,319 +0,0 @@ -import { BridgeInfo, MsgDeleteOutput } from '@initia/initia.js' -import { DataSource, MoreThan } from 'typeorm' -import { getDB } from './db' -import { - ChallengerDepositTxEntity, - ChallengerFinalizeDepositTxEntity, - ChallengerOutputEntity, - ChallengerWithdrawalTxEntity, - ChallengedOutputEntity, - ChallengeEntity -} from '../../orm' -import { delay } from 'bluebird' -import { challengerLogger as logger } from '../../lib/logger' -import { INTERVAL_MONITOR, config } from '../../config' -import { EntityManager } from 'typeorm' -import { - getLastOutputInfo, - getOutputInfoByIndex, - getBridgeInfo -} from '../../lib/query' -import MonitorHelper from '../../lib/monitor/helper' -import winston from 'winston' -import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' -import { buildChallengerNotification, notifySlack } from '../../lib/slack' - -const THRESHOLD_MISS_INTERVAL = 5 - -export class Challenger { - private isRunning = false - private db: DataSource - bridgeId: number - bridgeInfo: BridgeInfo - - // members for challenge - l1LastCheckedSequence: number - l1DepositSequenceToCheck: number - l2OutputIndexToCheck: number - - submissionIntervalMs: number - missCount: number // count of miss interval to finalize deposit tx - threshold: number // threshold of miss interval to finalize deposit tx - helper: MonitorHelper - challenger: TxWallet - - constructor(public logger: winston.Logger) { - [this.db] = getDB() - this.bridgeId = config.BRIDGE_ID - this.isRunning = true - this.missCount = 0 - - this.helper = new MonitorHelper() - initWallet(WalletType.Challenger, config.l1lcd) - this.challenger = getWallet(WalletType.Challenger) - } - - public name(): string { - return 'challenge' - } - - public stop(): void { - this.isRunning = false - process.exit() - } - - async init(): Promise { - this.bridgeInfo = await getBridgeInfo(this.bridgeId) - this.submissionIntervalMs = - this.bridgeInfo.bridge_config.submission_interval.seconds.toNumber() * - 1000 - - const state = await this.db.getRepository(ChallengeEntity).findOne({ - where: { - name: this.name() - } - }) - - if (!state) { - await this.db.getRepository(ChallengeEntity).save({ - name: this.name(), - l1DepositSequenceToCheck: 1, - l1LastCheckedSequence: 0, - l2OutputIndexToCheck: 1 - }) - } - - this.l1DepositSequenceToCheck = state?.l1DepositSequenceToCheck || 1 - this.l2OutputIndexToCheck = state?.l2OutputIndexToCheck || 1 - this.l1LastCheckedSequence = state?.l1LastCheckedSequence || 0 - } - - public async run(): Promise { - await this.init() - while (this.isRunning) { - try { - await this.db.transaction(async (manager: EntityManager) => { - await this.challengeDepositTx(manager) - await this.challengeOutputRoot(manager) - }) - } catch (err) { - logger.error(`Challenger halted! ${err}`) - this.stop() - } finally { - await delay(INTERVAL_MONITOR) - } - } - } - - async challengeDepositTx(manager: EntityManager) { - if (this.l1LastCheckedSequence == this.l1DepositSequenceToCheck) { - // get next sequence from db with smallest sequence but bigger than last challenged sequence - const nextDepositSequenceToCheck = await manager - .getRepository(ChallengerDepositTxEntity) - .find({ - where: { sequence: MoreThan(this.l1DepositSequenceToCheck) } as any, - order: { sequence: 'ASC' }, - take: 1 - }) - - if (nextDepositSequenceToCheck.length === 0) return - this.l1DepositSequenceToCheck = Number( - nextDepositSequenceToCheck[0].sequence - ) - } - - const lastOutputInfo = await getLastOutputInfo(this.bridgeId) - const depositTxFromChallenger = await manager - .getRepository(ChallengerDepositTxEntity) - .findOne({ - where: { sequence: this.l1DepositSequenceToCheck } as any - }) - - if (!depositTxFromChallenger) return - this.l1DepositSequenceToCheck = Number(depositTxFromChallenger.sequence) - - // case 1. not finalized deposit tx - const depositFinalizeTxFromChallenger = await manager - .getRepository(ChallengerFinalizeDepositTxEntity) - .findOne({ - where: { sequence: this.l1DepositSequenceToCheck } as any - }) - - if (!depositFinalizeTxFromChallenger) { - this.missCount += 1 - this.logger.info( - `[L1 Challenger] deposit tx with sequence "${this.l1DepositSequenceToCheck}" is not finialized` - ) - if (this.missCount <= THRESHOLD_MISS_INTERVAL || !lastOutputInfo) { - return await delay(this.submissionIntervalMs) - } - return await this.handleChallengedOutputProposal( - manager, - lastOutputInfo.output_index, - `not finalized deposit tx within ${THRESHOLD_MISS_INTERVAL} submission interval ${depositFinalizeTxFromChallenger}` - ) - } - - // case 2. not equal deposit tx between L1 and L2 - const pair = await config.l1lcd.ophost.tokenPairByL1Denom( - this.bridgeId, - depositTxFromChallenger.l1Denom - ) - const isEqaul = - depositTxFromChallenger.sender === - depositFinalizeTxFromChallenger.sender && - depositTxFromChallenger.receiver === - depositFinalizeTxFromChallenger.receiver && - depositTxFromChallenger.amount === - depositFinalizeTxFromChallenger.amount && - pair.l2_denom === depositFinalizeTxFromChallenger.l2Denom - - if (!isEqaul && lastOutputInfo) { - await this.handleChallengedOutputProposal( - manager, - lastOutputInfo.output_index, - `not equal deposit tx between L1 and L2` - ) - } - - logger.info( - `[L1 Challenger] deposit tx matched in sequence : ${this.l1DepositSequenceToCheck}` - ) - - this.missCount = 0 - this.l1LastCheckedSequence = this.l1DepositSequenceToCheck - - await manager.getRepository(ChallengeEntity).update( - { name: this.name() }, - { - l1DepositSequenceToCheck: this.l1DepositSequenceToCheck, - l1LastCheckedSequence: this.l1LastCheckedSequence - } - ) - } - - async getChallengerOutputRoot( - manager: EntityManager, - outputIndex: number - ): Promise { - const output = await getOutputInfoByIndex(this.bridgeId, outputIndex) - if (!output) return null - const startBlockNumber = - outputIndex === 1 - ? 1 - : (await getOutputInfoByIndex(this.bridgeId, outputIndex - 1)) - .output_proposal.l2_block_number + 1 - const endBlockNumber = output.output_proposal.l2_block_number - const blockInfo = await config.l2lcd.tendermint.blockInfo(endBlockNumber) - - const txEntities = await this.helper.getWithdrawalTxs( - manager, - ChallengerWithdrawalTxEntity, - outputIndex - ) - - const merkleRoot = await this.helper.saveMerkleRootAndProof( - manager, - ChallengerWithdrawalTxEntity, - txEntities - ) - - const outputEntity = this.helper.calculateOutputEntity( - outputIndex, - blockInfo, - merkleRoot, - startBlockNumber, - endBlockNumber - ) - - await this.helper.saveEntity(manager, ChallengerOutputEntity, outputEntity) - return outputEntity.outputRoot - } - - async getContractOutputRoot(outputIndex: number): Promise { - try { - const outputInfo = await config.l1lcd.ophost.outputInfo( - this.bridgeId, - outputIndex - ) - return outputInfo.output_proposal.output_root - } catch (err) { - logger.info( - `[L2 Challenger] waiting for submitting output root in output index ${outputIndex}` - ) - return null - } - } - - async challengeOutputRoot(manager: EntityManager) { - // condition 1. ouptut should be submitted - const outputInfoToChallenge = await getOutputInfoByIndex( - this.bridgeId, - this.l2OutputIndexToCheck - ).catch(() => { - return null - }) - - if (!outputInfoToChallenge) return - - // case 1. output root not matched - const outputRootFromContract = await this.getContractOutputRoot( - this.l2OutputIndexToCheck - ) - const outputRootFromChallenger = await this.getChallengerOutputRoot( - manager, - this.l2OutputIndexToCheck - ) - - if (!outputRootFromContract || !outputRootFromChallenger) return - - if (outputRootFromContract !== outputRootFromChallenger) { - await this.handleChallengedOutputProposal( - manager, - this.l2OutputIndexToCheck, - `not equal output root from contract: ${outputRootFromContract}, from challenger: ${outputRootFromChallenger}` - ) - } - - logger.info( - `[L2 Challenger] output root matched in output index : ${this.l2OutputIndexToCheck}` - ) - this.l2OutputIndexToCheck += 1 - await manager.getRepository(ChallengeEntity).update( - { name: this.name() }, - { - l2OutputIndexToCheck: this.l2OutputIndexToCheck - } - ) - } - - async deleteOutputProposal(outputIndex: number) { - const msg = new MsgDeleteOutput( - this.challenger.key.accAddress, - this.bridgeId, - outputIndex - ) - - await this.challenger.transaction([msg]) - } - - async handleChallengedOutputProposal( - manager: EntityManager, - outputIndex: number, - reason?: string - ) { - const challengedOutput: ChallengedOutputEntity = { - outputIndex, - bridgeId: this.bridgeId.toString(), - reason: reason ?? 'unknown' - } - await manager.getRepository(ChallengedOutputEntity).save(challengedOutput) - - if (config.DELETE_OUTPUT_PROPOSAL === 'true') { - await this.deleteOutputProposal(outputIndex) - } - - await notifySlack(`${outputIndex}-${this.bridgeId}`, buildChallengerNotification(challengedOutput)); - process.exit(); - } -} diff --git a/bots/src/worker/challenger/db.ts b/bots/src/worker/challenger/db.ts deleted file mode 100644 index af3fdebe..00000000 --- a/bots/src/worker/challenger/db.ts +++ /dev/null @@ -1,76 +0,0 @@ -import 'reflect-metadata' -import Bluebird from 'bluebird' -import { - ConnectionOptionsReader, - DataSource, - DataSourceOptions -} from 'typeorm' -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' -import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy' - -const debug = require('debug')('orm') - -import { - ChallengerOutputEntity, - ChallengerDepositTxEntity, - StateEntity, - ChallengerWithdrawalTxEntity, - ChallengedOutputEntity, - ChallengerFinalizeDepositTxEntity, - ChallengerFinalizeWithdrawalTxEntity, - ChallengeEntity -} from '../../orm' - -const staticOptions = { - supportBigNumbers: true, - bigNumberStrings: true, - entities: [ - StateEntity, - ChallengerFinalizeDepositTxEntity, - ChallengerFinalizeWithdrawalTxEntity, - ChallengerWithdrawalTxEntity, - ChallengerDepositTxEntity, - ChallengerOutputEntity, - ChallengedOutputEntity, - ChallengeEntity - ] -} - -let DB: DataSource[] = [] - -function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions - debug( - `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ - pgOpts.port || 5432 - }` - ) - - return new DataSource({ - ...options, - ...staticOptions, - namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize() -} - -export async function initORM(): Promise { - const reader = new ConnectionOptionsReader() - const options = (await reader.all()) as PostgresConnectionOptions[] - - if (options.length && !options.filter((o) => o.name === 'default').length) { - options[0]['name' as any] = 'default' - } - - DB = await Bluebird.map(options, (opt) => initConnection(opt)) -} - -export function getDB(): DataSource[] { - if (!DB) { - throw new Error('DB not initialized') - } - return DB -} - -export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())) -} diff --git a/bots/src/worker/challenger/index.ts b/bots/src/worker/challenger/index.ts deleted file mode 100644 index 744c2ee1..00000000 --- a/bots/src/worker/challenger/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { RPCClient, RPCSocket } from '../../lib/rpc' -import { Monitor } from '../../lib/monitor' -import { Challenger } from './challenger' -import { initORM, finalizeORM } from './db' -import { challengerLogger as logger } from '../../lib/logger' -import { once } from 'lodash' -import { L1Monitor } from './monitor_l1' -import { L2Monitor } from './monitor_l2' -import { config } from '../../config' - -let monitors: (Monitor | Challenger)[] - -async function runBot(): Promise { - monitors = [ - new L1Monitor( - new RPCSocket(config.L1_RPC_URI, 10000, logger), - new RPCClient(config.L1_RPC_URI, logger), - logger - ), - new L2Monitor( - new RPCSocket(config.L2_RPC_URI, 10000, logger), - new RPCClient(config.L2_RPC_URI, logger), - logger - ), - new Challenger(logger) - ] - try { - await Promise.all( - monitors.map((monitor) => { - monitor.run() - }) - ) - } catch (err) { - logger.info(err) - stopChallenger() - } -} - -function stopBot(): void { - monitors.forEach((monitor) => monitor.stop()) -} - -export async function stopChallenger(): Promise { - stopBot() - - logger.info('Closing DB connection') - await finalizeORM() - - logger.info('Finished Challenger') - process.exit(0) -} - -export async function startChallenger(): Promise { - await initORM() - await runBot() - - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const - signals.forEach((signal) => process.on(signal, once(stopChallenger))) -} - -if (require.main === module) { - startChallenger().catch(console.log) -} diff --git a/bots/src/worker/challenger/monitor_l1.ts b/bots/src/worker/challenger/monitor_l1.ts deleted file mode 100644 index 05db8833..00000000 --- a/bots/src/worker/challenger/monitor_l1.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { Monitor } from '../../lib/monitor' -import { - ChallengerDepositTxEntity, - ChallengerFinalizeWithdrawalTxEntity -} from '../../orm' -import { EntityManager } from 'typeorm' -import { RPCClient, RPCSocket } from '../../lib/rpc' -import { getDB } from './db' -import winston from 'winston' -import { config } from '../../config' - -export class L1Monitor extends Monitor { - constructor( - public socket: RPCSocket, - public rpcClient: RPCClient, - logger: winston.Logger - ) { - super(socket, rpcClient, logger); - [this.db] = getDB() - } - - public name(): string { - return 'challenger_l1_monitor' - } - - public async handleInitiateTokenDeposit( - manager: EntityManager, - data: { [key: string]: string } - ): Promise { - const entity: ChallengerDepositTxEntity = { - sequence: data['l1_sequence'], - sender: data['from'], - receiver: data['to'], - l1Denom: data['l1_denom'], - l2Denom: data['l2_denom'], - amount: data['amount'], - data: data['data'] - } - await manager.getRepository(ChallengerDepositTxEntity).save(entity) - } - - public async handleFinalizeTokenWithdrawalEvent( - manager: EntityManager, - data: { [key: string]: string } - ): Promise { - const entity: ChallengerFinalizeWithdrawalTxEntity = { - bridgeId: data['bridge_id'], - outputIndex: parseInt(data['output_index']), - sequence: data['l2_sequence'], - sender: data['from'], - receiver: data['to'], - l1Denom: data['l1_denom'], - l2Denom: data['l2_denom'], - amount: data['amount'] - } - - await manager - .getRepository(ChallengerFinalizeWithdrawalTxEntity) - .save(entity) - } - - public async handleEvents(manager: EntityManager): Promise { - const [isEmpty, events] = await this.helper.fetchAllEvents( - config.l1lcd, - this.currentHeight - ) - - if (isEmpty) return false - - const depositEvents = events.filter( - (evt) => evt.type === 'initiate_token_deposit' - ) - for (const evt of depositEvents) { - const attrMap = this.helper.eventsToAttrMap(evt) - if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue - await this.handleInitiateTokenDeposit(manager, attrMap) - } - - const finalizeEvents = events.filter( - (evt) => evt.type === 'finalize_token_withdrawal' - ) - for (const evt of finalizeEvents) { - const attrMap = this.helper.eventsToAttrMap(evt) - if (attrMap['bridge_id'] !== this.bridgeId.toString()) continue - await this.handleFinalizeTokenWithdrawalEvent(manager, attrMap) - } - - return true - } -} diff --git a/bots/src/worker/challenger/monitor_l2.ts b/bots/src/worker/challenger/monitor_l2.ts deleted file mode 100644 index d4bbed1a..00000000 --- a/bots/src/worker/challenger/monitor_l2.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { - ChallengerFinalizeDepositTxEntity, - ChallengerOutputEntity, - ChallengerWithdrawalTxEntity -} from '../../orm' -import { OutputInfo } from '@initia/initia.js' -import { Monitor } from '../../lib/monitor' -import { EntityManager } from 'typeorm' -import { RPCClient, RPCSocket } from '../../lib/rpc' -import winston from 'winston' -import { getDB } from './db' -import { config } from '../../config' - -export class L2Monitor extends Monitor { - outputIndex: number - outputInfo: OutputInfo - startBlockNumber: number - - constructor( - public socket: RPCSocket, - public rpcClient: RPCClient, - logger: winston.Logger - ) { - super(socket, rpcClient, logger); - [this.db] = getDB() - this.outputIndex = 0 - } - - public name(): string { - return 'challenger_l2_monitor' - } - - private async handleInitiateTokenWithdrawalEvent( - manager: EntityManager, - data: { [key: string]: string } - ): Promise { - const outputInfo = await this.helper.getLastOutputFromDB( - manager, - ChallengerOutputEntity - ) - - if (!outputInfo) return - - const pair = await config.l1lcd.ophost.tokenPairByL2Denom( - this.bridgeId, - data['denom'] - ) - - const tx: ChallengerWithdrawalTxEntity = { - l1Denom: pair.l1_denom, - l2Denom: pair.l2_denom, - sequence: data['l2_sequence'], - sender: data['from'], - receiver: data['to'], - amount: data['amount'], - bridgeId: this.bridgeId.toString(), - outputIndex: outputInfo ? outputInfo.outputIndex + 1 : 1, - merkleRoot: '', - merkleProof: [] - } - - await this.helper.saveEntity(manager, ChallengerWithdrawalTxEntity, tx) - } - - public async handleFinalizeTokenDepositEvent( - manager: EntityManager, - data: { [key: string]: string } - ): Promise { - const entity: ChallengerFinalizeDepositTxEntity = { - sequence: data['l1_sequence'], - sender: data['sender'], - receiver: data['recipient'], - l2Denom: data['denom'], - amount: data['amount'], - l1Height: parseInt(data['finalize_height']) - } - await manager.getRepository(ChallengerFinalizeDepositTxEntity).save(entity) - } - - public async handleEvents(manager: EntityManager): Promise { - const [isEmpty, events] = await this.helper.fetchAllEvents( - config.l2lcd, - this.currentHeight - ) - - if (isEmpty) return false - - const withdrawalEvents = events.filter( - (evt) => evt.type === 'initiate_token_withdrawal' - ) - for (const evt of withdrawalEvents) { - const attrMap = this.helper.eventsToAttrMap(evt) - await this.handleInitiateTokenWithdrawalEvent(manager, attrMap) - } - - const finalizeEvents = events.filter( - (evt) => evt.type === 'finalize_token_deposit' - ) - for (const evt of finalizeEvents) { - const attrMap = this.helper.eventsToAttrMap(evt) - await this.handleFinalizeTokenDepositEvent(manager, attrMap) - } - - return true - } -} diff --git a/bots/src/worker/outputSubmitter/db.ts b/bots/src/worker/outputSubmitter/db.ts deleted file mode 100644 index 9b9f448c..00000000 --- a/bots/src/worker/outputSubmitter/db.ts +++ /dev/null @@ -1,58 +0,0 @@ -import 'reflect-metadata' -import Bluebird from 'bluebird' -import { - ConnectionOptionsReader, - DataSource, - DataSourceOptions -} from 'typeorm' -import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions' -import CamelToSnakeNamingStrategy from '../../orm/CamelToSnakeNamingStrategy' - -const debug = require('debug')('orm') - -import { ExecutorOutputEntity } from '../../orm' - -const staticOptions = { - supportBigNumbers: true, - bigNumberStrings: true, - entities: [ExecutorOutputEntity] -} - -let DB: DataSource[] = [] - -function initConnection(options: DataSourceOptions): Promise { - const pgOpts = options as PostgresConnectionOptions - debug( - `creating connection default to ${pgOpts.username}@${pgOpts.host}:${ - pgOpts.port || 5432 - }` - ) - - return new DataSource({ - ...options, - ...staticOptions, - namingStrategy: new CamelToSnakeNamingStrategy() - }).initialize() -} - -export async function initORM(): Promise { - const reader = new ConnectionOptionsReader() - const options = (await reader.all()) as PostgresConnectionOptions[] - - if (options.length && !options.filter((o) => o.name === 'default').length) { - options[0]['name' as any] = 'default' - } - - DB = await Bluebird.map(options, (opt) => initConnection(opt)) -} - -export function getDB(): DataSource[] { - if (!DB) { - throw new Error('DB not initialized') - } - return DB -} - -export async function finalizeORM(): Promise { - await Promise.all(DB.map((c) => c.destroy())) -} diff --git a/bots/src/worker/outputSubmitter/index.ts b/bots/src/worker/outputSubmitter/index.ts deleted file mode 100644 index d148f823..00000000 --- a/bots/src/worker/outputSubmitter/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { OutputSubmitter } from './outputSubmitter' -import { outputLogger as logger } from '../../lib/logger' -import { once } from 'lodash' -import { initORM } from './db' - -let jobs: OutputSubmitter[] - -async function runBot(): Promise { - jobs = [new OutputSubmitter()] - - try { - await Promise.all( - jobs.map((job) => { - job.run() - }) - ) - } catch (err) { - logger.info(err) - stopOutput() - } -} - -function stopBot(): void { - jobs.forEach((job) => job.stop()) -} - -export async function stopOutput(): Promise { - stopBot() - - logger.info('Finished OutputSubmitter') - process.exit(0) -} - -export async function startOutput(): Promise { - await initORM() - await runBot() - - // attach graceful shutdown - const signals = ['SIGHUP', 'SIGINT', 'SIGTERM'] as const - signals.forEach((signal) => process.on(signal, once(stopOutput))) -} - -if (require.main === module) { - startOutput().catch(console.log) -} diff --git a/bots/src/worker/outputSubmitter/outputSubmitter.ts b/bots/src/worker/outputSubmitter/outputSubmitter.ts deleted file mode 100644 index 3a233672..00000000 --- a/bots/src/worker/outputSubmitter/outputSubmitter.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { MsgProposeOutput } from '@initia/initia.js' -import { INTERVAL_OUTPUT } from '../../config' -import { ExecutorOutputEntity } from '../../orm' -import { delay } from 'bluebird' -import { outputLogger as logger } from '../../lib/logger' -import { ErrorTypes } from '../../lib/error' -import { config } from '../../config' -import { getLastOutputInfo } from '../../lib/query' -import MonitorHelper from '../../lib/monitor/helper' -import { DataSource, EntityManager } from 'typeorm' -import { getDB } from './db' -import { TxWallet, WalletType, getWallet, initWallet } from '../../lib/wallet' - -export class OutputSubmitter { - private db: DataSource - private submitter: TxWallet - private syncedOutputIndex = 1 - private processedBlockNumber = 1 - private isRunning = false - private bridgeId: number - helper: MonitorHelper = new MonitorHelper() - - async init() { - [this.db] = getDB() - initWallet(WalletType.OutputSubmitter, config.l1lcd) - this.submitter = getWallet(WalletType.OutputSubmitter) - this.bridgeId = config.BRIDGE_ID - this.isRunning = true - } - - public async run() { - await this.init() - - while (this.isRunning) { - await this.processOutput() - } - } - - async processOutput() { - try { - await this.db.transaction(async (manager: EntityManager) => { - const lastOutputInfo = await getLastOutputInfo(this.bridgeId) - if (lastOutputInfo) { - this.syncedOutputIndex = lastOutputInfo.output_index + 1 - } - - const output = await this.helper.getOutputByIndex( - manager, - ExecutorOutputEntity, - this.syncedOutputIndex - ) - if (!output) return - - await this.proposeOutput(output) - logger.info( - `successfully submitted! output index: ${this.syncedOutputIndex}, output root: ${output.outputRoot} (${output.startBlockNumber}, ${output.endBlockNumber})` - ) - }) - } catch (err) { - if (err.response?.data.type === ErrorTypes.NOT_FOUND_ERROR) { - logger.info( - `waiting for output index: ${this.syncedOutputIndex}, processed block number: ${this.processedBlockNumber}` - ) - await delay(INTERVAL_OUTPUT) - } else { - logger.error(`Output Submitter halted! ${err}`) - this.stop() - } - } - } - - public async stop() { - this.isRunning = false - } - - private async proposeOutput(outputEntity: ExecutorOutputEntity) { - const msg = new MsgProposeOutput( - this.submitter.key.accAddress, - this.bridgeId, - outputEntity.endBlockNumber, - outputEntity.outputRoot - ) - - await this.submitter.transaction([msg]) - - this.processedBlockNumber = outputEntity.endBlockNumber - } -} diff --git a/bots/tsconfig.json b/bots/tsconfig.json deleted file mode 100644 index d7f4bb0e..00000000 --- a/bots/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "es2021", - "module": "commonjs", - "allowJs": false, - "esModuleInterop": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "skipLibCheck": true, - "strictNullChecks": true, - "sourceMap": true, - "baseUrl": "src", - "sourceRoot": "src", - "outDir": "dist", - "typeRoots": ["src/types", "node_modules/@types"], - "paths": { - "graphql": ["node_modules/graphql"], - "orm/*": ["orm/*"], - "*": ["*"] - } - }, - "include": ["src/**/*.ts", "test", "lib", "test/**/*.ts", "src/worker/bridgeExecutor/db.ts"], - "exclude": ["node_modules", "apidoc", "dist", "./src/**/*.spec.ts", "./src/test"] -} diff --git a/bots/typedoc.json b/bots/typedoc.json deleted file mode 100644 index 9b061738..00000000 --- a/bots/typedoc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "inputFiles": ["./src"], - "mode": "file", - "out": "docs", - "includeDeclarations": true, - "excludeExternals": true, - "exclude": "**/*+(index|.spec|.e2e).ts", - "theme": "default", - "name": "Mirror Airdrop", - "excludeNotExported": true, - "excludePrivate": true, - "excludeProtected": true, - "media": "img", - "hideGenerator": true - } \ No newline at end of file From cbfa6dd12443d9e69f4c30925480510913bf21c7 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:12:25 +0900 Subject: [PATCH 10/13] feat: fee whitelist (#52) * fee whitelist * fix dependencies --- .github/workflows/test.yml | 2 +- Makefile | 2 +- api/go.mod | 2 +- go.mod | 55 ++++--- go.sum | 99 ++++++------ go.work | 2 +- go.work.sum | 241 +++++++++++++++++++++++++++- proto/opinit/opchild/v1/types.proto | 6 + x/opchild/keeper/params.go | 10 ++ x/opchild/keeper/params_test.go | 5 + x/opchild/lanes/free.go | 51 ++++++ x/opchild/lanes/free_test.go | 85 ++++++++++ x/opchild/lanes/mev.go | 27 ++++ x/opchild/types/params.go | 11 +- x/opchild/types/types.pb.go | 163 +++++++++++++------ 15 files changed, 632 insertions(+), 129 deletions(-) create mode 100644 x/opchild/lanes/free.go create mode 100644 x/opchild/lanes/free_test.go create mode 100644 x/opchild/lanes/mev.go diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65e3d72c..cd2955f9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.21 + go-version: 1.22 - name: Install openssl run: sudo apt-get install libssl-dev - uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 0fe20ccf..b83338a0 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ DOCKER := $(shell which docker) ### Protobuf ### ############################################################################### -protoVer=0.13.0 +protoVer=0.14.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) diff --git a/api/go.mod b/api/go.mod index 4c089e17..e9158816 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,6 +1,6 @@ module github.com/initia-labs/OPinit/api -go 1.21 +go 1.22 require ( cosmossdk.io/api v0.7.3 diff --git a/go.mod b/go.mod index 743a419e..1b86e05f 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,11 @@ module github.com/initia-labs/OPinit -go 1.21 +go 1.22 -toolchain go1.21.5 +toolchain go1.22.2 require ( + cosmossdk.io/api v0.7.3 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.0 cosmossdk.io/errors v1.0.0 @@ -15,29 +16,30 @@ require ( cosmossdk.io/x/tx v0.12.0 github.com/cometbft/cometbft v0.38.2 github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.3 + github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.50.2 github.com/cosmos/gogoproto v1.4.11 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/spf13/cobra v1.7.0 - github.com/spf13/pflag v1.0.5 + github.com/initia-labs/OPinit/api v0.0.0 + github.com/pkg/errors v0.9.1 + github.com/skip-mev/block-sdk v0.0.0-20231213233341-deceeb0e993b + github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.8.4 golang.org/x/crypto v0.16.0 - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.32.0 gopkg.in/yaml.v3 v3.0.1 sigs.k8s.io/yaml v1.4.0 ) require ( - cloud.google.com/go v0.110.8 // indirect - cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go v0.110.9 // indirect + cloud.google.com/go/compute v1.23.2 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect + cloud.google.com/go/iam v1.1.4 // indirect cloud.google.com/go/storage v1.30.1 // indirect - cosmossdk.io/api v0.7.2 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/x/circuit v0.1.0 // indirect @@ -74,7 +76,7 @@ require ( github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -83,7 +85,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/emicklei/dot v1.6.0 // indirect - github.com/fatih/color v1.15.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/getsentry/sentry-go v0.25.0 // indirect @@ -100,9 +102,9 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.4 // indirect + github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.3.1 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect @@ -131,7 +133,7 @@ require ( github.com/klauspost/compress v1.17.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lib/pq v1.10.7 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.6 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -149,7 +151,6 @@ require ( github.com/onsi/ginkgo v1.16.4 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.17.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect @@ -159,12 +160,15 @@ require ( github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.31.0 // indirect + github.com/sagikazarmark/locafero v0.3.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.16.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.17.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.7.0 // indirect @@ -174,6 +178,7 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect + go.uber.org/multierr v1.10.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect @@ -182,9 +187,9 @@ require ( golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.128.0 // indirect + google.golang.org/api v0.143.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -192,6 +197,10 @@ require ( pgregory.net/rapid v1.1.0 // indirect ) +replace ( + github.com/initia-labs/OPinit/api => ./api +) + replace ( // use cosmos fork of keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 diff --git a/go.sum b/go.sum index e2d7fe02..7de62532 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= -cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= +cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute v1.23.2 h1:nWEMDhgbBkBJjfpVySqU4jgWdc22PLR0o4vEexZHers= +cloud.google.com/go/compute v1.23.2/go.mod h1:JJ0atRC0J/oWYiiVBmsSsrRnh92DhZPG4hFDcR04Rns= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +111,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= +cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -187,8 +187,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk= +cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -352,8 +352,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= github.com/cosmos/cosmos-sdk v0.50.2 h1:u52xPZXLfeuR1HbGPCyOsMQvAbCtvoJbpfH5diBPVuc= github.com/cosmos/cosmos-sdk v0.50.2/go.mod h1:n/WQqDh73qdtBmY9Op3sYgiBgTujSfGSd6CNh6GfqvQ= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= @@ -373,14 +373,15 @@ github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5n github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= @@ -424,8 +425,8 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -590,8 +591,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -600,8 +601,8 @@ github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.4 h1:uGy6JWR/uMIILU8wbf+OkstIrNiMjGpEIyhx8f6W7s4= -github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -749,8 +750,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -937,6 +938,10 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= +github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -946,35 +951,37 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/skip-mev/block-sdk v0.0.0-20231213233341-deceeb0e993b h1:p7treH8qfsqJa31MNCh/xWItMWS+kub3GSH2dYN+0uk= +github.com/skip-mev/block-sdk v0.0.0-20231213233341-deceeb0e993b/go.mod h1:yvRRZgkinnjsvf6357Fg9Nbi8vRYIJWOLB+cwz3uCP8= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= +github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -995,8 +1002,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= @@ -1051,6 +1058,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1068,7 +1077,6 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= @@ -1111,8 +1119,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1336,7 +1344,6 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= @@ -1408,8 +1415,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1468,8 +1475,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.128.0 h1:RjPESny5CnQRn9V6siglged+DZCgfu9l6mO9dkX9VOg= -google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= +google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA= +google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1587,10 +1594,10 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= +google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1652,8 +1659,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go.work b/go.work index 55509f71..5bc29fe7 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.21.5 +go 1.22 use ( . diff --git a/go.work.sum b/go.work.sum index 8c2fe288..5273d624 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,171 +1,305 @@ 4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= +cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= +cloud.google.com/go/accessapproval v1.7.3/go.mod h1:4l8+pwIxGTNqSf4T3ds8nLO94NQf0W/KnMNuQ9PbnP8= cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= +cloud.google.com/go/accesscontextmanager v1.8.3/go.mod h1:4i/JkF2JiFbhLnnpnfoTX5vRXfhf9ukhU1ANOTALTOQ= cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= +cloud.google.com/go/aiplatform v1.51.2/go.mod h1:hCqVYB3mY45w99TmetEoe8eCQEwZEp9WHxeZdcv9phw= cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= +cloud.google.com/go/analytics v0.21.5/go.mod h1:BQtOBHWTlJ96axpPPnw5CvGJ6i3Ve/qX2fTxR8qWyr8= cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= +cloud.google.com/go/apigateway v1.6.3/go.mod h1:k68PXWpEs6BVDTtnLQAyG606Q3mz8pshItwPXjgv44Y= cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= +cloud.google.com/go/apigeeconnect v1.6.3/go.mod h1:peG0HFQ0si2bN15M6QSjEW/W7Gy3NYkWGz7pFz13cbo= cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= +cloud.google.com/go/apigeeregistry v0.8.1/go.mod h1:MW4ig1N4JZQsXmBSwH4rwpgDonocz7FPBSw6XPGHmYw= cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= +cloud.google.com/go/appengine v1.8.3/go.mod h1:2oUPZ1LVZ5EXi+AF1ihNAF+S8JrzQ3till5m9VQkrsk= cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= +cloud.google.com/go/area120 v0.8.3/go.mod h1:5zj6pMzVTH+SVHljdSKC35sriR/CVvQZzG/Icdyriw0= cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= +cloud.google.com/go/artifactregistry v1.14.4/go.mod h1:SJJcZTMv6ce0LDMUnihCN7WSrI+kBSFV0KIKo8S8aYU= cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= +cloud.google.com/go/asset v1.15.2/go.mod h1:B6H5tclkXvXz7PD22qCA2TDxSVQfasa3iDlM89O2NXs= cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= +cloud.google.com/go/assuredworkloads v1.11.3/go.mod h1:vEjfTKYyRUaIeA0bsGJceFV2JKpVRgyG2op3jfa59Zs= cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= +cloud.google.com/go/automl v1.13.3/go.mod h1:Y8KwvyAZFOsMAPqUCfNu1AyclbC6ivCUF/MTwORymyY= cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= +cloud.google.com/go/baremetalsolution v1.2.2/go.mod h1:O5V6Uu1vzVelYahKfwEWRMaS3AbCkeYHy3145s1FkhM= cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= +cloud.google.com/go/batch v1.6.1/go.mod h1:urdpD13zPe6YOK+6iZs/8/x2VBRofvblLpx0t57vM98= cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= +cloud.google.com/go/beyondcorp v1.0.2/go.mod h1:m8cpG7caD+5su+1eZr+TSvF6r21NdLJk4f9u4SP2Ntc= cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= +cloud.google.com/go/billing v1.17.3/go.mod h1:z83AkoZ7mZwBGT3yTnt6rSGI1OOsHSIi6a5M3mJ8NaU= cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= +cloud.google.com/go/binaryauthorization v1.7.2/go.mod h1:kFK5fQtxEp97m92ziy+hbu+uKocka1qRRL8MVJIgjv0= cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= +cloud.google.com/go/certificatemanager v1.7.3/go.mod h1:T/sZYuC30PTag0TLo28VedIRIj1KPGcOQzjWAptHa00= cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= +cloud.google.com/go/channel v1.17.2/go.mod h1:aT2LhnftnyfQceFql5I/mP8mIbiiJS4lWqgXA815zMk= cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= +cloud.google.com/go/cloudbuild v1.14.2/go.mod h1:Bn6RO0mBYk8Vlrt+8NLrru7WXlQ9/RDWz2uo5KG1/sg= cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= +cloud.google.com/go/clouddms v1.7.2/go.mod h1:Rk32TmWmHo64XqDvW7jgkFQet1tUKNVzs7oajtJT3jU= cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= +cloud.google.com/go/cloudtasks v1.12.3/go.mod h1:GPVXhIOSGEaR+3xT4Fp72ScI+HjHffSS4B8+BaBB5Ys= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= +cloud.google.com/go/contactcenterinsights v1.11.2/go.mod h1:A9PIR5ov5cRcd28KlDbmmXE8Aay+Gccer2h4wzkYFso= cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= +cloud.google.com/go/container v1.26.2/go.mod h1:YlO84xCt5xupVbLaMY4s3XNE79MUJ+49VmkInr6HvF4= cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= +cloud.google.com/go/containeranalysis v0.11.2/go.mod h1:xibioGBC1MD2j4reTyV1xY1/MvKaz+fyM9ENWhmIeP8= cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= +cloud.google.com/go/datacatalog v1.18.2/go.mod h1:SPVgWW2WEMuWHA+fHodYjmxPiMqcOiWfhc9OD5msigk= cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= +cloud.google.com/go/dataflow v0.9.3/go.mod h1:HI4kMVjcHGTs3jTHW/kv3501YW+eloiJSLxkJa/vqFE= cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= +cloud.google.com/go/dataform v0.8.3/go.mod h1:8nI/tvv5Fso0drO3pEjtowz58lodx8MVkdV2q0aPlqg= cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= +cloud.google.com/go/datafusion v1.7.3/go.mod h1:eoLt1uFXKGBq48jy9LZ+Is8EAVLnmn50lNncLzwYokE= cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= +cloud.google.com/go/datalabeling v0.8.3/go.mod h1:tvPhpGyS/V7lqjmb3V0TaDdGvhzgR1JoW7G2bpi2UTI= cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= +cloud.google.com/go/dataplex v1.10.2/go.mod h1:xdC8URdTrCrZMW6keY779ZT1cTOfV8KEPNsw+LTRT1Y= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= +cloud.google.com/go/dataproc/v2 v2.2.2/go.mod h1:aocQywVmQVF4i8CL740rNI/ZRpsaaC1Wh2++BJ7HEJ4= cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= +cloud.google.com/go/dataqna v0.8.3/go.mod h1:wXNBW2uvc9e7Gl5k8adyAMnLush1KVV6lZUhB+rqNu4= cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= +cloud.google.com/go/datastream v1.10.2/go.mod h1:W42TFgKAs/om6x/CdXX5E4oiAsKlH+e8MTGy81zdYt0= cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= +cloud.google.com/go/deploy v1.14.1/go.mod h1:N8S0b+aIHSEeSr5ORVoC0+/mOPUysVt8ae4QkZYolAw= cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= +cloud.google.com/go/dialogflow v1.44.2/go.mod h1:QzFYndeJhpVPElnFkUXxdlptx0wPnBWLCBT9BvtC3/c= cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= +cloud.google.com/go/dlp v1.10.3/go.mod h1:iUaTc/ln8I+QT6Ai5vmuwfw8fqTk2kaz0FvCwhLCom0= cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= +cloud.google.com/go/documentai v1.23.4/go.mod h1:4MYAaEMnADPN1LPN5xboDR5QVB6AgsaxgFdJhitlE2Y= cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= +cloud.google.com/go/domains v0.9.3/go.mod h1:29k66YNDLDY9LCFKpGFeh6Nj9r62ZKm5EsUJxAl84KU= cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= +cloud.google.com/go/edgecontainer v1.1.3/go.mod h1:Ll2DtIABzEfaxaVSbwj3QHFaOOovlDFiWVDu349jSsA= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= +cloud.google.com/go/essentialcontacts v1.6.4/go.mod h1:iju5Vy3d9tJUg0PYMd1nHhjV7xoCXaOAVabrwLaPBEM= cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= +cloud.google.com/go/eventarc v1.13.2/go.mod h1:X9A80ShVu19fb4e5sc/OLV7mpFUKZMwfJFeeWhcIObM= cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= +cloud.google.com/go/filestore v1.7.3/go.mod h1:Qp8WaEERR3cSkxToxFPHh/b8AACkSut+4qlCjAmKTV0= cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= +cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= +cloud.google.com/go/functions v1.15.3/go.mod h1:r/AMHwBheapkkySEhiZYLDBwVJCdlRwsm4ieJu35/Ug= cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= +cloud.google.com/go/gkebackup v1.3.3/go.mod h1:eMk7/wVV5P22KBakhQnJxWSVftL1p4VBFLpv0kIft7I= cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= +cloud.google.com/go/gkeconnect v0.8.3/go.mod h1:i9GDTrfzBSUZGCe98qSu1B8YB8qfapT57PenIb820Jo= cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= +cloud.google.com/go/gkehub v0.14.3/go.mod h1:jAl6WafkHHW18qgq7kqcrXYzN08hXeK/Va3utN8VKg8= cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= +cloud.google.com/go/gkemulticloud v1.0.2/go.mod h1:+ee5VXxKb3H1l4LZAcgWB/rvI16VTNTrInWxDjAGsGo= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= +cloud.google.com/go/gsuiteaddons v1.6.3/go.mod h1:sCFJkZoMrLZT3JTb8uJqgKPNshH2tfXeCwTFRebTq48= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= +cloud.google.com/go/iap v1.9.2/go.mod h1:GwDTOs047PPSnwRD0Us5FKf4WDRcVvHg1q9WVkKBhdI= cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= +cloud.google.com/go/ids v1.4.3/go.mod h1:9CXPqI3GedjmkjbMWCUhMZ2P2N7TUMzAkVXYEH2orYU= cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= +cloud.google.com/go/iot v1.7.3/go.mod h1:t8itFchkol4VgNbHnIq9lXoOOtHNR3uAACQMYbN9N4I= cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= +cloud.google.com/go/kms v1.15.4/go.mod h1:L3Sdj6QTHK8dfwK5D1JLsAyELsNMnd3tAIwGS4ltKpc= cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= +cloud.google.com/go/language v1.12.1/go.mod h1:zQhalE2QlQIxbKIZt54IASBzmZpN/aDASea5zl1l+J4= cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= +cloud.google.com/go/lifesciences v0.9.3/go.mod h1:gNGBOJV80IWZdkd+xz4GQj4mbqaz737SCLHn2aRhQKM= cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= +cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= +cloud.google.com/go/longrunning v0.5.3/go.mod h1:y/0ga59EYu58J6SHmmQOvekvND2qODbu8ywBBW7EK7Y= cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= +cloud.google.com/go/managedidentities v1.6.3/go.mod h1:tewiat9WLyFN0Fi7q1fDD5+0N4VUoL0SCX0OTCthZq4= cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= +cloud.google.com/go/maps v1.5.1/go.mod h1:NPMZw1LJwQZYCfz4y+EIw+SI+24A4bpdFJqdKVr0lt4= cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= +cloud.google.com/go/mediatranslation v0.8.3/go.mod h1:F9OnXTy336rteOEywtY7FOqCk+J43o2RF638hkOQl4Y= cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= +cloud.google.com/go/memcache v1.10.3/go.mod h1:6z89A41MT2DVAW0P4iIRdu5cmRTsbsFn4cyiIx8gbwo= cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= +cloud.google.com/go/metastore v1.13.2/go.mod h1:KS59dD+unBji/kFebVp8XU/quNSyo8b6N6tPGspKszA= cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= +cloud.google.com/go/monitoring v1.16.2/go.mod h1:B44KGwi4ZCF8Rk/5n+FWeispDXoKSk9oss2QNlXJBgc= cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= +cloud.google.com/go/networkconnectivity v1.14.2/go.mod h1:5UFlwIisZylSkGG1AdwK/WZUaoz12PKu6wODwIbFzJo= cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= +cloud.google.com/go/networkmanagement v1.9.2/go.mod h1:iDGvGzAoYRghhp4j2Cji7sF899GnfGQcQRQwgVOWnDw= cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= +cloud.google.com/go/networksecurity v0.9.3/go.mod h1:l+C0ynM6P+KV9YjOnx+kk5IZqMSLccdBqW6GUoF4p/0= cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= +cloud.google.com/go/notebooks v1.11.1/go.mod h1:V2Zkv8wX9kDCGRJqYoI+bQAaoVeE5kSiz4yYHd2yJwQ= cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= +cloud.google.com/go/optimization v1.6.1/go.mod h1:hH2RYPTTM9e9zOiTaYPTiGPcGdNZVnBSBxjIAJzUkqo= cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= +cloud.google.com/go/orchestration v1.8.3/go.mod h1:xhgWAYqlbYjlz2ftbFghdyqENYW+JXuhBx9KsjMoGHs= cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= +cloud.google.com/go/orgpolicy v1.11.3/go.mod h1:oKAtJ/gkMjum5icv2aujkP4CxROxPXsBbYGCDbPO8MM= cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= +cloud.google.com/go/osconfig v1.12.3/go.mod h1:L/fPS8LL6bEYUi1au832WtMnPeQNT94Zo3FwwV1/xGM= cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= +cloud.google.com/go/oslogin v1.12.1/go.mod h1:VfwTeFJGbnakxAY236eN8fsnglLiVXndlbcNomY4iZU= cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= +cloud.google.com/go/phishingprotection v0.8.3/go.mod h1:3B01yO7T2Ra/TMojifn8EoGd4G9jts/6cIO0DgDY9J8= cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= +cloud.google.com/go/policytroubleshooter v1.10.1/go.mod h1:5C0rhT3TDZVxAu8813bwmTvd57Phbl8mr9F4ipOsxEs= cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= +cloud.google.com/go/privatecatalog v0.9.3/go.mod h1:K5pn2GrVmOPjXz3T26mzwXLcKivfIJ9R5N79AFCF9UE= cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= +cloud.google.com/go/recaptchaenterprise/v2 v2.8.2/go.mod h1:kpaDBOpkwD4G0GVMzG1W6Doy1tFFC97XAV3xy+Rd/pw= cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= +cloud.google.com/go/recommendationengine v0.8.3/go.mod h1:m3b0RZV02BnODE9FeSvGv1qibFo8g0OnmB/RMwYy4V8= cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= +cloud.google.com/go/recommender v1.11.2/go.mod h1:AeoJuzOvFR/emIcXdVFkspVXVTYpliRCmKNYDnyBv6Y= cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= +cloud.google.com/go/redis v1.13.3/go.mod h1:vbUpCKUAZSYzFcWKmICnYgRAhTFg9r+djWqFxDYXi4U= cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= +cloud.google.com/go/resourcemanager v1.9.3/go.mod h1:IqrY+g0ZgLsihcfcmqSe+RKp1hzjXwG904B92AwBz6U= cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= +cloud.google.com/go/resourcesettings v1.6.3/go.mod h1:pno5D+7oDYkMWZ5BpPsb4SO0ewg3IXcmmrUZaMJrFic= cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= +cloud.google.com/go/retail v1.14.3/go.mod h1:Omz2akDHeSlfCq8ArPKiBxlnRpKEBjUH386JYFLUvXo= cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= +cloud.google.com/go/run v1.3.2/go.mod h1:SIhmqArbjdU/D9M6JoHaAqnAMKLFtXaVdNeq04NjnVE= cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= +cloud.google.com/go/scheduler v1.10.3/go.mod h1:8ANskEM33+sIbpJ+R4xRfw/jzOG+ZFE8WVLy7/yGvbc= cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= +cloud.google.com/go/secretmanager v1.11.3/go.mod h1:0bA2o6FabmShrEy328i67aV+65XoUFFSmVeLBn/51jI= cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= +cloud.google.com/go/security v1.15.3/go.mod h1:gQ/7Q2JYUZZgOzqKtw9McShH+MjNvtDpL40J1cT+vBs= cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= +cloud.google.com/go/securitycenter v1.24.1/go.mod h1:3h9IdjjHhVMXdQnmqzVnM7b0wMn/1O/U20eWVpMpZjI= cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= +cloud.google.com/go/servicedirectory v1.11.2/go.mod h1:KD9hCLhncWRV5jJphwIpugKwM5bn1x0GyVVD4NO8mGg= cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= +cloud.google.com/go/shell v1.7.3/go.mod h1:cTTEz/JdaBsQAeTQ3B6HHldZudFoYBOqjteev07FbIc= cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= +cloud.google.com/go/spanner v1.51.0/go.mod h1:c5KNo5LQ1X5tJwma9rSQZsXNBDNvj4/n8BVc3LNahq0= cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= +cloud.google.com/go/speech v1.19.2/go.mod h1:2OYFfj+Ch5LWjsaSINuCZsre/789zlcCI3SY4oAi2oI= cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= +cloud.google.com/go/storagetransfer v1.10.2/go.mod h1:meIhYQup5rg9juQJdyppnA/WLQCOguxtk1pr3/vBWzA= cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= +cloud.google.com/go/talent v1.6.4/go.mod h1:QsWvi5eKeh6gG2DlBkpMaFYZYrYUnIpo34f6/V5QykY= cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= +cloud.google.com/go/texttospeech v1.7.3/go.mod h1:Av/zpkcgWfXlDLRYob17lqMstGZ3GqlvJXqKMp2u8so= cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= +cloud.google.com/go/tpu v1.6.3/go.mod h1:lxiueqfVMlSToZY1151IaZqp89ELPSrk+3HIQ5HRkbY= cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= +cloud.google.com/go/trace v1.10.3/go.mod h1:Ke1bgfc73RV3wUFml+uQp7EsDw4dGaETLxB7Iq/r4CY= cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= +cloud.google.com/go/translate v1.9.2/go.mod h1:E3Tc6rUTsQkVrXW6avbUhKJSr7ZE3j7zNmqzXKHqRrY= cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= +cloud.google.com/go/video v1.20.2/go.mod h1:lrixr5JeKNThsgfM9gqtwb6Okuqzfo4VrY2xynaViTA= cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= +cloud.google.com/go/videointelligence v1.11.3/go.mod h1:tf0NUaGTjU1iS2KEkGWvO5hRHeCkFK3nPo0/cOZhZAo= cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= +cloud.google.com/go/vision/v2 v2.7.4/go.mod h1:ynDKnsDN/0RtqkKxQZ2iatv3Dm9O+HfRb5djl7l4Vvw= cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= +cloud.google.com/go/vmmigration v1.7.3/go.mod h1:ZCQC7cENwmSWlwyTrZcWivchn78YnFniEQYRWQ65tBo= cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= +cloud.google.com/go/vmwareengine v1.0.2/go.mod h1:xMSNjIk8/itYrz1JA8nV3Ajg4L4n3N+ugP8JKzk3OaA= cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= +cloud.google.com/go/vpcaccess v1.7.3/go.mod h1:YX4skyfW3NC8vI3Fk+EegJnlYFatA+dXK4o236EUCUc= cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= +cloud.google.com/go/webrisk v1.9.3/go.mod h1:RUYXe9X/wBDXhVilss7EDLW9ZNa06aowPuinUOPCXH8= cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= +cloud.google.com/go/websecurityscanner v1.6.3/go.mod h1:x9XANObUFR+83Cya3g/B9M/yoHVqzxPnFtgF8yYGAXw= cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= +cloud.google.com/go/workflows v1.12.2/go.mod h1:+OmBIgNqYJPVggnMo9nqmizW0qEXHhmnAzK/CnBqsHc= cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= +github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= github.com/Abirdcfly/dupword v0.0.11/go.mod h1:wH8mVGuf3CP5fsBTkfWwwwKTjDnVVCxtU8d8rgeVYXA= +github.com/Abirdcfly/dupword v0.0.13/go.mod h1:Ut6Ue2KgF/kCOawpW4LnExT+xZLQviJPE4klBPMK/5Y= github.com/Antonboom/errname v0.1.9/go.mod h1:nLTcJzevREuAsgTbG85UsuiWpMpAqbKD1HNZ29OzE58= +github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= github.com/Antonboom/nilnil v0.1.3/go.mod h1:iOov/7gRcXkeEU+EMGpBu2ORih3iyVEiWjeste1SJm8= +github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= +github.com/Antonboom/testifylint v1.0.2/go.mod h1:tGEV9t6Th7DHXFVjd8oyLOBbIxXzs4CMEIAkbQ2RuC8= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.1.0/go.mod h1:rZLTje5A9kFBe0pzhpe2TdhRniBF++PRHQuRpR8esVc= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/alecthomas/go-check-sumtype v0.1.3/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alexkohler/nakedret/v2 v2.0.2/go.mod h1:2b8Gkk0GsOrqQv/gPWjNLDSKwG8I5moSXG1K4VIBcTQ= github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/ashanbrown/forbidigo v1.5.1/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= +github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bombsimon/wsl/v3 v3.4.0/go.mod h1:KkIB+TXkqy6MvK9BDZVbZxKNYsE1/oLRJbIFtf14qqo= +github.com/bombsimon/wsl/v4 v4.2.0/go.mod h1:1zaTbf/7ywOQtMdoUdTF2X1fbbBLiBUkajyuFAanT28= github.com/breml/bidichk v0.2.4/go.mod h1:7Zk0kRFt1LIZxtQdl9W9JwGAcLTTkOs+tN7wuEYGJ3s= +github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= github.com/breml/errchkjson v0.3.1/go.mod h1:XroxrzKjdiutFyW3nWhw34VGg7kiMsDQox73yWCGI2U= +github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= github.com/bufbuild/buf v1.15.1/go.mod h1:TQeGKam1QMfHy/xsSnnMpxN3JK5HBb6aNvZj4m52gkE= github.com/bufbuild/connect-go v1.5.2/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= +github.com/butuzov/ireturn v0.2.2/go.mod h1:RfGHUvvAuFFxoHKf4Z8Yxuh6OjlCw1KvR2zM1NFHeBk= +github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/catenacyber/perfsprint v0.4.0/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/ccojocar/zxcvbn-go v1.0.1/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8/go.mod h1:gakxgyXaaPkxvLw1XQxNGK4I37ys9iBRzNUx/B7pUCo= +github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= @@ -174,10 +308,12 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/daixiang0/gci v0.10.1/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= +github.com/daixiang0/gci v0.11.2/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -192,6 +328,8 @@ github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= @@ -199,8 +337,10 @@ github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIg github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghostiam/protogetter v0.3.3/go.mod h1:A0JgIhs0fgVnotGinjQiKaFVG3waItLJNwPmcMzDnvk= github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.7.0/go.mod h1:moYzd7GdVXE2C2hYTwd7h0CPcqlUeclsyBRwMa38v64= +github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= @@ -227,33 +367,48 @@ github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8ju github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20220901101216-f2edd75033f2/go.mod h1:9wOXstvyDRshQ9LggQuzBCGysxs3b6Uo/1MvYCR2NMs= +github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= github.com/golangci/golangci-lint v1.52.0/go.mod h1:wlTh+d/oVlgZC2yCe6nlxrxNAnuhEQC0Zdygoh72Uak= +github.com/golangci/golangci-lint v1.55.3-0.20231203192459-84442f26446b/go.mod h1:h6krrUw6/rso2L5KPuSLK3WGKdhYbEW4I0zPt4ckp3Y= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.4.0/go.mod h1:W6O/bwV6lGDxUCChm2ykw9NQdd5bYd1Xkjo88UcWyJc= +github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= +github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/gordonklaus/ineffassign v0.0.0-20230107090616-13ace0543b28/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= @@ -265,6 +420,7 @@ github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jgautheron/goconst v1.7.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= @@ -281,44 +437,63 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= +github.com/kunwardeep/paralleltest v1.0.8/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.4.0/go.mod h1:mNtTfrHy2haaBAw+VT7IBV6VXBThS7TCreYWbBcJ87I= +github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= +github.com/macabu/inamedparam v0.1.2/go.mod h1:Xg25QvY7IBRl1KLPV9Rbml8JOMZtF/iAkNkmV7eQgjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/revive v1.3.1/go.mod h1:YlD6TTWl2B8A103R9KWJSPVI9DrEf+oqr15q21Ld+5I= +github.com/mgechev/revive v1.3.4/go.mod h1:W+pZCMu9qj8Uhfs1iJMQsEFLRozUfvwFwqVvRbSNLVw= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/moricho/tparallel v0.3.0/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= +github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/jwt/v2 v2.4.1/go.mod h1:24BeQtRwxRV8ruvC4CojXlx/WQ/VjuwlYiH+vu/+ibI= github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nats.go v1.30.2/go.mod h1:dcfhUgmQNN4GJEfIb2f9R7Fow+gzBF4emzDHrVBd5qM= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/nishanths/exhaustive v0.9.5/go.mod h1:IbwrGdVMizvDcIxPYGVdQn5BqWJaOwpCvg4RGb8r/TA= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nunnatsa/ginkgolinter v0.9.0/go.mod h1:FHaMLURXP7qImeH6bvxWJUpyH+2tuqe5j4rW1gxJRmI= +github.com/nunnatsa/ginkgolinter v0.14.1/go.mod h1:nY0pafUSst7v7F637e7fymaMlQqI9c0Wka2fGsDkzWg= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= @@ -332,46 +507,63 @@ github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3/go.mod h1:q github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4/go.mod h1:RdR1j20Aj5pB6+fw6Y9Ur7lMHpegTEjY1vc19hEZL40= github.com/pointlander/peg v1.0.1/go.mod h1:5hsGDQR2oZI4QoWz0/Kdg3VSVEC31iJw/b7WjqCBGRI= github.com/polyfloyd/go-errorlint v1.4.0/go.mod h1:qJCkPeBn+0EXkdKTrUCcuFStM2xrDKfxI3MGLXPexUs= +github.com/polyfloyd/go-errorlint v1.4.6/go.mod h1:WGkLzUkLXGGr6BfD33l7yRidBa+T+8xB8TupCpId2ZE= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/quasilyte/go-ruleguard v0.3.19/go.mod h1:lHSn69Scl48I7Gt9cX3VrbsZYvYiBYszZOZW4A+oTEw= +github.com/quasilyte/go-ruleguard v0.4.0/go.mod h1:Eu76Z/R8IXtViWUIHkE3p8gdH3/PKk1eh3YGfaEof10= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/ryancurrah/gomodguard v1.3.0/go.mod h1:ggBxb3luypPEzqVtq33ee7YSN35V28XeGnid8dnni50= github.com/ryanrolds/sqlclosecheck v0.4.0/go.mod h1:TBRRjzL31JONc9i4XMinicuo+s+E8yKZ5FN8X3G6CKQ= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/sagikazarmark/crypt v0.10.0/go.mod h1:gwTNHQVoOS3xp9Xvz5LLR+1AauC5M6880z5NWzdhOyQ= +github.com/sagikazarmark/crypt v0.15.0/go.mod h1:5rwNNax6Mlk9sZ40AcyVtiEw24Z4J04cfSioF2COKmc= github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= github.com/sashamelentyev/usestdlibvars v1.23.0/go.mod h1:YPwr/Y1LATzHI93CqoPUN/2BzGQ/6N/cl/KwgR0B/aU= +github.com/sashamelentyev/usestdlibvars v1.24.0/go.mod h1:9cYkq+gYJ+a5W2RPdhfaSCnTVUC1OQP/bSiiBhq3OZE= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/securego/gosec/v2 v2.15.0/go.mod h1:VOjTrZOkUtSDt2QLSJmQBMWnvwiQPEjg0l+5juIqGk8= +github.com/securego/gosec/v2 v2.18.2/go.mod h1:xUuqSF6i0So56Y2wwohWAmB07EdBkUN6crbLlHwbyJs= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/skip-mev/chaintestutil v0.0.0-20231213172849-7c623445dde1/go.mod h1:mcyq67cXQTzyhCg2LSBeFS+u7GzWng5xnTFfUAqIHn4= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= +github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= github.com/tomarrell/wrapcheck/v2 v2.8.1/go.mod h1:/n2Q3NZ4XFT50ho6Hbxg+RV1uyo2Uow/Vdm9NQcl5SE= github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= +github.com/ultraware/whitespace v0.1.0/go.mod h1:/se4r3beMFNmewJ4Xmz0nMQ941GJt+qmSHGP9emHYe0= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= @@ -379,70 +571,113 @@ github.com/vektra/mockery/v2 v2.23.1/go.mod h1:Zh3Kv1ckKs6FokhlVLcCu6UTyzfS3M8mp github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= +gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= +go-simpler.org/musttag v0.8.0/go.mod h1:fiNdCkXt2S6je9Eblma3okjnlva9NT1Eg/WUt19rWu8= +go-simpler.org/sloglint v0.3.0/go.mod h1:/RQr0TeTf89IyRjLJ9ogUbIp1Zs5zJJAj02pwQoDQdg= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/v2 v2.305.7/go.mod h1:GQGT5Z3TBuAQGvgPfhR7VPySu/SudxmEkRq9BgzFU6s= +go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/api v0.139.0 h1:A1TrCPgMmOiYu0AiNkvQIpIx+D8blHTDcJ5EogkP7LI= google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:qDbnxtViX5J6CvFbxeNUSzKgVlDLJ/6L+caxye9+Flo= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.4.3/go.mod h1:36ZgoUOrqOk1GxwHhyryEkq8FQWkUO2xGuSMhUCcdvA= +honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ= +mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20221223090309-7455f1af531d/go.mod h1:IeHQjmn6TOD+e4Z3RFiZMMsLVL+A96Nvptar8Fj71is= diff --git a/proto/opinit/opchild/v1/types.proto b/proto/opinit/opchild/v1/types.proto index 9b46263d..e3b947d8 100644 --- a/proto/opinit/opchild/v1/types.proto +++ b/proto/opinit/opchild/v1/types.proto @@ -41,6 +41,12 @@ message Params { (amino.dont_omitempty) = true, (gogoproto.moretags) = "yaml:\"admin\"" ]; + // the list of addresses that are allowed to pay zero fee. + repeated string fee_whitelist = 6 [ + (cosmos_proto.scalar) = "cosmos.AddressString", + (amino.dont_omitempty) = true, + (gogoproto.moretags) = "yaml:\"fee_whitelist\"" + ]; } // Validator defines a validator, together with the total amount of the diff --git a/x/opchild/keeper/params.go b/x/opchild/keeper/params.go index 34c5cee9..8948c6ee 100644 --- a/x/opchild/keeper/params.go +++ b/x/opchild/keeper/params.go @@ -17,6 +17,16 @@ func (k Keeper) BridgeExecutor(ctx context.Context) (sdk.AccAddress, error) { return k.authKeeper.AddressCodec().StringToBytes(params.BridgeExecutor) } +// FeeWhitelist returns params.FeeWhitelist +func (k Keeper) FeeWhitelist(ctx context.Context) ([]string, error) { + params, err := k.GetParams(ctx) + if err != nil { + return nil, err + } + + return params.FeeWhitelist, nil +} + // SetParams sets the x/opchild module parameters. func (k Keeper) SetParams(ctx context.Context, params types.Params) error { if err := params.Validate(k.authKeeper.AddressCodec()); err != nil { diff --git a/x/opchild/keeper/params_test.go b/x/opchild/keeper/params_test.go index 1a1a3e2e..c4815f15 100644 --- a/x/opchild/keeper/params_test.go +++ b/x/opchild/keeper/params_test.go @@ -13,6 +13,7 @@ func Test_Params(t *testing.T) { params, err := input.OPChildKeeper.GetParams(ctx) require.NoError(t, err) params.MinGasPrices = sdk.NewDecCoins() + params.FeeWhitelist = []string{addrsStr[0], addrsStr[1]} input.OPChildKeeper.SetParams(ctx, params) @@ -22,4 +23,8 @@ func Test_Params(t *testing.T) { bridgeExecutor, err := input.OPChildKeeper.BridgeExecutor(ctx) require.NoError(t, err) require.Equal(t, addrs[0], bridgeExecutor) + + feeWhitelist, err := input.OPChildKeeper.FeeWhitelist(ctx) + require.NoError(t, err) + require.Equal(t, params.FeeWhitelist, feeWhitelist) } diff --git a/x/opchild/lanes/free.go b/x/opchild/lanes/free.go new file mode 100644 index 00000000..0aac1331 --- /dev/null +++ b/x/opchild/lanes/free.go @@ -0,0 +1,51 @@ +package lanes + +import ( + "context" + + "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/skip-mev/block-sdk/block/base" +) + +type FeeWhitelistKeeper interface { + FeeWhitelist(ctx context.Context) ([]string, error) +} + +// FreeLaneMatchHandler returns the default match handler for the free lane. The +// default implementation matches fee payers that are in the fee whitelist. +type FreeLaneMatchHandler struct { + ac address.Codec + fwk FeeWhitelistKeeper +} + +func NewFreeLaneMatchHandler(ac address.Codec, fwk FeeWhitelistKeeper) FreeLaneMatchHandler { + return FreeLaneMatchHandler{ + ac: ac, + fwk: fwk, + } +} + +func (h FreeLaneMatchHandler) MatchHandler() base.MatchHandler { + return func(ctx sdk.Context, tx sdk.Tx) bool { + feeTx, ok := tx.(sdk.FeeTx) + if !ok { + return false + } + + if whitelist, err := h.fwk.FeeWhitelist(ctx); err != nil { + return false + } else if payer, err := h.ac.BytesToString(feeTx.FeePayer()); err != nil { + return false + } else { + for _, addr := range whitelist { + if addr == payer { + return true + } + } + } + + return false + } +} diff --git a/x/opchild/lanes/free_test.go b/x/opchild/lanes/free_test.go new file mode 100644 index 00000000..80421a9f --- /dev/null +++ b/x/opchild/lanes/free_test.go @@ -0,0 +1,85 @@ +package lanes_test + +import ( + "context" + "testing" + + "cosmossdk.io/log" + "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec/address" + sdk "github.com/cosmos/cosmos-sdk/types" + + protov2 "google.golang.org/protobuf/proto" + + "github.com/initia-labs/OPinit/x/opchild/lanes" +) + +var _ lanes.FeeWhitelistKeeper = MockFeeWhitelistKeeper{} + +type MockFeeWhitelistKeeper struct { + whitelist []string +} + +// FeeWhitelist implements lanes.FeeWhitelistKeeper. +func (m MockFeeWhitelistKeeper) FeeWhitelist(ctx context.Context) ([]string, error) { + return m.whitelist, nil +} + +func Test_FreeLaneMatchHandler(t *testing.T) { + ctx := sdk.NewContext(nil, types.Header{}, false, log.NewNopLogger()) + ac := address.NewBech32Codec("init") + + addr1, err := ac.BytesToString([]byte{0, 1, 2, 3}) + require.NoError(t, err) + + addr2, err := ac.BytesToString([]byte{3, 4, 5, 6}) + require.NoError(t, err) + + fwk := MockFeeWhitelistKeeper{ + whitelist: []string{addr1, addr2}, + } + + handler := lanes.NewFreeLaneMatchHandler(ac, fwk).MatchHandler() + + require.True(t, handler(ctx, MockTx{ + feePayer: []byte{0, 1, 2, 3}, + })) + require.False(t, handler(ctx, MockTx{ + feePayer: []byte{0, 1, 2, 4}, + })) + require.True(t, handler(ctx, MockTx{ + feePayer: []byte{3, 4, 5, 6}, + })) +} + +var _ sdk.Tx = MockTx{} +var _ sdk.FeeTx = &MockTx{} + +type MockTx struct { + feePayer []byte +} + +func (tx MockTx) GetMsgsV2() ([]protov2.Message, error) { + return nil, nil +} + +func (tx MockTx) GetMsgs() []sdk.Msg { + return nil +} + +func (tx MockTx) GetGas() uint64 { + return 0 +} + +func (tx MockTx) GetFee() sdk.Coins { + return nil +} + +func (tx MockTx) FeePayer() []byte { + return tx.feePayer +} +func (tx MockTx) FeeGranter() []byte { + return nil +} diff --git a/x/opchild/lanes/mev.go b/x/opchild/lanes/mev.go new file mode 100644 index 00000000..3d13ad5e --- /dev/null +++ b/x/opchild/lanes/mev.go @@ -0,0 +1,27 @@ +package lanes + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + auctiontypes "github.com/skip-mev/block-sdk/x/auction/types" +) + +var _ auctiontypes.RewardsAddressProvider = (*RewardsAddressProvider)(nil) + +// NewRewardsAddressProvider returns a new RewardsAddressProvider from a staking + distribution keeper +func NewRewardsAddressProvider(feeCollectorName string) *RewardsAddressProvider { + return &RewardsAddressProvider{ + feeCollectorName: feeCollectorName, + } +} + +// RewardsAddressProvider implements the x/builder's RewardsAddressProvider interface. It is used +// to determine the address to which the rewards from the most recent block's auction are sent. +type RewardsAddressProvider struct { + feeCollectorName string +} + +// GetRewardsAddress returns the address of the proposer of the previous block +func (rap *RewardsAddressProvider) GetRewardsAddress(ctx sdk.Context) (sdk.AccAddress, error) { + return authtypes.NewModuleAddress(rap.feeCollectorName), nil +} diff --git a/x/opchild/types/params.go b/x/opchild/types/params.go index 1fa86b92..96458828 100644 --- a/x/opchild/types/params.go +++ b/x/opchild/types/params.go @@ -20,17 +20,19 @@ func DefaultParams() Params { DefaultMaxValidators, DefaultHistoricalEntries, DefaultMinGasPrices, + []string{}, ) } // NewParams creates a new Params instance -func NewParams(admin, bridgeExecutor string, maxValidators, historicalEntries uint32, minGasPrice sdk.DecCoins) Params { +func NewParams(admin, bridgeExecutor string, maxValidators, historicalEntries uint32, minGasPrice sdk.DecCoins, feeWhitelist []string) Params { return Params{ Admin: admin, BridgeExecutor: bridgeExecutor, MaxValidators: maxValidators, HistoricalEntries: historicalEntries, MinGasPrices: minGasPrice, + FeeWhitelist: feeWhitelist, } } @@ -59,5 +61,12 @@ func (p Params) Validate(ac address.Codec) error { return ErrZeroMaxValidators } + // Validate fee whitelist addresses + for _, addr := range p.FeeWhitelist { + if _, err := ac.StringToBytes(addr); err != nil { + return err + } + } + return nil } diff --git a/x/opchild/types/types.pb.go b/x/opchild/types/types.pb.go index 0b79d4a6..3dbfa664 100644 --- a/x/opchild/types/types.pb.go +++ b/x/opchild/types/types.pb.go @@ -42,6 +42,8 @@ type Params struct { BridgeExecutor string `protobuf:"bytes,4,opt,name=bridge_executor,json=bridgeExecutor,proto3" json:"bridge_executor,omitempty" yaml:"bridge_executor"` // the account address of admin who can execute permissioned cosmos messages. Admin string `protobuf:"bytes,5,opt,name=admin,proto3" json:"admin,omitempty" yaml:"admin"` + // the list of addresses that are allowed to pay zero fee. + FeeWhitelist []string `protobuf:"bytes,6,rep,name=fee_whitelist,json=feeWhitelist,proto3" json:"fee_whitelist,omitempty" yaml:"fee_whitelist"` } func (m *Params) Reset() { *m = Params{} } @@ -220,58 +222,60 @@ func init() { func init() { proto.RegisterFile("opinit/opchild/v1/types.proto", fileDescriptor_2cc6df244b706d68) } var fileDescriptor_2cc6df244b706d68 = []byte{ - // 810 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x3f, 0x6f, 0xe4, 0x44, - 0x14, 0x5f, 0xdf, 0xe6, 0xee, 0xd8, 0x49, 0xb2, 0x49, 0x46, 0x39, 0xd8, 0x24, 0x77, 0xf6, 0xca, - 0x55, 0x74, 0xb0, 0x63, 0xed, 0x1d, 0x12, 0x22, 0x15, 0xe7, 0x10, 0xd0, 0xe9, 0x10, 0xb7, 0x32, - 0x82, 0x82, 0xc6, 0x8c, 0xed, 0x89, 0x33, 0xca, 0x7a, 0xc6, 0xf2, 0xcc, 0x2e, 0xd9, 0x6f, 0x80, - 0x68, 0xa0, 0xa4, 0x4c, 0x79, 0xa2, 0xba, 0xe2, 0x3a, 0xbe, 0x40, 0x44, 0x75, 0xa2, 0xa2, 0x32, - 0xb0, 0x29, 0x42, 0x45, 0xe1, 0x4f, 0x80, 0x3c, 0x33, 0xfb, 0x87, 0x45, 0x88, 0x66, 0x77, 0xde, - 0xfb, 0xfd, 0xde, 0x1f, 0xff, 0xde, 0x9b, 0x01, 0x0f, 0x78, 0x4e, 0x19, 0x95, 0x1e, 0xcf, 0xe3, - 0x33, 0x3a, 0x4c, 0xbc, 0x71, 0xdf, 0x93, 0x93, 0x9c, 0x08, 0x94, 0x17, 0x5c, 0x72, 0xb8, 0xa3, - 0x61, 0x64, 0x60, 0x34, 0xee, 0xef, 0xef, 0xe0, 0x8c, 0x32, 0xee, 0xa9, 0x5f, 0xcd, 0xda, 0xb7, - 0x63, 0x2e, 0x32, 0x2e, 0xbc, 0x08, 0x0b, 0xe2, 0x8d, 0xfb, 0x11, 0x91, 0xb8, 0xef, 0xc5, 0x9c, - 0x32, 0x83, 0xef, 0x69, 0x3c, 0x54, 0x96, 0xa7, 0x0d, 0x03, 0xed, 0xa6, 0x3c, 0xe5, 0xda, 0x5f, - 0x9f, 0x66, 0x01, 0x29, 0xe7, 0xe9, 0x90, 0x78, 0xca, 0x8a, 0x46, 0xa7, 0x1e, 0x66, 0x13, 0x03, - 0x1d, 0x48, 0xc2, 0x12, 0x52, 0x64, 0x94, 0x49, 0x0f, 0x47, 0x31, 0x5d, 0x6e, 0x77, 0xff, 0xfe, - 0xfc, 0x6b, 0xce, 0xb8, 0x90, 0x2b, 0x1f, 0xe3, 0xfe, 0xd5, 0x04, 0x77, 0x06, 0xb8, 0xc0, 0x99, - 0x80, 0x1f, 0x80, 0x76, 0x86, 0x2f, 0xc2, 0x31, 0x1e, 0xd2, 0x04, 0x4b, 0x5e, 0x88, 0x8e, 0xd5, - 0xb5, 0x0e, 0x37, 0xfd, 0xbd, 0xaa, 0x74, 0xee, 0x4d, 0x70, 0x36, 0x3c, 0x72, 0xff, 0x89, 0xbb, - 0xc1, 0x66, 0x86, 0x2f, 0xbe, 0x98, 0xdb, 0xf0, 0x13, 0x00, 0xcf, 0xa8, 0x90, 0xbc, 0xa0, 0x31, - 0x1e, 0x86, 0x84, 0xc9, 0x82, 0x12, 0xd1, 0xb9, 0xa5, 0xb2, 0x3c, 0xa8, 0x4a, 0x67, 0x4f, 0x67, - 0xf9, 0x37, 0xc7, 0x0d, 0x76, 0x16, 0xce, 0x13, 0xed, 0x83, 0xdf, 0x59, 0xa0, 0x9d, 0x51, 0x16, - 0xa6, 0xb8, 0x56, 0x89, 0xc6, 0x44, 0x74, 0x9a, 0xdd, 0xe6, 0xe1, 0xfa, 0xa3, 0xfb, 0xc8, 0xc8, - 0x55, 0x6b, 0x8b, 0x8c, 0xb6, 0xe8, 0x43, 0x12, 0x1f, 0x73, 0xca, 0xfc, 0x67, 0x57, 0xa5, 0xd3, - 0xa8, 0x4a, 0x67, 0xd7, 0xb4, 0xbc, 0x9c, 0xc1, 0xfd, 0xf1, 0x37, 0xe7, 0xed, 0x94, 0xca, 0xb3, - 0x51, 0x84, 0x62, 0x9e, 0x19, 0xd9, 0xcd, 0x5f, 0x4f, 0x24, 0xe7, 0x46, 0x1b, 0x93, 0x4b, 0x04, - 0x1b, 0x19, 0x65, 0x1f, 0x63, 0x31, 0x50, 0xe5, 0xe1, 0x57, 0x60, 0x2b, 0x2a, 0x68, 0x92, 0x92, - 0x90, 0x5c, 0x90, 0x78, 0x24, 0x79, 0xd1, 0x59, 0xeb, 0x5a, 0x87, 0x2d, 0xff, 0xbd, 0xaa, 0x74, - 0xde, 0xd4, 0xf5, 0x56, 0x08, 0xee, 0x2f, 0xaf, 0x7a, 0xbb, 0xa6, 0xdd, 0x27, 0x49, 0x52, 0x10, - 0x21, 0x3e, 0x93, 0x05, 0x65, 0xe9, 0x8b, 0x9b, 0x97, 0x0f, 0xad, 0xa0, 0xad, 0xe9, 0x27, 0x86, - 0x0d, 0x8f, 0xc1, 0x6d, 0x9c, 0x64, 0x94, 0x75, 0x6e, 0xab, 0xbc, 0xbd, 0xaa, 0x74, 0x36, 0x74, - 0x5e, 0xe5, 0xfe, 0x9f, 0x6c, 0x3a, 0xf6, 0xe8, 0xe0, 0x87, 0x4b, 0xa7, 0xf1, 0xe7, 0xa5, 0x63, - 0x7d, 0x7b, 0xf3, 0xf2, 0x61, 0x7b, 0xb6, 0xc5, 0x7a, 0xca, 0xee, 0x4f, 0xb7, 0x40, 0x6b, 0x3e, - 0x32, 0xf8, 0x0e, 0xb8, 0x9b, 0x71, 0x46, 0xcf, 0x49, 0xa1, 0x86, 0xdd, 0xf2, 0x61, 0x55, 0x3a, - 0x6d, 0xa3, 0x9c, 0x06, 0xdc, 0x60, 0x46, 0x81, 0x1f, 0x81, 0x6d, 0x9e, 0x93, 0xa2, 0x8e, 0x0c, - 0xb1, 0x2e, 0xaf, 0xa6, 0xdb, 0xf2, 0x0f, 0xaa, 0xd2, 0x79, 0x4b, 0x87, 0xad, 0x32, 0xdc, 0x60, - 0x6b, 0xe6, 0x32, 0x2d, 0x43, 0x09, 0xb6, 0x63, 0xce, 0x04, 0x61, 0x62, 0x24, 0xc2, 0x7c, 0x14, - 0x9d, 0x93, 0x49, 0xa7, 0xd9, 0xb5, 0x0e, 0xd7, 0x1f, 0xed, 0x22, 0xbd, 0xe5, 0x68, 0xb6, 0xe5, - 0xe8, 0x09, 0x9b, 0xf8, 0x8f, 0x17, 0xd9, 0x57, 0xe3, 0xdc, 0x9f, 0x17, 0x8a, 0xc4, 0xc5, 0x24, - 0x97, 0x1c, 0x0d, 0x46, 0xd1, 0x33, 0x32, 0x09, 0xb6, 0xe6, 0xd4, 0x81, 0x62, 0xc2, 0x77, 0x01, - 0xa8, 0x5d, 0x61, 0xce, 0xbf, 0x26, 0x7a, 0x70, 0x4d, 0xff, 0x5e, 0x55, 0x3a, 0x3b, 0x8b, 0xcc, - 0x1a, 0x73, 0x83, 0x56, 0x6d, 0x0c, 0xea, 0xf3, 0xd1, 0xc6, 0x37, 0x97, 0x4e, 0xc3, 0x08, 0xda, - 0x70, 0x43, 0xb0, 0x3d, 0x17, 0xef, 0xf3, 0x3c, 0xc1, 0x92, 0x08, 0x78, 0x02, 0xee, 0x8e, 0xf4, - 0xb1, 0x63, 0xa9, 0xfd, 0xec, 0xa2, 0xc5, 0x7d, 0x44, 0xf5, 0x7d, 0x44, 0x2b, 0x31, 0x7e, 0xab, - 0xde, 0x51, 0x3d, 0xb3, 0x59, 0xec, 0xd1, 0x9a, 0x2a, 0xf0, 0xca, 0x02, 0xc0, 0x57, 0x3b, 0xf1, - 0x94, 0x9d, 0x72, 0x78, 0x00, 0x5a, 0x66, 0xa1, 0x68, 0xa2, 0x26, 0xb4, 0x16, 0xbc, 0xa1, 0x1d, - 0x4f, 0x13, 0xf8, 0x3e, 0x58, 0x37, 0x60, 0x2d, 0xb5, 0x99, 0x44, 0xe7, 0xbf, 0x56, 0x24, 0x00, - 0x9a, 0x5c, 0x3b, 0xe1, 0xa7, 0x60, 0xd3, 0x84, 0xc6, 0x9c, 0x9d, 0xd2, 0xd4, 0xc8, 0x6f, 0xa3, - 0xf9, 0xdb, 0x56, 0x3f, 0x16, 0x68, 0xdc, 0x47, 0xba, 0x99, 0x63, 0xc5, 0x5a, 0xee, 0x7b, 0x23, - 0x5a, 0x06, 0x9e, 0x5f, 0xfd, 0x61, 0x37, 0x5e, 0x4c, 0x6d, 0xeb, 0x6a, 0x6a, 0x5b, 0xaf, 0xa7, - 0xb6, 0xf5, 0xfb, 0xd4, 0xb6, 0xbe, 0xbf, 0xb6, 0x1b, 0xaf, 0xaf, 0xed, 0xc6, 0xaf, 0xd7, 0x76, - 0xe3, 0xcb, 0xde, 0xd2, 0xb5, 0xab, 0x4b, 0x50, 0xdc, 0x1b, 0xe2, 0x48, 0x78, 0xcf, 0x07, 0xea, - 0x75, 0xba, 0x98, 0xbf, 0xb6, 0xea, 0x06, 0x46, 0x77, 0xd4, 0x02, 0x3c, 0xfe, 0x3b, 0x00, 0x00, - 0xff, 0xff, 0xf7, 0xdc, 0xa8, 0x40, 0x8c, 0x05, 0x00, 0x00, + // 844 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x8e, 0x9b, 0x6d, 0x4b, 0x66, 0xb3, 0xd9, 0x5d, 0x6b, 0x0b, 0xde, 0xdd, 0xd6, 0x8e, 0x7c, + 0x8a, 0x0a, 0x19, 0x2b, 0x2d, 0x08, 0xb1, 0x27, 0xea, 0x65, 0x41, 0x55, 0x11, 0x8d, 0x8c, 0x00, + 0xa9, 0x17, 0x33, 0xb6, 0x27, 0xce, 0x68, 0xe3, 0x19, 0xcb, 0x33, 0x49, 0x37, 0xff, 0x01, 0xe2, + 0x02, 0x47, 0x8e, 0x7b, 0xac, 0x38, 0xf5, 0xd0, 0x1b, 0xff, 0xc0, 0xaa, 0xa7, 0x8a, 0x13, 0x27, + 0x03, 0xbb, 0x87, 0x72, 0xce, 0x5f, 0x80, 0x3c, 0x33, 0xf9, 0xd1, 0x20, 0xd4, 0x4b, 0x32, 0xf3, + 0xbe, 0xef, 0xbd, 0x79, 0xfe, 0xe6, 0x7b, 0x03, 0xee, 0xb0, 0x9c, 0x50, 0x22, 0x3c, 0x96, 0xc7, + 0x43, 0x32, 0x4a, 0xbc, 0x49, 0xcf, 0x13, 0xd3, 0x1c, 0x73, 0x98, 0x17, 0x4c, 0x30, 0x73, 0x57, + 0xc1, 0x50, 0xc3, 0x70, 0xd2, 0x3b, 0xd8, 0x45, 0x19, 0xa1, 0xcc, 0x93, 0xbf, 0x8a, 0x75, 0x60, + 0xc7, 0x8c, 0x67, 0x8c, 0x7b, 0x11, 0xe2, 0xd8, 0x9b, 0xf4, 0x22, 0x2c, 0x50, 0xcf, 0x8b, 0x19, + 0xa1, 0x1a, 0xdf, 0x57, 0x78, 0x28, 0x77, 0x9e, 0xda, 0x68, 0x68, 0x2f, 0x65, 0x29, 0x53, 0xf1, + 0x6a, 0x35, 0x4f, 0x48, 0x19, 0x4b, 0x47, 0xd8, 0x93, 0xbb, 0x68, 0x3c, 0xf0, 0x10, 0x9d, 0x6a, + 0xe8, 0x50, 0x60, 0x9a, 0xe0, 0x22, 0x23, 0x54, 0x78, 0x28, 0x8a, 0xc9, 0x6a, 0xbb, 0x07, 0xb7, + 0x17, 0x5f, 0x33, 0x64, 0x5c, 0xac, 0x7d, 0x8c, 0xfb, 0x72, 0x03, 0xdc, 0xe8, 0xa3, 0x02, 0x65, + 0xdc, 0xfc, 0x14, 0xb4, 0x32, 0x74, 0x16, 0x4e, 0xd0, 0x88, 0x24, 0x48, 0xb0, 0x82, 0x5b, 0x46, + 0xdb, 0xe8, 0x6c, 0xf9, 0xfb, 0xb3, 0xd2, 0xb9, 0x35, 0x45, 0xd9, 0xe8, 0xc8, 0x7d, 0x13, 0x77, + 0x83, 0xad, 0x0c, 0x9d, 0x7d, 0xbb, 0xd8, 0x9b, 0x5f, 0x02, 0x73, 0x48, 0xb8, 0x60, 0x05, 0x89, + 0xd1, 0x28, 0xc4, 0x54, 0x14, 0x04, 0x73, 0xeb, 0x9a, 0xac, 0x72, 0x67, 0x56, 0x3a, 0xfb, 0xaa, + 0xca, 0x7f, 0x39, 0x6e, 0xb0, 0xbb, 0x0c, 0x9e, 0xa8, 0x98, 0xf9, 0x93, 0x01, 0x5a, 0x19, 0xa1, + 0x61, 0x8a, 0x2a, 0x95, 0x48, 0x8c, 0xb9, 0x55, 0x6f, 0xd7, 0x3b, 0x9b, 0xf7, 0x6e, 0x43, 0x2d, + 0x57, 0xa5, 0x2d, 0xd4, 0xda, 0xc2, 0xcf, 0x70, 0x7c, 0xcc, 0x08, 0xf5, 0x1f, 0x5d, 0x94, 0x4e, + 0x6d, 0x56, 0x3a, 0x7b, 0xba, 0xe5, 0xd5, 0x0a, 0xee, 0xaf, 0x7f, 0x3a, 0xef, 0xa7, 0x44, 0x0c, + 0xc7, 0x11, 0x8c, 0x59, 0xa6, 0x65, 0xd7, 0x7f, 0x5d, 0x9e, 0x9c, 0x6a, 0x6d, 0x74, 0x2d, 0x1e, + 0x34, 0x33, 0x42, 0xbf, 0x40, 0xbc, 0x2f, 0x8f, 0x37, 0xbf, 0x07, 0xdb, 0x51, 0x41, 0x92, 0x14, + 0x87, 0xf8, 0x0c, 0xc7, 0x63, 0xc1, 0x0a, 0x6b, 0xa3, 0x6d, 0x74, 0x1a, 0xfe, 0xc7, 0xb3, 0xd2, + 0x79, 0x57, 0x9d, 0xb7, 0x46, 0x70, 0x7f, 0x7f, 0xd1, 0xdd, 0xd3, 0xed, 0x3e, 0x48, 0x92, 0x02, + 0x73, 0xfe, 0xb5, 0x28, 0x08, 0x4d, 0x9f, 0xbd, 0x7e, 0x7e, 0xd7, 0x08, 0x5a, 0x8a, 0x7e, 0xa2, + 0xd9, 0xe6, 0x31, 0xb8, 0x8e, 0x92, 0x8c, 0x50, 0xeb, 0xba, 0xac, 0xdb, 0x9d, 0x95, 0x4e, 0x53, + 0xd5, 0x95, 0xe1, 0xb7, 0x54, 0x53, 0xb9, 0xe6, 0x13, 0xb0, 0x35, 0xc0, 0x38, 0x7c, 0x3a, 0x24, + 0x02, 0x8f, 0x08, 0x17, 0xd6, 0x8d, 0x76, 0xbd, 0xd3, 0xf0, 0x3f, 0x5a, 0x8a, 0xf2, 0x06, 0xfc, + 0x96, 0xa2, 0xcd, 0x01, 0xc6, 0xdf, 0xcd, 0xb9, 0x47, 0x87, 0xbf, 0x9c, 0x3b, 0xb5, 0x7f, 0xce, + 0x1d, 0xe3, 0xc7, 0xd7, 0xcf, 0xef, 0xb6, 0xe6, 0x13, 0xa2, 0x1c, 0xe4, 0xfe, 0x76, 0x0d, 0x34, + 0x16, 0x76, 0x30, 0x3f, 0x00, 0x37, 0x33, 0x46, 0xc9, 0x29, 0x2e, 0xa4, 0x91, 0x1a, 0xbe, 0x39, + 0x2b, 0x9d, 0x96, 0xbe, 0x15, 0x05, 0xb8, 0xc1, 0x9c, 0x62, 0x7e, 0x0e, 0x76, 0x58, 0x8e, 0x8b, + 0x2a, 0x33, 0x44, 0xaa, 0x0b, 0xe9, 0x9c, 0x86, 0x7f, 0x38, 0x2b, 0x9d, 0xf7, 0x54, 0xda, 0x3a, + 0xc3, 0x0d, 0xb6, 0xe7, 0x21, 0xdd, 0xb9, 0x29, 0xc0, 0x4e, 0xcc, 0x28, 0xc7, 0x94, 0x8f, 0x79, + 0x98, 0x8f, 0xa3, 0x53, 0x3c, 0xb5, 0xea, 0x6d, 0xa3, 0xb3, 0x79, 0x6f, 0x0f, 0xaa, 0x09, 0x82, + 0xf3, 0x09, 0x82, 0x0f, 0xe8, 0xd4, 0xbf, 0xbf, 0xac, 0xbe, 0x9e, 0xe7, 0xbe, 0x5c, 0x0a, 0x13, + 0x17, 0xd3, 0x5c, 0x30, 0xd8, 0x1f, 0x47, 0x8f, 0xf0, 0x34, 0xd8, 0x5e, 0x50, 0xfb, 0x92, 0x69, + 0x7e, 0x08, 0x40, 0x15, 0x0a, 0x73, 0xf6, 0x14, 0x2b, 0x53, 0xd4, 0xfd, 0x5b, 0xb3, 0xd2, 0xd9, + 0x5d, 0x56, 0x56, 0x98, 0x1b, 0x34, 0xaa, 0x4d, 0xbf, 0x5a, 0x1f, 0x35, 0x7f, 0x38, 0x77, 0x6a, + 0x5a, 0xd0, 0x9a, 0x1b, 0x82, 0x9d, 0x85, 0x78, 0xdf, 0xe4, 0x09, 0x12, 0x98, 0x9b, 0x27, 0xe0, + 0xe6, 0x58, 0x2d, 0x2d, 0x43, 0x7a, 0xbf, 0x0d, 0x97, 0xb3, 0x0e, 0xab, 0x59, 0x87, 0x6b, 0x39, + 0x7e, 0xa3, 0xf2, 0xbf, 0xba, 0xba, 0x79, 0xee, 0xd1, 0x86, 0x3c, 0xe0, 0x85, 0x01, 0x80, 0x2f, + 0xfd, 0xf6, 0x90, 0x0e, 0x98, 0x79, 0x08, 0x1a, 0xda, 0xac, 0x24, 0x91, 0x37, 0xb4, 0x11, 0xbc, + 0xa3, 0x02, 0x0f, 0x13, 0xf3, 0x13, 0xb0, 0xa9, 0xc1, 0x4a, 0x6a, 0x7d, 0x13, 0xd6, 0xff, 0x39, + 0x25, 0x00, 0x8a, 0x5c, 0x05, 0xcd, 0xaf, 0xc0, 0x96, 0x4e, 0x8d, 0x19, 0x1d, 0x90, 0x54, 0xcb, + 0x6f, 0xc3, 0xc5, 0xbb, 0x59, 0x3d, 0x44, 0x70, 0xd2, 0x83, 0xaa, 0x99, 0x63, 0xc9, 0x5a, 0xed, + 0xbb, 0x19, 0xad, 0x02, 0x8f, 0x2f, 0xfe, 0xb6, 0x6b, 0xcf, 0x2e, 0x6d, 0xe3, 0xe2, 0xd2, 0x36, + 0x5e, 0x5d, 0xda, 0xc6, 0x5f, 0x97, 0xb6, 0xf1, 0xf3, 0x95, 0x5d, 0x7b, 0x75, 0x65, 0xd7, 0xfe, + 0xb8, 0xb2, 0x6b, 0x4f, 0xba, 0x2b, 0x23, 0x5d, 0x1d, 0x41, 0x50, 0x77, 0x84, 0x22, 0xee, 0x3d, + 0xee, 0xcb, 0x97, 0xef, 0x6c, 0xf1, 0x92, 0xcb, 0xe9, 0x8e, 0x6e, 0x48, 0x03, 0xdc, 0xff, 0x37, + 0x00, 0x00, 0xff, 0xff, 0xc1, 0x81, 0x8a, 0x6a, 0xe8, 0x05, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -313,6 +317,14 @@ func (this *Params) Equal(that interface{}) bool { if this.Admin != that1.Admin { return false } + if len(this.FeeWhitelist) != len(that1.FeeWhitelist) { + return false + } + for i := range this.FeeWhitelist { + if this.FeeWhitelist[i] != that1.FeeWhitelist[i] { + return false + } + } return true } func (this *BridgeInfo) Equal(that interface{}) bool { @@ -365,6 +377,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.FeeWhitelist) > 0 { + for iNdEx := len(m.FeeWhitelist) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FeeWhitelist[iNdEx]) + copy(dAtA[i:], m.FeeWhitelist[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FeeWhitelist[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } if len(m.Admin) > 0 { i -= len(m.Admin) copy(dAtA[i:], m.Admin) @@ -579,6 +600,12 @@ func (m *Params) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if len(m.FeeWhitelist) > 0 { + for _, s := range m.FeeWhitelist { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } return n } @@ -810,6 +837,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.Admin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeWhitelist", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeWhitelist = append(m.FeeWhitelist, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) From 6004080636738dcbf1204ca477ed41c9d23d2b70 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:13:55 +0900 Subject: [PATCH 11/13] add lint workflow --- .github/workflows/lint.yml | 73 ++++++++++++++++++++++++++++++++++++++ go.mod | 4 +-- 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..dfbe4395 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,73 @@ +name: Lint +# This workflow is run on every pull request and push to master +# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. +on: + pull_request: + paths: + - "**.go" + - "go.mod" + - "go.sum" + push: + branches: + - main + - "release/*" + paths: + - "**.go" + - "go.mod" + - "go.sum" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + golangci: + env: + # for private repo access + GOPRIVATE: github.com/initia-labs/* + GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2.1.4 + with: + go-version: 1.22 + - uses: technote-space/get-diff-action@v5 + id: git_diff + with: + PATTERNS: | + **/**.go + go.mod + go.sum + # for private repo access + - run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/.insteadOf https://github.com/ + - name: run go linters + run: | + make tools + make lint + if: env.GIT_DIFF + # Use --check or --exit-code when available (Go 1.19?) + # https://github.com/golang/go/issues/27005 + tidy: + env: + # for private repo access + GOPRIVATE: github.com/initia-labs/* + GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} + runs-on: ubuntu-latest + name: tidy + steps: + - uses: actions/checkout@v3 + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version: 1.22 + # for private repo access + - run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/.insteadOf https://github.com/ + - run: | + go mod tidy + CHANGES_IN_REPO=$(git status --porcelain) + if [[ -n "$CHANGES_IN_REPO" ]]; then + echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" + git status && git --no-pager diff + exit 1 + fi diff --git a/go.mod b/go.mod index 1b86e05f..731bab1f 100644 --- a/go.mod +++ b/go.mod @@ -197,9 +197,7 @@ require ( pgregory.net/rapid v1.1.0 // indirect ) -replace ( - github.com/initia-labs/OPinit/api => ./api -) +replace github.com/initia-labs/OPinit/api => ./api replace ( // use cosmos fork of keyring From 1e0835b37e2e8c3a6b2ef68a43064d5e51431ce8 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:18:32 +0900 Subject: [PATCH 12/13] update pulsar --- api/opinit/opchild/v1/types.pulsar.go | 245 ++++++++++++++++++++------ go.mod | 2 +- 2 files changed, 193 insertions(+), 54 deletions(-) diff --git a/api/opinit/opchild/v1/types.pulsar.go b/api/opinit/opchild/v1/types.pulsar.go index 0823465a..3ded9ced 100644 --- a/api/opinit/opchild/v1/types.pulsar.go +++ b/api/opinit/opchild/v1/types.pulsar.go @@ -70,6 +70,52 @@ func (x *_Params_3_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Params_6_list)(nil) + +type _Params_6_list struct { + list *[]string +} + +func (x *_Params_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Params_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Params_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Params at list field FeeWhitelist as it is not of Message kind")) +} + +func (x *_Params_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Params_6_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Params_6_list) IsValid() bool { + return x.list != nil +} + var ( md_Params protoreflect.MessageDescriptor fd_Params_max_validators protoreflect.FieldDescriptor @@ -77,6 +123,7 @@ var ( fd_Params_min_gas_prices protoreflect.FieldDescriptor fd_Params_bridge_executor protoreflect.FieldDescriptor fd_Params_admin protoreflect.FieldDescriptor + fd_Params_fee_whitelist protoreflect.FieldDescriptor ) func init() { @@ -87,6 +134,7 @@ func init() { fd_Params_min_gas_prices = md_Params.Fields().ByName("min_gas_prices") fd_Params_bridge_executor = md_Params.Fields().ByName("bridge_executor") fd_Params_admin = md_Params.Fields().ByName("admin") + fd_Params_fee_whitelist = md_Params.Fields().ByName("fee_whitelist") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -184,6 +232,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.FeeWhitelist) != 0 { + value := protoreflect.ValueOfList(&_Params_6_list{list: &x.FeeWhitelist}) + if !f(fd_Params_fee_whitelist, value) { + return + } + } } // Has reports whether a field is populated. @@ -209,6 +263,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.BridgeExecutor != "" case "opinit.opchild.v1.Params.admin": return x.Admin != "" + case "opinit.opchild.v1.Params.fee_whitelist": + return len(x.FeeWhitelist) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -235,6 +291,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.BridgeExecutor = "" case "opinit.opchild.v1.Params.admin": x.Admin = "" + case "opinit.opchild.v1.Params.fee_whitelist": + x.FeeWhitelist = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -269,6 +327,12 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "opinit.opchild.v1.Params.admin": value := x.Admin return protoreflect.ValueOfString(value) + case "opinit.opchild.v1.Params.fee_whitelist": + if len(x.FeeWhitelist) == 0 { + return protoreflect.ValueOfList(&_Params_6_list{}) + } + listValue := &_Params_6_list{list: &x.FeeWhitelist} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -301,6 +365,10 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.BridgeExecutor = value.Interface().(string) case "opinit.opchild.v1.Params.admin": x.Admin = value.Interface().(string) + case "opinit.opchild.v1.Params.fee_whitelist": + lv := value.List() + clv := lv.(*_Params_6_list) + x.FeeWhitelist = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -327,6 +395,12 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Params_3_list{list: &x.MinGasPrices} return protoreflect.ValueOfList(value) + case "opinit.opchild.v1.Params.fee_whitelist": + if x.FeeWhitelist == nil { + x.FeeWhitelist = []string{} + } + value := &_Params_6_list{list: &x.FeeWhitelist} + return protoreflect.ValueOfList(value) case "opinit.opchild.v1.Params.max_validators": panic(fmt.Errorf("field max_validators of message opinit.opchild.v1.Params is not mutable")) case "opinit.opchild.v1.Params.historical_entries": @@ -359,6 +433,9 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "opinit.opchild.v1.Params.admin": return protoreflect.ValueOfString("") + case "opinit.opchild.v1.Params.fee_whitelist": + list := []string{} + return protoreflect.ValueOfList(&_Params_6_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.opchild.v1.Params")) @@ -448,6 +525,12 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.FeeWhitelist) > 0 { + for _, s := range x.FeeWhitelist { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -477,6 +560,15 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.FeeWhitelist) > 0 { + for iNdEx := len(x.FeeWhitelist) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.FeeWhitelist[iNdEx]) + copy(dAtA[i:], x.FeeWhitelist[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeWhitelist[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } if len(x.Admin) > 0 { i -= len(x.Admin) copy(dAtA[i:], x.Admin) @@ -702,6 +794,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.Admin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeWhitelist", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeeWhitelist = append(x.FeeWhitelist, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2418,6 +2542,8 @@ type Params struct { BridgeExecutor string `protobuf:"bytes,4,opt,name=bridge_executor,json=bridgeExecutor,proto3" json:"bridge_executor,omitempty"` // the account address of admin who can execute permissioned cosmos messages. Admin string `protobuf:"bytes,5,opt,name=admin,proto3" json:"admin,omitempty"` + // the list of addresses that are allowed to pay zero fee. + FeeWhitelist []string `protobuf:"bytes,6,rep,name=fee_whitelist,json=feeWhitelist,proto3" json:"fee_whitelist,omitempty"` } func (x *Params) Reset() { @@ -2475,6 +2601,13 @@ func (x *Params) GetAdmin() string { return "" } +func (x *Params) GetFeeWhitelist() []string { + if x != nil { + return x.FeeWhitelist + } + return nil +} + // Validator defines a validator, together with the total amount of the // Validator's bond shares and their exchange rate to coins. Slashing results in // a decrease in the exchange rate, allowing correct calculation of future @@ -2656,7 +2789,7 @@ var file_opinit_opchild_v1_types_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x1b, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x03, 0x0a, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x04, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x61, 0x78, 0x5f, 0x76, @@ -2686,59 +2819,65 @@ var file_opinit_opchild_v1_types_proto_rawDesc = []byte{ 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x3a, 0x1b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x6f, - 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xbb, 0x02, - 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x6d, - 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xf2, 0xde, - 0x1f, 0x0e, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x22, - 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, - 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x74, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x42, 0x33, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xca, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x5f, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xf2, 0xde, 0x1f, - 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, - 0x72, 0x22, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x0c, 0x88, - 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x5f, 0x0a, 0x10, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, - 0x45, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb4, 0x01, 0x0a, - 0x0a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x42, 0xd0, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, - 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x2e, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, + 0x12, 0x5a, 0x0a, 0x0d, 0x66, 0x65, 0x65, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x35, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x66, 0x65, 0x65, 0x5f, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, + 0x66, 0x65, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x1b, 0x98, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x6f, 0x70, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x09, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xf2, 0xde, 0x1f, 0x0e, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x22, 0x52, 0x07, 0x6d, 0x6f, + 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x74, 0x0a, + 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x33, 0xf2, + 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x52, 0x09, + 0x63, 0x6f, 0x6e, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x0c, 0x88, 0xa0, 0x1f, 0x00, 0x98, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x5f, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x07, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x09, + 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x73, 0x3a, 0x04, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0xb4, 0x01, 0x0a, 0x0a, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x0b, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x12, + 0x4e, 0x0a, 0x0d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, + 0x01, 0x52, 0x0c, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0xd0, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, + 0x63, 0x68, 0x69, 0x6c, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x1d, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x13, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go.mod b/go.mod index 731bab1f..35fd684c 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/cosmos/gogoproto v1.4.11 github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/initia-labs/OPinit/api v0.0.0 + github.com/initia-labs/OPinit/api v0.2.4 github.com/pkg/errors v0.9.1 github.com/skip-mev/block-sdk v0.0.0-20231213233341-deceeb0e993b github.com/spf13/cobra v1.8.0 From 1af9f7e749caaf6275c44e55f06fb81813e5fd30 Mon Sep 17 00:00:00 2001 From: beer-1 <147697694+beer-1@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:06:58 +0900 Subject: [PATCH 13/13] add fee whitelist cmd --- x/opchild/client/cli/genesis.go | 89 ++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/x/opchild/client/cli/genesis.go b/x/opchild/client/cli/genesis.go index 444f1e1a..f728edc0 100644 --- a/x/opchild/client/cli/genesis.go +++ b/x/opchild/client/cli/genesis.go @@ -1,14 +1,17 @@ package cli import ( + "bufio" "encoding/json" "fmt" + "cosmossdk.io/core/address" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -19,7 +22,7 @@ import ( opchildtypes "github.com/initia-labs/OPinit/x/opchild/types" ) -// AddGenesisValidatorCmd builds the application's gentx command. +// AddGenesisValidatorCmd builds the application's add-genesis-validator command. func AddGenesisValidatorCmd(mbm module.BasicManager, txEncCfg client.TxEncodingConfig, genBalIterator genutiltypes.GenesisBalancesIterator, defaultNodeHome string) *cobra.Command { cmd := &cobra.Command{ Use: "add-genesis-validator [key_name]", @@ -120,3 +123,87 @@ $ %s add-genesis-validator my-key-name --home=/path/to/home/dir --keyring-backen return cmd } + +// AddFeeWhitelistCmd builds the application's fee-whitelist command. +func AddFeeWhitelistCmd(defaultNodeHome string, addressCodec address.Codec) *cobra.Command { + cmd := &cobra.Command{ + Use: "add-fee-whitelist [address_or_key_name]", + Short: "Add an address to the fee whitelist", + Args: cobra.ExactArgs(1), + Long: `Add an address to fee whitelist of genesis.json. The provided account must specify +the account address or key name . If a key name is given, +the address will be looked up in the local Keybase. +`, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + serverCtx := server.GetServerContextFromCmd(cmd) + config := serverCtx.Config + + config.SetRoot(clientCtx.HomeDir) + + var kr keyring.Keyring + addr, err := addressCodec.StringToBytes(args[0]) + if err != nil { + inBuf := bufio.NewReader(cmd.InOrStdin()) + keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend) + + if keyringBackend != "" && clientCtx.Keyring == nil { + var err error + kr, err = keyring.New(sdk.KeyringServiceName(), keyringBackend, clientCtx.HomeDir, inBuf, clientCtx.Codec) + if err != nil { + return err + } + } else { + kr = clientCtx.Keyring + } + + k, err := kr.Key(args[0]) + if err != nil { + return fmt.Errorf("failed to get address from Keyring: %w", err) + } + + addr, err = k.GetAddress() + if err != nil { + return err + } + } + addrStr, err := addressCodec.BytesToString(addr) + if err != nil { + return err + } + + genFile := config.GenesisFile() + appState, genDoc, err := genutiltypes.GenesisStateFromGenFile(genFile) + if err != nil { + return fmt.Errorf("failed to unmarshal genesis state: %w", err) + } + + cdc := clientCtx.Codec + opchildState := opchildtypes.GetGenesisStateFromAppState(cdc, appState) + opchildState.Params.FeeWhitelist = append(opchildState.Params.FeeWhitelist, addrStr) + + opchildGenStateBz, err := cdc.MarshalJSON(opchildState) + if err != nil { + return fmt.Errorf("failed to marshal opchild genesis state: %w", err) + } + appState[opchildtypes.ModuleName] = opchildGenStateBz + + appStateJSON, err := json.Marshal(appState) + if err != nil { + return fmt.Errorf("failed to marshal application genesis state: %w", err) + } + + genDoc.AppState = appStateJSON + if err = genutil.ExportGenesisFile(genDoc, config.GenesisFile()); err != nil { + return errors.Wrap(err, "Failed to export genesis file") + } + + return nil + }, + } + + cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") + flags.AddTxFlagsToCmd(cmd) + + return cmd +}