diff --git a/art-admin/app/nft/nft.go b/art-admin/app/nft/nft.go index 64bb6c2..a8392a5 100644 --- a/art-admin/app/nft/nft.go +++ b/art-admin/app/nft/nft.go @@ -167,6 +167,57 @@ func (s *Server) UploadOffchainMetadata(ctx context.Context, _ *emptypb.Empty) ( }, nil } +func (s *Server) Burn(ctx context.Context, req *pb_nft.BurnRequest) (*emptypb.Empty, error) { + err := s.db.BurnNft(req) + if err != nil { + log.Error().Err(err).Msgf("Burn:s.db.BurnNft [%v]", err.Error()) + return nil, fmt.Errorf("cannot submit burn data: %s", err.Error()) + } + return nil, err +} + +func (s *Server) GetAllBurned(ctx context.Context, _ *emptypb.Empty) (*pb_nft.BurnList, error) { + all, err := s.db.GetBurned() + if err != nil { + log.Error().Err(err).Msgf("GetAllBurned:s.db.BurnNft [%v]", err.Error()) + return nil, fmt.Errorf("cannot get burn data: %s", err.Error()) + } + return &pb_nft.BurnList{ + Data: all, + }, nil +} + +func (s *Server) GetAllBurnedPending(ctx context.Context, _ *emptypb.Empty) (*pb_nft.BurnList, error) { + pending, err := s.db.GetBurnedPending() + if err != nil { + log.Error().Err(err).Msgf("GetAllBurned:s.db.BurnNft [%v]", err.Error()) + return nil, fmt.Errorf("cannot get burn data: %s", err.Error()) + } + return &pb_nft.BurnList{ + Data: pending, + }, nil +} + +func (s *Server) GetAllBurnedError(ctx context.Context, _ *emptypb.Empty) (*pb_nft.BurnList, error) { + errors, err := s.db.GetBurnedErrors() + if err != nil { + log.Error().Err(err).Msgf("GetAllBurned:s.db.BurnNft [%v]", err.Error()) + return nil, fmt.Errorf("cannot get burn data: %s", err.Error()) + } + return &pb_nft.BurnList{ + Data: errors, + }, nil +} + +func (s *Server) UpdateBurnShippingStatus(ctx context.Context, req *pb_nft.ShippingStatusUpdateRequest) (*emptypb.Empty, error) { + err := s.db.UpdateShippingStatus(req) + if err != nil { + log.Error().Err(err).Msgf("GetAllBurned:s.db.BurnNft [%v]", err.Error()) + return nil, fmt.Errorf("cannot update shipping status: %s", err.Error()) + } + return nil, err +} + // TODO: get metadata from func (s *Server) UploadIPFSMetadata(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error) { return nil, nil diff --git a/art-admin/app/static/swagger/api.swagger.json b/art-admin/app/static/swagger/api.swagger.json index 6c5caf4..fc8d496 100644 --- a/art-admin/app/static/swagger/api.swagger.json +++ b/art-admin/app/static/swagger/api.swagger.json @@ -1 +1 @@ -{"swagger":"2.0","basePath":"","info":{"title":"","version":"1.0.0","description":""},"schemes":null,"consumes":["application/json"],"produces":["application/json"],"paths":{"/api/auth/login":{"post":{"operationId":"Login","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/authLoginRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/authLoginResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Auth"]}},"/api/nft":{"post":{"operationId":"UpdateNFTOffchainUrl","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/nftUpdateNFTOffchainUrlRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/ipfs":{"post":{"operationId":"UploadIPFSMetadata","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{}}}],"responses":{"200":{"description":"A successful response.","schema":{"properties":{}}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"summary":"TODO: add rpc for getting metadata offchain url","tags":["Nft"]}},"/api/nft/offchain":{"post":{"operationId":"UploadOffchainMetadata","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{}}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftMetadataOffchainUrl"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/requests":{"get":{"operationId":"ListNFTMintRequests","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestListArray"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]},"post":{"operationId":"UpsertNFTMintRequest","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/nftNFTMintRequestToUpload"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/requests/{id}":{"delete":{"operationId":"DeleteNFTMintRequestById","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftDeleteStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/{id}":{"delete":{"operationId":"DeleteNFOffchainUrl","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}}},"definitions":{"authLoginRequest":{"properties":{"password":{"type":"string"}},"type":"object"},"authLoginResponse":{"properties":{"authToken":{"type":"string"}},"type":"object"},"nftDeleteStatus":{"properties":{"message":{"type":"string"}},"type":"object"},"nftImageList":{"description":"image","properties":{"compressed":{"type":"string"},"fullSize":{"type":"string"}},"type":"object"},"nftImageToUpload":{"properties":{"raw":{"type":"string"}},"type":"object"},"nftMetadataOffchainUrl":{"description":"Upload offchain metadata _metadata.json","properties":{"Url":{"type":"string"}},"type":"object"},"nftNFTMintRequest":{"properties":{"TxHash":{"type":"string"},"description":{"type":"string"},"ethAddress":{"type":"string"},"id":{"format":"int64","type":"string"},"mintSequenceNumber":{"format":"int64","type":"string"}},"type":"object"},"nftNFTMintRequestListArray":{"properties":{"nftMintRequests":{"items":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"},"type":"array"}},"type":"object"},"nftNFTMintRequestToUpload":{"properties":{"nftMintRequest":{"$ref":"#/definitions/nftNFTMintRequest"},"sampleImages":{"items":{"$ref":"#/definitions/nftImageToUpload"},"type":"array"}},"type":"object"},"nftNFTMintRequestWithStatus":{"properties":{"nftMintRequest":{"$ref":"#/definitions/nftNFTMintRequest"},"nftOffchainUrl":{"type":"string"},"sampleImages":{"items":{"$ref":"#/definitions/nftImageList"},"type":"array"},"status":{"type":"string"}},"type":"object"},"nftUpdateNFTOffchainUrlRequest":{"description":"Update NFT offchain url","properties":{"id":{"type":"string"},"nftOffchainUrl":{"type":"string"}},"type":"object"},"protobufAny":{"additionalProperties":{},"properties":{"@type":{"type":"string"}},"type":"object"},"rpcStatus":{"properties":{"code":{"format":"int32","type":"integer"},"details":{"items":{"$ref":"#/definitions/protobufAny"},"type":"array"},"message":{"type":"string"}},"type":"object"}}} +{"swagger":"2.0","basePath":"","info":{"title":"","version":"1.0.0","description":""},"schemes":null,"consumes":["application/json"],"produces":["application/json"],"paths":{"/api/auth/login":{"post":{"operationId":"Login","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/authLoginRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/authLoginResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Auth"]}},"/api/nft":{"post":{"operationId":"UpdateNFTOffchainUrl","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/nftUpdateNFTOffchainUrlRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/burn":{"get":{"operationId":"GetAllBurned","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftBurnList"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]},"post":{"operationId":"Burn","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/nftBurnRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"properties":{}}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/burn/error":{"get":{"operationId":"GetAllBurnedError","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftBurnList"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/burn/pending":{"get":{"operationId":"GetAllBurnedPending","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftBurnList"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/ipfs":{"post":{"operationId":"UploadIPFSMetadata","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{}}}],"responses":{"200":{"description":"A successful response.","schema":{"properties":{}}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"summary":"TODO: add rpc for getting metadata offchain url","tags":["Nft"]}},"/api/nft/offchain":{"post":{"operationId":"UploadOffchainMetadata","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{}}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftMetadataOffchainUrl"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/requests":{"get":{"operationId":"ListNFTMintRequests","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestListArray"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]},"post":{"operationId":"UpsertNFTMintRequest","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/nftNFTMintRequestToUpload"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/requests/{id}":{"delete":{"operationId":"DeleteNFTMintRequestById","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftDeleteStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/shipping/status":{"post":{"operationId":"UpdateBurnShippingStatus","parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/nftShippingStatusUpdateRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"properties":{}}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}},"/api/nft/{id}":{"delete":{"operationId":"DeleteNFOffchainUrl","parameters":[{"in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/rpcStatus"}}},"tags":["Nft"]}}},"definitions":{"authLoginRequest":{"properties":{"password":{"type":"string"}},"type":"object"},"authLoginResponse":{"properties":{"authToken":{"type":"string"}},"type":"object"},"nftBurnList":{"properties":{"data":{"items":{"$ref":"#/definitions/nftBurnShippingInfo"},"type":"array"}},"type":"object"},"nftBurnRequest":{"description":"Burn","properties":{"address":{"type":"string"},"mintSequenceNumber":{"format":"int64","type":"string"},"shipping":{"$ref":"#/definitions/nftShippingTo"},"txid":{"type":"string"}},"type":"object"},"nftBurnShippingInfo":{"properties":{"burn":{"$ref":"#/definitions/nftBurnRequest"},"id":{"format":"int64","type":"string"},"status":{"$ref":"#/definitions/nftShippingStatus"}},"type":"object"},"nftDeleteStatus":{"properties":{"message":{"type":"string"}},"type":"object"},"nftImageList":{"description":"image","properties":{"compressed":{"type":"string"},"fullSize":{"type":"string"}},"type":"object"},"nftImageToUpload":{"properties":{"raw":{"type":"string"}},"type":"object"},"nftMetadataOffchainUrl":{"description":"Upload offchain metadata _metadata.json","properties":{"Url":{"type":"string"}},"type":"object"},"nftNFTMintRequest":{"properties":{"TxHash":{"type":"string"},"description":{"type":"string"},"ethAddress":{"type":"string"},"id":{"format":"int64","type":"string"},"mintSequenceNumber":{"format":"int64","type":"string"}},"type":"object"},"nftNFTMintRequestListArray":{"properties":{"nftMintRequests":{"items":{"$ref":"#/definitions/nftNFTMintRequestWithStatus"},"type":"array"}},"type":"object"},"nftNFTMintRequestToUpload":{"properties":{"nftMintRequest":{"$ref":"#/definitions/nftNFTMintRequest"},"sampleImages":{"items":{"$ref":"#/definitions/nftImageToUpload"},"type":"array"}},"type":"object"},"nftNFTMintRequestWithStatus":{"properties":{"nftMintRequest":{"$ref":"#/definitions/nftNFTMintRequest"},"nftOffchainUrl":{"type":"string"},"sampleImages":{"items":{"$ref":"#/definitions/nftImageList"},"type":"array"},"status":{"type":"string"}},"type":"object"},"nftShippingStatus":{"properties":{"error":{"type":"string"},"success":{"type":"boolean"},"timeSent":{"format":"int64","type":"string"},"trackNumber":{"type":"string"}},"type":"object"},"nftShippingStatusUpdateRequest":{"properties":{"id":{"type":"string"},"status":{"$ref":"#/definitions/nftShippingStatus"}},"type":"object"},"nftShippingTo":{"properties":{"address":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"email":{"type":"string"},"fullName":{"type":"string"},"zipCode":{"type":"string"}},"type":"object"},"nftUpdateNFTOffchainUrlRequest":{"description":"Update NFT offchain url","properties":{"id":{"type":"string"},"nftOffchainUrl":{"type":"string"}},"type":"object"},"protobufAny":{"additionalProperties":{},"properties":{"@type":{"type":"string"}},"type":"object"},"rpcStatus":{"properties":{"code":{"format":"int32","type":"integer"},"details":{"items":{"$ref":"#/definitions/protobufAny"},"type":"array"},"message":{"type":"string"}},"type":"object"}}} diff --git a/art-admin/app/static/swagger/nft.swagger.json b/art-admin/app/static/swagger/nft.swagger.json index a5cd422..771453c 100644 --- a/art-admin/app/static/swagger/nft.swagger.json +++ b/art-admin/app/static/swagger/nft.swagger.json @@ -48,6 +48,102 @@ ] } }, + "/api/nft/burn": { + "get": { + "operationId": "GetAllBurned", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nftBurnList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Nft" + ] + }, + "post": { + "operationId": "Burn", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/nftBurnRequest" + } + } + ], + "tags": [ + "Nft" + ] + } + }, + "/api/nft/burn/error": { + "get": { + "operationId": "GetAllBurnedError", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nftBurnList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Nft" + ] + } + }, + "/api/nft/burn/pending": { + "get": { + "operationId": "GetAllBurnedPending", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nftBurnList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Nft" + ] + } + }, "/api/nft/ipfs": { "post": { "summary": "TODO: add rpc for getting metadata offchain url", @@ -195,6 +291,38 @@ ] } }, + "/api/nft/shipping/status": { + "post": { + "operationId": "UpdateBurnShippingStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/nftShippingStatusUpdateRequest" + } + } + ], + "tags": [ + "Nft" + ] + } + }, "/api/nft/{id}": { "delete": { "operationId": "DeleteNFOffchainUrl", @@ -227,6 +355,51 @@ } }, "definitions": { + "nftBurnList": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/nftBurnShippingInfo" + } + } + } + }, + "nftBurnRequest": { + "type": "object", + "properties": { + "txid": { + "type": "string" + }, + "address": { + "type": "string" + }, + "mintSequenceNumber": { + "type": "string", + "format": "int64" + }, + "shipping": { + "$ref": "#/definitions/nftShippingTo" + } + }, + "title": "Burn" + }, + "nftBurnShippingInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "int64" + }, + "burn": { + "$ref": "#/definitions/nftBurnRequest" + }, + "status": { + "$ref": "#/definitions/nftShippingStatus" + } + } + }, "nftDeleteStatus": { "type": "object", "properties": { @@ -331,6 +504,58 @@ } } }, + "nftShippingStatus": { + "type": "object", + "properties": { + "trackNumber": { + "type": "string" + }, + "timeSent": { + "type": "string", + "format": "int64" + }, + "error": { + "type": "string" + }, + "success": { + "type": "boolean" + } + } + }, + "nftShippingStatusUpdateRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/nftShippingStatus" + } + } + }, + "nftShippingTo": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "address": { + "type": "string" + }, + "zipCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, "nftUpdateNFTOffchainUrlRequest": { "type": "object", "properties": { diff --git a/art-admin/proto/nft/nft.pb.go b/art-admin/proto/nft/nft.pb.go index 69ca27b..8a98154 100644 --- a/art-admin/proto/nft/nft.pb.go +++ b/art-admin/proto/nft/nft.pb.go @@ -576,6 +576,401 @@ func (x *MetadataOffchainUrl) GetUrl() string { return "" } +// Burn +type BurnRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Txid string `protobuf:"bytes,1,opt,name=txid,proto3" json:"txid,omitempty"` // burn transaction + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // burner address + MintSequenceNumber int64 `protobuf:"varint,3,opt,name=mintSequenceNumber,proto3" json:"mintSequenceNumber,omitempty"` + Shipping *ShippingTo `protobuf:"bytes,4,opt,name=shipping,proto3" json:"shipping,omitempty"` +} + +func (x *BurnRequest) Reset() { + *x = BurnRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nft_nft_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BurnRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BurnRequest) ProtoMessage() {} + +func (x *BurnRequest) ProtoReflect() protoreflect.Message { + mi := &file_nft_nft_proto_msgTypes[10] + 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 BurnRequest.ProtoReflect.Descriptor instead. +func (*BurnRequest) Descriptor() ([]byte, []int) { + return file_nft_nft_proto_rawDescGZIP(), []int{10} +} + +func (x *BurnRequest) GetTxid() string { + if x != nil { + return x.Txid + } + return "" +} + +func (x *BurnRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *BurnRequest) GetMintSequenceNumber() int64 { + if x != nil { + return x.MintSequenceNumber + } + return 0 +} + +func (x *BurnRequest) GetShipping() *ShippingTo { + if x != nil { + return x.Shipping + } + return nil +} + +type ShippingTo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + ZipCode string `protobuf:"bytes,3,opt,name=zipCode,proto3" json:"zipCode,omitempty"` + City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"` + Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` +} + +func (x *ShippingTo) Reset() { + *x = ShippingTo{} + if protoimpl.UnsafeEnabled { + mi := &file_nft_nft_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShippingTo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShippingTo) ProtoMessage() {} + +func (x *ShippingTo) ProtoReflect() protoreflect.Message { + mi := &file_nft_nft_proto_msgTypes[11] + 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 ShippingTo.ProtoReflect.Descriptor instead. +func (*ShippingTo) Descriptor() ([]byte, []int) { + return file_nft_nft_proto_rawDescGZIP(), []int{11} +} + +func (x *ShippingTo) GetFullName() string { + if x != nil { + return x.FullName + } + return "" +} + +func (x *ShippingTo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ShippingTo) GetZipCode() string { + if x != nil { + return x.ZipCode + } + return "" +} + +func (x *ShippingTo) GetCity() string { + if x != nil { + return x.City + } + return "" +} + +func (x *ShippingTo) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + +func (x *ShippingTo) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +type ShippingStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TrackNumber string `protobuf:"bytes,1,opt,name=trackNumber,proto3" json:"trackNumber,omitempty"` + TimeSent int64 `protobuf:"varint,2,opt,name=timeSent,proto3" json:"timeSent,omitempty"` // unix time + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *ShippingStatus) Reset() { + *x = ShippingStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_nft_nft_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShippingStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShippingStatus) ProtoMessage() {} + +func (x *ShippingStatus) ProtoReflect() protoreflect.Message { + mi := &file_nft_nft_proto_msgTypes[12] + 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 ShippingStatus.ProtoReflect.Descriptor instead. +func (*ShippingStatus) Descriptor() ([]byte, []int) { + return file_nft_nft_proto_rawDescGZIP(), []int{12} +} + +func (x *ShippingStatus) GetTrackNumber() string { + if x != nil { + return x.TrackNumber + } + return "" +} + +func (x *ShippingStatus) GetTimeSent() int64 { + if x != nil { + return x.TimeSent + } + return 0 +} + +func (x *ShippingStatus) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +func (x *ShippingStatus) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type ShippingStatusUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status *ShippingStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ShippingStatusUpdateRequest) Reset() { + *x = ShippingStatusUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nft_nft_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShippingStatusUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShippingStatusUpdateRequest) ProtoMessage() {} + +func (x *ShippingStatusUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_nft_nft_proto_msgTypes[13] + 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 ShippingStatusUpdateRequest.ProtoReflect.Descriptor instead. +func (*ShippingStatusUpdateRequest) Descriptor() ([]byte, []int) { + return file_nft_nft_proto_rawDescGZIP(), []int{13} +} + +func (x *ShippingStatusUpdateRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ShippingStatusUpdateRequest) GetStatus() *ShippingStatus { + if x != nil { + return x.Status + } + return nil +} + +type BurnShippingInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Burn *BurnRequest `protobuf:"bytes,2,opt,name=burn,proto3" json:"burn,omitempty"` + Status *ShippingStatus `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *BurnShippingInfo) Reset() { + *x = BurnShippingInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_nft_nft_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BurnShippingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BurnShippingInfo) ProtoMessage() {} + +func (x *BurnShippingInfo) ProtoReflect() protoreflect.Message { + mi := &file_nft_nft_proto_msgTypes[14] + 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 BurnShippingInfo.ProtoReflect.Descriptor instead. +func (*BurnShippingInfo) Descriptor() ([]byte, []int) { + return file_nft_nft_proto_rawDescGZIP(), []int{14} +} + +func (x *BurnShippingInfo) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *BurnShippingInfo) GetBurn() *BurnRequest { + if x != nil { + return x.Burn + } + return nil +} + +func (x *BurnShippingInfo) GetStatus() *ShippingStatus { + if x != nil { + return x.Status + } + return nil +} + +type BurnList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []*BurnShippingInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +} + +func (x *BurnList) Reset() { + *x = BurnList{} + if protoimpl.UnsafeEnabled { + mi := &file_nft_nft_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BurnList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BurnList) ProtoMessage() {} + +func (x *BurnList) ProtoReflect() protoreflect.Message { + mi := &file_nft_nft_proto_msgTypes[15] + 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 BurnList.ProtoReflect.Descriptor instead. +func (*BurnList) Descriptor() ([]byte, []int) { + return file_nft_nft_proto_rawDescGZIP(), []int{15} +} + +func (x *BurnList) GetData() []*BurnShippingInfo { + if x != nil { + return x.Data + } + return nil +} + var File_nft_nft_proto protoreflect.FileDescriptor var file_nft_nft_proto_rawDesc = []byte{ @@ -642,55 +1037,128 @@ var file_nft_nft_proto_rawDesc = []byte{ 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x27, 0x0a, 0x13, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, - 0x32, 0xd1, 0x05, 0x0a, 0x03, 0x4e, 0x66, 0x74, 0x12, 0x70, 0x0a, 0x14, 0x55, 0x70, 0x73, 0x65, - 0x72, 0x74, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x1d, 0x2e, - 0x6e, 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x66, 0x0a, 0x13, 0x4c, 0x69, - 0x73, 0x74, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x6e, 0x66, 0x74, 0x2e, - 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, - 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x46, 0x54, 0x4d, - 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x0d, - 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x1a, 0x11, 0x2e, - 0x6e, 0x66, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, - 0x66, 0x74, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0x6c, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x46, 0x54, 0x4f, 0x66, 0x66, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x20, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x46, 0x54, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x66, 0x74, - 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, - 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0d, 0x22, 0x08, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x5a, - 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x46, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x0d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x49, 0x64, 0x1a, 0x1d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x68, 0x0a, 0x16, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x6e, - 0x66, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x6f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x5e, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x50, - 0x46, 0x53, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x22, 0x98, 0x01, 0x0a, 0x0b, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x78, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, + 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x69, 0x6e, 0x74, + 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, + 0x0a, 0x08, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x54, + 0x6f, 0x52, 0x08, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xa0, 0x01, 0x0a, 0x0a, + 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x75, + 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, + 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x7a, 0x69, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x7a, 0x69, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, + 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x7e, + 0x0a, 0x0e, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x5a, + 0x0a, 0x1b, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x6e, 0x66, 0x74, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x75, 0x0a, 0x10, 0x42, 0x75, + 0x72, 0x6e, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, + 0x0a, 0x04, 0x62, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, + 0x66, 0x74, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, + 0x62, 0x75, 0x72, 0x6e, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x53, 0x68, 0x69, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x35, 0x0a, 0x08, 0x42, 0x75, 0x72, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x66, + 0x74, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x32, 0x9c, 0x09, 0x0a, 0x03, 0x4e, 0x66, 0x74, + 0x12, 0x70, 0x0a, 0x14, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4e, + 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x55, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x1d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x3a, + 0x01, 0x2a, 0x12, 0x66, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x1c, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x72, 0x61, 0x79, 0x22, + 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, + 0x74, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x5c, 0x0a, 0x18, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x0d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x49, 0x64, 0x1a, 0x11, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6c, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x46, 0x54, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, + 0x12, 0x20, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x46, 0x54, + 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x22, 0x08, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x6e, 0x66, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x5a, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4e, 0x46, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x0d, 0x2e, + 0x6e, 0x66, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x1a, 0x1d, 0x2e, 0x6e, + 0x66, 0x74, 0x2e, 0x4e, 0x46, 0x54, 0x4d, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x12, 0x68, 0x0a, 0x16, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x4f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, + 0x2f, 0x6f, 0x66, 0x66, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x4a, 0x0a, 0x04, + 0x42, 0x75, 0x72, 0x6e, 0x12, 0x10, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, + 0x2f, 0x62, 0x75, 0x72, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x4c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, + 0x6c, 0x6c, 0x42, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x0d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, + 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, + 0x74, 0x2f, 0x62, 0x75, 0x72, 0x6e, 0x12, 0x5b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x42, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x42, 0x75, 0x72, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x62, 0x75, 0x72, 0x6e, 0x2f, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x12, 0x57, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x42, 0x75, 0x72, + 0x6e, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x0d, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, + 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, + 0x74, 0x2f, 0x62, 0x75, 0x72, 0x6e, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x79, 0x0a, 0x18, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x72, 0x6e, 0x53, 0x68, 0x69, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x6e, 0x66, 0x74, 0x2e, 0x53, + 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x69, 0x70, 0x66, - 0x73, 0x3a, 0x01, 0x2a, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6a, 0x65, 0x6b, 0x61, 0x62, 0x6f, 0x6c, 0x74, 0x2f, 0x73, 0x6f, 0x6c, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x64, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x72, 0x74, 0x2d, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6e, 0x66, 0x74, 0x2f, 0x73, 0x68, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5e, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x49, 0x50, 0x46, 0x53, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6e, 0x66, 0x74, 0x2f, + 0x69, 0x70, 0x66, 0x73, 0x3a, 0x01, 0x2a, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x65, 0x6b, 0x61, 0x62, 0x6f, 0x6c, 0x74, 0x2f, 0x73, + 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x64, 0x61, 0x70, 0x70, 0x2f, 0x61, 0x72, + 0x74, 0x2d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -705,7 +1173,7 @@ func file_nft_nft_proto_rawDescGZIP() []byte { return file_nft_nft_proto_rawDescData } -var file_nft_nft_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_nft_nft_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_nft_nft_proto_goTypes = []interface{}{ (*ImageList)(nil), // 0: nft.ImageList (*ImageToUpload)(nil), // 1: nft.ImageToUpload @@ -717,7 +1185,13 @@ var file_nft_nft_proto_goTypes = []interface{}{ (*DeleteStatus)(nil), // 7: nft.DeleteStatus (*UpdateNFTOffchainUrlRequest)(nil), // 8: nft.UpdateNFTOffchainUrlRequest (*MetadataOffchainUrl)(nil), // 9: nft.MetadataOffchainUrl - (*emptypb.Empty)(nil), // 10: google.protobuf.Empty + (*BurnRequest)(nil), // 10: nft.BurnRequest + (*ShippingTo)(nil), // 11: nft.ShippingTo + (*ShippingStatus)(nil), // 12: nft.ShippingStatus + (*ShippingStatusUpdateRequest)(nil), // 13: nft.ShippingStatusUpdateRequest + (*BurnShippingInfo)(nil), // 14: nft.BurnShippingInfo + (*BurnList)(nil), // 15: nft.BurnList + (*emptypb.Empty)(nil), // 16: google.protobuf.Empty } var file_nft_nft_proto_depIdxs = []int32{ 1, // 0: nft.NFTMintRequestToUpload.sampleImages:type_name -> nft.ImageToUpload @@ -725,25 +1199,40 @@ var file_nft_nft_proto_depIdxs = []int32{ 0, // 2: nft.NFTMintRequestWithStatus.sampleImages:type_name -> nft.ImageList 2, // 3: nft.NFTMintRequestWithStatus.nftMintRequest:type_name -> nft.NFTMintRequest 4, // 4: nft.NFTMintRequestListArray.nftMintRequests:type_name -> nft.NFTMintRequestWithStatus - 3, // 5: nft.Nft.UpsertNFTMintRequest:input_type -> nft.NFTMintRequestToUpload - 10, // 6: nft.Nft.ListNFTMintRequests:input_type -> google.protobuf.Empty - 6, // 7: nft.Nft.DeleteNFTMintRequestById:input_type -> nft.DeleteId - 8, // 8: nft.Nft.UpdateNFTOffchainUrl:input_type -> nft.UpdateNFTOffchainUrlRequest - 6, // 9: nft.Nft.DeleteNFOffchainUrl:input_type -> nft.DeleteId - 10, // 10: nft.Nft.UploadOffchainMetadata:input_type -> google.protobuf.Empty - 10, // 11: nft.Nft.UploadIPFSMetadata:input_type -> google.protobuf.Empty - 4, // 12: nft.Nft.UpsertNFTMintRequest:output_type -> nft.NFTMintRequestWithStatus - 5, // 13: nft.Nft.ListNFTMintRequests:output_type -> nft.NFTMintRequestListArray - 7, // 14: nft.Nft.DeleteNFTMintRequestById:output_type -> nft.DeleteStatus - 4, // 15: nft.Nft.UpdateNFTOffchainUrl:output_type -> nft.NFTMintRequestWithStatus - 4, // 16: nft.Nft.DeleteNFOffchainUrl:output_type -> nft.NFTMintRequestWithStatus - 9, // 17: nft.Nft.UploadOffchainMetadata:output_type -> nft.MetadataOffchainUrl - 10, // 18: nft.Nft.UploadIPFSMetadata:output_type -> google.protobuf.Empty - 12, // [12:19] is the sub-list for method output_type - 5, // [5:12] 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 + 11, // 5: nft.BurnRequest.shipping:type_name -> nft.ShippingTo + 12, // 6: nft.ShippingStatusUpdateRequest.status:type_name -> nft.ShippingStatus + 10, // 7: nft.BurnShippingInfo.burn:type_name -> nft.BurnRequest + 12, // 8: nft.BurnShippingInfo.status:type_name -> nft.ShippingStatus + 14, // 9: nft.BurnList.data:type_name -> nft.BurnShippingInfo + 3, // 10: nft.Nft.UpsertNFTMintRequest:input_type -> nft.NFTMintRequestToUpload + 16, // 11: nft.Nft.ListNFTMintRequests:input_type -> google.protobuf.Empty + 6, // 12: nft.Nft.DeleteNFTMintRequestById:input_type -> nft.DeleteId + 8, // 13: nft.Nft.UpdateNFTOffchainUrl:input_type -> nft.UpdateNFTOffchainUrlRequest + 6, // 14: nft.Nft.DeleteNFOffchainUrl:input_type -> nft.DeleteId + 16, // 15: nft.Nft.UploadOffchainMetadata:input_type -> google.protobuf.Empty + 10, // 16: nft.Nft.Burn:input_type -> nft.BurnRequest + 16, // 17: nft.Nft.GetAllBurned:input_type -> google.protobuf.Empty + 16, // 18: nft.Nft.GetAllBurnedPending:input_type -> google.protobuf.Empty + 16, // 19: nft.Nft.GetAllBurnedError:input_type -> google.protobuf.Empty + 13, // 20: nft.Nft.UpdateBurnShippingStatus:input_type -> nft.ShippingStatusUpdateRequest + 16, // 21: nft.Nft.UploadIPFSMetadata:input_type -> google.protobuf.Empty + 4, // 22: nft.Nft.UpsertNFTMintRequest:output_type -> nft.NFTMintRequestWithStatus + 5, // 23: nft.Nft.ListNFTMintRequests:output_type -> nft.NFTMintRequestListArray + 7, // 24: nft.Nft.DeleteNFTMintRequestById:output_type -> nft.DeleteStatus + 4, // 25: nft.Nft.UpdateNFTOffchainUrl:output_type -> nft.NFTMintRequestWithStatus + 4, // 26: nft.Nft.DeleteNFOffchainUrl:output_type -> nft.NFTMintRequestWithStatus + 9, // 27: nft.Nft.UploadOffchainMetadata:output_type -> nft.MetadataOffchainUrl + 16, // 28: nft.Nft.Burn:output_type -> google.protobuf.Empty + 15, // 29: nft.Nft.GetAllBurned:output_type -> nft.BurnList + 15, // 30: nft.Nft.GetAllBurnedPending:output_type -> nft.BurnList + 15, // 31: nft.Nft.GetAllBurnedError:output_type -> nft.BurnList + 16, // 32: nft.Nft.UpdateBurnShippingStatus:output_type -> google.protobuf.Empty + 16, // 33: nft.Nft.UploadIPFSMetadata:output_type -> google.protobuf.Empty + 22, // [22:34] is the sub-list for method output_type + 10, // [10:22] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_nft_nft_proto_init() } @@ -872,6 +1361,78 @@ func file_nft_nft_proto_init() { return nil } } + file_nft_nft_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BurnRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nft_nft_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShippingTo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nft_nft_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShippingStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nft_nft_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShippingStatusUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nft_nft_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BurnShippingInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nft_nft_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BurnList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -879,7 +1440,7 @@ func file_nft_nft_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_nft_nft_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/art-admin/proto/nft/nft.pb.gw.go b/art-admin/proto/nft/nft.pb.gw.go index eadb6fa..08b6115 100644 --- a/art-admin/proto/nft/nft.pb.gw.go +++ b/art-admin/proto/nft/nft.pb.gw.go @@ -262,6 +262,128 @@ func local_request_Nft_UploadOffchainMetadata_0(ctx context.Context, marshaler r } +func request_Nft_Burn_0(ctx context.Context, marshaler runtime.Marshaler, client NftClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BurnRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Burn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Nft_Burn_0(ctx context.Context, marshaler runtime.Marshaler, server NftServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BurnRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Burn(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Nft_GetAllBurned_0(ctx context.Context, marshaler runtime.Marshaler, client NftClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.GetAllBurned(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Nft_GetAllBurned_0(ctx context.Context, marshaler runtime.Marshaler, server NftServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.GetAllBurned(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Nft_GetAllBurnedPending_0(ctx context.Context, marshaler runtime.Marshaler, client NftClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.GetAllBurnedPending(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Nft_GetAllBurnedPending_0(ctx context.Context, marshaler runtime.Marshaler, server NftServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.GetAllBurnedPending(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Nft_GetAllBurnedError_0(ctx context.Context, marshaler runtime.Marshaler, client NftClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.GetAllBurnedError(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Nft_GetAllBurnedError_0(ctx context.Context, marshaler runtime.Marshaler, server NftServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.GetAllBurnedError(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Nft_UpdateBurnShippingStatus_0(ctx context.Context, marshaler runtime.Marshaler, client NftClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ShippingStatusUpdateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateBurnShippingStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Nft_UpdateBurnShippingStatus_0(ctx context.Context, marshaler runtime.Marshaler, server NftServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ShippingStatusUpdateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateBurnShippingStatus(ctx, &protoReq) + return msg, metadata, err + +} + func request_Nft_UploadIPFSMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client NftClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq emptypb.Empty var metadata runtime.ServerMetadata @@ -440,6 +562,121 @@ func RegisterNftHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_Nft_Burn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Nft_Burn_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_Burn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Nft_GetAllBurned_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Nft_GetAllBurned_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_GetAllBurned_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Nft_GetAllBurnedPending_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Nft_GetAllBurnedPending_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_GetAllBurnedPending_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Nft_GetAllBurnedError_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Nft_GetAllBurnedError_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_GetAllBurnedError_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Nft_UpdateBurnShippingStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Nft_UpdateBurnShippingStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_UpdateBurnShippingStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_Nft_UploadIPFSMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -624,6 +861,106 @@ func RegisterNftHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_Nft_Burn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Nft_Burn_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_Burn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Nft_GetAllBurned_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Nft_GetAllBurned_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_GetAllBurned_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Nft_GetAllBurnedPending_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Nft_GetAllBurnedPending_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_GetAllBurnedPending_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Nft_GetAllBurnedError_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Nft_GetAllBurnedError_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_GetAllBurnedError_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Nft_UpdateBurnShippingStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Nft_UpdateBurnShippingStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Nft_UpdateBurnShippingStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_Nft_UploadIPFSMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -660,6 +997,16 @@ var ( pattern_Nft_UploadOffchainMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "nft", "offchain"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Nft_Burn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "nft", "burn"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Nft_GetAllBurned_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "nft", "burn"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Nft_GetAllBurnedPending_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "nft", "burn", "pending"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Nft_GetAllBurnedError_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "nft", "burn", "error"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Nft_UpdateBurnShippingStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "nft", "shipping", "status"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Nft_UploadIPFSMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "nft", "ipfs"}, "", runtime.AssumeColonVerbOpt(true))) ) @@ -676,5 +1023,15 @@ var ( forward_Nft_UploadOffchainMetadata_0 = runtime.ForwardResponseMessage + forward_Nft_Burn_0 = runtime.ForwardResponseMessage + + forward_Nft_GetAllBurned_0 = runtime.ForwardResponseMessage + + forward_Nft_GetAllBurnedPending_0 = runtime.ForwardResponseMessage + + forward_Nft_GetAllBurnedError_0 = runtime.ForwardResponseMessage + + forward_Nft_UpdateBurnShippingStatus_0 = runtime.ForwardResponseMessage + forward_Nft_UploadIPFSMetadata_0 = runtime.ForwardResponseMessage ) diff --git a/art-admin/proto/nft/nft.proto b/art-admin/proto/nft/nft.proto index 96dbc96..a510117 100644 --- a/art-admin/proto/nft/nft.proto +++ b/art-admin/proto/nft/nft.proto @@ -48,6 +48,38 @@ service Nft { }; } + rpc Burn (BurnRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post : "/api/nft/burn" + body : "*" + }; + } + + rpc GetAllBurned (google.protobuf.Empty) returns (BurnList) { + option (google.api.http) = { + get : "/api/nft/burn" + }; + } + + rpc GetAllBurnedPending (google.protobuf.Empty) returns (BurnList) { + option (google.api.http) = { + get : "/api/nft/burn/pending" + }; + } + + rpc GetAllBurnedError (google.protobuf.Empty) returns (BurnList) { + option (google.api.http) = { + get : "/api/nft/burn/error" + }; + } + + rpc UpdateBurnShippingStatus (ShippingStatusUpdateRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post : "/api/nft/shipping/status" + body : "*" + }; + } + // TODO: add rpc for getting metadata offchain url rpc UploadIPFSMetadata (google.protobuf.Empty) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -55,6 +87,7 @@ service Nft { body : "*" }; } + } @@ -113,3 +146,44 @@ message UpdateNFTOffchainUrlRequest { message MetadataOffchainUrl { string Url = 1; } + + +// Burn +message BurnRequest { + string txid = 1; // burn transaction + string address = 2; // burner address + int64 mintSequenceNumber = 3; + ShippingTo shipping = 4; +} + +message ShippingTo { + string fullName = 1; + string address = 2; + string zipCode = 3; + string city = 4; + string country = 5; + string email = 6; +} + +message ShippingStatus { + string trackNumber = 1; + int64 timeSent = 2; // unix time + string error = 3; + bool success = 4; +} + +message ShippingStatusUpdateRequest { + string id = 1; + ShippingStatus status = 2; +} + +message BurnShippingInfo { + int64 id = 1; + BurnRequest burn = 2; + ShippingStatus status = 3; +} + +message BurnList { + repeated BurnShippingInfo data = 1; +} + diff --git a/art-admin/proto/nft/nft_grpc.pb.go b/art-admin/proto/nft/nft_grpc.pb.go index 9f0d787..1f4553e 100644 --- a/art-admin/proto/nft/nft_grpc.pb.go +++ b/art-admin/proto/nft/nft_grpc.pb.go @@ -29,6 +29,11 @@ type NftClient interface { UpdateNFTOffchainUrl(ctx context.Context, in *UpdateNFTOffchainUrlRequest, opts ...grpc.CallOption) (*NFTMintRequestWithStatus, error) DeleteNFOffchainUrl(ctx context.Context, in *DeleteId, opts ...grpc.CallOption) (*NFTMintRequestWithStatus, error) UploadOffchainMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MetadataOffchainUrl, error) + Burn(ctx context.Context, in *BurnRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetAllBurned(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BurnList, error) + GetAllBurnedPending(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BurnList, error) + GetAllBurnedError(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BurnList, error) + UpdateBurnShippingStatus(ctx context.Context, in *ShippingStatusUpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // TODO: add rpc for getting metadata offchain url UploadIPFSMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) } @@ -95,6 +100,51 @@ func (c *nftClient) UploadOffchainMetadata(ctx context.Context, in *emptypb.Empt return out, nil } +func (c *nftClient) Burn(ctx context.Context, in *BurnRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/nft.Nft/Burn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nftClient) GetAllBurned(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BurnList, error) { + out := new(BurnList) + err := c.cc.Invoke(ctx, "/nft.Nft/GetAllBurned", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nftClient) GetAllBurnedPending(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BurnList, error) { + out := new(BurnList) + err := c.cc.Invoke(ctx, "/nft.Nft/GetAllBurnedPending", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nftClient) GetAllBurnedError(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BurnList, error) { + out := new(BurnList) + err := c.cc.Invoke(ctx, "/nft.Nft/GetAllBurnedError", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nftClient) UpdateBurnShippingStatus(ctx context.Context, in *ShippingStatusUpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/nft.Nft/UpdateBurnShippingStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *nftClient) UploadIPFSMetadata(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/nft.Nft/UploadIPFSMetadata", in, out, opts...) @@ -114,6 +164,11 @@ type NftServer interface { UpdateNFTOffchainUrl(context.Context, *UpdateNFTOffchainUrlRequest) (*NFTMintRequestWithStatus, error) DeleteNFOffchainUrl(context.Context, *DeleteId) (*NFTMintRequestWithStatus, error) UploadOffchainMetadata(context.Context, *emptypb.Empty) (*MetadataOffchainUrl, error) + Burn(context.Context, *BurnRequest) (*emptypb.Empty, error) + GetAllBurned(context.Context, *emptypb.Empty) (*BurnList, error) + GetAllBurnedPending(context.Context, *emptypb.Empty) (*BurnList, error) + GetAllBurnedError(context.Context, *emptypb.Empty) (*BurnList, error) + UpdateBurnShippingStatus(context.Context, *ShippingStatusUpdateRequest) (*emptypb.Empty, error) // TODO: add rpc for getting metadata offchain url UploadIPFSMetadata(context.Context, *emptypb.Empty) (*emptypb.Empty, error) } @@ -140,6 +195,21 @@ func (UnimplementedNftServer) DeleteNFOffchainUrl(context.Context, *DeleteId) (* func (UnimplementedNftServer) UploadOffchainMetadata(context.Context, *emptypb.Empty) (*MetadataOffchainUrl, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadOffchainMetadata not implemented") } +func (UnimplementedNftServer) Burn(context.Context, *BurnRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Burn not implemented") +} +func (UnimplementedNftServer) GetAllBurned(context.Context, *emptypb.Empty) (*BurnList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllBurned not implemented") +} +func (UnimplementedNftServer) GetAllBurnedPending(context.Context, *emptypb.Empty) (*BurnList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllBurnedPending not implemented") +} +func (UnimplementedNftServer) GetAllBurnedError(context.Context, *emptypb.Empty) (*BurnList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllBurnedError not implemented") +} +func (UnimplementedNftServer) UpdateBurnShippingStatus(context.Context, *ShippingStatusUpdateRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBurnShippingStatus not implemented") +} func (UnimplementedNftServer) UploadIPFSMetadata(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadIPFSMetadata not implemented") } @@ -263,6 +333,96 @@ func _Nft_UploadOffchainMetadata_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Nft_Burn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BurnRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NftServer).Burn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nft.Nft/Burn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NftServer).Burn(ctx, req.(*BurnRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nft_GetAllBurned_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NftServer).GetAllBurned(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nft.Nft/GetAllBurned", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NftServer).GetAllBurned(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nft_GetAllBurnedPending_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NftServer).GetAllBurnedPending(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nft.Nft/GetAllBurnedPending", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NftServer).GetAllBurnedPending(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nft_GetAllBurnedError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NftServer).GetAllBurnedError(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nft.Nft/GetAllBurnedError", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NftServer).GetAllBurnedError(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nft_UpdateBurnShippingStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ShippingStatusUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NftServer).UpdateBurnShippingStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nft.Nft/UpdateBurnShippingStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NftServer).UpdateBurnShippingStatus(ctx, req.(*ShippingStatusUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Nft_UploadIPFSMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(emptypb.Empty) if err := dec(in); err != nil { @@ -312,6 +472,26 @@ var Nft_ServiceDesc = grpc.ServiceDesc{ MethodName: "UploadOffchainMetadata", Handler: _Nft_UploadOffchainMetadata_Handler, }, + { + MethodName: "Burn", + Handler: _Nft_Burn_Handler, + }, + { + MethodName: "GetAllBurned", + Handler: _Nft_GetAllBurned_Handler, + }, + { + MethodName: "GetAllBurnedPending", + Handler: _Nft_GetAllBurnedPending_Handler, + }, + { + MethodName: "GetAllBurnedError", + Handler: _Nft_GetAllBurnedError_Handler, + }, + { + MethodName: "UpdateBurnShippingStatus", + Handler: _Nft_UpdateBurnShippingStatus_Handler, + }, { MethodName: "UploadIPFSMetadata", Handler: _Nft_UploadIPFSMetadata_Handler, diff --git a/art-admin/proto/swagger/nft/nft.swagger.json b/art-admin/proto/swagger/nft/nft.swagger.json index a5cd422..771453c 100644 --- a/art-admin/proto/swagger/nft/nft.swagger.json +++ b/art-admin/proto/swagger/nft/nft.swagger.json @@ -48,6 +48,102 @@ ] } }, + "/api/nft/burn": { + "get": { + "operationId": "GetAllBurned", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nftBurnList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Nft" + ] + }, + "post": { + "operationId": "Burn", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/nftBurnRequest" + } + } + ], + "tags": [ + "Nft" + ] + } + }, + "/api/nft/burn/error": { + "get": { + "operationId": "GetAllBurnedError", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nftBurnList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Nft" + ] + } + }, + "/api/nft/burn/pending": { + "get": { + "operationId": "GetAllBurnedPending", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/nftBurnList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "Nft" + ] + } + }, "/api/nft/ipfs": { "post": { "summary": "TODO: add rpc for getting metadata offchain url", @@ -195,6 +291,38 @@ ] } }, + "/api/nft/shipping/status": { + "post": { + "operationId": "UpdateBurnShippingStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/nftShippingStatusUpdateRequest" + } + } + ], + "tags": [ + "Nft" + ] + } + }, "/api/nft/{id}": { "delete": { "operationId": "DeleteNFOffchainUrl", @@ -227,6 +355,51 @@ } }, "definitions": { + "nftBurnList": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/nftBurnShippingInfo" + } + } + } + }, + "nftBurnRequest": { + "type": "object", + "properties": { + "txid": { + "type": "string" + }, + "address": { + "type": "string" + }, + "mintSequenceNumber": { + "type": "string", + "format": "int64" + }, + "shipping": { + "$ref": "#/definitions/nftShippingTo" + } + }, + "title": "Burn" + }, + "nftBurnShippingInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "int64" + }, + "burn": { + "$ref": "#/definitions/nftBurnRequest" + }, + "status": { + "$ref": "#/definitions/nftShippingStatus" + } + } + }, "nftDeleteStatus": { "type": "object", "properties": { @@ -331,6 +504,58 @@ } } }, + "nftShippingStatus": { + "type": "object", + "properties": { + "trackNumber": { + "type": "string" + }, + "timeSent": { + "type": "string", + "format": "int64" + }, + "error": { + "type": "string" + }, + "success": { + "type": "boolean" + } + } + }, + "nftShippingStatusUpdateRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/nftShippingStatus" + } + } + }, + "nftShippingTo": { + "type": "object", + "properties": { + "fullName": { + "type": "string" + }, + "address": { + "type": "string" + }, + "zipCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, "nftUpdateNFTOffchainUrlRequest": { "type": "object", "properties": { diff --git a/art-admin/store/bunt/bunt.go b/art-admin/store/bunt/bunt.go index ec6f6c8..c6e4351 100644 --- a/art-admin/store/bunt/bunt.go +++ b/art-admin/store/bunt/bunt.go @@ -16,6 +16,7 @@ const ( type Store interface { MintRequestStore MetadataStore + BurnStore } type Config struct { @@ -50,6 +51,10 @@ func (c *Config) InitDB() (*BuntDB, error) { if err != nil { return nil, err } + err = bunt.db.CreateIndex(allBurns, fmt.Sprintf("%s:*", allBurns), buntdb.IndexString) + if err != nil { + return nil, err + } err = bunt.db.CreateIndex(allMetadataRequests, fmt.Sprintf("%s:*", allMetadataRequests), buntdb.IndexString) if err != nil { diff --git a/art-admin/store/bunt/burn.go b/art-admin/store/bunt/burn.go new file mode 100644 index 0000000..df2b224 --- /dev/null +++ b/art-admin/store/bunt/burn.go @@ -0,0 +1,109 @@ +package bunt + +import ( + "encoding/json" + "fmt" + + pb_nft "github.com/jekabolt/solutions-dapp/art-admin/proto/nft" +) + +const ( + allBurns = "burn" +) + +type BurnStore interface { + BurnNft(req *pb_nft.BurnRequest) error + GetBurned() ([]*pb_nft.BurnShippingInfo, error) + GetBurnedPending() ([]*pb_nft.BurnShippingInfo, error) + GetBurnedErrors() ([]*pb_nft.BurnShippingInfo, error) + UpdateShippingStatus(req *pb_nft.ShippingStatusUpdateRequest) error +} + +type burnStore struct { + *BuntDB +} + +// MetadataStore returns a metadata store +func (bdb *BuntDB) BurnStore() BurnStore { + return &burnStore{ + BuntDB: bdb, + } +} + +func (bunt *BuntDB) BurnNft(req *pb_nft.BurnRequest) error { + id, err := bunt.GetNextKey(allBurns) + if err != nil { + return fmt.Errorf("BurnNft:json.Marshal [%v]", err.Error()) + } + si := pb_nft.BurnShippingInfo{ + Id: id, + Burn: req, + Status: &pb_nft.ShippingStatus{}, + } + bs, err := json.Marshal(si) + if err != nil { + return fmt.Errorf("BurnNft:json.Marshal [%v]", err.Error()) + } + err = bunt.Set(allBurns, fmt.Sprint(id), string(bs)) + if err != nil { + return fmt.Errorf("BurnNft:SetNext %v", err) + } + return nil +} + +func (bunt *BuntDB) GetBurned() ([]*pb_nft.BurnShippingInfo, error) { + bsi := []*pb_nft.BurnShippingInfo{} + err := bunt.GetAllJSON(allBurns, &bsi) + if err != nil { + return nil, fmt.Errorf("GetBurned:GetAllJSON [%v]", err.Error()) + } + return bsi, err +} + +func (bunt *BuntDB) GetBurnedPending() ([]*pb_nft.BurnShippingInfo, error) { + sis := []*pb_nft.BurnShippingInfo{} + err := bunt.GetAllJSON(allBurns, &sis) + if err != nil { + return nil, fmt.Errorf("GetBurnedPending:GetAllJSON [%v]", err.Error()) + } + pending := []*pb_nft.BurnShippingInfo{} + for _, si := range sis { + if !si.Status.Success && si.Status.Error == "" { + pending = append(pending, si) + } + } + return pending, err +} + +func (bunt *BuntDB) GetBurnedErrors() ([]*pb_nft.BurnShippingInfo, error) { + sis := []*pb_nft.BurnShippingInfo{} + err := bunt.GetAllJSON(allBurns, &sis) + if err != nil { + return nil, fmt.Errorf("GetBurnedErrors:GetAllJSON [%v]", err.Error()) + } + errors := []*pb_nft.BurnShippingInfo{} + for _, si := range sis { + if si.Status.Error != "" { + errors = append(errors, si) + } + } + return errors, err +} + +func (bunt *BuntDB) UpdateShippingStatus(req *pb_nft.ShippingStatusUpdateRequest) error { + bsi := pb_nft.BurnShippingInfo{} + err := bunt.GetJSONById(allBurns, req.Id, &bsi) + if err != nil { + return fmt.Errorf("UpdateShippingStatus:GetJSONById [%v]", err.Error()) + } + bsi.Status = req.Status + bs, err := json.Marshal(&bsi) + if err != nil { + return fmt.Errorf("UpdateShippingStatus:json.Marshal [%v]", err.Error()) + } + err = bunt.Set(allBurns, req.Id, string(bs)) + if err != nil { + return fmt.Errorf("UpdateShippingStatus:bunt.Set [%v]", err.Error()) + } + return nil +} diff --git a/art-admin/store/bunt/burn_test.go b/art-admin/store/bunt/burn_test.go new file mode 100644 index 0000000..0834a05 --- /dev/null +++ b/art-admin/store/bunt/burn_test.go @@ -0,0 +1,80 @@ +package bunt + +import ( + "fmt" + "testing" + + pb_nft "github.com/jekabolt/solutions-dapp/art-admin/proto/nft" + "github.com/matryer/is" +) + +func TestBurn(t *testing.T) { + is := is.New(t) + + c := Config{ + DBPath: ":memory:", + } + + bdb, err := c.InitDB() + is.NoErr(err) + + bs := bdb.BurnStore() + + err = bs.BurnNft(&pb_nft.BurnRequest{ + Txid: "0x0", + Address: "0x0", + MintSequenceNumber: 1, + Shipping: &pb_nft.ShippingTo{ + Email: "test@mail.com", + }, + }) + is.NoErr(err) + + bsis, err := bs.GetBurned() + is.NoErr(err) + is.True(len(bsis) == 1) + + bsis, err = bs.GetBurnedErrors() + is.NoErr(err) + is.True(len(bsis) == 0) + + bsis, err = bs.GetBurnedPending() + is.NoErr(err) + is.True(len(bsis) == 1) + + err = bs.UpdateShippingStatus(&pb_nft.ShippingStatusUpdateRequest{ + Id: fmt.Sprint(bsis[0].Id), + Status: &pb_nft.ShippingStatus{ + Error: "test err", + }, + }) + is.NoErr(err) + + bsis, err = bs.GetBurnedErrors() + is.NoErr(err) + is.True(len(bsis) == 1) + + err = bs.UpdateShippingStatus(&pb_nft.ShippingStatusUpdateRequest{ + Id: fmt.Sprint(bsis[0].Id), + Status: &pb_nft.ShippingStatus{ + Error: "", + }, + }) + is.NoErr(err) + + bsis, err = bs.GetBurnedPending() + is.NoErr(err) + is.True(len(bsis) == 1) + + err = bs.UpdateShippingStatus(&pb_nft.ShippingStatusUpdateRequest{ + Id: fmt.Sprint(bsis[0].Id), + Status: &pb_nft.ShippingStatus{ + Success: true, + }, + }) + is.NoErr(err) + + bsis, err = bs.GetBurnedPending() + is.NoErr(err) + is.True(len(bsis) == 0) +}