From 65a9ff20f7f5a31fa818a9da31ef409d2621a6cd Mon Sep 17 00:00:00 2001 From: Benjamin Bengfort Date: Fri, 24 Jan 2025 19:56:06 -0600 Subject: [PATCH] Sunrise Messages (#180) --- pkg/ivms101/enum.pb.go | 2 +- pkg/ivms101/identity.pb.go | 80 +-- pkg/ivms101/ivms101.pb.go | 2 +- pkg/slip0044/enum.pb.go | 2 +- pkg/slip0044/slip0044_test.go | 2 +- pkg/trisa/api/v1beta1/api.pb.go | 2 +- pkg/trisa/api/v1beta1/api_grpc.pb.go | 104 ++-- pkg/trisa/api/v1beta1/errors.pb.go | 2 +- .../data/generic/v1beta1/transaction.pb.go | 476 +++++++++++++++--- pkg/trisa/gds/api/v1beta1/api.pb.go | 2 +- pkg/trisa/gds/api/v1beta1/api_grpc.pb.go | 27 +- pkg/trisa/gds/models/v1beta1/ca.pb.go | 2 +- pkg/trisa/gds/models/v1beta1/models.pb.go | 2 +- .../data/generic/v1beta1/transaction.proto | 38 +- 14 files changed, 565 insertions(+), 178 deletions(-) diff --git a/pkg/ivms101/enum.pb.go b/pkg/ivms101/enum.pb.go index c4407d6b..06323d51 100644 --- a/pkg/ivms101/enum.pb.go +++ b/pkg/ivms101/enum.pb.go @@ -33,7 +33,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: ivms101/enum.proto package ivms101 diff --git a/pkg/ivms101/identity.pb.go b/pkg/ivms101/identity.pb.go index 4042139c..48998769 100644 --- a/pkg/ivms101/identity.pb.go +++ b/pkg/ivms101/identity.pb.go @@ -33,7 +33,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: ivms101/identity.proto package ivms101 @@ -210,7 +210,7 @@ type Beneficiary struct { // Definition: the natural or legal person or legal arrangement who is identified // by the originator as the receiver of the requested VA transfer. // One or More - BeneficiaryPersons []*Person `protobuf:"bytes,1,rep,name=beneficiary_persons,json=beneficiaryPerson,proto3" json:"beneficiary_persons,omitempty"` + BeneficiaryPersons []*Person `protobuf:"bytes,1,rep,name=beneficiary_persons,json=beneficiaryPersons,proto3" json:"beneficiary_persons,omitempty"` // Definition: Identifier of an account that is used to process the transaction. // The value for this element is case-sensitive. // Datatype: “Max100Text” @@ -568,47 +568,47 @@ var file_ivms101_identity_proto_rawDesc = []byte{ 0x73, 0x6f, 0x6e, 0x52, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x76, - 0x0a, 0x0b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x12, 0x3f, 0x0a, + 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x77, + 0x0a, 0x0b, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x13, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x76, 0x6d, - 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x11, 0x62, 0x65, 0x6e, - 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x26, - 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x10, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x73, 0x70, 0x18, 0x01, 0x20, + 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x12, 0x62, 0x65, 0x6e, + 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x10, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x73, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, + 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x73, 0x70, 0x22, 0x4d, 0x0a, 0x0f, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, + 0x63, 0x69, 0x61, 0x72, 0x79, 0x56, 0x61, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x10, 0x62, 0x65, 0x6e, + 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x73, 0x70, 0x22, 0x4d, 0x0a, 0x0f, 0x42, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, - 0x69, 0x61, 0x72, 0x79, 0x56, 0x61, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x10, 0x62, 0x65, 0x6e, 0x65, - 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x73, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, 0x65, 0x72, - 0x73, 0x6f, 0x6e, 0x52, 0x0f, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, 0x79, - 0x56, 0x61, 0x73, 0x70, 0x22, 0x6c, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x72, 0x79, 0x56, 0x61, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x73, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x72, 0x79, 0x56, 0x61, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x22, 0x4e, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x76, 0x6d, 0x73, - 0x31, 0x30, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x72, 0x79, - 0x56, 0x61, 0x73, 0x70, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, 0x61, - 0x74, 0x68, 0x22, 0x6c, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x69, - 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, - 0x72, 0x69, 0x73, 0x61, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x69, 0x73, 0x61, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x0f, 0x62, 0x65, 0x6e, 0x65, 0x66, 0x69, 0x63, 0x69, 0x61, 0x72, + 0x79, 0x56, 0x61, 0x73, 0x70, 0x22, 0x6c, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x72, 0x79, 0x56, 0x61, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x11, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x73, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x2e, 0x50, + 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x72, 0x79, 0x56, 0x61, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x22, 0x4e, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x76, 0x6d, + 0x73, 0x31, 0x30, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x72, + 0x79, 0x56, 0x61, 0x73, 0x70, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, + 0x61, 0x74, 0x68, 0x22, 0x6c, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, + 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x15, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x74, 0x72, 0x69, 0x73, 0x61, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x69, 0x73, + 0x61, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x69, 0x76, 0x6d, 0x73, 0x31, 0x30, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/ivms101/ivms101.pb.go b/pkg/ivms101/ivms101.pb.go index f9e7fae4..ed0e5c27 100644 --- a/pkg/ivms101/ivms101.pb.go +++ b/pkg/ivms101/ivms101.pb.go @@ -33,7 +33,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: ivms101/ivms101.proto package ivms101 diff --git a/pkg/slip0044/enum.pb.go b/pkg/slip0044/enum.pb.go index 78a9c8e5..752b478b 100644 --- a/pkg/slip0044/enum.pb.go +++ b/pkg/slip0044/enum.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: slip0044/enum.proto package slip0044 diff --git a/pkg/slip0044/slip0044_test.go b/pkg/slip0044/slip0044_test.go index 07770e61..2bca5017 100644 --- a/pkg/slip0044/slip0044_test.go +++ b/pkg/slip0044/slip0044_test.go @@ -55,7 +55,7 @@ func TestJSON(t *testing.T) { } data, err := os.ReadFile("testdata/example.json") - require.NoError(t, err, "could not loat testdata/example.json") + require.NoError(t, err, "could not load testdata/example.json") var example *Example err = json.Unmarshal(data, &example) diff --git a/pkg/trisa/api/v1beta1/api.pb.go b/pkg/trisa/api/v1beta1/api.pb.go index 2f3c9591..aca126c8 100644 --- a/pkg/trisa/api/v1beta1/api.pb.go +++ b/pkg/trisa/api/v1beta1/api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: trisa/api/v1beta1/api.proto package api diff --git a/pkg/trisa/api/v1beta1/api_grpc.pb.go b/pkg/trisa/api/v1beta1/api_grpc.pb.go index c50b3197..6a7099ee 100644 --- a/pkg/trisa/api/v1beta1/api_grpc.pb.go +++ b/pkg/trisa/api/v1beta1/api_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.1 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.2 // source: trisa/api/v1beta1/api.proto package api @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( TRISANetwork_Transfer_FullMethodName = "/trisa.api.v1beta1.TRISANetwork/Transfer" @@ -47,7 +47,7 @@ type TRISANetworkClient interface { // a unary RPC for simple, single transactions and a transaction stream for high // throughput transaction workloads. Transfer(ctx context.Context, in *SecureEnvelope, opts ...grpc.CallOption) (*SecureEnvelope, error) - TransferStream(ctx context.Context, opts ...grpc.CallOption) (TRISANetwork_TransferStreamClient, error) + TransferStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SecureEnvelope, SecureEnvelope], error) // Address confirmation allows an originator VASP to establish that a beneficiary // VASP has control of a crypto wallet address, prior to sending transaction // information with sensitive PII data. @@ -77,37 +77,18 @@ func (c *tRISANetworkClient) Transfer(ctx context.Context, in *SecureEnvelope, o return out, nil } -func (c *tRISANetworkClient) TransferStream(ctx context.Context, opts ...grpc.CallOption) (TRISANetwork_TransferStreamClient, error) { +func (c *tRISANetworkClient) TransferStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SecureEnvelope, SecureEnvelope], error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) stream, err := c.cc.NewStream(ctx, &TRISANetwork_ServiceDesc.Streams[0], TRISANetwork_TransferStream_FullMethodName, cOpts...) if err != nil { return nil, err } - x := &tRISANetworkTransferStreamClient{ClientStream: stream} + x := &grpc.GenericClientStream[SecureEnvelope, SecureEnvelope]{ClientStream: stream} return x, nil } -type TRISANetwork_TransferStreamClient interface { - Send(*SecureEnvelope) error - Recv() (*SecureEnvelope, error) - grpc.ClientStream -} - -type tRISANetworkTransferStreamClient struct { - grpc.ClientStream -} - -func (x *tRISANetworkTransferStreamClient) Send(m *SecureEnvelope) error { - return x.ClientStream.SendMsg(m) -} - -func (x *tRISANetworkTransferStreamClient) Recv() (*SecureEnvelope, error) { - m := new(SecureEnvelope) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type TRISANetwork_TransferStreamClient = grpc.BidiStreamingClient[SecureEnvelope, SecureEnvelope] func (c *tRISANetworkClient) ConfirmAddress(ctx context.Context, in *Address, opts ...grpc.CallOption) (*AddressConfirmation, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) @@ -131,7 +112,7 @@ func (c *tRISANetworkClient) KeyExchange(ctx context.Context, in *SigningKey, op // TRISANetworkServer is the server API for TRISANetwork service. // All implementations must embed UnimplementedTRISANetworkServer -// for forward compatibility +// for forward compatibility. // // The TRISANetwork service defines the peer-to-peer interactions between VASPs that are // necessary to conduct compliance information exchanges. All TRISA members must @@ -151,7 +132,7 @@ type TRISANetworkServer interface { // a unary RPC for simple, single transactions and a transaction stream for high // throughput transaction workloads. Transfer(context.Context, *SecureEnvelope) (*SecureEnvelope, error) - TransferStream(TRISANetwork_TransferStreamServer) error + TransferStream(grpc.BidiStreamingServer[SecureEnvelope, SecureEnvelope]) error // Address confirmation allows an originator VASP to establish that a beneficiary // VASP has control of a crypto wallet address, prior to sending transaction // information with sensitive PII data. @@ -164,14 +145,17 @@ type TRISANetworkServer interface { mustEmbedUnimplementedTRISANetworkServer() } -// UnimplementedTRISANetworkServer must be embedded to have forward compatible implementations. -type UnimplementedTRISANetworkServer struct { -} +// UnimplementedTRISANetworkServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedTRISANetworkServer struct{} func (UnimplementedTRISANetworkServer) Transfer(context.Context, *SecureEnvelope) (*SecureEnvelope, error) { return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") } -func (UnimplementedTRISANetworkServer) TransferStream(TRISANetwork_TransferStreamServer) error { +func (UnimplementedTRISANetworkServer) TransferStream(grpc.BidiStreamingServer[SecureEnvelope, SecureEnvelope]) error { return status.Errorf(codes.Unimplemented, "method TransferStream not implemented") } func (UnimplementedTRISANetworkServer) ConfirmAddress(context.Context, *Address) (*AddressConfirmation, error) { @@ -181,6 +165,7 @@ func (UnimplementedTRISANetworkServer) KeyExchange(context.Context, *SigningKey) return nil, status.Errorf(codes.Unimplemented, "method KeyExchange not implemented") } func (UnimplementedTRISANetworkServer) mustEmbedUnimplementedTRISANetworkServer() {} +func (UnimplementedTRISANetworkServer) testEmbeddedByValue() {} // UnsafeTRISANetworkServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TRISANetworkServer will @@ -190,6 +175,13 @@ type UnsafeTRISANetworkServer interface { } func RegisterTRISANetworkServer(s grpc.ServiceRegistrar, srv TRISANetworkServer) { + // If the following call pancis, it indicates UnimplementedTRISANetworkServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&TRISANetwork_ServiceDesc, srv) } @@ -212,30 +204,11 @@ func _TRISANetwork_Transfer_Handler(srv interface{}, ctx context.Context, dec fu } func _TRISANetwork_TransferStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(TRISANetworkServer).TransferStream(&tRISANetworkTransferStreamServer{ServerStream: stream}) + return srv.(TRISANetworkServer).TransferStream(&grpc.GenericServerStream[SecureEnvelope, SecureEnvelope]{ServerStream: stream}) } -type TRISANetwork_TransferStreamServer interface { - Send(*SecureEnvelope) error - Recv() (*SecureEnvelope, error) - grpc.ServerStream -} - -type tRISANetworkTransferStreamServer struct { - grpc.ServerStream -} - -func (x *tRISANetworkTransferStreamServer) Send(m *SecureEnvelope) error { - return x.ServerStream.SendMsg(m) -} - -func (x *tRISANetworkTransferStreamServer) Recv() (*SecureEnvelope, error) { - m := new(SecureEnvelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} +// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. +type TRISANetwork_TransferStreamServer = grpc.BidiStreamingServer[SecureEnvelope, SecureEnvelope] func _TRISANetwork_ConfirmAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Address) @@ -345,7 +318,7 @@ func (c *tRISAHealthClient) Status(ctx context.Context, in *HealthCheck, opts .. // TRISAHealthServer is the server API for TRISAHealth service. // All implementations must embed UnimplementedTRISAHealthServer -// for forward compatibility +// for forward compatibility. // // The TRISAHealth service is optional but highly recommended for VASP members to // implement. The Status endpoint allows the TRISA Directory Service to perform health @@ -361,14 +334,18 @@ type TRISAHealthServer interface { mustEmbedUnimplementedTRISAHealthServer() } -// UnimplementedTRISAHealthServer must be embedded to have forward compatible implementations. -type UnimplementedTRISAHealthServer struct { -} +// UnimplementedTRISAHealthServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedTRISAHealthServer struct{} func (UnimplementedTRISAHealthServer) Status(context.Context, *HealthCheck) (*ServiceState, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } func (UnimplementedTRISAHealthServer) mustEmbedUnimplementedTRISAHealthServer() {} +func (UnimplementedTRISAHealthServer) testEmbeddedByValue() {} // UnsafeTRISAHealthServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TRISAHealthServer will @@ -378,6 +355,13 @@ type UnsafeTRISAHealthServer interface { } func RegisterTRISAHealthServer(s grpc.ServiceRegistrar, srv TRISAHealthServer) { + // If the following call pancis, it indicates UnimplementedTRISAHealthServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&TRISAHealth_ServiceDesc, srv) } diff --git a/pkg/trisa/api/v1beta1/errors.pb.go b/pkg/trisa/api/v1beta1/errors.pb.go index fc4d088f..80a1af1a 100644 --- a/pkg/trisa/api/v1beta1/errors.pb.go +++ b/pkg/trisa/api/v1beta1/errors.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: trisa/api/v1beta1/errors.proto package api diff --git a/pkg/trisa/data/generic/v1beta1/transaction.pb.go b/pkg/trisa/data/generic/v1beta1/transaction.pb.go index 182e1f42..ac3cc85c 100644 --- a/pkg/trisa/data/generic/v1beta1/transaction.pb.go +++ b/pkg/trisa/data/generic/v1beta1/transaction.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: trisa/data/generic/v1beta1/transaction.proto package generic @@ -20,10 +20,59 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Identifier int32 + +const ( + Identifier_SYMBOL Identifier = 0 // the identifier is a coin/token symbol + Identifier_DTI Identifier = 1 // the Digital Token Identifier (DTI) for the asset + Identifier_SLIP0044 Identifier = 2 // the SLIP0044 identifier for the asset +) + +// Enum value maps for Identifier. +var ( + Identifier_name = map[int32]string{ + 0: "SYMBOL", + 1: "DTI", + 2: "SLIP0044", + } + Identifier_value = map[string]int32{ + "SYMBOL": 0, + "DTI": 1, + "SLIP0044": 2, + } +) + +func (x Identifier) Enum() *Identifier { + p := new(Identifier) + *p = x + return p +} + +func (x Identifier) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Identifier) Descriptor() protoreflect.EnumDescriptor { + return file_trisa_data_generic_v1beta1_transaction_proto_enumTypes[0].Descriptor() +} + +func (Identifier) Type() protoreflect.EnumType { + return &file_trisa_data_generic_v1beta1_transaction_proto_enumTypes[0] +} + +func (x Identifier) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Identifier.Descriptor instead. +func (Identifier) EnumDescriptor() ([]byte, []int) { + return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{0} +} + // Generic Transaction message for TRISA transaction payloads. The goal of this payload // is to provide enough information to link Travel Rule Compliance information in the // identity payload with a transaction on the blockchain or network. All fields are -// optional, this message serves as a convienience for parsing transaction payloads. +// optional, this message serves as a convenience for parsing transaction payloads. type Transaction struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -36,7 +85,7 @@ type Transaction struct { Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"` // the chain/network of the transaction Timestamp string `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // RFC 3339 timestamp of the transaction ExtraJson string `protobuf:"bytes,7,opt,name=extra_json,json=extraJson,proto3" json:"extra_json,omitempty"` // any extra data as a JSON formatted object - AssetType string `protobuf:"bytes,8,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` // the type of virtual asset for mult-asset chains + AssetType string `protobuf:"bytes,8,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` // the type of virtual asset for multi-asset chains Tag string `protobuf:"bytes,9,opt,name=tag,proto3" json:"tag,omitempty"` // optional memo/destination-tag required by some ledgers to identify transactions } @@ -135,6 +184,61 @@ func (x *Transaction) GetTag() string { return "" } +type Asset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier Identifier `protobuf:"varint,1,opt,name=identifier,proto3,enum=trisa.data.generic.v1beta1.Identifier" json:"identifier,omitempty"` // the identifier being used, e.g. "DTI" or "SLIP0044" + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` // the symbol of the asset used for the identifier +} + +func (x *Asset) Reset() { + *x = Asset{} + if protoimpl.UnsafeEnabled { + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Asset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Asset) ProtoMessage() {} + +func (x *Asset) ProtoReflect() protoreflect.Message { + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Asset.ProtoReflect.Descriptor instead. +func (*Asset) Descriptor() ([]byte, []int) { + return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{1} +} + +func (x *Asset) GetIdentifier() Identifier { + if x != nil { + return x.Identifier + } + return Identifier_SYMBOL +} + +func (x *Asset) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + // A control flow message to support asynchronous TRISA transfers. Pending messages can // be returned as an intermediate response during a compliance transfer if further // processing is required before a response can be sent. The Pending message should @@ -160,7 +264,7 @@ type Pending struct { func (x *Pending) Reset() { *x = Pending{} if protoimpl.UnsafeEnabled { - mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[1] + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -173,7 +277,7 @@ func (x *Pending) String() string { func (*Pending) ProtoMessage() {} func (x *Pending) ProtoReflect() protoreflect.Message { - mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[1] + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -186,7 +290,7 @@ func (x *Pending) ProtoReflect() protoreflect.Message { // Deprecated: Use Pending.ProtoReflect.Descriptor instead. func (*Pending) Descriptor() ([]byte, []int) { - return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{1} + return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{2} } func (x *Pending) GetEnvelopeId() string { @@ -245,6 +349,178 @@ func (x *Pending) GetTransaction() *Transaction { return nil } +// Sunrise is a control flow message to indicate that the message was sent over a side +// channel to the TRISA protocol such as via email or phone. The Sunrise message +// is only saved locally to indicate a record of an out-of-band communication and is not +// sent in a TRISA payload. +type Sunrise struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EnvelopeId string `protobuf:"bytes,1,opt,name=envelope_id,json=envelopeId,proto3" json:"envelope_id,omitempty"` // the TRISA envelope ID for reference + Counterparty string `protobuf:"bytes,2,opt,name=counterparty,proto3" json:"counterparty,omitempty"` // the name of the counterparty or counterparty VASP the messages were sent to + Messages []*SunriseMessage `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"` // the list of recipients that the message was sent to + ExtraJson string `protobuf:"bytes,14,opt,name=extra_json,json=extraJson,proto3" json:"extra_json,omitempty"` // any extra data as a JSON formatted object + Transaction *Transaction `protobuf:"bytes,15,opt,name=transaction,proto3" json:"transaction,omitempty"` // the original transaction for reference +} + +func (x *Sunrise) Reset() { + *x = Sunrise{} + if protoimpl.UnsafeEnabled { + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sunrise) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sunrise) ProtoMessage() {} + +func (x *Sunrise) ProtoReflect() protoreflect.Message { + mi := &file_trisa_data_generic_v1beta1_transaction_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) +} + +// Deprecated: Use Sunrise.ProtoReflect.Descriptor instead. +func (*Sunrise) Descriptor() ([]byte, []int) { + return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{3} +} + +func (x *Sunrise) GetEnvelopeId() string { + if x != nil { + return x.EnvelopeId + } + return "" +} + +func (x *Sunrise) GetCounterparty() string { + if x != nil { + return x.Counterparty + } + return "" +} + +func (x *Sunrise) GetMessages() []*SunriseMessage { + if x != nil { + return x.Messages + } + return nil +} + +func (x *Sunrise) GetExtraJson() string { + if x != nil { + return x.ExtraJson + } + return "" +} + +func (x *Sunrise) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +// SunriseMessages may be sent to multiple contacts via different channels (e.g. via +// an email or phone call to the compliance officer and general contact). +type SunriseMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"` // the name of the recipient or recipient VASP + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // the email address of the recipient + Phone string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"` // the phone number of the recipient + Channel string `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel,omitempty"` // the name of the method or channel the message was sent over (e.g. email or phone) + SentAt string `protobuf:"bytes,5,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` // the RFC3339 formatted timestamp when the message was sent + ReplyNotBefore string `protobuf:"bytes,6,opt,name=reply_not_before,json=replyNotBefore,proto3" json:"reply_not_before,omitempty"` // the RFC339 formatted timestamp that the response is expected before message expiration +} + +func (x *SunriseMessage) Reset() { + *x = SunriseMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SunriseMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SunriseMessage) ProtoMessage() {} + +func (x *SunriseMessage) ProtoReflect() protoreflect.Message { + mi := &file_trisa_data_generic_v1beta1_transaction_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) +} + +// Deprecated: Use SunriseMessage.ProtoReflect.Descriptor instead. +func (*SunriseMessage) Descriptor() ([]byte, []int) { + return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{4} +} + +func (x *SunriseMessage) GetRecipient() string { + if x != nil { + return x.Recipient + } + return "" +} + +func (x *SunriseMessage) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *SunriseMessage) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *SunriseMessage) GetChannel() string { + if x != nil { + return x.Channel + } + return "" +} + +func (x *SunriseMessage) GetSentAt() string { + if x != nil { + return x.SentAt + } + return "" +} + +func (x *SunriseMessage) GetReplyNotBefore() string { + if x != nil { + return x.ReplyNotBefore + } + return "" +} + // DEPRECATED: the ConfirmationReceipt message was deemed to cause confusion as it could // signal that the confirmation payload was received and the transfer is concluded. Use // the Pending message instead to signal that this is a control flow message. @@ -263,7 +539,7 @@ type ConfirmationReceipt struct { func (x *ConfirmationReceipt) Reset() { *x = ConfirmationReceipt{} if protoimpl.UnsafeEnabled { - mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[2] + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -276,7 +552,7 @@ func (x *ConfirmationReceipt) String() string { func (*ConfirmationReceipt) ProtoMessage() {} func (x *ConfirmationReceipt) ProtoReflect() protoreflect.Message { - mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[2] + mi := &file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -289,7 +565,7 @@ func (x *ConfirmationReceipt) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfirmationReceipt.ProtoReflect.Descriptor instead. func (*ConfirmationReceipt) Descriptor() ([]byte, []int) { - return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{2} + return file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP(), []int{5} } func (x *ConfirmationReceipt) GetEnvelopeId() string { @@ -351,44 +627,81 @@ var file_trisa_data_generic_v1beta1_transaction_proto_rawDesc = []byte{ 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, - 0x22, 0xc2, 0x02, 0x0a, 0x07, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, - 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1f, - 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x70, - 0x6c, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x4e, 0x6f, 0x74, 0x41, 0x66, 0x74, 0x65, - 0x72, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x62, + 0x22, 0x67, 0x0a, 0x05, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0xc2, 0x02, 0x0a, 0x07, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, + 0x6c, 0x79, 0x4e, 0x6f, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, + 0x70, 0x6c, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x4e, 0x6f, 0x74, 0x42, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x6a, 0x73, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4a, + 0x73, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, + 0x02, 0x0a, 0x07, 0x53, 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x61, 0x72, 0x74, 0x79, 0x12, + 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, + 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x72, 0x61, + 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, + 0x72, 0x61, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x72, + 0x69, 0x73, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x6e, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, + 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, + 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, - 0x6c, 0x79, 0x4e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, - 0x78, 0x74, 0x72, 0x61, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x65, 0x78, 0x74, 0x72, 0x61, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0b, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x12, - 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x69, 0x73, 0x61, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2f, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x69, 0x73, - 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x79, 0x4e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x13, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x2a, 0x2f, 0x0a, + 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x0a, 0x0a, 0x06, 0x53, + 0x59, 0x4d, 0x42, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x54, 0x49, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x4c, 0x49, 0x50, 0x30, 0x30, 0x34, 0x34, 0x10, 0x02, 0x42, 0x45, + 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x72, 0x69, + 0x73, 0x61, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -403,19 +716,27 @@ func file_trisa_data_generic_v1beta1_transaction_proto_rawDescGZIP() []byte { return file_trisa_data_generic_v1beta1_transaction_proto_rawDescData } -var file_trisa_data_generic_v1beta1_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_trisa_data_generic_v1beta1_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_trisa_data_generic_v1beta1_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_trisa_data_generic_v1beta1_transaction_proto_goTypes = []any{ - (*Transaction)(nil), // 0: trisa.data.generic.v1beta1.Transaction - (*Pending)(nil), // 1: trisa.data.generic.v1beta1.Pending - (*ConfirmationReceipt)(nil), // 2: trisa.data.generic.v1beta1.ConfirmationReceipt + (Identifier)(0), // 0: trisa.data.generic.v1beta1.Identifier + (*Transaction)(nil), // 1: trisa.data.generic.v1beta1.Transaction + (*Asset)(nil), // 2: trisa.data.generic.v1beta1.Asset + (*Pending)(nil), // 3: trisa.data.generic.v1beta1.Pending + (*Sunrise)(nil), // 4: trisa.data.generic.v1beta1.Sunrise + (*SunriseMessage)(nil), // 5: trisa.data.generic.v1beta1.SunriseMessage + (*ConfirmationReceipt)(nil), // 6: trisa.data.generic.v1beta1.ConfirmationReceipt } var file_trisa_data_generic_v1beta1_transaction_proto_depIdxs = []int32{ - 0, // 0: trisa.data.generic.v1beta1.Pending.transaction:type_name -> trisa.data.generic.v1beta1.Transaction - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: trisa.data.generic.v1beta1.Asset.identifier:type_name -> trisa.data.generic.v1beta1.Identifier + 1, // 1: trisa.data.generic.v1beta1.Pending.transaction:type_name -> trisa.data.generic.v1beta1.Transaction + 5, // 2: trisa.data.generic.v1beta1.Sunrise.messages:type_name -> trisa.data.generic.v1beta1.SunriseMessage + 1, // 3: trisa.data.generic.v1beta1.Sunrise.transaction:type_name -> trisa.data.generic.v1beta1.Transaction + 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_trisa_data_generic_v1beta1_transaction_proto_init() } @@ -437,7 +758,7 @@ func file_trisa_data_generic_v1beta1_transaction_proto_init() { } } file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Pending); i { + switch v := v.(*Asset); i { case 0: return &v.state case 1: @@ -449,6 +770,42 @@ func file_trisa_data_generic_v1beta1_transaction_proto_init() { } } file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*Pending); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Sunrise); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*SunriseMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_trisa_data_generic_v1beta1_transaction_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ConfirmationReceipt); i { case 0: return &v.state @@ -466,13 +823,14 @@ func file_trisa_data_generic_v1beta1_transaction_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_trisa_data_generic_v1beta1_transaction_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, + NumEnums: 1, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, GoTypes: file_trisa_data_generic_v1beta1_transaction_proto_goTypes, DependencyIndexes: file_trisa_data_generic_v1beta1_transaction_proto_depIdxs, + EnumInfos: file_trisa_data_generic_v1beta1_transaction_proto_enumTypes, MessageInfos: file_trisa_data_generic_v1beta1_transaction_proto_msgTypes, }.Build() File_trisa_data_generic_v1beta1_transaction_proto = out.File diff --git a/pkg/trisa/gds/api/v1beta1/api.pb.go b/pkg/trisa/gds/api/v1beta1/api.pb.go index 129aaf7a..38675acf 100644 --- a/pkg/trisa/gds/api/v1beta1/api.pb.go +++ b/pkg/trisa/gds/api/v1beta1/api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: trisa/gds/api/v1beta1/api.proto package api diff --git a/pkg/trisa/gds/api/v1beta1/api_grpc.pb.go b/pkg/trisa/gds/api/v1beta1/api_grpc.pb.go index 20755f88..643f119b 100644 --- a/pkg/trisa/gds/api/v1beta1/api_grpc.pb.go +++ b/pkg/trisa/gds/api/v1beta1/api_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.1 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.28.2 // source: trisa/gds/api/v1beta1/api.proto package api @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( TRISADirectory_Lookup_FullMethodName = "/trisa.gds.api.v1beta1.TRISADirectory/Lookup" @@ -117,7 +117,7 @@ func (c *tRISADirectoryClient) Status(ctx context.Context, in *HealthCheck, opts // TRISADirectoryServer is the server API for TRISADirectory service. // All implementations must embed UnimplementedTRISADirectoryServer -// for forward compatibility +// for forward compatibility. // // The TRISADirectory service specifies how TRISA clients should interact with a // directory service to facilitate P2P transfers. @@ -136,9 +136,12 @@ type TRISADirectoryServer interface { mustEmbedUnimplementedTRISADirectoryServer() } -// UnimplementedTRISADirectoryServer must be embedded to have forward compatible implementations. -type UnimplementedTRISADirectoryServer struct { -} +// UnimplementedTRISADirectoryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedTRISADirectoryServer struct{} func (UnimplementedTRISADirectoryServer) Lookup(context.Context, *LookupRequest) (*LookupReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Lookup not implemented") @@ -159,6 +162,7 @@ func (UnimplementedTRISADirectoryServer) Status(context.Context, *HealthCheck) ( return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } func (UnimplementedTRISADirectoryServer) mustEmbedUnimplementedTRISADirectoryServer() {} +func (UnimplementedTRISADirectoryServer) testEmbeddedByValue() {} // UnsafeTRISADirectoryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TRISADirectoryServer will @@ -168,6 +172,13 @@ type UnsafeTRISADirectoryServer interface { } func RegisterTRISADirectoryServer(s grpc.ServiceRegistrar, srv TRISADirectoryServer) { + // If the following call pancis, it indicates UnimplementedTRISADirectoryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&TRISADirectory_ServiceDesc, srv) } diff --git a/pkg/trisa/gds/models/v1beta1/ca.pb.go b/pkg/trisa/gds/models/v1beta1/ca.pb.go index 59a553e2..62b4690a 100644 --- a/pkg/trisa/gds/models/v1beta1/ca.pb.go +++ b/pkg/trisa/gds/models/v1beta1/ca.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: trisa/gds/models/v1beta1/ca.proto package models diff --git a/pkg/trisa/gds/models/v1beta1/models.pb.go b/pkg/trisa/gds/models/v1beta1/models.pb.go index 7ceca1fb..ce76b2ce 100644 --- a/pkg/trisa/gds/models/v1beta1/models.pb.go +++ b/pkg/trisa/gds/models/v1beta1/models.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc v5.28.2 // source: trisa/gds/models/v1beta1/models.proto package models diff --git a/proto/trisa/data/generic/v1beta1/transaction.proto b/proto/trisa/data/generic/v1beta1/transaction.proto index 06174df7..502097ef 100644 --- a/proto/trisa/data/generic/v1beta1/transaction.proto +++ b/proto/trisa/data/generic/v1beta1/transaction.proto @@ -7,7 +7,7 @@ option go_package = "github.com/trisacrypto/trisa/pkg/trisa/data/generic/v1beta1 // Generic Transaction message for TRISA transaction payloads. The goal of this payload // is to provide enough information to link Travel Rule Compliance information in the // identity payload with a transaction on the blockchain or network. All fields are -// optional, this message serves as a convienience for parsing transaction payloads. +// optional, this message serves as a convenience for parsing transaction payloads. message Transaction { string txid = 1; // a transaction ID unique to the chain/network string originator = 2; // crypto address of the originator @@ -16,10 +16,21 @@ message Transaction { string network = 5; // the chain/network of the transaction string timestamp = 6; // RFC 3339 timestamp of the transaction string extra_json = 7; // any extra data as a JSON formatted object - string asset_type = 8; // the type of virtual asset for mult-asset chains + string asset_type = 8; // the type of virtual asset for multi-asset chains string tag = 9; // optional memo/destination-tag required by some ledgers to identify transactions } +message Asset { + Identifier identifier = 1; // the identifier being used, e.g. "DTI" or "SLIP0044" + string symbol = 2; // the symbol of the asset used for the identifier +} + +enum Identifier { + SYMBOL = 0; // the identifier is a coin/token symbol + DTI = 1; // the Digital Token Identifier (DTI) for the asset + SLIP0044 = 2; // the SLIP0044 identifier for the asset +} + // A control flow message to support asynchronous TRISA transfers. Pending messages can // be returned as an intermediate response during a compliance transfer if further // processing is required before a response can be sent. The Pending message should @@ -38,6 +49,29 @@ message Pending { Transaction transaction = 15; // the original transaction for reference } +// Sunrise is a control flow message to indicate that the message was sent over a side +// channel to the TRISA protocol such as via email or phone. The Sunrise message +// is only saved locally to indicate a record of an out-of-band communication and is not +// sent in a TRISA payload. +message Sunrise { + string envelope_id = 1; // the TRISA envelope ID for reference + string counterparty = 2; // the name of the counterparty or counterparty VASP the messages were sent to + repeated SunriseMessage messages = 3; // the list of recipients that the message was sent to + string extra_json = 14; // any extra data as a JSON formatted object + Transaction transaction = 15; // the original transaction for reference +} + +// SunriseMessages may be sent to multiple contacts via different channels (e.g. via +// an email or phone call to the compliance officer and general contact). +message SunriseMessage { + string recipient = 1; // the name of the recipient or recipient VASP + string email = 2; // the email address of the recipient + string phone = 3; // the phone number of the recipient + string channel = 4; // the name of the method or channel the message was sent over (e.g. email or phone) + string sent_at = 5; // the RFC3339 formatted timestamp when the message was sent + string reply_not_before = 6; // the RFC339 formatted timestamp that the response is expected before message expiration +} + // DEPRECATED: the ConfirmationReceipt message was deemed to cause confusion as it could // signal that the confirmation payload was received and the transfer is concluded. Use // the Pending message instead to signal that this is a control flow message.