diff --git a/api/openapi.json b/api/openapi.json index 9534c1a3..0ff22118 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -6691,7 +6691,7 @@ }, "/v2/accounts/{account_id}/events/emulate": { "post": { - "description": "Emulate sending message to blockchain", + "description": "Emulate sending message to retrieve account-specific events", "operationId": "emulateMessageToAccountEvent", "parameters": [ { @@ -7683,6 +7683,44 @@ ] } }, + "/v2/blockchain/blocks/{block_id}/boc": { + "get": { + "description": "Download blockchain block BOC", + "operationId": "downloadBlockchainBlockBoc", + "parameters": [ + { + "$ref": "#/components/parameters/blockchainBlockIDParameter" + } + ], + "responses": { + "200": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Block BOC file", + "headers": { + "Content-Disposition": { + "schema": { + "example": "attachment; filename=\"block.boc\"", + "type": "string" + } + } + } + }, + "default": { + "$ref": "#/components/responses/Error" + } + }, + "tags": [ + "Blockchain" + ] + } + }, "/v2/blockchain/blocks/{block_id}/transactions": { "get": { "description": "Get transactions from block", @@ -8181,7 +8219,7 @@ }, "/v2/events/emulate": { "post": { - "description": "Emulate sending message to blockchain", + "description": "Emulate sending message to retrieve general blockchain events", "operationId": "emulateMessageToEvent", "parameters": [ { @@ -10720,7 +10758,7 @@ }, "/v2/traces/emulate": { "post": { - "description": "Emulate sending message to blockchain", + "description": "Emulate sending message to retrieve with a detailed execution trace", "operationId": "emulateMessageToTrace", "parameters": [ { @@ -10823,7 +10861,7 @@ }, "/v2/wallet/emulate": { "post": { - "description": "Emulate sending message to blockchain", + "description": "Emulate sending message to retrieve the resulting wallet state", "operationId": "emulateMessageToWallet", "parameters": [ { diff --git a/api/openapi.yml b/api/openapi.yml index 7f0d8166..d79e3e98 100644 --- a/api/openapi.yml +++ b/api/openapi.yml @@ -168,6 +168,29 @@ paths: $ref: '#/components/schemas/BlockchainBlock' 'default': $ref: '#/components/responses/Error' + /v2/blockchain/blocks/{block_id}/boc: + get: + description: Download blockchain block BOC + operationId: downloadBlockchainBlockBoc + tags: + - Blockchain + parameters: + - $ref: '#/components/parameters/blockchainBlockIDParameter' + responses: + '200': + description: Block BOC file + content: + application/octet-stream: + schema: + type: string + format: binary + headers: + Content-Disposition: + schema: + type: string + example: 'attachment; filename="block.boc"' + 'default': + $ref: '#/components/responses/Error' /v2/blockchain/masterchain/{masterchain_seqno}/shards: get: description: Get blockchain block shards diff --git a/pkg/api/blockchain_handlers.go b/pkg/api/blockchain_handlers.go index 7f86bc49..2a2ff120 100644 --- a/pkg/api/blockchain_handlers.go +++ b/pkg/api/blockchain_handlers.go @@ -1,6 +1,7 @@ package api import ( + "bytes" "context" "encoding/json" "errors" @@ -72,6 +73,25 @@ func (h *Handler) GetBlockchainBlock(ctx context.Context, params oas.GetBlockcha return &res, nil } +func (h *Handler) DownloadBlockchainBlockBoc(ctx context.Context, params oas.DownloadBlockchainBlockBocParams) (*oas.DownloadBlockchainBlockBocOKHeaders, error) { + blockID, err := ton.ParseBlockID(params.BlockID) + if err != nil { + return nil, toError(http.StatusBadRequest, err) + } + + bocBytes, err := h.storage.GetBlockchainBlock(ctx, blockID) + if err != nil { + return nil, toError(http.StatusInternalServerError, err) + } + + return &oas.DownloadBlockchainBlockBocOKHeaders{ + ContentDisposition: oas.NewOptString(fmt.Sprintf(`attachment; filename="block_%s.boc"`, params.BlockID)), + Response: oas.DownloadBlockchainBlockBocOK{ + Data: bytes.NewReader(bocBytes), + }, + }, nil +} + func (h *Handler) GetBlockchainMasterchainShards(ctx context.Context, params oas.GetBlockchainMasterchainShardsParams) (r *oas.BlockchainBlockShards, _ error) { shards, err := h.storage.GetBlockShards(ctx, ton.BlockID{Shard: 0x8000000000000000, Seqno: uint32(params.MasterchainSeqno), Workchain: -1}) if errors.Is(err, core.ErrEntityNotFound) { diff --git a/pkg/api/interfaces.go b/pkg/api/interfaces.go index f702f64a..1af364b0 100644 --- a/pkg/api/interfaces.go +++ b/pkg/api/interfaces.go @@ -37,6 +37,7 @@ type storage interface { GetReducedBlocks(ctx context.Context, from, to int64) ([]core.ReducedBlock, error) GetBlockShards(ctx context.Context, id tongo.BlockID) ([]ton.BlockID, error) LastMasterchainBlockHeader(ctx context.Context) (*core.BlockHeader, error) + GetBlockchainBlock(ctx context.Context, blockID ton.BlockID) ([]byte, error) GetTransaction(ctx context.Context, hash tongo.Bits256) (*core.Transaction, error) SearchTransactionByMessageHash(ctx context.Context, hash tongo.Bits256) (*tongo.Bits256, error) // GetBlockTransactions returns low-level information about transactions in a particular block. diff --git a/pkg/litestorage/litestorage.go b/pkg/litestorage/litestorage.go index 3149fa0e..b7b68f72 100644 --- a/pkg/litestorage/litestorage.go +++ b/pkg/litestorage/litestorage.go @@ -574,3 +574,15 @@ func (s *LiteStorage) SaveTraceWithState(ctx context.Context, msgHash string, tr func (s *LiteStorage) GetTraceWithState(ctx context.Context, msgHash string) (*core.Trace, int, []abi.MethodInvocation, error) { return nil, 0, nil, fmt.Errorf("not implemented") } + +func (s *LiteStorage) GetBlockchainBlock(ctx context.Context, id ton.BlockID) ([]byte, error) { + idExt, _, err := s.client.LookupBlock(ctx, id, 1, nil, nil) + if err != nil { + return nil, err + } + block, err := s.client.GetBlockRaw(ctx, idExt) + if err != nil { + return nil, err + } + return block.Data, nil +} diff --git a/pkg/oas/oas_handlers_gen.go b/pkg/oas/oas_handlers_gen.go index 5496811a..30c2a6d1 100644 --- a/pkg/oas/oas_handlers_gen.go +++ b/pkg/oas/oas_handlers_gen.go @@ -606,9 +606,126 @@ func (s *Server) handleDnsResolveRequest(args [1]string, argsEscaped bool, w htt } } +// handleDownloadBlockchainBlockBocRequest handles downloadBlockchainBlockBoc operation. +// +// Download blockchain block BOC. +// +// GET /v2/blockchain/blocks/{block_id}/boc +func (s *Server) handleDownloadBlockchainBlockBocRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + otelAttrs := []attribute.KeyValue{ + otelogen.OperationID("downloadBlockchainBlockBoc"), + semconv.HTTPMethodKey.String("GET"), + semconv.HTTPRouteKey.String("/v2/blockchain/blocks/{block_id}/boc"), + } + + // Start a span for this request. + ctx, span := s.cfg.Tracer.Start(r.Context(), "DownloadBlockchainBlockBoc", + trace.WithAttributes(otelAttrs...), + serverSpanKind, + ) + defer span.End() + + // Run stopwatch. + startTime := time.Now() + defer func() { + elapsedDuration := time.Since(startTime) + // Use floating point division here for higher precision (instead of Millisecond method). + s.duration.Record(ctx, float64(float64(elapsedDuration)/float64(time.Millisecond)), metric.WithAttributes(otelAttrs...)) + }() + + // Increment request counter. + s.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + + var ( + recordError = func(stage string, err error) { + span.RecordError(err) + span.SetStatus(codes.Error, stage) + s.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...)) + } + err error + opErrContext = ogenerrors.OperationContext{ + Name: "DownloadBlockchainBlockBoc", + ID: "downloadBlockchainBlockBoc", + } + ) + params, err := decodeDownloadBlockchainBlockBocParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var response *DownloadBlockchainBlockBocOKHeaders + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: "DownloadBlockchainBlockBoc", + OperationSummary: "", + OperationID: "downloadBlockchainBlockBoc", + Body: nil, + Params: middleware.Parameters{ + { + Name: "block_id", + In: "path", + }: params.BlockID, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = DownloadBlockchainBlockBocParams + Response = *DownloadBlockchainBlockBocOKHeaders + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackDownloadBlockchainBlockBocParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.DownloadBlockchainBlockBoc(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.DownloadBlockchainBlockBoc(ctx, params) + } + if err != nil { + if errRes, ok := errors.Into[*ErrorStatusCode](err); ok { + if err := encodeErrorResponse(errRes, w, span); err != nil { + recordError("Internal", err) + } + return + } + if errors.Is(err, ht.ErrNotImplemented) { + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if err := encodeErrorResponse(s.h.NewError(ctx, err), w, span); err != nil { + recordError("Internal", err) + } + return + } + + if err := encodeDownloadBlockchainBlockBocResponse(response, w, span); err != nil { + recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + // handleEmulateMessageToAccountEventRequest handles emulateMessageToAccountEvent operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve account-specific events. // // POST /v2/accounts/{account_id}/events/emulate func (s *Server) handleEmulateMessageToAccountEventRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { @@ -748,7 +865,7 @@ func (s *Server) handleEmulateMessageToAccountEventRequest(args [1]string, argsE // handleEmulateMessageToEventRequest handles emulateMessageToEvent operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve general blockchain events. // // POST /v2/events/emulate func (s *Server) handleEmulateMessageToEventRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { @@ -884,7 +1001,7 @@ func (s *Server) handleEmulateMessageToEventRequest(args [0]string, argsEscaped // handleEmulateMessageToTraceRequest handles emulateMessageToTrace operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve with a detailed execution trace. // // POST /v2/traces/emulate func (s *Server) handleEmulateMessageToTraceRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { @@ -1016,7 +1133,7 @@ func (s *Server) handleEmulateMessageToTraceRequest(args [0]string, argsEscaped // handleEmulateMessageToWalletRequest handles emulateMessageToWallet operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve the resulting wallet state. // // POST /v2/wallet/emulate func (s *Server) handleEmulateMessageToWalletRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { diff --git a/pkg/oas/oas_parameters_gen.go b/pkg/oas/oas_parameters_gen.go index 108bd843..9a387bed 100644 --- a/pkg/oas/oas_parameters_gen.go +++ b/pkg/oas/oas_parameters_gen.go @@ -279,6 +279,72 @@ func decodeDnsResolveParams(args [1]string, argsEscaped bool, r *http.Request) ( return params, nil } +// DownloadBlockchainBlockBocParams is parameters of downloadBlockchainBlockBoc operation. +type DownloadBlockchainBlockBocParams struct { + // Block ID. + BlockID string +} + +func unpackDownloadBlockchainBlockBocParams(packed middleware.Parameters) (params DownloadBlockchainBlockBocParams) { + { + key := middleware.ParameterKey{ + Name: "block_id", + In: "path", + } + params.BlockID = packed[key].(string) + } + return params +} + +func decodeDownloadBlockchainBlockBocParams(args [1]string, argsEscaped bool, r *http.Request) (params DownloadBlockchainBlockBocParams, _ error) { + // Decode path: block_id. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "block_id", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.BlockID = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "block_id", + In: "path", + Err: err, + } + } + return params, nil +} + // EmulateMessageToAccountEventParams is parameters of emulateMessageToAccountEvent operation. type EmulateMessageToAccountEventParams struct { AcceptLanguage OptString diff --git a/pkg/oas/oas_response_encoders_gen.go b/pkg/oas/oas_response_encoders_gen.go index e6811bb2..93e5a38e 100644 --- a/pkg/oas/oas_response_encoders_gen.go +++ b/pkg/oas/oas_response_encoders_gen.go @@ -11,7 +11,9 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" + "github.com/ogen-go/ogen/conv" ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/uri" ) func encodeAccountDnsBackResolveResponse(response *DomainNames, w http.ResponseWriter, span trace.Span) error { @@ -84,6 +86,38 @@ func encodeDnsResolveResponse(response *DnsRecord, w http.ResponseWriter, span t return nil } +func encodeDownloadBlockchainBlockBocResponse(response *DownloadBlockchainBlockBocOKHeaders, w http.ResponseWriter, span trace.Span) error { + w.Header().Set("Content-Type", "application/octet-stream") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Content-Disposition" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Content-Disposition", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.ContentDisposition.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Content-Disposition header") + } + } + } + w.WriteHeader(200) + span.SetStatus(codes.Ok, http.StatusText(200)) + + writer := w + if _, err := io.Copy(writer, response.Response); err != nil { + return errors.Wrap(err, "write") + } + + return nil +} + func encodeEmulateMessageToAccountEventResponse(response *AccountEvent, w http.ResponseWriter, span trace.Span) error { w.Header().Set("Content-Type", "application/json; charset=utf-8") w.WriteHeader(200) diff --git a/pkg/oas/oas_router_gen.go b/pkg/oas/oas_router_gen.go index 27d219c4..fd788199 100644 --- a/pkg/oas/oas_router_gen.go +++ b/pkg/oas/oas_router_gen.go @@ -898,26 +898,64 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } switch elem[0] { - case '/': // Prefix: "/transactions" + case '/': // Prefix: "/" origElem := elem - if l := len("/transactions"); len(elem) >= l && elem[0:l] == "/transactions" { + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { elem = elem[l:] } else { break } if len(elem) == 0 { - // Leaf node. - switch r.Method { - case "GET": - s.handleGetBlockchainBlockTransactionsRequest([1]string{ - args[0], - }, elemIsEscaped, w, r) - default: - s.notAllowed(w, r, "GET") + break + } + switch elem[0] { + case 'b': // Prefix: "boc" + origElem := elem + if l := len("boc"); len(elem) >= l && elem[0:l] == "boc" { + elem = elem[l:] + } else { + break } - return + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleDownloadBlockchainBlockBocRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "GET") + } + + return + } + + elem = origElem + case 't': // Prefix: "transactions" + origElem := elem + if l := len("transactions"); len(elem) >= l && elem[0:l] == "transactions" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleGetBlockchainBlockTransactionsRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, "GET") + } + + return + } + + elem = origElem } elem = origElem @@ -4378,28 +4416,68 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) { } } switch elem[0] { - case '/': // Prefix: "/transactions" + case '/': // Prefix: "/" origElem := elem - if l := len("/transactions"); len(elem) >= l && elem[0:l] == "/transactions" { + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { elem = elem[l:] } else { break } if len(elem) == 0 { - switch method { - case "GET": - // Leaf: GetBlockchainBlockTransactions - r.name = "GetBlockchainBlockTransactions" - r.summary = "" - r.operationID = "getBlockchainBlockTransactions" - r.pathPattern = "/v2/blockchain/blocks/{block_id}/transactions" - r.args = args - r.count = 1 - return r, true - default: - return + break + } + switch elem[0] { + case 'b': // Prefix: "boc" + origElem := elem + if l := len("boc"); len(elem) >= l && elem[0:l] == "boc" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + // Leaf: DownloadBlockchainBlockBoc + r.name = "DownloadBlockchainBlockBoc" + r.summary = "" + r.operationID = "downloadBlockchainBlockBoc" + r.pathPattern = "/v2/blockchain/blocks/{block_id}/boc" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + + elem = origElem + case 't': // Prefix: "transactions" + origElem := elem + if l := len("transactions"); len(elem) >= l && elem[0:l] == "transactions" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + // Leaf: GetBlockchainBlockTransactions + r.name = "GetBlockchainBlockTransactions" + r.summary = "" + r.operationID = "getBlockchainBlockTransactions" + r.pathPattern = "/v2/blockchain/blocks/{block_id}/transactions" + r.args = args + r.count = 1 + return r, true + default: + return + } } + + elem = origElem } elem = origElem diff --git a/pkg/oas/oas_schemas_gen.go b/pkg/oas/oas_schemas_gen.go index 6bace804..8cb5d41a 100644 --- a/pkg/oas/oas_schemas_gen.go +++ b/pkg/oas/oas_schemas_gen.go @@ -5141,6 +5141,46 @@ func (s *DomainRenewAction) SetRenewer(val AccountAddress) { s.Renewer = val } +type DownloadBlockchainBlockBocOK struct { + Data io.Reader +} + +// Read reads data from the Data reader. +// +// Kept to satisfy the io.Reader interface. +func (s DownloadBlockchainBlockBocOK) Read(p []byte) (n int, err error) { + if s.Data == nil { + return 0, io.EOF + } + return s.Data.Read(p) +} + +// DownloadBlockchainBlockBocOKHeaders wraps DownloadBlockchainBlockBocOK with response headers. +type DownloadBlockchainBlockBocOKHeaders struct { + ContentDisposition OptString + Response DownloadBlockchainBlockBocOK +} + +// GetContentDisposition returns the value of ContentDisposition. +func (s *DownloadBlockchainBlockBocOKHeaders) GetContentDisposition() OptString { + return s.ContentDisposition +} + +// GetResponse returns the value of Response. +func (s *DownloadBlockchainBlockBocOKHeaders) GetResponse() DownloadBlockchainBlockBocOK { + return s.Response +} + +// SetContentDisposition sets the value of ContentDisposition. +func (s *DownloadBlockchainBlockBocOKHeaders) SetContentDisposition(val OptString) { + s.ContentDisposition = val +} + +// SetResponse sets the value of Response. +func (s *DownloadBlockchainBlockBocOKHeaders) SetResponse(val DownloadBlockchainBlockBocOK) { + s.Response = val +} + // Ref: #/components/schemas/EcPreview type EcPreview struct { ID int32 `json:"id"` diff --git a/pkg/oas/oas_server_gen.go b/pkg/oas/oas_server_gen.go index 6947616d..2a0e5978 100644 --- a/pkg/oas/oas_server_gen.go +++ b/pkg/oas/oas_server_gen.go @@ -40,27 +40,33 @@ type Handler interface { // // GET /v2/dns/{domain_name}/resolve DnsResolve(ctx context.Context, params DnsResolveParams) (*DnsRecord, error) + // DownloadBlockchainBlockBoc implements downloadBlockchainBlockBoc operation. + // + // Download blockchain block BOC. + // + // GET /v2/blockchain/blocks/{block_id}/boc + DownloadBlockchainBlockBoc(ctx context.Context, params DownloadBlockchainBlockBocParams) (*DownloadBlockchainBlockBocOKHeaders, error) // EmulateMessageToAccountEvent implements emulateMessageToAccountEvent operation. // - // Emulate sending message to blockchain. + // Emulate sending message to retrieve account-specific events. // // POST /v2/accounts/{account_id}/events/emulate EmulateMessageToAccountEvent(ctx context.Context, req *EmulateMessageToAccountEventReq, params EmulateMessageToAccountEventParams) (*AccountEvent, error) // EmulateMessageToEvent implements emulateMessageToEvent operation. // - // Emulate sending message to blockchain. + // Emulate sending message to retrieve general blockchain events. // // POST /v2/events/emulate EmulateMessageToEvent(ctx context.Context, req *EmulateMessageToEventReq, params EmulateMessageToEventParams) (*Event, error) // EmulateMessageToTrace implements emulateMessageToTrace operation. // - // Emulate sending message to blockchain. + // Emulate sending message to retrieve with a detailed execution trace. // // POST /v2/traces/emulate EmulateMessageToTrace(ctx context.Context, req *EmulateMessageToTraceReq, params EmulateMessageToTraceParams) (*Trace, error) // EmulateMessageToWallet implements emulateMessageToWallet operation. // - // Emulate sending message to blockchain. + // Emulate sending message to retrieve the resulting wallet state. // // POST /v2/wallet/emulate EmulateMessageToWallet(ctx context.Context, req *EmulateMessageToWalletReq, params EmulateMessageToWalletParams) (*MessageConsequences, error) diff --git a/pkg/oas/oas_unimplemented_gen.go b/pkg/oas/oas_unimplemented_gen.go index 4d81e570..be18447c 100644 --- a/pkg/oas/oas_unimplemented_gen.go +++ b/pkg/oas/oas_unimplemented_gen.go @@ -60,9 +60,18 @@ func (UnimplementedHandler) DnsResolve(ctx context.Context, params DnsResolvePar return r, ht.ErrNotImplemented } +// DownloadBlockchainBlockBoc implements downloadBlockchainBlockBoc operation. +// +// Download blockchain block BOC. +// +// GET /v2/blockchain/blocks/{block_id}/boc +func (UnimplementedHandler) DownloadBlockchainBlockBoc(ctx context.Context, params DownloadBlockchainBlockBocParams) (r *DownloadBlockchainBlockBocOKHeaders, _ error) { + return r, ht.ErrNotImplemented +} + // EmulateMessageToAccountEvent implements emulateMessageToAccountEvent operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve account-specific events. // // POST /v2/accounts/{account_id}/events/emulate func (UnimplementedHandler) EmulateMessageToAccountEvent(ctx context.Context, req *EmulateMessageToAccountEventReq, params EmulateMessageToAccountEventParams) (r *AccountEvent, _ error) { @@ -71,7 +80,7 @@ func (UnimplementedHandler) EmulateMessageToAccountEvent(ctx context.Context, re // EmulateMessageToEvent implements emulateMessageToEvent operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve general blockchain events. // // POST /v2/events/emulate func (UnimplementedHandler) EmulateMessageToEvent(ctx context.Context, req *EmulateMessageToEventReq, params EmulateMessageToEventParams) (r *Event, _ error) { @@ -80,7 +89,7 @@ func (UnimplementedHandler) EmulateMessageToEvent(ctx context.Context, req *Emul // EmulateMessageToTrace implements emulateMessageToTrace operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve with a detailed execution trace. // // POST /v2/traces/emulate func (UnimplementedHandler) EmulateMessageToTrace(ctx context.Context, req *EmulateMessageToTraceReq, params EmulateMessageToTraceParams) (r *Trace, _ error) { @@ -89,7 +98,7 @@ func (UnimplementedHandler) EmulateMessageToTrace(ctx context.Context, req *Emul // EmulateMessageToWallet implements emulateMessageToWallet operation. // -// Emulate sending message to blockchain. +// Emulate sending message to retrieve the resulting wallet state. // // POST /v2/wallet/emulate func (UnimplementedHandler) EmulateMessageToWallet(ctx context.Context, req *EmulateMessageToWalletReq, params EmulateMessageToWalletParams) (r *MessageConsequences, _ error) {