From ba423f5cc33ab71a29a303d297d5080d7c62a05c Mon Sep 17 00:00:00 2001 From: Benjamin Bengfort Date: Sat, 25 May 2024 13:36:56 -0500 Subject: [PATCH] Transaction States (#163) --- cmd/trisa/main.go | 6 +- docs/content/gds/members.de.md | 2 +- docs/content/gds/members.en.md | 2 +- docs/content/gds/members.fr.md | 2 +- docs/content/gds/members.ja.md | 2 +- docs/content/gds/members.zh.md | 2 +- go.mod | 29 +- go.sum | 65 ++-- pkg/bufconn/listener.go | 2 +- pkg/ivms101/enum.pb.go | 4 +- pkg/ivms101/identity.pb.go | 4 +- pkg/ivms101/ivms101.pb.go | 4 +- pkg/slip0044/enum.pb.go | 4 +- pkg/trisa/api/v1beta1/api.pb.go | 321 +++++++++++------- pkg/trisa/api/v1beta1/api_grpc.pb.go | 2 +- pkg/trisa/api/v1beta1/errors.pb.go | 4 +- pkg/trisa/api/v1beta1/states.go | 12 + .../data/generic/v1beta1/transaction.pb.go | 4 +- pkg/trisa/envelope/envelope.go | 27 ++ pkg/trisa/envelope/options.go | 8 + pkg/trisa/gds/api/v1beta1/api.pb.go | 4 +- pkg/trisa/gds/api/v1beta1/api_grpc.pb.go | 2 +- pkg/trisa/gds/models/v1beta1/ca.pb.go | 4 +- pkg/trisa/gds/models/v1beta1/models.pb.go | 4 +- pkg/trisa/peers/peer.go | 2 +- pkg/trisa/peers/peers.go | 2 +- pkg/trisa/peers/peers_test.go | 6 +- pkg/trust/mock/mock.go | 3 +- pkg/trust/trust.go | 4 +- proto/trisa/api/v1beta1/api.proto | 15 + 30 files changed, 348 insertions(+), 204 deletions(-) create mode 100644 pkg/trisa/api/v1beta1/states.go diff --git a/cmd/trisa/main.go b/cmd/trisa/main.go index e53a5443..1257d5e5 100644 --- a/cmd/trisa/main.go +++ b/cmd/trisa/main.go @@ -892,7 +892,7 @@ func initClient(c *cli.Context) (err error) { } var cc *grpc.ClientConn - if cc, err = grpc.Dial(endpoint, creds); err != nil { + if cc, err = grpc.NewClient(endpoint, creds); err != nil { return cli.Exit(err, 1) } @@ -919,7 +919,7 @@ func initHealthCheckClient(c *cli.Context) (err error) { } var cc *grpc.ClientConn - if cc, err = grpc.Dial(endpoint, opts...); err != nil { + if cc, err = grpc.NewClient(endpoint, opts...); err != nil { return cli.Exit(err, 1) } @@ -938,7 +938,7 @@ func initDirectoryClient(c *cli.Context) (err error) { } var cc *grpc.ClientConn - if cc, err = grpc.Dial(endpoint, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))); err != nil { + if cc, err = grpc.NewClient(endpoint, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))); err != nil { return cli.Exit(err, 1) } diff --git a/docs/content/gds/members.de.md b/docs/content/gds/members.de.md index 9aa384f8..03fa4988 100644 --- a/docs/content/gds/members.de.md +++ b/docs/content/gds/members.de.md @@ -118,7 +118,7 @@ func (m *MyProfile) Connect() (_ members.TRISAMembersClient, err error){ } var cc *grpc.ClientConn - if cc, err = grpc.Dial(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { + if cc, err = grpc.NewClient(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { return nil, err } diff --git a/docs/content/gds/members.en.md b/docs/content/gds/members.en.md index ca9b78cb..95d4a3ad 100644 --- a/docs/content/gds/members.en.md +++ b/docs/content/gds/members.en.md @@ -189,7 +189,7 @@ func (m *MyProfile) Connect() (_ members.TRISAMembersClient, err error){ } var cc *grpc.ClientConn - if cc, err = grpc.Dial(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { + if cc, err = grpc.NewClient(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { return nil, err } diff --git a/docs/content/gds/members.fr.md b/docs/content/gds/members.fr.md index aef81e79..304baf76 100644 --- a/docs/content/gds/members.fr.md +++ b/docs/content/gds/members.fr.md @@ -118,7 +118,7 @@ func (m *MyProfile) Connect() (_ members.TRISAMembersClient, err error){ } var cc *grpc.ClientConn - if cc, err = grpc.Dial(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { + if cc, err = grpc.NewClient(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { return nil, err } diff --git a/docs/content/gds/members.ja.md b/docs/content/gds/members.ja.md index 530b533d..15170062 100644 --- a/docs/content/gds/members.ja.md +++ b/docs/content/gds/members.ja.md @@ -117,7 +117,7 @@ func (m *MyProfile) Connect() (_ members.TRISAMembersClient, err error){ } var cc *grpc.ClientConn - if cc, err = grpc.Dial(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { + if cc, err = grpc.NewClient(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { return nil, err } diff --git a/docs/content/gds/members.zh.md b/docs/content/gds/members.zh.md index 88e1a412..4ecd7ed0 100644 --- a/docs/content/gds/members.zh.md +++ b/docs/content/gds/members.zh.md @@ -120,7 +120,7 @@ func (m *MyProfile) Connect() (_ members.TRISAMembersClient, err error){ } var cc *grpc.ClientConn - if cc, err = grpc.Dial(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { + if cc, err = grpc.NewClient(m.Endpoint, grpc.WithTransportCredentials(creds)); err != nil { return nil, err } diff --git a/go.mod b/go.mod index e0177a3f..fd04bd82 100644 --- a/go.mod +++ b/go.mod @@ -3,28 +3,27 @@ module github.com/trisacrypto/trisa go 1.20 require ( - github.com/bombsimon/tld-validator v1.2.21 - github.com/google/uuid v1.3.0 + github.com/bombsimon/tld-validator v1.2.31 + github.com/google/uuid v1.6.0 github.com/joho/godotenv v1.5.1 github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 - github.com/stretchr/testify v1.8.4 - github.com/urfave/cli/v2 v2.25.7 - google.golang.org/grpc v1.57.0 - google.golang.org/protobuf v1.31.0 - software.sslmate.com/src/go-pkcs12 v0.2.1 + github.com/stretchr/testify v1.9.0 + github.com/urfave/cli/v2 v2.27.2 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 + software.sslmate.com/src/go-pkcs12 v0.4.0 ) require ( - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/golang/protobuf v1.5.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - golang.org/x/crypto v0.12.0 // indirect - golang.org/x/net v0.14.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect + github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index f5020f6e..500ff082 100644 --- a/go.sum +++ b/go.sum @@ -1,16 +1,12 @@ -github.com/bombsimon/tld-validator v1.2.21 h1:JLpmhsdO4ikjaYmNf8/iE/OGZ0zG5Hh1DotQhk51Ng8= -github.com/bombsimon/tld-validator v1.2.21/go.mod h1:+2YM7/ptr3r4ov5x//j0sOMy1yfSqmrA28THAVNlmnQ= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/bombsimon/tld-validator v1.2.31 h1:rQfGv3UavCtGwsFi86uGwB1ST/JMj4liPvv7Bao4m+Q= +github.com/bombsimon/tld-validator v1.2.31/go.mod h1:+2YM7/ptr3r4ov5x//j0sOMy1yfSqmrA28THAVNlmnQ= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/nsf/jsondiff v0.0.0-20230430225905-43f6cf3098c1 h1:dOYG7LS/WK00RWZc8XGgcUTlTxpp3mKhdR2Q9z9HbXM= @@ -19,43 +15,40 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -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/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= -github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 h1:lv6/DhyiFFGsmzxbsUUTOkN29II+zeWHxvT8Lpdxsv0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -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/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e h1:Elxv5MwEkCI9f5SkoL6afed6NTdxaGoAo39eANBwHL8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -software.sslmate.com/src/go-pkcs12 v0.2.1 h1:tbT1jjaeFOF230tzOIRJ6U5S1jNqpsSyNjzDd58H3J8= -software.sslmate.com/src/go-pkcs12 v0.2.1/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= +software.sslmate.com/src/go-pkcs12 v0.4.0 h1:H2g08FrTvSFKUj+D309j1DPfk5APnIdAQAB8aEykJ5k= +software.sslmate.com/src/go-pkcs12 v0.4.0/go.mod h1:Qiz0EyvDRJjjxGyUQa2cCNZn/wMyzrRJ/qcDXOQazLI= diff --git a/pkg/bufconn/listener.go b/pkg/bufconn/listener.go index 32006b60..e7b39ba4 100644 --- a/pkg/bufconn/listener.go +++ b/pkg/bufconn/listener.go @@ -30,7 +30,7 @@ func (l *Listener) Close() error { func (l *Listener) Connect(ctx context.Context, opts ...grpc.DialOption) (cc *grpc.ClientConn, err error) { opts = append([]grpc.DialOption{grpc.WithContextDialer(l.Dialer)}, opts...) - if cc, err = grpc.DialContext(ctx, "bufnet", opts...); err != nil { + if cc, err = grpc.NewClient("passthrough://bufnet", opts...); err != nil { return nil, err } return cc, nil diff --git a/pkg/ivms101/enum.pb.go b/pkg/ivms101/enum.pb.go index a60618d6..b9ea84ae 100644 --- a/pkg/ivms101/enum.pb.go +++ b/pkg/ivms101/enum.pb.go @@ -32,8 +32,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: ivms101/enum.proto package ivms101 diff --git a/pkg/ivms101/identity.pb.go b/pkg/ivms101/identity.pb.go index e0e77e4f..829d33aa 100644 --- a/pkg/ivms101/identity.pb.go +++ b/pkg/ivms101/identity.pb.go @@ -32,8 +32,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: ivms101/identity.proto package ivms101 diff --git a/pkg/ivms101/ivms101.pb.go b/pkg/ivms101/ivms101.pb.go index 2767f994..64424896 100644 --- a/pkg/ivms101/ivms101.pb.go +++ b/pkg/ivms101/ivms101.pb.go @@ -32,8 +32,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: ivms101/ivms101.proto package ivms101 diff --git a/pkg/slip0044/enum.pb.go b/pkg/slip0044/enum.pb.go index fe8c5a55..305fcb8b 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: slip0044/enum.proto package slip0044 diff --git a/pkg/trisa/api/v1beta1/api.pb.go b/pkg/trisa/api/v1beta1/api.pb.go index 137a5ee7..eb89c930 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: trisa/api/v1beta1/api.proto package api @@ -21,6 +21,67 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type TransferState int32 + +const ( + TransferState_UNSPECIFIED TransferState = 0 // the transfer state is unknown or not specified + TransferState_STARTED TransferState = 1 // this is the first message in the TRISA workflow + TransferState_PENDING TransferState = 2 // action is required by the sending party + TransferState_REPAIR TransferState = 3 // some state of the travel rule exchange requires repair + TransferState_ACCEPTED TransferState = 4 // the travel rule exchange is accepted and waiting the transaction + TransferState_COMPLETED TransferState = 5 // the travel rule and on-chain transaction have been completed + TransferState_REJECTED TransferState = 6 // the travel rule exchange is rejected and should not proceed +) + +// Enum value maps for TransferState. +var ( + TransferState_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "STARTED", + 2: "PENDING", + 3: "REPAIR", + 4: "ACCEPTED", + 5: "COMPLETED", + 6: "REJECTED", + } + TransferState_value = map[string]int32{ + "UNSPECIFIED": 0, + "STARTED": 1, + "PENDING": 2, + "REPAIR": 3, + "ACCEPTED": 4, + "COMPLETED": 5, + "REJECTED": 6, + } +) + +func (x TransferState) Enum() *TransferState { + p := new(TransferState) + *p = x + return p +} + +func (x TransferState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransferState) Descriptor() protoreflect.EnumDescriptor { + return file_trisa_api_v1beta1_api_proto_enumTypes[0].Descriptor() +} + +func (TransferState) Type() protoreflect.EnumType { + return &file_trisa_api_v1beta1_api_proto_enumTypes[0] +} + +func (x TransferState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransferState.Descriptor instead. +func (TransferState) EnumDescriptor() ([]byte, []int) { + return file_trisa_api_v1beta1_api_proto_rawDescGZIP(), []int{0} +} + type ServiceState_Status int32 const ( @@ -63,11 +124,11 @@ func (x ServiceState_Status) String() string { } func (ServiceState_Status) Descriptor() protoreflect.EnumDescriptor { - return file_trisa_api_v1beta1_api_proto_enumTypes[0].Descriptor() + return file_trisa_api_v1beta1_api_proto_enumTypes[1].Descriptor() } func (ServiceState_Status) Type() protoreflect.EnumType { - return &file_trisa_api_v1beta1_api_proto_enumTypes[0] + return &file_trisa_api_v1beta1_api_proto_enumTypes[1] } func (x ServiceState_Status) Number() protoreflect.EnumNumber { @@ -139,6 +200,10 @@ type SecureEnvelope struct { // can be used for the recipient to identify the key pair required for decryption. Sealed bool `protobuf:"varint,11,opt,name=sealed,proto3" json:"sealed,omitempty"` PublicKeySignature string `protobuf:"bytes,12,opt,name=public_key_signature,json=publicKeySignature,proto3" json:"public_key_signature,omitempty"` + // The state refers to the condition that the sending party feels that the secure + // envelope exchange is in. This can optionally be used to signal to the + // counterparty the intent of a transfer message + TransferState TransferState `protobuf:"varint,13,opt,name=transfer_state,json=transferState,proto3,enum=trisa.api.v1beta1.TransferState" json:"transfer_state,omitempty"` } func (x *SecureEnvelope) Reset() { @@ -250,6 +315,13 @@ func (x *SecureEnvelope) GetPublicKeySignature() string { return "" } +func (x *SecureEnvelope) GetTransferState() TransferState { + if x != nil { + return x.TransferState + } + return TransferState_UNSPECIFIED +} + // Payload contains the compliance identity information that must be exchanged in a // secure fashion, transaction information for both counterparties to uniquely identify // the transaction on the chain, and timestamps that are used for regulatory @@ -664,7 +736,7 @@ var file_trisa_api_v1beta1_api_proto_rawDesc = []byte{ 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, 0x1e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x03, 0x0a, 0x0e, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, @@ -689,90 +761,101 @@ var file_trisa_api_v1beta1_api_proto_rawDesc = []byte{ 0x61, 0x6c, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, - 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, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0x52, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, - 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x74, 0x41, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x22, 0x09, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x91, 0x02, 0x0a, 0x0a, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x2f, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x61, 0x6c, 0x67, - 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, - 0x68, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x51, 0x0a, 0x0b, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x61, - 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, - 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x22, - 0xe7, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x26, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, - 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, - 0x0a, 0x0a, 0x06, 0x44, 0x41, 0x4e, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4f, - 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, - 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x05, 0x32, 0xe7, 0x02, 0x0a, 0x0c, 0x54, 0x52, - 0x49, 0x53, 0x41, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x52, 0x0a, 0x08, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, - 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x00, 0x12, 0x5c, - 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x12, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, - 0x6f, 0x70, 0x65, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, - 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x0e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x26, 0x2e, 0x74, 0x72, 0x69, - 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x1d, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, - 0x65, 0x79, 0x1a, 0x1d, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, - 0x79, 0x22, 0x00, 0x32, 0x5a, 0x0a, 0x0b, 0x54, 0x52, 0x49, 0x53, 0x41, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x74, - 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x1f, 0x2e, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xad, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 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, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x36, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 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, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x74, 0x22, + 0x09, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x91, 0x02, 0x0a, 0x0a, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, + 0x6f, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, + 0x74, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x6f, 0x74, 0x41, 0x66, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x51, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, + 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, + 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x22, 0xe7, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x74, 0x72, 0x69, 0x73, + 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, + 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, + 0x6f, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, + 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, + 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, + 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x41, 0x4e, 0x47, + 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, + 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, + 0x10, 0x05, 0x2a, 0x71, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x52, 0x45, 0x50, 0x41, 0x49, 0x52, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x43, + 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, + 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x45, 0x44, 0x10, 0x06, 0x32, 0xe7, 0x02, 0x0a, 0x0c, 0x54, 0x52, 0x49, 0x53, 0x41, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x52, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x12, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, + 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x00, 0x12, 0x5c, 0x0a, 0x0e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x42, - 0x38, 0x5a, 0x36, 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, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, + 0x21, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x74, 0x72, 0x69, + 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x26, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, + 0x12, 0x4d, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x1d, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x1a, 0x1d, + 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x22, 0x00, 0x32, + 0x5a, 0x0a, 0x0b, 0x54, 0x52, 0x49, 0x53, 0x41, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x4b, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x1f, 0x2e, 0x74, 0x72, 0x69, 0x73, 0x61, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x42, 0x38, 0x5a, 0x36, 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, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -787,40 +870,42 @@ func file_trisa_api_v1beta1_api_proto_rawDescGZIP() []byte { return file_trisa_api_v1beta1_api_proto_rawDescData } -var file_trisa_api_v1beta1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_trisa_api_v1beta1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_trisa_api_v1beta1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_trisa_api_v1beta1_api_proto_goTypes = []interface{}{ - (ServiceState_Status)(0), // 0: trisa.api.v1beta1.ServiceState.Status - (*SecureEnvelope)(nil), // 1: trisa.api.v1beta1.SecureEnvelope - (*Payload)(nil), // 2: trisa.api.v1beta1.Payload - (*Address)(nil), // 3: trisa.api.v1beta1.Address - (*AddressConfirmation)(nil), // 4: trisa.api.v1beta1.AddressConfirmation - (*SigningKey)(nil), // 5: trisa.api.v1beta1.SigningKey - (*HealthCheck)(nil), // 6: trisa.api.v1beta1.HealthCheck - (*ServiceState)(nil), // 7: trisa.api.v1beta1.ServiceState - (*Error)(nil), // 8: trisa.api.v1beta1.Error - (*anypb.Any)(nil), // 9: google.protobuf.Any + (TransferState)(0), // 0: trisa.api.v1beta1.TransferState + (ServiceState_Status)(0), // 1: trisa.api.v1beta1.ServiceState.Status + (*SecureEnvelope)(nil), // 2: trisa.api.v1beta1.SecureEnvelope + (*Payload)(nil), // 3: trisa.api.v1beta1.Payload + (*Address)(nil), // 4: trisa.api.v1beta1.Address + (*AddressConfirmation)(nil), // 5: trisa.api.v1beta1.AddressConfirmation + (*SigningKey)(nil), // 6: trisa.api.v1beta1.SigningKey + (*HealthCheck)(nil), // 7: trisa.api.v1beta1.HealthCheck + (*ServiceState)(nil), // 8: trisa.api.v1beta1.ServiceState + (*Error)(nil), // 9: trisa.api.v1beta1.Error + (*anypb.Any)(nil), // 10: google.protobuf.Any } var file_trisa_api_v1beta1_api_proto_depIdxs = []int32{ - 8, // 0: trisa.api.v1beta1.SecureEnvelope.error:type_name -> trisa.api.v1beta1.Error - 9, // 1: trisa.api.v1beta1.Payload.identity:type_name -> google.protobuf.Any - 9, // 2: trisa.api.v1beta1.Payload.transaction:type_name -> google.protobuf.Any - 0, // 3: trisa.api.v1beta1.ServiceState.status:type_name -> trisa.api.v1beta1.ServiceState.Status - 1, // 4: trisa.api.v1beta1.TRISANetwork.Transfer:input_type -> trisa.api.v1beta1.SecureEnvelope - 1, // 5: trisa.api.v1beta1.TRISANetwork.TransferStream:input_type -> trisa.api.v1beta1.SecureEnvelope - 3, // 6: trisa.api.v1beta1.TRISANetwork.ConfirmAddress:input_type -> trisa.api.v1beta1.Address - 5, // 7: trisa.api.v1beta1.TRISANetwork.KeyExchange:input_type -> trisa.api.v1beta1.SigningKey - 6, // 8: trisa.api.v1beta1.TRISAHealth.Status:input_type -> trisa.api.v1beta1.HealthCheck - 1, // 9: trisa.api.v1beta1.TRISANetwork.Transfer:output_type -> trisa.api.v1beta1.SecureEnvelope - 1, // 10: trisa.api.v1beta1.TRISANetwork.TransferStream:output_type -> trisa.api.v1beta1.SecureEnvelope - 4, // 11: trisa.api.v1beta1.TRISANetwork.ConfirmAddress:output_type -> trisa.api.v1beta1.AddressConfirmation - 5, // 12: trisa.api.v1beta1.TRISANetwork.KeyExchange:output_type -> trisa.api.v1beta1.SigningKey - 7, // 13: trisa.api.v1beta1.TRISAHealth.Status:output_type -> trisa.api.v1beta1.ServiceState - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] 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 + 9, // 0: trisa.api.v1beta1.SecureEnvelope.error:type_name -> trisa.api.v1beta1.Error + 0, // 1: trisa.api.v1beta1.SecureEnvelope.transfer_state:type_name -> trisa.api.v1beta1.TransferState + 10, // 2: trisa.api.v1beta1.Payload.identity:type_name -> google.protobuf.Any + 10, // 3: trisa.api.v1beta1.Payload.transaction:type_name -> google.protobuf.Any + 1, // 4: trisa.api.v1beta1.ServiceState.status:type_name -> trisa.api.v1beta1.ServiceState.Status + 2, // 5: trisa.api.v1beta1.TRISANetwork.Transfer:input_type -> trisa.api.v1beta1.SecureEnvelope + 2, // 6: trisa.api.v1beta1.TRISANetwork.TransferStream:input_type -> trisa.api.v1beta1.SecureEnvelope + 4, // 7: trisa.api.v1beta1.TRISANetwork.ConfirmAddress:input_type -> trisa.api.v1beta1.Address + 6, // 8: trisa.api.v1beta1.TRISANetwork.KeyExchange:input_type -> trisa.api.v1beta1.SigningKey + 7, // 9: trisa.api.v1beta1.TRISAHealth.Status:input_type -> trisa.api.v1beta1.HealthCheck + 2, // 10: trisa.api.v1beta1.TRISANetwork.Transfer:output_type -> trisa.api.v1beta1.SecureEnvelope + 2, // 11: trisa.api.v1beta1.TRISANetwork.TransferStream:output_type -> trisa.api.v1beta1.SecureEnvelope + 5, // 12: trisa.api.v1beta1.TRISANetwork.ConfirmAddress:output_type -> trisa.api.v1beta1.AddressConfirmation + 6, // 13: trisa.api.v1beta1.TRISANetwork.KeyExchange:output_type -> trisa.api.v1beta1.SigningKey + 8, // 14: trisa.api.v1beta1.TRISAHealth.Status:output_type -> trisa.api.v1beta1.ServiceState + 10, // [10:15] is the sub-list for method output_type + 5, // [5:10] 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 } func init() { file_trisa_api_v1beta1_api_proto_init() } @@ -920,7 +1005,7 @@ func file_trisa_api_v1beta1_api_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_trisa_api_v1beta1_api_proto_rawDesc, - NumEnums: 1, + NumEnums: 2, NumMessages: 7, NumExtensions: 0, NumServices: 2, diff --git a/pkg/trisa/api/v1beta1/api_grpc.pb.go b/pkg/trisa/api/v1beta1/api_grpc.pb.go index 5ff542d7..8940ea25 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.3.0 -// - protoc v4.23.4 +// - protoc v5.26.1 // source: trisa/api/v1beta1/api.proto package api diff --git a/pkg/trisa/api/v1beta1/errors.pb.go b/pkg/trisa/api/v1beta1/errors.pb.go index 91878692..13fb94b5 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: trisa/api/v1beta1/errors.proto package api diff --git a/pkg/trisa/api/v1beta1/states.go b/pkg/trisa/api/v1beta1/states.go new file mode 100644 index 00000000..1fb073d3 --- /dev/null +++ b/pkg/trisa/api/v1beta1/states.go @@ -0,0 +1,12 @@ +package api + +// TRISA transfer state constants. See protocol buffers documentation for more details. +const ( + TransferStateUnspecified = TransferState_UNSPECIFIED + TransferStarted = TransferState_STARTED + TransferPending = TransferState_PENDING + TransferRepair = TransferState_REPAIR + TransferAccepted = TransferState_ACCEPTED + TransferCompleted = TransferState_COMPLETED + TransferRejected = TransferState_REJECTED +) diff --git a/pkg/trisa/data/generic/v1beta1/transaction.pb.go b/pkg/trisa/data/generic/v1beta1/transaction.pb.go index 6ff1e218..ed7c8e92 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: trisa/data/generic/v1beta1/transaction.proto package generic diff --git a/pkg/trisa/envelope/envelope.go b/pkg/trisa/envelope/envelope.go index 289e6eaf..8ac9120d 100644 --- a/pkg/trisa/envelope/envelope.go +++ b/pkg/trisa/envelope/envelope.go @@ -142,6 +142,15 @@ func Reject(reject *api.Error, opts ...Option) (_ *api.SecureEnvelope, err error // Add the error to the envelope and validate env.msg.Error = reject + + // Determine the transfer state from the rejection + if reject.Retry { + env.msg.TransferState = api.TransferRepair + } else { + env.msg.TransferState = api.TransferRejected + } + + // Validate the message and the error if err = env.ValidateMessage(); err != nil { return nil, err } @@ -205,6 +214,7 @@ func New(payload *api.Payload, opts ...Option) (env *Envelope, err error) { Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: false, PublicKeySignature: "", + TransferState: api.TransferStateUnspecified, }, payload: payload, } @@ -288,9 +298,16 @@ func (e *Envelope) Reject(reject *api.Error, opts ...Option) (env *Envelope, err Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: false, PublicKeySignature: "", + TransferState: api.TransferStateUnspecified, }, } + if reject.Retry { + env.msg.TransferState = api.TransferRepair + } else { + env.msg.TransferState = api.TransferRejected + } + // Apply the options for _, opt := range opts { if err = opt(env); err != nil { @@ -326,6 +343,7 @@ func (e *Envelope) Update(payload *api.Payload, opts ...Option) (env *Envelope, Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: false, PublicKeySignature: "", + TransferState: e.msg.TransferState, }, crypto: e.crypto, seal: e.seal, @@ -371,6 +389,7 @@ func (e *Envelope) Encrypt(opts ...Option) (env *Envelope, reject *api.Error, er Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: false, PublicKeySignature: "", + TransferState: e.msg.TransferState, }, crypto: e.crypto, seal: e.seal, @@ -461,6 +480,7 @@ func (e *Envelope) Decrypt(opts ...Option) (env *Envelope, reject *api.Error, er Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: false, PublicKeySignature: "", + TransferState: e.msg.TransferState, }, crypto: e.crypto, seal: e.seal, @@ -563,6 +583,7 @@ func (e *Envelope) Seal(opts ...Option) (env *Envelope, reject *api.Error, err e Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: false, PublicKeySignature: "", + TransferState: e.msg.TransferState, }, crypto: e.crypto, seal: e.seal, @@ -635,6 +656,7 @@ func (e *Envelope) Unseal(opts ...Option) (env *Envelope, reject *api.Error, err Timestamp: time.Now().UTC().Format(time.RFC3339Nano), Sealed: e.msg.Sealed, PublicKeySignature: e.msg.PublicKeySignature, + TransferState: e.msg.TransferState, }, crypto: e.crypto, seal: e.seal, @@ -712,6 +734,11 @@ func (e *Envelope) Error() *api.Error { return e.msg.Error } +// TransferState returns the TRISA TransferState on the envelope +func (e *Envelope) TransferState() api.TransferState { + return e.msg.TransferState +} + // IsError returns true if the envelope is in an error state func (e *Envelope) IsError() bool { state := e.State() diff --git a/pkg/trisa/envelope/options.go b/pkg/trisa/envelope/options.go index 2696ca23..0eba6463 100644 --- a/pkg/trisa/envelope/options.go +++ b/pkg/trisa/envelope/options.go @@ -5,6 +5,7 @@ import ( "fmt" "time" + api "github.com/trisacrypto/trisa/pkg/trisa/api/v1beta1" "github.com/trisacrypto/trisa/pkg/trisa/crypto" "github.com/trisacrypto/trisa/pkg/trisa/crypto/aesgcm" "github.com/trisacrypto/trisa/pkg/trisa/crypto/rsaoeap" @@ -35,6 +36,13 @@ func WithTimestamp(ts time.Time) Option { } } +func WithTransferState(state api.TransferState) Option { + return func(e *Envelope) error { + e.msg.TransferState = state + return nil + } +} + func WithCrypto(crypto crypto.Crypto) Option { return func(e *Envelope) error { e.crypto = crypto diff --git a/pkg/trisa/gds/api/v1beta1/api.pb.go b/pkg/trisa/gds/api/v1beta1/api.pb.go index 2a71e8bc..1f63d676 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // 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 6795deb0..5fb21dbe 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.3.0 -// - protoc v4.23.4 +// - protoc v5.26.1 // source: trisa/gds/api/v1beta1/api.proto package api diff --git a/pkg/trisa/gds/models/v1beta1/ca.pb.go b/pkg/trisa/gds/models/v1beta1/ca.pb.go index 95f6c497..f3fe361b 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // 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 e5e6f144..a2f84073 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.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.34.1 +// protoc v5.26.1 // source: trisa/gds/models/v1beta1/models.proto package models diff --git a/pkg/trisa/peers/peer.go b/pkg/trisa/peers/peer.go index bdb36728..31e73f13 100644 --- a/pkg/trisa/peers/peer.go +++ b/pkg/trisa/peers/peer.go @@ -185,7 +185,7 @@ func (p *Peer) connect(opts ...grpc.DialOption) (err error) { } var cc *grpc.ClientConn - if cc, err = grpc.Dial(p.info.Endpoint, opts...); err != nil { + if cc, err = grpc.NewClient(p.info.Endpoint, opts...); err != nil { return err } diff --git a/pkg/trisa/peers/peers.go b/pkg/trisa/peers/peers.go index 8dbf0bc8..16995b80 100644 --- a/pkg/trisa/peers/peers.go +++ b/pkg/trisa/peers/peers.go @@ -264,7 +264,7 @@ func (p *Peers) connect(opts ...grpc.DialOption) (err error) { } var cc *grpc.ClientConn - if cc, err = grpc.Dial(p.directoryURL, opts...); err != nil { + if cc, err = grpc.NewClient(p.directoryURL, opts...); err != nil { return err } diff --git a/pkg/trisa/peers/peers_test.go b/pkg/trisa/peers/peers_test.go index bf430f24..374104d7 100644 --- a/pkg/trisa/peers/peers_test.go +++ b/pkg/trisa/peers/peers_test.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/resolver" "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" @@ -418,8 +419,11 @@ func makePeersCache() (cache *peers.Peers, mgds *gdsmock.GDS, err error) { return nil, nil, err } + // Set the resolver default scheme to passthrough to avoid DNS while using bufconn + resolver.SetDefaultScheme("passthrough") + // Create the peeers cache with the configured credentials and a mock GDS - cache = peers.New(certs, pool, "bufconn") + cache = peers.New(certs, pool, "passthrough://bufnet") mgds = gdsmock.New(nil) // Connect the peers cache to the mock GDS for testing purposes diff --git a/pkg/trust/mock/mock.go b/pkg/trust/mock/mock.go index 1434c15e..027b769d 100644 --- a/pkg/trust/mock/mock.go +++ b/pkg/trust/mock/mock.go @@ -64,7 +64,8 @@ func Chain() (data []byte, err error) { return nil, err } - return pkcs12.Encode(rand.Reader, priv, cert, []*x509.Certificate{ca, rca}, pkcs12.DefaultPassword) + // TODO: update to pkcs12.Modern when supported by Sectigo + return pkcs12.Legacy.Encode(priv, cert, []*x509.Certificate{ca, rca}, pkcs12.DefaultPassword) } func initCA() { diff --git a/pkg/trust/trust.go b/pkg/trust/trust.go index 1067e25b..cbe367b4 100644 --- a/pkg/trust/trust.go +++ b/pkg/trust/trust.go @@ -9,7 +9,6 @@ package trust import ( "bytes" - "crypto/rand" "crypto/rsa" "crypto/tls" "crypto/x509" @@ -90,7 +89,8 @@ func (p *Provider) Encrypt(password string) (pfxData []byte, err error) { } } - return pkcs12.Encode(rand.Reader, p.key, crt, ca, password) + // TODO: update to pkcs12.Modern when supported by Sectigo + return pkcs12.Legacy.Encode(p.key, crt, ca, password) } // Decode PEM blocks and adds them to the provider. Certificates are appended to the diff --git a/proto/trisa/api/v1beta1/api.proto b/proto/trisa/api/v1beta1/api.proto index fc3fdc1f..6ab27b29 100644 --- a/proto/trisa/api/v1beta1/api.proto +++ b/proto/trisa/api/v1beta1/api.proto @@ -118,6 +118,21 @@ message SecureEnvelope { // can be used for the recipient to identify the key pair required for decryption. bool sealed = 11; string public_key_signature = 12; + + // The state refers to the condition that the sending party feels that the secure + // envelope exchange is in. This can optionally be used to signal to the + // counterparty the intent of a transfer message + TransferState transfer_state = 13; +} + +enum TransferState { + UNSPECIFIED = 0; // the transfer state is unknown or not specified + STARTED = 1; // this is the first message in the TRISA workflow + PENDING = 2; // action is required by the sending party + REPAIR = 3; // some state of the travel rule exchange requires repair + ACCEPTED = 4; // the travel rule exchange is accepted and waiting the transaction + COMPLETED = 5; // the travel rule and on-chain transaction have been completed + REJECTED = 6; // the travel rule exchange is rejected and should not proceed } // Payload contains the compliance identity information that must be exchanged in a